Nav apraksta

stats.html 131KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge" />
  7. <title>RollUp Visualizer</title>
  8. <style>
  9. :root {
  10. --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
  11. "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
  12. "Noto Color Emoji";
  13. --background-color: #f7eedf;
  14. --text-color: #333;
  15. }
  16. @media (prefers-color-scheme: dark) {
  17. :root {
  18. --background-color: #2b2d42;
  19. --text-color: #edf2f4;
  20. }
  21. }
  22. html {
  23. box-sizing: border-box;
  24. }
  25. *,
  26. *:before,
  27. *:after {
  28. box-sizing: inherit;
  29. }
  30. html {
  31. background-color: var(--background-color);
  32. color: var(--text-color);
  33. font-family: var(--font-family);
  34. }
  35. body {
  36. padding: 0;
  37. margin: 0;
  38. }
  39. html,
  40. body {
  41. height: 100%;
  42. width: 100%;
  43. }
  44. body {
  45. display: flex;
  46. flex-direction: column;
  47. }
  48. svg {
  49. vertical-align: middle;
  50. height: 100%;
  51. }
  52. main {
  53. position: relative;
  54. margin: 0 auto;
  55. flex: 1;
  56. height: 100%;
  57. padding: 20px;
  58. }
  59. .tooltip {
  60. position: absolute;
  61. z-index: 1070;
  62. display: block;
  63. border: solid;
  64. border-width: 2px;
  65. border-radius: 5px;
  66. margin: 0;
  67. padding: 5px;
  68. font-style: normal;
  69. font-weight: 400;
  70. line-height: 1.5;
  71. text-align: left;
  72. text-decoration: none;
  73. text-shadow: none;
  74. text-transform: none;
  75. letter-spacing: normal;
  76. word-break: normal;
  77. word-spacing: normal;
  78. word-wrap: break-word;
  79. white-space: normal;
  80. line-break: auto;
  81. font-size: 0.875rem;
  82. opacity: 0;
  83. background-color: var(--background-color);
  84. color: var(--text-color);
  85. }
  86. </style>
  87. <style>
  88. </style>
  89. </head>
  90. <body>
  91. <main></main>
  92. <script>
  93. var drawChart = (function () {
  94. 'use strict';
  95. var xhtml = "http://www.w3.org/1999/xhtml";
  96. var namespaces = {
  97. svg: "http://www.w3.org/2000/svg",
  98. xhtml: xhtml,
  99. xlink: "http://www.w3.org/1999/xlink",
  100. xml: "http://www.w3.org/XML/1998/namespace",
  101. xmlns: "http://www.w3.org/2000/xmlns/"
  102. };
  103. function namespace(name) {
  104. var prefix = name += "", i = prefix.indexOf(":");
  105. if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1);
  106. return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins
  107. }
  108. function creatorInherit(name) {
  109. return function() {
  110. var document = this.ownerDocument,
  111. uri = this.namespaceURI;
  112. return uri === xhtml && document.documentElement.namespaceURI === xhtml
  113. ? document.createElement(name)
  114. : document.createElementNS(uri, name);
  115. };
  116. }
  117. function creatorFixed(fullname) {
  118. return function() {
  119. return this.ownerDocument.createElementNS(fullname.space, fullname.local);
  120. };
  121. }
  122. function creator(name) {
  123. var fullname = namespace(name);
  124. return (fullname.local
  125. ? creatorFixed
  126. : creatorInherit)(fullname);
  127. }
  128. function none() {}
  129. function selector(selector) {
  130. return selector == null ? none : function() {
  131. return this.querySelector(selector);
  132. };
  133. }
  134. function selection_select(select) {
  135. if (typeof select !== "function") select = selector(select);
  136. for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
  137. for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
  138. if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
  139. if ("__data__" in node) subnode.__data__ = node.__data__;
  140. subgroup[i] = subnode;
  141. }
  142. }
  143. }
  144. return new Selection(subgroups, this._parents);
  145. }
  146. function array(x) {
  147. return typeof x === "object" && "length" in x
  148. ? x // Array, TypedArray, NodeList, array-like
  149. : Array.from(x); // Map, Set, iterable, string, or anything else
  150. }
  151. function empty() {
  152. return [];
  153. }
  154. function selectorAll(selector) {
  155. return selector == null ? empty : function() {
  156. return this.querySelectorAll(selector);
  157. };
  158. }
  159. function arrayAll(select) {
  160. return function() {
  161. var group = select.apply(this, arguments);
  162. return group == null ? [] : array(group);
  163. };
  164. }
  165. function selection_selectAll(select) {
  166. if (typeof select === "function") select = arrayAll(select);
  167. else select = selectorAll(select);
  168. for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
  169. for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
  170. if (node = group[i]) {
  171. subgroups.push(select.call(node, node.__data__, i, group));
  172. parents.push(node);
  173. }
  174. }
  175. }
  176. return new Selection(subgroups, parents);
  177. }
  178. function matcher(selector) {
  179. return function() {
  180. return this.matches(selector);
  181. };
  182. }
  183. function selection_filter(match) {
  184. if (typeof match !== "function") match = matcher(match);
  185. for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
  186. for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
  187. if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
  188. subgroup.push(node);
  189. }
  190. }
  191. }
  192. return new Selection(subgroups, this._parents);
  193. }
  194. function sparse(update) {
  195. return new Array(update.length);
  196. }
  197. function selection_enter() {
  198. return new Selection(this._enter || this._groups.map(sparse), this._parents);
  199. }
  200. function EnterNode(parent, datum) {
  201. this.ownerDocument = parent.ownerDocument;
  202. this.namespaceURI = parent.namespaceURI;
  203. this._next = null;
  204. this._parent = parent;
  205. this.__data__ = datum;
  206. }
  207. EnterNode.prototype = {
  208. constructor: EnterNode,
  209. appendChild: function(child) { return this._parent.insertBefore(child, this._next); },
  210. insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },
  211. querySelector: function(selector) { return this._parent.querySelector(selector); },
  212. querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }
  213. };
  214. function constant(x) {
  215. return function() {
  216. return x;
  217. };
  218. }
  219. function bindIndex(parent, group, enter, update, exit, data) {
  220. var i = 0,
  221. node,
  222. groupLength = group.length,
  223. dataLength = data.length;
  224. // Put any non-null nodes that fit into update.
  225. // Put any null nodes into enter.
  226. // Put any remaining data into enter.
  227. for (; i < dataLength; ++i) {
  228. if (node = group[i]) {
  229. node.__data__ = data[i];
  230. update[i] = node;
  231. } else {
  232. enter[i] = new EnterNode(parent, data[i]);
  233. }
  234. }
  235. // Put any non-null nodes that don’t fit into exit.
  236. for (; i < groupLength; ++i) {
  237. if (node = group[i]) {
  238. exit[i] = node;
  239. }
  240. }
  241. }
  242. function bindKey(parent, group, enter, update, exit, data, key) {
  243. var i,
  244. node,
  245. nodeByKeyValue = new Map,
  246. groupLength = group.length,
  247. dataLength = data.length,
  248. keyValues = new Array(groupLength),
  249. keyValue;
  250. // Compute the key for each node.
  251. // If multiple nodes have the same key, the duplicates are added to exit.
  252. for (i = 0; i < groupLength; ++i) {
  253. if (node = group[i]) {
  254. keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + "";
  255. if (nodeByKeyValue.has(keyValue)) {
  256. exit[i] = node;
  257. } else {
  258. nodeByKeyValue.set(keyValue, node);
  259. }
  260. }
  261. }
  262. // Compute the key for each datum.
  263. // If there a node associated with this key, join and add it to update.
  264. // If there is not (or the key is a duplicate), add it to enter.
  265. for (i = 0; i < dataLength; ++i) {
  266. keyValue = key.call(parent, data[i], i, data) + "";
  267. if (node = nodeByKeyValue.get(keyValue)) {
  268. update[i] = node;
  269. node.__data__ = data[i];
  270. nodeByKeyValue.delete(keyValue);
  271. } else {
  272. enter[i] = new EnterNode(parent, data[i]);
  273. }
  274. }
  275. // Add any remaining nodes that were not bound to data to exit.
  276. for (i = 0; i < groupLength; ++i) {
  277. if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {
  278. exit[i] = node;
  279. }
  280. }
  281. }
  282. function datum(node) {
  283. return node.__data__;
  284. }
  285. function selection_data(value, key) {
  286. if (!arguments.length) return Array.from(this, datum);
  287. var bind = key ? bindKey : bindIndex,
  288. parents = this._parents,
  289. groups = this._groups;
  290. if (typeof value !== "function") value = constant(value);
  291. for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
  292. var parent = parents[j],
  293. group = groups[j],
  294. groupLength = group.length,
  295. data = array(value.call(parent, parent && parent.__data__, j, parents)),
  296. dataLength = data.length,
  297. enterGroup = enter[j] = new Array(dataLength),
  298. updateGroup = update[j] = new Array(dataLength),
  299. exitGroup = exit[j] = new Array(groupLength);
  300. bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
  301. // Now connect the enter nodes to their following update node, such that
  302. // appendChild can insert the materialized enter node before this node,
  303. // rather than at the end of the parent node.
  304. for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
  305. if (previous = enterGroup[i0]) {
  306. if (i0 >= i1) i1 = i0 + 1;
  307. while (!(next = updateGroup[i1]) && ++i1 < dataLength);
  308. previous._next = next || null;
  309. }
  310. }
  311. }
  312. update = new Selection(update, parents);
  313. update._enter = enter;
  314. update._exit = exit;
  315. return update;
  316. }
  317. function selection_exit() {
  318. return new Selection(this._exit || this._groups.map(sparse), this._parents);
  319. }
  320. function selection_join(onenter, onupdate, onexit) {
  321. var enter = this.enter(), update = this, exit = this.exit();
  322. enter = typeof onenter === "function" ? onenter(enter) : enter.append(onenter + "");
  323. if (onupdate != null) update = onupdate(update);
  324. if (onexit == null) exit.remove(); else onexit(exit);
  325. return enter && update ? enter.merge(update).order() : update;
  326. }
  327. function selection_merge(selection) {
  328. if (!(selection instanceof Selection)) throw new Error("invalid merge");
  329. for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
  330. for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
  331. if (node = group0[i] || group1[i]) {
  332. merge[i] = node;
  333. }
  334. }
  335. }
  336. for (; j < m0; ++j) {
  337. merges[j] = groups0[j];
  338. }
  339. return new Selection(merges, this._parents);
  340. }
  341. function selection_order() {
  342. for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {
  343. for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {
  344. if (node = group[i]) {
  345. if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);
  346. next = node;
  347. }
  348. }
  349. }
  350. return this;
  351. }
  352. function selection_sort(compare) {
  353. if (!compare) compare = ascending;
  354. function compareNode(a, b) {
  355. return a && b ? compare(a.__data__, b.__data__) : !a - !b;
  356. }
  357. for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
  358. for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
  359. if (node = group[i]) {
  360. sortgroup[i] = node;
  361. }
  362. }
  363. sortgroup.sort(compareNode);
  364. }
  365. return new Selection(sortgroups, this._parents).order();
  366. }
  367. function ascending(a, b) {
  368. return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
  369. }
  370. function selection_call() {
  371. var callback = arguments[0];
  372. arguments[0] = this;
  373. callback.apply(null, arguments);
  374. return this;
  375. }
  376. function selection_nodes() {
  377. return Array.from(this);
  378. }
  379. function selection_node() {
  380. for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
  381. for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {
  382. var node = group[i];
  383. if (node) return node;
  384. }
  385. }
  386. return null;
  387. }
  388. function selection_size() {
  389. let size = 0;
  390. for (const node of this) ++size; // eslint-disable-line no-unused-vars
  391. return size;
  392. }
  393. function selection_empty() {
  394. return !this.node();
  395. }
  396. function selection_each(callback) {
  397. for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
  398. for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
  399. if (node = group[i]) callback.call(node, node.__data__, i, group);
  400. }
  401. }
  402. return this;
  403. }
  404. function attrRemove(name) {
  405. return function() {
  406. this.removeAttribute(name);
  407. };
  408. }
  409. function attrRemoveNS(fullname) {
  410. return function() {
  411. this.removeAttributeNS(fullname.space, fullname.local);
  412. };
  413. }
  414. function attrConstant(name, value) {
  415. return function() {
  416. this.setAttribute(name, value);
  417. };
  418. }
  419. function attrConstantNS(fullname, value) {
  420. return function() {
  421. this.setAttributeNS(fullname.space, fullname.local, value);
  422. };
  423. }
  424. function attrFunction(name, value) {
  425. return function() {
  426. var v = value.apply(this, arguments);
  427. if (v == null) this.removeAttribute(name);
  428. else this.setAttribute(name, v);
  429. };
  430. }
  431. function attrFunctionNS(fullname, value) {
  432. return function() {
  433. var v = value.apply(this, arguments);
  434. if (v == null) this.removeAttributeNS(fullname.space, fullname.local);
  435. else this.setAttributeNS(fullname.space, fullname.local, v);
  436. };
  437. }
  438. function selection_attr(name, value) {
  439. var fullname = namespace(name);
  440. if (arguments.length < 2) {
  441. var node = this.node();
  442. return fullname.local
  443. ? node.getAttributeNS(fullname.space, fullname.local)
  444. : node.getAttribute(fullname);
  445. }
  446. return this.each((value == null
  447. ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === "function"
  448. ? (fullname.local ? attrFunctionNS : attrFunction)
  449. : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));
  450. }
  451. function defaultView(node) {
  452. return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node
  453. || (node.document && node) // node is a Window
  454. || node.defaultView; // node is a Document
  455. }
  456. function styleRemove(name) {
  457. return function() {
  458. this.style.removeProperty(name);
  459. };
  460. }
  461. function styleConstant(name, value, priority) {
  462. return function() {
  463. this.style.setProperty(name, value, priority);
  464. };
  465. }
  466. function styleFunction(name, value, priority) {
  467. return function() {
  468. var v = value.apply(this, arguments);
  469. if (v == null) this.style.removeProperty(name);
  470. else this.style.setProperty(name, v, priority);
  471. };
  472. }
  473. function selection_style(name, value, priority) {
  474. return arguments.length > 1
  475. ? this.each((value == null
  476. ? styleRemove : typeof value === "function"
  477. ? styleFunction
  478. : styleConstant)(name, value, priority == null ? "" : priority))
  479. : styleValue(this.node(), name);
  480. }
  481. function styleValue(node, name) {
  482. return node.style.getPropertyValue(name)
  483. || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);
  484. }
  485. function propertyRemove(name) {
  486. return function() {
  487. delete this[name];
  488. };
  489. }
  490. function propertyConstant(name, value) {
  491. return function() {
  492. this[name] = value;
  493. };
  494. }
  495. function propertyFunction(name, value) {
  496. return function() {
  497. var v = value.apply(this, arguments);
  498. if (v == null) delete this[name];
  499. else this[name] = v;
  500. };
  501. }
  502. function selection_property(name, value) {
  503. return arguments.length > 1
  504. ? this.each((value == null
  505. ? propertyRemove : typeof value === "function"
  506. ? propertyFunction
  507. : propertyConstant)(name, value))
  508. : this.node()[name];
  509. }
  510. function classArray(string) {
  511. return string.trim().split(/^|\s+/);
  512. }
  513. function classList(node) {
  514. return node.classList || new ClassList(node);
  515. }
  516. function ClassList(node) {
  517. this._node = node;
  518. this._names = classArray(node.getAttribute("class") || "");
  519. }
  520. ClassList.prototype = {
  521. add: function(name) {
  522. var i = this._names.indexOf(name);
  523. if (i < 0) {
  524. this._names.push(name);
  525. this._node.setAttribute("class", this._names.join(" "));
  526. }
  527. },
  528. remove: function(name) {
  529. var i = this._names.indexOf(name);
  530. if (i >= 0) {
  531. this._names.splice(i, 1);
  532. this._node.setAttribute("class", this._names.join(" "));
  533. }
  534. },
  535. contains: function(name) {
  536. return this._names.indexOf(name) >= 0;
  537. }
  538. };
  539. function classedAdd(node, names) {
  540. var list = classList(node), i = -1, n = names.length;
  541. while (++i < n) list.add(names[i]);
  542. }
  543. function classedRemove(node, names) {
  544. var list = classList(node), i = -1, n = names.length;
  545. while (++i < n) list.remove(names[i]);
  546. }
  547. function classedTrue(names) {
  548. return function() {
  549. classedAdd(this, names);
  550. };
  551. }
  552. function classedFalse(names) {
  553. return function() {
  554. classedRemove(this, names);
  555. };
  556. }
  557. function classedFunction(names, value) {
  558. return function() {
  559. (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);
  560. };
  561. }
  562. function selection_classed(name, value) {
  563. var names = classArray(name + "");
  564. if (arguments.length < 2) {
  565. var list = classList(this.node()), i = -1, n = names.length;
  566. while (++i < n) if (!list.contains(names[i])) return false;
  567. return true;
  568. }
  569. return this.each((typeof value === "function"
  570. ? classedFunction : value
  571. ? classedTrue
  572. : classedFalse)(names, value));
  573. }
  574. function textRemove() {
  575. this.textContent = "";
  576. }
  577. function textConstant(value) {
  578. return function() {
  579. this.textContent = value;
  580. };
  581. }
  582. function textFunction(value) {
  583. return function() {
  584. var v = value.apply(this, arguments);
  585. this.textContent = v == null ? "" : v;
  586. };
  587. }
  588. function selection_text(value) {
  589. return arguments.length
  590. ? this.each(value == null
  591. ? textRemove : (typeof value === "function"
  592. ? textFunction
  593. : textConstant)(value))
  594. : this.node().textContent;
  595. }
  596. function htmlRemove() {
  597. this.innerHTML = "";
  598. }
  599. function htmlConstant(value) {
  600. return function() {
  601. this.innerHTML = value;
  602. };
  603. }
  604. function htmlFunction(value) {
  605. return function() {
  606. var v = value.apply(this, arguments);
  607. this.innerHTML = v == null ? "" : v;
  608. };
  609. }
  610. function selection_html(value) {
  611. return arguments.length
  612. ? this.each(value == null
  613. ? htmlRemove : (typeof value === "function"
  614. ? htmlFunction
  615. : htmlConstant)(value))
  616. : this.node().innerHTML;
  617. }
  618. function raise() {
  619. if (this.nextSibling) this.parentNode.appendChild(this);
  620. }
  621. function selection_raise() {
  622. return this.each(raise);
  623. }
  624. function lower() {
  625. if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);
  626. }
  627. function selection_lower() {
  628. return this.each(lower);
  629. }
  630. function selection_append(name) {
  631. var create = typeof name === "function" ? name : creator(name);
  632. return this.select(function() {
  633. return this.appendChild(create.apply(this, arguments));
  634. });
  635. }
  636. function constantNull() {
  637. return null;
  638. }
  639. function selection_insert(name, before) {
  640. var create = typeof name === "function" ? name : creator(name),
  641. select = before == null ? constantNull : typeof before === "function" ? before : selector(before);
  642. return this.select(function() {
  643. return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);
  644. });
  645. }
  646. function remove() {
  647. var parent = this.parentNode;
  648. if (parent) parent.removeChild(this);
  649. }
  650. function selection_remove() {
  651. return this.each(remove);
  652. }
  653. function selection_cloneShallow() {
  654. var clone = this.cloneNode(false), parent = this.parentNode;
  655. return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
  656. }
  657. function selection_cloneDeep() {
  658. var clone = this.cloneNode(true), parent = this.parentNode;
  659. return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
  660. }
  661. function selection_clone(deep) {
  662. return this.select(deep ? selection_cloneDeep : selection_cloneShallow);
  663. }
  664. function selection_datum(value) {
  665. return arguments.length
  666. ? this.property("__data__", value)
  667. : this.node().__data__;
  668. }
  669. function contextListener(listener) {
  670. return function(event) {
  671. listener.call(this, event, this.__data__);
  672. };
  673. }
  674. function parseTypenames(typenames) {
  675. return typenames.trim().split(/^|\s+/).map(function(t) {
  676. var name = "", i = t.indexOf(".");
  677. if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
  678. return {type: t, name: name};
  679. });
  680. }
  681. function onRemove(typename) {
  682. return function() {
  683. var on = this.__on;
  684. if (!on) return;
  685. for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {
  686. if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {
  687. this.removeEventListener(o.type, o.listener, o.options);
  688. } else {
  689. on[++i] = o;
  690. }
  691. }
  692. if (++i) on.length = i;
  693. else delete this.__on;
  694. };
  695. }
  696. function onAdd(typename, value, options) {
  697. return function() {
  698. var on = this.__on, o, listener = contextListener(value);
  699. if (on) for (var j = 0, m = on.length; j < m; ++j) {
  700. if ((o = on[j]).type === typename.type && o.name === typename.name) {
  701. this.removeEventListener(o.type, o.listener, o.options);
  702. this.addEventListener(o.type, o.listener = listener, o.options = options);
  703. o.value = value;
  704. return;
  705. }
  706. }
  707. this.addEventListener(typename.type, listener, options);
  708. o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};
  709. if (!on) this.__on = [o];
  710. else on.push(o);
  711. };
  712. }
  713. function selection_on(typename, value, options) {
  714. var typenames = parseTypenames(typename + ""), i, n = typenames.length, t;
  715. if (arguments.length < 2) {
  716. var on = this.node().__on;
  717. if (on) for (var j = 0, m = on.length, o; j < m; ++j) {
  718. for (i = 0, o = on[j]; i < n; ++i) {
  719. if ((t = typenames[i]).type === o.type && t.name === o.name) {
  720. return o.value;
  721. }
  722. }
  723. }
  724. return;
  725. }
  726. on = value ? onAdd : onRemove;
  727. for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));
  728. return this;
  729. }
  730. function dispatchEvent(node, type, params) {
  731. var window = defaultView(node),
  732. event = window.CustomEvent;
  733. if (typeof event === "function") {
  734. event = new event(type, params);
  735. } else {
  736. event = window.document.createEvent("Event");
  737. if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;
  738. else event.initEvent(type, false, false);
  739. }
  740. node.dispatchEvent(event);
  741. }
  742. function dispatchConstant(type, params) {
  743. return function() {
  744. return dispatchEvent(this, type, params);
  745. };
  746. }
  747. function dispatchFunction(type, params) {
  748. return function() {
  749. return dispatchEvent(this, type, params.apply(this, arguments));
  750. };
  751. }
  752. function selection_dispatch(type, params) {
  753. return this.each((typeof params === "function"
  754. ? dispatchFunction
  755. : dispatchConstant)(type, params));
  756. }
  757. function* selection_iterator() {
  758. for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
  759. for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
  760. if (node = group[i]) yield node;
  761. }
  762. }
  763. }
  764. var root = [null];
  765. function Selection(groups, parents) {
  766. this._groups = groups;
  767. this._parents = parents;
  768. }
  769. function selection() {
  770. return new Selection([[document.documentElement]], root);
  771. }
  772. Selection.prototype = selection.prototype = {
  773. constructor: Selection,
  774. select: selection_select,
  775. selectAll: selection_selectAll,
  776. filter: selection_filter,
  777. data: selection_data,
  778. enter: selection_enter,
  779. exit: selection_exit,
  780. join: selection_join,
  781. merge: selection_merge,
  782. order: selection_order,
  783. sort: selection_sort,
  784. call: selection_call,
  785. nodes: selection_nodes,
  786. node: selection_node,
  787. size: selection_size,
  788. empty: selection_empty,
  789. each: selection_each,
  790. attr: selection_attr,
  791. style: selection_style,
  792. property: selection_property,
  793. classed: selection_classed,
  794. text: selection_text,
  795. html: selection_html,
  796. raise: selection_raise,
  797. lower: selection_lower,
  798. append: selection_append,
  799. insert: selection_insert,
  800. remove: selection_remove,
  801. clone: selection_clone,
  802. datum: selection_datum,
  803. on: selection_on,
  804. dispatch: selection_dispatch,
  805. [Symbol.iterator]: selection_iterator
  806. };
  807. function select(selector) {
  808. return typeof selector === "string"
  809. ? new Selection([[document.querySelector(selector)]], [document.documentElement])
  810. : new Selection([[selector]], root);
  811. }
  812. function pointer(event, node = event.currentTarget) {
  813. if (node) {
  814. var svg = node.ownerSVGElement || node;
  815. if (svg.createSVGPoint) {
  816. var point = svg.createSVGPoint();
  817. point.x = event.clientX, point.y = event.clientY;
  818. point = point.matrixTransform(node.getScreenCTM().inverse());
  819. return [point.x, point.y];
  820. }
  821. if (node.getBoundingClientRect) {
  822. var rect = node.getBoundingClientRect();
  823. return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];
  824. }
  825. }
  826. return [event.pageX, event.pageY];
  827. }
  828. function ascending$1(a, b) {
  829. return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
  830. }
  831. function bisector(compare) {
  832. if (compare.length === 1) compare = ascendingComparator(compare);
  833. return {
  834. left: function(a, x, lo, hi) {
  835. if (lo == null) lo = 0;
  836. if (hi == null) hi = a.length;
  837. while (lo < hi) {
  838. var mid = lo + hi >>> 1;
  839. if (compare(a[mid], x) < 0) lo = mid + 1;
  840. else hi = mid;
  841. }
  842. return lo;
  843. },
  844. right: function(a, x, lo, hi) {
  845. if (lo == null) lo = 0;
  846. if (hi == null) hi = a.length;
  847. while (lo < hi) {
  848. var mid = lo + hi >>> 1;
  849. if (compare(a[mid], x) > 0) hi = mid;
  850. else lo = mid + 1;
  851. }
  852. return lo;
  853. }
  854. };
  855. }
  856. function ascendingComparator(f) {
  857. return function(d, x) {
  858. return ascending$1(f(d), x);
  859. };
  860. }
  861. var ascendingBisect = bisector(ascending$1);
  862. var bisectRight = ascendingBisect.right;
  863. function identity(x) {
  864. return x;
  865. }
  866. function group(values, ...keys) {
  867. return nest(values, identity, identity, keys);
  868. }
  869. function nest(values, map, reduce, keys) {
  870. return (function regroup(values, i) {
  871. if (i >= keys.length) return reduce(values);
  872. const groups = new Map();
  873. const keyof = keys[i++];
  874. let index = -1;
  875. for (const value of values) {
  876. const key = keyof(value, ++index, values);
  877. const group = groups.get(key);
  878. if (group) group.push(value);
  879. else groups.set(key, [value]);
  880. }
  881. for (const [key, values] of groups) {
  882. groups.set(key, regroup(values, i));
  883. }
  884. return map(groups);
  885. })(values, 0);
  886. }
  887. var e10 = Math.sqrt(50),
  888. e5 = Math.sqrt(10),
  889. e2 = Math.sqrt(2);
  890. function ticks(start, stop, count) {
  891. var reverse,
  892. i = -1,
  893. n,
  894. ticks,
  895. step;
  896. stop = +stop, start = +start, count = +count;
  897. if (start === stop && count > 0) return [start];
  898. if (reverse = stop < start) n = start, start = stop, stop = n;
  899. if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];
  900. if (step > 0) {
  901. start = Math.ceil(start / step);
  902. stop = Math.floor(stop / step);
  903. ticks = new Array(n = Math.ceil(stop - start + 1));
  904. while (++i < n) ticks[i] = (start + i) * step;
  905. } else {
  906. start = Math.floor(start * step);
  907. stop = Math.ceil(stop * step);
  908. ticks = new Array(n = Math.ceil(start - stop + 1));
  909. while (++i < n) ticks[i] = (start - i) / step;
  910. }
  911. if (reverse) ticks.reverse();
  912. return ticks;
  913. }
  914. function tickIncrement(start, stop, count) {
  915. var step = (stop - start) / Math.max(0, count),
  916. power = Math.floor(Math.log(step) / Math.LN10),
  917. error = step / Math.pow(10, power);
  918. return power >= 0
  919. ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)
  920. : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);
  921. }
  922. function tickStep(start, stop, count) {
  923. var step0 = Math.abs(stop - start) / Math.max(0, count),
  924. step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),
  925. error = step0 / step1;
  926. if (error >= e10) step1 *= 10;
  927. else if (error >= e5) step1 *= 5;
  928. else if (error >= e2) step1 *= 2;
  929. return stop < start ? -step1 : step1;
  930. }
  931. function count(node) {
  932. var sum = 0,
  933. children = node.children,
  934. i = children && children.length;
  935. if (!i) sum = 1;
  936. else while (--i >= 0) sum += children[i].value;
  937. node.value = sum;
  938. }
  939. function node_count() {
  940. return this.eachAfter(count);
  941. }
  942. function node_each(callback) {
  943. var node = this, current, next = [node], children, i, n;
  944. do {
  945. current = next.reverse(), next = [];
  946. while (node = current.pop()) {
  947. callback(node), children = node.children;
  948. if (children) for (i = 0, n = children.length; i < n; ++i) {
  949. next.push(children[i]);
  950. }
  951. }
  952. } while (next.length);
  953. return this;
  954. }
  955. function node_eachBefore(callback) {
  956. var node = this, nodes = [node], children, i;
  957. while (node = nodes.pop()) {
  958. callback(node), children = node.children;
  959. if (children) for (i = children.length - 1; i >= 0; --i) {
  960. nodes.push(children[i]);
  961. }
  962. }
  963. return this;
  964. }
  965. function node_eachAfter(callback) {
  966. var node = this, nodes = [node], next = [], children, i, n;
  967. while (node = nodes.pop()) {
  968. next.push(node), children = node.children;
  969. if (children) for (i = 0, n = children.length; i < n; ++i) {
  970. nodes.push(children[i]);
  971. }
  972. }
  973. while (node = next.pop()) {
  974. callback(node);
  975. }
  976. return this;
  977. }
  978. function node_sum(value) {
  979. return this.eachAfter(function(node) {
  980. var sum = +value(node.data) || 0,
  981. children = node.children,
  982. i = children && children.length;
  983. while (--i >= 0) sum += children[i].value;
  984. node.value = sum;
  985. });
  986. }
  987. function node_sort(compare) {
  988. return this.eachBefore(function(node) {
  989. if (node.children) {
  990. node.children.sort(compare);
  991. }
  992. });
  993. }
  994. function node_path(end) {
  995. var start = this,
  996. ancestor = leastCommonAncestor(start, end),
  997. nodes = [start];
  998. while (start !== ancestor) {
  999. start = start.parent;
  1000. nodes.push(start);
  1001. }
  1002. var k = nodes.length;
  1003. while (end !== ancestor) {
  1004. nodes.splice(k, 0, end);
  1005. end = end.parent;
  1006. }
  1007. return nodes;
  1008. }
  1009. function leastCommonAncestor(a, b) {
  1010. if (a === b) return a;
  1011. var aNodes = a.ancestors(),
  1012. bNodes = b.ancestors(),
  1013. c = null;
  1014. a = aNodes.pop();
  1015. b = bNodes.pop();
  1016. while (a === b) {
  1017. c = a;
  1018. a = aNodes.pop();
  1019. b = bNodes.pop();
  1020. }
  1021. return c;
  1022. }
  1023. function node_ancestors() {
  1024. var node = this, nodes = [node];
  1025. while (node = node.parent) {
  1026. nodes.push(node);
  1027. }
  1028. return nodes;
  1029. }
  1030. function node_descendants() {
  1031. var nodes = [];
  1032. this.each(function(node) {
  1033. nodes.push(node);
  1034. });
  1035. return nodes;
  1036. }
  1037. function node_leaves() {
  1038. var leaves = [];
  1039. this.eachBefore(function(node) {
  1040. if (!node.children) {
  1041. leaves.push(node);
  1042. }
  1043. });
  1044. return leaves;
  1045. }
  1046. function node_links() {
  1047. var root = this, links = [];
  1048. root.each(function(node) {
  1049. if (node !== root) { // Don’t include the root’s parent, if any.
  1050. links.push({source: node.parent, target: node});
  1051. }
  1052. });
  1053. return links;
  1054. }
  1055. function hierarchy(data, children) {
  1056. var root = new Node(data),
  1057. valued = +data.value && (root.value = data.value),
  1058. node,
  1059. nodes = [root],
  1060. child,
  1061. childs,
  1062. i,
  1063. n;
  1064. if (children == null) children = defaultChildren;
  1065. while (node = nodes.pop()) {
  1066. if (valued) node.value = +node.data.value;
  1067. if ((childs = children(node.data)) && (n = childs.length)) {
  1068. node.children = new Array(n);
  1069. for (i = n - 1; i >= 0; --i) {
  1070. nodes.push(child = node.children[i] = new Node(childs[i]));
  1071. child.parent = node;
  1072. child.depth = node.depth + 1;
  1073. }
  1074. }
  1075. }
  1076. return root.eachBefore(computeHeight);
  1077. }
  1078. function node_copy() {
  1079. return hierarchy(this).eachBefore(copyData);
  1080. }
  1081. function defaultChildren(d) {
  1082. return d.children;
  1083. }
  1084. function copyData(node) {
  1085. node.data = node.data.data;
  1086. }
  1087. function computeHeight(node) {
  1088. var height = 0;
  1089. do node.height = height;
  1090. while ((node = node.parent) && (node.height < ++height));
  1091. }
  1092. function Node(data) {
  1093. this.data = data;
  1094. this.depth =
  1095. this.height = 0;
  1096. this.parent = null;
  1097. }
  1098. Node.prototype = hierarchy.prototype = {
  1099. constructor: Node,
  1100. count: node_count,
  1101. each: node_each,
  1102. eachAfter: node_eachAfter,
  1103. eachBefore: node_eachBefore,
  1104. sum: node_sum,
  1105. sort: node_sort,
  1106. path: node_path,
  1107. ancestors: node_ancestors,
  1108. descendants: node_descendants,
  1109. leaves: node_leaves,
  1110. links: node_links,
  1111. copy: node_copy
  1112. };
  1113. function required(f) {
  1114. if (typeof f !== "function") throw new Error;
  1115. return f;
  1116. }
  1117. function constantZero() {
  1118. return 0;
  1119. }
  1120. function constant$1(x) {
  1121. return function() {
  1122. return x;
  1123. };
  1124. }
  1125. function roundNode(node) {
  1126. node.x0 = Math.round(node.x0);
  1127. node.y0 = Math.round(node.y0);
  1128. node.x1 = Math.round(node.x1);
  1129. node.y1 = Math.round(node.y1);
  1130. }
  1131. function treemapDice(parent, x0, y0, x1, y1) {
  1132. var nodes = parent.children,
  1133. node,
  1134. i = -1,
  1135. n = nodes.length,
  1136. k = parent.value && (x1 - x0) / parent.value;
  1137. while (++i < n) {
  1138. node = nodes[i], node.y0 = y0, node.y1 = y1;
  1139. node.x0 = x0, node.x1 = x0 += node.value * k;
  1140. }
  1141. }
  1142. function treemapSlice(parent, x0, y0, x1, y1) {
  1143. var nodes = parent.children,
  1144. node,
  1145. i = -1,
  1146. n = nodes.length,
  1147. k = parent.value && (y1 - y0) / parent.value;
  1148. while (++i < n) {
  1149. node = nodes[i], node.x0 = x0, node.x1 = x1;
  1150. node.y0 = y0, node.y1 = y0 += node.value * k;
  1151. }
  1152. }
  1153. var phi = (1 + Math.sqrt(5)) / 2;
  1154. function squarifyRatio(ratio, parent, x0, y0, x1, y1) {
  1155. var rows = [],
  1156. nodes = parent.children,
  1157. row,
  1158. nodeValue,
  1159. i0 = 0,
  1160. i1 = 0,
  1161. n = nodes.length,
  1162. dx, dy,
  1163. value = parent.value,
  1164. sumValue,
  1165. minValue,
  1166. maxValue,
  1167. newRatio,
  1168. minRatio,
  1169. alpha,
  1170. beta;
  1171. while (i0 < n) {
  1172. dx = x1 - x0, dy = y1 - y0;
  1173. // Find the next non-empty node.
  1174. do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);
  1175. minValue = maxValue = sumValue;
  1176. alpha = Math.max(dy / dx, dx / dy) / (value * ratio);
  1177. beta = sumValue * sumValue * alpha;
  1178. minRatio = Math.max(maxValue / beta, beta / minValue);
  1179. // Keep adding nodes while the aspect ratio maintains or improves.
  1180. for (; i1 < n; ++i1) {
  1181. sumValue += nodeValue = nodes[i1].value;
  1182. if (nodeValue < minValue) minValue = nodeValue;
  1183. if (nodeValue > maxValue) maxValue = nodeValue;
  1184. beta = sumValue * sumValue * alpha;
  1185. newRatio = Math.max(maxValue / beta, beta / minValue);
  1186. if (newRatio > minRatio) { sumValue -= nodeValue; break; }
  1187. minRatio = newRatio;
  1188. }
  1189. // Position and record the row orientation.
  1190. rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});
  1191. if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);
  1192. else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);
  1193. value -= sumValue, i0 = i1;
  1194. }
  1195. return rows;
  1196. }
  1197. var squarify = (function custom(ratio) {
  1198. function squarify(parent, x0, y0, x1, y1) {
  1199. squarifyRatio(ratio, parent, x0, y0, x1, y1);
  1200. }
  1201. squarify.ratio = function(x) {
  1202. return custom((x = +x) > 1 ? x : 1);
  1203. };
  1204. return squarify;
  1205. })(phi);
  1206. function d3treemap() {
  1207. var tile = squarify,
  1208. round = false,
  1209. dx = 1,
  1210. dy = 1,
  1211. paddingStack = [0],
  1212. paddingInner = constantZero,
  1213. paddingTop = constantZero,
  1214. paddingRight = constantZero,
  1215. paddingBottom = constantZero,
  1216. paddingLeft = constantZero;
  1217. function treemap(root) {
  1218. root.x0 =
  1219. root.y0 = 0;
  1220. root.x1 = dx;
  1221. root.y1 = dy;
  1222. root.eachBefore(positionNode);
  1223. paddingStack = [0];
  1224. if (round) root.eachBefore(roundNode);
  1225. return root;
  1226. }
  1227. function positionNode(node) {
  1228. var p = paddingStack[node.depth],
  1229. x0 = node.x0 + p,
  1230. y0 = node.y0 + p,
  1231. x1 = node.x1 - p,
  1232. y1 = node.y1 - p;
  1233. if (x1 < x0) x0 = x1 = (x0 + x1) / 2;
  1234. if (y1 < y0) y0 = y1 = (y0 + y1) / 2;
  1235. node.x0 = x0;
  1236. node.y0 = y0;
  1237. node.x1 = x1;
  1238. node.y1 = y1;
  1239. if (node.children) {
  1240. p = paddingStack[node.depth + 1] = paddingInner(node) / 2;
  1241. x0 += paddingLeft(node) - p;
  1242. y0 += paddingTop(node) - p;
  1243. x1 -= paddingRight(node) - p;
  1244. y1 -= paddingBottom(node) - p;
  1245. if (x1 < x0) x0 = x1 = (x0 + x1) / 2;
  1246. if (y1 < y0) y0 = y1 = (y0 + y1) / 2;
  1247. tile(node, x0, y0, x1, y1);
  1248. }
  1249. }
  1250. treemap.round = function(x) {
  1251. return arguments.length ? (round = !!x, treemap) : round;
  1252. };
  1253. treemap.size = function(x) {
  1254. return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];
  1255. };
  1256. treemap.tile = function(x) {
  1257. return arguments.length ? (tile = required(x), treemap) : tile;
  1258. };
  1259. treemap.padding = function(x) {
  1260. return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();
  1261. };
  1262. treemap.paddingInner = function(x) {
  1263. return arguments.length ? (paddingInner = typeof x === "function" ? x : constant$1(+x), treemap) : paddingInner;
  1264. };
  1265. treemap.paddingOuter = function(x) {
  1266. return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();
  1267. };
  1268. treemap.paddingTop = function(x) {
  1269. return arguments.length ? (paddingTop = typeof x === "function" ? x : constant$1(+x), treemap) : paddingTop;
  1270. };
  1271. treemap.paddingRight = function(x) {
  1272. return arguments.length ? (paddingRight = typeof x === "function" ? x : constant$1(+x), treemap) : paddingRight;
  1273. };
  1274. treemap.paddingBottom = function(x) {
  1275. return arguments.length ? (paddingBottom = typeof x === "function" ? x : constant$1(+x), treemap) : paddingBottom;
  1276. };
  1277. treemap.paddingLeft = function(x) {
  1278. return arguments.length ? (paddingLeft = typeof x === "function" ? x : constant$1(+x), treemap) : paddingLeft;
  1279. };
  1280. return treemap;
  1281. }
  1282. var treemapResquarify = (function custom(ratio) {
  1283. function resquarify(parent, x0, y0, x1, y1) {
  1284. if ((rows = parent._squarify) && (rows.ratio === ratio)) {
  1285. var rows,
  1286. row,
  1287. nodes,
  1288. i,
  1289. j = -1,
  1290. n,
  1291. m = rows.length,
  1292. value = parent.value;
  1293. while (++j < m) {
  1294. row = rows[j], nodes = row.children;
  1295. for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value;
  1296. if (row.dice) treemapDice(row, x0, y0, x1, y0 += (y1 - y0) * row.value / value);
  1297. else treemapSlice(row, x0, y0, x0 += (x1 - x0) * row.value / value, y1);
  1298. value -= row.value;
  1299. }
  1300. } else {
  1301. parent._squarify = rows = squarifyRatio(ratio, parent, x0, y0, x1, y1);
  1302. rows.ratio = ratio;
  1303. }
  1304. }
  1305. resquarify.ratio = function(x) {
  1306. return custom((x = +x) > 1 ? x : 1);
  1307. };
  1308. return resquarify;
  1309. })(phi);
  1310. /*!
  1311. * bytes
  1312. * Copyright(c) 2012-2014 TJ Holowaychuk
  1313. * Copyright(c) 2015 Jed Watson
  1314. * MIT Licensed
  1315. */
  1316. var format_1 = format;
  1317. /**
  1318. * Module variables.
  1319. * @private
  1320. */
  1321. var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;
  1322. var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
  1323. var map = {
  1324. b: 1,
  1325. kb: 1 << 10,
  1326. mb: 1 << 20,
  1327. gb: 1 << 30,
  1328. tb: Math.pow(1024, 4),
  1329. pb: Math.pow(1024, 5),
  1330. };
  1331. /**
  1332. * Format the given value in bytes into a string.
  1333. *
  1334. * If the value is negative, it is kept as such. If it is a float,
  1335. * it is rounded.
  1336. *
  1337. * @param {number} value
  1338. * @param {object} [options]
  1339. * @param {number} [options.decimalPlaces=2]
  1340. * @param {number} [options.fixedDecimals=false]
  1341. * @param {string} [options.thousandsSeparator=]
  1342. * @param {string} [options.unit=]
  1343. * @param {string} [options.unitSeparator=]
  1344. *
  1345. * @returns {string|null}
  1346. * @public
  1347. */
  1348. function format(value, options) {
  1349. if (!Number.isFinite(value)) {
  1350. return null;
  1351. }
  1352. var mag = Math.abs(value);
  1353. var thousandsSeparator = (options && options.thousandsSeparator) || '';
  1354. var unitSeparator = (options && options.unitSeparator) || '';
  1355. var decimalPlaces = (options && options.decimalPlaces !== undefined) ? options.decimalPlaces : 2;
  1356. var fixedDecimals = Boolean(options && options.fixedDecimals);
  1357. var unit = (options && options.unit) || '';
  1358. if (!unit || !map[unit.toLowerCase()]) {
  1359. if (mag >= map.pb) {
  1360. unit = 'PB';
  1361. } else if (mag >= map.tb) {
  1362. unit = 'TB';
  1363. } else if (mag >= map.gb) {
  1364. unit = 'GB';
  1365. } else if (mag >= map.mb) {
  1366. unit = 'MB';
  1367. } else if (mag >= map.kb) {
  1368. unit = 'KB';
  1369. } else {
  1370. unit = 'B';
  1371. }
  1372. }
  1373. var val = value / map[unit.toLowerCase()];
  1374. var str = val.toFixed(decimalPlaces);
  1375. if (!fixedDecimals) {
  1376. str = str.replace(formatDecimalsRegExp, '$1');
  1377. }
  1378. if (thousandsSeparator) {
  1379. str = str.replace(formatThousandsRegExp, thousandsSeparator);
  1380. }
  1381. return str + unitSeparator + unit;
  1382. }
  1383. let count$1 = 0;
  1384. class Id {
  1385. constructor(id) {
  1386. this._id = id;
  1387. this._href = createUrl({ hash: id }).href;
  1388. }
  1389. get id() {
  1390. return this._id;
  1391. }
  1392. get href() {
  1393. return this._href;
  1394. }
  1395. toString() {
  1396. return `url(${this.href})`;
  1397. }
  1398. }
  1399. function uid(name) {
  1400. count$1 += 1;
  1401. const id = ["O", name, count$1].filter(Boolean).join("-");
  1402. return new Id(id);
  1403. }
  1404. function createUrl(options = {}) {
  1405. const url = new URL(window.location);
  1406. return Object.assign(url, options);
  1407. }
  1408. function initRange(domain, range) {
  1409. switch (arguments.length) {
  1410. case 0: break;
  1411. case 1: this.range(domain); break;
  1412. default: this.range(range).domain(domain); break;
  1413. }
  1414. return this;
  1415. }
  1416. function initInterpolator(domain, interpolator) {
  1417. switch (arguments.length) {
  1418. case 0: break;
  1419. case 1: {
  1420. if (typeof domain === "function") this.interpolator(domain);
  1421. else this.range(domain);
  1422. break;
  1423. }
  1424. default: {
  1425. this.domain(domain);
  1426. if (typeof interpolator === "function") this.interpolator(interpolator);
  1427. else this.range(interpolator);
  1428. break;
  1429. }
  1430. }
  1431. return this;
  1432. }
  1433. function define(constructor, factory, prototype) {
  1434. constructor.prototype = factory.prototype = prototype;
  1435. prototype.constructor = constructor;
  1436. }
  1437. function extend(parent, definition) {
  1438. var prototype = Object.create(parent.prototype);
  1439. for (var key in definition) prototype[key] = definition[key];
  1440. return prototype;
  1441. }
  1442. function Color() {}
  1443. var darker = 0.7;
  1444. var brighter = 1 / darker;
  1445. var reI = "\\s*([+-]?\\d+)\\s*",
  1446. reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
  1447. reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
  1448. reHex = /^#([0-9a-f]{3,8})$/,
  1449. reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
  1450. reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
  1451. reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
  1452. reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
  1453. reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
  1454. reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
  1455. var named = {
  1456. aliceblue: 0xf0f8ff,
  1457. antiquewhite: 0xfaebd7,
  1458. aqua: 0x00ffff,
  1459. aquamarine: 0x7fffd4,
  1460. azure: 0xf0ffff,
  1461. beige: 0xf5f5dc,
  1462. bisque: 0xffe4c4,
  1463. black: 0x000000,
  1464. blanchedalmond: 0xffebcd,
  1465. blue: 0x0000ff,
  1466. blueviolet: 0x8a2be2,
  1467. brown: 0xa52a2a,
  1468. burlywood: 0xdeb887,
  1469. cadetblue: 0x5f9ea0,
  1470. chartreuse: 0x7fff00,
  1471. chocolate: 0xd2691e,
  1472. coral: 0xff7f50,
  1473. cornflowerblue: 0x6495ed,
  1474. cornsilk: 0xfff8dc,
  1475. crimson: 0xdc143c,
  1476. cyan: 0x00ffff,
  1477. darkblue: 0x00008b,
  1478. darkcyan: 0x008b8b,
  1479. darkgoldenrod: 0xb8860b,
  1480. darkgray: 0xa9a9a9,
  1481. darkgreen: 0x006400,
  1482. darkgrey: 0xa9a9a9,
  1483. darkkhaki: 0xbdb76b,
  1484. darkmagenta: 0x8b008b,
  1485. darkolivegreen: 0x556b2f,
  1486. darkorange: 0xff8c00,
  1487. darkorchid: 0x9932cc,
  1488. darkred: 0x8b0000,
  1489. darksalmon: 0xe9967a,
  1490. darkseagreen: 0x8fbc8f,
  1491. darkslateblue: 0x483d8b,
  1492. darkslategray: 0x2f4f4f,
  1493. darkslategrey: 0x2f4f4f,
  1494. darkturquoise: 0x00ced1,
  1495. darkviolet: 0x9400d3,
  1496. deeppink: 0xff1493,
  1497. deepskyblue: 0x00bfff,
  1498. dimgray: 0x696969,
  1499. dimgrey: 0x696969,
  1500. dodgerblue: 0x1e90ff,
  1501. firebrick: 0xb22222,
  1502. floralwhite: 0xfffaf0,
  1503. forestgreen: 0x228b22,
  1504. fuchsia: 0xff00ff,
  1505. gainsboro: 0xdcdcdc,
  1506. ghostwhite: 0xf8f8ff,
  1507. gold: 0xffd700,
  1508. goldenrod: 0xdaa520,
  1509. gray: 0x808080,
  1510. green: 0x008000,
  1511. greenyellow: 0xadff2f,
  1512. grey: 0x808080,
  1513. honeydew: 0xf0fff0,
  1514. hotpink: 0xff69b4,
  1515. indianred: 0xcd5c5c,
  1516. indigo: 0x4b0082,
  1517. ivory: 0xfffff0,
  1518. khaki: 0xf0e68c,
  1519. lavender: 0xe6e6fa,
  1520. lavenderblush: 0xfff0f5,
  1521. lawngreen: 0x7cfc00,
  1522. lemonchiffon: 0xfffacd,
  1523. lightblue: 0xadd8e6,
  1524. lightcoral: 0xf08080,
  1525. lightcyan: 0xe0ffff,
  1526. lightgoldenrodyellow: 0xfafad2,
  1527. lightgray: 0xd3d3d3,
  1528. lightgreen: 0x90ee90,
  1529. lightgrey: 0xd3d3d3,
  1530. lightpink: 0xffb6c1,
  1531. lightsalmon: 0xffa07a,
  1532. lightseagreen: 0x20b2aa,
  1533. lightskyblue: 0x87cefa,
  1534. lightslategray: 0x778899,
  1535. lightslategrey: 0x778899,
  1536. lightsteelblue: 0xb0c4de,
  1537. lightyellow: 0xffffe0,
  1538. lime: 0x00ff00,
  1539. limegreen: 0x32cd32,
  1540. linen: 0xfaf0e6,
  1541. magenta: 0xff00ff,
  1542. maroon: 0x800000,
  1543. mediumaquamarine: 0x66cdaa,
  1544. mediumblue: 0x0000cd,
  1545. mediumorchid: 0xba55d3,
  1546. mediumpurple: 0x9370db,
  1547. mediumseagreen: 0x3cb371,
  1548. mediumslateblue: 0x7b68ee,
  1549. mediumspringgreen: 0x00fa9a,
  1550. mediumturquoise: 0x48d1cc,
  1551. mediumvioletred: 0xc71585,
  1552. midnightblue: 0x191970,
  1553. mintcream: 0xf5fffa,
  1554. mistyrose: 0xffe4e1,
  1555. moccasin: 0xffe4b5,
  1556. navajowhite: 0xffdead,
  1557. navy: 0x000080,
  1558. oldlace: 0xfdf5e6,
  1559. olive: 0x808000,
  1560. olivedrab: 0x6b8e23,
  1561. orange: 0xffa500,
  1562. orangered: 0xff4500,
  1563. orchid: 0xda70d6,
  1564. palegoldenrod: 0xeee8aa,
  1565. palegreen: 0x98fb98,
  1566. paleturquoise: 0xafeeee,
  1567. palevioletred: 0xdb7093,
  1568. papayawhip: 0xffefd5,
  1569. peachpuff: 0xffdab9,
  1570. peru: 0xcd853f,
  1571. pink: 0xffc0cb,
  1572. plum: 0xdda0dd,
  1573. powderblue: 0xb0e0e6,
  1574. purple: 0x800080,
  1575. rebeccapurple: 0x663399,
  1576. red: 0xff0000,
  1577. rosybrown: 0xbc8f8f,
  1578. royalblue: 0x4169e1,
  1579. saddlebrown: 0x8b4513,
  1580. salmon: 0xfa8072,
  1581. sandybrown: 0xf4a460,
  1582. seagreen: 0x2e8b57,
  1583. seashell: 0xfff5ee,
  1584. sienna: 0xa0522d,
  1585. silver: 0xc0c0c0,
  1586. skyblue: 0x87ceeb,
  1587. slateblue: 0x6a5acd,
  1588. slategray: 0x708090,
  1589. slategrey: 0x708090,
  1590. snow: 0xfffafa,
  1591. springgreen: 0x00ff7f,
  1592. steelblue: 0x4682b4,
  1593. tan: 0xd2b48c,
  1594. teal: 0x008080,
  1595. thistle: 0xd8bfd8,
  1596. tomato: 0xff6347,
  1597. turquoise: 0x40e0d0,
  1598. violet: 0xee82ee,
  1599. wheat: 0xf5deb3,
  1600. white: 0xffffff,
  1601. whitesmoke: 0xf5f5f5,
  1602. yellow: 0xffff00,
  1603. yellowgreen: 0x9acd32
  1604. };
  1605. define(Color, color, {
  1606. copy: function(channels) {
  1607. return Object.assign(new this.constructor, this, channels);
  1608. },
  1609. displayable: function() {
  1610. return this.rgb().displayable();
  1611. },
  1612. hex: color_formatHex, // Deprecated! Use color.formatHex.
  1613. formatHex: color_formatHex,
  1614. formatHsl: color_formatHsl,
  1615. formatRgb: color_formatRgb,
  1616. toString: color_formatRgb
  1617. });
  1618. function color_formatHex() {
  1619. return this.rgb().formatHex();
  1620. }
  1621. function color_formatHsl() {
  1622. return hslConvert(this).formatHsl();
  1623. }
  1624. function color_formatRgb() {
  1625. return this.rgb().formatRgb();
  1626. }
  1627. function color(format) {
  1628. var m, l;
  1629. format = (format + "").trim().toLowerCase();
  1630. return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000
  1631. : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00
  1632. : l === 8 ? new Rgb(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000
  1633. : l === 4 ? new Rgb((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000
  1634. : null) // invalid hex
  1635. : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
  1636. : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
  1637. : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
  1638. : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
  1639. : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
  1640. : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
  1641. : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins
  1642. : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0)
  1643. : null;
  1644. }
  1645. function rgbn(n) {
  1646. return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
  1647. }
  1648. function rgba(r, g, b, a) {
  1649. if (a <= 0) r = g = b = NaN;
  1650. return new Rgb(r, g, b, a);
  1651. }
  1652. function rgbConvert(o) {
  1653. if (!(o instanceof Color)) o = color(o);
  1654. if (!o) return new Rgb;
  1655. o = o.rgb();
  1656. return new Rgb(o.r, o.g, o.b, o.opacity);
  1657. }
  1658. function rgb(r, g, b, opacity) {
  1659. return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
  1660. }
  1661. function Rgb(r, g, b, opacity) {
  1662. this.r = +r;
  1663. this.g = +g;
  1664. this.b = +b;
  1665. this.opacity = +opacity;
  1666. }
  1667. define(Rgb, rgb, extend(Color, {
  1668. brighter: function(k) {
  1669. k = k == null ? brighter : Math.pow(brighter, k);
  1670. return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
  1671. },
  1672. darker: function(k) {
  1673. k = k == null ? darker : Math.pow(darker, k);
  1674. return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
  1675. },
  1676. rgb: function() {
  1677. return this;
  1678. },
  1679. displayable: function() {
  1680. return (-0.5 <= this.r && this.r < 255.5)
  1681. && (-0.5 <= this.g && this.g < 255.5)
  1682. && (-0.5 <= this.b && this.b < 255.5)
  1683. && (0 <= this.opacity && this.opacity <= 1);
  1684. },
  1685. hex: rgb_formatHex, // Deprecated! Use color.formatHex.
  1686. formatHex: rgb_formatHex,
  1687. formatRgb: rgb_formatRgb,
  1688. toString: rgb_formatRgb
  1689. }));
  1690. function rgb_formatHex() {
  1691. return "#" + hex(this.r) + hex(this.g) + hex(this.b);
  1692. }
  1693. function rgb_formatRgb() {
  1694. var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
  1695. return (a === 1 ? "rgb(" : "rgba(")
  1696. + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
  1697. + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
  1698. + Math.max(0, Math.min(255, Math.round(this.b) || 0))
  1699. + (a === 1 ? ")" : ", " + a + ")");
  1700. }
  1701. function hex(value) {
  1702. value = Math.max(0, Math.min(255, Math.round(value) || 0));
  1703. return (value < 16 ? "0" : "") + value.toString(16);
  1704. }
  1705. function hsla(h, s, l, a) {
  1706. if (a <= 0) h = s = l = NaN;
  1707. else if (l <= 0 || l >= 1) h = s = NaN;
  1708. else if (s <= 0) h = NaN;
  1709. return new Hsl(h, s, l, a);
  1710. }
  1711. function hslConvert(o) {
  1712. if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
  1713. if (!(o instanceof Color)) o = color(o);
  1714. if (!o) return new Hsl;
  1715. if (o instanceof Hsl) return o;
  1716. o = o.rgb();
  1717. var r = o.r / 255,
  1718. g = o.g / 255,
  1719. b = o.b / 255,
  1720. min = Math.min(r, g, b),
  1721. max = Math.max(r, g, b),
  1722. h = NaN,
  1723. s = max - min,
  1724. l = (max + min) / 2;
  1725. if (s) {
  1726. if (r === max) h = (g - b) / s + (g < b) * 6;
  1727. else if (g === max) h = (b - r) / s + 2;
  1728. else h = (r - g) / s + 4;
  1729. s /= l < 0.5 ? max + min : 2 - max - min;
  1730. h *= 60;
  1731. } else {
  1732. s = l > 0 && l < 1 ? 0 : h;
  1733. }
  1734. return new Hsl(h, s, l, o.opacity);
  1735. }
  1736. function hsl(h, s, l, opacity) {
  1737. return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
  1738. }
  1739. function Hsl(h, s, l, opacity) {
  1740. this.h = +h;
  1741. this.s = +s;
  1742. this.l = +l;
  1743. this.opacity = +opacity;
  1744. }
  1745. define(Hsl, hsl, extend(Color, {
  1746. brighter: function(k) {
  1747. k = k == null ? brighter : Math.pow(brighter, k);
  1748. return new Hsl(this.h, this.s, this.l * k, this.opacity);
  1749. },
  1750. darker: function(k) {
  1751. k = k == null ? darker : Math.pow(darker, k);
  1752. return new Hsl(this.h, this.s, this.l * k, this.opacity);
  1753. },
  1754. rgb: function() {
  1755. var h = this.h % 360 + (this.h < 0) * 360,
  1756. s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
  1757. l = this.l,
  1758. m2 = l + (l < 0.5 ? l : 1 - l) * s,
  1759. m1 = 2 * l - m2;
  1760. return new Rgb(
  1761. hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
  1762. hsl2rgb(h, m1, m2),
  1763. hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
  1764. this.opacity
  1765. );
  1766. },
  1767. displayable: function() {
  1768. return (0 <= this.s && this.s <= 1 || isNaN(this.s))
  1769. && (0 <= this.l && this.l <= 1)
  1770. && (0 <= this.opacity && this.opacity <= 1);
  1771. },
  1772. formatHsl: function() {
  1773. var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
  1774. return (a === 1 ? "hsl(" : "hsla(")
  1775. + (this.h || 0) + ", "
  1776. + (this.s || 0) * 100 + "%, "
  1777. + (this.l || 0) * 100 + "%"
  1778. + (a === 1 ? ")" : ", " + a + ")");
  1779. }
  1780. }));
  1781. /* From FvD 13.37, CSS Color Module Level 3 */
  1782. function hsl2rgb(h, m1, m2) {
  1783. return (h < 60 ? m1 + (m2 - m1) * h / 60
  1784. : h < 180 ? m2
  1785. : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
  1786. : m1) * 255;
  1787. }
  1788. function basis(t1, v0, v1, v2, v3) {
  1789. var t2 = t1 * t1, t3 = t2 * t1;
  1790. return ((1 - 3 * t1 + 3 * t2 - t3) * v0
  1791. + (4 - 6 * t2 + 3 * t3) * v1
  1792. + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2
  1793. + t3 * v3) / 6;
  1794. }
  1795. function basis$1(values) {
  1796. var n = values.length - 1;
  1797. return function(t) {
  1798. var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),
  1799. v1 = values[i],
  1800. v2 = values[i + 1],
  1801. v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,
  1802. v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;
  1803. return basis((t - i / n) * n, v0, v1, v2, v3);
  1804. };
  1805. }
  1806. function constant$2(x) {
  1807. return function() {
  1808. return x;
  1809. };
  1810. }
  1811. function linear(a, d) {
  1812. return function(t) {
  1813. return a + t * d;
  1814. };
  1815. }
  1816. function exponential(a, b, y) {
  1817. return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {
  1818. return Math.pow(a + t * b, y);
  1819. };
  1820. }
  1821. function gamma(y) {
  1822. return (y = +y) === 1 ? nogamma : function(a, b) {
  1823. return b - a ? exponential(a, b, y) : constant$2(isNaN(a) ? b : a);
  1824. };
  1825. }
  1826. function nogamma(a, b) {
  1827. var d = b - a;
  1828. return d ? linear(a, d) : constant$2(isNaN(a) ? b : a);
  1829. }
  1830. var rgb$1 = (function rgbGamma(y) {
  1831. var color = gamma(y);
  1832. function rgb$1(start, end) {
  1833. var r = color((start = rgb(start)).r, (end = rgb(end)).r),
  1834. g = color(start.g, end.g),
  1835. b = color(start.b, end.b),
  1836. opacity = nogamma(start.opacity, end.opacity);
  1837. return function(t) {
  1838. start.r = r(t);
  1839. start.g = g(t);
  1840. start.b = b(t);
  1841. start.opacity = opacity(t);
  1842. return start + "";
  1843. };
  1844. }
  1845. rgb$1.gamma = rgbGamma;
  1846. return rgb$1;
  1847. })(1);
  1848. function rgbSpline(spline) {
  1849. return function(colors) {
  1850. var n = colors.length,
  1851. r = new Array(n),
  1852. g = new Array(n),
  1853. b = new Array(n),
  1854. i, color;
  1855. for (i = 0; i < n; ++i) {
  1856. color = rgb(colors[i]);
  1857. r[i] = color.r || 0;
  1858. g[i] = color.g || 0;
  1859. b[i] = color.b || 0;
  1860. }
  1861. r = spline(r);
  1862. g = spline(g);
  1863. b = spline(b);
  1864. color.opacity = 1;
  1865. return function(t) {
  1866. color.r = r(t);
  1867. color.g = g(t);
  1868. color.b = b(t);
  1869. return color + "";
  1870. };
  1871. };
  1872. }
  1873. var rgbBasis = rgbSpline(basis$1);
  1874. function numberArray(a, b) {
  1875. if (!b) b = [];
  1876. var n = a ? Math.min(b.length, a.length) : 0,
  1877. c = b.slice(),
  1878. i;
  1879. return function(t) {
  1880. for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;
  1881. return c;
  1882. };
  1883. }
  1884. function isNumberArray(x) {
  1885. return ArrayBuffer.isView(x) && !(x instanceof DataView);
  1886. }
  1887. function genericArray(a, b) {
  1888. var nb = b ? b.length : 0,
  1889. na = a ? Math.min(nb, a.length) : 0,
  1890. x = new Array(na),
  1891. c = new Array(nb),
  1892. i;
  1893. for (i = 0; i < na; ++i) x[i] = interpolate(a[i], b[i]);
  1894. for (; i < nb; ++i) c[i] = b[i];
  1895. return function(t) {
  1896. for (i = 0; i < na; ++i) c[i] = x[i](t);
  1897. return c;
  1898. };
  1899. }
  1900. function date(a, b) {
  1901. var d = new Date;
  1902. return a = +a, b = +b, function(t) {
  1903. return d.setTime(a * (1 - t) + b * t), d;
  1904. };
  1905. }
  1906. function interpolateNumber(a, b) {
  1907. return a = +a, b = +b, function(t) {
  1908. return a * (1 - t) + b * t;
  1909. };
  1910. }
  1911. function object(a, b) {
  1912. var i = {},
  1913. c = {},
  1914. k;
  1915. if (a === null || typeof a !== "object") a = {};
  1916. if (b === null || typeof b !== "object") b = {};
  1917. for (k in b) {
  1918. if (k in a) {
  1919. i[k] = interpolate(a[k], b[k]);
  1920. } else {
  1921. c[k] = b[k];
  1922. }
  1923. }
  1924. return function(t) {
  1925. for (k in i) c[k] = i[k](t);
  1926. return c;
  1927. };
  1928. }
  1929. var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,
  1930. reB = new RegExp(reA.source, "g");
  1931. function zero(b) {
  1932. return function() {
  1933. return b;
  1934. };
  1935. }
  1936. function one(b) {
  1937. return function(t) {
  1938. return b(t) + "";
  1939. };
  1940. }
  1941. function string(a, b) {
  1942. var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b
  1943. am, // current match in a
  1944. bm, // current match in b
  1945. bs, // string preceding current number in b, if any
  1946. i = -1, // index in s
  1947. s = [], // string constants and placeholders
  1948. q = []; // number interpolators
  1949. // Coerce inputs to strings.
  1950. a = a + "", b = b + "";
  1951. // Interpolate pairs of numbers in a & b.
  1952. while ((am = reA.exec(a))
  1953. && (bm = reB.exec(b))) {
  1954. if ((bs = bm.index) > bi) { // a string precedes the next number in b
  1955. bs = b.slice(bi, bs);
  1956. if (s[i]) s[i] += bs; // coalesce with previous string
  1957. else s[++i] = bs;
  1958. }
  1959. if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match
  1960. if (s[i]) s[i] += bm; // coalesce with previous string
  1961. else s[++i] = bm;
  1962. } else { // interpolate non-matching numbers
  1963. s[++i] = null;
  1964. q.push({i: i, x: interpolateNumber(am, bm)});
  1965. }
  1966. bi = reB.lastIndex;
  1967. }
  1968. // Add remains of b.
  1969. if (bi < b.length) {
  1970. bs = b.slice(bi);
  1971. if (s[i]) s[i] += bs; // coalesce with previous string
  1972. else s[++i] = bs;
  1973. }
  1974. // Special optimization for only a single match.
  1975. // Otherwise, interpolate each of the numbers and rejoin the string.
  1976. return s.length < 2 ? (q[0]
  1977. ? one(q[0].x)
  1978. : zero(b))
  1979. : (b = q.length, function(t) {
  1980. for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);
  1981. return s.join("");
  1982. });
  1983. }
  1984. function interpolate(a, b) {
  1985. var t = typeof b, c;
  1986. return b == null || t === "boolean" ? constant$2(b)
  1987. : (t === "number" ? interpolateNumber
  1988. : t === "string" ? ((c = color(b)) ? (b = c, rgb$1) : string)
  1989. : b instanceof color ? rgb$1
  1990. : b instanceof Date ? date
  1991. : isNumberArray(b) ? numberArray
  1992. : Array.isArray(b) ? genericArray
  1993. : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object
  1994. : interpolateNumber)(a, b);
  1995. }
  1996. function interpolateRound(a, b) {
  1997. return a = +a, b = +b, function(t) {
  1998. return Math.round(a * (1 - t) + b * t);
  1999. };
  2000. }
  2001. function constant$3(x) {
  2002. return function() {
  2003. return x;
  2004. };
  2005. }
  2006. function number(x) {
  2007. return +x;
  2008. }
  2009. var unit = [0, 1];
  2010. function identity$1(x) {
  2011. return x;
  2012. }
  2013. function normalize(a, b) {
  2014. return (b -= (a = +a))
  2015. ? function(x) { return (x - a) / b; }
  2016. : constant$3(isNaN(b) ? NaN : 0.5);
  2017. }
  2018. function clamper(a, b) {
  2019. var t;
  2020. if (a > b) t = a, a = b, b = t;
  2021. return function(x) { return Math.max(a, Math.min(b, x)); };
  2022. }
  2023. // normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].
  2024. // interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].
  2025. function bimap(domain, range, interpolate) {
  2026. var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];
  2027. if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);
  2028. else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);
  2029. return function(x) { return r0(d0(x)); };
  2030. }
  2031. function polymap(domain, range, interpolate) {
  2032. var j = Math.min(domain.length, range.length) - 1,
  2033. d = new Array(j),
  2034. r = new Array(j),
  2035. i = -1;
  2036. // Reverse descending domains.
  2037. if (domain[j] < domain[0]) {
  2038. domain = domain.slice().reverse();
  2039. range = range.slice().reverse();
  2040. }
  2041. while (++i < j) {
  2042. d[i] = normalize(domain[i], domain[i + 1]);
  2043. r[i] = interpolate(range[i], range[i + 1]);
  2044. }
  2045. return function(x) {
  2046. var i = bisectRight(domain, x, 1, j) - 1;
  2047. return r[i](d[i](x));
  2048. };
  2049. }
  2050. function copy(source, target) {
  2051. return target
  2052. .domain(source.domain())
  2053. .range(source.range())
  2054. .interpolate(source.interpolate())
  2055. .clamp(source.clamp())
  2056. .unknown(source.unknown());
  2057. }
  2058. function transformer() {
  2059. var domain = unit,
  2060. range = unit,
  2061. interpolate$1 = interpolate,
  2062. transform,
  2063. untransform,
  2064. unknown,
  2065. clamp = identity$1,
  2066. piecewise,
  2067. output,
  2068. input;
  2069. function rescale() {
  2070. var n = Math.min(domain.length, range.length);
  2071. if (clamp !== identity$1) clamp = clamper(domain[0], domain[n - 1]);
  2072. piecewise = n > 2 ? polymap : bimap;
  2073. output = input = null;
  2074. return scale;
  2075. }
  2076. function scale(x) {
  2077. return isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate$1)))(transform(clamp(x)));
  2078. }
  2079. scale.invert = function(y) {
  2080. return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));
  2081. };
  2082. scale.domain = function(_) {
  2083. return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();
  2084. };
  2085. scale.range = function(_) {
  2086. return arguments.length ? (range = Array.from(_), rescale()) : range.slice();
  2087. };
  2088. scale.rangeRound = function(_) {
  2089. return range = Array.from(_), interpolate$1 = interpolateRound, rescale();
  2090. };
  2091. scale.clamp = function(_) {
  2092. return arguments.length ? (clamp = _ ? true : identity$1, rescale()) : clamp !== identity$1;
  2093. };
  2094. scale.interpolate = function(_) {
  2095. return arguments.length ? (interpolate$1 = _, rescale()) : interpolate$1;
  2096. };
  2097. scale.unknown = function(_) {
  2098. return arguments.length ? (unknown = _, scale) : unknown;
  2099. };
  2100. return function(t, u) {
  2101. transform = t, untransform = u;
  2102. return rescale();
  2103. };
  2104. }
  2105. function continuous() {
  2106. return transformer()(identity$1, identity$1);
  2107. }
  2108. // Computes the decimal coefficient and exponent of the specified number x with
  2109. // significant digits p, where x is positive and p is in [1, 21] or undefined.
  2110. // For example, formatDecimal(1.23) returns ["123", 0].
  2111. function formatDecimal(x, p) {
  2112. if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity
  2113. var i, coefficient = x.slice(0, i);
  2114. // The string returned by toExponential either has the form \d\.\d+e[-+]\d+
  2115. // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3).
  2116. return [
  2117. coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
  2118. +x.slice(i + 1)
  2119. ];
  2120. }
  2121. function exponent(x) {
  2122. return x = formatDecimal(Math.abs(x)), x ? x[1] : NaN;
  2123. }
  2124. function formatGroup(grouping, thousands) {
  2125. return function(value, width) {
  2126. var i = value.length,
  2127. t = [],
  2128. j = 0,
  2129. g = grouping[0],
  2130. length = 0;
  2131. while (i > 0 && g > 0) {
  2132. if (length + g + 1 > width) g = Math.max(1, width - length);
  2133. t.push(value.substring(i -= g, i + g));
  2134. if ((length += g + 1) > width) break;
  2135. g = grouping[j = (j + 1) % grouping.length];
  2136. }
  2137. return t.reverse().join(thousands);
  2138. };
  2139. }
  2140. function formatNumerals(numerals) {
  2141. return function(value) {
  2142. return value.replace(/[0-9]/g, function(i) {
  2143. return numerals[+i];
  2144. });
  2145. };
  2146. }
  2147. // [[fill]align][sign][symbol][0][width][,][.precision][~][type]
  2148. var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
  2149. function formatSpecifier(specifier) {
  2150. if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
  2151. var match;
  2152. return new FormatSpecifier({
  2153. fill: match[1],
  2154. align: match[2],
  2155. sign: match[3],
  2156. symbol: match[4],
  2157. zero: match[5],
  2158. width: match[6],
  2159. comma: match[7],
  2160. precision: match[8] && match[8].slice(1),
  2161. trim: match[9],
  2162. type: match[10]
  2163. });
  2164. }
  2165. formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof
  2166. function FormatSpecifier(specifier) {
  2167. this.fill = specifier.fill === undefined ? " " : specifier.fill + "";
  2168. this.align = specifier.align === undefined ? ">" : specifier.align + "";
  2169. this.sign = specifier.sign === undefined ? "-" : specifier.sign + "";
  2170. this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + "";
  2171. this.zero = !!specifier.zero;
  2172. this.width = specifier.width === undefined ? undefined : +specifier.width;
  2173. this.comma = !!specifier.comma;
  2174. this.precision = specifier.precision === undefined ? undefined : +specifier.precision;
  2175. this.trim = !!specifier.trim;
  2176. this.type = specifier.type === undefined ? "" : specifier.type + "";
  2177. }
  2178. FormatSpecifier.prototype.toString = function() {
  2179. return this.fill
  2180. + this.align
  2181. + this.sign
  2182. + this.symbol
  2183. + (this.zero ? "0" : "")
  2184. + (this.width === undefined ? "" : Math.max(1, this.width | 0))
  2185. + (this.comma ? "," : "")
  2186. + (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0))
  2187. + (this.trim ? "~" : "")
  2188. + this.type;
  2189. };
  2190. // Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.
  2191. function formatTrim(s) {
  2192. out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {
  2193. switch (s[i]) {
  2194. case ".": i0 = i1 = i; break;
  2195. case "0": if (i0 === 0) i0 = i; i1 = i; break;
  2196. default: if (i0 > 0) { if (!+s[i]) break out; i0 = 0; } break;
  2197. }
  2198. }
  2199. return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
  2200. }
  2201. var prefixExponent;
  2202. function formatPrefixAuto(x, p) {
  2203. var d = formatDecimal(x, p);
  2204. if (!d) return x + "";
  2205. var coefficient = d[0],
  2206. exponent = d[1],
  2207. i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,
  2208. n = coefficient.length;
  2209. return i === n ? coefficient
  2210. : i > n ? coefficient + new Array(i - n + 1).join("0")
  2211. : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i)
  2212. : "0." + new Array(1 - i).join("0") + formatDecimal(x, Math.max(0, p + i - 1))[0]; // less than 1y!
  2213. }
  2214. function formatRounded(x, p) {
  2215. var d = formatDecimal(x, p);
  2216. if (!d) return x + "";
  2217. var coefficient = d[0],
  2218. exponent = d[1];
  2219. return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient
  2220. : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1)
  2221. : coefficient + new Array(exponent - coefficient.length + 2).join("0");
  2222. }
  2223. var formatTypes = {
  2224. "%": function(x, p) { return (x * 100).toFixed(p); },
  2225. "b": function(x) { return Math.round(x).toString(2); },
  2226. "c": function(x) { return x + ""; },
  2227. "d": function(x) { return Math.round(x).toString(10); },
  2228. "e": function(x, p) { return x.toExponential(p); },
  2229. "f": function(x, p) { return x.toFixed(p); },
  2230. "g": function(x, p) { return x.toPrecision(p); },
  2231. "o": function(x) { return Math.round(x).toString(8); },
  2232. "p": function(x, p) { return formatRounded(x * 100, p); },
  2233. "r": formatRounded,
  2234. "s": formatPrefixAuto,
  2235. "X": function(x) { return Math.round(x).toString(16).toUpperCase(); },
  2236. "x": function(x) { return Math.round(x).toString(16); }
  2237. };
  2238. function identity$2(x) {
  2239. return x;
  2240. }
  2241. var map$1 = Array.prototype.map,
  2242. prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];
  2243. function formatLocale(locale) {
  2244. var group = locale.grouping === undefined || locale.thousands === undefined ? identity$2 : formatGroup(map$1.call(locale.grouping, Number), locale.thousands + ""),
  2245. currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "",
  2246. currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "",
  2247. decimal = locale.decimal === undefined ? "." : locale.decimal + "",
  2248. numerals = locale.numerals === undefined ? identity$2 : formatNumerals(map$1.call(locale.numerals, String)),
  2249. percent = locale.percent === undefined ? "%" : locale.percent + "",
  2250. minus = locale.minus === undefined ? "-" : locale.minus + "",
  2251. nan = locale.nan === undefined ? "NaN" : locale.nan + "";
  2252. function newFormat(specifier) {
  2253. specifier = formatSpecifier(specifier);
  2254. var fill = specifier.fill,
  2255. align = specifier.align,
  2256. sign = specifier.sign,
  2257. symbol = specifier.symbol,
  2258. zero = specifier.zero,
  2259. width = specifier.width,
  2260. comma = specifier.comma,
  2261. precision = specifier.precision,
  2262. trim = specifier.trim,
  2263. type = specifier.type;
  2264. // The "n" type is an alias for ",g".
  2265. if (type === "n") comma = true, type = "g";
  2266. // The "" type, and any invalid type, is an alias for ".12~g".
  2267. else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = "g";
  2268. // If zero fill is specified, padding goes after sign and before digits.
  2269. if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "=";
  2270. // Compute the prefix and suffix.
  2271. // For SI-prefix, the suffix is lazily computed.
  2272. var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "",
  2273. suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "";
  2274. // What format function should we use?
  2275. // Is this an integer type?
  2276. // Can this type generate exponential notation?
  2277. var formatType = formatTypes[type],
  2278. maybeSuffix = /[defgprs%]/.test(type);
  2279. // Set the default precision if not specified,
  2280. // or clamp the specified precision to the supported range.
  2281. // For significant precision, it must be in [1, 21].
  2282. // For fixed precision, it must be in [0, 20].
  2283. precision = precision === undefined ? 6
  2284. : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))
  2285. : Math.max(0, Math.min(20, precision));
  2286. function format(value) {
  2287. var valuePrefix = prefix,
  2288. valueSuffix = suffix,
  2289. i, n, c;
  2290. if (type === "c") {
  2291. valueSuffix = formatType(value) + valueSuffix;
  2292. value = "";
  2293. } else {
  2294. value = +value;
  2295. // Perform the initial formatting.
  2296. var valueNegative = value < 0;
  2297. value = isNaN(value) ? nan : formatType(Math.abs(value), precision);
  2298. // Trim insignificant zeros.
  2299. if (trim) value = formatTrim(value);
  2300. // If a negative value rounds to zero during formatting, treat as positive.
  2301. if (valueNegative && +value === 0) valueNegative = false;
  2302. // Compute the prefix and suffix.
  2303. valuePrefix = (valueNegative ? (sign === "(" ? sign : minus) : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
  2304. valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
  2305. // Break the formatted value into the integer “value” part that can be
  2306. // grouped, and fractional or exponential “suffix” part that is not.
  2307. if (maybeSuffix) {
  2308. i = -1, n = value.length;
  2309. while (++i < n) {
  2310. if (c = value.charCodeAt(i), 48 > c || c > 57) {
  2311. valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
  2312. value = value.slice(0, i);
  2313. break;
  2314. }
  2315. }
  2316. }
  2317. }
  2318. // If the fill character is not "0", grouping is applied before padding.
  2319. if (comma && !zero) value = group(value, Infinity);
  2320. // Compute the padding.
  2321. var length = valuePrefix.length + value.length + valueSuffix.length,
  2322. padding = length < width ? new Array(width - length + 1).join(fill) : "";
  2323. // If the fill character is "0", grouping is applied after padding.
  2324. if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
  2325. // Reconstruct the final output based on the desired alignment.
  2326. switch (align) {
  2327. case "<": value = valuePrefix + value + valueSuffix + padding; break;
  2328. case "=": value = valuePrefix + padding + value + valueSuffix; break;
  2329. case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;
  2330. default: value = padding + valuePrefix + value + valueSuffix; break;
  2331. }
  2332. return numerals(value);
  2333. }
  2334. format.toString = function() {
  2335. return specifier + "";
  2336. };
  2337. return format;
  2338. }
  2339. function formatPrefix(specifier, value) {
  2340. var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)),
  2341. e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,
  2342. k = Math.pow(10, -e),
  2343. prefix = prefixes[8 + e / 3];
  2344. return function(value) {
  2345. return f(k * value) + prefix;
  2346. };
  2347. }
  2348. return {
  2349. format: newFormat,
  2350. formatPrefix: formatPrefix
  2351. };
  2352. }
  2353. var locale;
  2354. var format$1;
  2355. var formatPrefix;
  2356. defaultLocale({
  2357. decimal: ".",
  2358. thousands: ",",
  2359. grouping: [3],
  2360. currency: ["$", ""],
  2361. minus: "-"
  2362. });
  2363. function defaultLocale(definition) {
  2364. locale = formatLocale(definition);
  2365. format$1 = locale.format;
  2366. formatPrefix = locale.formatPrefix;
  2367. return locale;
  2368. }
  2369. function precisionFixed(step) {
  2370. return Math.max(0, -exponent(Math.abs(step)));
  2371. }
  2372. function precisionPrefix(step, value) {
  2373. return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));
  2374. }
  2375. function precisionRound(step, max) {
  2376. step = Math.abs(step), max = Math.abs(max) - step;
  2377. return Math.max(0, exponent(max) - exponent(step)) + 1;
  2378. }
  2379. function tickFormat(start, stop, count, specifier) {
  2380. var step = tickStep(start, stop, count),
  2381. precision;
  2382. specifier = formatSpecifier(specifier == null ? ",f" : specifier);
  2383. switch (specifier.type) {
  2384. case "s": {
  2385. var value = Math.max(Math.abs(start), Math.abs(stop));
  2386. if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;
  2387. return formatPrefix(specifier, value);
  2388. }
  2389. case "":
  2390. case "e":
  2391. case "g":
  2392. case "p":
  2393. case "r": {
  2394. if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e");
  2395. break;
  2396. }
  2397. case "f":
  2398. case "%": {
  2399. if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === "%") * 2;
  2400. break;
  2401. }
  2402. }
  2403. return format$1(specifier);
  2404. }
  2405. function linearish(scale) {
  2406. var domain = scale.domain;
  2407. scale.ticks = function(count) {
  2408. var d = domain();
  2409. return ticks(d[0], d[d.length - 1], count == null ? 10 : count);
  2410. };
  2411. scale.tickFormat = function(count, specifier) {
  2412. var d = domain();
  2413. return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);
  2414. };
  2415. scale.nice = function(count) {
  2416. if (count == null) count = 10;
  2417. var d = domain(),
  2418. i0 = 0,
  2419. i1 = d.length - 1,
  2420. start = d[i0],
  2421. stop = d[i1],
  2422. step;
  2423. if (stop < start) {
  2424. step = start, start = stop, stop = step;
  2425. step = i0, i0 = i1, i1 = step;
  2426. }
  2427. step = tickIncrement(start, stop, count);
  2428. if (step > 0) {
  2429. start = Math.floor(start / step) * step;
  2430. stop = Math.ceil(stop / step) * step;
  2431. step = tickIncrement(start, stop, count);
  2432. } else if (step < 0) {
  2433. start = Math.ceil(start * step) / step;
  2434. stop = Math.floor(stop * step) / step;
  2435. step = tickIncrement(start, stop, count);
  2436. }
  2437. if (step > 0) {
  2438. d[i0] = Math.floor(start / step) * step;
  2439. d[i1] = Math.ceil(stop / step) * step;
  2440. domain(d);
  2441. } else if (step < 0) {
  2442. d[i0] = Math.ceil(start * step) / step;
  2443. d[i1] = Math.floor(stop * step) / step;
  2444. domain(d);
  2445. }
  2446. return scale;
  2447. };
  2448. return scale;
  2449. }
  2450. function linear$1() {
  2451. var scale = continuous();
  2452. scale.copy = function() {
  2453. return copy(scale, linear$1());
  2454. };
  2455. initRange.apply(scale, arguments);
  2456. return linearish(scale);
  2457. }
  2458. function transformer$1() {
  2459. var x0 = 0,
  2460. x1 = 1,
  2461. t0,
  2462. t1,
  2463. k10,
  2464. transform,
  2465. interpolator = identity$1,
  2466. clamp = false,
  2467. unknown;
  2468. function scale(x) {
  2469. return isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));
  2470. }
  2471. scale.domain = function(_) {
  2472. return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];
  2473. };
  2474. scale.clamp = function(_) {
  2475. return arguments.length ? (clamp = !!_, scale) : clamp;
  2476. };
  2477. scale.interpolator = function(_) {
  2478. return arguments.length ? (interpolator = _, scale) : interpolator;
  2479. };
  2480. function range(interpolate) {
  2481. return function(_) {
  2482. var r0, r1;
  2483. return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)];
  2484. };
  2485. }
  2486. scale.range = range(interpolate);
  2487. scale.rangeRound = range(interpolateRound);
  2488. scale.unknown = function(_) {
  2489. return arguments.length ? (unknown = _, scale) : unknown;
  2490. };
  2491. return function(t) {
  2492. transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);
  2493. return scale;
  2494. };
  2495. }
  2496. function copy$1(source, target) {
  2497. return target
  2498. .domain(source.domain())
  2499. .interpolator(source.interpolator())
  2500. .clamp(source.clamp())
  2501. .unknown(source.unknown());
  2502. }
  2503. function sequential() {
  2504. var scale = linearish(transformer$1()(identity$1));
  2505. scale.copy = function() {
  2506. return copy$1(scale, sequential());
  2507. };
  2508. return initInterpolator.apply(scale, arguments);
  2509. }
  2510. function colors(specifier) {
  2511. var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;
  2512. while (i < n) colors[i] = "#" + specifier.slice(i * 6, ++i * 6);
  2513. return colors;
  2514. }
  2515. function ramp(scheme) {
  2516. return rgbBasis(scheme[scheme.length - 1]);
  2517. }
  2518. var scheme = new Array(3).concat(
  2519. "fc8d59ffffbf99d594",
  2520. "d7191cfdae61abdda42b83ba",
  2521. "d7191cfdae61ffffbfabdda42b83ba",
  2522. "d53e4ffc8d59fee08be6f59899d5943288bd",
  2523. "d53e4ffc8d59fee08bffffbfe6f59899d5943288bd",
  2524. "d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd",
  2525. "d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd",
  2526. "9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2",
  2527. "9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2"
  2528. ).map(colors);
  2529. var colorRainbow = ramp(scheme);
  2530. const COLOR_BASE = "#cecece";
  2531. // https://www.w3.org/TR/WCAG20/#relativeluminancedef
  2532. const rc = 0.2126;
  2533. const gc = 0.7152;
  2534. const bc = 0.0722;
  2535. // low-gamma adjust coefficient
  2536. const lowc = 1 / 12.92;
  2537. function adjustGamma(_) {
  2538. return Math.pow((_ + 0.055) / 1.055, 2.4);
  2539. }
  2540. function relativeLuminance(o) {
  2541. const rsrgb = o.r / 255;
  2542. const gsrgb = o.g / 255;
  2543. const bsrgb = o.b / 255;
  2544. const r = rsrgb <= 0.03928 ? rsrgb * lowc : adjustGamma(rsrgb);
  2545. const g = gsrgb <= 0.03928 ? gsrgb * lowc : adjustGamma(gsrgb);
  2546. const b = bsrgb <= 0.03928 ? bsrgb * lowc : adjustGamma(bsrgb);
  2547. return r * rc + g * gc + b * bc;
  2548. }
  2549. const createRainbowColor = root => {
  2550. const colorParentMap = new Map();
  2551. colorParentMap.set(root, COLOR_BASE);
  2552. if (root.children != null) {
  2553. const colorScale = sequential(
  2554. [0, root.children.length - 1],
  2555. colorRainbow
  2556. );
  2557. root.children.forEach((c, id) => {
  2558. colorParentMap.set(c, colorScale(id));
  2559. });
  2560. }
  2561. const colorMap = new Map();
  2562. const lightScale = linear$1()
  2563. .domain([0, root.height])
  2564. .range([0.8, 0.1]);
  2565. const getBackgroundColor = node => {
  2566. const parents = node.ancestors();
  2567. const colorStr =
  2568. parents.length === 1
  2569. ? colorParentMap.get(parents[0])
  2570. : colorParentMap.get(parents[parents.length - 2]);
  2571. const hslColor = hsl(colorStr);
  2572. hslColor.l = lightScale(node.depth);
  2573. return hslColor;
  2574. };
  2575. return node => {
  2576. if (!colorMap.has(node)) {
  2577. const backgroundColor = getBackgroundColor(node);
  2578. const l = relativeLuminance(backgroundColor.rgb());
  2579. const fontColor = l > 0.179 ? "#000" : "#fff";
  2580. colorMap.set(node, { backgroundColor, fontColor });
  2581. }
  2582. return colorMap.get(node);
  2583. };
  2584. };
  2585. const getNodePathTree = d =>
  2586. d
  2587. .ancestors()
  2588. .reverse()
  2589. .map(d => d.data.name)
  2590. .join("/");
  2591. const getNodeSizeTree = d => d.value;
  2592. const getNodeUidTree = d => d.data.uid;
  2593. class Tooltip {
  2594. constructor(container) {
  2595. this.tooltip = container
  2596. .append("div")
  2597. .style("opacity", 0)
  2598. .attr("class", "tooltip");
  2599. this.container = container;
  2600. this.onMouseLeave = this.onMouseLeave.bind(this);
  2601. this.onMouseOver = this.onMouseOver.bind(this);
  2602. this.onMouseMove = this.onMouseMove.bind(this);
  2603. }
  2604. onMouseOver() {
  2605. this.tooltip.style("opacity", 1);
  2606. }
  2607. onMouseMove(event, data) {
  2608. const { html } = this.tooltipContentCache.get(data);
  2609. this.tooltip.html(html);
  2610. const [x, y] = pointer(event, this.container.node());
  2611. const tooltipBox = this.tooltip.node().getBoundingClientRect();
  2612. const containerBox = this.container.node().getBoundingClientRect();
  2613. const availableWidthRight = containerBox.width - x;
  2614. const availableHeightBottom = containerBox.height - y;
  2615. const positionStyles = [];
  2616. const offsetX = 10;
  2617. const offsetY = 10;
  2618. if (availableHeightBottom >= tooltipBox.height + offsetY) {
  2619. positionStyles.push(["top", y + offsetY], ["bottom", null]);
  2620. } else {
  2621. positionStyles.push(
  2622. ["top", null],
  2623. ["bottom", availableHeightBottom + offsetY]
  2624. );
  2625. }
  2626. if (availableWidthRight >= tooltipBox.width + offsetX) {
  2627. positionStyles.push(["left", x + offsetX], ["right", null]);
  2628. } else {
  2629. positionStyles.push(
  2630. ["left", null],
  2631. ["right", availableWidthRight + offsetX]
  2632. );
  2633. }
  2634. for (const [pos, offset] of positionStyles) {
  2635. this.tooltip.style(
  2636. pos,
  2637. typeof offset === "number" ? offset + "px" : offset
  2638. );
  2639. }
  2640. }
  2641. onMouseLeave() {
  2642. this.tooltip.style("opacity", 0);
  2643. }
  2644. buildCache(
  2645. contentNodes,
  2646. {
  2647. totalSize,
  2648. getNodeSize = getNodeSizeTree,
  2649. getNodePath = getNodePathTree,
  2650. getNodeUid = getNodeUidTree,
  2651. nodes,
  2652. links
  2653. }
  2654. ) {
  2655. this.tooltipContentCache = new Map();
  2656. const importedByCache = new Map();
  2657. const importedCache = new Map();
  2658. for (const { source, target } of links || []) {
  2659. if (!importedByCache.has(target)) {
  2660. importedByCache.set(target, []);
  2661. }
  2662. if (!importedCache.has(source)) {
  2663. importedCache.set(source, []);
  2664. }
  2665. importedByCache.get(target).push({ uid: source, ...nodes[source] });
  2666. importedCache.get(source).push({ uid: target, ...nodes[target] });
  2667. }
  2668. contentNodes.each(data => {
  2669. const contentCache = {};
  2670. const str = [];
  2671. if (getNodePath != null) {
  2672. str.push(getNodePath(data));
  2673. }
  2674. const value = getNodeSize(data);
  2675. if (value !== 0) {
  2676. let sizeStr = `<b>Size: ${format_1(value)}</b>`;
  2677. if (totalSize != null) {
  2678. const percentageNum = (100 * value) / totalSize;
  2679. const percentage = percentageNum.toFixed(2);
  2680. const percentageString = percentage + "%";
  2681. sizeStr += ` (${percentageString})`;
  2682. }
  2683. str.push(sizeStr);
  2684. }
  2685. const uid = getNodeUid(data);
  2686. if (uid && importedByCache.has(uid)) {
  2687. const importedBy = importedByCache.get(uid);
  2688. str.push(
  2689. `<b>Imported By</b>: <br/>${[
  2690. ...new Set(importedBy.map(({ id }) => id))
  2691. ].join("<br/>")}`
  2692. );
  2693. }
  2694. contentCache.html = str.join("<br/>");
  2695. this.tooltipContentCache.set(data, contentCache);
  2696. });
  2697. }
  2698. }
  2699. const drawChart = (parentNode, { tree, nodes, links }, width, height) => {
  2700. const layout = d3treemap()
  2701. .size([width, height])
  2702. .paddingOuter(8)
  2703. .paddingTop(20)
  2704. .paddingInner(5)
  2705. .round(true)
  2706. .tile(treemapResquarify);
  2707. const charNode = select(parentNode);
  2708. const svg = charNode.append("svg").attr("viewBox", [0, 0, width, height]);
  2709. const tooltip = new Tooltip(charNode);
  2710. let root = hierarchy(tree)
  2711. .eachAfter(node => {
  2712. let sum = 0;
  2713. const children = node.children;
  2714. if (children != null) {
  2715. let i = children.length;
  2716. while (--i >= 0) sum += children[i].value;
  2717. } else {
  2718. sum = nodes[node.data.uid].renderedLength;
  2719. }
  2720. node.clipUid = uid("clip");
  2721. node.nodeUid = uid("node");
  2722. node.originalValue = sum;
  2723. node.value = sum;
  2724. })
  2725. .sort((a, b) => b.originalValue - a.originalValue);
  2726. const color = createRainbowColor(root);
  2727. const desiredValue = root.originalValue * 0.2;
  2728. const updateChart = selectedNode => {
  2729. //handle zoom of selected node
  2730. const selectedNodeMultiplier =
  2731. selectedNode != null
  2732. ? desiredValue > selectedNode.originalValue
  2733. ? desiredValue / selectedNode.originalValue
  2734. : 3
  2735. : 1;
  2736. // i only need to increase value of leaf nodes
  2737. // as folders will sum they up
  2738. const nodesToIncrease =
  2739. selectedNode != null
  2740. ? selectedNode.children != null
  2741. ? selectedNode.leaves()
  2742. : [selectedNode]
  2743. : [];
  2744. const nodesToIncreaseSet = new Set(nodesToIncrease);
  2745. // update value for nodes
  2746. root = root.eachAfter(node => {
  2747. let sum = 0;
  2748. const children = node.children;
  2749. if (children != null) {
  2750. let i = children.length;
  2751. while (--i >= 0) sum += children[i].value;
  2752. } else {
  2753. sum = nodesToIncreaseSet.has(node)
  2754. ? node.originalValue * selectedNodeMultiplier
  2755. : node.originalValue;
  2756. }
  2757. node.value = sum;
  2758. });
  2759. layout(root);
  2760. // this will make groups by height
  2761. const nestedDataMap = group(root.descendants(), d => d.height);
  2762. const nestedData = Array.from(nestedDataMap, ([key, values]) => ({
  2763. key,
  2764. values
  2765. }));
  2766. nestedData.sort((a, b) => b.key - a.key);
  2767. const layers = svg
  2768. .selectAll(".layer")
  2769. .data(nestedData, d => d.key)
  2770. .join("g")
  2771. .attr("class", "layer");
  2772. const nodeGroups = layers
  2773. .selectAll(".node")
  2774. .data(
  2775. d => d.values,
  2776. d => d
  2777. )
  2778. .join("g")
  2779. .attr("class", "node")
  2780. .attr("transform", d => `translate(${d.x0},${d.y0})`)
  2781. .on("mouseover", tooltip.onMouseOver)
  2782. .on("mousemove", tooltip.onMouseMove)
  2783. .on("mouseleave", tooltip.onMouseLeave)
  2784. .on("click", (event, d) => {
  2785. if (d === selectedNode) {
  2786. updateChart();
  2787. } else {
  2788. updateChart(d);
  2789. }
  2790. });
  2791. //fill node groups
  2792. const rect = nodeGroups
  2793. .selectAll("rect")
  2794. .data(d => [d])
  2795. .join("rect")
  2796. .attr("id", d => d.nodeUid.id)
  2797. .attr("fill", d => color(d).backgroundColor)
  2798. .attr("rx", 2)
  2799. .attr("ry", 2)
  2800. .attr("width", d => d.x1 - d.x0)
  2801. .attr("height", d => d.y1 - d.y0)
  2802. .style("stroke", null)
  2803. .attr("stroke-width", null);
  2804. if (selectedNode != null) {
  2805. rect
  2806. .filter(d => d === selectedNode)
  2807. .style("stroke", "#fff")
  2808. .attr("stroke-width", 2);
  2809. }
  2810. // add clipPath so text do not go out of node
  2811. nodeGroups
  2812. .selectAll("clipPath")
  2813. .data(d => [d])
  2814. .join("clipPath")
  2815. .attr("id", d => d.clipUid.id)
  2816. .selectAll("use")
  2817. .data(d => [d])
  2818. .join("use")
  2819. .attr("xlink:href", d => d.nodeUid.href);
  2820. // add text with clipping
  2821. const text = nodeGroups
  2822. .selectAll("text")
  2823. .data(d => [d])
  2824. .join("text")
  2825. .attr("clip-path", d => d.clipUid)
  2826. .style("fill", d => color(d).fontColor);
  2827. text
  2828. .selectAll("tspan")
  2829. .data(d => [d.data.name, format_1(d.originalValue)])
  2830. .join("tspan")
  2831. .attr("fill-opacity", (d, i, nodes) =>
  2832. i === nodes.length - 1 ? 0.7 : null
  2833. )
  2834. .style("font-size", "0.7em")
  2835. .text(d => d);
  2836. nodeGroups
  2837. .filter(d => d.children)
  2838. .selectAll("tspan")
  2839. .attr("dx", 3)
  2840. .attr("y", 13);
  2841. nodeGroups
  2842. .filter(d => !d.children)
  2843. .selectAll("tspan")
  2844. .attr("x", 3)
  2845. .attr(
  2846. "y",
  2847. (d, i, nodes) => `${(i === nodes.length - 1) * 0.3 + 1.1 + i * 0.9}em`
  2848. );
  2849. tooltip.buildCache(nodeGroups, {
  2850. getNodeSize: d => d.originalValue,
  2851. totalSize: root.originalValue,
  2852. nodes,
  2853. links
  2854. });
  2855. };
  2856. updateChart();
  2857. };
  2858. return drawChart;
  2859. }());
  2860. </script>
  2861. <script>
  2862. const chartParameters = {};
  2863. const data = {"version":1,"tree":{"name":"root","children":[{"name":"Modal/index.js","children":[{"name":"Utils","children":[{"name":"utils.ts","uid":"6ba0-1"}]},{"name":"Modal","children":[{"name":"index.tsx","uid":"6ba0-2"}]},{"name":"\u0000unknown-Modal/index.js","uid":"6ba0-0"}]},{"name":"Common/index.js","children":[{"name":"\u0000unknown-Common/index.js","uid":"6ba0-3"},{"name":"\u0000unknown-Common/index.js","uid":"6ba0-3"}]},{"name":"ConsumeListView/index.js","children":[{"name":"assets","children":[{"name":"icon","children":[{"name":"popovers_list_huangguan.png","uid":"6ba0-5"}]}]},{"name":"ConsumeListView","children":[{"name":"index.tsx","uid":"6ba0-6"}]},{"name":"\u0000unknown-ConsumeListView/index.js","uid":"6ba0-4"}]},{"name":"PayPlatformOptions/index.js","children":[{"name":"assets","children":[{"name":"pay_zhifubao@2x.png","uid":"6ba0-8"},{"name":"pay_wechat@2x.png","uid":"6ba0-9"},{"name":"pay_paypal@2x.png","uid":"6ba0-10"},{"name":"payment_btn_pay_alipay@2x.png","uid":"6ba0-11"},{"name":"payment_btn_pay_wechatpay@2x.png","uid":"6ba0-12"},{"name":"payment_btn_pay_paypal@2x.png","uid":"6ba0-13"}]},{"name":"PayPlatformOptions","children":[{"name":"index.tsx","uid":"6ba0-14"}]},{"name":"\u0000unknown-PayPlatformOptions/index.js","uid":"6ba0-7"}]},{"name":"PriceOptions/index.js","children":[{"name":"index.tsx","uid":"6ba0-16"},{"name":"\u0000unknown-PriceOptions/index.js","uid":"6ba0-15"}]},{"name":"WaitPayInfoView/index.js","children":[{"name":"assets","children":[{"name":"icon","children":[{"name":"icon-info-blue@2x.svg","uid":"6ba0-18"}]}]},{"name":"WaitPayInfoView","children":[{"name":"index.tsx","uid":"6ba0-19"}]},{"name":"\u0000unknown-WaitPayInfoView/index.js","uid":"6ba0-17"}]},{"name":"AllocWantedModal/index.js","children":[{"name":"assets","children":[{"name":"icon","children":[{"name":"close.png","uid":"6ba0-21"}]}]},{"name":"AllocWantedModal","children":[{"name":"index.tsx","uid":"6ba0-22"}]},{"name":"\u0000unknown-AllocWantedModal/index.js","uid":"6ba0-20"}]},{"name":"WantedPublishView/index.js","children":[{"name":"assets","children":[{"name":"cover_wanted@2x.png","uid":"6ba0-24"},{"name":"icon","children":[{"name":"question-circle-o@2x.png","uid":"6ba0-25"}]}]},{"name":"WantedPublishView","children":[{"name":"index.tsx","uid":"6ba0-26"}]},{"name":"\u0000unknown-WantedPublishView/index.js","uid":"6ba0-23"}]},{"name":"WantedPublishPopover/index.js","children":[{"name":"assets","children":[{"name":"icon","children":[{"name":"close@2x.png","uid":"6ba0-28"}]}]},{"name":"WantedPublishPopover","children":[{"name":"index.tsx","uid":"6ba0-29"}]},{"name":"\u0000unknown-WantedPublishPopover/index.js","uid":"6ba0-27"}]},{"name":"Payment/index.js","children":[{"name":"\u0000unknown-Payment/index.js","uid":"6ba0-30"},{"name":"\u0000unknown-Payment/index.js","uid":"6ba0-30"}]},{"name":"./index.js","children":[{"name":"\u0000unknown-./index.js","uid":"6ba0-31"},{"name":"\u0000unknown-./index.js","uid":"6ba0-31"}]},{"name":"BraftEditor/index.js","children":[{"name":"index.tsx","uid":"6ba0-33"},{"name":"\u0000unknown-BraftEditor/index.js","uid":"6ba0-32"}]},{"name":"Editor/index.js","children":[{"name":"CommonTool","children":[{"name":"ControlsToolBar.tsx","uid":"6ba0-35"}]},{"name":"ImgTxtEditor","children":[{"name":"SimpleEditor.tsx","uid":"6ba0-36"}]},{"name":"\u0000unknown-Editor/index.js","uid":"6ba0-34"}]},{"name":"WantedPublishModal/index.js","children":[{"name":"index.tsx","uid":"6ba0-38"},{"name":"\u0000unknown-WantedPublishModal/index.js","uid":"6ba0-37"}]},{"name":"inherits-6cb67931.js","children":[{"name":"classCallCheck.js","uid":"6ba0-39"},{"name":"createClass.js","uid":"6ba0-41"},{"name":"typeof.js","uid":"6ba0-42"},{"name":"assertThisInitialized.js","uid":"6ba0-43"},{"name":"possibleConstructorReturn.js","uid":"6ba0-44"},{"name":"getPrototypeOf.js","uid":"6ba0-45"},{"name":"setPrototypeOf.js","uid":"6ba0-46"},{"name":"inherits.js","uid":"6ba0-47"},{"name":"\u0000unknown-inherits-6cb67931.js","uid":"6ba0-40"}]},{"name":"style-inject.es-1f59c1d0.js","children":[{"name":"style-inject.es.js","uid":"6ba0-48"},{"name":"\u0000unknown-style-inject.es-1f59c1d0.js","uid":"6ba0-49"}]},{"name":"defineProperty-18999f8e.js","children":[{"name":"defineProperty.js","uid":"6ba0-50"},{"name":"\u0000unknown-defineProperty-18999f8e.js","uid":"6ba0-51"}]},{"name":"index-e3cf212a.js","children":[{"name":"index.js","uid":"6ba0-53"},{"name":"\u0000unknown-index-e3cf212a.js","uid":"6ba0-52"}]},{"name":"utils-6b513b37.js","children":[{"name":"utils.ts","uid":"6ba0-55"},{"name":"\u0000unknown-utils-6b513b37.js","uid":"6ba0-54"}]},{"name":"slicedToArray-4cd9e6d3.js","children":[{"name":"arrayWithHoles.js","uid":"6ba0-56"},{"name":"iterableToArrayLimit.js","uid":"6ba0-58"},{"name":"nonIterableRest.js","uid":"6ba0-59"},{"name":"slicedToArray.js","uid":"6ba0-60"},{"name":"\u0000unknown-slicedToArray-4cd9e6d3.js","uid":"6ba0-57"}]},{"name":"WantedPublish-b91e67a7.js","children":[{"name":"WantedPublish.tsx","uid":"6ba0-62"},{"name":"\u0000unknown-WantedPublish-b91e67a7.js","uid":"6ba0-61"}]}]},"nodes":{"6ba0-0":{"renderedLength":2232,"id":"\u0000unknown-Modal/index.js"},"6ba0-1":{"renderedLength":105,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Common/Utils/utils.ts"},"6ba0-2":{"renderedLength":2591,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Common/Modal/index.tsx"},"6ba0-3":{"renderedLength":175,"id":"\u0000unknown-Common/index.js"},"6ba0-4":{"renderedLength":4690,"id":"\u0000unknown-ConsumeListView/index.js"},"6ba0-5":{"renderedLength":708,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/assets/icon/popovers_list_huangguan.png"},"6ba0-6":{"renderedLength":3545,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/ConsumeListView/index.tsx"},"6ba0-7":{"renderedLength":5873,"id":"\u0000unknown-PayPlatformOptions/index.js"},"6ba0-8":{"renderedLength":5140,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/assets/pay_zhifubao@2x.png"},"6ba0-9":{"renderedLength":5430,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/assets/pay_wechat@2x.png"},"6ba0-10":{"renderedLength":4674,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/assets/pay_paypal@2x.png"},"6ba0-11":{"renderedLength":918,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/assets/payment_btn_pay_alipay@2x.png"},"6ba0-12":{"renderedLength":926,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/assets/payment_btn_pay_wechatpay@2x.png"},"6ba0-13":{"renderedLength":974,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/assets/payment_btn_pay_paypal@2x.png"},"6ba0-14":{"renderedLength":3789,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/PayPlatformOptions/index.tsx"},"6ba0-15":{"renderedLength":5306,"id":"\u0000unknown-PriceOptions/index.js"},"6ba0-16":{"renderedLength":3507,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/PriceOptions/index.tsx"},"6ba0-17":{"renderedLength":1123,"id":"\u0000unknown-WaitPayInfoView/index.js"},"6ba0-18":{"renderedLength":2063,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/assets/icon/icon-info-blue@2x.svg"},"6ba0-19":{"renderedLength":1552,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/WaitPayInfoView/index.tsx"},"6ba0-20":{"renderedLength":4747,"id":"\u0000unknown-AllocWantedModal/index.js"},"6ba0-21":{"renderedLength":860,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/assets/icon/close.png"},"6ba0-22":{"renderedLength":6394,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/AllocWantedModal/index.tsx"},"6ba0-23":{"renderedLength":6728,"id":"\u0000unknown-WantedPublishView/index.js"},"6ba0-24":{"renderedLength":5920,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/assets/cover_wanted@2x.png"},"6ba0-25":{"renderedLength":1558,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/assets/icon/question-circle-o@2x.png"},"6ba0-26":{"renderedLength":4013,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/WantedPublishView/index.tsx"},"6ba0-27":{"renderedLength":2512,"id":"\u0000unknown-WantedPublishPopover/index.js"},"6ba0-28":{"renderedLength":1888,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/assets/icon/close@2x.png"},"6ba0-29":{"renderedLength":2806,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/WantedPublishPopover/index.tsx"},"6ba0-30":{"renderedLength":889,"id":"\u0000unknown-Payment/index.js"},"6ba0-31":{"renderedLength":910,"id":"\u0000unknown-./index.js"},"6ba0-32":{"renderedLength":1889,"id":"\u0000unknown-BraftEditor/index.js"},"6ba0-33":{"renderedLength":2499,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Editor/BraftEditor/index.tsx"},"6ba0-34":{"renderedLength":2385,"id":"\u0000unknown-Editor/index.js"},"6ba0-35":{"renderedLength":1492,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Editor/CommonTool/ControlsToolBar.tsx"},"6ba0-36":{"renderedLength":2434,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Editor/ImgTxtEditor/SimpleEditor.tsx"},"6ba0-37":{"renderedLength":1666,"id":"\u0000unknown-WantedPublishModal/index.js"},"6ba0-38":{"renderedLength":2142,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/src/components/Payment/WantedPublishModal/index.tsx"},"6ba0-39":{"renderedLength":162,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/node_modules/@babel/runtime/helpers/esm/classCallCheck.js"},"6ba0-40":{"renderedLength":145,"id":"\u0000unknown-inherits-6cb67931.js"},"6ba0-41":{"renderedLength":573,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/node_modules/@babel/runtime/helpers/esm/createClass.js"},"6ba0-42":{"renderedLength":419,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/node_modules/@babel/runtime/helpers/esm/typeof.js"},"6ba0-43":{"renderedLength":178,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"},"6ba0-44":{"renderedLength":189,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"},"6ba0-45":{"renderedLength":216,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"},"6ba0-46":{"renderedLength":186,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js"},"6ba0-47":{"renderedLength":419,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/node_modules/@babel/runtime/helpers/esm/inherits.js"},"6ba0-48":{"renderedLength":637,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/node_modules/style-inject/dist/style-inject.es.js"},"6ba0-49":{"renderedLength":30,"id":"\u0000unknown-style-inject.es-1f59c1d0.js"},"6ba0-50":{"renderedLength":255,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/node_modules/@babel/runtime/helpers/esm/defineProperty.js"},"6ba0-51":{"renderedLength":34,"id":"\u0000unknown-defineProperty-18999f8e.js"},"6ba0-52":{"renderedLength":216,"id":"\u0000unknown-index-e3cf212a.js"},"6ba0-53":{"renderedLength":926,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/node_modules/classnames/index.js"},"6ba0-54":{"renderedLength":278,"id":"\u0000unknown-utils-6b513b37.js"},"6ba0-55":{"renderedLength":688,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/Utils/utils.ts"},"6ba0-56":{"renderedLength":72,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js"},"6ba0-57":{"renderedLength":36,"id":"\u0000unknown-slicedToArray-4cd9e6d3.js"},"6ba0-58":{"renderedLength":615,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js"},"6ba0-59":{"renderedLength":111,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js"},"6ba0-60":{"renderedLength":114,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js"},"6ba0-61":{"renderedLength":679,"id":"\u0000unknown-WantedPublish-b91e67a7.js"},"6ba0-62":{"renderedLength":606,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/BaseClassComponents/WantedPublish.tsx"},"6ba0-63":{"renderedLength":0,"isEntry":true,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Common/Modal/index.tsx"},"6ba0-64":{"renderedLength":0,"isExternal":true,"id":"react"},"6ba0-65":{"renderedLength":0,"isExternal":true,"id":"react-dom"},"6ba0-66":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Common/Utils/utils.ts"},"6ba0-67":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Common/Modal/Modal.less"},"6ba0-68":{"renderedLength":0,"isEntry":true,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Common/index.ts"},"6ba0-69":{"renderedLength":0,"isEntry":true,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/ConsumeListView/index.tsx"},"6ba0-70":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/assets/icon/popovers_list_huangguan.png"},"6ba0-71":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/ConsumeListView/ConsumeListView.less"},"6ba0-72":{"renderedLength":0,"id":"\u0000commonjsHelpers.js"},"6ba0-73":{"renderedLength":0,"isEntry":true,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/PayPlatformOptions/index.tsx"},"6ba0-74":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/assets/pay_zhifubao@2x.png"},"6ba0-75":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/assets/pay_wechat@2x.png"},"6ba0-76":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/assets/pay_paypal@2x.png"},"6ba0-77":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/assets/payment_btn_pay_alipay@2x.png"},"6ba0-78":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/assets/payment_btn_pay_wechatpay@2x.png"},"6ba0-79":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/assets/payment_btn_pay_paypal@2x.png"},"6ba0-80":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/PayPlatformOptions/PayPlatformOptions.less"},"6ba0-81":{"renderedLength":0,"isEntry":true,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/PriceOptions/index.tsx"},"6ba0-82":{"renderedLength":0,"isExternal":true,"id":"antd"},"6ba0-83":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/PriceOptions/PriceOptions.less"},"6ba0-84":{"renderedLength":0,"isEntry":true,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/WaitPayInfoView/index.tsx"},"6ba0-85":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/WaitPayInfoView/WaitPayInfoView.less"},"6ba0-86":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/assets/icon/icon-info-blue@2x.svg"},"6ba0-87":{"renderedLength":0,"isEntry":true,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/AllocWantedModal/index.tsx"},"6ba0-88":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/assets/icon/close.png"},"6ba0-89":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/AllocWantedModal/AllocWantedModal.less"},"6ba0-90":{"renderedLength":0,"isEntry":true,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/WantedPublishView/index.tsx"},"6ba0-91":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/assets/cover_wanted@2x.png"},"6ba0-92":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/assets/icon/question-circle-o@2x.png"},"6ba0-93":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/WantedPublishView/WantedPublishView.less"},"6ba0-94":{"renderedLength":0,"isEntry":true,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/WantedPublishPopover/index.tsx"},"6ba0-95":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/assets/icon/close@2x.png"},"6ba0-96":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/WantedPublishPopover/WantedPublishPopover.less"},"6ba0-97":{"renderedLength":0,"isEntry":true,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/index.ts"},"6ba0-98":{"renderedLength":0,"isEntry":true,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/lib-build.ts"},"6ba0-99":{"renderedLength":0,"isEntry":true,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Editor/BraftEditor/index.tsx"},"6ba0-100":{"renderedLength":0,"isExternal":true,"id":"braft-editor"},"6ba0-101":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Editor/BraftEditor/index.less"},"6ba0-102":{"renderedLength":0,"isExternal":true,"id":"braft-editor/dist/index.css"},"6ba0-103":{"renderedLength":0,"isExternal":true,"id":"braft-extensions/dist/emoticon.css"},"6ba0-104":{"renderedLength":0,"isExternal":true,"id":"braft-extensions/dist/emoticon"},"6ba0-105":{"renderedLength":0,"isExternal":true,"id":"braft-extensions/dist/max-length"},"6ba0-106":{"renderedLength":0,"isEntry":true,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Editor/index.ts"},"6ba0-107":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Editor/ImgTxtEditor/SimpleEditor.tsx"},"6ba0-108":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Editor/CommonTool/ControlsToolBar.tsx"},"6ba0-109":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Editor/ImgTxtEditor/index.less"},"6ba0-110":{"renderedLength":0,"isEntry":true,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/WantedPublishModal/index.tsx"},"6ba0-111":{"renderedLength":0,"id":"/Users/roxasansem/Desktop/CODE/StorybookUI/bilingo-ui/src/components/Payment/WantedPublishModal/WantedPublishModal.less"}},"links":[{"source":"6ba0-63","target":"6ba0-39"},{"source":"6ba0-63","target":"6ba0-41"},{"source":"6ba0-63","target":"6ba0-44"},{"source":"6ba0-63","target":"6ba0-45"},{"source":"6ba0-63","target":"6ba0-47"},{"source":"6ba0-63","target":"6ba0-64"},{"source":"6ba0-63","target":"6ba0-65"},{"source":"6ba0-63","target":"6ba0-66"},{"source":"6ba0-63","target":"6ba0-67"},{"source":"6ba0-44","target":"6ba0-42"},{"source":"6ba0-44","target":"6ba0-43"},{"source":"6ba0-47","target":"6ba0-46"},{"source":"6ba0-66","target":"6ba0-42"},{"source":"6ba0-67","target":"6ba0-48"},{"source":"6ba0-68","target":"6ba0-63"},{"source":"6ba0-63","target":"6ba0-39"},{"source":"6ba0-63","target":"6ba0-41"},{"source":"6ba0-63","target":"6ba0-44"},{"source":"6ba0-63","target":"6ba0-45"},{"source":"6ba0-63","target":"6ba0-47"},{"source":"6ba0-63","target":"6ba0-64"},{"source":"6ba0-63","target":"6ba0-65"},{"source":"6ba0-63","target":"6ba0-66"},{"source":"6ba0-63","target":"6ba0-67"},{"source":"6ba0-44","target":"6ba0-42"},{"source":"6ba0-44","target":"6ba0-43"},{"source":"6ba0-47","target":"6ba0-46"},{"source":"6ba0-66","target":"6ba0-42"},{"source":"6ba0-67","target":"6ba0-48"},{"source":"6ba0-69","target":"6ba0-50"},{"source":"6ba0-69","target":"6ba0-39"},{"source":"6ba0-69","target":"6ba0-41"},{"source":"6ba0-69","target":"6ba0-44"},{"source":"6ba0-69","target":"6ba0-45"},{"source":"6ba0-69","target":"6ba0-47"},{"source":"6ba0-69","target":"6ba0-64"},{"source":"6ba0-69","target":"6ba0-53"},{"source":"6ba0-69","target":"6ba0-55"},{"source":"6ba0-69","target":"6ba0-70"},{"source":"6ba0-69","target":"6ba0-71"},{"source":"6ba0-44","target":"6ba0-42"},{"source":"6ba0-44","target":"6ba0-43"},{"source":"6ba0-47","target":"6ba0-46"},{"source":"6ba0-53","target":"6ba0-72"},{"source":"6ba0-55","target":"6ba0-50"},{"source":"6ba0-71","target":"6ba0-48"},{"source":"6ba0-73","target":"6ba0-50"},{"source":"6ba0-73","target":"6ba0-64"},{"source":"6ba0-73","target":"6ba0-53"},{"source":"6ba0-73","target":"6ba0-74"},{"source":"6ba0-73","target":"6ba0-75"},{"source":"6ba0-73","target":"6ba0-76"},{"source":"6ba0-73","target":"6ba0-77"},{"source":"6ba0-73","target":"6ba0-78"},{"source":"6ba0-73","target":"6ba0-79"},{"source":"6ba0-73","target":"6ba0-80"},{"source":"6ba0-73","target":"6ba0-55"},{"source":"6ba0-53","target":"6ba0-72"},{"source":"6ba0-80","target":"6ba0-48"},{"source":"6ba0-55","target":"6ba0-50"},{"source":"6ba0-81","target":"6ba0-50"},{"source":"6ba0-81","target":"6ba0-60"},{"source":"6ba0-81","target":"6ba0-64"},{"source":"6ba0-81","target":"6ba0-53"},{"source":"6ba0-81","target":"6ba0-82"},{"source":"6ba0-81","target":"6ba0-83"},{"source":"6ba0-81","target":"6ba0-55"},{"source":"6ba0-60","target":"6ba0-56"},{"source":"6ba0-60","target":"6ba0-58"},{"source":"6ba0-60","target":"6ba0-59"},{"source":"6ba0-53","target":"6ba0-72"},{"source":"6ba0-83","target":"6ba0-48"},{"source":"6ba0-55","target":"6ba0-50"},{"source":"6ba0-84","target":"6ba0-39"},{"source":"6ba0-84","target":"6ba0-41"},{"source":"6ba0-84","target":"6ba0-44"},{"source":"6ba0-84","target":"6ba0-45"},{"source":"6ba0-84","target":"6ba0-47"},{"source":"6ba0-84","target":"6ba0-64"},{"source":"6ba0-84","target":"6ba0-53"},{"source":"6ba0-84","target":"6ba0-85"},{"source":"6ba0-84","target":"6ba0-86"},{"source":"6ba0-44","target":"6ba0-42"},{"source":"6ba0-44","target":"6ba0-43"},{"source":"6ba0-47","target":"6ba0-46"},{"source":"6ba0-53","target":"6ba0-72"},{"source":"6ba0-85","target":"6ba0-48"},{"source":"6ba0-87","target":"6ba0-39"},{"source":"6ba0-87","target":"6ba0-41"},{"source":"6ba0-87","target":"6ba0-44"},{"source":"6ba0-87","target":"6ba0-45"},{"source":"6ba0-87","target":"6ba0-47"},{"source":"6ba0-87","target":"6ba0-64"},{"source":"6ba0-87","target":"6ba0-82"},{"source":"6ba0-87","target":"6ba0-63"},{"source":"6ba0-87","target":"6ba0-88"},{"source":"6ba0-87","target":"6ba0-89"},{"source":"6ba0-44","target":"6ba0-42"},{"source":"6ba0-44","target":"6ba0-43"},{"source":"6ba0-47","target":"6ba0-46"},{"source":"6ba0-63","target":"6ba0-39"},{"source":"6ba0-63","target":"6ba0-41"},{"source":"6ba0-63","target":"6ba0-44"},{"source":"6ba0-63","target":"6ba0-45"},{"source":"6ba0-63","target":"6ba0-47"},{"source":"6ba0-63","target":"6ba0-64"},{"source":"6ba0-63","target":"6ba0-65"},{"source":"6ba0-63","target":"6ba0-66"},{"source":"6ba0-63","target":"6ba0-67"},{"source":"6ba0-89","target":"6ba0-48"},{"source":"6ba0-66","target":"6ba0-42"},{"source":"6ba0-67","target":"6ba0-48"},{"source":"6ba0-90","target":"6ba0-50"},{"source":"6ba0-90","target":"6ba0-39"},{"source":"6ba0-90","target":"6ba0-41"},{"source":"6ba0-90","target":"6ba0-44"},{"source":"6ba0-90","target":"6ba0-45"},{"source":"6ba0-90","target":"6ba0-47"},{"source":"6ba0-90","target":"6ba0-64"},{"source":"6ba0-90","target":"6ba0-53"},{"source":"6ba0-90","target":"6ba0-82"},{"source":"6ba0-90","target":"6ba0-91"},{"source":"6ba0-90","target":"6ba0-92"},{"source":"6ba0-90","target":"6ba0-93"},{"source":"6ba0-90","target":"6ba0-63"},{"source":"6ba0-44","target":"6ba0-42"},{"source":"6ba0-44","target":"6ba0-43"},{"source":"6ba0-47","target":"6ba0-46"},{"source":"6ba0-53","target":"6ba0-72"},{"source":"6ba0-93","target":"6ba0-48"},{"source":"6ba0-63","target":"6ba0-39"},{"source":"6ba0-63","target":"6ba0-41"},{"source":"6ba0-63","target":"6ba0-44"},{"source":"6ba0-63","target":"6ba0-45"},{"source":"6ba0-63","target":"6ba0-47"},{"source":"6ba0-63","target":"6ba0-64"},{"source":"6ba0-63","target":"6ba0-65"},{"source":"6ba0-63","target":"6ba0-66"},{"source":"6ba0-63","target":"6ba0-67"},{"source":"6ba0-66","target":"6ba0-42"},{"source":"6ba0-67","target":"6ba0-48"},{"source":"6ba0-94","target":"6ba0-39"},{"source":"6ba0-94","target":"6ba0-41"},{"source":"6ba0-94","target":"6ba0-44"},{"source":"6ba0-94","target":"6ba0-45"},{"source":"6ba0-94","target":"6ba0-47"},{"source":"6ba0-94","target":"6ba0-64"},{"source":"6ba0-94","target":"6ba0-82"},{"source":"6ba0-94","target":"6ba0-90"},{"source":"6ba0-94","target":"6ba0-95"},{"source":"6ba0-94","target":"6ba0-96"},{"source":"6ba0-94","target":"6ba0-62"},{"source":"6ba0-44","target":"6ba0-42"},{"source":"6ba0-44","target":"6ba0-43"},{"source":"6ba0-47","target":"6ba0-46"},{"source":"6ba0-90","target":"6ba0-50"},{"source":"6ba0-90","target":"6ba0-39"},{"source":"6ba0-90","target":"6ba0-41"},{"source":"6ba0-90","target":"6ba0-44"},{"source":"6ba0-90","target":"6ba0-45"},{"source":"6ba0-90","target":"6ba0-47"},{"source":"6ba0-90","target":"6ba0-64"},{"source":"6ba0-90","target":"6ba0-53"},{"source":"6ba0-90","target":"6ba0-82"},{"source":"6ba0-90","target":"6ba0-91"},{"source":"6ba0-90","target":"6ba0-92"},{"source":"6ba0-90","target":"6ba0-93"},{"source":"6ba0-90","target":"6ba0-63"},{"source":"6ba0-96","target":"6ba0-48"},{"source":"6ba0-62","target":"6ba0-39"},{"source":"6ba0-62","target":"6ba0-44"},{"source":"6ba0-62","target":"6ba0-45"},{"source":"6ba0-62","target":"6ba0-47"},{"source":"6ba0-62","target":"6ba0-64"},{"source":"6ba0-53","target":"6ba0-72"},{"source":"6ba0-93","target":"6ba0-48"},{"source":"6ba0-63","target":"6ba0-39"},{"source":"6ba0-63","target":"6ba0-41"},{"source":"6ba0-63","target":"6ba0-44"},{"source":"6ba0-63","target":"6ba0-45"},{"source":"6ba0-63","target":"6ba0-47"},{"source":"6ba0-63","target":"6ba0-64"},{"source":"6ba0-63","target":"6ba0-65"},{"source":"6ba0-63","target":"6ba0-66"},{"source":"6ba0-63","target":"6ba0-67"},{"source":"6ba0-66","target":"6ba0-42"},{"source":"6ba0-67","target":"6ba0-48"},{"source":"6ba0-97","target":"6ba0-69"},{"source":"6ba0-97","target":"6ba0-73"},{"source":"6ba0-97","target":"6ba0-81"},{"source":"6ba0-97","target":"6ba0-84"},{"source":"6ba0-97","target":"6ba0-87"},{"source":"6ba0-97","target":"6ba0-94"},{"source":"6ba0-97","target":"6ba0-90"},{"source":"6ba0-69","target":"6ba0-50"},{"source":"6ba0-69","target":"6ba0-39"},{"source":"6ba0-69","target":"6ba0-41"},{"source":"6ba0-69","target":"6ba0-44"},{"source":"6ba0-69","target":"6ba0-45"},{"source":"6ba0-69","target":"6ba0-47"},{"source":"6ba0-69","target":"6ba0-64"},{"source":"6ba0-69","target":"6ba0-53"},{"source":"6ba0-69","target":"6ba0-55"},{"source":"6ba0-69","target":"6ba0-70"},{"source":"6ba0-69","target":"6ba0-71"},{"source":"6ba0-73","target":"6ba0-50"},{"source":"6ba0-73","target":"6ba0-64"},{"source":"6ba0-73","target":"6ba0-53"},{"source":"6ba0-73","target":"6ba0-74"},{"source":"6ba0-73","target":"6ba0-75"},{"source":"6ba0-73","target":"6ba0-76"},{"source":"6ba0-73","target":"6ba0-77"},{"source":"6ba0-73","target":"6ba0-78"},{"source":"6ba0-73","target":"6ba0-79"},{"source":"6ba0-73","target":"6ba0-80"},{"source":"6ba0-73","target":"6ba0-55"},{"source":"6ba0-81","target":"6ba0-50"},{"source":"6ba0-81","target":"6ba0-60"},{"source":"6ba0-81","target":"6ba0-64"},{"source":"6ba0-81","target":"6ba0-53"},{"source":"6ba0-81","target":"6ba0-82"},{"source":"6ba0-81","target":"6ba0-83"},{"source":"6ba0-81","target":"6ba0-55"},{"source":"6ba0-84","target":"6ba0-39"},{"source":"6ba0-84","target":"6ba0-41"},{"source":"6ba0-84","target":"6ba0-44"},{"source":"6ba0-84","target":"6ba0-45"},{"source":"6ba0-84","target":"6ba0-47"},{"source":"6ba0-84","target":"6ba0-64"},{"source":"6ba0-84","target":"6ba0-53"},{"source":"6ba0-84","target":"6ba0-85"},{"source":"6ba0-84","target":"6ba0-86"},{"source":"6ba0-87","target":"6ba0-39"},{"source":"6ba0-87","target":"6ba0-41"},{"source":"6ba0-87","target":"6ba0-44"},{"source":"6ba0-87","target":"6ba0-45"},{"source":"6ba0-87","target":"6ba0-47"},{"source":"6ba0-87","target":"6ba0-64"},{"source":"6ba0-87","target":"6ba0-82"},{"source":"6ba0-87","target":"6ba0-63"},{"source":"6ba0-87","target":"6ba0-88"},{"source":"6ba0-87","target":"6ba0-89"},{"source":"6ba0-94","target":"6ba0-39"},{"source":"6ba0-94","target":"6ba0-41"},{"source":"6ba0-94","target":"6ba0-44"},{"source":"6ba0-94","target":"6ba0-45"},{"source":"6ba0-94","target":"6ba0-47"},{"source":"6ba0-94","target":"6ba0-64"},{"source":"6ba0-94","target":"6ba0-82"},{"source":"6ba0-94","target":"6ba0-90"},{"source":"6ba0-94","target":"6ba0-95"},{"source":"6ba0-94","target":"6ba0-96"},{"source":"6ba0-94","target":"6ba0-62"},{"source":"6ba0-90","target":"6ba0-50"},{"source":"6ba0-90","target":"6ba0-39"},{"source":"6ba0-90","target":"6ba0-41"},{"source":"6ba0-90","target":"6ba0-44"},{"source":"6ba0-90","target":"6ba0-45"},{"source":"6ba0-90","target":"6ba0-47"},{"source":"6ba0-90","target":"6ba0-64"},{"source":"6ba0-90","target":"6ba0-53"},{"source":"6ba0-90","target":"6ba0-82"},{"source":"6ba0-90","target":"6ba0-91"},{"source":"6ba0-90","target":"6ba0-92"},{"source":"6ba0-90","target":"6ba0-93"},{"source":"6ba0-90","target":"6ba0-63"},{"source":"6ba0-44","target":"6ba0-42"},{"source":"6ba0-44","target":"6ba0-43"},{"source":"6ba0-47","target":"6ba0-46"},{"source":"6ba0-53","target":"6ba0-72"},{"source":"6ba0-55","target":"6ba0-50"},{"source":"6ba0-71","target":"6ba0-48"},{"source":"6ba0-80","target":"6ba0-48"},{"source":"6ba0-60","target":"6ba0-56"},{"source":"6ba0-60","target":"6ba0-58"},{"source":"6ba0-60","target":"6ba0-59"},{"source":"6ba0-83","target":"6ba0-48"},{"source":"6ba0-85","target":"6ba0-48"},{"source":"6ba0-63","target":"6ba0-39"},{"source":"6ba0-63","target":"6ba0-41"},{"source":"6ba0-63","target":"6ba0-44"},{"source":"6ba0-63","target":"6ba0-45"},{"source":"6ba0-63","target":"6ba0-47"},{"source":"6ba0-63","target":"6ba0-64"},{"source":"6ba0-63","target":"6ba0-65"},{"source":"6ba0-63","target":"6ba0-66"},{"source":"6ba0-63","target":"6ba0-67"},{"source":"6ba0-89","target":"6ba0-48"},{"source":"6ba0-96","target":"6ba0-48"},{"source":"6ba0-62","target":"6ba0-39"},{"source":"6ba0-62","target":"6ba0-44"},{"source":"6ba0-62","target":"6ba0-45"},{"source":"6ba0-62","target":"6ba0-47"},{"source":"6ba0-62","target":"6ba0-64"},{"source":"6ba0-93","target":"6ba0-48"},{"source":"6ba0-66","target":"6ba0-42"},{"source":"6ba0-67","target":"6ba0-48"},{"source":"6ba0-98","target":"6ba0-68"},{"source":"6ba0-98","target":"6ba0-97"},{"source":"6ba0-68","target":"6ba0-63"},{"source":"6ba0-97","target":"6ba0-69"},{"source":"6ba0-97","target":"6ba0-73"},{"source":"6ba0-97","target":"6ba0-81"},{"source":"6ba0-97","target":"6ba0-84"},{"source":"6ba0-97","target":"6ba0-87"},{"source":"6ba0-97","target":"6ba0-94"},{"source":"6ba0-97","target":"6ba0-90"},{"source":"6ba0-63","target":"6ba0-39"},{"source":"6ba0-63","target":"6ba0-41"},{"source":"6ba0-63","target":"6ba0-44"},{"source":"6ba0-63","target":"6ba0-45"},{"source":"6ba0-63","target":"6ba0-47"},{"source":"6ba0-63","target":"6ba0-64"},{"source":"6ba0-63","target":"6ba0-65"},{"source":"6ba0-63","target":"6ba0-66"},{"source":"6ba0-63","target":"6ba0-67"},{"source":"6ba0-69","target":"6ba0-50"},{"source":"6ba0-69","target":"6ba0-39"},{"source":"6ba0-69","target":"6ba0-41"},{"source":"6ba0-69","target":"6ba0-44"},{"source":"6ba0-69","target":"6ba0-45"},{"source":"6ba0-69","target":"6ba0-47"},{"source":"6ba0-69","target":"6ba0-64"},{"source":"6ba0-69","target":"6ba0-53"},{"source":"6ba0-69","target":"6ba0-55"},{"source":"6ba0-69","target":"6ba0-70"},{"source":"6ba0-69","target":"6ba0-71"},{"source":"6ba0-73","target":"6ba0-50"},{"source":"6ba0-73","target":"6ba0-64"},{"source":"6ba0-73","target":"6ba0-53"},{"source":"6ba0-73","target":"6ba0-74"},{"source":"6ba0-73","target":"6ba0-75"},{"source":"6ba0-73","target":"6ba0-76"},{"source":"6ba0-73","target":"6ba0-77"},{"source":"6ba0-73","target":"6ba0-78"},{"source":"6ba0-73","target":"6ba0-79"},{"source":"6ba0-73","target":"6ba0-80"},{"source":"6ba0-73","target":"6ba0-55"},{"source":"6ba0-81","target":"6ba0-50"},{"source":"6ba0-81","target":"6ba0-60"},{"source":"6ba0-81","target":"6ba0-64"},{"source":"6ba0-81","target":"6ba0-53"},{"source":"6ba0-81","target":"6ba0-82"},{"source":"6ba0-81","target":"6ba0-83"},{"source":"6ba0-81","target":"6ba0-55"},{"source":"6ba0-84","target":"6ba0-39"},{"source":"6ba0-84","target":"6ba0-41"},{"source":"6ba0-84","target":"6ba0-44"},{"source":"6ba0-84","target":"6ba0-45"},{"source":"6ba0-84","target":"6ba0-47"},{"source":"6ba0-84","target":"6ba0-64"},{"source":"6ba0-84","target":"6ba0-53"},{"source":"6ba0-84","target":"6ba0-85"},{"source":"6ba0-84","target":"6ba0-86"},{"source":"6ba0-87","target":"6ba0-39"},{"source":"6ba0-87","target":"6ba0-41"},{"source":"6ba0-87","target":"6ba0-44"},{"source":"6ba0-87","target":"6ba0-45"},{"source":"6ba0-87","target":"6ba0-47"},{"source":"6ba0-87","target":"6ba0-64"},{"source":"6ba0-87","target":"6ba0-82"},{"source":"6ba0-87","target":"6ba0-63"},{"source":"6ba0-87","target":"6ba0-88"},{"source":"6ba0-87","target":"6ba0-89"},{"source":"6ba0-94","target":"6ba0-39"},{"source":"6ba0-94","target":"6ba0-41"},{"source":"6ba0-94","target":"6ba0-44"},{"source":"6ba0-94","target":"6ba0-45"},{"source":"6ba0-94","target":"6ba0-47"},{"source":"6ba0-94","target":"6ba0-64"},{"source":"6ba0-94","target":"6ba0-82"},{"source":"6ba0-94","target":"6ba0-90"},{"source":"6ba0-94","target":"6ba0-95"},{"source":"6ba0-94","target":"6ba0-96"},{"source":"6ba0-94","target":"6ba0-62"},{"source":"6ba0-90","target":"6ba0-50"},{"source":"6ba0-90","target":"6ba0-39"},{"source":"6ba0-90","target":"6ba0-41"},{"source":"6ba0-90","target":"6ba0-44"},{"source":"6ba0-90","target":"6ba0-45"},{"source":"6ba0-90","target":"6ba0-47"},{"source":"6ba0-90","target":"6ba0-64"},{"source":"6ba0-90","target":"6ba0-53"},{"source":"6ba0-90","target":"6ba0-82"},{"source":"6ba0-90","target":"6ba0-91"},{"source":"6ba0-90","target":"6ba0-92"},{"source":"6ba0-90","target":"6ba0-93"},{"source":"6ba0-90","target":"6ba0-63"},{"source":"6ba0-44","target":"6ba0-42"},{"source":"6ba0-44","target":"6ba0-43"},{"source":"6ba0-47","target":"6ba0-46"},{"source":"6ba0-66","target":"6ba0-42"},{"source":"6ba0-67","target":"6ba0-48"},{"source":"6ba0-53","target":"6ba0-72"},{"source":"6ba0-55","target":"6ba0-50"},{"source":"6ba0-71","target":"6ba0-48"},{"source":"6ba0-80","target":"6ba0-48"},{"source":"6ba0-60","target":"6ba0-56"},{"source":"6ba0-60","target":"6ba0-58"},{"source":"6ba0-60","target":"6ba0-59"},{"source":"6ba0-83","target":"6ba0-48"},{"source":"6ba0-85","target":"6ba0-48"},{"source":"6ba0-89","target":"6ba0-48"},{"source":"6ba0-96","target":"6ba0-48"},{"source":"6ba0-62","target":"6ba0-39"},{"source":"6ba0-62","target":"6ba0-44"},{"source":"6ba0-62","target":"6ba0-45"},{"source":"6ba0-62","target":"6ba0-47"},{"source":"6ba0-62","target":"6ba0-64"},{"source":"6ba0-93","target":"6ba0-48"},{"source":"6ba0-99","target":"6ba0-50"},{"source":"6ba0-99","target":"6ba0-60"},{"source":"6ba0-99","target":"6ba0-64"},{"source":"6ba0-99","target":"6ba0-53"},{"source":"6ba0-99","target":"6ba0-100"},{"source":"6ba0-99","target":"6ba0-101"},{"source":"6ba0-99","target":"6ba0-102"},{"source":"6ba0-99","target":"6ba0-103"},{"source":"6ba0-99","target":"6ba0-104"},{"source":"6ba0-99","target":"6ba0-105"},{"source":"6ba0-60","target":"6ba0-56"},{"source":"6ba0-60","target":"6ba0-58"},{"source":"6ba0-60","target":"6ba0-59"},{"source":"6ba0-53","target":"6ba0-72"},{"source":"6ba0-101","target":"6ba0-48"},{"source":"6ba0-106","target":"6ba0-99"},{"source":"6ba0-106","target":"6ba0-107"},{"source":"6ba0-99","target":"6ba0-50"},{"source":"6ba0-99","target":"6ba0-60"},{"source":"6ba0-99","target":"6ba0-64"},{"source":"6ba0-99","target":"6ba0-53"},{"source":"6ba0-99","target":"6ba0-100"},{"source":"6ba0-99","target":"6ba0-101"},{"source":"6ba0-99","target":"6ba0-102"},{"source":"6ba0-99","target":"6ba0-103"},{"source":"6ba0-99","target":"6ba0-104"},{"source":"6ba0-99","target":"6ba0-105"},{"source":"6ba0-107","target":"6ba0-64"},{"source":"6ba0-107","target":"6ba0-99"},{"source":"6ba0-107","target":"6ba0-108"},{"source":"6ba0-107","target":"6ba0-109"},{"source":"6ba0-60","target":"6ba0-56"},{"source":"6ba0-60","target":"6ba0-58"},{"source":"6ba0-60","target":"6ba0-59"},{"source":"6ba0-53","target":"6ba0-72"},{"source":"6ba0-101","target":"6ba0-48"},{"source":"6ba0-108","target":"6ba0-50"},{"source":"6ba0-108","target":"6ba0-64"},{"source":"6ba0-109","target":"6ba0-48"},{"source":"6ba0-110","target":"6ba0-39"},{"source":"6ba0-110","target":"6ba0-41"},{"source":"6ba0-110","target":"6ba0-44"},{"source":"6ba0-110","target":"6ba0-45"},{"source":"6ba0-110","target":"6ba0-47"},{"source":"6ba0-110","target":"6ba0-64"},{"source":"6ba0-110","target":"6ba0-63"},{"source":"6ba0-110","target":"6ba0-90"},{"source":"6ba0-110","target":"6ba0-111"},{"source":"6ba0-110","target":"6ba0-62"},{"source":"6ba0-44","target":"6ba0-42"},{"source":"6ba0-44","target":"6ba0-43"},{"source":"6ba0-47","target":"6ba0-46"},{"source":"6ba0-63","target":"6ba0-39"},{"source":"6ba0-63","target":"6ba0-41"},{"source":"6ba0-63","target":"6ba0-44"},{"source":"6ba0-63","target":"6ba0-45"},{"source":"6ba0-63","target":"6ba0-47"},{"source":"6ba0-63","target":"6ba0-64"},{"source":"6ba0-63","target":"6ba0-65"},{"source":"6ba0-63","target":"6ba0-66"},{"source":"6ba0-63","target":"6ba0-67"},{"source":"6ba0-90","target":"6ba0-50"},{"source":"6ba0-90","target":"6ba0-39"},{"source":"6ba0-90","target":"6ba0-41"},{"source":"6ba0-90","target":"6ba0-44"},{"source":"6ba0-90","target":"6ba0-45"},{"source":"6ba0-90","target":"6ba0-47"},{"source":"6ba0-90","target":"6ba0-64"},{"source":"6ba0-90","target":"6ba0-53"},{"source":"6ba0-90","target":"6ba0-82"},{"source":"6ba0-90","target":"6ba0-91"},{"source":"6ba0-90","target":"6ba0-92"},{"source":"6ba0-90","target":"6ba0-93"},{"source":"6ba0-90","target":"6ba0-63"},{"source":"6ba0-111","target":"6ba0-48"},{"source":"6ba0-62","target":"6ba0-39"},{"source":"6ba0-62","target":"6ba0-44"},{"source":"6ba0-62","target":"6ba0-45"},{"source":"6ba0-62","target":"6ba0-47"},{"source":"6ba0-62","target":"6ba0-64"},{"source":"6ba0-66","target":"6ba0-42"},{"source":"6ba0-67","target":"6ba0-48"},{"source":"6ba0-53","target":"6ba0-72"},{"source":"6ba0-93","target":"6ba0-48"}]};
  2864. document.addEventListener('DOMContentLoaded', () => {
  2865. const width = chartParameters.width || window.innerWidth;
  2866. const height = chartParameters.height || window.innerHeight;
  2867. const chartNode = document.querySelector("main");
  2868. drawChart(chartNode, data, width, height);
  2869. });
  2870. </script>
  2871. </body>
  2872. </html>
  2873. >