From d65c669d15eb6603adbd2348c2d791188aaa3988 Mon Sep 17 00:00:00 2001 From: colin-combe Date: Tue, 17 Nov 2020 09:59:11 +0000 Subject: [PATCH 1/4] new nucleic acid interactor types --- src/js/read-mijson.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/js/read-mijson.js b/src/js/read-mijson.js index fa291d4..9e74c64 100644 --- a/src/js/read-mijson.js +++ b/src/js/read-mijson.js @@ -275,6 +275,10 @@ export function readMijson (/*miJson*/miJson, /*App*/ app, expand = true) { interactor.type.id === "MI:0609" // RNA - small nucleolar || interactor.type.id === "MI:0325" // RNA - transfer + || + interactor.type.id === "IA:2966" // RNA - double stranded ribonucleic acid + || + interactor.type.id === "MI:0318" // nucleic acid ) { participant = new RNA(participantId, app, interactor, interactor.label); } else if (interactor.type.id === "MI:0319" // DNA From 1ccf3b993022932d7f984870a1ebde71f0a36484 Mon Sep 17 00:00:00 2001 From: colin-combe Date: Tue, 17 Nov 2020 10:07:30 +0000 Subject: [PATCH 2/4] defend against features in complexes that are in participants that aren't found in json (prob becuase its an unexpanded complex, i.e. complex as hexagon symbol) --- src/js/read-mijson.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/js/read-mijson.js b/src/js/read-mijson.js index 9e74c64..c5216b7 100644 --- a/src/js/read-mijson.js +++ b/src/js/read-mijson.js @@ -137,14 +137,18 @@ export function readMijson (/*miJson*/miJson, /*App*/ app, expand = true) { } // console.log("*", mID, seqDatum); const molecule = app.participants.get(mID); - const seqFeature = new SequenceDatum(molecule, seqDatum.pos); - const annotation = new Annotation(annotName, seqFeature); - let miFeatures = molecule.annotationSets.get("MI Features"); - if (!miFeatures) { - miFeatures = []; - molecule.annotationSets.set("MI Features", miFeatures); + if (molecule) { + const seqFeature = new SequenceDatum(molecule, seqDatum.pos); + const annotation = new Annotation(annotName, seqFeature); + let miFeatures = molecule.annotationSets.get("MI Features"); + if (!miFeatures) { + miFeatures = []; + molecule.annotationSets.set("MI Features", miFeatures); + } + miFeatures.push(annotation); + } else { + console.log("participant " + mID + " not found!"); } - miFeatures.push(annotation); } } } From 9664b64eeddd34eaf68f8a03c56dd0e5331a848c Mon Sep 17 00:00:00 2001 From: colin-combe Date: Tue, 17 Nov 2020 10:15:14 +0000 Subject: [PATCH 3/4] build, add problem json files as examples --- data/EBI-25570228.json | 947 ++++++++++++++++++++++++++ data/EBI-25816865.json | 277 ++++++++ data/EBI-6884640.json | 226 +++++++ data/index.js | 15 + data/~EBI-6884640.json | 207 ++++++ dist/complexviewer.js | 1428 +++++++++++++++++++++++++++++++++++++++- 6 files changed, 3097 insertions(+), 3 deletions(-) create mode 100644 data/EBI-25570228.json create mode 100644 data/EBI-25816865.json create mode 100644 data/EBI-6884640.json create mode 100644 data/~EBI-6884640.json diff --git a/data/EBI-25570228.json b/data/EBI-25570228.json new file mode 100644 index 0000000..4f526c9 --- /dev/null +++ b/data/EBI-25570228.json @@ -0,0 +1,947 @@ +{ + "data": [ + { + "object": "interactor", + "id": "complex portal_CPX-5709", + "type": { + "id": "MI:1302", + "name": "stable complex" + }, + "organism": { + "taxid": "694009", + "common": "sars-cov", + "scientific": "Human SARS coronavirus" + }, + "identifier": { + "db": "complex portal", + "id": "CPX-5709" + }, + "label": "nsp10-nsp16_cvhsa" + }, + { + "object": "interactor", + "id": "chebi_CHEBI:149612", + "type": { + "id": "MI:0328", + "name": "small molecule" + }, + "organism": { + "taxid": "-2", + "common": "chemical synthesis", + "scientific": "Chemical synthesis (Chemical synthesis)" + }, + "identifier": { + "db": "chebi", + "id": "CHEBI:149612" + }, + "label": "7meg5'-ppp5'accccc" + }, + { + "object": "interactor", + "id": "chebi_CHEBI:15414", + "type": { + "id": "MI:0328", + "name": "small molecule" + }, + "organism": { + "taxid": "-2", + "common": "chemical synthesis", + "scientific": "Chemical synthesis (Chemical synthesis)" + }, + "identifier": { + "db": "chebi", + "id": "CHEBI:15414" + }, + "label": "s-adenosyl-l-methionine" + }, + { + "object": "interaction", + "id": "intact_EBI-25570228", + "interactionType": { + "id": "MI:0213", + "name": "methylation reaction" + }, + "experiment": { + "detmethod": { + "id": "MI:0515", + "name": "methyltransferase assay" + }, + "host": { + "taxid": "-1", + "common": "in vitro", + "scientific": "In vitro" + }, + "pubid": [ + { + "db": "intact", + "id": "EBI-25504643" + }, + { + "db": "pubmed", + "id": "21637813" + }, + { + "db": "imex", + "id": "IM-27883" + } + ], + "sourceDatabase": { + "id": "MI:0469", + "name": "European Bioinformatics Institute" + }, + "figures": [ + "Tables 2, S1, S2" + ] + }, + "identifiers": [ + { + "db": "intact", + "id": "EBI-25570228" + }, + { + "db": "imex", + "id": "IM-27883-9" + } + ], + "participants": [ + { + "id": "1", + "interactorRef": "complex portal_CPX-5709", + "bioRole": { + "id": "MI:0501", + "name": "enzyme" + }, + "expRole": { + "id": "MI:0497", + "name": "neutral component" + }, + "identificationMethods": [ + { + "id": "MI:0833", + "name": "autoradiography" + } + ], + "expressedIn": { + "taxid": "83333", + "common": "ecoli", + "scientific": "Escherichia coli (strain K12)" + }, + "features": [ + { + "id": "2", + "name": "P0C6X7-PRO_0000037322:p.Met247Ala", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "247-247", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "4", + "name": "P0C6X7-PRO_0000037322:p.Lys46Ala", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "46-46", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "5", + "name": "P0C6X7-PRO_0000037322:p.Leu244Ala", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "244-244", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "6", + "name": "P0C6X7-PRO_0000037322:p.Tyr30Phe", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "30-30", + "resultingSequence": "F", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "7", + "name": "P0C6X7-PRO_0000037322:p.Ile40Ala", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "40-40", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "8", + "name": "P0C6X7-PRO_0000037317:p.Arg78Ala", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "78-78", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037317", + "participantRef": "9" + } + ] + }, + { + "id": "10", + "name": "P0C6X7-PRO_0000037317:p.Lys93Ala", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "93-93", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037317", + "participantRef": "9" + } + ] + }, + { + "id": "11", + "name": "P0C6X7-PRO_0000037317:p.His80Ala", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "80-80", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037317", + "participantRef": "9" + } + ] + }, + { + "id": "12", + "name": "P0C6X7-PRO_0000037317:p.His80Ala", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "80-80", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037317", + "participantRef": "9" + } + ] + }, + { + "id": "13", + "name": "P0C6X7-PRO_0000037317:p.Gly94Ala", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "94-94", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037317", + "participantRef": "9" + } + ] + }, + { + "id": "14", + "name": "P0C6X7-PRO_0000037317:p.Lys95Ala", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "95-95", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037317", + "participantRef": "9" + } + ] + }, + { + "id": "15", + "name": "P0C6X7-PRO_0000037317:p.Tyr96Ala", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "96-96", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037317", + "participantRef": "9" + } + ] + }, + { + "id": "16", + "name": "P0C6X7-PRO_0000037322:p.Asp130Ala", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "130-130", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "17", + "name": "P0C6X7-PRO_0000037322:p.Lys170Ala", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "170-170", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "18", + "name": "P0C6X7-PRO_0000037322:p.Glu203Ala", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "203-203", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "19", + "name": "P0C6X7-PRO_0000037322:p.Asn43Ala", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "43-43", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "20", + "name": "P0C6X7-PRO_0000037322:p.Gly73Ala", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "73-73", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "21", + "name": "P0C6X7-PRO_0000037322:p.Asp99Ala", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "99-99", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "22", + "name": "P0C6X7-PRO_0000037322:p.Thr58Ala", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "58-58", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "23", + "name": "P0C6X7-PRO_0000037322:p.Thr58Asn", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "58-58", + "resultingSequence": "N", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "24", + "name": "P0C6X7-PRO_0000037322:p.Thr58Glu", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "58-58", + "resultingSequence": "E", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "25", + "name": "P0C6X7-PRO_0000037322:p.Ser188Ala", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "188-188", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "26", + "name": "P0C6X7-PRO_0000037322:p.Tyr132Ala", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "132-132", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "27", + "name": "P0C6X7-PRO_0000037322:p.Tyr132Thr", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "132-132", + "resultingSequence": "T", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "28", + "name": "P0C6X7-PRO_0000037322:p.Tyr132Phe", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "132-132", + "resultingSequence": "F", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "29", + "name": "P0C6X7-PRO_0000037322:p.Tyr132His", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "132-132", + "resultingSequence": "H", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "30", + "name": "P0C6X7-PRO_0000037322:p.Tyr30Ala", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "30-30", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "31", + "name": "P0C6X7-PRO_0000037322:p.Met41Ala", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "41-41", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "32", + "name": "P0C6X7-PRO_0000037322:p.Val44Ala", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "44-44", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "33", + "name": "P0C6X7-PRO_0000037322:p.Thr48Ala", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "48-48", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "34", + "name": "P0C6X7-PRO_0000037317:p.Asn40Ala", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "40-40", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037317", + "participantRef": "9" + } + ] + }, + { + "id": "35", + "name": "P0C6X7-PRO_0000037317:p.Val42Ala", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "42-42", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037317", + "participantRef": "9" + } + ] + }, + { + "id": "36", + "name": "P0C6X7-PRO_0000037317:p.Met44Ala", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "44-44", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037317", + "participantRef": "9" + } + ] + }, + { + "id": "37", + "name": "P0C6X7-PRO_0000037317:p.Leu45Ala", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "45-45", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037317", + "participantRef": "9" + } + ] + }, + { + "id": "38", + "name": "P0C6X7-PRO_0000037317:p.Thr47Ala", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "47-47", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037317", + "participantRef": "9" + } + ] + }, + { + "id": "39", + "name": "P0C6X7-PRO_0000037317:p.Val57Ala", + "category": "pointMutations", + "type": { + "id": "MI:2226", + "name": "mutation with no effect" + }, + "sequenceData": [ + { + "pos": "57-57", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037317", + "participantRef": "9" + } + ] + }, + { + "id": "40", + "name": "P0C6X7-PRO_0000037317:p.Thr58Ala", + "category": "pointMutations", + "type": { + "id": "MI:1131", + "name": "mutation increasing interaction rate" + }, + "sequenceData": [ + { + "pos": "58-58", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037317", + "participantRef": "9" + } + ] + }, + { + "id": "41", + "name": "P0C6X7-PRO_0000037317:p.Gly70Ala", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "70-70", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037317", + "participantRef": "9" + } + ] + }, + { + "id": "42", + "name": "P0C6X7-PRO_0000037317:p.Ser72Ala", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "72-72", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037317", + "participantRef": "9" + } + ] + }, + { + "id": "43", + "name": "P0C6X7-PRO_0000037322:p.Arg86Ala", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "86-86", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "44", + "name": "P0C6X7-PRO_0000037322:p.Val78Ala", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "78-78", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "45", + "name": "P0C6X7-PRO_0000037322:p.Gln87Ala", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "87-87", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "46", + "name": "P0C6X7-PRO_0000037322:p.Val104Gly", + "category": "pointMutations", + "type": { + "id": "MI:1129", + "name": "mutation disrupting interaction rate" + }, + "sequenceData": [ + { + "pos": "104-104", + "resultingSequence": "G", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + }, + { + "id": "47", + "name": "P0C6X7-PRO_0000037322:p.Asp106Ala", + "category": "pointMutations", + "type": { + "id": "MI:1130", + "name": "mutation decreasing interaction rate" + }, + "sequenceData": [ + { + "pos": "106-106", + "resultingSequence": "A", + "interactorRef": "uniprotkb_P0C6X7-PRO_0000037322", + "participantRef": "3" + } + ] + } + ] + }, + { + "id": "48", + "interactorRef": "chebi_CHEBI:149612", + "bioRole": { + "id": "MI:0919", + "name": "acceptor" + }, + "expRole": { + "id": "MI:0497", + "name": "neutral component" + }, + "identificationMethods": [ + { + "id": "MI:0833", + "name": "autoradiography" + } + ], + "expressedIn": { + "taxid": "83333", + "common": "ecoli", + "scientific": "Escherichia coli (strain K12)" + } + }, + { + "id": "49", + "interactorRef": "chebi_CHEBI:15414", + "bioRole": { + "id": "MI:0918", + "name": "donor" + }, + "expRole": { + "id": "MI:0497", + "name": "neutral component" + }, + "identificationMethods": [ + { + "id": "MI:0833", + "name": "autoradiography" + } + ], + "expressedIn": { + "taxid": "-2", + "common": "chemical synthesis", + "scientific": "Chemical synthesis (Chemical synthesis)" + }, + "features": [ + { + "id": "50", + "name": "region", + "category": "experimentalFeatures", + "type": { + "id": "MI:0238", + "name": "3h radiolabel" + }, + "sequenceData": [ + { + "pos": "?-?", + "interactorRef": "chebi_CHEBI:15414", + "participantRef": "49" + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/data/EBI-25816865.json b/data/EBI-25816865.json new file mode 100644 index 0000000..d95dbb4 --- /dev/null +++ b/data/EBI-25816865.json @@ -0,0 +1,277 @@ +{ + "data": [ + { + "object": "interactor", + "id": "uniprotkb_P0DTD1-PRO_0000449630", + "sequence": "AVGACVLCNSQTSLRCGACIRRPFLCCKCCYDHVISTSHKLVLSVNPYVCNAPGCDVTDVTQLYLGGMSYYCKSHKPPISFPLCANGQVFGLYKNTCVGSDNVTDFNAIATCDWTNAGDYILANTCTERLKLFAAETLKATEETFKLSYGIATVREVLSDRELHLSWEVGKPRPPLNRNYVFTGYRVTKNSKVQIGEYTFEKGDYGDAVVYRGTTTYKLNVGDYFVLTSHTVMPLSAPTLVPQEHYVRITGLYPTLNISDEFSSNVANYQKVGMQKYSTLQGPPGTGKSHFAIGLALYYPSARIVYTACSHAAVDALCEKALKYLPIDKCSRIIPARARVECFDKFKVNSTLEQYVFCTVNALPETTADIVVFDEISMATNYDLSVVNARLRAKHYVYIGDPAQLPAPRTLLTKGTLEPEYFNSVCRLMKTIGPDMFLGTCRRCPAEIVDTVSALVYDNKLKAHKDKSAQCFKMFYKGVITHDVSSAINRPQIGVVREFLTRNPAWRKAVFISPYNSQNAVASKILGLPTQTVDSSQGSEYDYVIFTQTTETAHSCNVNRFNVAITRAKVGILCIMSDRDLYDKLQFTSLEIPRRNVATLQ", + "type": { + "id": "MI:0326", + "name": "protein" + }, + "organism": { + "taxid": "2697049", + "common": "SARS-CoV-2", + "scientific": "SARS-CoV-2" + }, + "identifier": { + "db": "uniprotkb", + "id": "P0DTD1-PRO_0000449630" + }, + "label": "p0dtd1-pro_0000449630" + }, + { + "object": "interactor", + "id": "intact_EBI-25816901", + "sequence": "CGCGUAGCAUGCUACGUCAUUCUCCUAAGAAGCUA", + "type": { + "id": "IA:2966", + "name": "double stranded ribonucleic acid" + }, + "organism": { + "taxid": "32630", + "common": "synthetic construct", + "scientific": "synthetic construct" + }, + "identifier": { + "db": "intact", + "id": "EBI-25816901" + }, + "label": "product-rna" + }, + { + "object": "interactor", + "id": "intact_EBI-25816965", + "sequence": "CUAUCCCCAUGUGAUUUUAAUAGCUUCUUAGGAGAAUGACGUAGCAUGCUACGCG", + "type": { + "id": "MI:0318", + "name": "nucleic acid" + }, + "organism": { + "taxid": "32630", + "common": "synthetic construct", + "scientific": "synthetic construct" + }, + "identifier": { + "db": "intact", + "id": "EBI-25816965" + }, + "label": "template-rna" + }, + { + "object": "interactor", + "id": "complex portal_CPX-5742", + "type": { + "id": "MI:1302", + "name": "stable complex" + }, + "organism": { + "taxid": "2697049", + "common": "SARS-CoV-2", + "scientific": "SARS-CoV-2" + }, + "identifier": { + "db": "complex portal", + "id": "CPX-5742" + }, + "label": "nsp7-nsp8-nsp12_sars2" + }, + { + "object": "interaction", + "id": "intact_EBI-25816865", + "interactionType": { + "id": "MI:0915", + "name": "physical association" + }, + "experiment": { + "detmethod": { + "id": "MI:0410", + "name": "3D electron microscopy" + }, + "host": { + "taxid": "-1", + "common": "in vitro", + "scientific": "In vitro" + }, + "pubid": [ + { + "db": "intact", + "id": "EBI-25815170" + }, + { + "db": "pubmed", + "id": "32676607" + }, + { + "db": "imex", + "id": "IM-28291" + } + ], + "sourceDatabase": { + "id": "MI:0469", + "name": "European Bioinformatics Institute" + }, + "figures": [ + "Table S1" + ] + }, + "identifiers": [ + { + "db": "intact", + "id": "EBI-25816865" + }, + { + "db": "wwpdb", + "id": "6XEZ" + }, + { + "db": "emdb", + "id": "EMD-22160" + }, + { + "db": "imex", + "id": "IM-28291-1" + } + ], + "participants": [ + { + "id": "1", + "interactorRef": "uniprotkb_P0DTD1-PRO_0000449630", + "stoichiometry": "2", + "bioRole": { + "id": "MI:0499", + "name": "unspecified role" + }, + "expRole": { + "id": "MI:0497", + "name": "neutral component" + }, + "identificationMethods": [ + { + "id": "MI:2287", + "name": "identification by structure determination" + } + ], + "expressedIn": { + "taxid": "83333", + "common": "ecoli", + "scientific": "Escherichia coli (strain K12)" + } + }, + { + "id": "2", + "interactorRef": "intact_EBI-25816901", + "stoichiometry": "1", + "bioRole": { + "id": "MI:0499", + "name": "unspecified role" + }, + "expRole": { + "id": "MI:0497", + "name": "neutral component" + }, + "identificationMethods": [ + { + "id": "MI:2287", + "name": "identification by structure determination" + } + ], + "expressedIn": { + "taxid": "32630", + "common": "synthetic construct", + "scientific": "synthetic construct" + }, + "features": [ + { + "id": "3", + "name": "whole molecule", + "category": "bindingSites", + "type": { + "id": "MI:0442", + "name": "sufficient binding region" + }, + "sequenceData": [ + { + "pos": "?-?", + "interactorRef": "intact_EBI-25816901", + "participantRef": "2" + } + ], + "linkedFeatures": [ + "4" + ] + } + ] + }, + { + "id": "5", + "interactorRef": "intact_EBI-25816965", + "stoichiometry": "1", + "bioRole": { + "id": "MI:0499", + "name": "unspecified role" + }, + "expRole": { + "id": "MI:0497", + "name": "neutral component" + }, + "identificationMethods": [ + { + "id": "MI:2287", + "name": "identification by structure determination" + } + ], + "expressedIn": { + "taxid": "32630", + "common": "synthetic construct", + "scientific": "synthetic construct" + }, + "features": [ + { + "id": "4", + "name": "whole molecule", + "category": "bindingSites", + "type": { + "id": "MI:0442", + "name": "sufficient binding region" + }, + "sequenceData": [ + { + "pos": "?-?", + "interactorRef": "intact_EBI-25816901", + "participantRef": "2" + } + ], + "linkedFeatures": [ + "3" + ] + } + ] + }, + { + "id": "6", + "interactorRef": "complex portal_CPX-5742", + "stoichiometry": "1", + "bioRole": { + "id": "MI:0499", + "name": "unspecified role" + }, + "expRole": { + "id": "MI:0497", + "name": "neutral component" + }, + "identificationMethods": [ + { + "id": "MI:2287", + "name": "identification by structure determination" + } + ], + "expressedIn": { + "taxid": "83333", + "common": "ecoli", + "scientific": "Escherichia coli (strain K12)" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/data/EBI-6884640.json b/data/EBI-6884640.json new file mode 100644 index 0000000..7260d38 --- /dev/null +++ b/data/EBI-6884640.json @@ -0,0 +1,226 @@ +{ + "data": [ + { + "object": "interactor", + "id": "uniprotkb_Q9VT76", + "sequence": "MPIAHPLPLCVAWLLLLVVIVMSDMTNGGVQGPIEGYNSLDDLLTTTPTPGQAALLLPTAPTAAYTHPKWMEPYFDPSTPRNVTALMGKSAYLSCRVRNLANKTVSWIRHRDIHILTVGSYTYTSDQRFQATHHQDTEDWTLQIKWAQKRDAGMYECQISTQPVRSYFVRLNVVVPTATILGGPDLHVDKGSTINLTCTVKFSPEPPAYIFWYHHEEVINYDSSRGGVSVITEKGDVTTSFLLIQNADLADSGKYSCAPSNADVASVRVHVLNGKYPLPCPTL", + "type": { + "id": "MI:0326", + "name": "protein" + }, + "organism": { + "taxid": "7227", + "common": "drome", + "scientific": "Drosophila melanogaster (Fruit fly)" + }, + "identifier": { + "db": "uniprotkb", + "id": "Q9VT76" + }, + "label": "q9vt76_drome" + }, + { + "object": "interactor", + "id": "uniprotkb_Q961T8", + "sequence": "MRWRHAVRATFTSTTATESSPLIGKVISNSRAPQIAHEMLVEYFMALLVIMGLTAPVDKQSRRSSQYFGHLAAAEELSNLIPDNYDAIDPVFDNTTDREVIAALGTTARLHCRVRHLGDRAVSWIRQRDLHILTIGIMTYTNDQRFLARHIDNSDEWVLKIVSVQQRDAGVYECQVSTEPKISLAYKLVVVTSKAQILANRELFIQSGSDINLTCIAPQAPGPYTHMLWHKDTELVSDSARGGIRVESEQQMKTSNLVISRVQHTDSGNYTCSADNSNSDSVFVHIIKSEQHAAMQHELGSRLLLPPLPLLLLAVLLVVLLGPTSSLQIRTPLSTR", + "type": { + "id": "MI:0326", + "name": "protein" + }, + "organism": { + "taxid": "7227", + "common": "drome", + "scientific": "Drosophila melanogaster (Fruit fly)" + }, + "identifier": { + "db": "uniprotkb", + "id": "Q961T8" + }, + "label": "q961t8_drome" + }, + { + "object": "interaction", + "id": "intact_EBI-6884640", + "interactionType": { + "id": "MI:0915", + "name": "physical association" + }, + "experiment": { + "detmethod": { + "id": "MI:0892", + "name": "solid phase assay" + }, + "host": { + "taxid": "-1", + "common": "in vitro", + "scientific": "In vitro" + }, + "pubid": [ + { + "db": "intact", + "id": "EBI-6881205" + }, + { + "db": "pubmed", + "id": "23827685" + }, + { + "db": "imex", + "id": "IM-20952" + } + ], + "sourceDatabase": { + "id": "MI:0469", + "name": "European Bioinformatics Institute" + }, + "experimentModifications": [ + "The bait\/prey relationship for proteins only described in Fig. 4 could not be ascertained. Bait protein construct contain a C-terminal Biotin tag." + ], + "figures": [ + "Fig. 1, Supp. Table 2" + ] + }, + "identifiers": [ + { + "db": "intact", + "id": "EBI-6884640" + }, + { + "db": "imex", + "id": "IM-20952-106" + } + ], + "participants": [ + { + "id": "1", + "interactorRef": "uniprotkb_Q9VT76", + "bioRole": { + "id": "MI:0499", + "name": "unspecified role" + }, + "expRole": { + "id": "MI:0496", + "name": "bait" + }, + "identificationMethods": [ + { + "id": "MI:0980", + "name": "tag visualisation by enzyme assay" + } + ], + "expressedIn": { + "taxid": "7227", + "common": "drome-schneider_2", + "scientific": "Drosophila melanogaster late embryo cells", + "cellType": { + "id": "ACC 130", + "name": "Established from the late embryo of Drosophila melanogaster" + } + }, + "features": [ + { + "id": "2", + "name": "extracellular region", + "category": "bindingSites", + "type": { + "id": "MI:0442", + "name": "sufficient binding region" + }, + "sequenceData": [ + { + "pos": "23-283", + "interactorRef": "uniprotkb_Q9VT76", + "participantRef": "1" + } + ], + "linkedFeatures": [ + "3" + ] + }, + { + "id": "4", + "name": "region", + "category": "experimentalFeatures", + "type": { + "id": "MI:0975", + "name": "fc-igg tag" + }, + "sequenceData": [ + { + "pos": "?-?", + "interactorRef": "uniprotkb_Q9VT76", + "participantRef": "1" + } + ] + } + ] + }, + { + "id": "5", + "interactorRef": "uniprotkb_Q961T8", + "stoichiometry": "5", + "bioRole": { + "id": "MI:0499", + "name": "unspecified role" + }, + "expRole": { + "id": "MI:0498", + "name": "prey" + }, + "identificationMethods": [ + { + "id": "MI:0980", + "name": "tag visualisation by enzyme assay" + } + ], + "expressedIn": { + "taxid": "7227", + "common": "drome-schneider_2", + "scientific": "Drosophila melanogaster late embryo cells", + "cellType": { + "id": "ACC 130", + "name": "Established from the late embryo of Drosophila melanogaster" + } + }, + "features": [ + { + "id": "6", + "name": "region", + "category": "experimentalFeatures", + "type": { + "id": "MI:0366", + "name": "alkaline phosphatase tag" + }, + "sequenceData": [ + { + "pos": "?-?", + "interactorRef": "uniprotkb_Q961T8", + "participantRef": "5" + } + ] + }, + { + "id": "3", + "name": "extracellular region", + "category": "bindingSites", + "type": { + "id": "MI:0442", + "name": "sufficient binding region" + }, + "sequenceData": [ + { + "pos": "58-308", + "interactorRef": "uniprotkb_Q9VT76", + "participantRef": "1" + } + ], + "linkedFeatures": [ + "2" + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/data/index.js b/data/index.js index 9dad39c..a7b99b4 100644 --- a/data/index.js +++ b/data/index.js @@ -5,6 +5,21 @@ const exampleIndex = [ "name": "~CPX-1920", "url": "https://www.ebi.ac.uk/complexportal/complex/CPX-1920", }, + { + "ac": "EBI-25816865", + "name": "EBI-25816865", + "url": "http://www.ebi.ac.uk/intact/complex/details/EBI-25816865", + }, + { + "ac": "EBI-25570228", + "name": "EBI-25570228", + "url": "http://www.ebi.ac.uk/intact/complex/details/EBI-25570228", + }, + { + "ac": "~EBI-6884640", + "name": "~EBI-6884640", + "url": "http://www.ebi.ac.uk/intact/complex/details/EBI-6884640", + }, { "ac": "CPX-1920", "name": "CPX-1920", diff --git a/data/~EBI-6884640.json b/data/~EBI-6884640.json new file mode 100644 index 0000000..1ed72ad --- /dev/null +++ b/data/~EBI-6884640.json @@ -0,0 +1,207 @@ +{ + "data": [ + { + "object": "interactor", + "id": "uniprotkb_Q9VT76", + "sequence": "MPIAHPLPLCVAWLLLLVVIVMSDMTNGGVQGPIEGYNSLDDLLTTTPTPGQAALLLPTAPTAAYTHPKWMEPYFDPSTPRNVTALMGKSAYLSCRVRNLANKTVSWIRHRDIHILTVGSYTYTSDQRFQATHHQDTEDWTLQIKWAQKRDAGMYECQISTQPVRSYFVRLNVVVPTATILGGPDLHVDKGSTINLTCTVKFSPEPPAYIFWYHHEEVINYDSSRGGVSVITEKGDVTTSFLLIQNADLADSGKYSCAPSNADVASVRVHVLNGKYPLPCPTL", + "type": { + "id": "MI:0326", + "name": "protein" + }, + "organism": { + "taxid": "7227", + "common": "drome", + "scientific": "Drosophila melanogaster (Fruit fly)" + }, + "identifier": { + "db": "uniprotkb", + "id": "Q9VT76" + }, + "label": "q9vt76_drome" + }, + { + "object": "interactor", + "id": "uniprotkb_Q961T8", + "sequence": "MRWRHAVRATFTSTTATESSPLIGKVISNSRAPQIAHEMLVEYFMALLVIMGLTAPVDKQSRRSSQYFGHLAAAEELSNLIPDNYDAIDPVFDNTTDREVIAALGTTARLHCRVRHLGDRAVSWIRQRDLHILTIGIMTYTNDQRFLARHIDNSDEWVLKIVSVQQRDAGVYECQVSTEPKISLAYKLVVVTSKAQILANRELFIQSGSDINLTCIAPQAPGPYTHMLWHKDTELVSDSARGGIRVESEQQMKTSNLVISRVQHTDSGNYTCSADNSNSDSVFVHIIKSEQHAAMQHELGSRLLLPPLPLLLLAVLLVVLLGPTSSLQIRTPLSTR", + "type": { + "id": "MI:0326", + "name": "protein" + }, + "organism": { + "taxid": "7227", + "common": "drome", + "scientific": "Drosophila melanogaster (Fruit fly)" + }, + "identifier": { + "db": "uniprotkb", + "id": "Q961T8" + }, + "label": "q961t8_drome" + }, + { + "object": "interaction", + "id": "intact_EBI-6884640", + "interactionType": { + "id": "MI:0915", + "name": "physical association" + }, + "experiment": { + "detmethod": { + "id": "MI:0892", + "name": "solid phase assay" + }, + "host": { + "taxid": "-1", + "common": "in vitro", + "scientific": "In vitro" + }, + "pubid": [ + { + "db": "intact", + "id": "EBI-6881205" + }, + { + "db": "pubmed", + "id": "23827685" + }, + { + "db": "imex", + "id": "IM-20952" + } + ], + "sourceDatabase": { + "id": "MI:0469", + "name": "European Bioinformatics Institute" + }, + "experimentModifications": [ + "The bait\/prey relationship for proteins only described in Fig. 4 could not be ascertained. Bait protein construct contain a C-terminal Biotin tag." + ], + "figures": [ + "Fig. 1, Supp. Table 2" + ] + }, + "identifiers": [ + { + "db": "intact", + "id": "EBI-6884640" + }, + { + "db": "imex", + "id": "IM-20952-106" + } + ], + "participants": [ + { + "id": "1", + "interactorRef": "uniprotkb_Q9VT76", + "bioRole": { + "id": "MI:0499", + "name": "unspecified role" + }, + "expRole": { + "id": "MI:0496", + "name": "bait" + }, + "identificationMethods": [ + { + "id": "MI:0980", + "name": "tag visualisation by enzyme assay" + } + ], + "expressedIn": { + "taxid": "7227", + "common": "drome-schneider_2", + "scientific": "Drosophila melanogaster late embryo cells", + "cellType": { + "id": "ACC 130", + "name": "Established from the late embryo of Drosophila melanogaster" + } + }, + "features": [ + { + "id": "2", + "name": "extracellular region", + "category": "bindingSites", + "type": { + "id": "MI:0442", + "name": "sufficient binding region" + }, + "sequenceData": [ + { + "pos": "23-283", + "interactorRef": "uniprotkb_Q9VT76", + "participantRef": "1" + } + ], + "linkedFeatures": [ + + ] + }, + { + "id": "4", + "name": "region", + "category": "experimentalFeatures", + "type": { + "id": "MI:0975", + "name": "fc-igg tag" + }, + "sequenceData": [ + { + "pos": "?-?", + "interactorRef": "uniprotkb_Q9VT76", + "participantRef": "1" + } + ] + } + ] + }, + { + "id": "5", + "interactorRef": "uniprotkb_Q961T8", + "stoichiometry": "5", + "bioRole": { + "id": "MI:0499", + "name": "unspecified role" + }, + "expRole": { + "id": "MI:0498", + "name": "prey" + }, + "identificationMethods": [ + { + "id": "MI:0980", + "name": "tag visualisation by enzyme assay" + } + ], + "expressedIn": { + "taxid": "7227", + "common": "drome-schneider_2", + "scientific": "Drosophila melanogaster late embryo cells", + "cellType": { + "id": "ACC 130", + "name": "Established from the late embryo of Drosophila melanogaster" + } + }, + "features": [ + { + "id": "6", + "name": "region", + "category": "experimentalFeatures", + "type": { + "id": "MI:0366", + "name": "alkaline phosphatase tag" + }, + "sequenceData": [ + { + "pos": "?-?", + "interactorRef": "uniprotkb_Q961T8", + "participantRef": "5" + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/dist/complexviewer.js b/dist/complexviewer.js index 856b343..c70c455 100644 --- a/dist/complexviewer.js +++ b/dist/complexviewer.js @@ -1,3 +1,1425 @@ -!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.complexviewer=n():t.complexviewer=n()}(window,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=10)}([function(t,n,e){var r,i;!function(){var o={version:"3.5.17"},a=[].slice,s=function(t){return a.call(t)},u=this.document;function c(t){return t&&(t.ownerDocument||t.document||t).documentElement}function l(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(u)try{s(u.documentElement.childNodes)[0].nodeType}catch(t){s=function(t){for(var n=t.length,e=new Array(n);n--;)e[n]=t[n];return e}}if(Date.now||(Date.now=function(){return+new Date}),u)try{u.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var h=this.Element.prototype,f=h.setAttribute,p=h.setAttributeNS,y=this.CSSStyleDeclaration.prototype,d=y.setProperty;h.setAttribute=function(t,n){f.call(this,t,n+"")},h.setAttributeNS=function(t,n,e){p.call(this,t,n,e+"")},y.setProperty=function(t,n,e){d.call(this,t,n+"",e)}}function g(t,n){return tn?1:t>=n?0:NaN}function v(t){return null===t?NaN:+t}function x(t){return!isNaN(t)}function m(t){return{left:function(n,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=n.length);r>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=n.length);r>>1;t(n[o],e)>0?i=o:r=o+1}return r}}}o.ascending=g,o.descending=function(t,n){return nt?1:n>=t?0:NaN},o.min=function(t,n){var e,r,i=-1,o=t.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ir&&(e=r)}else{for(;++i=r){e=r;break}for(;++ir&&(e=r)}return e},o.max=function(t,n){var e,r,i=-1,o=t.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ie&&(e=r)}else{for(;++i=r){e=r;break}for(;++ie&&(e=r)}return e},o.extent=function(t,n){var e,r,i,o=-1,a=t.length;if(1===arguments.length){for(;++o=r){e=i=r;break}for(;++or&&(e=r),i=r){e=i=r;break}for(;++or&&(e=r),i1)return a/(u-1)},o.deviation=function(){var t=o.variance.apply(this,arguments);return t?Math.sqrt(t):t};var b=m(g);function w(t){return t.length}o.bisectLeft=b.left,o.bisect=o.bisectRight=b.right,o.bisector=function(t){return m(1===t.length?function(n,e){return g(t(n),e)}:t)},o.shuffle=function(t,n,e){(o=arguments.length)<3&&(e=t.length,o<2&&(n=0));for(var r,i,o=e-n;o;)i=Math.random()*o--|0,r=t[o+n],t[o+n]=t[i+n],t[i+n]=r;return t},o.permute=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},o.pairs=function(t){for(var n=0,e=t.length-1,r=t[0],i=new Array(e<0?0:e);n=0;)for(n=(r=t[i]).length;--n>=0;)e[--a]=r[n];return e};var _=Math.abs;function M(t){for(var n=1;t*n%1;)n*=10;return n}function S(t,n){for(var e in n)Object.defineProperty(t.prototype,e,{value:n[e],enumerable:!1})}function k(){this._=Object.create(null)}o.range=function(t,n,e){if(arguments.length<3&&(e=1,arguments.length<2&&(n=t,t=0)),(n-t)/e==1/0)throw new Error("infinite range");var r,i=[],o=M(_(e)),a=-1;if(t*=o,n*=o,(e*=o)<0)for(;(r=t+e*++a)>n;)i.push(r/o);else for(;(r=t+e*++a)=r.length)return n?n.call(e,o):t?o.sort(t):o;for(var u,c,l,h,f=-1,p=o.length,y=r[s++],d=new k;++f=r.length)return n;var o=[],a=i[e++];return n.forEach((function(n,r){o.push({key:n,values:t(r,e)})})),a?o.sort((function(t,n){return a(t.key,n.key)})):o}(a(o.map,t,0),0)},e.key=function(t){return r.push(t),e},e.sortKeys=function(t){return i[r.length-1]=t,e},e.sortValues=function(n){return t=n,e},e.rollup=function(t){return n=t,e},e},o.set=function(t){var n=new I;if(t)for(var e=0,r=t.length;e=0&&(r=t.slice(e+1),t=t.slice(0,e)),t)return arguments.length<2?this[t].on(r):this[t].on(r,n);if(2===arguments.length){if(null==n)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},o.event=null,o.requote=function(t){return t.replace(H,"\\$&")};var H=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,U={}.__proto__?function(t,n){t.__proto__=n}:function(t,n){for(var e in n)t[e]=n[e]};function X(t){return U(t,W),t}var Z=function(t,n){return n.querySelector(t)},Y=function(t,n){return n.querySelectorAll(t)},K=function(t,n){var e=t.matches||t[O(t,"matchesSelector")];return(K=function(t,n){return e.call(t,n)})(t,n)};"function"==typeof Sizzle&&(Z=function(t,n){return Sizzle(t,n)[0]||null},Y=Sizzle,K=Sizzle.matchesSelector),o.selection=function(){return o.select(u.documentElement)};var W=o.selection.prototype=[];function $(t){return"function"==typeof t?t:function(){return Z(t,this)}}function J(t){return"function"==typeof t?t:function(){return Y(t,this)}}W.select=function(t){var n,e,r,i,o=[];t=$(t);for(var a=-1,s=this.length;++a=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),tt.hasOwnProperty(e)?{space:tt[e],local:t}:t}},W.attr=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node();return(t=o.ns.qualify(t)).local?e.getAttributeNS(t.space,t.local):e.getAttribute(t)}for(n in t)this.each(nt(n,t[n]));return this}return this.each(nt(t,n))},W.classed=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node(),r=(t=it(t)).length,i=-1;if(n=e.classList){for(;++i=0;)(e=r[i])&&(o&&o!==e.nextSibling&&o.parentNode.insertBefore(e,o),o=e);return this},W.sort=function(t){t=pt.apply(this,arguments);for(var n=-1,e=this.length;++n=n&&(n=i+1);!(a=s[n])&&++n0&&(t=t.slice(0,i));var u=mt.get(t);function c(){var n=this[r];n&&(this.removeEventListener(t,n,n.$),delete this[r])}return u&&(t=u,a=wt),i?n?function(){var i=a(n,s(arguments));c.call(this),this.addEventListener(t,this[r]=i,i.$=e),i._=n}:c:n?R:function(){var n,e=new RegExp("^__on([^.]+)"+o.requote(t)+"$");for(var r in this)if(n=r.match(e)){var i=this[r];this.removeEventListener(n[1],i,i.$),delete this[r]}}}o.selection.enter=dt,o.selection.enter.prototype=gt,gt.append=W.append,gt.empty=W.empty,gt.node=W.node,gt.call=W.call,gt.size=W.size,gt.select=function(t){for(var n,e,r,i,o,a=[],s=-1,u=this.length;++s0?1:t<0?-1:0}function qt(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function Rt(t){return t>1?0:t<-1?Ct:Math.acos(t)}function jt(t){return t>1?It:t<-1?-It:Math.asin(t)}function Gt(t){return((t=Math.exp(t))+1/t)/2}function Vt(t){return(t=Math.sin(t/2))*t}var Bt=Math.SQRT2;o.interpolateZoom=function(t,n){var e,r,i=t[0],o=t[1],a=t[2],s=n[0],u=n[1],c=n[2],l=s-i,h=u-o,f=l*l+h*h;if(f0&&(t=t.transition().duration(d)),t.call(_.event)}function A(){s&&s.domain(a.range().map((function(t){return(t-f.x)/f.k})).map(a.invert)),h&&h.domain(c.range().map((function(t){return(t-f.y)/f.k})).map(c.invert))}function L(t){g++||t({type:"zoomstart"})}function N(t){A(),t({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function C(t){--g||(t({type:"zoomend"}),n=null)}function P(){var t=this,n=w.of(t,arguments),e=0,r=o.select(l(t)).on(x,s).on(m,u),i=M(o.mouse(t)),a=St(t);function s(){e=1,k(o.mouse(t),i),N(n)}function u(){r.on(x,null).on(m,null),a(e),C(n)}ws.call(t),L(n)}function T(){var t,n=this,e=w.of(n,arguments),r={},a=0,s=".zoom-"+o.event.changedTouches[0].identifier,u="touchmove"+s,c="touchend"+s,l=[],h=o.select(n),p=St(n);function y(){var e=o.touches(n);return t=f.k,e.forEach((function(t){t.identifier in r&&(r[t.identifier]=M(t))})),e}function d(){var t=o.event.target;o.select(t).on(u,g).on(c,x),l.push(t);for(var e=o.event.changedTouches,s=0,h=e.length;s1){v=p[0];var m=p[1],b=v[0]-m[0],w=v[1]-m[1];a=b*b+w*w}}function g(){var s,u,c,l,h=o.touches(n);ws.call(n);for(var f=0,p=h.length;f360?t-=360:t<0&&(t+=360),t<60?r+(i-r)*t/60:t<180?i:t<240?r+(i-r)*(240-t)/60:r}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,n=isNaN(n)||n<0?0:n>1?1:n,r=2*(e=e<0?0:e>1?1:e)-(i=e<=.5?e*(1+n):e+n-e*n),new un(o(t+120),o(t),o(t-120))}function Wt(t,n,e){return this instanceof Wt?(this.h=+t,this.c=+n,void(this.l=+e)):arguments.length<2?t instanceof Wt?new Wt(t.h,t.c,t.l):rn(t instanceof Qt?t.l:(t=dn((t=o.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Wt(t,n,e)}Yt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Zt(this.h,this.s,this.l/t)},Yt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Zt(this.h,this.s,t*this.l)},Yt.rgb=function(){return Kt(this.h,this.s,this.l)},o.hcl=Wt;var $t=Wt.prototype=new Xt;function Jt(t,n,e){return isNaN(t)&&(t=0),isNaN(n)&&(n=0),new Qt(e,Math.cos(t*=zt)*n,Math.sin(t)*n)}function Qt(t,n,e){return this instanceof Qt?(this.l=+t,this.a=+n,void(this.b=+e)):arguments.length<2?t instanceof Qt?new Qt(t.l,t.a,t.b):t instanceof Wt?Jt(t.h,t.c,t.l):dn((t=un(t)).r,t.g,t.b):new Qt(t,n,e)}$t.brighter=function(t){return new Wt(this.h,this.c,Math.min(100,this.l+tn*(arguments.length?t:1)))},$t.darker=function(t){return new Wt(this.h,this.c,Math.max(0,this.l-tn*(arguments.length?t:1)))},$t.rgb=function(){return Jt(this.h,this.c,this.l).rgb()},o.lab=Qt;var tn=18,nn=Qt.prototype=new Xt;function en(t,n,e){var r=(t+16)/116,i=r+n/500,o=r-e/200;return new un(sn(3.2404542*(i=.95047*on(i))-1.5371385*(r=1*on(r))-.4985314*(o=1.08883*on(o))),sn(-.969266*i+1.8760108*r+.041556*o),sn(.0556434*i-.2040259*r+1.0572252*o))}function rn(t,n,e){return t>0?new Wt(Math.atan2(e,n)*Dt,Math.sqrt(n*n+e*e),t):new Wt(NaN,NaN,t)}function on(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function an(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function sn(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function un(t,n,e){return this instanceof un?(this.r=~~t,this.g=~~n,void(this.b=~~e)):arguments.length<2?t instanceof un?new un(t.r,t.g,t.b):pn(""+t,un,Kt):new un(t,n,e)}function cn(t){return new un(t>>16,t>>8&255,255&t)}function ln(t){return cn(t)+""}nn.brighter=function(t){return new Qt(Math.min(100,this.l+tn*(arguments.length?t:1)),this.a,this.b)},nn.darker=function(t){return new Qt(Math.max(0,this.l-tn*(arguments.length?t:1)),this.a,this.b)},nn.rgb=function(){return en(this.l,this.a,this.b)},o.rgb=un;var hn=un.prototype=new Xt;function fn(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function pn(t,n,e){var r,i,o,a=0,s=0,u=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return n(vn(i[0]),vn(i[1]),vn(i[2]))}return(o=xn.get(t))?n(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,u=15&o,u|=u<<4):7===t.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,u=255&o)),n(a,s,u))}function yn(t,n,e){var r,i,o=Math.min(t/=255,n/=255,e/=255),a=Math.max(t,n,e),s=a-o,u=(a+o)/2;return s?(i=u<.5?s/(a+o):s/(2-a-o),r=t==a?(n-e)/s+(n0&&u<1?0:r),new Zt(r,i,u)}function dn(t,n,e){var r=an((.4124564*(t=gn(t))+.3575761*(n=gn(n))+.1804375*(e=gn(e)))/.95047),i=an((.2126729*t+.7151522*n+.072175*e)/1);return Qt(116*i-16,500*(r-i),200*(i-an((.0193339*t+.119192*n+.9503041*e)/1.08883)))}function gn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function vn(t){var n=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*n):n}hn.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var n=this.r,e=this.g,r=this.b,i=30;return n||e||r?(n&&n=200&&n<300||304===n){try{t=e.call(i,c)}catch(t){return void a.error.call(i,t)}a.load.call(i,t)}else a.error.call(i,c)}return this.XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(t)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=h:c.onreadystatechange=function(){c.readyState>3&&h()},c.onprogress=function(t){var n=o.event;o.event=t;try{a.progress.call(i,c)}finally{o.event=n}},i.header=function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?u[t]:(null==n?delete u[t]:u[t]=n+"",i)},i.mimeType=function(t){return arguments.length?(n=null==t?null:t+"",i):n},i.responseType=function(t){return arguments.length?(l=t,i):l},i.response=function(t){return e=t,i},["get","post"].forEach((function(t){i[t]=function(){return i.send.apply(i,[t].concat(s(arguments)))}})),i.send=function(e,r,o){if(2===arguments.length&&"function"==typeof r&&(o=r,r=null),c.open(e,t,!0),null==n||"accept"in u||(u.accept=n+",*/*"),c.setRequestHeader)for(var s in u)c.setRequestHeader(s,u[s]);return null!=n&&c.overrideMimeType&&c.overrideMimeType(n),null!=l&&(c.responseType=l),null!=o&&i.on("error",o).on("load",(function(t){o(null,t)})),a.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},o.rebind(i,a,"on"),null==r?i:i.get(function(t){return 1===t.length?function(n,e){t(null==n?e:null)}:t}(r))}xn.forEach((function(t,n){xn.set(t,cn(n))})),o.functor=mn,o.xhr=bn(z),o.dsv=function(t,n){var e=new RegExp('["'+t+"\n]"),r=t.charCodeAt(0);function i(t,e,r){arguments.length<3&&(r=e,e=null);var i=wn(t,n,null==e?o:a(e),r);return i.row=function(t){return arguments.length?i.response(null==(e=t)?o:a(t)):e},i}function o(t){return i.parse(t.responseText)}function a(t){return function(n){return i.parse(n.responseText,t)}}function s(n){return n.map(u).join(t)}function u(t){return e.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return i.parse=function(t,n){var e;return i.parseRows(t,(function(t,r){if(e)return e(t,r-1);var i=new Function("d","return {"+t.map((function(t,n){return JSON.stringify(t)+": d["+n+"]"})).join(",")+"}");e=n?function(t,e){return n(i(t),e)}:i}))},i.parseRows=function(t,n){var e,i,o={},a={},s=[],u=t.length,c=0,l=0;function h(){if(c>=u)return a;if(i)return i=!1,o;var n=c;if(34===t.charCodeAt(n)){for(var e=n;e++24?(isFinite(n)&&(clearTimeout(kn),kn=setTimeout(Ln,n)),Sn=0):(Sn=1,En(Ln))}function Nn(){for(var t=Date.now(),n=_n;n;)t>=n.t&&n.c(t-n.t)&&(n.c=null),n=n.n;return t}function Cn(){for(var t,n=_n,e=1/0;n;)n.c?(n.t8?function(t){return t/e}:function(t){return t*e},symbol:t}}));function In(t){var n=t.decimal,e=t.thousands,r=t.grouping,i=t.currency,a=r&&e?function(t,n){for(var i=t.length,o=[],a=0,s=r[0],u=0;i>0&&s>0&&(u+s+1>n&&(s=Math.max(1,n-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>n));)s=r[a=(a+1)%r.length];return o.reverse().join(e)}:z;return function(t){var e=zn.exec(t),r=e[1]||" ",s=e[2]||">",u=e[3]||"-",c=e[4]||"",l=e[5],h=+e[6],f=e[7],p=e[8],y=e[9],d=1,g="",v="",x=!1,m=!0;switch(p&&(p=+p.substring(1)),(l||"0"===r&&"="===s)&&(l=r="0",s="="),y){case"n":f=!0,y="g";break;case"%":d=100,v="%",y="f";break;case"p":d=100,v="%",y="r";break;case"b":case"o":case"x":case"X":"#"===c&&(g="0"+y.toLowerCase());case"c":m=!1;case"d":x=!0,p=0;break;case"s":d=-1,y="r"}"$"===c&&(g=i[0],v=i[1]),"r"!=y||p||(y="g"),null!=p&&("g"==y?p=Math.max(1,Math.min(21,p)):"e"!=y&&"f"!=y||(p=Math.max(0,Math.min(20,p)))),y=Dn.get(y)||On;var b=l&&f;return function(t){var e=v;if(x&&t%1)return"";var i=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===u?"":u;if(d<0){var c=o.formatPrefix(t,p);t=c.scale(t),e=c.symbol+v}else t*=d;var w,_,M=(t=y(t,p)).lastIndexOf(".");if(M<0){var S=m?t.lastIndexOf("e"):-1;S<0?(w=t,_=""):(w=t.substring(0,S),_=t.substring(S))}else w=t.substring(0,M),_=n+t.substring(M+1);!l&&f&&(w=a(w,1/0));var k=g.length+w.length+_.length+(b?0:i.length),E=k"===s?E+i+t:"^"===s?E.substring(0,k>>=1)+i+t+E.substring(k):i+(b?t:E+t))+e}}}o.formatPrefix=function(t,n){var e=0;return(t=+t)&&(t<0&&(t*=-1),n&&(t=o.round(t,Pn(t,n))),e=1+Math.floor(1e-12+Math.log(t)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),Tn[8+e/3]};var zn=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Dn=o.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,n){return t.toPrecision(n)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},r:function(t,n){return(t=o.round(t,Pn(t,n))).toFixed(Math.max(0,Math.min(20,Pn(t*(1+1e-15),n))))}});function On(t){return t+""}var qn=o.time={},Rn=Date;function jn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}jn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Gn.setUTCDate.apply(this._,arguments)},setDay:function(){Gn.setUTCDay.apply(this._,arguments)},setFullYear:function(){Gn.setUTCFullYear.apply(this._,arguments)},setHours:function(){Gn.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Gn.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Gn.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Gn.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Gn.setUTCSeconds.apply(this._,arguments)},setTime:function(){Gn.setTime.apply(this._,arguments)}};var Gn=Date.prototype;function Vn(t,n,e){function r(n){var e=t(n),r=o(e,1);return n-e1)for(;a=c)return-1;if(37===(i=n.charCodeAt(s++))){if(a=n.charAt(s++),!(o=_[a in Hn?n.charAt(s++):a])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}l.utc=function(t){var n=l(t);function e(t){try{var e=new(Rn=jn);return e._=t,n(e)}finally{Rn=Date}}return e.parse=function(t){try{Rn=jn;var e=n.parse(t);return e&&e._}finally{Rn=Date}},e.toString=n.toString,e},l.multi=l.utc.multi=he;var f=o.map(),p=Yn(a),y=Kn(a),d=Yn(s),g=Kn(s),v=Yn(u),x=Kn(u),m=Yn(c),b=Kn(c);i.forEach((function(t,n){f.set(t.toLowerCase(),n)}));var w={a:function(t){return s[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return u[t.getMonth()]},c:l(n),d:function(t,n){return Zn(t.getDate(),n,2)},e:function(t,n){return Zn(t.getDate(),n,2)},H:function(t,n){return Zn(t.getHours(),n,2)},I:function(t,n){return Zn(t.getHours()%12||12,n,2)},j:function(t,n){return Zn(1+qn.dayOfYear(t),n,3)},L:function(t,n){return Zn(t.getMilliseconds(),n,3)},m:function(t,n){return Zn(t.getMonth()+1,n,2)},M:function(t,n){return Zn(t.getMinutes(),n,2)},p:function(t){return i[+(t.getHours()>=12)]},S:function(t,n){return Zn(t.getSeconds(),n,2)},U:function(t,n){return Zn(qn.sundayOfYear(t),n,2)},w:function(t){return t.getDay()},W:function(t,n){return Zn(qn.mondayOfYear(t),n,2)},x:l(e),X:l(r),y:function(t,n){return Zn(t.getFullYear()%100,n,2)},Y:function(t,n){return Zn(t.getFullYear()%1e4,n,4)},Z:ce,"%":function(){return"%"}},_={a:function(t,n,e){d.lastIndex=0;var r=d.exec(n.slice(e));return r?(t.w=g.get(r[0].toLowerCase()),e+r[0].length):-1},A:function(t,n,e){p.lastIndex=0;var r=p.exec(n.slice(e));return r?(t.w=y.get(r[0].toLowerCase()),e+r[0].length):-1},b:function(t,n,e){m.lastIndex=0;var r=m.exec(n.slice(e));return r?(t.m=b.get(r[0].toLowerCase()),e+r[0].length):-1},B:function(t,n,e){v.lastIndex=0;var r=v.exec(n.slice(e));return r?(t.m=x.get(r[0].toLowerCase()),e+r[0].length):-1},c:function(t,n,e){return h(t,w.c.toString(),n,e)},d:re,e:re,H:oe,I:oe,j:ie,L:ue,m:ee,M:ae,p:function(t,n,e){var r=f.get(n.slice(e,e+=2).toLowerCase());return null==r?-1:(t.p=r,e)},S:se,U:$n,w:Wn,W:Jn,x:function(t,n,e){return h(t,w.x.toString(),n,e)},X:function(t,n,e){return h(t,w.X.toString(),n,e)},y:te,Y:Qn,Z:ne,"%":le};return l}qn.year=Vn((function(t){return(t=qn.day(t)).setMonth(0,1),t}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t){return t.getFullYear()})),qn.years=qn.year.range,qn.years.utc=qn.year.utc.range,qn.day=Vn((function(t){var n=new Rn(2e3,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n}),(function(t,n){t.setDate(t.getDate()+n)}),(function(t){return t.getDate()-1})),qn.days=qn.day.range,qn.days.utc=qn.day.utc.range,qn.dayOfYear=function(t){var n=qn.year(t);return Math.floor((t-n-6e4*(t.getTimezoneOffset()-n.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(t,n){n=7-n;var e=qn[t]=Vn((function(t){return(t=qn.day(t)).setDate(t.getDate()-(t.getDay()+n)%7),t}),(function(t,n){t.setDate(t.getDate()+7*Math.floor(n))}),(function(t){var e=qn.year(t).getDay();return Math.floor((qn.dayOfYear(t)+(e+n)%7)/7)-(e!==n)}));qn[t+"s"]=e.range,qn[t+"s"].utc=e.utc.range,qn[t+"OfYear"]=function(t){var e=qn.year(t).getDay();return Math.floor((qn.dayOfYear(t)+(e+n)%7)/7)}})),qn.week=qn.sunday,qn.weeks=qn.sunday.range,qn.weeks.utc=qn.sunday.utc.range,qn.weekOfYear=qn.sundayOfYear;var Hn={"-":"",_:" ",0:"0"},Un=/^\s*\d+/,Xn=/^%/;function Zn(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),e+i[0].length):-1}function ne(t,n,e){return/^[+-]\d{4}$/.test(n=n.slice(e,e+5))?(t.Z=-n,e+5):-1}function ee(t,n,e){Un.lastIndex=0;var r=Un.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function re(t,n,e){Un.lastIndex=0;var r=Un.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function ie(t,n,e){Un.lastIndex=0;var r=Un.exec(n.slice(e,e+3));return r?(t.j=+r[0],e+r[0].length):-1}function oe(t,n,e){Un.lastIndex=0;var r=Un.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function ae(t,n,e){Un.lastIndex=0;var r=Un.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function se(t,n,e){Un.lastIndex=0;var r=Un.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function ue(t,n,e){Un.lastIndex=0;var r=Un.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function ce(t){var n=t.getTimezoneOffset(),e=n>0?"-":"+",r=_(n)/60|0,i=_(n)%60;return e+Zn(r,"0",2)+Zn(i,"0",2)}function le(t,n,e){Xn.lastIndex=0;var r=Xn.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function he(t){for(var n=t.length,e=-1;++e=0?1:-1,s=a*o,u=Math.cos(n),c=Math.sin(n),l=i*c,h=r*u+l*Math.cos(s),f=l*a*Math.sin(s);Ie.add(Math.atan2(f,h)),e=t,r=u,i=c}ze.point=function(a,s){ze.point=o,e=(t=a)*zt,r=Math.cos(s=(n=s)*zt/2+Ct/4),i=Math.sin(s)},ze.lineEnd=function(){o(t,n)}}function Oe(t){var n=t[0],e=t[1],r=Math.cos(e);return[r*Math.cos(n),r*Math.sin(n),Math.sin(e)]}function qe(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Re(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function je(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function Ge(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function Ve(t){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function Be(t){return[Math.atan2(t[1],t[0]),jt(t[2])]}function Fe(t,n){return _(t[0]-n[0])Lt?r=90:c<-Lt&&(n=-90),h[0]=t,h[1]=e}};function p(i,o){l.push(h=[t=i,e=i]),or&&(r=o)}function y(o,a){var s=Oe([o*zt,a*zt]);if(u){var c=Re(u,s),l=Re([c[1],-c[0],0],c);Ve(l),l=Be(l);var h=o-i,f=h>0?1:-1,y=l[0]*Dt*f,d=_(h)>180;if(d^(f*ir&&(r=g);else if(d^(f*i<(y=(y+360)%360-180)&&yr&&(r=a);d?ob(t,e)&&(e=o):b(o,e)>b(t,e)&&(t=o):e>=t?(oe&&(e=o)):o>i?b(t,o)>b(t,e)&&(e=o):b(o,e)>b(t,e)&&(t=o)}else p(o,a);u=s,i=o}function d(){f.point=y}function g(){h[0]=t,h[1]=e,f.point=p,u=null}function v(t,n){if(u){var e=t-i;c+=_(e)>180?e+(e>0?360:-360):e}else a=t,s=n;ze.point(t,n),y(t,n)}function x(){ze.lineStart()}function m(){v(a,s),ze.lineEnd(),_(c)>Lt&&(t=-(e=180)),h[0]=t,h[1]=e,u=null}function b(t,n){return(n-=t)<0?n+360:n}function w(t,n){return t[0]-n[0]}function M(t,n){return n[0]<=n[1]?n[0]<=t&&t<=n[1]:tb(d[0],d[1])&&(d[1]=p[1]),b(p[0],d[1])>b(d[0],d[1])&&(d[0]=p[0])):s.push(d=p);for(var u,c,p,y=-1/0,d=(a=0,s[c=s.length-1]);a<=c;d=p,++a)p=s[a],(u=b(d[1],p[0]))>y&&(y=u,t=p[0],e=d[1])}return l=h=null,t===1/0||n===1/0?[[NaN,NaN],[NaN,NaN]]:[[t,n],[e,r]]}}(),o.geo.centroid=function(t){_e=Me=Se=ke=Ee=Ae=Le=Ne=Ce=Pe=Te=0,o.geo.stream(t,He);var n=Ce,e=Pe,r=Te,i=n*n+e*e+r*r;return i=0;--s)i.point((h=l[s])[0],h[1]);else r(p.x,p.p.x,-1,i);p=p.p}l=(p=p.o).z,y=!y}while(!p.v);i.lineEnd()}}}function Qe(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r=0?1:-1,M=_*w,S=M>Ct,k=y*m;if(Ie.add(Math.atan2(k*_*Math.sin(M),d*b+k*Math.cos(M))),o+=S?w+_*Pt:w,S^f>=e^v>=e){var E=Re(Oe(h),Oe(t));Ve(E);var A=Re(i,E);Ve(A);var L=(S^w>=0?-1:1)*jt(A[2]);(r>L||r===L&&(E[0]||E[1]))&&(a+=S^w>=0?1:-1)}if(!g++)break;f=v,y=m,d=b,h=t}}return(o<-Lt||o0){for(m||(a.polygonStart(),m=!0),a.lineStart();++o1&&2&n&&e.push(e.pop().concat(e.shift())),s.push(e.filter(er))}return l}}function er(t){return t.length>1}function rr(){var t,n=[];return{lineStart:function(){n.push(t=[])},point:function(n,e){t.push([n,e])},lineEnd:R,buffer:function(){var e=n;return n=[],t=null,e},rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))}}}function ir(t,n){return((t=t.x)[0]<0?t[1]-It-Lt:It-t[1])-((n=n.x)[0]<0?n[1]-It-Lt:It-n[1])}var or=nr($e,(function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,a){var s=o>0?Ct:-Ct,u=_(o-e);_(u-Ct)0?It:-It),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(o,r),n=0):i!==s&&u>=Ct&&(_(e-i)Lt?Math.atan((Math.sin(n)*(o=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(n))*Math.sin(t))/(i*o*a)):(n+r)/2}(e,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),n=0),t.point(e=o,r=a),i=s},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}),(function(t,n,e,r){var i;if(null==t)i=e*It,r.point(-Ct,i),r.point(0,i),r.point(Ct,i),r.point(Ct,0),r.point(Ct,-i),r.point(0,-i),r.point(-Ct,-i),r.point(-Ct,0),r.point(-Ct,i);else if(_(t[0]-n[0])>Lt){var o=t[0]0,r=_(n)>Lt;return nr(i,(function(t){var n,s,u,c,l;return{lineStart:function(){c=u=!1,l=1},point:function(h,f){var p,y=[h,f],d=i(h,f),g=e?d?0:a(h,f):d?a(h+(h<0?Ct:-Ct),f):0;if(!n&&(c=u=d)&&t.lineStart(),d!==u&&(p=o(n,y),(Fe(n,p)||Fe(y,p))&&(y[0]+=Lt,y[1]+=Lt,d=i(y[0],y[1]))),d!==u)l=0,d?(t.lineStart(),p=o(y,n),t.point(p[0],p[1])):(p=o(n,y),t.point(p[0],p[1]),t.lineEnd()),n=p;else if(r&&n&&e^d){var v;g&s||!(v=o(y,n,!0))||(l=0,e?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!d||n&&Fe(n,y)||t.point(y[0],y[1]),n=y,u=d,s=g},lineEnd:function(){u&&t.lineEnd(),n=null},clean:function(){return l|(c&&u)<<1}}}),Br(t,6*zt),e?[0,-t]:[-Ct,t-Ct]);function i(t,e){return Math.cos(t)*Math.cos(e)>n}function o(t,e,r){var i=[1,0,0],o=Re(Oe(t),Oe(e)),a=qe(o,o),s=o[0],u=a-s*s;if(!u)return!r&&t;var c=n*a/u,l=-n*s/u,h=Re(i,o),f=Ge(i,c);je(f,Ge(o,l));var p=h,y=qe(f,p),d=qe(p,p),g=y*y-d*(qe(f,f)-1);if(!(g<0)){var v=Math.sqrt(g),x=Ge(p,(-y-v)/d);if(je(x,f),x=Be(x),!r)return x;var m,b=t[0],w=e[0],M=t[1],S=e[1];w0^x[1]<(_(x[0]-b)Ct^(b<=x[0]&&x[0]<=w)){var A=Ge(p,(-y+v)/d);return je(A,f),[x,Be(A)]}}}function a(n,r){var i=e?t:Ct-t,o=0;return n<-i?o|=1:n>i&&(o|=2),r<-i?o|=4:r>i&&(o|=8),o}}function sr(t,n,e,r){return function(i){var o,a=i.a,s=i.b,u=a.x,c=a.y,l=0,h=1,f=s.x-u,p=s.y-c;if(o=t-u,f||!(o>0)){if(o/=f,f<0){if(o0){if(o>h)return;o>l&&(l=o)}if(o=e-u,f||!(o<0)){if(o/=f,f<0){if(o>h)return;o>l&&(l=o)}else if(f>0){if(o0)){if(o/=p,p<0){if(o0){if(o>h)return;o>l&&(l=o)}if(o=r-c,p||!(o<0)){if(o/=p,p<0){if(o>h)return;o>l&&(l=o)}else if(p>0){if(o0&&(i.a={x:u+l*f,y:c+l*p}),h<1&&(i.b={x:u+h*f,y:c+h*p}),i}}}}}}function ur(t,n,e,r){return function(u){var c,l,h,f,p,y,d,g,v,x,m,b=u,w=rr(),_=sr(t,n,e,r),M={point:E,lineStart:function(){M.point=A,l&&l.push(h=[]);x=!0,v=!1,d=g=NaN},lineEnd:function(){c&&(A(f,p),y&&v&&w.rejoin(),c.push(w.buffer()));M.point=E,v&&u.lineEnd()},polygonStart:function(){u=w,c=[],l=[],m=!0},polygonEnd:function(){u=b,c=o.merge(c);var n=function(t){for(var n=0,e=l.length,r=t[1],i=0;ir&&qt(c,o,t)>0&&++n:o[1]<=r&&qt(c,o,t)<0&&--n,c=o;return 0!==n}([t,r]),e=m&&n,i=c.length;(e||i)&&(u.polygonStart(),e&&(u.lineStart(),S(null,null,1,u),u.lineEnd()),i&&Je(c,a,n,S,u),u.polygonEnd()),c=l=h=null}};function S(o,a,u,c){var l=0,h=0;if(null==o||(l=i(o,u))!==(h=i(a,u))||s(o,a)<0^u>0)do{c.point(0===l||3===l?t:e,l>1?r:n)}while((l=(l+u+4)%4)!==h);else c.point(a[0],a[1])}function k(i,o){return t<=i&&i<=e&&n<=o&&o<=r}function E(t,n){k(t,n)&&u.point(t,n)}function A(t,n){var e=k(t=Math.max(-1e9,Math.min(1e9,t)),n=Math.max(-1e9,Math.min(1e9,n)));if(l&&h.push([t,n]),x)f=t,p=n,y=e,x=!1,e&&(u.lineStart(),u.point(t,n));else if(e&&v)u.point(t,n);else{var r={a:{x:d,y:g},b:{x:t,y:n}};_(r)?(v||(u.lineStart(),u.point(r.a.x,r.a.y)),u.point(r.b.x,r.b.y),e||u.lineEnd(),m=!1):e&&(u.lineStart(),u.point(t,n),m=!1)}d=t,g=n,v=e}return M};function i(r,i){return _(r[0]-t)0?0:3:_(r[0]-e)0?2:1:_(r[1]-n)0?1:0:i>0?3:2}function a(t,n){return s(t.x,n.x)}function s(t,n){var e=i(t,1),r=i(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}}function cr(t){var n=0,e=Ct/3,r=zr(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*Ct/180,e=t[1]*Ct/180):[n/Ct*180,e/Ct*180]},i}function lr(t,n){var e=Math.sin(t),r=(e+Math.sin(n))/2,i=1+e*(2*r-e),o=Math.sqrt(i)/r;function a(t,n){var e=Math.sqrt(i-2*r*Math.sin(n))/r;return[e*Math.sin(t*=r),o-e*Math.cos(t)]}return a.invert=function(t,n){var e=o-n;return[Math.atan2(t,e)/r,jt((i-(t*t+e*e)*r*r)/(2*r))]},a}o.geo.clipExtent=function(){var t,n,e,r,i,o,a={stream:function(t){return i&&(i.valid=!1),(i=o(t)).valid=!0,i},extent:function(s){return arguments.length?(o=ur(t=+s[0][0],n=+s[0][1],e=+s[1][0],r=+s[1][1]),i&&(i.valid=!1,i=null),a):[[t,n],[e,r]]}};return a.extent([[0,0],[960,500]])},(o.geo.conicEqualArea=function(){return cr(lr)}).raw=lr,o.geo.albers=function(){return o.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},o.geo.albersUsa=function(){var t,n,e,r,i=o.geo.albers(),a=o.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=o.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(n,e){t=[n,e]}};function c(i){var o=i[0],a=i[1];return t=null,n(o,a),t||(e(o,a),t)||r(o,a),t}return c.invert=function(t){var n=i.scale(),e=i.translate(),r=(t[0]-e[0])/n,o=(t[1]-e[1])/n;return(o>=.12&&o<.234&&r>=-.425&&r<-.214?a:o>=.166&&o<.234&&r>=-.214&&r<-.115?s:i).invert(t)},c.stream=function(t){var n=i.stream(t),e=a.stream(t),r=s.stream(t);return{point:function(t,i){n.point(t,i),e.point(t,i),r.point(t,i)},sphere:function(){n.sphere(),e.sphere(),r.sphere()},lineStart:function(){n.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){n.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){n.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){n.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},c.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),s.precision(t),c):i.precision()},c.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),s.scale(t),c.translate(i.translate())):i.scale()},c.translate=function(t){if(!arguments.length)return i.translate();var o=i.scale(),l=+t[0],h=+t[1];return n=i.translate(t).clipExtent([[l-.455*o,h-.238*o],[l+.455*o,h+.238*o]]).stream(u).point,e=a.translate([l-.307*o,h+.201*o]).clipExtent([[l-.425*o+Lt,h+.12*o+Lt],[l-.214*o-Lt,h+.234*o-Lt]]).stream(u).point,r=s.translate([l-.205*o,h+.212*o]).clipExtent([[l-.214*o+Lt,h+.166*o+Lt],[l-.115*o-Lt,h+.234*o-Lt]]).stream(u).point,c},c.scale(1070)};var hr,fr,pr,yr,dr,gr,vr={point:R,lineStart:R,lineEnd:R,polygonStart:function(){fr=0,vr.lineStart=xr},polygonEnd:function(){vr.lineStart=vr.lineEnd=vr.point=R,hr+=_(fr/2)}};function xr(){var t,n,e,r;function i(t,n){fr+=r*t-e*n,e=t,r=n}vr.point=function(o,a){vr.point=i,t=e=o,n=r=a},vr.lineEnd=function(){i(t,n)}}var mr={point:function(t,n){tdr&&(dr=t);ngr&&(gr=n)},lineStart:R,lineEnd:R,polygonStart:R,polygonEnd:R};function br(){var t=wr(4.5),n=[],e={point:r,lineStart:function(){e.point=i},lineEnd:a,polygonStart:function(){e.lineEnd=s},polygonEnd:function(){e.lineEnd=a,e.point=r},pointRadius:function(n){return t=wr(n),e},result:function(){if(n.length){var t=n.join("");return n=[],t}}};function r(e,r){n.push("M",e,",",r,t)}function i(t,r){n.push("M",t,",",r),e.point=o}function o(t,e){n.push("L",t,",",e)}function a(){e.point=r}function s(){n.push("Z")}return e}function wr(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}var _r,Mr={point:Sr,lineStart:kr,lineEnd:Er,polygonStart:function(){Mr.lineStart=Ar},polygonEnd:function(){Mr.point=Sr,Mr.lineStart=kr,Mr.lineEnd=Er}};function Sr(t,n){Se+=t,ke+=n,++Ee}function kr(){var t,n;function e(e,r){var i=e-t,o=r-n,a=Math.sqrt(i*i+o*o);Ae+=a*(t+e)/2,Le+=a*(n+r)/2,Ne+=a,Sr(t=e,n=r)}Mr.point=function(r,i){Mr.point=e,Sr(t=r,n=i)}}function Er(){Mr.point=Sr}function Ar(){var t,n,e,r;function i(t,n){var i=t-e,o=n-r,a=Math.sqrt(i*i+o*o);Ae+=a*(e+t)/2,Le+=a*(r+n)/2,Ne+=a,Ce+=(a=r*t-e*n)*(e+t),Pe+=a*(r+n),Te+=3*a,Sr(e=t,r=n)}Mr.point=function(o,a){Mr.point=i,Sr(t=e=o,n=r=a)},Mr.lineEnd=function(){i(t,n)}}function Lr(t){var n=4.5,e={point:r,lineStart:function(){e.point=i},lineEnd:a,polygonStart:function(){e.lineEnd=s},polygonEnd:function(){e.lineEnd=a,e.point=r},pointRadius:function(t){return n=t,e},result:R};function r(e,r){t.moveTo(e+n,r),t.arc(e,r,n,0,Pt)}function i(n,r){t.moveTo(n,r),e.point=o}function o(n,e){t.lineTo(n,e)}function a(){e.point=r}function s(){t.closePath()}return e}function Nr(t){var n=.5,e=Math.cos(30*zt),r=16;function i(t){return(r?a:o)(t)}function o(n){return Tr(n,(function(e,r){e=t(e,r),n.point(e[0],e[1])}))}function a(n){var e,i,o,a,u,c,l,h,f,p,y,d,g={point:v,lineStart:x,lineEnd:b,polygonStart:function(){n.polygonStart(),g.lineStart=w},polygonEnd:function(){n.polygonEnd(),g.lineStart=x}};function v(e,r){e=t(e,r),n.point(e[0],e[1])}function x(){h=NaN,g.point=m,n.lineStart()}function m(e,i){var o=Oe([e,i]),a=t(e,i);s(h,f,l,p,y,d,h=a[0],f=a[1],l=e,p=o[0],y=o[1],d=o[2],r,n),n.point(h,f)}function b(){g.point=v,n.lineEnd()}function w(){x(),g.point=_,g.lineEnd=M}function _(t,n){m(e=t,n),i=h,o=f,a=p,u=y,c=d,g.point=m}function M(){s(h,f,l,p,y,d,i,o,e,a,u,c,r,n),g.lineEnd=b,b()}return g}function s(r,i,o,a,u,c,l,h,f,p,y,d,g,v){var x=l-r,m=h-i,b=x*x+m*m;if(b>4*n&&g--){var w=a+p,M=u+y,S=c+d,k=Math.sqrt(w*w+M*M+S*S),E=Math.asin(S/=k),A=_(_(S)-1)n||_((x*P+m*T)/b-.5)>.3||a*p+u*y+c*d0&&16,i):Math.sqrt(n)},i}function Cr(t){var n=Nr((function(n,e){return t([n*Dt,e*Dt])}));return function(t){return Dr(n(t))}}function Pr(t){this.stream=t}function Tr(t,n){return{point:n,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function Ir(t){return zr((function(){return t}))()}function zr(t){var n,e,r,i,a,s,u=Nr((function(t,e){return[(t=n(t,e))[0]*c+i,a-t[1]*c]})),c=150,l=480,h=250,f=0,p=0,y=0,d=0,g=0,v=or,x=z,m=null,b=null;function w(t){return[(t=r(t[0]*zt,t[1]*zt))[0]*c+i,a-t[1]*c]}function _(t){return(t=r.invert((t[0]-i)/c,(a-t[1])/c))&&[t[0]*Dt,t[1]*Dt]}function M(){r=We(e=Rr(y,d,g),n);var t=n(f,p);return i=l-t[0]*c,a=h+t[1]*c,S()}function S(){return s&&(s.valid=!1,s=null),w}return w.stream=function(t){return s&&(s.valid=!1),(s=Dr(v(e,u(x(t))))).valid=!0,s},w.clipAngle=function(t){return arguments.length?(v=null==t?(m=t,or):ar((m=+t)*zt),S()):m},w.clipExtent=function(t){return arguments.length?(b=t,x=t?ur(t[0][0],t[0][1],t[1][0],t[1][1]):z,S()):b},w.scale=function(t){return arguments.length?(c=+t,M()):c},w.translate=function(t){return arguments.length?(l=+t[0],h=+t[1],M()):[l,h]},w.center=function(t){return arguments.length?(f=t[0]%360*zt,p=t[1]%360*zt,M()):[f*Dt,p*Dt]},w.rotate=function(t){return arguments.length?(y=t[0]%360*zt,d=t[1]%360*zt,g=t.length>2?t[2]%360*zt:0,M()):[y*Dt,d*Dt,g*Dt]},o.rebind(w,u,"precision"),function(){return n=t.apply(this,arguments),w.invert=n.invert&&_,M()}}function Dr(t){return Tr(t,(function(n,e){t.point(n*zt,e*zt)}))}function Or(t,n){return[t,n]}function qr(t,n){return[t>Ct?t-Pt:t<-Ct?t+Pt:t,n]}function Rr(t,n,e){return t?n||e?We(Gr(t),Vr(n,e)):Gr(t):n||e?Vr(n,e):qr}function jr(t){return function(n,e){return[(n+=t)>Ct?n-Pt:n<-Ct?n+Pt:n,e]}}function Gr(t){var n=jr(t);return n.invert=jr(-t),n}function Vr(t,n){var e=Math.cos(t),r=Math.sin(t),i=Math.cos(n),o=Math.sin(n);function a(t,n){var a=Math.cos(n),s=Math.cos(t)*a,u=Math.sin(t)*a,c=Math.sin(n),l=c*e+s*r;return[Math.atan2(u*i-l*o,s*e-c*r),jt(l*i+u*o)]}return a.invert=function(t,n){var a=Math.cos(n),s=Math.cos(t)*a,u=Math.sin(t)*a,c=Math.sin(n),l=c*i-u*o;return[Math.atan2(u*i+c*o,s*e+l*r),jt(l*e-s*r)]},a}function Br(t,n){var e=Math.cos(t),r=Math.sin(t);return function(i,o,a,s){var u=a*n;null!=i?(i=Fr(e,i),o=Fr(e,o),(a>0?io)&&(i+=a*Pt)):(i=t+a*Pt,o=t-.5*u);for(var c,l=i;a>0?l>o:l2?t[2]*zt:0),n.invert=function(n){return(n=t.invert(n[0]*zt,n[1]*zt))[0]*=Dt,n[1]*=Dt,n},n},qr.invert=Or,o.geo.circle=function(){var t,n,e=[0,0],r=6;function i(){var t="function"==typeof e?e.apply(this,arguments):e,r=Rr(-t[0]*zt,-t[1]*zt,0).invert,i=[];return n(null,null,1,{point:function(t,n){i.push(t=r(t,n)),t[0]*=Dt,t[1]*=Dt}}),{type:"Polygon",coordinates:[i]}}return i.origin=function(t){return arguments.length?(e=t,i):e},i.angle=function(e){return arguments.length?(n=Br((t=+e)*zt,r*zt),i):t},i.precision=function(e){return arguments.length?(n=Br(t*zt,(r=+e)*zt),i):r},i.angle(90)},o.geo.distance=function(t,n){var e,r=(n[0]-t[0])*zt,i=t[1]*zt,o=n[1]*zt,a=Math.sin(r),s=Math.cos(r),u=Math.sin(i),c=Math.cos(i),l=Math.sin(o),h=Math.cos(o);return Math.atan2(Math.sqrt((e=h*a)*e+(e=c*l-u*h*s)*e),u*l+c*h*s)},o.geo.graticule=function(){var t,n,e,r,i,a,s,u,c,l,h,f,p=10,y=p,d=90,g=360,v=2.5;function x(){return{type:"MultiLineString",coordinates:m()}}function m(){return o.range(Math.ceil(r/d)*d,e,d).map(h).concat(o.range(Math.ceil(u/g)*g,s,g).map(f)).concat(o.range(Math.ceil(n/p)*p,t,p).filter((function(t){return _(t%d)>Lt})).map(c)).concat(o.range(Math.ceil(a/y)*y,i,y).filter((function(t){return _(t%g)>Lt})).map(l))}return x.lines=function(){return m().map((function(t){return{type:"LineString",coordinates:t}}))},x.outline=function(){return{type:"Polygon",coordinates:[h(r).concat(f(s).slice(1),h(e).reverse().slice(1),f(u).reverse().slice(1))]}},x.extent=function(t){return arguments.length?x.majorExtent(t).minorExtent(t):x.minorExtent()},x.majorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],u=+t[0][1],s=+t[1][1],r>e&&(t=r,r=e,e=t),u>s&&(t=u,u=s,s=t),x.precision(v)):[[r,u],[e,s]]},x.minorExtent=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],a=+e[0][1],i=+e[1][1],n>t&&(e=n,n=t,t=e),a>i&&(e=a,a=i,i=e),x.precision(v)):[[n,a],[t,i]]},x.step=function(t){return arguments.length?x.majorStep(t).minorStep(t):x.minorStep()},x.majorStep=function(t){return arguments.length?(d=+t[0],g=+t[1],x):[d,g]},x.minorStep=function(t){return arguments.length?(p=+t[0],y=+t[1],x):[p,y]},x.precision=function(o){return arguments.length?(v=+o,c=Hr(a,i,90),l=Ur(n,t,v),h=Hr(u,s,90),f=Ur(r,e,v),x):v},x.majorExtent([[-180,-90+Lt],[180,90-Lt]]).minorExtent([[-180,-80-Lt],[180,80+Lt]])},o.geo.greatArc=function(){var t,n,e=Xr,r=Zr;function i(){return{type:"LineString",coordinates:[t||e.apply(this,arguments),n||r.apply(this,arguments)]}}return i.distance=function(){return o.geo.distance(t||e.apply(this,arguments),n||r.apply(this,arguments))},i.source=function(n){return arguments.length?(e=n,t="function"==typeof n?null:n,i):e},i.target=function(t){return arguments.length?(r=t,n="function"==typeof t?null:t,i):r},i.precision=function(){return arguments.length?i:0},i},o.geo.interpolate=function(t,n){return e=t[0]*zt,r=t[1]*zt,i=n[0]*zt,o=n[1]*zt,a=Math.cos(r),s=Math.sin(r),u=Math.cos(o),c=Math.sin(o),l=a*Math.cos(e),h=a*Math.sin(e),f=u*Math.cos(i),p=u*Math.sin(i),y=2*Math.asin(Math.sqrt(Vt(o-r)+a*u*Vt(i-e))),d=1/Math.sin(y),(g=y?function(t){var n=Math.sin(t*=y)*d,e=Math.sin(y-t)*d,r=e*l+n*f,i=e*h+n*p,o=e*s+n*c;return[Math.atan2(i,r)*Dt,Math.atan2(o,Math.sqrt(r*r+i*i))*Dt]}:function(){return[e*Dt,r*Dt]}).distance=y,g;var e,r,i,o,a,s,u,c,l,h,f,p,y,d,g},o.geo.length=function(t){return _r=0,o.geo.stream(t,Yr),_r};var Yr={sphere:R,point:R,lineStart:function(){var t,n,e;function r(r,i){var o=Math.sin(i*=zt),a=Math.cos(i),s=_((r*=zt)-t),u=Math.cos(s);_r+=Math.atan2(Math.sqrt((s=a*Math.sin(s))*s+(s=e*o-n*a*u)*s),n*o+e*a*u),t=r,n=o,e=a}Yr.point=function(i,o){t=i*zt,n=Math.sin(o*=zt),e=Math.cos(o),Yr.point=r},Yr.lineEnd=function(){Yr.point=Yr.lineEnd=R}},lineEnd:R,polygonStart:R,polygonEnd:R};function Kr(t,n){function e(n,e){var r=Math.cos(n),i=Math.cos(e),o=t(r*i);return[o*i*Math.sin(n),o*Math.sin(e)]}return e.invert=function(t,e){var r=Math.sqrt(t*t+e*e),i=n(r),o=Math.sin(i),a=Math.cos(i);return[Math.atan2(t*o,r*a),Math.asin(r&&e*o/r)]},e}var Wr=Kr((function(t){return Math.sqrt(2/(1+t))}),(function(t){return 2*Math.asin(t/2)}));(o.geo.azimuthalEqualArea=function(){return Ir(Wr)}).raw=Wr;var $r=Kr((function(t){var n=Math.acos(t);return n&&n/Math.sin(n)}),z);function Jr(t,n){var e=Math.cos(t),r=function(t){return Math.tan(Ct/4+t/2)},i=t===n?Math.sin(t):Math.log(e/Math.cos(n))/Math.log(r(n)/r(t)),o=e*Math.pow(r(t),i)/i;if(!i)return ni;function a(t,n){o>0?n<-It+Lt&&(n=-It+Lt):n>It-Lt&&(n=It-Lt);var e=o/Math.pow(r(n),i);return[e*Math.sin(i*t),o-e*Math.cos(i*t)]}return a.invert=function(t,n){var e=o-n,r=Ot(i)*Math.sqrt(t*t+e*e);return[Math.atan2(t,e)/i,2*Math.atan(Math.pow(o/r,1/i))-It]},a}function Qr(t,n){var e=Math.cos(t),r=t===n?Math.sin(t):(e-Math.cos(n))/(n-t),i=e/r+t;if(_(r)1&&qt(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function ci(t,n){return t[0]-n[0]||t[1]-n[1]}(o.geo.stereographic=function(){return Ir(ii)}).raw=ii,oi.invert=function(t,n){return[-n,2*Math.atan(Math.exp(t))-It]},(o.geo.transverseMercator=function(){var t=ei(oi),n=t.center,e=t.rotate;return t.center=function(t){return t?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return t?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90])}).raw=oi,o.geom={},o.geom.hull=function(t){var n=ai,e=si;if(arguments.length)return r(t);function r(t){if(t.length<3)return[];var r,i=mn(n),o=mn(e),a=t.length,s=[],u=[];for(r=0;r=0;--r)p.push(t[s[c[r]][2]]);for(r=+h;rLt)s=s.L;else{if(!((i=o-Ai(s,a))>Lt)){r>-Lt?(n=s.P,e=s):i>-Lt?(n=s,e=s.N):n=e=s;break}if(!s.R){n=s;break}s=s.R}var u=_i(t);if(gi.insert(n,u),n||e){if(n===e)return Ti(n),e=_i(n.site),gi.insert(u,e),u.edge=e.edge=Di(n.site,u.site),Pi(n),void Pi(e);if(e){Ti(n),Ti(e);var c=n.site,l=c.x,h=c.y,f=t.x-l,p=t.y-h,y=e.site,d=y.x-l,g=y.y-h,v=2*(f*g-p*d),x=f*f+p*p,m=d*d+g*g,b={x:(g*x-p*m)/v+l,y:(f*m-d*x)/v+h};qi(e.edge,c,y,b),u.edge=Di(c,t,null,b),e.edge=Di(t,y,null,b),Pi(n),Pi(e)}else u.edge=Di(n.site,u.site)}}function Ei(t,n){var e=t.site,r=e.x,i=e.y,o=i-n;if(!o)return r;var a=t.P;if(!a)return-1/0;var s=(e=a.site).x,u=e.y,c=u-n;if(!c)return s;var l=s-r,h=1/o-1/c,f=l/c;return h?(-f+Math.sqrt(f*f-2*h*(l*l/(-2*c)-u+c/2+i-o/2)))/h+r:(r+s)/2}function Ai(t,n){var e=t.N;if(e)return Ei(e,n);var r=t.site;return r.y===n?r.x:1/0}function Li(t){this.site=t,this.edges=[]}function Ni(t,n){return n.angle-t.angle}function Ci(){Gi(this),this.x=this.y=this.arc=this.site=this.cy=null}function Pi(t){var n=t.P,e=t.N;if(n&&e){var r=n.site,i=t.site,o=e.site;if(r!==o){var a=i.x,s=i.y,u=r.x-a,c=r.y-s,l=o.x-a,h=2*(u*(g=o.y-s)-c*l);if(!(h>=-Nt)){var f=u*u+c*c,p=l*l+g*g,y=(g*f-c*p)/h,d=(u*p-l*f)/h,g=d+s,v=bi.pop()||new Ci;v.arc=t,v.site=i,v.x=y+a,v.y=g+Math.sqrt(y*y+d*d),v.cy=g,t.circle=v;for(var x=null,m=xi._;m;)if(v.y=s)return;if(f>y){if(o){if(o.y>=c)return}else o={x:g,y:u};e={x:g,y:c}}else{if(o){if(o.y1)if(f>y){if(o){if(o.y>=c)return}else o={x:(u-i)/r,y:u};e={x:(c-i)/r,y:c}}else{if(o){if(o.y=s)return}else o={x:a,y:r*a+i};e={x:s,y:r*s+i}}else{if(o){if(o.xLt||_(i-e)>Lt)&&(s.splice(a,0,new Ri(Oi(o.site,l,_(r-h)Lt?{x:h,y:_(n-h)Lt?{x:_(e-y)Lt?{x:f,y:_(n-f)Lt?{x:_(e-p)=e&&c.x<=i&&c.y>=r&&c.y<=a?[[e,a],[i,a],[i,r],[e,r]]:[]).point=t[s]})),n}function s(t){return t.map((function(t,n){return{x:Math.round(r(t,n)/Lt)*Lt,y:Math.round(i(t,n)/Lt)*Lt,i:n}}))}return a.links=function(t){return Hi(s(t)).edges.filter((function(t){return t.l&&t.r})).map((function(n){return{source:t[n.l.i],target:t[n.r.i]}}))},a.triangles=function(t){var n=[];return Hi(s(t)).cells.forEach((function(e,r){for(var i,o,a,s,u=e.site,c=e.edges.sort(Ni),l=-1,h=c.length,f=c[h-1].edge,p=f.l===u?f.r:f.l;++lo||h>a||f=w)<<1|n>=b,M=_+4;_o&&(i=n.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(e=e[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:Qi(e,r)})),o=eo.lastIndex;return od&&(d=u.x),u.y>g&&(g=u.y),c.push(u.x),l.push(u.y);else for(h=0;hd&&(d=m),b>g&&(g=b),c.push(m),l.push(b)}var w=d-p,M=g-y;function S(t,n,e,r,i,o,a,s){if(!isNaN(e)&&!isNaN(r))if(t.leaf){var u=t.x,c=t.y;if(null!=u)if(_(u-e)+_(c-r)<.01)k(t,n,e,r,i,o,a,s);else{var l=t.point;t.x=t.y=t.point=null,k(t,l,u,c,i,o,a,s),k(t,n,e,r,i,o,a,s)}else t.x=e,t.y=r,t.point=n}else k(t,n,e,r,i,o,a,s)}function k(t,n,e,r,i,o,a,s){var u=.5*(i+a),c=.5*(o+s),l=e>=u,h=r>=c,f=h<<1|l;t.leaf=!1,l?i=u:a=u,h?o=c:s=c,S(t=t.nodes[f]||(t.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null}),n,e,r,i,o,a,s)}w>M?g=y+w:d=p+M;var E={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){S(E,t,+v(t,++h),+x(t,h),p,y,d,g)},visit:function(t){Ki(t,E,p,y,d,g)},find:function(t){return Wi(E,t[0],t[1],p,y,d,g)}};if(h=-1,null==n){for(;++h=0&&!(e=o.interpolators[r](t,n)););return e}function io(t,n){var e,r=[],i=[],o=t.length,a=n.length,s=Math.min(t.length,n.length);for(e=0;e=1?1:t(n)}}function co(t){return function(n){return 1-t(1-n)}}function lo(t){return function(n){return.5*(n<.5?t(2*n):2-t(2-2*n))}}function ho(t){return t*t}function fo(t){return t*t*t}function po(t){if(t<=0)return 0;if(t>=1)return 1;var n=t*t,e=n*t;return 4*(t<.5?e:3*(t-n)+e-.75)}function yo(t){return 1-Math.cos(t*It)}function go(t){return Math.pow(2,10*(t-1))}function vo(t){return 1-Math.sqrt(1-t*t)}function xo(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function mo(t,n){return n-=t,function(e){return Math.round(t+n*e)}}function bo(t){var n,e,r,i=[t.a,t.b],o=[t.c,t.d],a=_o(i),s=wo(i,o),u=_o(((n=o)[0]+=(r=-s)*(e=i)[0],n[1]+=r*e[1],n))||0;i[0]*o[1]=0?t.slice(0,n):t,r=n>=0?t.slice(n+1):"in";return e=ao.get(e)||oo,uo((r=so.get(r)||z)(e.apply(null,a.call(arguments,1))))},o.interpolateHcl=function(t,n){t=o.hcl(t),n=o.hcl(n);var e=t.h,r=t.c,i=t.l,a=n.h-e,s=n.c-r,u=n.l-i;isNaN(s)&&(s=0,r=isNaN(r)?n.c:r);isNaN(a)?(a=0,e=isNaN(e)?n.h:e):a>180?a-=360:a<-180&&(a+=360);return function(t){return Jt(e+a*t,r+s*t,i+u*t)+""}},o.interpolateHsl=function(t,n){t=o.hsl(t),n=o.hsl(n);var e=t.h,r=t.s,i=t.l,a=n.h-e,s=n.s-r,u=n.l-i;isNaN(s)&&(s=0,r=isNaN(r)?n.s:r);isNaN(a)?(a=0,e=isNaN(e)?n.h:e):a>180?a-=360:a<-180&&(a+=360);return function(t){return Kt(e+a*t,r+s*t,i+u*t)+""}},o.interpolateLab=function(t,n){t=o.lab(t),n=o.lab(n);var e=t.l,r=t.a,i=t.b,a=n.l-e,s=n.a-r,u=n.b-i;return function(t){return en(e+a*t,r+s*t,i+u*t)+""}},o.interpolateRound=mo,o.transform=function(t){var n=u.createElementNS(o.ns.prefix.svg,"g");return(o.transform=function(t){if(null!=t){n.setAttribute("transform",t);var e=n.transform.baseVal.consolidate()}return new bo(e?e.matrix:Mo)})(t)},bo.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Mo={a:1,b:0,c:0,d:1,e:0,f:0};function So(t){return t.length?t.pop()+",":""}function ko(t,n){var e=[],r=[];return t=o.transform(t),n=o.transform(n),function(t,n,e,r){if(t[0]!==n[0]||t[1]!==n[1]){var i=e.push("translate(",null,",",null,")");r.push({i:i-4,x:Qi(t[0],n[0])},{i:i-2,x:Qi(t[1],n[1])})}else(n[0]||n[1])&&e.push("translate("+n+")")}(t.translate,n.translate,e,r),function(t,n,e,r){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),r.push({i:e.push(So(e)+"rotate(",null,")")-2,x:Qi(t,n)})):n&&e.push(So(e)+"rotate("+n+")")}(t.rotate,n.rotate,e,r),function(t,n,e,r){t!==n?r.push({i:e.push(So(e)+"skewX(",null,")")-2,x:Qi(t,n)}):n&&e.push(So(e)+"skewX("+n+")")}(t.skew,n.skew,e,r),function(t,n,e,r){if(t[0]!==n[0]||t[1]!==n[1]){var i=e.push(So(e)+"scale(",null,",",null,")");r.push({i:i-4,x:Qi(t[0],n[0])},{i:i-2,x:Qi(t[1],n[1])})}else 1===n[0]&&1===n[1]||e.push(So(e)+"scale("+n+")")}(t.scale,n.scale,e,r),t=n=null,function(t){for(var n,i=-1,o=r.length;++i0?e=n:(t.c=null,t.t=NaN,t=null,u.end({type:"end",alpha:e=0})):n>0&&(u.start({type:"start",alpha:e=n}),t=An(s.tick)),s):e},s.start=function(){var t,n,e,o=v.length,u=x.length,l=c[0],y=c[1];for(t=0;t=0;)e.push(i[r])}function jo(t,n){for(var e=[t],r=[];null!=(t=e.pop());)if(r.push(t),(o=t.children)&&(i=o.length))for(var i,o,a=-1;++a=0;)a.push(l=c[u]),l.parent=o,l.depth=o.depth+1;e&&(o.value=0),o.children=c}else e&&(o.value=+e.call(r,o,o.depth)||0),delete o.children;return jo(i,(function(n){var r,i;t&&(r=n.children)&&r.sort(t),e&&(i=n.parent)&&(i.value+=n.value)})),s}return r.sort=function(n){return arguments.length?(t=n,r):t},r.children=function(t){return arguments.length?(n=t,r):n},r.value=function(t){return arguments.length?(e=t,r):e},r.revalue=function(t){return e&&(Ro(t,(function(t){t.children&&(t.value=0)})),jo(t,(function(t){var n;t.children||(t.value=+e.call(r,t,t.depth)||0),(n=t.parent)&&(n.value+=t.value)}))),t},r},o.layout.partition=function(){var t=o.layout.hierarchy(),n=[1,1];function e(e,r){var i=t.call(this,e,r);return function t(n,e,r,i){var o=n.children;if(n.x=e,n.y=n.depth*i,n.dx=r,n.dy=i,o&&(a=o.length)){var a,s,u,c=-1;for(r=n.value?r/n.value:0;++cs&&(s=r),a.push(r)}for(e=0;ei&&(r=e,i=n);return r}function Qo(t){return t.reduce(ta,0)}function ta(t,n){return t+n[1]}function na(t,n){return ea(t,Math.ceil(Math.log(n.length)/Math.LN2+1))}function ea(t,n){for(var e=-1,r=+t[0],i=(t[1]-r)/n,o=[];++e<=n;)o[e]=i*e+r;return o}function ra(t){return[o.min(t),o.max(t)]}function ia(t,n){return t.value-n.value}function oa(t,n){var e=t._pack_next;t._pack_next=n,n._pack_prev=t,n._pack_next=e,e._pack_prev=n}function aa(t,n){t._pack_next=n,n._pack_prev=t}function sa(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r+n.r;return.999*i*i>e*e+r*r}function ua(t){if((n=t.children)&&(u=n.length)){var n,e,r,i,o,a,s,u,c=1/0,l=-1/0,h=1/0,f=-1/0;if(n.forEach(ca),(e=n[0]).x=-e.r,e.y=0,m(e),u>1&&((r=n[1]).x=r.r,r.y=0,m(r),u>2))for(ha(e,r,i=n[2]),m(i),oa(e,i),e._pack_prev=i,oa(i,r),r=e._pack_next,o=3;o0)for(a=-1;++a=h[0]&&u<=h[1]&&((s=c[o.bisect(f,u,1,y)-1]).y+=d,s.push(i[a]));return c}return i.value=function(t){return arguments.length?(n=t,i):n},i.range=function(t){return arguments.length?(e=mn(t),i):e},i.bins=function(t){return arguments.length?(r="number"==typeof t?function(n){return ea(n,t)}:mn(t),i):r},i.frequency=function(n){return arguments.length?(t=!!n,i):t},i},o.layout.pack=function(){var t,n=o.layout.hierarchy().sort(ia),e=0,r=[1,1];function i(i,o){var a=n.call(this,i,o),s=a[0],u=r[0],c=r[1],l=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,jo(s,(function(t){t.r=+l(t.value)})),jo(s,ua),e){var h=e*(t?1:Math.max(2*s.r/u,2*s.r/c))/2;jo(s,(function(t){t.r+=h})),jo(s,ua),jo(s,(function(t){t.r-=h}))}return function t(n,e,r,i){var o=n.children;if(n.x=e+=i*n.x,n.y=r+=i*n.y,n.r*=i,o)for(var a=-1,s=o.length;++ap.x&&(p=t),t.depth>y.depth&&(y=t)}));var d=n(f,p)/2-f.x,g=e[0]/(p.x+n(p,f)/2+d),v=e[1]/(y.depth||1);Ro(l,(function(t){t.x=(t.x+d)*g,t.y=t.depth*v}))}return c}function a(t){var e=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(e.length){!function(t){var n,e=0,r=0,i=t.children,o=i.length;for(;--o>=0;)(n=i[o]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(t);var o=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+n(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+n(t._,i._));t.parent.A=function(t,e,r){if(e){for(var i,o=t,a=t,s=e,u=o.parent.children[0],c=o.m,l=a.m,h=s.m,f=u.m;s=ya(s),o=pa(o),s&&o;)u=pa(u),(a=ya(a)).a=t,(i=s.z+h-o.z-c+n(s._,o._))>0&&(da(ga(s,t,r),t,i),c+=i,l+=i),h+=s.m,c+=o.m,f+=u.m,l+=a.m;s&&!ya(a)&&(a.t=s,a.m+=h-l),o&&!pa(u)&&(u.t=o,u.m+=c-f,r=t)}return r}(t,i,t.parent.A||r[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function u(t){t.x*=e[0],t.y=t.depth*e[1]}return i.separation=function(t){return arguments.length?(n=t,i):n},i.size=function(t){return arguments.length?(r=null==(e=t)?u:null,i):r?null:e},i.nodeSize=function(t){return arguments.length?(r=null==(e=t)?null:u,i):r?e:null},qo(i,t)},o.layout.cluster=function(){var t=o.layout.hierarchy().sort(null).value(null),n=fa,e=[1,1],r=!1;function i(i,a){var s,u=t.call(this,i,a),c=u[0],l=0;jo(c,(function(t){var e=t.children;e&&e.length?(t.x=function(t){return t.reduce((function(t,n){return t+n.x}),0)/t.length}(e),t.y=function(t){return 1+o.max(t,(function(t){return t.y}))}(e)):(t.x=s?l+=n(t,s):0,t.y=0,s=t)}));var h=function t(n){var e=n.children;return e&&e.length?t(e[0]):n}(c),f=function t(n){var e,r=n.children;return r&&(e=r.length)?t(r[e-1]):n}(c),p=h.x-n(h,f)/2,y=f.x+n(f,h)/2;return jo(c,r?function(t){t.x=(t.x-c.x)*e[0],t.y=(c.y-t.y)*e[1]}:function(t){t.x=(t.x-p)/(y-p)*e[0],t.y=(1-(c.y?t.y/c.y:1))*e[1]}),u}return i.separation=function(t){return arguments.length?(n=t,i):n},i.size=function(t){return arguments.length?(r=null==(e=t),i):r?null:e},i.nodeSize=function(t){return arguments.length?(r=null!=(e=t),i):r?e:null},qo(i,t)},o.layout.treemap=function(){var t,n=o.layout.hierarchy(),e=Math.round,r=[1,1],i=null,a=va,s=!1,u="squarify",c=.5*(1+Math.sqrt(5));function l(t,n){for(var e,r,i=-1,o=t.length;++i0;)s.push(e=c[i-1]),s.area+=e.area,"squarify"!==u||(r=p(s,d))<=f?(c.pop(),f=r):(s.area-=s.pop().area,y(s,d,o,!1),d=Math.min(o.dx,o.dy),s.length=s.area=0,f=1/0);s.length&&(y(s,d,o,!0),s.length=s.area=0),n.forEach(h)}}function f(t){var n=t.children;if(n&&n.length){var e,r=a(t),i=n.slice(),o=[];for(l(i,r.dx*r.dy/t.value),o.area=0;e=i.pop();)o.push(e),o.area+=e.area,null!=e.z&&(y(o,e.z?r.dx:r.dy,r,!i.length),o.length=o.area=0);n.forEach(f)}}function p(t,n){for(var e,r=t.area,i=0,o=1/0,a=-1,s=t.length;++ai&&(i=e));return n*=n,(r*=r)?Math.max(n*i*c/r,r/(n*o*c)):1/0}function y(t,n,r,i){var o,a=-1,s=t.length,u=r.x,c=r.y,l=n?e(t.area/n):0;if(n==r.dx){for((i||l>r.dy)&&(l=r.dy);++ar.dx)&&(l=r.dx);++a1);return t+n*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=o.random.normal.apply(o,arguments);return function(){return Math.exp(t())}},bates:function(t){var n=o.random.irwinHall(t);return function(){return n()/t}},irwinHall:function(t){return function(){for(var n=0,e=0;e2?ka:wa,s=i?Ao:Eo;return o=t(n,e,s,r),a=t(e,n,s,ro),u}function u(t){return o(t)}return u.invert=function(t){return a(t)},u.domain=function(t){return arguments.length?(n=t.map(Number),s()):n},u.range=function(t){return arguments.length?(e=t,s()):e},u.rangeRound=function(t){return u.range(t).interpolate(mo)},u.clamp=function(t){return arguments.length?(i=t,s()):i},u.interpolate=function(t){return arguments.length?(r=t,s()):r},u.ticks=function(t){return Na(n,t)},u.tickFormat=function(t,e){return Ca(n,t,e)},u.nice=function(t){return Aa(n,t),s()},u.copy=function(){return t(n,e,r,i)},s()}([0,1],[0,1],ro,!1)};var Pa={s:1,g:1,p:1,r:1,e:1};function Ta(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}o.scale.log=function(){return function t(n,e,r,i){function a(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function s(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function u(t){return n(a(t))}return u.invert=function(t){return s(n.invert(t))},u.domain=function(t){return arguments.length?(r=t[0]>=0,n.domain((i=t.map(Number)).map(a)),u):i},u.base=function(t){return arguments.length?(e=+t,n.domain(i.map(a)),u):e},u.nice=function(){var t=_a(i.map(a),r?Math:za);return n.domain(t),i=t.map(s),u},u.ticks=function(){var t=ma(i),n=[],o=t[0],u=t[1],c=Math.floor(a(o)),l=Math.ceil(a(u)),h=e%1?2:e;if(isFinite(l-c)){if(r){for(;c0;f--)n.push(s(c)*f);for(c=0;n[c]u;l--);n=n.slice(c,l)}return n},u.tickFormat=function(t,n){if(!arguments.length)return Ia;arguments.length<2?n=Ia:"function"!=typeof n&&(n=o.format(n));var r=Math.max(1,e*t/u.ticks().length);return function(t){var i=t/s(Math.round(a(t)));return i*e0?r[t-1]:n[0],th?0:1;if(c=Tt)return u(c,p)+(s?u(s,1-p):"")+"Z";var y,d,g,v,x,m,b,w,_,M,S,k,E=0,A=0,L=[];if((v=(+a.apply(this,arguments)||0)/2)&&(g=r===Va?Math.sqrt(s*s+c*c):+r.apply(this,arguments),p||(A*=-1),c&&(A=jt(g/c*Math.sin(v))),s&&(E=jt(g/s*Math.sin(v)))),c){x=c*Math.cos(l+A),m=c*Math.sin(l+A),b=c*Math.cos(h-A),w=c*Math.sin(h-A);var N=Math.abs(h-l-2*A)<=Ct?0:1;if(A&&Za(x,m,b,w)===p^N){var C=(l+h)/2;x=c*Math.cos(C),m=c*Math.sin(C),b=w=null}}else x=m=0;if(s){_=s*Math.cos(h-E),M=s*Math.sin(h-E),S=s*Math.cos(l+E),k=s*Math.sin(l+E);var P=Math.abs(l-h+2*E)<=Ct?0:1;if(E&&Za(_,M,S,k)===1-p^P){var T=(l+h)/2;_=s*Math.cos(T),M=s*Math.sin(T),S=k=null}}else _=M=0;if(f>Lt&&(y=Math.min(Math.abs(c-s)/2,+e.apply(this,arguments)))>.001){d=s0?0:1}function Ya(t,n,e,r,i){var o=t[0]-n[0],a=t[1]-n[1],s=(i?r:-r)/Math.sqrt(o*o+a*a),u=s*a,c=-s*o,l=t[0]+u,h=t[1]+c,f=n[0]+u,p=n[1]+c,y=(l+f)/2,d=(h+p)/2,g=f-l,v=p-h,x=g*g+v*v,m=e-r,b=l*p-f*h,w=(v<0?-1:1)*Math.sqrt(Math.max(0,m*m*x-b*b)),_=(b*v-g*w)/x,M=(-b*g-v*w)/x,S=(b*v+g*w)/x,k=(-b*g+v*w)/x,E=_-y,A=M-d,L=S-y,N=k-d;return E*E+A*A>L*L+N*N&&(_=S,M=k),[[_-u,M-c],[_*e/m,M*e/m]]}function Ka(t){var n=ai,e=si,r=$e,i=$a,o=i.key,a=.7;function s(o){var s,u=[],c=[],l=-1,h=o.length,f=mn(n),p=mn(e);function y(){u.push("M",i(t(c),a))}for(;++l1&&i.push("H",r[0]);return i.join("")},"step-before":Qa,"step-after":ts,basis:rs,"basis-open":function(t){if(t.length<4)return $a(t);var n,e=[],r=-1,i=t.length,o=[0],a=[0];for(;++r<3;)n=t[r],o.push(n[0]),a.push(n[1]);e.push(is(ss,o)+","+is(ss,a)),--r;for(;++r9&&(i=3*n/Math.sqrt(i),a[s]=i*e,a[s+1]=i*r));s=-1;for(;++s<=u;)i=(t[Math.min(u,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}(t))}});function $a(t){return t.length>1?t.join("L"):t+"Z"}function Ja(t){return t.join("L")+"Z"}function Qa(t){for(var n=0,e=t.length,r=t[0],i=[r[0],",",r[1]];++n1){s=n[1],o=t[u],u++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var c=2;cCt)+",1 "+n}function u(t,n,e,r){return"Q 0,0 "+r}return o.radius=function(t){return arguments.length?(e=mn(t),o):e},o.source=function(n){return arguments.length?(t=mn(n),o):t},o.target=function(t){return arguments.length?(n=mn(t),o):n},o.startAngle=function(t){return arguments.length?(r=mn(t),o):r},o.endAngle=function(t){return arguments.length?(i=mn(t),o):i},o},o.svg.diagonal=function(){var t=Xr,n=Zr,e=ps;function r(r,i){var o=t.call(this,r,i),a=n.call(this,r,i),s=(o.y+a.y)/2,u=[o,{x:o.x,y:s},{x:a.x,y:s},a];return"M"+(u=u.map(e))[0]+"C"+u[1]+" "+u[2]+" "+u[3]}return r.source=function(n){return arguments.length?(t=mn(n),r):t},r.target=function(t){return arguments.length?(n=mn(t),r):n},r.projection=function(t){return arguments.length?(e=t,r):e},r},o.svg.diagonal.radial=function(){var t=o.svg.diagonal(),n=ps,e=t.projection;return t.projection=function(t){return arguments.length?e(ys(n=t)):n},t},o.svg.symbol=function(){var t=gs,n=ds;function e(e,r){return(xs.get(t.call(this,e,r))||vs)(n.call(this,e,r))}return e.type=function(n){return arguments.length?(t=mn(n),e):t},e.size=function(t){return arguments.length?(n=mn(t),e):n},e};var xs=o.map({circle:vs,cross:function(t){var n=Math.sqrt(t/5)/2;return"M"+-3*n+","+-n+"H"+-n+"V"+-3*n+"H"+n+"V"+-n+"H"+3*n+"V"+n+"H"+n+"V"+3*n+"H"+-n+"V"+n+"H"+-3*n+"Z"},diamond:function(t){var n=Math.sqrt(t/(2*bs)),e=n*bs;return"M0,"+-n+"L"+e+",0 0,"+n+" "+-e+",0Z"},square:function(t){var n=Math.sqrt(t)/2;return"M"+-n+","+-n+"L"+n+","+-n+" "+n+","+n+" "+-n+","+n+"Z"},"triangle-down":function(t){var n=Math.sqrt(t/ms),e=n*ms/2;return"M0,"+e+"L"+n+","+-e+" "+-n+","+-e+"Z"},"triangle-up":function(t){var n=Math.sqrt(t/ms),e=n*ms/2;return"M0,"+-e+"L"+n+","+e+" "+-n+","+e+"Z"}});o.svg.symbolTypes=xs.keys();var ms=Math.sqrt(3),bs=Math.tan(30*zt);W.transition=function(t){for(var n,e,r=Ss||++As,i=Cs(t),o=[],a=ks||{time:Date.now(),ease:po,delay:0,duration:250},s=-1,u=this.length;++s0;)c[--f].call(t,a);if(o>=1)return h.event&&h.event.end.call(t,t.__data__,n),--l.count?delete l[r]:delete t[e],1}h||(o=i.time,a=An((function(t){var n=h.delay;if(a.t=n+o,n<=t)return f(t-n);a.c=f}),0,o),h=l[r]={tween:new k,time:o,timer:a,delay:i.delay,duration:i.duration,ease:i.ease,index:n},i=null,++l.count)}Es.call=W.call,Es.empty=W.empty,Es.node=W.node,Es.size=W.size,o.transition=function(t,n){return t&&t.transition?Ss?t.transition(n):t:o.selection().transition(t)},o.transition.prototype=Es,Es.select=function(t){var n,e,r,i=this.id,o=this.namespace,a=[];t=$(t);for(var s=-1,u=this.length;++srect,.s>rect").attr("width",a[1]-a[0])}function d(t){t.select(".extent").attr("y",s[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function g(){var h,g,v=this,x=o.select(o.event.target),m=e.of(v,arguments),b=o.select(v),w=x.datum(),_=!/^(n|s)$/.test(w)&&r,M=!/^(e|w)$/.test(w)&&i,S=x.classed("extent"),k=St(v),E=o.mouse(v),A=o.select(l(v)).on("keydown.brush",C).on("keyup.brush",P);if(o.event.changedTouches?A.on("touchmove.brush",T).on("touchend.brush",z):A.on("mousemove.brush",T).on("mouseup.brush",z),b.interrupt().selectAll("*").interrupt(),S)E[0]=a[0]-E[0],E[1]=s[0]-E[1];else if(w){var L=+/w$/.test(w),N=+/^n/.test(w);g=[a[1-L]-E[0],s[1-N]-E[1]],E[0]=a[L],E[1]=s[N]}else o.event.altKey&&(h=E.slice());function C(){32==o.event.keyCode&&(S||(h=null,E[0]-=a[1],E[1]-=s[1],S=2),V())}function P(){32==o.event.keyCode&&2==S&&(E[0]+=a[1],E[1]+=s[1],S=0,V())}function T(){var t=o.mouse(v),n=!1;g&&(t[0]+=g[0],t[1]+=g[1]),S||(o.event.altKey?(h||(h=[(a[0]+a[1])/2,(s[0]+s[1])/2]),E[0]=a[+(t[0]1?{floor:function(n){for(;s(n=t.floor(n));)n=Fs(n-1);return n},ceil:function(n){for(;s(n=t.ceil(n));)n=Fs(+n+1);return n}}:t))},r.ticks=function(t,n){var e=ma(r.domain()),o=null==t?i(e,10):"number"==typeof t?i(e,t):!t.range&&[{range:t},n];return o&&(t=o[0],n=o[1]),t.range(e[0],Fs(+e[1]+1),n<1?1:n)},r.tickFormat=function(){return e},r.copy=function(){return Bs(t.copy(),n,e)},Ea(r,t)}function Fs(t){return new Date(t)}Rs.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Vs:Gs,Vs.parse=function(t){var n=new Date(t);return isNaN(n)?null:n},Vs.toString=Gs.toString,qn.second=Vn((function(t){return new Rn(1e3*Math.floor(t/1e3))}),(function(t,n){t.setTime(t.getTime()+1e3*Math.floor(n))}),(function(t){return t.getSeconds()})),qn.seconds=qn.second.range,qn.seconds.utc=qn.second.utc.range,qn.minute=Vn((function(t){return new Rn(6e4*Math.floor(t/6e4))}),(function(t,n){t.setTime(t.getTime()+6e4*Math.floor(n))}),(function(t){return t.getMinutes()})),qn.minutes=qn.minute.range,qn.minutes.utc=qn.minute.utc.range,qn.hour=Vn((function(t){var n=t.getTimezoneOffset()/60;return new Rn(36e5*(Math.floor(t/36e5-n)+n))}),(function(t,n){t.setTime(t.getTime()+36e5*Math.floor(n))}),(function(t){return t.getHours()})),qn.hours=qn.hour.range,qn.hours.utc=qn.hour.utc.range,qn.month=Vn((function(t){return(t=qn.day(t)).setDate(1),t}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t){return t.getMonth()})),qn.months=qn.month.range,qn.months.utc=qn.month.utc.range;var Hs=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Us=[[qn.second,1],[qn.second,5],[qn.second,15],[qn.second,30],[qn.minute,1],[qn.minute,5],[qn.minute,15],[qn.minute,30],[qn.hour,1],[qn.hour,3],[qn.hour,6],[qn.hour,12],[qn.day,1],[qn.day,2],[qn.week,1],[qn.month,1],[qn.month,3],[qn.year,1]],Xs=Rs.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",$e]]),Zs={range:function(t,n,e){return o.range(Math.ceil(t/e)*e,+n,e).map(Fs)},floor:z,ceil:z};Us.year=qn.year,qn.scale=function(){return Bs(o.scale.linear(),Us,Xs)};var Ys=Us.map((function(t){return[t[0].utc,t[1]]})),Ks=js.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",$e]]);function Ws(t){return JSON.parse(t.responseText)}function $s(t){var n=u.createRange();return n.selectNode(u.body),n.createContextualFragment(t.responseText)}Ys.year=qn.year.utc,qn.scale.utc=function(){return Bs(o.scale.linear(),Ys,Ks)},o.text=bn((function(t){return t.responseText})),o.json=function(t,n){return wn(t,"application/json",Ws,n)},o.html=function(t,n){return wn(t,"text/html",$s,n)},o.xml=bn((function(t){return t.responseXML})),this.d3=o,void 0===(i="function"==typeof(r=o)?r.call(n,e,n,t):r)||(t.exports=i)}()},function(t,n){function e(t,n){this.x=t||0,this.y=n||0,Object.freeze(this)}e.prototype.distance=function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},e.prototype.manhattanDistance=function(t){var n=this.sub(t).abs();return n.x+n.y},e.prototype.abs=function(){return new e(Math.abs(this.x),Math.abs(this.y))},e.prototype.equals=function(t){return this.x===t.x&&this.y===t.y},e.prototype.add=function(t){return new e(this.x+t.x,this.y+t.y)},e.prototype.sub=function(t){return new e(this.x-t.x,this.y-t.y)},t.exports=e},function(t,n,e){var r=e(1);function i(t){arguments.length>0&&this.init(t)}i.prototype.init=function(t){this.status=t,this.points=new Array},i.prototype.appendPoint=function(t){this.points.push(t)},i.prototype.appendPoints=function(t){this.points=this.points.concat(t)},i.intersectShapes=function(t,n){var e,r=t.getIntersectionParams(),o=n.getIntersectionParams();if(null!=r&&null!=o)if("Path"==r.name)e=i.intersectPathShape(t,n);else if("Path"==o.name)e=i.intersectPathShape(n,t);else{var a,s;if(r.name0&&N.length>0){t:for(var C=0;C0&&(v.status="Intersection"),v},i.intersectBezier2Bezier3=function(t,n,e,o,a,s,u){var c,l,h,f,p,y,d,g,v,x,m,b=new i("No Intersection");c=n.multiply(-2),p=t.add(c.add(e)),c=t.multiply(-2),l=n.multiply(2),y=c.add(l),d=new r(t.x,t.y),c=o.multiply(-1),l=a.multiply(3),h=s.multiply(-3),f=c.add(l.add(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k*x.y+2*m.x*x.x*E-S*p.x*x.x-M*p.y*x.y+2*k*m.y*x.y,-2*d.x*d.y*p.x*p.y-d.x*y.x*y.y*p.y-d.y*y.x*y.y*p.x+2*d.x*p.x*m.y*p.y+2*d.y*m.x*p.x*p.y+y.x*m.x*y.y*p.y+y.x*y.y*p.x*m.y-2*m.x*p.x*m.y*p.y-2*d.x*m.x*E+d.x*S*p.x+d.y*M*p.y-2*d.y*k*m.y-m.x*S*p.x-M*m.y*p.y+w*E+_*k+A*E+k*L).getRootsInInterval(0,1),O=0;O0&&j.length>0){t:for(var G=0;G0&&(b.status="Intersection"),b},i.intersectBezier2Circle=function(t,n,e,r,o){return i.intersectBezier2Ellipse(t,n,e,r,o,o)},i.intersectBezier2Ellipse=function(t,n,e,o,a,s){var u,c,l,h,f,p=new i("No Intersection");u=n.multiply(-2),l=t.add(u.add(e)),u=t.multiply(-2),c=n.multiply(2),h=u.add(c),f=new r(t.x,t.y);for(var y=a*a,d=s*s,g=new Polynomial(d*l.x*l.x+y*l.y*l.y,2*(d*l.x*h.x+y*l.y*h.y),d*(2*l.x*f.x+h.x*h.x)+y*(2*l.y*f.y+h.y*h.y)-2*(d*o.x*l.x+y*o.y*l.y),2*(d*h.x*(f.x-o.x)+y*h.y*(f.y-o.y)),d*(f.x*f.x+o.x*o.x)+y*(f.y*f.y+o.y*o.y)-2*(d*o.x*f.x+y*o.y*f.y)-y*d).getRoots(),v=0;v0&&(p.status="Intersection"),p},i.intersectBezier2Line=function(t,n,e,o,a){var s,u,c,l,h,f,p,y=o.min(a),d=o.max(a),g=new i("No Intersection");s=n.multiply(-2),c=t.add(s.add(e)),s=t.multiply(-2),u=n.multiply(2),l=s.add(u),h=new r(t.x,t.y),p=new Vector2D(o.y-a.y,a.x-o.x),f=o.x*a.y-a.x*o.y,roots=new Polynomial(p.dot(c),p.dot(l),p.dot(h)+f).getRoots();for(var v=0;v0&&(o.status="Intersection"),o},i.intersectBezier2Rectangle=function(t,n,e,o,a){var s=o.min(a),u=o.max(a),c=new r(u.x,s.y),l=new r(s.x,u.y),h=i.intersectBezier2Line(t,n,e,s,c),f=i.intersectBezier2Line(t,n,e,c,u),p=i.intersectBezier2Line(t,n,e,u,l),y=i.intersectBezier2Line(t,n,e,l,s),d=new i("No Intersection");return d.appendPoints(h.points),d.appendPoints(f.points),d.appendPoints(p.points),d.appendPoints(y.points),d.points.length>0&&(d.status="Intersection"),d},i.intersectBezier3Bezier3=function(t,n,e,r,o,a,s,u){var c,l,h,f,p,y,d,g,v,x,m,b,w=new i("No Intersection");c=t.multiply(-1),l=n.multiply(3),h=e.multiply(-3),f=c.add(l.add(h.add(r))),p=new Vector2D(f.x,f.y),c=t.multiply(3),l=n.multiply(-6),h=e.multiply(3),f=c.add(l.add(h)),y=new Vector2D(f.x,f.y),c=t.multiply(-3),l=n.multiply(3),h=c.add(l),d=new Vector2D(h.x,h.y),g=new Vector2D(t.x,t.y),c=o.multiply(-1),l=a.multiply(3),h=s.multiply(-3),f=c.add(l.add(h.add(u))),v=new Vector2D(f.x,f.y),c=o.multiply(3),l=a.multiply(-6),h=s.multiply(3),f=c.add(l.add(h)),x=new Vector2D(f.x,f.y),c=o.multiply(-3),l=a.multiply(3),h=c.add(l),m=new Vector2D(h.x,h.y),b=new Vector2D(o.x,o.y);for(var _=g.x*g.x,M=g.x*g.x*g.x,S=g.y*g.y,k=g.y*g.y*g.y,E=d.x*d.x,A=d.x*d.x*d.x,L=d.y*d.y,N=d.y*d.y*d.y,C=y.x*y.x,P=y.x*y.x*y.x,T=y.y*y.y,I=y.y*y.y*y.y,z=p.x*p.x,D=p.x*p.x*p.x,O=p.y*p.y,q=p.y*p.y*p.y,R=b.x*b.x,j=b.x*b.x*b.x,G=b.y*b.y,V=b.y*b.y*b.y,B=m.x*m.x,F=m.x*m.x*m.x,H=m.y*m.y,U=x.x*x.x,X=x.x*x.x*x.x,Z=x.y*x.y,Y=v.x*v.x,K=v.x*v.x*v.x,W=v.y*v.y,$=v.y*v.y*v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y.y*z-S*d.y*y.x*z+E*b.x*d.y*O-3*g.x*G*z*p.y+3*g.y*R*p.x*O+d.x*R*y.y*O-2*d.x*G*y.y*z+b.x*L*C*p.y-d.y*y.x*G*z-_*y.x*T*p.y-3*_*b.y*p.x*O+3*S*b.x*z*p.y+S*C*y.y*p.x-E*b.y*T*p.x+2*R*d.y*y.x*O+3*b.x*G*z*p.y-R*y.x*T*p.y-3*R*b.y*p.x*O+C*G*y.y*p.x).getRootsInInterval(0,1),Q=0;Q0&&et.length>0){t:for(var rt=0;rt0&&(w.status="Intersection"),w},i.intersectBezier3Circle=function(t,n,e,r,o,a){return i.intersectBezier3Ellipse(t,n,e,r,o,a,a)},i.intersectBezier3Ellipse=function(t,n,e,r,o,a,s){var u,c,l,h,f,p,y,d,g=new i("No Intersection");u=t.multiply(-1),c=n.multiply(3),l=e.multiply(-3),h=u.add(c.add(l.add(r))),f=new Vector2D(h.x,h.y),u=t.multiply(3),c=n.multiply(-6),l=e.multiply(3),h=u.add(c.add(l)),p=new Vector2D(h.x,h.y),u=t.multiply(-3),c=n.multiply(3),l=u.add(c),y=new Vector2D(l.x,l.y),d=new Vector2D(t.x,t.y);for(var v=a*a,x=s*s,m=new Polynomial(f.x*f.x*x+f.y*f.y*v,2*(f.x*p.x*x+f.y*p.y*v),2*(f.x*y.x*x+f.y*y.y*v)+p.x*p.x*x+p.y*p.y*v,2*f.x*x*(d.x-o.x)+2*f.y*v*(d.y-o.y)+2*(p.x*y.x*x+p.y*y.y*v),2*p.x*x*(d.x-o.x)+2*p.y*v*(d.y-o.y)+y.x*y.x*x+y.y*y.y*v,2*y.x*x*(d.x-o.x)+2*y.y*v*(d.y-o.y),d.x*d.x*x-2*d.y*o.y*v-2*d.x*o.x*x+d.y*d.y*v+o.x*o.x*x+o.y*o.y*v-v*x).getRootsInInterval(0,1),b=0;b0&&(g.status="Intersection"),g},i.intersectBezier3Line=function(t,n,e,r,o,a){var s,u,c,l,h,f,p,y,d,g,v=o.min(a),x=o.max(a),m=new i("No Intersection");s=t.multiply(-1),u=n.multiply(3),c=e.multiply(-3),l=s.add(u.add(c.add(r))),h=new Vector2D(l.x,l.y),s=t.multiply(3),u=n.multiply(-6),c=e.multiply(3),l=s.add(u.add(c)),f=new Vector2D(l.x,l.y),s=t.multiply(-3),u=n.multiply(3),c=s.add(u),p=new Vector2D(c.x,c.y),y=new Vector2D(t.x,t.y),g=new Vector2D(o.y-a.y,a.x-o.x),d=o.x*a.y-a.x*o.y,roots=new Polynomial(g.dot(h),g.dot(f),g.dot(p),g.dot(y)+d).getRoots();for(var b=0;b0&&(a.status="Intersection"),a},i.intersectBezier3Rectangle=function(t,n,e,o,a,s){var u=a.min(s),c=a.max(s),l=new r(c.x,u.y),h=new r(u.x,c.y),f=i.intersectBezier3Line(t,n,e,o,u,l),p=i.intersectBezier3Line(t,n,e,o,l,c),y=i.intersectBezier3Line(t,n,e,o,c,h),d=i.intersectBezier3Line(t,n,e,o,h,u),g=new i("No Intersection");return g.appendPoints(f.points),g.appendPoints(p.points),g.appendPoints(y.points),g.appendPoints(d.points),g.points.length>0&&(g.status="Intersection"),g},i.intersectCircleCircle=function(t,n,e,o){var a,s=n+o,u=Math.abs(n-o),c=t.distanceFrom(e);if(c>s)a=new i("Outside");else if(c1)&&(h<0||h>1)?o=new i(l<0&&h<0||l>1&&h>1?"Outside":"Inside"):(o=new i("Intersection"),0<=l&&l<=1&&o.points.push(e.lerp(r,l)),0<=h&&h<=1&&o.points.push(e.lerp(r,h)))}return o},i.intersectCirclePolygon=function(t,n,e){for(var r,o=new i("No Intersection"),a=e.length,s=0;s0?o.status="Intersection":o.status=r.status,o},i.intersectCircleRectangle=function(t,n,e,o){var a=e.min(o),s=e.max(o),u=new r(s.x,a.y),c=new r(a.x,s.y),l=i.intersectCircleLine(t,n,a,u),h=i.intersectCircleLine(t,n,u,s),f=i.intersectCircleLine(t,n,s,c),p=i.intersectCircleLine(t,n,c,a),y=new i("No Intersection");return y.appendPoints(l.points),y.appendPoints(h.points),y.appendPoints(f.points),y.appendPoints(p.points),y.points.length>0?y.status="Intersection":y.status=l.status,y},i.intersectEllipseEllipse=function(t,n,e,o,a,s){for(var u=[e*e,0,n*n,-2*e*e*t.x,-2*n*n*t.y,e*e*t.x*t.x+n*n*t.y*t.y-n*n*e*e],c=[s*s,0,a*a,-2*s*s*o.x,-2*a*a*o.y,s*s*o.x*o.x+a*a*o.y*o.y-a*a*s*s],l=i.bezout(u,c).getRoots(),h=.001*(u[0]*u[0]+2*u[1]*u[1]+u[2]*u[2]),f=.001*(c[0]*c[0]+2*c[1]*c[1]+c[2]*c[2]),p=new i("No Intersection"),y=0;y0&&(p.status="Intersection"),p},i.intersectEllipseLine=function(t,n,e,r,o){var a,s=new Vector2D(r.x,r.y),u=Vector2D.fromPoints(r,o),c=new Vector2D(t.x,t.y),l=s.subtract(c),h=new Vector2D(u.x/(n*n),u.y/(e*e)),f=new Vector2D(l.x/(n*n),l.y/(e*e)),p=u.dot(h),y=u.dot(f),d=y*y-p*(t=l.dot(f)-1);if(d<0)a=new i("Outside");else if(d>0){var g=Math.sqrt(d),v=(-y-g)/p,x=(-y+g)/p;(v<0||11&&x>1?"Outside":"Inside"):(a=new i("Intersection"),0<=v&&v<=1&&a.appendPoint(r.lerp(o,v)),0<=x&&x<=1&&a.appendPoint(r.lerp(o,x)))}else{var m=-y/p;0<=m&&m<=1?(a=new i("Intersection")).appendPoint(r.lerp(o,m)):a=new i("Outside")}return a},i.intersectEllipsePolygon=function(t,n,e,r){for(var o=new i("No Intersection"),a=r.length,s=0;s0&&(o.status="Intersection"),o},i.intersectEllipseRectangle=function(t,n,e,o,a){var s=o.min(a),u=o.max(a),c=new r(u.x,s.y),l=new r(s.x,u.y),h=i.intersectEllipseLine(t,n,e,s,c),f=i.intersectEllipseLine(t,n,e,c,u),p=i.intersectEllipseLine(t,n,e,u,l),y=i.intersectEllipseLine(t,n,e,l,s),d=new i("No Intersection");return d.appendPoints(h.points),d.appendPoints(f.points),d.appendPoints(p.points),d.appendPoints(y.points),d.points.length>0&&(d.status="Intersection"),d},i.intersectLineLine=function(t,n,e,o){var a,s=(o.x-e.x)*(t.y-e.y)-(o.y-e.y)*(t.x-e.x),u=(n.x-t.x)*(t.y-e.y)-(n.y-t.y)*(t.x-e.x),c=(o.y-e.y)*(n.x-t.x)-(o.x-e.x)*(n.y-t.y);if(0!=c){var l=s/c,h=u/c;0<=l&&l<=1&&0<=h&&h<=1?(a=new i("Intersection")).points.push(new r(t.x+l*(n.x-t.x),t.y+l*(n.y-t.y))):a=new i("No Intersection")}else a=new i(0==s||0==u?"Coincident":"Parallel");return a},i.intersectLinePolygon=function(t,n,e){for(var r=new i("No Intersection"),o=e.length,a=0;a0&&(r.status="Intersection"),r},i.intersectLineRectangle=function(t,n,e,o){var a=e.min(o),s=e.max(o),u=new r(s.x,a.y),c=new r(a.x,s.y),l=i.intersectLineLine(a,u,t,n),h=i.intersectLineLine(u,s,t,n),f=i.intersectLineLine(s,c,t,n),p=i.intersectLineLine(c,a,t,n),y=new i("No Intersection");return y.appendPoints(l.points),y.appendPoints(h.points),y.appendPoints(f.points),y.appendPoints(p.points),y.points.length>0&&(y.status="Intersection"),y},i.intersectPolygonPolygon=function(t,n){for(var e=new i("No Intersection"),r=t.length,o=0;o0&&(e.status="Intersection"),e},i.intersectPolygonRectangle=function(t,n,e){var o=n.min(e),a=n.max(e),s=new r(a.x,o.y),u=new r(o.x,a.y),c=i.intersectLinePolygon(o,s,t),l=i.intersectLinePolygon(s,a,t),h=i.intersectLinePolygon(a,u,t),f=i.intersectLinePolygon(u,o,t),p=new i("No Intersection");return p.appendPoints(c.points),p.appendPoints(l.points),p.appendPoints(h.points),p.appendPoints(f.points),p.points.length>0&&(p.status="Intersection"),p},i.intersectRayRay=function(t,n,e,o){var a,s=(o.x-e.x)*(t.y-e.y)-(o.y-e.y)*(t.x-e.x),u=(n.x-t.x)*(t.y-e.y)-(n.y-t.y)*(t.x-e.x),c=(o.y-e.y)*(n.x-t.x)-(o.x-e.x)*(n.y-t.y);if(0!=c){var l=s/c;(a=new i("Intersection")).points.push(new r(t.x+l*(n.x-t.x),t.y+l*(n.y-t.y)))}else a=new i(0==s||0==u?"Coincident":"Parallel");return a},i.intersectRectangleRectangle=function(t,n,e,o){var a=t.min(n),s=t.max(n),u=new r(s.x,a.y),c=new r(a.x,s.y),l=i.intersectLineRectangle(a,u,e,o),h=i.intersectLineRectangle(u,s,e,o),f=i.intersectLineRectangle(s,c,e,o),p=i.intersectLineRectangle(c,a,e,o),y=new i("No Intersection");return y.appendPoints(l.points),y.appendPoints(h.points),y.appendPoints(f.points),y.appendPoints(p.points),y.points.length>0&&(y.status="Intersection"),y},i.bezout=function(t,n){var e=t[0]*n[1]-n[0]*t[1],r=t[0]*n[2]-n[0]*t[2],i=t[0]*n[3]-n[0]*t[3],o=t[0]*n[4]-n[0]*t[4],a=t[0]*n[5]-n[0]*t[5],s=t[1]*n[2]-n[1]*t[2],u=t[1]*n[4]-n[1]*t[4],c=t[1]*n[5]-n[1]*t[5],l=t[2]*n[3]-n[2]*t[3],h=t[3]*n[4]-n[3]*t[4],f=t[3]*n[5]-n[3]*t[5],p=c+h,y=u-l;return new Polynomial(e*s-r*r,e*y+i*s-2*r*o,e*p+i*y-o*o-2*r*a,e*f+i*p-2*o*a,i*f-a*a)},t.exports=i},function(t){t.exports=JSON.parse('{"a":"2.0.1"}')},function(t,n,e){var r,i,o,a;function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}a=function(){return function t(n,e,r){function i(a,s){if(!e[a]){if(!n[a]){if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=e[a]={exports:{}};n[a][0].call(c.exports,(function(t){return i(n[a][1][t]||t)}),c,c.exports,t,n,e,r)}return e[a].exports}for(var o=!1,a=0;as;){var u=n[s][a];u>0&&u1e-9)break;var p=this.offsetDir();for(r=0;r1&&y>d||!isFinite(d))for(r=0;r1&&(g=1);var v=d*d,x=2*g*(y-d)/(v*y),m=h*y,b=2*-g/(v*m);for(isFinite(x)||console.log(x),r=0;r0?E-(N+1)*_:E-(N-1)*_;-w0;)for(var i=n;i-- >0;)e(r,i)},t.prototype.matrixApply=function(n){t.mApply(this.k,this.n,n)},t.prototype.computeNextPosition=function(t,n){var e=this;this.computeDerivatives(t);var r=this.computeStepSize(this.g);if(this.stepAndProject(t,n,this.g,r),this.project){this.matrixApply((function(r,i){return e.e[r][i]=t[r][i]-n[r][i]}));var i=this.computeStepSize(this.e);i=Math.max(.2,Math.min(i,1)),this.stepAndProject(t,n,this.e,i)}},t.prototype.run=function(t){for(var n=Number.MAX_VALUE,e=!1;!e&&t-- >0;){var r=this.rungeKutta();e=Math.abs(n/r-1)>16)/this.range},t.prototype.getNextBetween=function(t,n){return t+this.getNext()*(n-t)},t}();e.PseudoRandom=o},{}],8:[function(t,n,e){"use strict";var r,i=this&&this.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,n)},function(t,n){function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(e,"__esModule",{value:!0});var o=t("./rectangle"),a=function(){};e.Point=a;var s=function(t,n,e,r){this.x1=t,this.y1=n,this.x2=e,this.y2=r};e.LineSegment=s;var u=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n}(a);function c(t,n,e){return(n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y)}function l(t,n,e){return c(t,n,e)>0}function h(t,n,e){return c(t,n,e)<0}function f(t,n){var e,r,i,o,a=n.length-1;if(h(t,n[1],n[0])&&!l(t,n[a-1],n[0]))return 0;for(e=0,r=a;;){if(r-e==1)return l(t,n[e],n[r])?e:r;if((o=h(t,n[(i=Math.floor((e+r)/2))+1],n[i]))&&!l(t,n[i-1],n[i]))return i;l(t,n[e+1],n[e])?o||l(t,n[e],n[i])?r=i:e=i:o&&h(t,n[e],n[i])?r=i:e=i}}function p(t,n){var e,r,i,o,a=n.length-1;if(l(t,n[a-1],n[0])&&!h(t,n[1],n[0]))return 0;for(e=0,r=a;;){if(r-e==1)return h(t,n[e],n[r])?e:r;if(o=h(t,n[(i=Math.floor((e+r)/2))+1],n[i]),l(t,n[i-1],n[i])&&!o)return i;h(t,n[e+1],n[e])?o?h(t,n[e],n[i])?r=i:e=i:r=i:o?e=i:l(t,n[e],n[i])?r=i:e=i}}function y(t,n,e,r,i,o){var a,s;s=r(t[a=e(n[0],t)],n);for(var u=!1;!u;){for(u=!0;a===t.length-1&&(a=0),!i(n[s],t[a],t[a+1]);)++a;for(;0===s&&(s=n.length-1),!o(t[a],n[s],n[s-1]);)--s,u=!1}return{t1:a,t2:s}}function d(t,n){return y(t,n,f,p,l,h)}e.PolyPoint=u,e.isLeft=c,e.ConvexHull=function(t){var n,e=t.slice(0).sort((function(t,n){return t.x!==n.x?n.x-t.x:n.y-t.y})),r=t.length,i=e[0].x;for(n=1;n=0&&e[n].x===l;n--);for(s=n+1,n=o;++n<=s;)if(!(c(e[0],e[s],e[n])>=0&&n1&&!(c(a[a.length-2],a[a.length-1],e[n])>0);)a.length-=1;0!=n&&a.push(e[n])}u!=s&&a.push(e[u]);var h=a.length;for(n=s;--n>=o;)if(!(c(e[u],e[o],e[n])>=0&&n>o)){for(;a.length>h&&!(c(a[a.length-2],a[a.length-1],e[n])>0);)a.length-=1;0!=n&&a.push(e[n])}}return a},e.clockwiseRadialSweep=function(t,n,e){n.slice(0).sort((function(n,e){return Math.atan2(n.y-t.y,n.x-t.x)-Math.atan2(e.y-t.y,e.x-t.x)})).forEach(e)},e.tangent_PolyPolyC=y,e.LRtangent_PolyPolyC=function(t,n){var e=d(n,t);return{t1:e.t2,t2:e.t1}},e.RLtangent_PolyPolyC=d,e.LLtangent_PolyPolyC=function(t,n){return y(t,n,p,p,h,h)},e.RRtangent_PolyPolyC=function(t,n){return y(t,n,f,f,l,l)};var g=function(t,n){this.t1=t,this.t2=n};e.BiTangent=g;var v=function(){};e.BiTangents=v;var x=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n}(a);e.TVGPoint=x;var m=function(t,n,e,r){this.id=t,this.polyid=n,this.polyvertid=e,this.p=r,r.vv=this};e.VisibilityVertex=m;var b=function(){function t(t,n){this.source=t,this.target=n}return t.prototype.length=function(){var t=this.source.p.x-this.target.p.x,n=this.source.p.y-this.target.p.y;return Math.sqrt(t*t+n*n)},t}();e.VisibilityEdge=b;var w=function(){function t(t,n){if(this.P=t,this.V=[],this.E=[],n)this.V=n.V.slice(0),this.E=n.E.slice(0);else{for(var e=t.length,r=0;r0&&this.E.push(new b(i[o-1].vv,s))}i.length>1&&this.E.push(new b(i[0].vv,i[i.length-1].vv))}for(r=0;r0)return!0;return!1},t}();function _(t,n){for(var e=[],r=1,i=n.length;r=0&&d>=0&&x<0&&m>=0&&b>=0&&w<0?i.ll=new g(o,a):y<=0&&d<=0&&x>0&&m<=0&&b<=0&&w>0?i.rr=new g(o,a):y<=0&&d>0&&x<=0&&m>=0&&b<0&&w>=0?i.rl=new g(o,a):y>=0&&d<0&&x>=0&&m<=0&&b>0&&w<=0&&(i.lr=new g(o,a))}return i}function S(t,n){return!t.every((function(t){return!function(t,n){for(var e=1,r=n.length;e0)return!0}return!1}},{"./rectangle":17}],9:[function(t,n,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=t("./rectangle"),i=t("./vpsc"),o=t("./shortestpaths"),a=function(t,n,e){this.id=t,this.rect=n,this.children=e,this.leaf=void 0===e||0===e.length};e.NodeWrapper=a;var s=function(t,n,e,r,i){void 0===r&&(r=null),void 0===i&&(i=null),this.id=t,this.x=n,this.y=e,this.node=r,this.line=i};e.Vert=s;var u=function(){function t(n,e){this.s=n,this.t=e;var r=t.findMatch(n,e),i=e.slice(0).reverse(),o=t.findMatch(n,i);r.length>=o.length?(this.length=r.length,this.si=r.si,this.ti=r.ti,this.reversed=!1):(this.length=o.length,this.si=o.si,this.ti=e.length-o.ti-o.length,this.reversed=!0)}return t.findMatch=function(t,n){for(var e=t.length,r=n.length,i={length:0,si:-1,ti:-1},o=new Array(e),a=0;ai.length&&(i.length=u,i.si=a-u+1,i.ti=s-u+1)}else o[a][s]=0}return i},t.prototype.getSequence=function(){return this.length>=0?this.s.slice(this.si,this.si+this.length):[]},t}();e.LongestCommonSubsequence=u;var c=function(){function t(t,n,e){var i=this;void 0===e&&(e=12),this.originalnodes=t,this.groupPadding=e,this.leaves=null,this.nodes=t.map((function(t,e){return new a(e,n.getBounds(t),n.getChildren(t))})),this.leaves=this.nodes.filter((function(t){return t.leaf})),this.groups=this.nodes.filter((function(t){return!t.leaf})),this.cols=this.getGridLines("x"),this.rows=this.getGridLines("y"),this.groups.forEach((function(t){return t.children.forEach((function(n){return i.nodes[n].parent=t}))})),this.root={children:[]},this.nodes.forEach((function(t){void 0===t.parent&&(t.parent=i.root,i.root.children.push(t.id)),t.ports=[]})),this.backToFront=this.nodes.slice(0),this.backToFront.sort((function(t,n){return i.getDepth(t)-i.getDepth(n)})),this.backToFront.slice(0).reverse().filter((function(t){return!t.leaf})).forEach((function(t){var n=r.Rectangle.empty();t.children.forEach((function(t){return n=n.union(i.nodes[t].rect)})),t.rect=n.inflate(i.groupPadding)}));var o=this.midPoints(this.cols.map((function(t){return t.pos}))),u=this.midPoints(this.rows.map((function(t){return t.pos}))),c=o[0],l=o[o.length-1],h=u[0],f=u[u.length-1],p=this.rows.map((function(t){return{x1:c,x2:l,y1:t.pos,y2:t.pos}})).concat(u.map((function(t){return{x1:c,x2:l,y1:t,y2:t}}))),y=this.cols.map((function(t){return{x1:t.pos,x2:t.pos,y1:h,y2:f}})).concat(o.map((function(t){return{x1:t,x2:t,y1:h,y2:f}}))),d=p.concat(y);d.forEach((function(t){return t.verts=[]})),this.verts=[],this.edges=[],p.forEach((function(t){return y.forEach((function(n){var e=new s(i.verts.length,n.x1,t.y1);t.verts.push(e),n.verts.push(e),i.verts.push(e);for(var r=i.backToFront.length;r-- >0;){var o=i.backToFront[r],a=o.rect,u=Math.abs(e.x-a.cx()),c=Math.abs(e.y-a.cy());if(u0;){var r=e.filter((function(n){return n.rect["overlap"+t.toUpperCase()](e[0].rect)})),i={nodes:r,pos:this.avg(r.map((function(n){return n.rect["c"+t]()})))};n.push(i),i.nodes.forEach((function(t){return e.splice(e.indexOf(t),1)}))}return n.sort((function(t,n){return t.pos-n.pos})),n},t.prototype.getDepth=function(t){for(var n=0;t.parent!==this.root;)n++,t=t.parent;return n},t.prototype.midPoints=function(t){for(var n=t[1]-t[0],e=[t[0]-n/2],r=1;r.1)&&(c={pos:h[0][n],segments:[]},u.push(c)),c.segments.push(h)}return u},t.nudgeSegs=function(t,n,e,r,o,a){var s=r.length;if(!(s<=1)){for(var u=r.map((function(n){return new i.Variable(n[0][t])})),c=[],l=0;l=0&&c.push(new i.Constraint(u[g],u[v],a))}new i.Solver(u,c).solve(),u.forEach((function(n,i){var o=r[i],a=n.position();o[0][t]=o[1][t]=a;var s=e[o.edgeid];o.i>0&&(s[o.i-1][1][t]=a),o.iMath.PI||i<-Math.PI)&&(i=r-e),i},t.isLeft=function(t,n,e){return(n.x-t.x)*(e.y-t.y)-(n.y-t.y)*(e.x-t.x)<=0},t.getOrder=function(t){for(var n={},e=0;e=c.length||h.ti+h.length>=l.length)?e.push({l:r,r:i}):(h.si+h.length>=c.length||h.ti+h.length>=l.length?(o=c[h.si+1],s=c[h.si-1],a=l[h.ti-1]):(o=c[h.si+h.length-2],a=c[h.si+h.length],s=l[h.ti+h.length]),t.isLeft(o,a,s)?e.push({l:i,r:r}):e.push({l:r,r:i})))}return t.getOrder(e)},t.makeSegments=function(t){function n(t){return{x:t.x,y:t.y}}for(var e=function(t,n,e){return Math.abs((n.x-t.x)*(e.y-t.y)-(n.y-t.y)*(e.x-t.x))<.001},r=[],i=n(t[0]),o=1;o1&&l>1?1e3:0})).reverse().map((function(t){return e.verts[t]}));return l.push(this.nodes[i.id].ports[0]),l.filter((function(t,n){return!(n0&&t.node===i&&l[n-1].node===i)}))},t.getRoutePath=function(n,e,r,i){var o,a,s,u={routepath:"M "+n[0][0].x+" "+n[0][0].y+" ",arrowpath:""};if(n.length>1)for(var c=0;c0?l-=f/Math.abs(f)*e:h-=p/Math.abs(p)*e,u.routepath+="L "+l+" "+h+" ";var y=n[c+1],d=y[0].x,g=y[0].y;f=y[1].x-d,p=y[1].y-g;var v,x,m=t.angleBetween2Lines(o,y)<0?1:0;Math.abs(f)>0?(v=d+f/Math.abs(f)*e,x=g):(v=d,x=g+p/Math.abs(p)*e);var b=Math.abs(v-l),w=Math.abs(x-h);u.routepath+="A "+b+" "+w+" 0 0 "+m+" "+v+" "+x+" "}else{var _=[l,h];Math.abs(f)>0?(a=[l-=f/Math.abs(f)*i,h+r],s=[l,h-r]):(a=[l+r,h-=p/Math.abs(p)*i],s=[l-r,h]),u.routepath+="L "+l+" "+h+" ",i>0&&(u.arrowpath="M "+_[0]+" "+_[1]+" L "+a[0]+" "+a[1]+" L "+s[0]+" "+s[1])}}else l=(o=n[0])[1].x,h=o[1].y,f=l-o[0].x,p=h-o[0].y,_=[l,h],Math.abs(f)>0?(a=[l-=f/Math.abs(f)*i,h+r],s=[l,h-r]):(a=[l+r,h-=p/Math.abs(p)*i],s=[l-r,h]),u.routepath+="L "+l+" "+h+" ",i>0&&(u.arrowpath="M "+_[0]+" "+_[1]+" L "+a[0]+" "+a[1]+" L "+s[0]+" "+s[1]);return u},t}();e.GridRouter=c},{"./rectangle":17,"./shortestpaths":18,"./vpsc":19}],10:[function(t,n,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=10,i=(1+Math.sqrt(5))/2,o=1e-4;e.applyPacking=function(t,n,e,a,s,u){void 0===s&&(s=1),void 0===u&&(u=!0);var c=n,l=e,h=(s=void 0!==s?s:1,a=void 0!==a?a:0,0),f=0,p=0,y=0,d=[];function g(t,n){d=[],h=0,f=0,y=0;for(var e=0;e=t.height&&d[i].x+d[i].width+t.width+r-n<=o){e=d[i];break}d.push(t),void 0!==e?(t.x=e.x+e.width+r,t.y=e.bottom,t.space_left=t.height,t.bottom=t.y,e.space_left-=t.height+r,e.bottom+=t.height+r):(t.y=y,y+=t.height+r,t.x=0,t.bottom=t.y,t.space_left=t.height),t.y+t.height-f>-o&&(f=t.y+t.height-0),t.x+t.width-h>-o&&(h=t.x+t.width-0)}0!=t.length&&(function(t){t.forEach((function(t){var n,e,r,i,o;n=t,e=Number.MAX_VALUE,r=Number.MAX_VALUE,i=0,o=0,n.array.forEach((function(t){var n=void 0!==t.width?t.width:a,s=void 0!==t.height?t.height:a;n/=2,s/=2,i=Math.max(t.x+n,i),e=Math.min(t.x-n,e),o=Math.max(t.y+s,o),r=Math.min(t.y-s,r)})),n.width=i-e,n.height=o-r}))}(t),function(t,n){var e=Number.POSITIVE_INFINITY,a=0;t.sort((function(t,n){return n.height-t.height})),p=t.reduce((function(t,n){return t.widthp||d>o;){if(1!=f){var v=u-(u-s)/i;l=g(t,v)}if(0!=f){var x=s+(u-s)/i;h=g(t,x)}if(y=Math.abs(v-x),d=Math.abs(l-h),lh?(s=v,v=x,l=h,f=1):(u=x,x=v,h=l,f=0),c++>100)break}g(t,a)}(t),u&&function(t){t.forEach((function(t){var n={x:0,y:0};t.array.forEach((function(t){n.x+=t.x,n.y+=t.y})),n.x/=t.array.length,n.y/=t.array.length;var e=n.x-t.width/2,r=n.y-t.height/2,i=t.x-e+c/2-h/2,o=t.y-r+l/2-f/2;t.array.forEach((function(t){t.x+=i,t.y+=o}))}))}(t))},e.separateGraphs=function(t,n){for(var e={},r={},i=[],o=0,a=0;a0){var n=0;this._links.forEach((function(t){n=Math.max(n,t.source,t.target)})),this._nodes=new Array(++n);for(var e=0;e0?t:0:t>0&&(this._running||(this._running=!0,this.trigger({type:r.start,alpha:this._alpha=t}),this.kick())),this):this._alpha},t.prototype.getLinkLength=function(t){return"function"==typeof this._linkDistance?+this._linkDistance(t):this._linkDistance},t.setLinkLength=function(t,n){t.length=n},t.prototype.getLinkType=function(t){return"function"==typeof this._linkType?this._linkType(t):0},t.prototype.symmetricDiffLinkLengths=function(t,n){var e=this;return void 0===n&&(n=1),this.linkDistance((function(n){return t*n.length})),this._linkLengthCalculator=function(){return o.symmetricDiffLinkLengths(e._links,e.linkAccessor,n)},this},t.prototype.jaccardLinkLengths=function(t,n){var e=this;return void 0===n&&(n=1),this.linkDistance((function(n){return t*n.length})),this._linkLengthCalculator=function(){return o.jaccardLinkLengths(e._links,e.linkAccessor,n)},this},t.prototype.start=function(n,e,r,i,c,l){var h=this;void 0===n&&(n=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=0),void 0===c&&(c=!0),void 0===l&&(l=!0);var f,p=this.nodes().length,y=p+2*this._groups.length,d=(this._links.length,this._canvasSize[0]),g=this._canvasSize[1],v=new Array(y),x=new Array(y),m=null,b=this._avoidOverlaps;this._nodes.forEach((function(t,n){t.index=n,void 0===t.x&&(t.x=d/2,t.y=g/2),v[n]=t.x,x[n]=t.y})),this._linkLengthCalculator&&this._linkLengthCalculator(),this._distanceMatrix?f=this._distanceMatrix:(f=new u.Calculator(y,this._links,t.getSourceIndex,t.getTargetIndex,(function(t){return h.getLinkLength(t)})).DistanceMatrix(),m=a.Descent.createSquareMatrix(y,(function(){return 2})),this._links.forEach((function(t){"number"==typeof t.source&&(t.source=h._nodes[t.source]),"number"==typeof t.target&&(t.target=h._nodes[t.target])})),this._links.forEach((function(n){var e=t.getSourceIndex(n),r=t.getTargetIndex(n);m[e][r]=m[r][e]=n.weight||1})));var w=a.Descent.createSquareMatrix(y,(function(t,n){return f[t][n]}));if(this._rootGroup&&void 0!==this._rootGroup.groups){var _=p;this._groups.forEach((function(t){!function(t,n,e,r){m[t][n]=m[n][t]=e,w[t][n]=w[n][t]=r}(_,_+1,h._groupCompactness,.1),void 0===t.bounds?(v[_]=d/2,x[_++]=g/2,v[_]=d/2,x[_++]=g/2):(v[_]=t.bounds.x,x[_++]=t.bounds.y,v[_]=t.bounds.X,x[_++]=t.bounds.Y)}))}else this._rootGroup={leaves:this._nodes,groups:[]};var M=this._constraints||[];for(this._directedLinkConstraints&&(this.linkAccessor.getMinSeparation=this._directedLinkConstraints.getMinSeparation,M=M.concat(o.generateDirectedEdgeConstraints(p,this._links,this._directedLinkConstraints.axis,this.linkAccessor))),this.avoidOverlaps(!1),this._descent=new a.Descent([v,x],w),this._descent.locks.clear(),_=0;_0&&(this._descent.project=new s.Projection(this._nodes,this._groups,this._rootGroup,M).projectFunctions()),this._descent.run(e),this.separateOverlappingComponents(d,g,l),this.avoidOverlaps(b),b&&(this._nodes.forEach((function(t,n){t.x=v[n],t.y=x[n]})),this._descent.project=new s.Projection(this._nodes,this._groups,this._rootGroup,M,!0).projectFunctions(),this._nodes.forEach((function(t,n){v[n]=t.x,x[n]=t.y}))),this._descent.G=m,this._descent.run(r),i){this._descent.snapStrength=1e3,this._descent.snapGridSize=this._nodes[0].width,this._descent.numGridSnapNodes=p,this._descent.scaleSnapByMaxH=p!=y;var E=a.Descent.createSquareMatrix(y,(function(t,n){return t>=p||n>=p?m[t][n]:0}));this._descent.G=E,this._descent.run(i)}return this.updateNodePositions(),this.separateOverlappingComponents(d,g,l),c?this.resume():this},t.prototype.initialLayout=function(n,e,r){if(this._groups.length>0&&n>0){var i=this._nodes.length,o=this._links.map((function(t){return{source:t.source.index,target:t.target.index}})),a=this._nodes.map((function(t){return{index:t.index}}));this._groups.forEach((function(t,n){a.push({index:t.index=i+n})})),this._groups.forEach((function(t,n){void 0!==t.leaves&&t.leaves.forEach((function(n){return o.push({source:t.index,target:n.index})})),void 0!==t.groups&&t.groups.forEach((function(n){return o.push({source:t.index,target:n.index})}))})),(new t).size(this.size()).nodes(a).links(o).avoidOverlaps(!1).linkDistance(this.linkDistance()).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(n,0,0,0,!1),this._nodes.forEach((function(t){e[t.index]=a[t.index].x,r[t.index]=a[t.index].y}))}else this._descent.run(n)},t.prototype.separateOverlappingComponents=function(t,n,e){var r=this;if(void 0===e&&(e=!0),!this._distanceMatrix&&this._handleDisconnected){var i=this._descent.x[0],o=this._descent.x[1];this._nodes.forEach((function(t,n){t.x=i[n],t.y=o[n]}));var a=l.separateGraphs(this._nodes,this._links);l.applyPacking(a,t,n,this._defaultNodeSize,n/t,e),this._nodes.forEach((function(t,n){r._descent.x[0][n]=t.x,r._descent.x[1][n]=t.y,t.bounds&&(t.bounds.setXCentre(t.x),t.bounds.setYCentre(t.y))}))}},t.prototype.resume=function(){return this.alpha(.1)},t.prototype.stop=function(){return this.alpha(0)},t.prototype.prepareEdgeRouting=function(t){void 0===t&&(t=0),this._visibilityGraph=new c.TangentVisibilityGraph(this._nodes.map((function(n){return n.bounds.inflate(-t).vertices()})))},t.prototype.routeEdge=function(t,n,e){void 0===n&&(n=5);var r=[],i=new c.TangentVisibilityGraph(this._visibilityGraph.P,{V:this._visibilityGraph.V,E:this._visibilityGraph.E}),o={x:t.source.x,y:t.source.y},a={x:t.target.x,y:t.target.y},l=i.addPoint(o,t.source.index),h=i.addPoint(a,t.target.index);i.addEdgeIfVisible(o,a,t.source.index,t.target.index),void 0!==e&&e(i);var f=new u.Calculator(i.V.length,i.E,(function(t){return t.source.id}),(function(t){return t.target.id}),(function(t){return t.length()})).PathFromNodeToNode(l.id,h.id);if(1===f.length||f.length===i.V.length){var p=s.makeEdgeBetween(t.source.innerBounds,t.target.innerBounds,n);r=[p.sourceIntersection,p.arrowStart]}else{for(var y=f.length-2,d=i.V[f[y]].p,g=i.V[f[0]].p,v=(r=[t.source.innerBounds.rayIntersection(d.x,d.y)],y);v>=0;--v)r.push(i.V[f[v]].p);r.push(s.makeEdgeTo(g,t.target.innerBounds,n))}return r},t.getSourceIndex=function(t){return"number"==typeof t.source?t.source:t.source.index},t.getTargetIndex=function(t){return"number"==typeof t.target?t.target:t.target.index},t.linkId=function(n){return t.getSourceIndex(n)+"-"+t.getTargetIndex(n)},t.dragStart=function(n){h(n)?t.storeOffset(n,t.dragOrigin(n)):(t.stopNode(n),n.fixed|=2)},t.stopNode=function(t){t.px=t.x,t.py=t.y},t.storeOffset=function(n,e){void 0!==n.leaves&&n.leaves.forEach((function(n){n.fixed|=2,t.stopNode(n),n._dragGroupOffsetX=n.x-e.x,n._dragGroupOffsetY=n.y-e.y})),void 0!==n.groups&&n.groups.forEach((function(n){return t.storeOffset(n,e)}))},t.dragOrigin=function(t){return h(t)?{x:t.bounds.cx(),y:t.bounds.cy()}:t},t.drag=function(n,e){h(n)?(void 0!==n.leaves&&n.leaves.forEach((function(t){n.bounds.setXCentre(e.x),n.bounds.setYCentre(e.y),t.px=t._dragGroupOffsetX+e.x,t.py=t._dragGroupOffsetY+e.y})),void 0!==n.groups&&n.groups.forEach((function(n){return t.drag(n,e)}))):(n.px=e.x,n.py=e.y)},t.dragEnd=function(n){h(n)?(void 0!==n.leaves&&n.leaves.forEach((function(n){t.dragEnd(n),delete n._dragGroupOffsetX,delete n._dragGroupOffsetY})),void 0!==n.groups&&n.groups.forEach(t.dragEnd)):n.fixed&=-7},t.mouseOver=function(t){t.fixed|=4,t.px=t.x,t.py=t.y},t.mouseOut=function(t){t.fixed&=-5},t}();e.Layout=f},{"./descent":7,"./geom":8,"./handledisconnected":10,"./linklengths":13,"./powergraph":14,"./rectangle":17,"./shortestpaths":18}],12:[function(t,n,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=t("./shortestpaths"),i=t("./descent"),o=t("./rectangle"),a=t("./linklengths"),s=function(){function t(t,n){this.source=t,this.target=n}return t.prototype.actualLength=function(t){var n=this;return Math.sqrt(t.reduce((function(t,e){var r=e[n.target]-e[n.source];return t+r*r}),0))},t}();e.Link3D=s;var u=function(t,n,e){void 0===t&&(t=0),void 0===n&&(n=0),void 0===e&&(e=0),this.x=t,this.y=n,this.z=e};e.Node3D=u;var c=function(){function t(n,e,r){var i=this;void 0===r&&(r=1),this.nodes=n,this.links=e,this.idealLinkLength=r,this.constraints=null,this.useJaccardLinkLengths=!0,this.result=new Array(t.k);for(var o=0;o=this.R))return this.merge(n.a,n.b,t),!0}},t.prototype.nEdges=function(t,n){var e=t.incoming.intersection(n.incoming),r=t.outgoing.intersection(n.outgoing);return this.R-e.count()-r.count()},t.prototype.getGroupHierarchy=function(t){var n=this,e=[];return function t(n,e,r){n.forAll((function(n){if(n.isLeaf())e.leaves||(e.leaves=[]),e.leaves.push(n.id);else{var i=e;if(n.gid=r.length,!n.isIsland()||n.isPredefined()){if(i={id:n.gid},n.isPredefined())for(var o in n.definition)i[o]=n.definition[o];e.groups||(e.groups=[]),e.groups.push(n.gid),r.push(i)}t(n.children,i,r)}}))}(this.roots[0],{},e),this.allEdges().forEach((function(i){var o=n.modules[i.source],a=n.modules[i.target];t.push(new r(void 0===o.gid?i.source:e[o.gid],void 0===a.gid?i.target:e[a.gid],i.type))})),e},t.prototype.allEdges=function(){var n=[];return t.getEdges(this.roots[0],n),n},t.getEdges=function(n,e){n.forAll((function(n){n.getEdges(e),t.getEdges(n.children,e)}))},t}();e.Configuration=i;var o=function(){function t(t,n,e,r,i){void 0===n&&(n=new u),void 0===e&&(e=new u),void 0===r&&(r=new s),this.id=t,this.outgoing=n,this.incoming=e,this.children=r,this.definition=i}return t.prototype.getEdges=function(t){var n=this;this.outgoing.forAll((function(e,i){e.forAll((function(e){t.push(new r(n.id,e.id,i))}))}))},t.prototype.isLeaf=function(){return 0===this.children.count()},t.prototype.isIsland=function(){return 0===this.outgoing.count()&&0===this.incoming.count()},t.prototype.isPredefined=function(){return void 0!==this.definition},t}();function a(t,n){var e={};for(var r in t)r in n&&(e[r]=t[r]);return e}e.Module=o;var s=function(){function t(){this.table={}}return t.prototype.count=function(){return Object.keys(this.table).length},t.prototype.intersection=function(n){var e=new t;return e.table=a(this.table,n.table),e},t.prototype.intersectionCount=function(t){return this.intersection(t).count()},t.prototype.contains=function(t){return t in this.table},t.prototype.add=function(t){this.table[t.id]=t},t.prototype.remove=function(t){delete this.table[t.id]},t.prototype.forAll=function(t){for(var n in this.table)t(this.table[n])},t.prototype.modules=function(){var t=[];return this.forAll((function(n){n.isPredefined()||t.push(n)})),t},t}();e.ModuleSet=s;var u=function(){function t(){this.sets={},this.n=0}return t.prototype.count=function(){return this.n},t.prototype.contains=function(t){var n=!1;return this.forAllModules((function(e){n||e.id!=t||(n=!0)})),n},t.prototype.add=function(t,n){(t in this.sets?this.sets[t]:this.sets[t]=new s).add(n),++this.n},t.prototype.remove=function(t,n){var e=this.sets[t];e.remove(n),0===e.count()&&delete this.sets[t],--this.n},t.prototype.forAll=function(t){for(var n in this.sets)t(this.sets[n],Number(n))},t.prototype.forAllModules=function(t){this.forAll((function(n,e){return n.forAll(t)}))},t.prototype.intersection=function(n){var e=new t;return this.forAll((function(t,r){if(r in n.sets){var i=t.intersection(n.sets[r]),o=i.count();o>0&&(e.sets[r]=i,e.n+=o)}})),e},t}();e.LinkSets=u,e.getGroups=function(t,n,e,r){for(var o=t.length,a=new i(o,n,e,r);a.greedyMerge(););var s=[],u=a.getGroupHierarchy(s);return s.forEach((function(n){var e=function(e){var r=n[e];"number"==typeof r&&(n[e]=t[r])};e("source"),e("target")})),{groups:u,powerEdges:s}}},{}],15:[function(t,n,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){this.elem=t,this.subheaps=[]}return t.prototype.toString=function(t){for(var n="",e=!1,r=0;r0)}return null}}return t.prototype.clear=function(){this._root=null,this.size=0},t.prototype.find=function(t){for(var n=this._root;null!==n;){var e=this._comparator(t,n.data);if(0===e)return n.data;n=n.get_child(e>0)}return null},t.prototype.lowerBound=function(t){return this._bound(t,this._comparator)},t.prototype.upperBound=function(t){var n=this._comparator;return this._bound(t,(function(t,e){return n(e,t)}))},t.prototype.min=function(){var t=this._root;if(null===t)return null;for(;null!==t.left;)t=t.left;return t.data},t.prototype.max=function(){var t=this._root;if(null===t)return null;for(;null!==t.right;)t=t.right;return t.data},t.prototype.iterator=function(){return new a(this)},t.prototype.each=function(t){for(var n,e=this.iterator();null!==(n=e.next());)t(n)},t.prototype.reach=function(t){for(var n,e=this.iterator();null!==(n=e.prev());)t(n)},t.prototype._bound=function(t,n){for(var e=this._root,r=this.iterator();null!==e;){var i=this._comparator(t,e.data);if(0===i)return r._cursor=e,r;r._ancestors.push(e),e=e.get_child(i>0)}for(var o=r._ancestors.length-1;o>=0;--o)if(n(t,(e=r._ancestors[o]).data)>0)return r._cursor=e,r._ancestors.length=o,r;return r._ancestors.length=0,r},t}();e.TreeBase=o;var a=function(){function t(t){this._tree=t,this._ancestors=[],this._cursor=null}return t.prototype.data=function(){return null!==this._cursor?this._cursor.data:null},t.prototype.next=function(){if(null===this._cursor){var t=this._tree._root;null!==t&&this._minNode(t)}else{var n;if(null===this._cursor.right)do{if(n=this._cursor,!this._ancestors.length){this._cursor=null;break}this._cursor=this._ancestors.pop()}while(this._cursor.right===n);else this._ancestors.push(this._cursor),this._minNode(this._cursor.right)}return null!==this._cursor?this._cursor.data:null},t.prototype.prev=function(){if(null===this._cursor){var t=this._tree._root;null!==t&&this._maxNode(t)}else{var n;if(null===this._cursor.left)do{if(n=this._cursor,!this._ancestors.length){this._cursor=null;break}this._cursor=this._ancestors.pop()}while(this._cursor.left===n);else this._ancestors.push(this._cursor),this._maxNode(this._cursor.left)}return null!==this._cursor?this._cursor.data:null},t.prototype._minNode=function(t){for(;null!==t.left;)this._ancestors.push(t),t=t.left;this._cursor=t},t.prototype._maxNode=function(t){for(;null!==t.right;)this._ancestors.push(t),t=t.right;this._cursor=t},t}();e.Iterator=a;var s=function(){function t(t){this.data=t,this.left=null,this.right=null,this.red=!0}return t.prototype.get_child=function(t){return t?this.right:this.left},t.prototype.set_child=function(t,n){t?this.right=n:this.left=n},t}(),u=function(t){function n(n){var e=t.call(this)||this;return e._root=null,e._comparator=n,e.size=0,e}return i(n,t),n.prototype.insert=function(t){var e=!1;if(null===this._root)this._root=new s(t),e=!0,this.size++;else{var r=new s(void 0),i=!1,o=!1,a=null,u=r,c=null,l=this._root;for(u.right=this._root;;){if(null===l?(l=new s(t),c.set_child(i,l),e=!0,this.size++):n.is_red(l.left)&&n.is_red(l.right)&&(l.red=!0,l.left.red=!1,l.right.red=!1),n.is_red(l)&&n.is_red(c)){var h=u.right===a;l===c.get_child(o)?u.set_child(h,n.single_rotate(a,!o)):u.set_child(h,n.double_rotate(a,!o))}var f=this._comparator(l.data,t);if(0===f)break;o=i,i=f<0,null!==a&&(u=a),a=c,c=l,l=l.get_child(i)}this._root=r.right}return this._root.red=!1,e},n.prototype.remove=function(t){if(null===this._root)return!1;var e=new s(void 0),r=e;r.right=this._root;for(var i=null,o=null,a=null,u=!0;null!==r.get_child(u);){var c=u;o=i,i=r,r=r.get_child(u);var l=this._comparator(t,r.data);if(u=l>0,0===l&&(a=r),!n.is_red(r)&&!n.is_red(r.get_child(u)))if(n.is_red(r.get_child(!u))){var h=n.single_rotate(r,u);i.set_child(c,h),i=h}else if(!n.is_red(r.get_child(!u))){var f=i.get_child(!c);if(null!==f)if(n.is_red(f.get_child(!c))||n.is_red(f.get_child(c))){var p=o.right===i;n.is_red(f.get_child(c))?o.set_child(p,n.double_rotate(i,c)):n.is_red(f.get_child(!c))&&o.set_child(p,n.single_rotate(i,c));var y=o.get_child(p);y.red=!0,r.red=!0,y.left.red=!1,y.right.red=!1}else i.red=!1,f.red=!0,r.red=!0}}return null!==a&&(a.data=r.data,i.set_child(i.right===r,r.get_child(null===r.left)),this.size--),this._root=e.right,null!==this._root&&(this._root.red=!1),null!==a},n.is_red=function(t){return null!==t&&t.red},n.single_rotate=function(t,n){var e=t.get_child(!n);return t.set_child(!n,e.get_child(n)),e.set_child(n,t),t.red=!0,e.red=!1,e},n.double_rotate=function(t,e){return t.set_child(!e,n.single_rotate(t.get_child(!e),!e)),n.single_rotate(t,e)},n}(o);e.RBTree=u},{}],17:[function(t,n,e){"use strict";var r,i=this&&this.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,n)},function(t,n){function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(e,"__esModule",{value:!0});var o=t("./vpsc"),a=t("./rbtree");function s(t){return t.bounds=void 0!==t.leaves?t.leaves.reduce((function(t,n){return n.bounds.union(t)}),u.empty()):u.empty(),void 0!==t.groups&&(t.bounds=t.groups.reduce((function(t,n){return s(n).union(t)}),t.bounds)),t.bounds=t.bounds.inflate(t.padding),t.bounds}e.computeGroupBounds=s;var u=function(){function t(t,n,e,r){this.x=t,this.X=n,this.y=e,this.Y=r}return t.empty=function(){return new t(Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY)},t.prototype.cx=function(){return(this.x+this.X)/2},t.prototype.cy=function(){return(this.y+this.Y)/2},t.prototype.overlapX=function(t){var n=this.cx(),e=t.cx();return n<=e&&t.x0?e[0]:null},t.prototype.vertices=function(){return[{x:this.x,y:this.y},{x:this.X,y:this.y},{x:this.X,y:this.Y},{x:this.x,y:this.Y}]},t.lineIntersection=function(t,n,e,r,i,o,a,s){var u=e-t,c=a-i,l=r-n,h=s-o,f=h*u-c*l;if(0==f)return null;var p=t-i,y=n-o,d=(c*y-h*p)/f,g=(u*y-l*p)/f;return d>=0&&d<=1&&g>=0&&g<=1?{x:t+d*u,y:n+d*l}:null},t.prototype.inflate=function(n){return new t(this.x-n,this.X+n,this.y-n,this.Y+n)},t}();e.Rectangle=u,e.makeEdgeBetween=function(t,n,e){var r=t.rayIntersection(n.cx(),n.cy())||{x:t.cx(),y:t.cy()},i=n.rayIntersection(t.cx(),t.cy())||{x:n.cx(),y:n.cy()},o=i.x-r.x,a=i.y-r.y,s=Math.sqrt(o*o+a*a),u=s-e;return{sourceIntersection:r,targetIntersection:i,arrowStart:{x:r.x+u*o/s,y:r.y+u*a/s}}},e.makeEdgeTo=function(t,n,e){var r=n.rayIntersection(t.x,t.y);r||(r={x:n.cx(),y:n.cy()});var i=r.x-t.x,o=r.y-t.y,a=Math.sqrt(i*i+o*o);return{x:r.x-e*i/a,y:r.y-e*o/a}};var c=function(t,n,e){this.v=t,this.r=n,this.pos=e,this.prev=f(),this.next=f()},l=function(t,n,e){this.isOpen=t,this.v=n,this.pos=e};function h(t,n){return t.pos>n.pos?1:t.pos0&&(t[e].insert(i),i[r].insert(t))};e("next","prev"),e("prev","next")}};function d(t,n,e,r){void 0===r&&(r=!1);var i=t.padding,o=void 0!==t.groups?t.groups.length:0,a=void 0!==t.leaves?t.leaves.length:0,s=o?t.groups.reduce((function(t,r){return t.concat(d(r,n,e,!0))}),[]):[],u=(r?2:0)+a+o,c=new Array(u),l=new Array(u),h=0,f=function(t,n){l[h]=t,c[h++]=n};if(r){var p=t.bounds,y=n.getCentre(p),v=n.getSize(p)/2,x=n.getOpen(p),m=n.getClose(p),b=y-v+i/2,w=y+v-i/2;t.minVar.desiredPosition=b,f(n.makeRect(x,m,b,i),t.minVar),t.maxVar.desiredPosition=w,f(n.makeRect(x,m,w,i),t.maxVar)}a&&t.leaves.forEach((function(t){return f(t.bounds,t.variable)})),o&&t.groups.forEach((function(t){var e=t.bounds;f(n.makeRect(n.getOpen(e),n.getClose(e),n.getCentre(e),n.getSize(e)),t.minVar)}));var _=g(l,c,n,e);return o&&(c.forEach((function(t){t.cOut=[],t.cIn=[]})),_.forEach((function(t){t.left.cOut.push(t),t.right.cIn.push(t)})),t.groups.forEach((function(t){var e=(t.padding-n.getSize(t.bounds))/2;t.minVar.cIn.forEach((function(t){return t.gap+=e})),t.minVar.cOut.forEach((function(n){n.left=t.maxVar,n.gap+=e}))}))),s.concat(_)}function g(t,n,e,r){var i,a=t.length,s=2*a;console.assert(n.length>=a);var u=new Array(s);for(i=0;it[e]&&(t[e]=n)}o=t}))}},t.prototype.createAlignment=function(t){var n=this,e=this.nodes[t.offsets[0].node].variable;this.makeFeasible(t);var r="x"===t.axis?this.xConstraints:this.yConstraints;t.offsets.slice(1).forEach((function(t){var i=n.nodes[t.node].variable;r.push(new o.Constraint(e,i,t.offset,!0))}))},t.prototype.createConstraints=function(t){var n=this,e=function(t){return void 0===t.type||"separation"===t.type};this.xConstraints=t.filter((function(t){return"x"===t.axis&&e(t)})).map((function(t){return n.createSeparation(t)})),this.yConstraints=t.filter((function(t){return"y"===t.axis&&e(t)})).map((function(t){return n.createSeparation(t)})),t.filter((function(t){return"alignment"===t.type})).forEach((function(t){return n.createAlignment(t)}))},t.prototype.setupVariablesAndBounds=function(t,n,e,r){this.nodes.forEach((function(i,o){i.fixed?(i.variable.weight=i.fixedWeight?i.fixedWeight:1e3,e[o]=r(i)):i.variable.weight=1;var a=(i.width||0)/2,s=(i.height||0)/2,c=t[o],l=n[o];i.bounds=new u(c-a,c+a,l-s,l+s)}))},t.prototype.xProject=function(t,n,e){(this.rootGroup||this.avoidOverlaps||this.xConstraints)&&this.project(t,n,t,e,(function(t){return t.px}),this.xConstraints,m,(function(t){return t.bounds.setXCentre(e[t.variable.index]=t.variable.position())}),(function(t){var n=e[t.minVar.index]=t.minVar.position(),r=e[t.maxVar.index]=t.maxVar.position(),i=t.padding/2;t.bounds.x=n-i,t.bounds.X=r+i}))},t.prototype.yProject=function(t,n,e){(this.rootGroup||this.yConstraints)&&this.project(t,n,n,e,(function(t){return t.py}),this.yConstraints,b,(function(t){return t.bounds.setYCentre(e[t.variable.index]=t.variable.position())}),(function(t){var n=e[t.minVar.index]=t.minVar.position(),r=e[t.maxVar.index]=t.maxVar.position(),i=t.padding/2;t.bounds.y=n-i,t.bounds.Y=r+i}))},t.prototype.projectFunctions=function(){var t=this;return[function(n,e,r){return t.xProject(n,e,r)},function(n,e,r){return t.yProject(n,e,r)}]},t.prototype.project=function(t,n,e,r,i,o,a,u,c){this.setupVariablesAndBounds(t,n,r,i),this.rootGroup&&this.avoidOverlaps&&(s(this.rootGroup),o=o.concat(a(this.rootGroup))),this.solve(this.variables,o,e,r),this.nodes.forEach(u),this.rootGroup&&this.avoidOverlaps&&(this.groups.forEach(c),s(this.rootGroup))},t.prototype.solve=function(t,n,e,r){var i=new o.Solver(t,n);i.setStartingPositions(e),i.setDesiredPositions(r),i.solve()},t}();e.Projection=_},{"./rbtree":16,"./vpsc":19}],18:[function(t,n,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=t("./pqueue"),i=function(t,n){this.id=t,this.distance=n},o=function(t){this.id=t,this.neighbours=[]},a=function(t,n,e){this.node=t,this.prev=n,this.d=e},s=function(){function t(t,n,e,r,a){this.n=t,this.es=n,this.neighbours=new Array(this.n);for(var s=this.n;s--;)this.neighbours[s]=new o(s);for(s=this.es.length;s--;){var u=this.es[s],c=e(u),l=r(u),h=a(u);this.neighbours[c].neighbours.push(new i(l,h)),this.neighbours[l].neighbours.push(new i(c,h))}}return t.prototype.DistanceMatrix=function(){for(var t=new Array(this.n),n=0;nh&&(c.d=h,c.prev=s,e.reduceKey(c.q,c,(function(t,n){return t.q=n})))}}return o},t}();e.Calculator=s},{"./pqueue":15}],19:[function(t,n,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){this.scale=t,this.AB=0,this.AD=0,this.A2=0}return t.prototype.addVariable=function(t){var n=this.scale/t.scale,e=t.offset/t.scale,r=t.weight;this.AB+=r*n*e,this.AD+=r*n*t.desiredPosition,this.A2+=r*n*n},t.prototype.getPosn=function(){return(this.AD-this.AB)/this.A2},t}();e.PositionStats=r;var i=function(){function t(t,n,e,r){void 0===r&&(r=!1),this.left=t,this.right=n,this.gap=e,this.equality=r,this.active=!1,this.unsatisfiable=!1,this.left=t,this.right=n,this.gap=e,this.equality=r}return t.prototype.slack=function(){return this.unsatisfiable?Number.MAX_VALUE:this.right.scale*this.right.position()-this.gap-this.left.scale*this.left.position()},t}();e.Constraint=i;var o=function(){function t(t,n,e){void 0===n&&(n=1),void 0===e&&(e=1),this.desiredPosition=t,this.weight=n,this.scale=e,this.offset=0}return t.prototype.dfdv=function(){return 2*this.weight*(this.position()-this.desiredPosition)},t.prototype.position=function(){return(this.block.ps.scale*this.block.posn+this.offset)/this.scale},t.prototype.visitNeighbours=function(t,n){var e=function(e,r){return e.active&&t!==r&&n(e,r)};this.cOut.forEach((function(t){return e(t,t.right)})),this.cIn.forEach((function(t){return e(t,t.left)}))},t}();e.Variable=o;var a=function(){function t(t){this.vars=[],t.offset=0,this.ps=new r(t.scale),this.addVariable(t)}return t.prototype.addVariable=function(t){t.block=this,this.vars.push(t),this.ps.addVariable(t),this.posn=this.ps.getPosn()},t.prototype.updateWeightedPosition=function(){this.ps.AB=this.ps.AD=this.ps.A2=0;for(var t=0,n=this.vars.length;t=0?this.inactive.push(n):this.bs.merge(n)}}},t.prototype.solve=function(){this.satisfy();for(var t=Number.MAX_VALUE,n=this.bs.cost();Math.abs(t-n)>1e-4;)this.satisfy(),t=n,n=this.bs.cost();return n},t.LAGRANGIAN_TOLERANCE=-1e-4,t.ZERO_UPPERBOUND=-1e-10,t}();e.Solver=u,e.removeOverlapInOneDimension=function(t,n,e){for(var r=t.map((function(t){return new o(t.desiredCenter)})),a=[],s=t.length,c=0;c=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){e=t[Symbol.iterator]()},n:function(){var t=e.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==e.return||e.return()}finally{if(s)throw o}}}}function f(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e-1&&(this.uncertainBegin=0,this.begin=e(o.substring(1,o.length))),a.indexOf(">")>-1&&(this.end=e(a.substring(1,o.length)),this.uncertainEnd=t.size),o.indexOf(">")>-1&&a.indexOf("<")>-1&&(this.uncertainBegin=e(o.substring(1,o.length)),this.begin=e(a.substring(1,o.length)),this.end=null)}}function g(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var e=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(e.push(a.value),!n||e.length!==n);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return e}(t,n)||x(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,n){var e;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(e=x(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){e=t[Symbol.iterator]()},n:function(){var t=e.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==e.return||e.return()}finally{if(s)throw o}}}}function x(t,n){if(t){if("string"==typeof t)return m(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?m(t,n):void 0}}function m(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e25&&(this.labelText=this.labelText.substr(0,16)+"..."),this.labelText=this.name,this.labelTextNode=document.createTextNode(this.labelText),this.labelSVG.appendChild(this.labelTextNode),this.labelSVG.setAttribute("transform","translate( -"+this.getSymbolRadius()+" "+"-5)"),this.upperGroup.appendChild(this.labelSVG)},p.prototype.initOutline=function(){this.outline.classList.add("outline"),this.upperGroup.appendChild(this.outline)},p.prototype.initListeners=function(){var t=this;this.upperGroup.onmousedown=function(n){t.mouseDown(n)},this.upperGroup.onmouseenter=function(n){t.mouseOver(n)},this.upperGroup.onmouseleave=function(n){t.mouseOut(n)},this.upperGroup.ontouchstart=function(n){t.touchStart(n)}},p.prototype.addStoichiometryLabel=function(t){this.labelSVG&&(this.labelSVG.childNodes[0].data=this.labelSVG.childNodes[0].data+" ["+t+"]")},p.prototype.mouseDown=function(t){return this.app.preventDefaultsAndStopPropagation(t),this.app.d3cola.stop(),this.app.dragElement=this,this.app.dragStart=t,!1},p.prototype.touchStart=function(t){return this.app.preventDefaultsAndStopPropagation(t),this.app.d3cola.stop(),this.app.dragElement=this,this.app.dragStart=t,!1},p.prototype.mouseOver=function(t){return this.app.preventDefaultsAndStopPropagation(t),this.showHighlight(!0),this.app.notifyHoverListeners([this.json.id]),!1},p.prototype.mouseOut=function(t){return this.app.preventDefaultsAndStopPropagation(t),this.showHighlight(!1),this.app.hideTooltip(),this.app.notifyHoverListeners([]),!1},p.prototype.getSymbolRadius=function(){return 15},p.prototype.showHighlight=function(){},p.prototype.getPosition=function(){return[this.ix,this.iy]},p.prototype.setPosition=function(t,n){this.px=this.ix,this.py=this.iy,this.ix=t,this.iy=n,this.upperGroup.setAttribute("transform","translate("+this.ix+" "+this.iy+")")},p.prototype.changePosition=function(t,n){this.px=this.ix,this.py=this.iy,this.ix-=t,this.iy-=n,this.upperGroup.setAttribute("transform","translate("+this.ix+" "+this.iy+")")},p.prototype.getAggregateSelfLinkPath=function(){var t=this.getSymbolRadius()+7,n=y(t,70),e=y(t,20),r=y(t,85),i=y(t,5);return"M 0,0 Q "+r.x+","+-r.y+" "+n.x+","+-n.y+" A "+t+" "+t+" 0 0 1 "+e.x+","+-e.y+" Q "+i.x+","+-i.y+" 0,0"},p.prototype.checkLinks=function(){function t(t){var n,e=h(t.values());try{for(e.s();!(n=e.n()).done;){n.value.check()}}catch(t){e.e(t)}finally{e.f()}}t(this.binaryLinks),t(this.sequenceLinks),this.selfLink&&this.selfLink.check()},p.prototype.setAllLinkCoordinates=function(){var t,n=h(this.naryLinks.values());try{for(n.s();!(t=n.n()).done;){t.value.setLinkCoordinates()}}catch(t){n.e(t)}finally{n.f()}var e,r=h(this.binaryLinks.values());try{for(r.s();!(e=r.n()).done;){e.value.setLinkCoordinates()}}catch(t){r.e(t)}finally{r.f()}this.selfLink&&this.selfLink.setLinkCoordinates();var i,o=h(this.sequenceLinks.values());try{for(o.s();!(i=o.n()).done;){i.value.setLinkCoordinates()}}catch(t){o.e(t)}finally{o.f()}},d.prototype.toString=function(){return this.sequenceDatumString},d.prototype.overlaps=function(t){if(this.participant===t.participant){var n=this.uncertainBegin||this.begin||this.end||this.uncertainEnd,e=this.uncertainEnd||this.end||this.begin||this.uncertainBegin,r=t.uncertainBegin||t.begin||t.end;if(n<=(t.uncertainEnd||t.end||t.begin)&&r<=e)return!0}return!1},b.STICKHEIGHT=20,b.MAXSIZE=0,b.transitionTime=650,b.prototype=new p,b.prototype.getSymbolRadius=function(){return 15},b.prototype.showHighlight=function(t){this.highlight.setAttribute("stroke-opacity",t?"1":"0")},b.minXDist=30,b.prototype.setStickScale=function(t,n){var e=this.stickZoom,r=this.ix-n.x,i=this.iy-n.y,o=r*t/e-r,a=i*t/e-i;0!==this.rotation&&180!==this.rotation||(a=0);var s=this.ix+o,u=this.iy+a;this.stickZoom=t,this.scale(),this.setPosition(s,u),this.setAllLinkCoordinates()},b.prototype.scale=function(){var t=this.size*this.stickZoom;if(this.expanded){var n=i.transform(this.labelSVG.getAttribute("transform")),e=this.app.svgElement.createSVGMatrix().rotate(n.rotate).translate(-(this.size/2*this.stickZoom+(this.nTerminusFeature?25:10)),-5);this.labelSVG.transform.baseVal.initialize(this.app.svgElement.createSVGTransformFromMatrix(e)),this.updateAnnotationRectanglesNoTransition(),i.select(this.background).attr("width",t).attr("x",this.getResXWithStickZoom(.5)),i.select(this.outline).attr("width",t).attr("x",this.getResXWithStickZoom(.5)),i.select(this.highlight).attr("width",t+5).attr("x",this.getResXWithStickZoom(.5)-2.5),this.setScaleGroup()}},b.prototype.setScaleGroup=function(){this.upperGroup.appendChild(this.ticks),this.ticks.textContent="",this.scaleLabels=[];for(var t=-1,n=this.getResXWithStickZoom(this.size),e=1;e<=this.size;e++){if(1===e||e%100==0&&200*this.stickZoom>b.minXDist||e%10==0&&20*this.stickZoom>b.minXDist){var r=this.getResXWithStickZoom(e);(this.stickZoom>=8||1!==e)&&s(this,r),0===(t=(t+1)%2)&&r+b.minXDist=8){var i=document.createElementNS(c,"g");i.setAttribute("transform","translate("+this.getResXWithStickZoom(e)+" 0)");var o=document.createElementNS(c,"text");o.classList.add("label","sequence"),o.setAttribute("x","0"),o.setAttribute("y","3"),o.appendChild(document.createTextNode(this.sequence[e-1])),i.appendChild(o),this.scaleLabels.push(o),this.ticks.appendChild(i)}}function a(t,n,e){var r=document.createElementNS(c,"g");r.setAttribute("transform","translate("+e+" 0)");var i=document.createElementNS(c,"text");i.classList.add("label","scale-label"),i.setAttribute("x","0"),i.setAttribute("y",b.STICKHEIGHT+4),i.appendChild(document.createTextNode(n)),r.appendChild(i),t.scaleLabels.push(i),t.ticks.appendChild(r)}function s(t,n){var e=document.createElementNS(c,"line");e.classList.add("tick"),e.setAttribute("x1",n),e.setAttribute("y1","5"),e.setAttribute("x2",n),e.setAttribute("y2","10"),t.ticks.appendChild(e)}a(this,this.size,n),this.stickZoom>=8&&s(this,n)},b.prototype.setForm=function(t,n){!0!==this.busy&&(1===t?this.toStick():this.toCircle(n))},b.prototype.toCircle=function(t){this.busy=!0;var n=this.getSymbolRadius();i.select(this.background).transition().attr("x",-n).attr("y",-n).attr("width",2*n).attr("height",2*n).attr("rx",n).attr("ry",n).duration(b.transitionTime),i.select(this.outline).transition().attr("x",-n).attr("y",-n).attr("width",2*n).attr("height",2*n).attr("rx",n).attr("ry",n).duration(b.transitionTime),i.select(this.highlight).transition().attr("width",2*n+5).attr("height",2*n+5).attr("x",-n-2.5).attr("y",-n-2.5).attr("rx",n+2.5).attr("ry",n+2.5).duration(b.transitionTime);var e=i.interpolate(this.stickZoom,0),r=i.transform(this.labelSVG.getAttribute("transform")).translate[0],o=i.interpolate(r,-(n+5)),a=null,s=null;null!=t&&(a=i.interpolate(this.ix,t.x),s=i.interpolate(this.iy,t.y));var u=this;i.select(this.ticks).transition().attr("opacity",0).duration(b.transitionTime/4).each("end",(function(){i.select(this).selectAll("*").remove()}));var c,l=v(this.annotationSets);try{for(l.s();!(c=l.n()).done;){var h=g(c.value,2),f=h[0],p=h[1];if(!0===this.app.annotationSetsShown.get(f)){var y,d=v(p);try{for(d.s();!(y=d.n()).done;){var x=y.value;if(x.fuzzyStart){var m=x.fuzzyStart;i.select(m).transition().attr("d",this.getAnnotationPieSlicePath(x.seqDatum.uncertainBegin,x.seqDatum.begin,x,!1)).duration(b.transitionTime)}if(x.certain){var w=x.certain;i.select(w).transition().attr("d",this.getAnnotationPieSlicePath(x.seqDatum.begin,x.seqDatum.end,x,!1)).duration(b.transitionTime)}if(x.fuzzyEnd){var _=x.fuzzyEnd;i.select(_).transition().attr("d",this.getAnnotationPieSlicePath(x.seqDatum.end,x.seqDatum.uncertainEnd,x,!1)).duration(b.transitionTime)}}}catch(t){d.e(t)}finally{d.f()}}}}catch(t){l.e(t)}finally{l.f()}var M=this.stickZoom,S=this.rotation,k=i.ease("cubic-in-out");i.timer((function(t){return function t(n){var r=i.transform(u.labelSVG.getAttribute("transform")),c=u.app.svgElement.createSVGMatrix().rotate(r.rotate).translate(o(k(n)),-5);u.labelSVG.transform.baseVal.initialize(u.app.svgElement.createSVGTransformFromMatrix(c)),null!==a&&u.setPosition(a(k(n)),s(k(n)));if(u.stickZoom=e(k(n)),u.setAllLinkCoordinates(),1===n){u.expanded=!1,u.checkLinks();var l,h=v(u.annotationSets);try{for(h.s();!(l=h.n()).done;){var f=g(l.value,2),p=f[0],y=f[1];if(!0===u.app.annotationSetsShown.get(p)){var d,x=v(y);try{for(x.s();!(d=x.n()).done;){var m=d.value;if(m.fuzzyStart){var b=m.fuzzyStart;i.select(b).attr("d",u.getAnnotationPieSlicePath(m.seqDatum.uncertainBegin,m.seqDatum.begin,m))}if(m.certain){var w=m.certain;i.select(w).attr("d",u.getAnnotationPieSlicePath(m.seqDatum.begin,m.seqDatum.end,m))}if(m.fuzzyEnd){var _=m.fuzzyEnd;i.select(_).attr("d",u.getAnnotationPieSlicePath(m.seqDatum.end,m.seqDatum.uncertainEnd,m))}}}catch(t){x.e(t)}finally{x.f()}}}}catch(t){h.e(t)}finally{h.f()}return u.stickZoom=M,u.rotation=S,u.busy=!1,!0}return n>1&&t(1)}(t/b.transitionTime)}))},b.prototype.toStick=function(){this.busy=!0,this.expanded=!0;var t=this.size*this.stickZoom,n=this.getSymbolRadius(),e=i.interpolate(2*n,t),r=i.interpolate(0,this.stickZoom),o=i.interpolate(-(n+5),-(this.size/2*this.stickZoom+(this.nTerminusFeature?25:10))),a=this.stickZoom;this.stickZoom=0,this.checkLinks(),this.stickZoom=a,i.select(this.background).transition().attr("height",b.STICKHEIGHT).attr("y",-b.STICKHEIGHT/2).attr("rx",0).attr("ry",0).duration(b.transitionTime),i.select(this.outline).transition().attr("height",b.STICKHEIGHT).attr("y",-b.STICKHEIGHT/2).attr("rx",0).attr("ry",0).duration(b.transitionTime),i.select(this.highlight).transition().attr("width",t+5).attr("height",b.STICKHEIGHT+5).attr("x",this.getResXWithStickZoom(.5)-2.5).attr("y",-b.STICKHEIGHT/2-2.5).attr("rx",0).attr("ry",0).duration(b.transitionTime);var s,u=v(this.annotationSets);try{for(u.s();!(s=u.n()).done;){var c=g(s.value,2),l=c[0],h=c[1];if(!0===this.app.annotationSetsShown.get(l)){var f,p=v(h);try{for(p.s();!(f=p.n()).done;){var y=f.value;if(y.fuzzyStart){var d=y.fuzzyStart;d.setAttribute("d",this.getAnnotationPieSlicePath(y.seqDatum.uncertainBegin,y.seqDatum.begin,y,!1)),i.select(d).transition().attr("d",this.getAnnotationRectPath(y.seqDatum.uncertainBegin,y.seqDatum.begin,y)).duration(b.transitionTime)}if(y.certain){var x=y.certain,m=y.seqDatum.begin,w=y.seqDatum.end;y.seqDatum.uncertainBegin&&(m+=1),y.seqDatum.uncertainEnd&&(w-=1),x.setAttribute("d",this.getAnnotationPieSlicePath(m,w,y,!1)),i.select(x).transition().attr("d",this.getAnnotationRectPath(m,w,y)).duration(b.transitionTime)}if(y.fuzzyEnd){var _=y.fuzzyEnd;_.setAttribute("d",this.getAnnotationPieSlicePath(y.seqDatum.end,y.seqDatum.uncertainEnd,y,!1)),i.select(_).transition().attr("d",this.getAnnotationRectPath(y.seqDatum.end,y.seqDatum.uncertainEnd,y)).duration(b.transitionTime)}}}catch(t){p.e(t)}finally{p.f()}}}}catch(t){u.e(t)}finally{u.f()}var M=this,S=i.ease("cubic-in-out");i.timer((function(t){return function t(n){var a=i.transform(M.labelSVG.getAttribute("transform")),s=M.app.svgElement.createSVGMatrix().rotate(a.rotate).translate(o(S(n)),-5);M.labelSVG.transform.baseVal.initialize(M.app.svgElement.createSVGTransformFromMatrix(s));var u=e(S(n));return i.select(M.highlight).attr("width",u).attr("x",-u/2+.5*M.stickZoom),i.select(M.outline).attr("width",u).attr("x",-u/2+.5*M.stickZoom),i.select(M.background).attr("width",u).attr("x",-u/2+.5*M.stickZoom),M.stickZoom=r(S(n)),M.setAllLinkCoordinates(),1===n?(M.updateAnnotationRectanglesNoTransition(),M.busy=!1,!0):n>1&&t(1)}(t/b.transitionTime)})),i.select(this.ticks).attr("opacity",0),this.setScaleGroup(),i.select(this.ticks).transition().attr("opacity",1).delay(.8*b.transitionTime).duration(b.transitionTime/2)},b.prototype.toStickNoTransition=function(){this.busy=!0,this.expanded=!0;var t=this.size*this.stickZoom,n=this.getSymbolRadius(),e=i.interpolate(2*n,t),r=i.interpolate(-(n+5),-(this.size/2*this.stickZoom+(this.nTerminusFeature?25:10)));this.checkLinks(),i.select(this.background).attr("height",b.STICKHEIGHT).attr("y",-b.STICKHEIGHT/2).attr("rx",0).attr("ry",0),i.select(this.outline).attr("height",b.STICKHEIGHT).attr("y",-b.STICKHEIGHT/2).attr("rx",0).attr("ry",0),i.select(this.highlight).attr("width",t+5).attr("height",b.STICKHEIGHT+5).attr("x",this.getResXWithStickZoom(.5)-2.5).attr("y",-b.STICKHEIGHT/2-2.5).attr("rx",0).attr("ry",0);this.updateAnnotationRectanglesNoTransition();var o=i.transform(this.labelSVG.getAttribute("transform")),a=this.app.svgElement.createSVGMatrix().rotate(o.rotate).translate(r(1),-5);this.labelSVG.transform.baseVal.initialize(this.app.svgElement.createSVGTransformFromMatrix(a));var s=e(1);i.select(this.highlight).attr("width",s).attr("x",-s/2+.5*this.stickZoom),i.select(this.outline).attr("width",s).attr("x",-s/2+.5*this.stickZoom),i.select(this.background).attr("width",s).attr("x",-s/2+.5*this.stickZoom),this.setAllLinkCoordinates(),this.setScaleGroup(),i.select(this.ticks).attr("opacity",1),this.busy=!1},b.prototype.updateAnnotationRectanglesNoTransition=function(){var t,n=v(this.annotationSets);try{for(n.s();!(t=n.n()).done;){var e=g(t.value,2),r=e[0],o=e[1];if(!0===this.app.annotationSetsShown.get(r)){var a,s=v(o);try{for(s.s();!(a=s.n()).done;){var u=a.value;if(u.fuzzyStart){var c=u.fuzzyStart;i.select(c).attr("d",this.getAnnotationRectPath(u.seqDatum.uncertainBegin,u.seqDatum.begin,u))}if(u.certain){var l=u.seqDatum.begin,h=u.seqDatum.end;u.seqDatum.uncertainBegin&&(l+=1),u.seqDatum.uncertainEnd&&(h-=1),u.certain.setAttribute("d",this.getAnnotationRectPath(l,h,u))}if(u.fuzzyEnd){var f=u.fuzzyEnd;i.select(f).attr("d",this.getAnnotationRectPath(u.seqDatum.end,u.seqDatum.uncertainEnd,u))}}}catch(t){s.e(t)}finally{s.f()}}}}catch(t){n.e(t)}finally{n.f()}},b.prototype.getResXWithStickZoom=function(t){return"n-n"===t?-this.size/2*this.stickZoom-20:"c-c"===t?this.size/2*this.stickZoom+20:(t-this.size/2)*this.stickZoom},b.prototype.getResidueCoordinates=function(t,n){void 0===t&&console.error("ERROR: residue number is undefined");var e,r=this.getResXWithStickZoom(1*t);if(0!==r){var i=Math.abs(r),o=Math.acos(r/i),a=this.rotation/360*Math.PI*2;r=i*Math.cos(a+o),e=i*Math.sin(a+o),void 0!==n&&(r+=n*Math.cos(a+Math.PI/2),e+=n*Math.sin(a+Math.PI/2))}else e=n;return[r+=this.ix,e+=this.iy]},b.prototype.clearPositionalFeatures=function(){this.annotations=[],this.annotationTypes=[],this.annotationsSvgGroup.textContent=""},b.prototype.updatePositionalFeatures=function(){var t=this,n=function(n){var e=n.target.correspondingUseElement?n.target.correspondingUseElement:n.target;t.app.preventDefaultsAndStopPropagation(n),t.app.setTooltip(e.name,e.getAttribute("fill")),t.showHighlight(!0)},e=-1,r=[];function i(t,n){var e,r=v(t);try{for(r.s();!(e=r.n()).done;){if(e.value.seqDatum.overlaps(n.seqDatum))return!0}}catch(t){r.e(t)}finally{r.f()}return!1}var o,a=v(this.annotationSets);try{for(a.s();!(o=a.n()).done;){var s=g(o.value,2),u=s[0],l=s[1];if(!0===this.app.annotationSetsShown.get(u)){l&&l.length>0&&(r[++e]=[]);var h,f=new Set,p=v(Array.from(l.values()).sort((function(t,n){var e=t.description,r=n.description;return er?1:0})));try{for(p.s();!(h=p.n()).done;){var y=h.value;if(!f.has(y.toString()))if(f.add(y.toString()),"n-n"===y.seqDatum.sequenceDatumString||"c-c"===y.seqDatum.sequenceDatumString)y.rung=-1;else{var d=r[e];i(d,y)&&(r[++e]=[],d=r[e]),y.rung=e,d.push(y)}}}catch(t){p.e(t)}finally{p.f()}}}}catch(t){a.e(t)}finally{a.f()}this.rungCount=e+1;var x,m=v(this.annotationSets);try{for(m.s();!(x=m.n()).done;){var b=g(x.value,2),w=b[0],_=b[1];if(!0===this.app.annotationSetsShown.get(w)){var M,S=new Set,k=v(_.values());try{for(k.s();!(M=k.n()).done;){var E=M.value;if(!S.has(E.toString())){S.add(E.toString());var A=E.toString();if(E.seqDatum.uncertainBegin&&(E.fuzzyStart=document.createElementNS(c,"path"),this.expanded?E.fuzzyStart.setAttribute("d",this.getAnnotationRectPath(E.seqDatum.uncertainBegin,E.seqDatum.begin,E)):E.fuzzyStart.setAttribute("d",this.getAnnotationPieSlicePath(E.seqDatum.uncertainBegin,E.seqDatum.begin,E)),E.fuzzyStart.setAttribute("stroke-width","1"),E.fuzzyStart.setAttribute("fill-opacity","0.6"),E.fuzzyStart.name=A,E.fuzzyStart.onmouseover=n,this.annotationsSvgGroup.appendChild(E.fuzzyStart)),E.seqDatum.begin&&E.seqDatum.end){E.certain=document.createElementNS(c,"path");var L=E.seqDatum.begin,N=E.seqDatum.end;E.seqDatum.uncertainBegin&&(L+=1),E.seqDatum.uncertainEnd&&(N-=1),this.expanded?E.certain.setAttribute("d",this.getAnnotationRectPath(L,N,E)):E.certain.setAttribute("d",this.getAnnotationPieSlicePath(L,N,E)),E.certain.setAttribute("stroke-width","1"),E.certain.name=A,E.certain.onmouseover=n,this.annotationsSvgGroup.appendChild(E.certain)}E.seqDatum.uncertainEnd&&(E.fuzzyEnd=document.createElementNS(c,"path"),this.expanded?E.fuzzyEnd.setAttribute("d",this.getAnnotationRectPath(E.seqDatum.end,E.seqDatum.uncertainEnd,E)):E.fuzzyEnd.setAttribute("d",this.getAnnotationPieSlicePath(E.seqDatum.end,E.seqDatum.uncertainEnd,E)),E.fuzzyEnd.setAttribute("stroke-width","1"),E.fuzzyEnd.setAttribute("fill-opacity","0.6"),E.fuzzyEnd.name=A,E.fuzzyEnd.onmouseover=n,this.annotationsSvgGroup.appendChild(E.fuzzyEnd))}}}catch(t){k.e(t)}finally{k.f()}}}}catch(t){m.e(t)}finally{m.f()}},b.stepsInArc=5,b.prototype.getAnnotationPieSlicePath=function(t,n,e){var r,i,o,a,s,u=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],c=this.getSymbolRadius(),h=e.rung;-1===h?(i=0,r=c):r=(i=h*(o=c/this.rungCount))+o,"n-n"===t?(a=-20,s=0):"c-c"===n?(a=0,s=20):(a=(t-1)/this.size*360,s=(n-1)/this.size*360);var f=0;(s-a>180||s===a)&&(f=1);var p=l([0,i],[0,0],a-180),y=l([0,r],[0,0],a-180),d=l([0,r],[0,0],s-180),g=l([0,i],[0,0],s-180),v="M"+p[0]+","+p[1]+" L"+y[0]+","+y[1];if(u)v+=" A"+r+","+r+" 0 "+f+" 1 "+d[0]+","+d[1];else for(var x=0;x<=b.stepsInArc;x++){var m=a+(s-a)/b.stepsInArc*x,w=l([0,r],[0,0],m-180);v+=" L"+w[0]+","+w[1]}if(u)v+=" L"+g[0]+","+g[1],v+=" A"+i+","+i+" 0 "+f+" 0 "+p[0]+","+p[1];else for(var _=b.stepsInArc;_>=0;_--){var M=a+(s-a)/b.stepsInArc*_,S=l([0,i],[0,0],M-180);v+=" L"+S[0]+","+S[1]}return v+=" Z"},b.prototype.getAnnotationRectPath=function(t,n,e){var r,i,o,a,s,u=e.rung;-1===u?(i=b.STICKHEIGHT/2,r=-b.STICKHEIGHT/2):(o=b.STICKHEIGHT/this.rungCount,i=(r=-b.STICKHEIGHT/2+u*o)+o),"n-n"===t?(a=this.getResXWithStickZoom(.5)-20,s=20):"c-c"===n?(a=this.getResXWithStickZoom(this.size+.5),s=20):(a=this.getResXWithStickZoom(t-.5),s=(n-t+1)*this.stickZoom);for(var c="M"+a+","+i+" L"+a+","+r,l=0;l<=b.stepsInArc;l++){c+=" L "+(a+s*(l/b.stepsInArc))+","+r}for(var h=b.stepsInArc;h>=0;h--){c+=" L "+(a+s*(h/b.stepsInArc))+","+i}return c+=" Z"},w.prototype=new b,_.prototype=new p,M.prototype=new p,M.prototype.getSymbolRadius=function(){return 21},S.prototype=new p,k.prototype=new p;var E=e(1),A=e(2);function L(t,n){var e;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(e=function(t,n){if(!t)return;if("string"==typeof t)return N(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return N(t,n)}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){e=t[Symbol.iterator]()},n:function(){var t=e.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==e.return||e.return()}finally{if(s)throw o}}}}function N(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){e=t[Symbol.iterator]()},n:function(){var t=e.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==e.return||e.return()}finally{if(s)throw o}}}}function z(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){e=t[Symbol.iterator]()},n:function(){var t=e.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==e.return||e.return()}finally{if(s)throw o}}}}function j(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e1)return t})).forEach((function(n){if(F(e,"id",n.interactorRef))for(var i=function(e){var i=JSON.parse(JSON.stringify(n));i.id=i.id+"_"+e,i.cloneParentID=n.id,i.cloneIteration=e,n.cloned=!0,i.features&&i.features.forEach((function(t){t.clonedfrom=t.id,t.id=t.id+"_"+e,t.sequenceData.forEach((function(t){t.participantRef=i.id}))})),t.participants.push(i),r.push(i)},o=0;o-1){var i=JSON.parse(JSON.stringify(e));i.id=e.id+"_"+n.id,i.linkedFeatures=[],i.linkedFeatures.push(n.id),F(t.participants,"id",i.parentParticipant).features.push(i)}}))}))})),n.forEach((function(t){t.participants.forEach((function(t){t.stoichiometry=null}))})),t}function F(t,n,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){e=t[Symbol.iterator]()},n:function(){var t=e.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==e.return||e.return()}finally{if(s)throw o}}}}function U(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e2&&void 0!==arguments[2])||arguments[2];(t="object"===X(t)?t:JSON.parse(t)).data=t.data.reverse(),n.features=new Map;var r=new Map;n.proteinCount=0,n.interactors=new Map;var i,o=H(t.data);try{for(o.s();!(i=o.n()).done;){var a=i.value;"interactor"===a.object&&(n.interactors.set(a.id,a),0===a.id.indexOf("uniprotkb_")&&n.proteinCount++)}}catch(t){o.e(t)}finally{o.f()}e?xt():wt();var s,c=H(t.data);try{for(c.s();!(s=c.n()).done;){var l=s.value;if("interaction"===l.object){var h,f=H(l.participants);try{for(f.s();!(h=f.n()).done;){var p=h.value,y=new Array(0);p.features&&(y=p.features);var g,v=H(y);try{for(v.s();!(g=v.n()).done;){var x=g.value,m=x.sequenceData;if(x.linkedFeatures)for(var b=x.linkedFeatures,E=b.length,A=0;Ar&&(r=u.stoichiometry-0)}}catch(t){s.e(t)}finally{s.f()}}}}catch(t){i.e(t)}finally{i.f()}r<30&&(t=B(t)),bt();var c,l=H(t.data);try{for(l.s();!(c=l.n()).done;){var h=c.value;if("interaction"===h.object){var f=h.id||_t(h),p=n.allNaryLinks.get(f);void 0===p&&(p=new O(f,n),n.allNaryLinks.set(f,p),h.naryId=f);var y,d=H(h.participants);try{for(d.s();!(y=d.n()).done;){var g=y.value,v=g.interactorRef,x=v+"("+g.id+")",m=n.participants.get(x);if(void 0===m)m=mt(n.interactors.get(v),x,v),n.participants.set(x,m);if(m.naryLinks.set(f,p),-1===p.participants.indexOf(m)&&p.participants.push(m),g.stoichiometry)n.participants.get(x).addStoichiometryLabel(g.stoichiometry)}}catch(t){d.e(t)}finally{d.f()}}}}catch(t){l.e(t)}finally{l.f()}}function mt(e,i,o){var a;if(void 0===e||"MI:1302"===e.type.id){var s,u=!1,c=H(t.data);try{for(c.s();!(s=c.n()).done;){var l=s.value;if("interaction"===l.object&&l.id===o){u=!0;break}}}catch(t){c.e(t)}finally{c.f()}u?(a=new C(i,n,o),r.set(i,a)):a=new P(i,n,o,e)}else"MI:1304"===e.type.id||"MI:1305"===e.type.id||"MI:1307"===e.type.id||"MI:1306"===e.type.id?a=new T(i,n,e,e.label):"MI:1100"===e.type.id||"MI:0904"===e.type.id||"MI:0328"===e.type.id?a=new _(i,n,e,e.label):"MI:0326"===e.type.id||"MI:0327"===e.type.id?a=new w(i,n,e,e.label,e.sequence):"MI:0250"===e.type.id?a=new M(i,n,e,e.label):"MI:0320"===e.type.id||"MI:0321"===e.type.id||"MI:0322"===e.type.id||"MI:0323"===e.type.id||"MI:2190"===e.type.id||"MI:0324"===e.type.id||"MI:0679"===e.type.id||"MI:0608"===e.type.id||"MI:0611"===e.type.id||"MI:0610"===e.type.id||"MI:0607"===e.type.id||"MI:0609"===e.type.id||"MI:0325"===e.type.id?a=new k(i,n,e,e.label):"MI:0319"===e.type.id||"MI:0681"===e.type.id||"MI:0680"===e.type.id?a=new S(i,n,e,e.label):alert("Unrecognised type:"+e.type.name);return a}function bt(){var e,r=H(t.data);try{for(r.s();!(e=r.n()).done;){var i=e.value;if("interaction"===i.object){var o,a=H(i.participants);try{for(a.s();!(o=a.n()).done;){var s=o.value,u=new Array(0);s.features&&(u=s.features);for(var c=u.length,l=0;l<"+u:u+"><"+s;var c=n.allSequenceLinks.get(a);if(void 0===c){var l,h=[],f=H(t);try{for(f.s();!(l=f.n()).done;){var p=l.value;h.push(new d(Mt(p),p.pos))}}catch(t){f.e(t)}finally{f.f()}var y,g=[],v=H(r);try{for(v.s();!(y=v.n()).done;){var x=y.value;g.push(new d(Mt(x),x.pos))}}catch(t){v.e(t)}finally{v.f()}c=new q(a,h,g,n,i),n.allSequenceLinks.set(a,c)}var m=_t(i);return n.allNaryLinks.get(m).sequenceLinks.set(a,c),c}function kt(t,e){var r="-"+t.id+"-"+t.id,i=n.allUnaryLinks.get(r);void 0===i&&(i=new V(r,n,t),n.allUnaryLinks.set(r,i),t.appLink=i);var o=_t(e);return n.allNaryLinks.get(o).unaryLinks.set(r,i),i}function Et(t,e,r){var i,o,a;t.idr)&&(r=c)}if(!isNaN(parseFloat(a.uncertainEnd))&&isFinite(a.uncertainEnd)){var l=1*a.uncertainEnd;(null===r||l>r)&&(r=l)}}return n.getResidueCoordinates((e+r)/2,0)}var r,i,o=this.fromSequenceData[0].participant,a=this.toSequenceData[0].participant;o.expanded&&(r=e(this.fromSequenceData,o)),a.expanded&&(i=e(this.toSequenceData,a)),o.expanded||(r=o.getPosition(i)),a.expanded||(i=a.getPosition(r));var s=r,u=i,c=r[0]-i[0],l=r[1]-i[1],h=Math.atan2(l,c)/(2*Math.PI)*360;h<0&&(h+=360);var f=h-o.rotation;f<0&&(f+=360);var p=10;f<180&&(p=-10);var y=o.rotation/360*Math.PI*2;f>180&&(y-=Math.PI),(f=h-a.rotation)<0&&(f+=360);var d=10;f>180&&(d=-10);var g=a.rotation/360*Math.PI*2;f<180&&(g-=Math.PI);var v=[r[0]+30*Math.sin(y)*this.app.z,r[1]-30*Math.cos(y)*this.app.z];o.expanded||(v=r);var x=[i[0]+30*Math.sin(g)*this.app.z,i[1]-30*Math.cos(g)*this.app.z];a.expanded||(x=i);for(var m,b=[(v[0]+x[0])/2,(v[1]+x[1])/2],w=this.fromSequenceData.length,_=this.toSequenceData.length,M="M"+b[0]+","+b[1],S="M"+b[0]+","+b[1],k=0;k=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){e=t[Symbol.iterator]()},n:function(){var t=e.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==e.return||e.return()}finally{if(s)throw o}}}}function $(t,n){if(t){if("string"==typeof t)return J(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?J(t,n):void 0}}function J(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e=0;)et.pruneInvisibleSubtrees(i[a],o[a])}}},parentChain:function(t,n){for(var e=t.ownerDocument||document,r=[];t.parentNode!==e&&null!==t.parentNode;)t=t.parentNode,r.push({id:t.id,class:t.getAttribute("class")||""});return r.forEach((function(t){var e={id:!1,class:!1},r=t.class.split(" ").filter((function(t){return t.length>0}));n.forEach((function(n){for(var i=0;i=0){e.class=!0;break}t.id&&n.indexOf("#"+t.id)>=0&&(e.id=!0)})),Object.keys(e).forEach((function(n){e[n]||(t[n]=void 0)}))})),r},usedStyles:function(t,n,e){for(var r,i=[],o=(t.ownerDocument||document).styleSheets,a=0;a0),n&&!e||(u|=t.matches(r.selectorText))}catch(t){console.warn("CSS selector error: "+r.selectorText+". Often angular issue.",t)}u&&i.push(r.cssText)}}return i},makeXMLStr:function(t,n){var e=t.serializeToString(n);return e=e.split('xmlns="http://www.w3.org/1999/xhtml"').join("")}};function rt(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var e=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(e.push(a.value),!n||e.length!==n);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return e}(t,n)||ot(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function it(t,n){var e;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(e=ot(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){e=t[Symbol.iterator]()},n:function(){var t=e.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==e.return||e.return()}finally{if(s)throw o}}}}function ot(t,n){if(t){if("string"==typeof t)return at(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?at(t,n):void 0}}function at(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){e=t[Symbol.iterator]()},n:function(){var t=e.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==e.return||e.return()}finally{if(s)throw o}}}}function ct(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);eComplexViewer "+r.a+"by Rappsilber Laboratory",this.acknowledgement.appendChild(h),h.setAttribute("font-size","8pt"),this.svgElement.appendChild(this.acknowledgement),this.naryLinks=document.createElementNS(c,"g"),this.naryLinks.setAttribute("id","naryLinks"),this.container.appendChild(this.naryLinks),this.p_pLinksWide=document.createElementNS(c,"g"),this.p_pLinksWide.setAttribute("id","p_pLinksWide"),this.container.appendChild(this.p_pLinksWide),this.highlights=document.createElementNS(c,"g"),this.highlights.setAttribute("class","highlights"),this.container.appendChild(this.highlights),this.res_resLinks=document.createElementNS(c,"g"),this.res_resLinks.setAttribute("id","res_resLinks"),this.container.appendChild(this.res_resLinks),this.p_pLinks=document.createElementNS(c,"g"),this.p_pLinks.setAttribute("id","p_pLinks"),this.container.appendChild(this.p_pLinks),this.proteinUpper=document.createElementNS(c,"g"),this.proteinUpper.setAttribute("id","proteinUpper"),this.container.appendChild(this.proteinUpper),this.selfRes_resLinks=document.createElementNS(c,"g"),this.selfRes_resLinks.setAttribute("id","res_resLinks"),this.container.appendChild(this.selfRes_resLinks),this.svgElement.appendChild(this.container),this.tooltip=document.createElementNS(c,"text"),this.tooltip.setAttribute("x","0"),this.tooltip.setAttribute("y","0");var f=document.createTextNode("tooltip");this.tooltip.classList.add("label","tooltip"),this.tooltip.appendChild(f),this.tooltip_bg=document.createElementNS(c,"rect"),this.tooltip_bg.classList.add("tooltip-background"),this.tooltip_subBg=document.createElementNS(c,"rect"),this.tooltip_subBg.classList.add("tooltip-sub-background"),this.svgElement.appendChild(this.tooltip_subBg),this.svgElement.appendChild(this.tooltip_bg),this.svgElement.appendChild(this.tooltip),this.annotationSetsShown=new Map,this.annotationSetsShown.set("Interactor",!1),this.annotationSetsShown.set("UniprotKB",!1),this.annotationSetsShown.set("Superfamily",!1),this.annotationSetsShown.set("MI Features",!0),this.clear()}lt.prototype.createHatchedFill=function(t,n){if(!this.checkedHatchNames.has(t)){var e=this.defs.append("pattern").attr("id",t).attr("patternUnits","userSpaceOnUse").attr("x",0).attr("y",0).attr("width",12).attr("height",12).attr("patternTransform","rotate(45)");e.append("rect").attr("x",0).attr("y",2).attr("width",12).attr("height",4).attr("fill",n),e.append("rect").attr("x",0).attr("y",8).attr("width",12).attr("height",4).attr("fill",n),this.checkedHatchNames.add(t)}},lt.prototype.clear=function(){this.d3cola.stop();var t,n=[],e=ut(a);try{for(e.s();!(t=e.n()).done;){var r=t.value,o=i.hsl(r);o.l=.9,n.push(o+"")}}catch(t){e.e(t)}finally{e.f()}O.naryColors=i.scale.ordinal().range(n),this.defs.textContent="",this.checkedHatchNames=new Set,this.naryLinks.textContent="",this.p_pLinksWide.textContent="",this.highlights.textContent="",this.p_pLinks.textContent="",this.res_resLinks.textContent="",this.proteinUpper.textContent="",this.selfRes_resLinks.textContent="",this.dragElement=null,this.dragStart={},this.participants=new Map,this.allNaryLinks=new Map,this.allBinaryLinks=new Map,this.allUnaryLinks=new Map,this.allSequenceLinks=new Map,this.complexes=[],this.proteinCount=0,this.z=1,this.hideTooltip(),this.state=this.STATES.MOUSE_UP},lt.prototype.collapseProtein=function(){i.select(".custom-menu-margin").style("display","none"),this.contextMenuProt.setForm(0,this.contextMenuPoint),this.contextMenuProt=null},lt.prototype.init=function(){this.d3cola.stop();var t,n=0,e=ut(this.participants.values());try{for(e.s();!(t=e.n()).done;){var r=t.value;r.size>n&&(n=r.size)}}catch(t){e.e(t)}finally{e.f()}var o,a,s,u=.8*this.svgElement.parentNode.clientWidth/n;this.defaultBarScale=(o=this.barScales,a=u,0===(s=(0,i.bisector((function(t){return t})).left)(o,a))||1===s?o[1]:s===o.length?o[o.length-1]:o[s-1]);var c,l=ut(this.participants.values());try{for(l.s();!(c=l.n()).done;){var h=c.value;"complex"!=h.type&&(h.setPosition(-500,-500),this.proteinUpper.appendChild(h.upperGroup))}}catch(t){l.e(t)}finally{l.f()}var f,p=ut(this.participants.values());try{for(p.s();!(f=p.n()).done;){var y=f.value;"protein"===y.type&&(y.stickZoom=this.defaultBarScale,this.participants.size<4&&y.toStickNoTransition())}}catch(t){p.e(t)}finally{p.f()}this.updateAnnotations();var d=this;!function(t,n){var e,r=Array.from(t.participants.values()).filter((function(t){return"protein"===t.type})),i=0,o=r.length,a=W(r);try{for(a.s();!(e=a.n()).done;){var s=e.value,u=new RegExp("[OPQ][0-9][A-Z0-9]{3}[0-9]|[A-NR-Z][0-9]([A-Z][A-Z0-9]{2}[0-9]){1,2}![-]","i").exec(s.json.identifier.id);u&&u[0]==s.json.identifier.id.trim()&&(tt(s,(function(){++i===o&&n()})),Q(s,(function(){++i===o&&n()})))}}catch(t){a.e(t)}finally{a.f()}}(this,(function(){d.updateAnnotations()})),this.checkLinks(),this.autoLayout()},lt.prototype.zoomToExtent=function(){var t=this.svgElement.parentNode.clientWidth,n=this.svgElement.parentNode.clientHeight,e=this.container.getBBox(),r=(t/e.width).toFixed(4)-0,i=(n/e.height).toFixed(4)-0;if((ithis.z&&(o=this.z);var a=-e.x+20/o,s=-e.y+20/o;this.container.setAttribute("transform","scale("+o+") translate("+a+" "+s+") "),this.z=this.container.getCTM().inverse().a}else{var u=t-e.width,c=n-e.height,l=u/2-e.x,h=c/2-e.y;this.container.setAttribute("transform","scale(1) translate("+l+" "+h+")"),this.z=1}this.acknowledgement.setAttribute("transform","translate("+(t-150)+", "+(n-30)+")")},lt.prototype.mouseDown=function(t){return t.preventDefault(),this.d3cola.stop(),this.dragStart=t,!1},lt.prototype.touchStart=function(t){return t.preventDefault(),this.d3cola.stop(),this.dragStart=t,!1},lt.prototype.mouseMove=function(t){this.move(t)},lt.prototype.touchMove=function(t){this.move(t)},lt.prototype.move=function(t){var n=this.getEventPoint(t),e=this.mouseToSVG(n.x,n.y);if(null!=this.dragElement){this.hideTooltip();var r=this.getEventPoint(this.dragStart),i=this.mouseToSVG(r.x,r.y),o=i.x-e.x,a=i.y-e.y;if(this.state===this.STATES.DRAGGING){var s,u;if(this.dragElement.ix)s=this.dragElement.ix-o,u=this.dragElement.iy-a,this.dragElement.setPosition(s,u),this.dragElement.setAllLinkCoordinates();else{var c,l=ut(this.dragElement.participants);try{for(l.s();!(c=l.n()).done;){c.value.changePosition(o,a)}}catch(t){l.e(t)}finally{l.f()}this.setAllLinkCoordinates()}this.dragStart=t}else Math.sqrt(o*o+a*a)>5*this.z&&(this.state=this.STATES.DRAGGING)}else this.showTooltip(n);return!1},lt.prototype.mouseUp=function(t){var n=(new Date).getTime();this.preventDefaultsAndStopPropagation(t);var e=this.getEventPoint(t);isNaN(e.x)&&(e=this.getEventPoint(this.dragStart));var r=this.mouseToSVG(e.x,e.y);if(this.dragElement&&"protein"===this.dragElement.type&&this.state!==this.STATES.DRAGGING&&this.state!==this.STATES.ROTATING)if(this.dragElement.expanded){this.contextMenuProt=this.dragElement,this.contextMenuPoint=r;var o,a,s=i.select(".custom-menu-margin");t.pageX?(o=t.pageX,a=t.pageY):(o=this.dragStart.touches[0].pageX,a=this.dragStart.touches[0].pageY),s.style("top",a-20+"px").style("left",o-20+"px").style("display","block"),i.select(".scaleButton_"+100*this.dragElement.stickZoom).property("checked",!0)}else this.dragElement.setForm(1);return this.dragElement=null,this.dragStart={},this.state=this.STATES.MOUSE_UP,this.lastMouseUp=n,!1},lt.prototype.getEventPoint=function(t){var n,e,r=this.svgElement.createSVGPoint(),i=this.svgElement.parentNode,o=0,a=0;do{o+=i.offsetTop||0,a+=i.offsetLeft||0,i=i.offsetParent}while(i);return t.touches&&t.touches.length>0?(n=t.touches[0].pageX,e=t.touches[0].pageY):t.pageX&&(n=t.pageX,e=t.pageY),r.x=n-a,r.y=e-o,r},lt.prototype.preventDefaultsAndStopPropagation=function(t){t.stopPropagation&&t.stopPropagation(),null!=t.cancelBubble&&(t.cancelBubble=!0),t.preventDefault&&t.preventDefault()},lt.prototype.autoLayout=function(){this.d3cola.stop();var t,n=this,e=ut(n.participants.values());try{for(e.s();!(t=e.n()).done;){var r=t.value;delete r.x,delete r.y,delete r.px,delete r.py,delete r.bounds,r.fixed=0}}catch(t){e.e(t)}finally{e.f()}var o,a=[],s=ut(n.participants.values());try{for(s.s();!(o=s.n()).done;){var u=o.value;u.binaryLinks.size>2&&"complex"!==u.type&&a.push(u)}}catch(t){s.e(t)}finally{s.f()}var c=Array.from(n.participants.values()).filter((function(t){return"complex"!==t.type}));function l(t,e){var r={};r.nodes=t,r.links=[];var o,a={},s=0,u=ut(t);try{for(u.s();!(o=u.n()).done;){a[o.value.id]=s,s++}}catch(t){u.e(t)}finally{u.f()}var h,f=ut(n.allBinaryLinks.values());try{for(f.s();!(h=f.n()).done;){var p=h.value,y=p.participants[0],d=p.participants[1],g=y,v=d;if(g!==v&&-1!==t.indexOf(g)&&-1!==t.indexOf(v)){var x={};x.source=a[y.id],x.target=a[d.id],x.id=p.id,r.links.push(x)}}}catch(t){f.e(t)}finally{f.f()}var m=[];if(!e&&n.complexes){var b,w=ut(n.complexes);try{for(w.s();!(b=w.n()).done;){var _=b.value;_.leaves=[],_.groups=[];var M,S=ut(_.naryLink.participants);try{for(S.s();!(M=S.n()).done;){var k=M.value;"complex"!==k.type&&_.leaves.push(r.nodes.indexOf(k))}}catch(t){S.e(t)}finally{S.f()}m.push(_)}}catch(t){w.e(t)}finally{w.f()}var E,A=ut(n.complexes);try{for(A.s();!(E=A.n()).done;){var L,N=E.value,C=ut(N.naryLink.participants);try{for(C.s();!(L=C.n()).done;){var P=L.value;"complex"===P.type&&N.groups.push(m.indexOf(P))}}catch(t){C.e(t)}finally{C.f()}}}catch(t){A.e(t)}finally{A.f()}}delete n.d3cola._lastStress,delete n.d3cola._alpha,delete n.d3cola._descent,delete n.d3cola._rootGroup;var T,I,z=t.length<30?30:20,D=n.svgElement.parentNode.clientWidth,O=n.svgElement.parentNode.clientHeight;n.d3cola.size([O-40,D-40]).nodes(r.nodes).groups(m).links(r.links).avoidOverlaps(!0),n.debug&&((T=i.select(n.container).selectAll(".group").data(m)).enter().append("rect").classed("group",!0).attr({rx:5,ry:5}).style("stroke","blue").style("fill","none"),(I=i.select(n.container).selectAll(".node").data(r.nodes)).enter().append("rect").classed("node",!0).attr({rx:5,ry:5}).style("stroke","red").style("fill","none"),T.exit().remove(),I.exit().remove());var q=Date.now();n.d3cola.symmetricDiffLinkLengths(z).on("tick",(function(){if(Date.now()-q>750){ -//!preRun) { -var t,e=ut(n.d3cola.nodes());try{for(e.s();!(t=e.n()).done;){var r=t.value;r.setPosition(r.x,r.y)}}catch(t){e.e(t)}finally{e.f()}n.setAllLinkCoordinates(),n.zoomToExtent(),n.debug&&(T.attr({x:function(t){return t.bounds.x},y:function(t){return t.bounds.y},width:function(t){return t.bounds.width()},height:function(t){return t.bounds.height()}}),I.attr({x:function(t){return t.bounds.x},y:function(t){return t.bounds.y},width:function(t){return t.bounds.width()},height:function(t){return t.bounds.height()}}))}})).on("end",(function(){if(e)l(c,!1);else{var r,i=ut(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.setPosition(o.x,o.y)}}catch(t){i.e(t)}finally{i.f()}n.setAllLinkCoordinates(),n.zoomToExtent()}})),e?n.d3cola.start(23,23,0,0,!0):n.d3cola.start(0,23,23,0,!0)}a.length3&&n.participants.size<9?l(a,!0):l(c,n.complexes.length>0)},lt.prototype.getSVG=function(){var t=[i.select(this.el).selectAll("svg").node()],n=et.capture(t);return et.makeXMLStr(new XMLSerializer,n[0])},lt.prototype.mouseToSVG=function(t,n){var e=this.svgElement.createSVGPoint();return e.x=t,e.y=n,e.matrixTransform(this.container.getCTM().inverse())},lt.prototype.readMIJSON=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Z(t,this,n),this.init()},lt.prototype.checkLinks=function(){var t,n=ut(this.allNaryLinks.values());try{for(n.s();!(t=n.n()).done;){t.value.check()}}catch(t){n.e(t)}finally{n.f()}var e,r=ut(this.allBinaryLinks.values());try{for(r.s();!(e=r.n()).done;){e.value.check()}}catch(t){r.e(t)}finally{r.f()}var i,o=ut(this.allUnaryLinks.values());try{for(o.s();!(i=o.n()).done;){i.value.check()}}catch(t){o.e(t)}finally{o.f()}var a,s=ut(this.allSequenceLinks.values());try{for(s.s();!(a=s.n()).done;){a.value.check()}}catch(t){s.e(t)}finally{s.f()}},lt.prototype.setAllLinkCoordinates=function(){var t,n=ut(this.allNaryLinks.values());try{for(n.s();!(t=n.n()).done;){t.value.setLinkCoordinates()}}catch(t){n.e(t)}finally{n.f()}var e,r=ut(this.allBinaryLinks.values());try{for(r.s();!(e=r.n()).done;){e.value.setLinkCoordinates()}}catch(t){r.e(t)}finally{r.f()}var i,o=ut(this.allUnaryLinks.values());try{for(o.s();!(i=o.n()).done;){i.value.setLinkCoordinates()}}catch(t){o.e(t)}finally{o.f()}var a,s=ut(this.allSequenceLinks.values());try{for(s.s();!(a=s.n()).done;){a.value.setLinkCoordinates()}}catch(t){s.e(t)}finally{s.f()}},lt.prototype.showTooltip=function(t){var n,e,r=this.tooltip.getComputedTextLength()+16,i=this.svgElement.parentNode.clientWidth,o=this.svgElement.parentNode.clientHeight;n=t.x+20+r> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nfunction rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nfunction rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nfunction Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Rgb, rgb, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb: function() {\n return this;\n },\n displayable: function() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"rgb(\" : \"rgba(\")\n + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n value = Math.max(0, Math.min(255, Math.round(value) || 0));\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nfunction hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nfunction hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Hsl, hsl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n displayable: function() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl: function() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"hsl(\" : \"hsla(\")\n + (this.h || 0) + \", \"\n + (this.s || 0) * 100 + \"%, \"\n + (this.l || 0) * 100 + \"%\"\n + (a === 1 ? \")\" : \", \" + a + \")\");\n }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtY29sb3Ivc3JjL2NvbG9yLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY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NBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-color/src/color.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-color/src/cubehelix.js": +/*!************************************************!*\ + !*** ./node_modules/d3-color/src/cubehelix.js ***! + \************************************************/ +/*! exports provided: default, Cubehelix */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return cubehelix; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Cubehelix\", function() { return Cubehelix; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3-color/src/define.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-color/src/color.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-color/src/math.js\");\n\n\n\n\nvar A = -0.14861,\n B = +1.78277,\n C = -0.29227,\n D = -0.90649,\n E = +1.97294,\n ED = E * D,\n EB = E * B,\n BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"rgbConvert\"])(o);\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n bl = b - l,\n k = (E * (g - l) - C * bl) / D,\n s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n h = s ? Math.atan2(k, bl) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"rad2deg\"] - 120 : NaN;\n return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nfunction cubehelix(h, s, l, opacity) {\n return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Cubehelix(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Cubehelix, cubehelix, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n brighter: function(k) {\n k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__[\"brighter\"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"brighter\"], k);\n return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__[\"darker\"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"darker\"], k);\n return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function() {\n var h = isNaN(this.h) ? 0 : (this.h + 120) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"deg2rad\"],\n l = +this.l,\n a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n cosh = Math.cos(h),\n sinh = Math.sin(h);\n return new _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"](\n 255 * (l + a * (A * cosh + B * sinh)),\n 255 * (l + a * (C * cosh + D * sinh)),\n 255 * (l + a * (E * cosh)),\n this.opacity\n );\n }\n}));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtY29sb3Ivc3JjL2N1YmVoZWxpeC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtY29sb3Ivc3JjL2N1YmVoZWxpeC5qcz8xNWE3Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBkZWZpbmUsIHtleHRlbmR9IGZyb20gXCIuL2RlZmluZS5qc1wiO1xuaW1wb3J0IHtDb2xvciwgcmdiQ29udmVydCwgUmdiLCBkYXJrZXIsIGJyaWdodGVyfSBmcm9tIFwiLi9jb2xvci5qc1wiO1xuaW1wb3J0IHtkZWcycmFkLCByYWQyZGVnfSBmcm9tIFwiLi9tYXRoLmpzXCI7XG5cbnZhciBBID0gLTAuMTQ4NjEsXG4gICAgQiA9ICsxLjc4Mjc3LFxuICAgIEMgPSAtMC4yOTIyNyxcbiAgICBEID0gLTAuOTA2NDksXG4gICAgRSA9ICsxLjk3Mjk0LFxuICAgIEVEID0gRSAqIEQsXG4gICAgRUIgPSBFICogQixcbiAgICBCQ19EQSA9IEIgKiBDIC0gRCAqIEE7XG5cbmZ1bmN0aW9uIGN1YmVoZWxpeENvbnZlcnQobykge1xuICBpZiAobyBpbnN0YW5jZW9mIEN1YmVo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QTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-color/src/cubehelix.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-color/src/define.js": +/*!*********************************************!*\ + !*** ./node_modules/d3-color/src/define.js ***! + \*********************************************/ +/*! exports provided: default, extend */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"extend\", function() { return extend; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n});\n\nfunction extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtY29sb3Ivc3JjL2RlZmluZS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtY29sb3Ivc3JjL2RlZmluZS5qcz82M2FkIl0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGNvbnN0cnVjdG9yLCBmYWN0b3J5LCBwcm90b3R5cGUpIHtcbiAgY29uc3RydWN0b3IucHJvdG90eXBlID0gZmFjdG9yeS5wcm90b3R5cGUgPSBwcm90b3R5cGU7XG4gIHByb3RvdHlwZS5jb25zdHJ1Y3RvciA9IGNvbnN0cnVjdG9yO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gZXh0ZW5kKHBhcmVudCwgZGVmaW5pdGlvbikge1xuICB2YXIgcHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShwYXJlbnQucHJvdG90eXBlKTtcbiAgZm9yICh2YXIga2V5IGluIGRlZmluaXRpb24pIHByb3RvdHlwZVtrZXldID0gZGVmaW5pdGlvbltrZXldO1xuICByZXR1cm4gcHJvdG90eXBlO1xufVxuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-color/src/define.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-color/src/index.js": +/*!********************************************!*\ + !*** ./node_modules/d3-color/src/index.js ***! + \********************************************/ +/*! exports provided: color, rgb, hsl, lab, hcl, lch, gray, cubehelix */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-color/src/color.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"color\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rgb\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hsl\", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"]; });\n\n/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lab.js */ \"./node_modules/d3-color/src/lab.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lab\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hcl\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"hcl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lch\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"lch\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gray\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__[\"gray\"]; });\n\n/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubehelix.js */ \"./node_modules/d3-color/src/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cubehelix\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n\n\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtY29sb3Ivc3JjL2luZGV4LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1jb2xvci9zcmMvaW5kZXguanM/NDgyZiJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQge2RlZmF1bHQgYXMgY29sb3IsIHJnYiwgaHNsfSBmcm9tIFwiLi9jb2xvci5qc1wiO1xuZXhwb3J0IHtkZWZhdWx0IGFzIGxhYiwgaGNsLCBsY2gsIGdyYXl9IGZyb20gXCIuL2xhYi5qc1wiO1xuZXhwb3J0IHtkZWZhdWx0IGFzIGN1YmVoZWxpeH0gZnJvbSBcIi4vY3ViZWhlbGl4LmpzXCI7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-color/src/index.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-color/src/lab.js": +/*!******************************************!*\ + !*** ./node_modules/d3-color/src/lab.js ***! + \******************************************/ +/*! exports provided: gray, default, Lab, lch, hcl, Hcl */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gray\", function() { return gray; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return lab; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Lab\", function() { return Lab; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lch\", function() { return lch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hcl\", function() { return hcl; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Hcl\", function() { return Hcl; });\n/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ \"./node_modules/d3-color/src/define.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-color/src/color.js\");\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ \"./node_modules/d3-color/src/math.js\");\n\n\n\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nvar K = 18,\n Xn = 0.96422,\n Yn = 1,\n Zn = 0.82521,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n if (o instanceof Hcl) return hcl2lab(o);\n if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"rgbConvert\"])(o);\n var r = rgb2lrgb(o.r),\n g = rgb2lrgb(o.g),\n b = rgb2lrgb(o.b),\n y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n if (r === g && g === b) x = z = y; else {\n x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n }\n return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nfunction gray(l, opacity) {\n return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nfunction lab(l, a, b, opacity) {\n return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nfunction Lab(l, a, b, opacity) {\n this.l = +l;\n this.a = +a;\n this.b = +b;\n this.opacity = +opacity;\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Lab, lab, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n brighter: function(k) {\n return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n darker: function(k) {\n return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n rgb: function() {\n var y = (this.l + 16) / 116,\n x = isNaN(this.a) ? y : y + this.a / 500,\n z = isNaN(this.b) ? y : y - this.b / 200;\n x = Xn * lab2xyz(x);\n y = Yn * lab2xyz(y);\n z = Zn * lab2xyz(z);\n return new _color_js__WEBPACK_IMPORTED_MODULE_1__[\"Rgb\"](\n lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n this.opacity\n );\n }\n}));\n\nfunction xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n if (!(o instanceof Lab)) o = labConvert(o);\n if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n var h = Math.atan2(o.b, o.a) * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"rad2deg\"];\n return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nfunction lch(l, c, h, opacity) {\n return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nfunction hcl(h, c, l, opacity) {\n return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hcl(h, c, l, opacity) {\n this.h = +h;\n this.c = +c;\n this.l = +l;\n this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n var h = o.h * _math_js__WEBPACK_IMPORTED_MODULE_2__[\"deg2rad\"];\n return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\nObject(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Hcl, hcl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__[\"extend\"])(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"Color\"], {\n brighter: function(k) {\n return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n },\n darker: function(k) {\n return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n },\n rgb: function() {\n return hcl2lab(this).rgb();\n }\n}));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtY29sb3Ivc3JjL2xhYi5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtY29sb3Ivc3JjL2xhYi5qcz82MmYwIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBkZWZpbmUsIHtleHRlbmR9IGZyb20gXCIuL2RlZmluZS5qc1wiO1xuaW1wb3J0IHtDb2xvciwgcmdiQ29udmVydCwgUmdifSBmcm9tIFwiLi9jb2xvci5qc1wiO1xuaW1wb3J0IHtkZWcycmFkLCByYWQyZGVnfSBmcm9tIFwiLi9tYXRoLmpzXCI7XG5cbi8vIGh0dHBzOi8vb2JzZXJ2YWJsZWhxLmNvbS9AbWJvc3RvY2svbGFiLWFuZC1yZ2JcbnZhciBLID0gMTgsXG4gICAgWG4gPSAwLjk2NDIyLFxuICAgIFluID0gMSxcbiAgICBabiA9IDAuODI1MjEsXG4gICAgdDAgPSA0IC8gMjksXG4gICAgdDEgPSA2IC8gMjks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NBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-color/src/lab.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-color/src/math.js": +/*!*******************************************!*\ + !*** ./node_modules/d3-color/src/math.js ***! + \*******************************************/ +/*! exports provided: deg2rad, rad2deg */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"deg2rad\", function() { return deg2rad; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rad2deg\", function() { return rad2deg; });\nvar deg2rad = Math.PI / 180;\nvar rad2deg = 180 / Math.PI;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtY29sb3Ivc3JjL21hdGguanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9jb21wbGV4dmlld2VyLy4vbm9kZV9tb2R1bGVzL2QzLWNvbG9yL3NyYy9tYXRoLmpzPzUzMGEiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHZhciBkZWcycmFkID0gTWF0aC5QSSAvIDE4MDtcbmV4cG9ydCB2YXIgcmFkMmRlZyA9IDE4MCAvIE1hdGguUEk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-color/src/math.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/array.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-interpolate/src/array.js ***! + \**************************************************/ +/*! exports provided: default, genericArray */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"genericArray\", function() { return genericArray; });\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-interpolate/src/value.js\");\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3-interpolate/src/numberArray.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n return (Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_1__[\"isNumberArray\"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : genericArray)(a, b);\n});\n\nfunction genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL2FycmF5LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1pbnRlcnBvbGF0ZS9zcmMvYXJyYXkuanM/NjczMCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdmFsdWUgZnJvbSBcIi4vdmFsdWUuanNcIjtcbmltcG9ydCBudW1iZXJBcnJheSwge2lzTnVtYmVyQXJyYXl9IGZyb20gXCIuL251bWJlckFycmF5LmpzXCI7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGEsIGIpIHtcbiAgcmV0dXJuIChpc051bWJlckFycmF5KGIpID8gbnVtYmVyQXJyYXkgOiBnZW5lcmljQXJyYXkpKGEsIGIpO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gZ2VuZXJpY0FycmF5KGEsIGIpIHtcbiAgdmFyIG5iID0gYiA/IGIubGVuZ3RoIDogMCxcbiAgICAgIG5hID0gYSA/IE1hdGgubWluKG5iLCBhLmxlbmd0aCkgOiAwLFxuICAgICAgeCA9IG5ldyBBcnJheShuYSksXG4gICAgICBjID0gbmV3IEFycmF5KG5iKSxcbiAgICAgIGk7XG5cbiAgZm9yIChpID0gMDsgaSA8IG5hOyArK2kpIHhbaV0gPSB2YWx1ZShhW2ldLCBiW2ldKTtcbiAgZm9yICg7IGkgPCBuYjsgKytpKSBjW2ldID0gYltpXTtcblxuICByZXR1cm4gZnVuY3Rpb24odCkge1xuICAgIGZvciAoaSA9IDA7IGkgPCBuYTsgKytpKSBjW2ldID0geFtpXSh0KTtcbiAgICByZXR1cm4gYztcbiAgfTtcbn1cbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/array.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/basis.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-interpolate/src/basis.js ***! + \**************************************************/ +/*! exports provided: basis, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"basis\", function() { return basis; });\nfunction basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1, t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n + (4 - 6 * t2 + 3 * t3) * v1\n + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n + t3 * v3) / 6;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n var n = values.length - 1;\n return function(t) {\n var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL2Jhc2lzLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1pbnRlcnBvbGF0ZS9zcmMvYmFzaXMuanM/Yzg0YSJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gYmFzaXModDEsIHYwLCB2MSwgdjIsIHYzKSB7XG4gIHZhciB0MiA9IHQxICogdDEsIHQzID0gdDIgKiB0MTtcbiAgcmV0dXJuICgoMSAtIDMgKiB0MSArIDMgKiB0MiAtIHQzKSAqIHYwXG4gICAgICArICg0IC0gNiAqIHQyICsgMyAqIHQzKSAqIHYxXG4gICAgICArICgxICsgMyAqIHQxICsgMyAqIHQyIC0gMyAqIHQzKSAqIHYyXG4gICAgICArIHQzICogdjMpIC8gNjtcbn1cblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24odmFsdWVzKSB7XG4gIHZhciBuID0gdmFsdWVzLmxlbmd0aCAtIDE7XG4gIHJldHVybiBmdW5jdGlvbih0KSB7XG4gICAgdmFyIGkgPSB0IDw9IDAgPyAodCA9IDApIDogdCA+PSAxID8gKHQgPSAxLCBuIC0gMSkgOiBNYXRoLmZsb29yKHQgKiBuKSxcbiAgICAgICAgdjEgPSB2YWx1ZXNbaV0sXG4gICAgICAgIHYyID0gdmFsdWVzW2kgKyAxXSxcbiAgICAgICAgdjAgPSBpID4gMCA/IHZhbHVlc1tpIC0gMV0gOiAyICogdjEgLSB2MixcbiAgICAgICAgdjMgPSBpIDwgbiAtIDEgPyB2YWx1ZXNbaSArIDJdIDogMiAqIHYyIC0gdjE7XG4gICAgcmV0dXJuIGJhc2lzKCh0IC0gaSAvIG4pICogbiwgdjAsIHYxLCB2MiwgdjMpO1xuICB9O1xufVxuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/basis.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/basisClosed.js": +/*!********************************************************!*\ + !*** ./node_modules/d3-interpolate/src/basisClosed.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-interpolate/src/basis.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(values) {\n var n = values.length;\n return function(t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__[\"basis\"])((t - i / n) * n, v0, v1, v2, v3);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL2Jhc2lzQ2xvc2VkLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1pbnRlcnBvbGF0ZS9zcmMvYmFzaXNDbG9zZWQuanM/NGJjZCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge2Jhc2lzfSBmcm9tIFwiLi9iYXNpcy5qc1wiO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbih2YWx1ZXMpIHtcbiAgdmFyIG4gPSB2YWx1ZXMubGVuZ3RoO1xuICByZXR1cm4gZnVuY3Rpb24odCkge1xuICAgIHZhciBpID0gTWF0aC5mbG9vcigoKHQgJT0gMSkgPCAwID8gKyt0IDogdCkgKiBuKSxcbiAgICAgICAgdjAgPSB2YWx1ZXNbKGkgKyBuIC0gMSkgJSBuXSxcbiAgICAgICAgdjEgPSB2YWx1ZXNbaSAlIG5dLFxuICAgICAgICB2MiA9IHZhbHVlc1soaSArIDEpICUgbl0sXG4gICAgICAgIHYzID0gdmFsdWVzWyhpICsgMikgJSBuXTtcbiAgICByZXR1cm4gYmFzaXMoKHQgLSBpIC8gbikgKiBuLCB2MCwgdjEsIHYyLCB2Myk7XG4gIH07XG59XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/basisClosed.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/color.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-interpolate/src/color.js ***! + \**************************************************/ +/*! exports provided: hue, gamma, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hue\", function() { return hue; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gamma\", function() { return gamma; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return nogamma; });\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-interpolate/src/constant.js\");\n\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nfunction hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n}\n\nfunction gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n };\n}\n\nfunction nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(isNaN(a) ? b : a);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJza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sIGIpIHtcbiAgdmFyIGQgPSBiIC0gYTtcbiAgcmV0dXJuIGQgPyBsaW5lYXIoYSwgZCkgOiBjb25zdGFudChpc05hTihhKSA/IGIgOiBhKTtcbn1cbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/color.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/constant.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-interpolate/src/constant.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(x) {\n return function() {\n return x;\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL2NvbnN0YW50LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1pbnRlcnBvbGF0ZS9zcmMvY29uc3RhbnQuanM/YzY5OCJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbih4KSB7XG4gIHJldHVybiBmdW5jdGlvbigpIHtcbiAgICByZXR1cm4geDtcbiAgfTtcbn1cbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/constant.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/cubehelix.js": +/*!******************************************************!*\ + !*** ./node_modules/d3-interpolate/src/cubehelix.js ***! + \******************************************************/ +/*! exports provided: default, cubehelixLong */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cubehelixLong\", function() { return cubehelixLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction cubehelix(hue) {\n return (function cubehelixGamma(y) {\n y = +y;\n\n function cubehelix(start, end) {\n var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(end)).h),\n s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.s, end.s),\n l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.s = s(t);\n start.l = l(Math.pow(t, y));\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n cubehelix.gamma = cubehelixGamma;\n\n return cubehelix;\n })(1);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar cubehelixLong = cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL2N1YmVoZWxpeC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL2N1YmVoZWxpeC5qcz8zODcyIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7Y3ViZWhlbGl4IGFzIGNvbG9yQ3ViZWhlbGl4fSBmcm9tIFwiZDMtY29sb3JcIjtcbmltcG9ydCBjb2xvciwge2h1ZX0gZnJvbSBcIi4vY29sb3IuanNcIjtcblxuZnVuY3Rpb24gY3ViZWhlbGl4KGh1ZSkge1xuICByZXR1cm4gKGZ1bmN0aW9uIGN1YmVoZWxpeEdhbW1hKHkpIHtcbiAgICB5ID0gK3k7XG5cbiAgICBmdW5jdGlvbiBjdWJlaGVsaXgoc3RhcnQsIGVuZCkge1xuICAgICAgdmFyIGggPSBodWUoKHN0YXJ0ID0gY29sb3JDdWJlaGVsaXgoc3RhcnQpKS5oLCAoZW5kID0gY29sb3JDdWJlaGVsaXgoZW5kKSkuaCksXG4gICAgICAgICAgcyA9IGNvbG9yKHN0YXJ0LnMsIGVuZC5zKSxcbiAgICAgICAgICBsID0gY29sb3Ioc3RhcnQubCwgZW5kLmwpLFxuICAgICAgICAgIG9wYWNpdHkgPSBjb2xvcihzdGFydC5vcGFjaXR5LCBlbmQub3BhY2l0eSk7XG4gICAgICByZXR1cm4gZnVuY3Rpb24odCkge1xuICAgICAgICBzdGFydC5oID0gaCh0KTtcbiAgICAgICAgc3RhcnQucyA9IHModCk7XG4gICAgICAgIHN0YXJ0LmwgPSBsKE1hdGgucG93KHQsIHkpKTtcbiAgICAgICAgc3RhcnQub3BhY2l0eSA9IG9wYWNpdHkodCk7XG4gICAgICAgIHJldHVybiBzdGFydCArIFwiXCI7XG4gICAgICB9O1xuICAgIH1cblxuICAgIGN1YmVoZWxpeC5nYW1tYSA9IGN1YmVoZWxpeEdhbW1hO1xuXG4gICAgcmV0dXJuIGN1YmVoZWxpeDtcbiAgfSkoMSk7XG59XG5cbmV4cG9ydCBkZWZhdWx0IGN1YmVoZWxpeChodWUpO1xuZXhwb3J0IHZhciBjdWJlaGVsaXhMb25nID0gY3ViZWhlbGl4KGNvbG9yKTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/cubehelix.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/date.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-interpolate/src/date.js ***! + \*************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL2RhdGUuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9jb21wbGV4dmlld2VyLy4vbm9kZV9tb2R1bGVzL2QzLWludGVycG9sYXRlL3NyYy9kYXRlLmpzPzFiNmQiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oYSwgYikge1xuICB2YXIgZCA9IG5ldyBEYXRlO1xuICByZXR1cm4gYSA9ICthLCBiID0gK2IsIGZ1bmN0aW9uKHQpIHtcbiAgICByZXR1cm4gZC5zZXRUaW1lKGEgKiAoMSAtIHQpICsgYiAqIHQpLCBkO1xuICB9O1xufVxuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/date.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/discrete.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-interpolate/src/discrete.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(range) {\n var n = range.length;\n return function(t) {\n return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL2Rpc2NyZXRlLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1pbnRlcnBvbGF0ZS9zcmMvZGlzY3JldGUuanM/NTA2MSJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbihyYW5nZSkge1xuICB2YXIgbiA9IHJhbmdlLmxlbmd0aDtcbiAgcmV0dXJuIGZ1bmN0aW9uKHQpIHtcbiAgICByZXR1cm4gcmFuZ2VbTWF0aC5tYXgoMCwgTWF0aC5taW4obiAtIDEsIE1hdGguZmxvb3IodCAqIG4pKSldO1xuICB9O1xufVxuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/discrete.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/hcl.js": +/*!************************************************!*\ + !*** ./node_modules/d3-interpolate/src/hcl.js ***! + \************************************************/ +/*! exports provided: default, hclLong */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hclLong\", function() { return hclLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction hcl(hue) {\n return function(start, end) {\n var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hcl\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hcl\"])(end)).h),\n c = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.c, end.c),\n l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.c = c(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar hclLong = hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL2hjbC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL2hjbC5qcz81YWNmIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7aGNsIGFzIGNvbG9ySGNsfSBmcm9tIFwiZDMtY29sb3JcIjtcbmltcG9ydCBjb2xvciwge2h1ZX0gZnJvbSBcIi4vY29sb3IuanNcIjtcblxuZnVuY3Rpb24gaGNsKGh1ZSkge1xuICByZXR1cm4gZnVuY3Rpb24oc3RhcnQsIGVuZCkge1xuICAgIHZhciBoID0gaHVlKChzdGFydCA9IGNvbG9ySGNsKHN0YXJ0KSkuaCwgKGVuZCA9IGNvbG9ySGNsKGVuZCkpLmgpLFxuICAgICAgICBjID0gY29sb3Ioc3RhcnQuYywgZW5kLmMpLFxuICAgICAgICBsID0gY29sb3Ioc3RhcnQubCwgZW5kLmwpLFxuICAgICAgICBvcGFjaXR5ID0gY29sb3Ioc3RhcnQub3BhY2l0eSwgZW5kLm9wYWNpdHkpO1xuICAgIHJldHVybiBmdW5jdGlvbih0KSB7XG4gICAgICBzdGFydC5oID0gaCh0KTtcbiAgICAgIHN0YXJ0LmMgPSBjKHQpO1xuICAgICAgc3RhcnQubCA9IGwodCk7XG4gICAgICBzdGFydC5vcGFjaXR5ID0gb3BhY2l0eSh0KTtcbiAgICAgIHJldHVybiBzdGFydCArIFwiXCI7XG4gICAgfTtcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBoY2woaHVlKTtcbmV4cG9ydCB2YXIgaGNsTG9uZyA9IGhjbChjb2xvcik7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/hcl.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/hsl.js": +/*!************************************************!*\ + !*** ./node_modules/d3-interpolate/src/hsl.js ***! + \************************************************/ +/*! exports provided: default, hslLong */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hslLong\", function() { return hslLong; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction hsl(hue) {\n return function(start, end) {\n var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"hsl\"])(end)).h),\n s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.s, end.s),\n l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.l, end.l),\n opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.s = s(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"hue\"]));\nvar hslLong = hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL2hzbC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL2hzbC5qcz83MGQ4Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7aHNsIGFzIGNvbG9ySHNsfSBmcm9tIFwiZDMtY29sb3JcIjtcbmltcG9ydCBjb2xvciwge2h1ZX0gZnJvbSBcIi4vY29sb3IuanNcIjtcblxuZnVuY3Rpb24gaHNsKGh1ZSkge1xuICByZXR1cm4gZnVuY3Rpb24oc3RhcnQsIGVuZCkge1xuICAgIHZhciBoID0gaHVlKChzdGFydCA9IGNvbG9ySHNsKHN0YXJ0KSkuaCwgKGVuZCA9IGNvbG9ySHNsKGVuZCkpLmgpLFxuICAgICAgICBzID0gY29sb3Ioc3RhcnQucywgZW5kLnMpLFxuICAgICAgICBsID0gY29sb3Ioc3RhcnQubCwgZW5kLmwpLFxuICAgICAgICBvcGFjaXR5ID0gY29sb3Ioc3RhcnQub3BhY2l0eSwgZW5kLm9wYWNpdHkpO1xuICAgIHJldHVybiBmdW5jdGlvbih0KSB7XG4gICAgICBzdGFydC5oID0gaCh0KTtcbiAgICAgIHN0YXJ0LnMgPSBzKHQpO1xuICAgICAgc3RhcnQubCA9IGwodCk7XG4gICAgICBzdGFydC5vcGFjaXR5ID0gb3BhY2l0eSh0KTtcbiAgICAgIHJldHVybiBzdGFydCArIFwiXCI7XG4gICAgfTtcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBoc2woaHVlKTtcbmV4cG9ydCB2YXIgaHNsTG9uZyA9IGhzbChjb2xvcik7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/hsl.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/hue.js": +/*!************************************************!*\ + !*** ./node_modules/d3-interpolate/src/hue.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-interpolate/src/color.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n var i = Object(_color_js__WEBPACK_IMPORTED_MODULE_0__[\"hue\"])(+a, +b);\n return function(t) {\n var x = i(t);\n return x - 360 * Math.floor(x / 360);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL2h1ZS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL2h1ZS5qcz81M2EzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7aHVlfSBmcm9tIFwiLi9jb2xvci5qc1wiO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbihhLCBiKSB7XG4gIHZhciBpID0gaHVlKCthLCArYik7XG4gIHJldHVybiBmdW5jdGlvbih0KSB7XG4gICAgdmFyIHggPSBpKHQpO1xuICAgIHJldHVybiB4IC0gMzYwICogTWF0aC5mbG9vcih4IC8gMzYwKTtcbiAgfTtcbn1cbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/hue.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/index.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-interpolate/src/index.js ***! + \**************************************************/ +/*! exports provided: interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-interpolate/src/value.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolate\", function() { return _value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-interpolate/src/array.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateArray\", function() { return _array_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-interpolate/src/basis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasis\", function() { return _basis_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./basisClosed.js */ \"./node_modules/d3-interpolate/src/basisClosed.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBasisClosed\", function() { return _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./date.js */ \"./node_modules/d3-interpolate/src/date.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDate\", function() { return _date_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _discrete_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./discrete.js */ \"./node_modules/d3-interpolate/src/discrete.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateDiscrete\", function() { return _discrete_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _hue_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hue.js */ \"./node_modules/d3-interpolate/src/hue.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHue\", function() { return _hue_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-interpolate/src/number.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumber\", function() { return _number_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3-interpolate/src/numberArray.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateNumberArray\", function() { return _numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./object.js */ \"./node_modules/d3-interpolate/src/object.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateObject\", function() { return _object_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./round.js */ \"./node_modules/d3-interpolate/src/round.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRound\", function() { return _round_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./string.js */ \"./node_modules/d3-interpolate/src/string.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateString\", function() { return _string_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _transform_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./transform/index.js */ \"./node_modules/d3-interpolate/src/transform/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformCss\", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__[\"interpolateTransformCss\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformSvg\", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__[\"interpolateTransformSvg\"]; });\n\n/* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./zoom.js */ \"./node_modules/d3-interpolate/src/zoom.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateZoom\", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./rgb.js */ \"./node_modules/d3-interpolate/src/rgb.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgb\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasis\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"rgbBasis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRgbBasisClosed\", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__[\"rgbBasisClosed\"]; });\n\n/* harmony import */ var _hsl_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./hsl.js */ \"./node_modules/d3-interpolate/src/hsl.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHsl\", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHslLong\", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__[\"hslLong\"]; });\n\n/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./lab.js */ \"./node_modules/d3-interpolate/src/lab.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateLab\", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _hcl_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./hcl.js */ \"./node_modules/d3-interpolate/src/hcl.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHcl\", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateHclLong\", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__[\"hclLong\"]; });\n\n/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./cubehelix.js */ \"./node_modules/d3-interpolate/src/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelix\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixLong\", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__[\"cubehelixLong\"]; });\n\n/* harmony import */ var _piecewise_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./piecewise.js */ \"./node_modules/d3-interpolate/src/piecewise.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"piecewise\", function() { return _piecewise_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony import */ var _quantize_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./quantize.js */ \"./node_modules/d3-interpolate/src/quantize.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"quantize\", function() { return _quantize_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL2luZGV4LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWx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BQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/index.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/lab.js": +/*!************************************************!*\ + !*** ./node_modules/d3-interpolate/src/lab.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return lab; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-interpolate/src/color.js\");\n\n\n\nfunction lab(start, end) {\n var l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"lab\"])(start)).l, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"lab\"])(end)).l),\n a = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.a, end.a),\n b = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.b, end.b),\n opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(start.opacity, end.opacity);\n return function(t) {\n start.l = l(t);\n start.a = a(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL2xhYi5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL2xhYi5qcz8xMjVlIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7bGFiIGFzIGNvbG9yTGFifSBmcm9tIFwiZDMtY29sb3JcIjtcbmltcG9ydCBjb2xvciBmcm9tIFwiLi9jb2xvci5qc1wiO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBsYWIoc3RhcnQsIGVuZCkge1xuICB2YXIgbCA9IGNvbG9yKChzdGFydCA9IGNvbG9yTGFiKHN0YXJ0KSkubCwgKGVuZCA9IGNvbG9yTGFiKGVuZCkpLmwpLFxuICAgICAgYSA9IGNvbG9yKHN0YXJ0LmEsIGVuZC5hKSxcbiAgICAgIGIgPSBjb2xvcihzdGFydC5iLCBlbmQuYiksXG4gICAgICBvcGFjaXR5ID0gY29sb3Ioc3RhcnQub3BhY2l0eSwgZW5kLm9wYWNpdHkpO1xuICByZXR1cm4gZnVuY3Rpb24odCkge1xuICAgIHN0YXJ0LmwgPSBsKHQpO1xuICAgIHN0YXJ0LmEgPSBhKHQpO1xuICAgIHN0YXJ0LmIgPSBiKHQpO1xuICAgIHN0YXJ0Lm9wYWNpdHkgPSBvcGFjaXR5KHQpO1xuICAgIHJldHVybiBzdGFydCArIFwiXCI7XG4gIH07XG59XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/lab.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/number.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-interpolate/src/number.js ***! + \***************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL251bWJlci5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL251bWJlci5qcz9lMzE3Il0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGEsIGIpIHtcbiAgcmV0dXJuIGEgPSArYSwgYiA9ICtiLCBmdW5jdGlvbih0KSB7XG4gICAgcmV0dXJuIGEgKiAoMSAtIHQpICsgYiAqIHQ7XG4gIH07XG59XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/number.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/numberArray.js": +/*!********************************************************!*\ + !*** ./node_modules/d3-interpolate/src/numberArray.js ***! + \********************************************************/ +/*! exports provided: default, isNumberArray */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isNumberArray\", function() { return isNumberArray; });\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n});\n\nfunction isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL251bWJlckFycmF5LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1pbnRlcnBvbGF0ZS9zcmMvbnVtYmVyQXJyYXkuanM/NTFkZSJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbihhLCBiKSB7XG4gIGlmICghYikgYiA9IFtdO1xuICB2YXIgbiA9IGEgPyBNYXRoLm1pbihiLmxlbmd0aCwgYS5sZW5ndGgpIDogMCxcbiAgICAgIGMgPSBiLnNsaWNlKCksXG4gICAgICBpO1xuICByZXR1cm4gZnVuY3Rpb24odCkge1xuICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIGNbaV0gPSBhW2ldICogKDEgLSB0KSArIGJbaV0gKiB0O1xuICAgIHJldHVybiBjO1xuICB9O1xufVxuXG5leHBvcnQgZnVuY3Rpb24gaXNOdW1iZXJBcnJheSh4KSB7XG4gIHJldHVybiBBcnJheUJ1ZmZlci5pc1ZpZXcoeCkgJiYgISh4IGluc3RhbmNlb2YgRGF0YVZpZXcpO1xufVxuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/numberArray.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/object.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-interpolate/src/object.js ***! + \***************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ \"./node_modules/d3-interpolate/src/value.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL29iamVjdC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL29iamVjdC5qcz83MWJkIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB2YWx1ZSBmcm9tIFwiLi92YWx1ZS5qc1wiO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbihhLCBiKSB7XG4gIHZhciBpID0ge30sXG4gICAgICBjID0ge30sXG4gICAgICBrO1xuXG4gIGlmIChhID09PSBudWxsIHx8IHR5cGVvZiBhICE9PSBcIm9iamVjdFwiKSBhID0ge307XG4gIGlmIChiID09PSBudWxsIHx8IHR5cGVvZiBiICE9PSBcIm9iamVjdFwiKSBiID0ge307XG5cbiAgZm9yIChrIGluIGIpIHtcbiAgICBpZiAoayBpbiBhKSB7XG4gICAgICBpW2tdID0gdmFsdWUoYVtrXSwgYltrXSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIGNba10gPSBiW2tdO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiBmdW5jdGlvbih0KSB7XG4gICAgZm9yIChrIGluIGkpIGNba10gPSBpW2tdKHQpO1xuICAgIHJldHVybiBjO1xuICB9O1xufVxuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/object.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/piecewise.js": +/*!******************************************************!*\ + !*** ./node_modules/d3-interpolate/src/piecewise.js ***! + \******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return piecewise; });\nfunction piecewise(interpolate, values) {\n var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);\n while (i < n) I[i] = interpolate(v, v = values[++i]);\n return function(t) {\n var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n return I[i](t - i);\n };\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL3BpZWNld2lzZS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL3BpZWNld2lzZS5qcz9hYzBjIl0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIHBpZWNld2lzZShpbnRlcnBvbGF0ZSwgdmFsdWVzKSB7XG4gIHZhciBpID0gMCwgbiA9IHZhbHVlcy5sZW5ndGggLSAxLCB2ID0gdmFsdWVzWzBdLCBJID0gbmV3IEFycmF5KG4gPCAwID8gMCA6IG4pO1xuICB3aGlsZSAoaSA8IG4pIElbaV0gPSBpbnRlcnBvbGF0ZSh2LCB2ID0gdmFsdWVzWysraV0pO1xuICByZXR1cm4gZnVuY3Rpb24odCkge1xuICAgIHZhciBpID0gTWF0aC5tYXgoMCwgTWF0aC5taW4obiAtIDEsIE1hdGguZmxvb3IodCAqPSBuKSkpO1xuICAgIHJldHVybiBJW2ldKHQgLSBpKTtcbiAgfTtcbn1cbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/piecewise.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/quantize.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-interpolate/src/quantize.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(interpolator, n) {\n var samples = new Array(n);\n for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n return samples;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL3F1YW50aXplLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1pbnRlcnBvbGF0ZS9zcmMvcXVhbnRpemUuanM/MWFmOSJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbihpbnRlcnBvbGF0b3IsIG4pIHtcbiAgdmFyIHNhbXBsZXMgPSBuZXcgQXJyYXkobik7XG4gIGZvciAodmFyIGkgPSAwOyBpIDwgbjsgKytpKSBzYW1wbGVzW2ldID0gaW50ZXJwb2xhdG9yKGkgLyAobiAtIDEpKTtcbiAgcmV0dXJuIHNhbXBsZXM7XG59XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/quantize.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/rgb.js": +/*!************************************************!*\ + !*** ./node_modules/d3-interpolate/src/rgb.js ***! + \************************************************/ +/*! exports provided: default, rgbBasis, rgbBasisClosed */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbBasis\", function() { return rgbBasis; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbBasisClosed\", function() { return rgbBasisClosed; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ \"./node_modules/d3-interpolate/src/basis.js\");\n/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basisClosed.js */ \"./node_modules/d3-interpolate/src/basisClosed.js\");\n/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./color.js */ \"./node_modules/d3-interpolate/src/color.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((function rgbGamma(y) {\n var color = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__[\"gamma\"])(y);\n\n function rgb(start, end) {\n var r = color((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(start)).r, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1));\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nvar rgbBasis = rgbSpline(_basis_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\nvar rgbBasisClosed = rgbSpline(_basisClosed_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL3JnYi5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL3JnYi5qcz9lMzYwIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7cmdiIGFzIGNvbG9yUmdifSBmcm9tIFwiZDMtY29sb3JcIjtcbmltcG9ydCBiYXNpcyBmcm9tIFwiLi9iYXNpcy5qc1wiO1xuaW1wb3J0IGJhc2lzQ2xvc2VkIGZyb20gXCIuL2Jhc2lzQ2xvc2VkLmpzXCI7XG5pbXBvcnQgbm9nYW1tYSwge2dhbW1hfSBmcm9tIFwiLi9jb2xvci5qc1wiO1xuXG5leHBvcnQgZGVmYXVsdCAoZnVuY3Rpb24gcmdiR2FtbWEoeSkge1xuICB2YXIgY29sb3IgPSBnYW1tYSh5KTtcblxuICBmdW5jdGlvbiByZ2Ioc3RhcnQsIGVuZCkge1xuICAgIHZhciByID0gY29sb3IoKHN0YXJ0ID0gY29sb3JSZ2Ioc3RhcnQpKS5yLCAoZW5kID0gY29sb3JSZ2IoZW5kKSkuciksXG4gICAgICAgIGcgPSBj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AgIGNvbG9yLmIgPSBiKHQpO1xuICAgICAgcmV0dXJuIGNvbG9yICsgXCJcIjtcbiAgICB9O1xuICB9O1xufVxuXG5leHBvcnQgdmFyIHJnYkJhc2lzID0gcmdiU3BsaW5lKGJhc2lzKTtcbmV4cG9ydCB2YXIgcmdiQmFzaXNDbG9zZWQgPSByZ2JTcGxpbmUoYmFzaXNDbG9zZWQpO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/rgb.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/round.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-interpolate/src/round.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n return a = +a, b = +b, function(t) {\n return Math.round(a * (1 - t) + b * t);\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL3JvdW5kLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1pbnRlcnBvbGF0ZS9zcmMvcm91bmQuanM/NTg1NyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbihhLCBiKSB7XG4gIHJldHVybiBhID0gK2EsIGIgPSArYiwgZnVuY3Rpb24odCkge1xuICAgIHJldHVybiBNYXRoLnJvdW5kKGEgKiAoMSAtIHQpICsgYiAqIHQpO1xuICB9O1xufVxuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/round.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/string.js": +/*!***************************************************!*\ + !*** ./node_modules/d3-interpolate/src/string.js ***! + \***************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-interpolate/src/number.js\");\n\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL3N0cmluZy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL3N0cmluZy5qcz85MGVmIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBudW1iZXIgZnJvbSBcIi4vbnVtYmVyLmpzXCI7XG5cbnZhciByZUEgPSAvWy0rXT8oPzpcXGQrXFwuP1xcZCp8XFwuP1xcZCspKD86W2VFXVstK10/XFxkKyk/L2csXG4gICAgcmVCID0gbmV3IFJlZ0V4cChyZUEuc291cmNlLCBcImdcIik7XG5cbmZ1bmN0aW9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uam9pbihcIlwiKTtcbiAgICAgICAgfSk7XG59XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/string.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/transform/decompose.js": +/*!****************************************************************!*\ + !*** ./node_modules/d3-interpolate/src/transform/decompose.js ***! + \****************************************************************/ +/*! exports provided: identity, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return identity; });\nvar degrees = 180 / Math.PI;\n\nvar identity = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b, c, d, e, f) {\n var scaleX, scaleY, skewX;\n if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n return {\n translateX: e,\n translateY: f,\n rotate: Math.atan2(b, a) * degrees,\n skewX: Math.atan(skewX) * degrees,\n scaleX: scaleX,\n scaleY: scaleY\n };\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL3RyYW5zZm9ybS9kZWNvbXBvc2UuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9jb21wbGV4dmlld2VyLy4vbm9kZV9tb2R1bGVzL2QzLWludGVycG9sYXRlL3NyYy90cmFuc2Zvcm0vZGVjb21wb3NlLmpzPzMyNTgiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIGRlZ3JlZXMgPSAxODAgLyBNYXRoLlBJO1xuXG5leHBvcnQgdmFyIGlkZW50aXR5ID0ge1xuICB0cmFuc2xhdGVYOiAwLFxuICB0cmFuc2xhdGVZOiAwLFxuICByb3RhdGU6IDAsXG4gIHNrZXdYOiAwLFxuICBzY2FsZVg6IDEsXG4gIHNjYWxlWTogMVxufTtcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oYSwgYiwgYywgZCwgZSwgZikge1xuICB2YXIgc2NhbGVYLCBzY2FsZVksIHNrZXdYO1xuICBpZiAoc2NhbGVYID0gTWF0aC5zcXJ0KGEgKiBhICsgYiAqIGIpKSBhIC89IHNjYWxlWCwgYiAvPSBzY2FsZVg7XG4gIGlmIChza2V3WCA9IGEgKiBjICsgYiAqIGQpIGMgLT0gYSAqIHNrZXdYLCBkIC09IGIgKiBza2V3WDtcbiAgaWYgKHNjYWxlWSA9IE1hdGguc3FydChjICogYyArIGQgKiBkKSkgYyAvPSBzY2FsZVksIGQgLz0gc2NhbGVZLCBza2V3WCAvPSBzY2FsZVk7XG4gIGlmIChhICogZCA8IGIgKiBjKSBhID0gLWEsIGIgPSAtYiwgc2tld1ggPSAtc2tld1gsIHNjYWxlWCA9IC1zY2FsZVg7XG4gIHJldHVybiB7XG4gICAgdHJhbnNsYXRlWDogZSxcbiAgICB0cmFuc2xhdGVZOiBmLFxuICAgIHJvdGF0ZTogTWF0aC5hdGFuMihiLCBhKSAqIGRlZ3JlZXMsXG4gICAgc2tld1g6IE1hdGguYXRhbihza2V3WCkgKiBkZWdyZWVzLFxuICAgIHNjYWxlWDogc2NhbGVYLFxuICAgIHNjYWxlWTogc2NhbGVZXG4gIH07XG59XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/transform/decompose.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/transform/index.js": +/*!************************************************************!*\ + !*** ./node_modules/d3-interpolate/src/transform/index.js ***! + \************************************************************/ +/*! exports provided: interpolateTransformCss, interpolateTransformSvg */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformCss\", function() { return interpolateTransformCss; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"interpolateTransformSvg\", function() { return interpolateTransformSvg; });\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../number.js */ \"./node_modules/d3-interpolate/src/number.js\");\n/* harmony import */ var _parse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parse.js */ \"./node_modules/d3-interpolate/src/transform/parse.js\");\n\n\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n function pop(s) {\n return s.length ? s.pop() + \" \" : \"\";\n }\n\n function translate(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ya, yb)});\n } else if (xb || yb) {\n s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n }\n }\n\n function rotate(a, b, s, q) {\n if (a !== b) {\n if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a, b)});\n } else if (b) {\n s.push(pop(s) + \"rotate(\" + b + degParen);\n }\n }\n\n function skewX(a, b, s, q) {\n if (a !== b) {\n q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(a, b)});\n } else if (b) {\n s.push(pop(s) + \"skewX(\" + b + degParen);\n }\n }\n\n function scale(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(ya, yb)});\n } else if (xb !== 1 || yb !== 1) {\n s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n }\n }\n\n return function(a, b) {\n var s = [], // string constants and placeholders\n q = []; // number interpolators\n a = parse(a), b = parse(b);\n translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n rotate(a.rotate, b.rotate, s, q);\n skewX(a.skewX, b.skewX, s, q);\n scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n a = b = null; // gc\n return function(t) {\n var i = -1, n = q.length, o;\n while (++i < n) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n };\n}\n\nvar interpolateTransformCss = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__[\"parseCss\"], \"px, \", \"px)\", \"deg)\");\nvar interpolateTransformSvg = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__[\"parseSvg\"], \", \", \")\", \")\");\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL3RyYW5zZm9ybS9pbmRleC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL3RyYW5zZm9ybS9pbmRleC5qcz80Yjc5Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBudW1iZXIgZnJvbSBcIi4uL251bWJlci5qc1wiO1xuaW1wb3J0IHtwYXJzZUNzcywgcGFyc2VTdmd9IGZyb20gXCIuL3BhcnNlLmpzXCI7XG5cbmZ1bmN0aW9uIGludGVycG9sYXRlVHJhbnNmb3JtKHBhcnNlLCBweENvbW1hLCBweFBhcmVuLCBkZWdQYXJlbikge1xuXG4gIGZ1bmN0aW9uIHBvcChzKSB7XG4gICAgcmV0dXJuIHMubGVuZ3RoID8gcy5wb3AoKSArIFwiIFwiIDogXCJcIjtcbiAgfVxuXG4gIGZ1bmN0aW9uIHRyYW5zbGF0ZSh4YSwgeWEsIHhiLCB5YiwgcywgcSkge1xuICAgIGlmICh4YSAhPT0geGIgfHwgeWEgI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aW4oXCJcIik7XG4gICAgfTtcbiAgfTtcbn1cblxuZXhwb3J0IHZhciBpbnRlcnBvbGF0ZVRyYW5zZm9ybUNzcyA9IGludGVycG9sYXRlVHJhbnNmb3JtKHBhcnNlQ3NzLCBcInB4LCBcIiwgXCJweClcIiwgXCJkZWcpXCIpO1xuZXhwb3J0IHZhciBpbnRlcnBvbGF0ZVRyYW5zZm9ybVN2ZyA9IGludGVycG9sYXRlVHJhbnNmb3JtKHBhcnNlU3ZnLCBcIiwgXCIsIFwiKVwiLCBcIilcIik7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/transform/index.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/transform/parse.js": +/*!************************************************************!*\ + !*** ./node_modules/d3-interpolate/src/transform/parse.js ***! + \************************************************************/ +/*! exports provided: parseCss, parseSvg */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseCss\", function() { return parseCss; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parseSvg\", function() { return parseSvg; });\n/* harmony import */ var _decompose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decompose.js */ \"./node_modules/d3-interpolate/src/transform/decompose.js\");\n\n\nvar cssNode,\n cssRoot,\n cssView,\n svgNode;\n\nfunction parseCss(value) {\n if (value === \"none\") return _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"];\n if (!cssNode) cssNode = document.createElement(\"DIV\"), cssRoot = document.documentElement, cssView = document.defaultView;\n cssNode.style.transform = value;\n value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue(\"transform\");\n cssRoot.removeChild(cssNode);\n value = value.slice(7, -1).split(\",\");\n return Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]);\n}\n\nfunction parseSvg(value) {\n if (value == null) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"];\n if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n svgNode.setAttribute(\"transform\", value);\n if (!(value = svgNode.transform.baseVal.consolidate())) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"identity\"];\n value = value.matrix;\n return Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL3RyYW5zZm9ybS9wYXJzZS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL3RyYW5z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UyhcImh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnXCIsIFwiZ1wiKTtcbiAgc3ZnTm9kZS5zZXRBdHRyaWJ1dGUoXCJ0cmFuc2Zvcm1cIiwgdmFsdWUpO1xuICBpZiAoISh2YWx1ZSA9IHN2Z05vZGUudHJhbnNmb3JtLmJhc2VWYWwuY29uc29saWRhdGUoKSkpIHJldHVybiBpZGVudGl0eTtcbiAgdmFsdWUgPSB2YWx1ZS5tYXRyaXg7XG4gIHJldHVybiBkZWNvbXBvc2UodmFsdWUuYSwgdmFsdWUuYiwgdmFsdWUuYywgdmFsdWUuZCwgdmFsdWUuZSwgdmFsdWUuZik7XG59XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/transform/parse.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/value.js": +/*!**************************************************!*\ + !*** ./node_modules/d3-interpolate/src/value.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rgb.js */ \"./node_modules/d3-interpolate/src/rgb.js\");\n/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array.js */ \"./node_modules/d3-interpolate/src/array.js\");\n/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./date.js */ \"./node_modules/d3-interpolate/src/date.js\");\n/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number.js */ \"./node_modules/d3-interpolate/src/number.js\");\n/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./object.js */ \"./node_modules/d3-interpolate/src/object.js\");\n/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./string.js */ \"./node_modules/d3-interpolate/src/string.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constant.js */ \"./node_modules/d3-interpolate/src/constant.js\");\n/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ \"./node_modules/d3-interpolate/src/numberArray.js\");\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(b)\n : (t === \"number\" ? _number_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n : t === \"string\" ? ((c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"])(b)) ? (b = c, _rgb_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) : _string_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])\n : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__[\"color\"] ? _rgb_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n : b instanceof Date ? _date_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n : Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"isNumberArray\"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]\n : Array.isArray(b) ? _array_js__WEBPACK_IMPORTED_MODULE_2__[\"genericArray\"]\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? _object_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]\n : _number_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(a, b);\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL3ZhbHVlLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1pbnRlcnBvbGF0ZS9zcmMvdmFsdWUuanM/ZWExZCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge2NvbG9yfSBmcm9tIFwiZDMtY29sb3JcIjtcbmltcG9ydCByZ2IgZnJvbSBcIi4vcmdiLmpzXCI7XG5pbXBvcnQge2dlbmVyaWNBcnJheX0gZnJvbSBcIi4vYXJyYXkuanNcIjtcbmltcG9ydCBkYXRlIGZyb20gXCIuL2RhdGUuanNcIjtcbmltcG9ydCBudW1iZXIgZnJvbSBcIi4vbnVtYmVyLmpzXCI7XG5pbXBvcnQgb2JqZWN0IGZyb20gXCIuL29iamVjdC5qc1wiO1xuaW1wb3J0IHN0cmluZyBmcm9tIFwiLi9zdHJpbmcuanNcIjtcbmltcG9ydCBjb25zdGFudCBmcm9tIFwiLi9jb25zdGFudC5qc1wiO1xuaW1wb3J0IG51bWJlckFycmF5LCB7aXNOdW1iZXJBcnJheX0gZnJvbSBcIi4vbnVtYmVyQXJyYXkuanNcIjtcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oYSwgYikge1xuICB2YXIgdCA9IHR5cGVvZiBiLCBjO1xuICByZXR1cm4gYiA9PSBudWxsIHx8IHQgPT09IFwiYm9vbGVhblwiID8gY29uc3RhbnQoYilcbiAgICAgIDogKHQgPT09IFwibnVtYmVyXCIgPyBudW1iZXJcbiAgICAgIDogdCA9PT0gXCJzdHJpbmdcIiA/ICgoYyA9IGNvbG9yKGIpKSA/IChiID0gYywgcmdiKSA6IHN0cmluZylcbiAgICAgIDogYiBpbnN0YW5jZW9mIGNvbG9yID8gcmdiXG4gICAgICA6IGIgaW5zdGFuY2VvZiBEYXRlID8gZGF0ZVxuICAgICAgOiBpc051bWJlckFycmF5KGIpID8gbnVtYmVyQXJyYXlcbiAgICAgIDogQXJyYXkuaXNBcnJheShiKSA/IGdlbmVyaWNBcnJheVxuICAgICAgOiB0eXBlb2YgYi52YWx1ZU9mICE9PSBcImZ1bmN0aW9uXCIgJiYgdHlwZW9mIGIudG9TdHJpbmcgIT09IFwiZnVuY3Rpb25cIiB8fCBpc05hTihiKSA/IG9iamVjdFxuICAgICAgOiBudW1iZXIpKGEsIGIpO1xufVxuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/value.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-interpolate/src/zoom.js": +/*!*************************************************!*\ + !*** ./node_modules/d3-interpolate/src/zoom.js ***! + \*************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\nvar rho = Math.SQRT2,\n rho2 = 2,\n rho4 = 4,\n epsilon2 = 1e-12;\n\nfunction cosh(x) {\n return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\n// p0 = [ux0, uy0, w0]\n// p1 = [ux1, uy1, w1]\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S;\n\n // Special case for u0 ≅ u1.\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n i = function(t) {\n return [\n ux0 + t * dx,\n uy0 + t * dy,\n w0 * Math.exp(rho * t * S)\n ];\n }\n }\n\n // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n i = function(t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [\n ux0 + u * dx,\n uy0 + u * dy,\n w0 * coshr0 / cosh(rho * s + r0)\n ];\n }\n }\n\n i.duration = S * 1000;\n\n return i;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtaW50ZXJwb2xhdGUvc3JjL3pvb20uanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9jb21wbGV4dmlld2VyLy4vbm9kZV9tb2R1bGVzL2QzLWludGVycG9sYXRlL3NyYy96b29tLmpzP2NlNzUiXSwic291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QUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-interpolate/src/zoom.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/categorical/Accent.js": +/*!*******************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/Accent.js ***! + \*******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666\"));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9jYXRlZ29yaWNhbC9BY2NlbnQuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9jb21wbGV4dmlld2VyLy4vbm9kZV9tb2R1bGVzL2QzLXNjYWxlLWNocm9tYXRpYy9zcmMvY2F0ZWdvcmljYWwvQWNjZW50LmpzPzg3NmMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNvbG9ycyBmcm9tIFwiLi4vY29sb3JzLmpzXCI7XG5cbmV4cG9ydCBkZWZhdWx0IGNvbG9ycyhcIjdmYzk3ZmJlYWVkNGZkYzA4NmZmZmY5OTM4NmNiMGYwMDI3ZmJmNWIxNzY2NjY2NlwiKTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/categorical/Accent.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/categorical/Dark2.js": +/*!******************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/Dark2.js ***! + \******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666\"));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9jYXRlZ29yaWNhbC9EYXJrMi5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9jYXRlZ29yaWNhbC9EYXJrMi5qcz8yNGNiIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjb2xvcnMgZnJvbSBcIi4uL2NvbG9ycy5qc1wiO1xuXG5leHBvcnQgZGVmYXVsdCBjb2xvcnMoXCIxYjllNzdkOTVmMDI3NTcwYjNlNzI5OGE2NmE2MWVlNmFiMDJhNjc2MWQ2NjY2NjZcIik7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/categorical/Dark2.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/categorical/Paired.js": +/*!*******************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/Paired.js ***! + \*******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928\"));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9jYXRlZ29yaWNhbC9QYWlyZWQuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9jb21wbGV4dmlld2VyLy4vbm9kZV9tb2R1bGVzL2QzLXNjYWxlLWNocm9tYXRpYy9zcmMvY2F0ZWdvcmljYWwvUGFpcmVkLmpzP2MzOWIiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNvbG9ycyBmcm9tIFwiLi4vY29sb3JzLmpzXCI7XG5cbmV4cG9ydCBkZWZhdWx0IGNvbG9ycyhcImE2Y2VlMzFmNzhiNGIyZGY4YTMzYTAyY2ZiOWE5OWUzMWExY2ZkYmY2ZmZmN2YwMGNhYjJkNjZhM2Q5YWZmZmY5OWIxNTkyOFwiKTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/categorical/Paired.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js": +/*!********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js ***! + \********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2\"));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9jYXRlZ29yaWNhbC9QYXN0ZWwxLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1zY2FsZS1jaHJvbWF0aWMvc3JjL2NhdGVnb3JpY2FsL1Bhc3RlbDEuanM/YWIyNSJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY29sb3JzIGZyb20gXCIuLi9jb2xvcnMuanNcIjtcblxuZXhwb3J0IGRlZmF1bHQgY29sb3JzKFwiZmJiNGFlYjNjZGUzY2NlYmM1ZGVjYmU0ZmVkOWE2ZmZmZmNjZTVkOGJkZmRkYWVjZjJmMmYyXCIpO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js": +/*!********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js ***! + \********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc\"));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9jYXRlZ29yaWNhbC9QYXN0ZWwyLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1zY2FsZS1jaHJvbWF0aWMvc3JjL2NhdGVnb3JpY2FsL1Bhc3RlbDIuanM/YjI0NSJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY29sb3JzIGZyb20gXCIuLi9jb2xvcnMuanNcIjtcblxuZXhwb3J0IGRlZmF1bHQgY29sb3JzKFwiYjNlMmNkZmRjZGFjY2JkNWU4ZjRjYWU0ZTZmNWM5ZmZmMmFlZjFlMmNjY2NjY2NjXCIpO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/categorical/Set1.js": +/*!*****************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/Set1.js ***! + \*****************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999\"));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9jYXRlZ29yaWNhbC9TZXQxLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1zY2FsZS1jaHJvbWF0aWMvc3JjL2NhdGVnb3JpY2FsL1NldDEuanM/ZDYzYiJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY29sb3JzIGZyb20gXCIuLi9jb2xvcnMuanNcIjtcblxuZXhwb3J0IGRlZmF1bHQgY29sb3JzKFwiZTQxYTFjMzc3ZWI4NGRhZjRhOTg0ZWEzZmY3ZjAwZmZmZjMzYTY1NjI4Zjc4MWJmOTk5OTk5XCIpO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/categorical/Set1.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/categorical/Set2.js": +/*!*****************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/Set2.js ***! + \*****************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3\"));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9jYXRlZ29yaWNhbC9TZXQyLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1zY2FsZS1jaHJvbWF0aWMvc3JjL2NhdGVnb3JpY2FsL1NldDIuanM/ODFiMCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY29sb3JzIGZyb20gXCIuLi9jb2xvcnMuanNcIjtcblxuZXhwb3J0IGRlZmF1bHQgY29sb3JzKFwiNjZjMmE1ZmM4ZDYyOGRhMGNiZTc4YWMzYTZkODU0ZmZkOTJmZTVjNDk0YjNiM2IzXCIpO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/categorical/Set2.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/categorical/Set3.js": +/*!*****************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/Set3.js ***! + \*****************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f\"));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9jYXRlZ29yaWNhbC9TZXQzLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1zY2FsZS1jaHJvbWF0aWMvc3JjL2NhdGVnb3JpY2FsL1NldDMuanM/MGI3ZCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY29sb3JzIGZyb20gXCIuLi9jb2xvcnMuanNcIjtcblxuZXhwb3J0IGRlZmF1bHQgY29sb3JzKFwiOGRkM2M3ZmZmZmIzYmViYWRhZmI4MDcyODBiMWQzZmRiNDYyYjNkZTY5ZmNjZGU1ZDlkOWQ5YmM4MGJkY2NlYmM1ZmZlZDZmXCIpO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/categorical/Set3.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js": +/*!**********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js ***! + \**********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab\"));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9jYXRlZ29yaWNhbC9UYWJsZWF1MTAuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9jb21wbGV4dmlld2VyLy4vbm9kZV9tb2R1bGVzL2QzLXNjYWxlLWNocm9tYXRpYy9zcmMvY2F0ZWdvcmljYWwvVGFibGVhdTEwLmpzP2M2NDQiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNvbG9ycyBmcm9tIFwiLi4vY29sb3JzLmpzXCI7XG5cbmV4cG9ydCBkZWZhdWx0IGNvbG9ycyhcIjRlNzlhN2YyOGUyY2UxNTc1OTc2YjdiMjU5YTE0ZmVkYzk0OWFmN2FhMWZmOWRhNzljNzU1ZmJhYjBhYlwiKTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/categorical/category10.js": +/*!***********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/categorical/category10.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\"));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9jYXRlZ29yaWNhbC9jYXRlZ29yeTEwLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1zY2FsZS1jaHJvbWF0aWMvc3JjL2NhdGVnb3JpY2FsL2NhdGVnb3J5MTAuanM/YTk2OCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY29sb3JzIGZyb20gXCIuLi9jb2xvcnMuanNcIjtcblxuZXhwb3J0IGRlZmF1bHQgY29sb3JzKFwiMWY3N2I0ZmY3ZjBlMmNhMDJjZDYyNzI4OTQ2N2JkOGM1NjRiZTM3N2MyN2Y3ZjdmYmNiZDIyMTdiZWNmXCIpO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/categorical/category10.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/colors.js": +/*!*******************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/colors.js ***! + \*******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(specifier) {\n var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;\n while (i < n) colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n return colors;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9jb2xvcnMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9jb21wbGV4dmlld2VyLy4vbm9kZV9tb2R1bGVzL2QzLXNjYWxlLWNocm9tYXRpYy9zcmMvY29sb3JzLmpzPzY2ZDEiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oc3BlY2lmaWVyKSB7XG4gIHZhciBuID0gc3BlY2lmaWVyLmxlbmd0aCAvIDYgfCAwLCBjb2xvcnMgPSBuZXcgQXJyYXkobiksIGkgPSAwO1xuICB3aGlsZSAoaSA8IG4pIGNvbG9yc1tpXSA9IFwiI1wiICsgc3BlY2lmaWVyLnNsaWNlKGkgKiA2LCArK2kgKiA2KTtcbiAgcmV0dXJuIGNvbG9ycztcbn1cbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/colors.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/diverging/BrBG.js": +/*!***************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/diverging/BrBG.js ***! + \***************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"d8b365f5f5f55ab4ac\",\n \"a6611adfc27d80cdc1018571\",\n \"a6611adfc27df5f5f580cdc1018571\",\n \"8c510ad8b365f6e8c3c7eae55ab4ac01665e\",\n \"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e\",\n \"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e\",\n \"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e\",\n \"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30\",\n \"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9kaXZlcmdpbmcvQnJCRy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9kaXZlcmdpbmcvQnJCRy5qcz80YjFhIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjb2xvcnMgZnJvbSBcIi4uL2NvbG9ycy5qc1wiO1xuaW1wb3J0IHJh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-scale-chromatic/src/diverging/PRGn.js": +/*!***************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/diverging/PRGn.js ***! + \***************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"af8dc3f7f7f77fbf7b\",\n \"7b3294c2a5cfa6dba0008837\",\n \"7b3294c2a5cff7f7f7a6dba0008837\",\n \"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837\",\n \"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837\",\n \"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837\",\n \"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837\",\n \"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b\",\n \"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9kaXZlcmdpbmcvUFJHbi5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2N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BQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/diverging/PRGn.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/diverging/PiYG.js": +/*!***************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/diverging/PiYG.js ***! + \***************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"e9a3c9f7f7f7a1d76a\",\n \"d01c8bf1b6dab8e1864dac26\",\n \"d01c8bf1b6daf7f7f7b8e1864dac26\",\n \"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221\",\n \"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221\",\n \"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221\",\n \"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221\",\n \"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419\",\n \"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEB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WZkZTBlZmY3ZjdmN2U2ZjVkMGI4ZTE4NjdmYmM0MTRkOTIyMTI3NjQxOVwiXG4pLm1hcChjb2xvcnMpO1xuXG5leHBvcnQgZGVmYXVsdCByYW1wKHNjaGVtZSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/diverging/PiYG.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/diverging/PuOr.js": +/*!***************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/diverging/PuOr.js ***! + \***************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"998ec3f7f7f7f1a340\",\n \"5e3c99b2abd2fdb863e66101\",\n \"5e3c99b2abd2f7f7f7fdb863e66101\",\n \"542788998ec3d8daebfee0b6f1a340b35806\",\n \"542788998ec3d8daebf7f7f7fee0b6f1a340b35806\",\n \"5427888073acb2abd2d8daebfee0b6fdb863e08214b35806\",\n \"5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806\",\n \"2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08\",\n \"2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9kaXZlcmdpbmcvUHVPci5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9kaXZlcmdpbmcvUHVPci5qcz8wMDdjIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjb2xvcnMgZnJvbSBcIi4uL2NvbG9ycy5qc1wiO1xuaW1wb3J0IHJhbXAgZnJvbSBcIi4uL3JhbXAuanNcIjtcblxuZXhwb3J0IHZhciBzY2hlbWUgPSBuZXcgQXJyYXkoMykuY29uY2F0KFxuICBcIjk5OGVjM2Y3ZjdmN2YxYTM0MFwiLFxuICBcIjVlM2M5OWIyYWJkMmZkYjg2M2U2NjEwMVwiLFxuICBcIjVlM2M5OWIyYWJkMmY3ZjdmN2ZkYjg2M2U2NjEwMVwiLFxuICBcIjU0Mjc4ODk5OGVjM2Q4ZGFlYmZlZTBiNmYxYTM0MGIzNTgwNlwiLFxuICBcIjU0Mjc4ODk5OGVjM2Q4ZGFlYmY3ZjdmN2ZlZTBiNmYxYTM0MGIzNTgwNlwiLFxuICBcIjU0Mjc4ODgwNzNhY2IyYWJkMmQ4ZGFlYmZlZTBiNmZkYjg2M2UwODIxNGIzNTgwNlwiLFxuICBcIjU0Mjc4ODgwNzNhY2IyYWJkMmQ4ZGFlYmY3ZjdmN2ZlZTBiNmZkYjg2M2UwODIxNGIzNTgwNlwiLFxuICBcIjJkMDA0YjU0Mjc4ODgwNzNhY2IyYWJkMmQ4ZGFlYmZlZTBiNmZkYjg2M2UwODIxNGIzNTgwNjdmM2IwOFwiLFxuICBcIjJkMDA0YjU0Mjc4ODgwNzNhY2IyYWJkMmQ4ZGFlYmY3ZjdmN2ZlZTBiNmZkYjg2M2UwODIxNGIzNTgwNjdmM2IwOFwiXG4pLm1hcChjb2xvcnMpO1xuXG5leHBvcnQgZGVmYXVsdCByYW1wKHNjaGVtZSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/diverging/PuOr.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/diverging/RdBu.js": +/*!***************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/diverging/RdBu.js ***! + \***************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"ef8a62f7f7f767a9cf\",\n \"ca0020f4a58292c5de0571b0\",\n \"ca0020f4a582f7f7f792c5de0571b0\",\n \"b2182bef8a62fddbc7d1e5f067a9cf2166ac\",\n \"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac\",\n \"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac\",\n \"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac\",\n \"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061\",\n \"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9kaXZlcmdpbmcvUmRCdS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9kaXZlcmdpbmcvUmRCdS5qcz82MjdkIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjb2xvcnMgZnJvbSBcIi4uL2NvbG9ycy5qc1wiO1xuaW1wb3J0IHJhbXAgZnJvbSBcIi4uL3JhbXAuanNcIjtcblxuZXhwb3J0IHZhciBzY2hlbWUgPSBuZXcgQXJyYXkoMykuY29uY2F0KFxuICBcImVmOGE2MmY3ZjdmNzY3YTljZlwiLFxuICBcImNhMDAyMGY0YTU4MjkyYzVkZTA1NzFiMFwiLFxuICBcImNhMDAyMGY0YTU4MmY3ZjdmNzkyYzVkZTA1NzFiMFwiLFxuICBcImIyMTgyYmVmOGE2MmZkZGJjN2QxZTVmMDY3YTljZjIxNjZhY1wiLFxuICBcImIyMTgyYmVmOGE2MmZkZGJjN2Y3ZjdmN2QxZTVmMDY3YTljZjIxNjZhY1wiLFxuICBcImIyMTgyYmQ2NjA0ZGY0YTU4MmZkZGJjN2QxZTVmMDkyYzVkZTQzOTNjMzIxNjZhY1wiLFxuICBcImIyMTgyYmQ2NjA0ZGY0YTU4MmZkZGJjN2Y3ZjdmN2QxZTVmMDkyYzVkZTQzOTNjMzIxNjZhY1wiLFxuICBcIjY3MDAxZmIyMTgyYmQ2NjA0ZGY0YTU4MmZkZGJjN2QxZTVmMDkyYzVkZTQzOTNjMzIxNjZhYzA1MzA2MVwiLFxuICBcIjY3MDAxZmIyMTgyYmQ2NjA0ZGY0YTU4MmZkZGJjN2Y3ZjdmN2QxZTVmMDkyYzVkZTQzOTNjMzIxNjZhYzA1MzA2MVwiXG4pLm1hcChjb2xvcnMpO1xuXG5leHBvcnQgZGVmYXVsdCByYW1wKHNjaGVtZSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/diverging/RdBu.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/diverging/RdGy.js": +/*!***************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/diverging/RdGy.js ***! + \***************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"ef8a62ffffff999999\",\n \"ca0020f4a582bababa404040\",\n \"ca0020f4a582ffffffbababa404040\",\n \"b2182bef8a62fddbc7e0e0e09999994d4d4d\",\n \"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d\",\n \"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d\",\n \"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d\",\n \"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a\",\n \"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9kaXZlcmdpbmcvUmRHeS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9kaXZlcmdpbmcvUmRHeS5qcz8yZDI1Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjb2xvcnMgZnJvbSBcIi4uL2NvbG9ycy5qc1wiO1xuaW1wb3J0IHJhbXAgZnJvbSBcIi4uL3JhbXAuanNcIjtcblxuZXhwb3J0IHZhciBzY2hlbWUgPSBuZXcgQXJyYXkoMykuY29uY2F0KFxuICBcImVmOGE2MmZmZmZmZjk5OTk5OVwiLFxuICBcImNhMDAyMGY0YTU4MmJhYmFiYTQwNDA0MFwiLFxuICBcImNhMDAyMGY0YTU4MmZmZmZmZmJhYmFiYTQwNDA0MFwiLFxuICBcImIyMTgyYmVmOGE2MmZkZGJjN2UwZTBlMDk5OTk5OTRkNGQ0ZFwiLFxuICBcImIyMTgyYmVmOGE2MmZkZGJjN2ZmZmZmZmUwZTBlMDk5OTk5OTRkNGQ0ZFwiLFxuICBcImIyMTgyYmQ2NjA0ZGY0YTU4MmZkZGJjN2UwZTBlMGJhYmFiYTg3ODc4NzRkNGQ0ZFwiLFxuICBcImIyMTgyYmQ2NjA0ZGY0YTU4MmZkZGJjN2ZmZmZmZmUwZTBlMGJhYmFiYTg3ODc4NzRkNGQ0ZFwiLFxuICBcIjY3MDAxZmIyMTgyYmQ2NjA0ZGY0YTU4MmZkZGJjN2UwZTBlMGJhYmFiYTg3ODc4NzRkNGQ0ZDFhMWExYVwiLFxuICBcIjY3MDAxZmIyMTgyYmQ2NjA0ZGY0YTU4MmZkZGJjN2ZmZmZmZmUwZTBlMGJhYmFiYTg3ODc4NzRkNGQ0ZDFhMWExYVwiXG4pLm1hcChjb2xvcnMpO1xuXG5leHBvcnQgZGVmYXVsdCByYW1wKHNjaGVtZSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/diverging/RdGy.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js": +/*!*****************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js ***! + \*****************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"fc8d59ffffbf91bfdb\",\n \"d7191cfdae61abd9e92c7bb6\",\n \"d7191cfdae61ffffbfabd9e92c7bb6\",\n \"d73027fc8d59fee090e0f3f891bfdb4575b4\",\n \"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4\",\n \"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4\",\n \"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4\",\n \"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695\",\n \"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9kaXZlcmdpbmcvUmRZbEJ1LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1zY2FsZS1jaHJvbWF0aWMvc3JjL2RpdmVyZ2luZy9SZFlsQnUuanM/YzNhNiJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY29sb3JzIGZyb20gXCIuLi9jb2xvcnMuanNcIjtcbmltcG9ydCByYW1wIGZyb20gXCIuLi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YlGn.js": +/*!*****************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js ***! + \*****************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"fc8d59ffffbf91cf60\",\n \"d7191cfdae61a6d96a1a9641\",\n \"d7191cfdae61ffffbfa6d96a1a9641\",\n \"d73027fc8d59fee08bd9ef8b91cf601a9850\",\n \"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850\",\n \"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850\",\n \"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850\",\n \"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837\",\n \"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9kaXZlcmdpbmcvUmRZbEduLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9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O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/diverging/Spectral.js": +/*!*******************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/diverging/Spectral.js ***! + \*******************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"fc8d59ffffbf99d594\",\n \"d7191cfdae61abdda42b83ba\",\n \"d7191cfdae61ffffbfabdda42b83ba\",\n \"d53e4ffc8d59fee08be6f59899d5943288bd\",\n \"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd\",\n \"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd\",\n \"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd\",\n \"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2\",\n \"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2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NWU0ZmEyXCJcbikubWFwKGNvbG9ycyk7XG5cbmV4cG9ydCBkZWZhdWx0IHJhbXAoc2NoZW1lKTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/diverging/Spectral.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/index.js": +/*!******************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/index.js ***! + \******************************************************/ +/*! exports provided: schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, schemeTableau10, interpolateBrBG, schemeBrBG, interpolatePRGn, schemePRGn, interpolatePiYG, schemePiYG, interpolatePuOr, schemePuOr, interpolateRdBu, schemeRdBu, interpolateRdGy, schemeRdGy, interpolateRdYlBu, schemeRdYlBu, interpolateRdYlGn, schemeRdYlGn, interpolateSpectral, schemeSpectral, interpolateBuGn, schemeBuGn, interpolateBuPu, schemeBuPu, interpolateGnBu, schemeGnBu, interpolateOrRd, schemeOrRd, interpolatePuBuGn, schemePuBuGn, interpolatePuBu, schemePuBu, interpolatePuRd, schemePuRd, interpolateRdPu, schemeRdPu, interpolateYlGnBu, schemeYlGnBu, interpolateYlGn, schemeYlGn, interpolateYlOrBr, schemeYlOrBr, interpolateYlOrRd, schemeYlOrRd, interpolateBlues, schemeBlues, interpolateGreens, schemeGreens, interpolateGreys, schemeGreys, interpolatePurples, schemePurples, interpolateReds, schemeReds, interpolateOranges, schemeOranges, interpolateCividis, interpolateCubehelixDefault, interpolateRainbow, interpolateWarm, interpolateCool, interpolateSinebow, interpolateTurbo, interpolateViridis, interpolateMagma, interpolateInferno, interpolatePlasma */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _categorical_category10_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./categorical/category10.js */ \"./node_modules/d3-scale-chromatic/src/categorical/category10.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeCategory10\", function() { return _categorical_category10_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _categorical_Accent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./categorical/Accent.js */ \"./node_modules/d3-scale-chromatic/src/categorical/Accent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeAccent\", function() { return _categorical_Accent_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _categorical_Dark2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./categorical/Dark2.js */ \"./node_modules/d3-scale-chromatic/src/categorical/Dark2.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeDark2\", function() { return _categorical_Dark2_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _categorical_Paired_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./categorical/Paired.js */ \"./node_modules/d3-scale-chromatic/src/categorical/Paired.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePaired\", function() { return _categorical_Paired_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _categorical_Pastel1_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./categorical/Pastel1.js */ \"./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePastel1\", function() { return _categorical_Pastel1_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _categorical_Pastel2_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./categorical/Pastel2.js */ \"./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePastel2\", function() { return _categorical_Pastel2_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _categorical_Set1_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./categorical/Set1.js */ \"./node_modules/d3-scale-chromatic/src/categorical/Set1.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSet1\", function() { return _categorical_Set1_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _categorical_Set2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./categorical/Set2.js */ \"./node_modules/d3-scale-chromatic/src/categorical/Set2.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSet2\", function() { return _categorical_Set2_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _categorical_Set3_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./categorical/Set3.js */ \"./node_modules/d3-scale-chromatic/src/categorical/Set3.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSet3\", function() { return _categorical_Set3_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _categorical_Tableau10_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./categorical/Tableau10.js */ \"./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeTableau10\", function() { return _categorical_Tableau10_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./diverging/BrBG.js */ \"./node_modules/d3-scale-chromatic/src/diverging/BrBG.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBrBG\", function() { return _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBrBG\", function() { return _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./diverging/PRGn.js */ \"./node_modules/d3-scale-chromatic/src/diverging/PRGn.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePRGn\", function() { return _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePRGn\", function() { return _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./diverging/PiYG.js */ \"./node_modules/d3-scale-chromatic/src/diverging/PiYG.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePiYG\", function() { return _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePiYG\", function() { return _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./diverging/PuOr.js */ \"./node_modules/d3-scale-chromatic/src/diverging/PuOr.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuOr\", function() { return _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuOr\", function() { return _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./diverging/RdBu.js */ \"./node_modules/d3-scale-chromatic/src/diverging/RdBu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdBu\", function() { return _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdBu\", function() { return _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./diverging/RdGy.js */ \"./node_modules/d3-scale-chromatic/src/diverging/RdGy.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdGy\", function() { return _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdGy\", function() { return _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./diverging/RdYlBu.js */ \"./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdYlBu\", function() { return _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdYlBu\", function() { return _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./diverging/RdYlGn.js */ \"./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdYlGn\", function() { return _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdYlGn\", function() { return _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__[\"scheme\"]; });\n\n/* harmony import */ var _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./diverging/Spectral.js */ \"./node_modules/d3-scale-chromatic/src/diverging/Spectral.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateSpectral\", function() { return _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeSpectral\", function() { return _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./sequential-multi/BuGn.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBuGn\", function() { return _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBuGn\", function() { return _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./sequential-multi/BuPu.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBuPu\", function() { return _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBuPu\", function() { return _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./sequential-multi/GnBu.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateGnBu\", function() { return _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeGnBu\", function() { return _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./sequential-multi/OrRd.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateOrRd\", function() { return _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeOrRd\", function() { return _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./sequential-multi/PuBuGn.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuBuGn\", function() { return _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuBuGn\", function() { return _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./sequential-multi/PuBu.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuBu\", function() { return _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuBu\", function() { return _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./sequential-multi/PuRd.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePuRd\", function() { return _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePuRd\", function() { return _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./sequential-multi/RdPu.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRdPu\", function() { return _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeRdPu\", function() { return _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./sequential-multi/YlGnBu.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlGnBu\", function() { return _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlGnBu\", function() { return _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./sequential-multi/YlGn.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlGn\", function() { return _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlGn\", function() { return _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./sequential-multi/YlOrBr.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlOrBr\", function() { return _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlOrBr\", function() { return _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./sequential-multi/YlOrRd.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateYlOrRd\", function() { return _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeYlOrRd\", function() { return _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./sequential-single/Blues.js */ \"./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateBlues\", function() { return _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeBlues\", function() { return _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./sequential-single/Greens.js */ \"./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateGreens\", function() { return _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeGreens\", function() { return _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./sequential-single/Greys.js */ \"./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateGreys\", function() { return _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeGreys\", function() { return _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./sequential-single/Purples.js */ \"./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePurples\", function() { return _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemePurples\", function() { return _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./sequential-single/Reds.js */ \"./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateReds\", function() { return _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeReds\", function() { return _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./sequential-single/Oranges.js */ \"./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateOranges\", function() { return _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"schemeOranges\", function() { return _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__[\"scheme\"]; });\n\n/* harmony import */ var _sequential_multi_cividis_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./sequential-multi/cividis.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCividis\", function() { return _sequential_multi_cividis_js__WEBPACK_IMPORTED_MODULE_37__[\"default\"]; });\n\n/* harmony import */ var _sequential_multi_cubehelix_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./sequential-multi/cubehelix.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCubehelixDefault\", function() { return _sequential_multi_cubehelix_js__WEBPACK_IMPORTED_MODULE_38__[\"default\"]; });\n\n/* harmony import */ var _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./sequential-multi/rainbow.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateRainbow\", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateWarm\", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__[\"warm\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateCool\", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__[\"cool\"]; });\n\n/* harmony import */ var _sequential_multi_sinebow_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./sequential-multi/sinebow.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateSinebow\", function() { return _sequential_multi_sinebow_js__WEBPACK_IMPORTED_MODULE_40__[\"default\"]; });\n\n/* harmony import */ var _sequential_multi_turbo_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./sequential-multi/turbo.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateTurbo\", function() { return _sequential_multi_turbo_js__WEBPACK_IMPORTED_MODULE_41__[\"default\"]; });\n\n/* harmony import */ var _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./sequential-multi/viridis.js */ \"./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateViridis\", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateMagma\", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__[\"magma\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolateInferno\", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__[\"inferno\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interpolatePlasma\", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__[\"plasma\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9pbmRleC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi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QTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/index.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/ramp.js": +/*!*****************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/ramp.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/src/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(scheme) {\n return Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__[\"interpolateRgbBasis\"])(scheme[scheme.length - 1]);\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9yYW1wLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1zY2FsZS1jaHJvbWF0aWMvc3JjL3JhbXAuanM/OGQwNSJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge2ludGVycG9sYXRlUmdiQmFzaXN9IGZyb20gXCJkMy1pbnRlcnBvbGF0ZVwiO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbihzY2hlbWUpIHtcbiAgcmV0dXJuIGludGVycG9sYXRlUmdiQmFzaXMoc2NoZW1lW3NjaGVtZS5sZW5ndGggLSAxXSk7XG59XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/ramp.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js": +/*!**********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js ***! + \**********************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"e5f5f999d8c92ca25f\",\n \"edf8fbb2e2e266c2a4238b45\",\n \"edf8fbb2e2e266c2a42ca25f006d2c\",\n \"edf8fbccece699d8c966c2a42ca25f006d2c\",\n \"edf8fbccece699d8c966c2a441ae76238b45005824\",\n \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824\",\n \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLW11bHRpL0J1R24uanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9jb21wbGV4dmlld2VyLy4vbm9kZV9tb2R1bGVzL2QzLXNjYWxlLWNocm9tYXRpYy9zcmMvc2VxdWVudGlhbC1tdWx0aS9CdUduLmpzPzk4YjYiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNvbG9ycyBmcm9tIFwiLi4vY29sb3JzLmpzXCI7XG5pbXBvcnQgcmFtcCBmcm9tIFwiLi4vcmFtcC5qc1wiO1xuXG5leHBvcnQgdmFyIHNjaGVtZSA9IG5ldyBBcnJheSgzKS5jb25jYXQoXG4gIFwiZTVmNWY5OTlkOGM5MmNhMjVmXCIsXG4gIFwiZWRmOGZiYjJlMmUyNjZjMmE0MjM4YjQ1XCIsXG4gIFwiZWRmOGZiYjJlMmUyNjZjMmE0MmNhMjVmMDA2ZDJjXCIsXG4gIFwiZWRmOGZiY2NlY2U2OTlkOGM5NjZjMmE0MmNhMjVmMDA2ZDJjXCIsXG4gIFwiZWRmOGZiY2NlY2U2OTlkOGM5NjZjMmE0NDFhZTc2MjM4YjQ1MDA1ODI0XCIsXG4gIFwiZjdmY2ZkZTVmNWY5Y2NlY2U2OTlkOGM5NjZjMmE0NDFhZTc2MjM4YjQ1MDA1ODI0XCIsXG4gIFwiZjdmY2ZkZTVmNWY5Y2NlY2U2OTlkOGM5NjZjMmE0NDFhZTc2MjM4YjQ1MDA2ZDJjMDA0NDFiXCJcbikubWFwKGNvbG9ycyk7XG5cbmV4cG9ydCBkZWZhdWx0IHJhbXAoc2NoZW1lKTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js": +/*!**********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js ***! + \**********************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"e0ecf49ebcda8856a7\",\n \"edf8fbb3cde38c96c688419d\",\n \"edf8fbb3cde38c96c68856a7810f7c\",\n \"edf8fbbfd3e69ebcda8c96c68856a7810f7c\",\n \"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b\",\n \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b\",\n \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLW11bHRpL0J1UHUuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9jb21wbGV4dmlld2VyLy4vbm9kZV9tb2R1bGVzL2QzLXNjYWxlLWNocm9tYXRpYy9zcmMvc2VxdWVudGlhbC1tdWx0aS9CdVB1LmpzPzYzNzEiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNvbG9ycyBmcm9tIFwiLi4vY29sb3JzLmpzXCI7XG5pbXBvcnQgcmFtcCBmcm9tIFwiLi4vcmFtcC5qc1wiO1xuXG5leHBvcnQgdmFyIHNjaGVtZSA9IG5ldyBBcnJheSgzKS5jb25jYXQoXG4gIFwiZTBlY2Y0OWViY2RhODg1NmE3XCIsXG4gIFwiZWRmOGZiYjNjZGUzOGM5NmM2ODg0MTlkXCIsXG4gIFwiZWRmOGZiYjNjZGUzOGM5NmM2ODg1NmE3ODEwZjdjXCIsXG4gIFwiZWRmOGZiYmZkM2U2OWViY2RhOGM5NmM2ODg1NmE3ODEwZjdjXCIsXG4gIFwiZWRmOGZiYmZkM2U2OWViY2RhOGM5NmM2OGM2YmIxODg0MTlkNmUwMTZiXCIsXG4gIFwiZjdmY2ZkZTBlY2Y0YmZkM2U2OWViY2RhOGM5NmM2OGM2YmIxODg0MTlkNmUwMTZiXCIsXG4gIFwiZjdmY2ZkZTBlY2Y0YmZkM2U2OWViY2RhOGM5NmM2OGM2YmIxODg0MTlkODEwZjdjNGQwMDRiXCJcbikubWFwKGNvbG9ycyk7XG5cbmV4cG9ydCBkZWZhdWx0IHJhbXAoc2NoZW1lKTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js": +/*!**********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js ***! + \**********************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"e0f3dba8ddb543a2ca\",\n \"f0f9e8bae4bc7bccc42b8cbe\",\n \"f0f9e8bae4bc7bccc443a2ca0868ac\",\n \"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac\",\n \"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLW11bHRpL0duQnUuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9jb21wbGV4dmlld2VyLy4vbm9kZV9tb2R1bGVzL2QzLXNjYWxlLWNocm9tYXRpYy9zcmMvc2VxdWVudGlhbC1tdWx0aS9HbkJ1LmpzP2YwNWUiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNvbG9ycyBmcm9tIFwiLi4vY29sb3JzLmpzXCI7XG5pbXBvcnQgcmFtcCBmcm9tIFwiLi4vcmFtcC5qc1wiO1xuXG5leHBvcnQgdmFyIHNjaGVtZSA9IG5ldyBBcnJheSgzKS5jb25jYXQoXG4gIFwiZTBmM2RiYThkZGI1NDNhMmNhXCIsXG4gIFwiZjBmOWU4YmFlNGJjN2JjY2M0MmI4Y2JlXCIsXG4gIFwiZjBmOWU4YmFlNGJjN2JjY2M0NDNhMmNhMDg2OGFjXCIsXG4gIFwiZjBmOWU4Y2NlYmM1YThkZGI1N2JjY2M0NDNhMmNhMDg2OGFjXCIsXG4gIFwiZjBmOWU4Y2NlYmM1YThkZGI1N2JjY2M0NGViM2QzMmI4Y2JlMDg1ODllXCIsXG4gIFwiZjdmY2YwZTBmM2RiY2NlYmM1YThkZGI1N2JjY2M0NGViM2QzMmI4Y2JlMDg1ODllXCIsXG4gIFwiZjdmY2YwZTBmM2RiY2NlYmM1YThkZGI1N2JjY2M0NGViM2QzMmI4Y2JlMDg2OGFjMDg0MDgxXCJcbikubWFwKGNvbG9ycyk7XG5cbmV4cG9ydCBkZWZhdWx0IHJhbXAoc2NoZW1lKTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js": +/*!**********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js ***! + \**********************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"fee8c8fdbb84e34a33\",\n \"fef0d9fdcc8afc8d59d7301f\",\n \"fef0d9fdcc8afc8d59e34a33b30000\",\n \"fef0d9fdd49efdbb84fc8d59e34a33b30000\",\n \"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000\",\n \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000\",\n \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLW11bHRpL09yUmQuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9jb21wbGV4dmlld2VyLy4vbm9kZV9tb2R1bGVzL2QzLXNjYWxlLWNocm9tYXRpYy9zcmMvc2VxdWVudGlhbC1tdWx0aS9PclJkLmpzP2M5NGIiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNvbG9ycyBmcm9tIFwiLi4vY29sb3JzLmpzXCI7XG5pbXBvcnQgcmFtcCBmcm9tIFwiLi4vcmFtcC5qc1wiO1xuXG5leHBvcnQgdmFyIHNjaGVtZSA9IG5ldyBBcnJheSgzKS5jb25jYXQoXG4gIFwiZmVlOGM4ZmRiYjg0ZTM0YTMzXCIsXG4gIFwiZmVmMGQ5ZmRjYzhhZmM4ZDU5ZDczMDFmXCIsXG4gIFwiZmVmMGQ5ZmRjYzhhZmM4ZDU5ZTM0YTMzYjMwMDAwXCIsXG4gIFwiZmVmMGQ5ZmRkNDllZmRiYjg0ZmM4ZDU5ZTM0YTMzYjMwMDAwXCIsXG4gIFwiZmVmMGQ5ZmRkNDllZmRiYjg0ZmM4ZDU5ZWY2NTQ4ZDczMDFmOTkwMDAwXCIsXG4gIFwiZmZmN2VjZmVlOGM4ZmRkNDllZmRiYjg0ZmM4ZDU5ZWY2NTQ4ZDczMDFmOTkwMDAwXCIsXG4gIFwiZmZmN2VjZmVlOGM4ZmRkNDllZmRiYjg0ZmM4ZDU5ZWY2NTQ4ZDczMDFmYjMwMDAwN2YwMDAwXCJcbikubWFwKGNvbG9ycyk7XG5cbmV4cG9ydCBkZWZhdWx0IHJhbXAoc2NoZW1lKTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js": +/*!**********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js ***! + \**********************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"ece7f2a6bddb2b8cbe\",\n \"f1eef6bdc9e174a9cf0570b0\",\n \"f1eef6bdc9e174a9cf2b8cbe045a8d\",\n \"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d\",\n \"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLW11bHRpL1B1QnUuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9jb21wbGV4dmlld2VyLy4vbm9kZV9tb2R1bGVzL2QzLXNjYWxlLWNocm9tYXRpYy9zcmMvc2VxdWVudGlhbC1tdWx0aS9QdUJ1LmpzP2I5MGQiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNvbG9ycyBmcm9tIFwiLi4vY29sb3JzLmpzXCI7XG5pbXBvcnQgcmFtcCBmcm9tIFwiLi4vcmFtcC5qc1wiO1xuXG5leHBvcnQgdmFyIHNjaGVtZSA9IG5ldyBBcnJheSgzKS5jb25jYXQoXG4gIFwiZWNlN2YyYTZiZGRiMmI4Y2JlXCIsXG4gIFwiZjFlZWY2YmRjOWUxNzRhOWNmMDU3MGIwXCIsXG4gIFwiZjFlZWY2YmRjOWUxNzRhOWNmMmI4Y2JlMDQ1YThkXCIsXG4gIFwiZjFlZWY2ZDBkMWU2YTZiZGRiNzRhOWNmMmI4Y2JlMDQ1YThkXCIsXG4gIFwiZjFlZWY2ZDBkMWU2YTZiZGRiNzRhOWNmMzY5MGMwMDU3MGIwMDM0ZTdiXCIsXG4gIFwiZmZmN2ZiZWNlN2YyZDBkMWU2YTZiZGRiNzRhOWNmMzY5MGMwMDU3MGIwMDM0ZTdiXCIsXG4gIFwiZmZmN2ZiZWNlN2YyZDBkMWU2YTZiZGRiNzRhOWNmMzY5MGMwMDU3MGIwMDQ1YThkMDIzODU4XCJcbikubWFwKGNvbG9ycyk7XG5cbmV4cG9ydCBkZWZhdWx0IHJhbXAoc2NoZW1lKTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js": +/*!************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js ***! + \************************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"ece2f0a6bddb1c9099\",\n \"f6eff7bdc9e167a9cf02818a\",\n \"f6eff7bdc9e167a9cf1c9099016c59\",\n \"f6eff7d0d1e6a6bddb67a9cf1c9099016c59\",\n \"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450\",\n \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450\",\n \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# source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BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js": +/*!**********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js ***! + \**********************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"e7e1efc994c7dd1c77\",\n \"f1eef6d7b5d8df65b0ce1256\",\n \"f1eef6d7b5d8df65b0dd1c77980043\",\n \"f1eef6d4b9dac994c7df65b0dd1c77980043\",\n \"f1eef6d4b9dac994c7df65b0e7298ace125691003f\",\n \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f\",\n \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLW11bHRpL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equential-multi/PuRd.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js": +/*!**********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js ***! + \**********************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"fde0ddfa9fb5c51b8a\",\n \"feebe2fbb4b9f768a1ae017e\",\n \"feebe2fbb4b9f768a1c51b8a7a0177\",\n \"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177\",\n \"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLW11bHRpL1JkUHUuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9jb21wbGV4dmlld2VyLy4vbm9kZV9tb2R1bGVzL2QzLXNjYWxlLWNocm9tYXRpYy9zcmMvc2VxdWVudGlhbC1tdWx0aS9SZFB1LmpzPzYyMjgiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNvbG9ycyBmcm9tIFwiLi4vY29sb3JzLmpzXCI7XG5pbXBvcnQgcmFtcCBmcm9tIFwiLi4vcmFtcC5qc1wiO1xuXG5leHBvcnQgdmFyIHNjaGVtZSA9IG5ldyBBcnJheSgzKS5jb25jYXQoXG4gIFwiZmRlMGRkZmE5ZmI1YzUxYjhhXCIsXG4gIFwiZmVlYmUyZmJiNGI5Zjc2OGExYWUwMTdlXCIsXG4gIFwiZmVlYmUyZmJiNGI5Zjc2OGExYzUxYjhhN2EwMTc3XCIsXG4gIFwiZmVlYmUyZmNjNWMwZmE5ZmI1Zjc2OGExYzUxYjhhN2EwMTc3XCIsXG4gIFwiZmVlYmUyZmNjNWMwZmE5ZmI1Zjc2OGExZGQzNDk3YWUwMTdlN2EwMTc3XCIsXG4gIFwiZmZmN2YzZmRlMGRkZmNjNWMwZmE5ZmI1Zjc2OGExZGQzNDk3YWUwMTdlN2EwMTc3XCIsXG4gIFwiZmZmN2YzZmRlMGRkZmNjNWMwZmE5ZmI1Zjc2OGExZGQzNDk3YWUwMTdlN2EwMTc3NDkwMDZhXCJcbikubWFwKGNvbG9ycyk7XG5cbmV4cG9ydCBkZWZhdWx0IHJhbXAoc2NoZW1lKTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js": +/*!**********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js ***! + \**********************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"f7fcb9addd8e31a354\",\n \"ffffccc2e69978c679238443\",\n \"ffffccc2e69978c67931a354006837\",\n \"ffffccd9f0a3addd8e78c67931a354006837\",\n \"ffffccd9f0a3addd8e78c67941ab5d238443005a32\",\n \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32\",\n \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLW11bHRpL1lsR24uanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9jb21wbGV4dmlld2VyLy4vbm9kZV9tb2R1bGVzL2QzLXNjYWxlLWNocm9tYXRpYy9zcmMvc2VxdWVudGlhbC1tdWx0aS9ZbEduLmpzP2Q5OGMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNvbG9ycyBmcm9tIFwiLi4vY29sb3JzLmpzXCI7XG5pbXBvcnQgcmFtcCBmcm9tIFwiLi4vcmFtcC5qc1wiO1xuXG5leHBvcnQgdmFyIHNjaGVtZSA9IG5ldyBBcnJheSgzKS5jb25jYXQoXG4gIFwiZjdmY2I5YWRkZDhlMzFhMzU0XCIsXG4gIFwiZmZmZmNjYzJlNjk5NzhjNjc5MjM4NDQzXCIsXG4gIFwiZmZmZmNjYzJlNjk5NzhjNjc5MzFhMzU0MDA2ODM3XCIsXG4gIFwiZmZmZmNjZDlmMGEzYWRkZDhlNzhjNjc5MzFhMzU0MDA2ODM3XCIsXG4gIFwiZmZmZmNjZDlmMGEzYWRkZDhlNzhjNjc5NDFhYjVkMjM4NDQzMDA1YTMyXCIsXG4gIFwiZmZmZmU1ZjdmY2I5ZDlmMGEzYWRkZDhlNzhjNjc5NDFhYjVkMjM4NDQzMDA1YTMyXCIsXG4gIFwiZmZmZmU1ZjdmY2I5ZDlmMGEzYWRkZDhlNzhjNjc5NDFhYjVkMjM4NDQzMDA2ODM3MDA0NTI5XCJcbikubWFwKGNvbG9ycyk7XG5cbmV4cG9ydCBkZWZhdWx0IHJhbXAoc2NoZW1lKTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js": +/*!************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js ***! + \************************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"edf8b17fcdbb2c7fb8\",\n \"ffffcca1dab441b6c4225ea8\",\n \"ffffcca1dab441b6c42c7fb8253494\",\n \"ffffccc7e9b47fcdbb41b6c42c7fb8253494\",\n \"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLW11bHRpL1lsR25CdS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLW11bHRpL1lsR25CdS5qcz8xM2ZmIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjb2xvcnMgZnJvbSBcIi4uL2NvbG9ycy5qc1wiO1xuaW1wb3J0IHJhbXAgZnJvbSBcIi4uL3JhbXAuanNcIjtcblxuZXhwb3J0IHZhciBzY2hlbWUgPSBuZXcgQXJyYXkoMykuY29uY2F0KFxuICBcImVkZjhiMTdmY2RiYjJjN2ZiOFwiLFxuICBcImZmZmZjY2ExZGFiNDQxYjZjNDIyNWVhOFwiLFxuICBcImZmZmZjY2ExZGFiNDQxYjZjNDJjN2ZiODI1MzQ5NFwiLFxuICBcImZmZmZjY2M3ZTliNDdmY2RiYjQxYjZjNDJjN2ZiODI1MzQ5NFwiLFxuICBcImZmZmZjY2M3ZTliNDdmY2RiYjQxYjZjNDFkOTFjMDIyNWVhODBjMmM4NFwiLFxuICBcImZmZmZkOWVkZjhiMWM3ZTliNDdmY2RiYjQxYjZjNDFkOTFjMDIyNWVhODBjMmM4NFwiLFxuICBcImZmZmZkOWVkZjhiMWM3ZTliNDdmY2RiYjQxYjZjNDFkOTFjMDIyNWVhODI1MzQ5NDA4MWQ1OFwiXG4pLm1hcChjb2xvcnMpO1xuXG5leHBvcnQgZGVmYXVsdCByYW1wKHNjaGVtZSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js": +/*!************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js ***! + \************************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"fff7bcfec44fd95f0e\",\n \"ffffd4fed98efe9929cc4c02\",\n \"ffffd4fed98efe9929d95f0e993404\",\n \"ffffd4fee391fec44ffe9929d95f0e993404\",\n \"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04\",\n \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04\",\n \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLW11bHRpL1lsT3JCci5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLW11bHRpL1lsT3JCci5qcz9kYTQxIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjb2xvcnMgZnJvbSBcIi4uL2NvbG9ycy5qc1wiO1xuaW1wb3J0IHJhbXAgZnJvbSBcIi4uL3JhbXAuanNcIjtcblxuZXhwb3J0IHZhciBzY2hlbWUgPSBuZXcgQXJyYXkoMykuY29uY2F0KFxuICBcImZmZjdiY2ZlYzQ0ZmQ5NWYwZVwiLFxuICBcImZmZmZkNGZlZDk4ZWZlOTkyOWNjNGMwMlwiLFxuICBcImZmZmZkNGZlZDk4ZWZlOTkyOWQ5NWYwZTk5MzQwNFwiLFxuICBcImZmZmZkNGZlZTM5MWZlYzQ0ZmZlOTkyOWQ5NWYwZTk5MzQwNFwiLFxuICBcImZmZmZkNGZlZTM5MWZlYzQ0ZmZlOTkyOWVjNzAxNGNjNGMwMjhjMmQwNFwiLFxuICBcImZmZmZlNWZmZjdiY2ZlZTM5MWZlYzQ0ZmZlOTkyOWVjNzAxNGNjNGMwMjhjMmQwNFwiLFxuICBcImZmZmZlNWZmZjdiY2ZlZTM5MWZlYzQ0ZmZlOTkyOWVjNzAxNGNjNGMwMjk5MzQwNDY2MjUwNlwiXG4pLm1hcChjb2xvcnMpO1xuXG5leHBvcnQgZGVmYXVsdCByYW1wKHNjaGVtZSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js": +/*!************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js ***! + \************************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"ffeda0feb24cf03b20\",\n \"ffffb2fecc5cfd8d3ce31a1c\",\n \"ffffb2fecc5cfd8d3cf03b20bd0026\",\n \"ffffb2fed976feb24cfd8d3cf03b20bd0026\",\n \"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLW11bHRpL1lsT3JSZC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLW11bHRpL1lsT3JSZC5qcz84ZDM2Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjb2xvcnMgZnJvbSBcIi4uL2NvbG9ycy5qc1wiO1xuaW1wb3J0IHJhbXAgZnJvbSBcIi4uL3JhbXAuanNcIjtcblxuZXhwb3J0IHZhciBzY2hlbWUgPSBuZXcgQXJyYXkoMykuY29uY2F0KFxuICBcImZmZWRhMGZlYjI0Y2YwM2IyMFwiLFxuICBcImZmZmZiMmZlY2M1Y2ZkOGQzY2UzMWExY1wiLFxuICBcImZmZmZiMmZlY2M1Y2ZkOGQzY2YwM2IyMGJkMDAyNlwiLFxuICBcImZmZmZiMmZlZDk3NmZlYjI0Y2ZkOGQzY2YwM2IyMGJkMDAyNlwiLFxuICBcImZmZmZiMmZlZDk3NmZlYjI0Y2ZkOGQzY2ZjNGUyYWUzMWExY2IxMDAyNlwiLFxuICBcImZmZmZjY2ZmZWRhMGZlZDk3NmZlYjI0Y2ZkOGQzY2ZjNGUyYWUzMWExY2IxMDAyNlwiLFxuICBcImZmZmZjY2ZmZWRhMGZlZDk3NmZlYjI0Y2ZkOGQzY2ZjNGUyYWUzMWExY2JkMDAyNjgwMDAyNlwiXG4pLm1hcChjb2xvcnMpO1xuXG5leHBvcnQgZGVmYXVsdCByYW1wKHNjaGVtZSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js": +/*!*************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js ***! + \*************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(t) {\n t = Math.max(0, Math.min(1, t));\n return \"rgb(\"\n + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + \", \"\n + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + \", \"\n + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67)))))))\n + \")\";\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=ut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CI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js": +/*!***************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js ***! + \***************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/src/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateCubehelixLong\"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(300, 0.5, 0.0), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(-240, 0.5, 1.0)));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLW11bHRpL2N1YmVoZWxpeC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLW11bHRpL2N1YmVoZWxpeC5qcz81ZGYzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7Y3ViZWhlbGl4fSBmcm9tIFwiZDMtY29sb3JcIjtcbmltcG9ydCB7aW50ZXJwb2xhdGVDdWJlaGVsaXhMb25nfSBmcm9tIFwiZDMtaW50ZXJwb2xhdGVcIjtcblxuZXhwb3J0IGRlZmF1bHQgaW50ZXJwb2xhdGVDdWJlaGVsaXhMb25nKGN1YmVoZWxpeCgzMDAsIDAuNSwgMC4wKSwgY3ViZWhlbGl4KC0yNDAsIDAuNSwgMS4wKSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js": +/*!*************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js ***! + \*************************************************************************/ +/*! exports provided: warm, cool, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"warm\", function() { return warm; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cool\", function() { return cool; });\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ \"./node_modules/d3-interpolate/src/index.js\");\n\n\n\nvar warm = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateCubehelixLong\"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(-100, 0.75, 0.35), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(80, 1.50, 0.8));\n\nvar cool = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__[\"interpolateCubehelixLong\"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(260, 0.75, 0.35), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])(80, 1.50, 0.8));\n\nvar c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"cubehelix\"])();\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(t) {\n if (t < 0 || t > 1) t -= Math.floor(t);\n var ts = Math.abs(t - 0.5);\n c.h = 360 * t - 100;\n c.s = 1.5 - 1.5 * ts;\n c.l = 0.8 - 0.9 * ts;\n return c + \"\";\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLW11bHRpL3JhaW5ib3cuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9jb21wbGV4dmlld2VyLy4vbm9kZV9tb2R1bGVzL2QzLXNjYWxlLWNocm9tYXRpYy9zcmMvc2VxdWVudGlhbC1tdWx0aS9yYWluYm93LmpzPzVmYmMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtjdWJlaGVsaXh9IGZyb20gXCJkMy1jb2xvclwiO1xuaW1wb3J0IHtpbnRlcnBvbGF0ZUN1YmVoZWxpeExvbmd9IGZyb20gXCJkMy1pbnRlcnBvbGF0ZVwiO1xuXG5leHBvcnQgdmFyIHdhcm0gPSBpbnRlcnBvbGF0ZUN1YmVoZWxpeExvbmcoY3ViZWhlbGl4KC0xMDAsIDAuNzUsIDAuMzUpLCBjdWJlaGVsaXgoODAsIDEuNTAsIDAuOCkpO1xuXG5leHBvcnQgdmFyIGNvb2wgPSBpbnRlcnBvbGF0ZUN1YmVoZWxpeExvbmcoY3ViZWhlbGl4KDI2MCwgMC43NSwgMC4zNSksIGN1YmVoZWxpeCg4MCwgMS41MCwgMC44KSk7XG5cbnZhciBjID0gY3ViZWhlbGl4KCk7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKHQpIHtcbiAgaWYgKHQgPCAwIHx8IHQgPiAxKSB0IC09IE1hdGguZmxvb3IodCk7XG4gIHZhciB0cyA9IE1hdGguYWJzKHQgLSAwLjUpO1xuICBjLmggPSAzNjAgKiB0IC0gMTAwO1xuICBjLnMgPSAxLjUgLSAxLjUgKiB0cztcbiAgYy5sID0gMC44IC0gMC45ICogdHM7XG4gIHJldHVybiBjICsgXCJcIjtcbn1cbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js": +/*!*************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js ***! + \*************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ \"./node_modules/d3-color/src/index.js\");\n\n\nvar c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__[\"rgb\"])(),\n pi_1_3 = Math.PI / 3,\n pi_2_3 = Math.PI * 2 / 3;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(t) {\n var x;\n t = (0.5 - t) * Math.PI;\n c.r = 255 * (x = Math.sin(t)) * x;\n c.g = 255 * (x = Math.sin(t + pi_1_3)) * x;\n c.b = 255 * (x = Math.sin(t + pi_2_3)) * x;\n return c + \"\";\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLW11bHRpL3NpbmVib3cuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9jb21wbGV4dmlld2VyLy4vbm9kZV9tb2R1bGVzL2QzLXNjYWxlLWNocm9tYXRpYy9zcmMvc2VxdWVudGlhbC1tdWx0aS9zaW5lYm93LmpzPzA2ZjciXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtyZ2J9IGZyb20gXCJkMy1jb2xvclwiO1xuXG52YXIgYyA9IHJnYigpLFxuICAgIHBpXzFfMyA9IE1hdGguUEkgLyAzLFxuICAgIHBpXzJfMyA9IE1hdGguUEkgKiAyIC8gMztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24odCkge1xuICB2YXIgeDtcbiAgdCA9ICgwLjUgLSB0KSAqIE1hdGguUEk7XG4gIGMuciA9IDI1NSAqICh4ID0gTWF0aC5zaW4odCkpICogeDtcbiAgYy5nID0gMjU1ICogKHggPSBNYXRoLnNpbih0ICsgcGlfMV8zKSkgKiB4O1xuICBjLmIgPSAyNTUgKiAoeCA9IE1hdGguc2luKHQgKyBwaV8yXzMpKSAqIHg7XG4gIHJldHVybiBjICsgXCJcIjtcbn1cbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js": +/*!***********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (function(t) {\n t = Math.max(0, Math.min(1, t));\n return \"rgb(\"\n + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + \", \"\n + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + \", \"\n + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66)))))))\n + \")\";\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLW11bHRpL3R1cmJvLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1zY2FsZS1jaHJvbWF0aWMvc3JjL3NlcXVlbnRpYWwtbXVsdGkvdHVyYm8uanM/YzEwZCJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbih0KSB7XG4gIHQgPSBNYXRoLm1heCgwLCBNYXRoLm1pbigxLCB0KSk7XG4gIHJldHVybiBcInJnYihcIlxuICAgICAgKyBNYXRoLm1heCgwLCBNYXRoLm1pbigyNTUsIE1hdGgucm91bmQoMzQuNjEgKyB0ICogKDExNzIuMzMgLSB0ICogKDEwNzkzLjU2IC0gdCAqICgzMzMwMC4xMiAtIHQgKiAoMzgzOTQuNDkgLSB0ICogMTQ4MjUuMDUpKSkpKSkpICsgXCIsIFwiXG4gICAgICArIE1hdGgubWF4KDAsIE1hdGgubWluKDI1NSwgTWF0aC5yb3VuZCgyMy4zMSArIHQgKiAoNTU3LjMzICsgdCAqICgxMjI1LjMzIC0gdCAqICgzNTc0Ljk2IC0gdCAqICgxMDczLjc3ICsgdCAqIDcwNy41NikpKSkpKSkgKyBcIiwgXCJcbiAgICAgICsgTWF0aC5tYXgoMCwgTWF0aC5taW4oMjU1LCBNYXRoLnJvdW5kKDI3LjIgKyB0ICogKDMyMTEuMSAtIHQgKiAoMTUzMjcuOTcgLSB0ICogKDI3ODE0IC0gdCAqICgyMjU2OS4xOCAtIHQgKiA2ODM4LjY2KSkpKSkpKVxuICAgICAgKyBcIilcIjtcbn1cbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js": +/*!*************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js ***! + \*************************************************************************/ +/*! exports provided: default, magma, inferno, plasma */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"magma\", function() { return magma; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inferno\", function() { return inferno; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"plasma\", function() { return plasma; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n\n\nfunction ramp(range) {\n var n = range.length;\n return function(t) {\n return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\")));\n\nvar magma = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\"));\n\nvar inferno = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\"));\n\nvar plasma = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXM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/Blues.js": +/*!************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js ***! + \************************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"deebf79ecae13182bd\",\n \"eff3ffbdd7e76baed62171b5\",\n \"eff3ffbdd7e76baed63182bd08519c\",\n \"eff3ffc6dbef9ecae16baed63182bd08519c\",\n \"eff3ffc6dbef9ecae16baed64292c62171b5084594\",\n \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\",\n \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLXNpbmdsZS9CbHVlcy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLXNpbmdsZS9CbHVlcy5qcz84N2RhIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjb2xvcnMgZnJvbSBcIi4uL2NvbG9ycy5qc1wiO1xuaW1wb3J0IHJhbXAgZnJvbSBcIi4uL3JhbXAuanNcIjtcblxuZXhwb3J0IHZhciBzY2hlbWUgPSBuZXcgQXJyYXkoMykuY29uY2F0KFxuICBcImRlZWJmNzllY2FlMTMxODJiZFwiLFxuICBcImVmZjNmZmJkZDdlNzZiYWVkNjIxNzFiNVwiLFxuICBcImVmZjNmZmJkZDdlNzZiYWVkNjMxODJiZDA4NTE5Y1wiLFxuICBcImVmZjNmZmM2ZGJlZjllY2FlMTZiYWVkNjMxODJiZDA4NTE5Y1wiLFxuICBcImVmZjNmZmM2ZGJlZjllY2FlMTZiYWVkNjQyOTJjNjIxNzFiNTA4NDU5NFwiLFxuICBcImY3ZmJmZmRlZWJmN2M2ZGJlZjllY2FlMTZiYWVkNjQyOTJjNjIxNzFiNTA4NDU5NFwiLFxuICBcImY3ZmJmZmRlZWJmN2M2ZGJlZjllY2FlMTZiYWVkNjQyOTJjNjIxNzFiNTA4NTE5YzA4MzA2YlwiXG4pLm1hcChjb2xvcnMpO1xuXG5leHBvcnQgZGVmYXVsdCByYW1wKHNjaGVtZSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js": +/*!*************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js ***! + \*************************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"e5f5e0a1d99b31a354\",\n \"edf8e9bae4b374c476238b45\",\n \"edf8e9bae4b374c47631a354006d2c\",\n \"edf8e9c7e9c0a1d99b74c47631a354006d2c\",\n \"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\",\n \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\",\n \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLXNpbmdsZS9HcmVlbnMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9jb21wbGV4dmlld2VyLy4vbm9kZV9tb2R1bGVzL2QzLXNjYWxlLWNocm9tYXRpYy9zcmMvc2VxdWVudGlhbC1zaW5nbGUvR3JlZW5zLmpzP2JjYmUiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGNvbG9ycyBmcm9tIFwiLi4vY29sb3JzLmpzXCI7XG5pbXBvcnQgcmFtcCBmcm9tIFwiLi4vcmFtcC5qc1wiO1xuXG5leHBvcnQgdmFyIHNjaGVtZSA9IG5ldyBBcnJheSgzKS5jb25jYXQoXG4gIFwiZTVmNWUwYTFkOTliMzFhMzU0XCIsXG4gIFwiZWRmOGU5YmFlNGIzNzRjNDc2MjM4YjQ1XCIsXG4gIFwiZWRmOGU5YmFlNGIzNzRjNDc2MzFhMzU0MDA2ZDJjXCIsXG4gIFwiZWRmOGU5YzdlOWMwYTFkOTliNzRjNDc2MzFhMzU0MDA2ZDJjXCIsXG4gIFwiZWRmOGU5YzdlOWMwYTFkOTliNzRjNDc2NDFhYjVkMjM4YjQ1MDA1YTMyXCIsXG4gIFwiZjdmY2Y1ZTVmNWUwYzdlOWMwYTFkOTliNzRjNDc2NDFhYjVkMjM4YjQ1MDA1YTMyXCIsXG4gIFwiZjdmY2Y1ZTVmNWUwYzdlOWMwYTFkOTliNzRjNDc2NDFhYjVkMjM4YjQ1MDA2ZDJjMDA0NDFiXCJcbikubWFwKGNvbG9ycyk7XG5cbmV4cG9ydCBkZWZhdWx0IHJhbXAoc2NoZW1lKTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js": +/*!************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js ***! + \************************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"f0f0f0bdbdbd636363\",\n \"f7f7f7cccccc969696525252\",\n \"f7f7f7cccccc969696636363252525\",\n \"f7f7f7d9d9d9bdbdbd969696636363252525\",\n \"f7f7f7d9d9d9bdbdbd969696737373525252252525\",\n \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525\",\n \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLXNpbmdsZS9HcmV5cy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLXNpbmdsZS9HcmV5cy5qcz9hOGE4Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBjb2xvcnMgZnJvbSBcIi4uL2NvbG9ycy5qc1wiO1xuaW1wb3J0IHJhbXAgZnJvbSBcIi4uL3JhbXAuanNcIjtcblxuZXhwb3J0IHZhciBzY2hlbWUgPSBuZXcgQXJyYXkoMykuY29uY2F0KFxuICBcImYwZjBmMGJkYmRiZDYzNjM2M1wiLFxuICBcImY3ZjdmN2NjY2NjYzk2OTY5NjUyNTI1MlwiLFxuICBcImY3ZjdmN2NjY2NjYzk2OTY5NjYzNjM2MzI1MjUyNVwiLFxuICBcImY3ZjdmN2Q5ZDlkOWJkYmRiZDk2OTY5NjYzNjM2MzI1MjUyNVwiLFxuICBcImY3ZjdmN2Q5ZDlkOWJkYmRiZDk2OTY5NjczNzM3MzUyNTI1MjI1MjUyNVwiLFxuICBcImZmZmZmZmYwZjBmMGQ5ZDlkOWJkYmRiZDk2OTY5NjczNzM3MzUyNTI1MjI1MjUyNVwiLFxuICBcImZmZmZmZmYwZjBmMGQ5ZDlkOWJkYmRiZDk2OTY5NjczNzM3MzUyNTI1MjI1MjUyNTAwMDAwMFwiXG4pLm1hcChjb2xvcnMpO1xuXG5leHBvcnQgZGVmYXVsdCByYW1wKHNjaGVtZSk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js": +/*!**************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js ***! + \**************************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"fee6cefdae6be6550d\",\n \"feeddefdbe85fd8d3cd94701\",\n \"feeddefdbe85fd8d3ce6550da63603\",\n \"feeddefdd0a2fdae6bfd8d3ce6550da63603\",\n \"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLXNpbmdsZS9PcmFuZ2VzLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1zY2FsZS1jaHJvbWF0aWMvc3JjL3NlcXVlbnRpYWwtc2luZ2xlL09yYW5nZXMuanM/YWNlZiJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY29sb3JzIGZyb20gXCIuLi9jb2xvcnMuanNcIjtcbmltcG9ydCByYW1wIGZyb20gXCIuLi9yYW1wLmpzXCI7XG5cbmV4cG9ydCB2YXIgc2NoZW1lID0gbmV3IEFycmF5KDMpLmNvbmNhdChcbiAgXCJmZWU2Y2VmZGFlNmJlNjU1MGRcIixcbiAgXCJmZWVkZGVmZGJlODVmZDhkM2NkOTQ3MDFcIixcbiAgXCJmZWVkZGVmZGJlODVmZDhkM2NlNjU1MGRhNjM2MDNcIixcbiAgXCJmZWVkZGVmZGQwYTJmZGFlNmJmZDhkM2NlNjU1MGRhNjM2MDNcIixcbiAgXCJmZWVkZGVmZGQwYTJmZGFlNmJmZDhkM2NmMTY5MTNkOTQ4MDE4YzJkMDRcIixcbiAgXCJmZmY1ZWJmZWU2Y2VmZGQwYTJmZGFlNmJmZDhkM2NmMTY5MTNkOTQ4MDE4YzJkMDRcIixcbiAgXCJmZmY1ZWJmZWU2Y2VmZGQwYTJmZGFlNmJmZDhkM2NmMTY5MTNkOTQ4MDFhNjM2MDM3ZjI3MDRcIlxuKS5tYXAoY29sb3JzKTtcblxuZXhwb3J0IGRlZmF1bHQgcmFtcChzY2hlbWUpO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js": +/*!**************************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js ***! + \**************************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"efedf5bcbddc756bb1\",\n \"f2f0f7cbc9e29e9ac86a51a3\",\n \"f2f0f7cbc9e29e9ac8756bb154278f\",\n \"f2f0f7dadaebbcbddc9e9ac8756bb154278f\",\n \"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLXNpbmdsZS9QdXJwbGVzLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1zY2FsZS1jaHJvbWF0aWMvc3JjL3NlcXVlbnRpYWwtc2luZ2xlL1B1cnBsZXMuanM/NDQxNSJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY29sb3JzIGZyb20gXCIuLi9jb2xvcnMuanNcIjtcbmltcG9ydCByYW1wIGZyb20gXCIuLi9yYW1wLmpzXCI7XG5cbmV4cG9ydCB2YXIgc2NoZW1lID0gbmV3IEFycmF5KDMpLmNvbmNhdChcbiAgXCJlZmVkZjViY2JkZGM3NTZiYjFcIixcbiAgXCJmMmYwZjdjYmM5ZTI5ZTlhYzg2YTUxYTNcIixcbiAgXCJmMmYwZjdjYmM5ZTI5ZTlhYzg3NTZiYjE1NDI3OGZcIixcbiAgXCJmMmYwZjdkYWRhZWJiY2JkZGM5ZTlhYzg3NTZiYjE1NDI3OGZcIixcbiAgXCJmMmYwZjdkYWRhZWJiY2JkZGM5ZTlhYzg4MDdkYmE2YTUxYTM0YTE0ODZcIixcbiAgXCJmY2ZiZmRlZmVkZjVkYWRhZWJiY2JkZGM5ZTlhYzg4MDdkYmE2YTUxYTM0YTE0ODZcIixcbiAgXCJmY2ZiZmRlZmVkZjVkYWRhZWJiY2JkZGM5ZTlhYzg4MDdkYmE2YTUxYTM1NDI3OGYzZjAwN2RcIlxuKS5tYXAoY29sb3JzKTtcblxuZXhwb3J0IGRlZmF1bHQgcmFtcChzY2hlbWUpO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js\n"); + +/***/ }), + +/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js": +/*!***********************************************************************!*\ + !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js ***! + \***********************************************************************/ +/*! exports provided: scheme, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scheme\", function() { return scheme; });\n/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ \"./node_modules/d3-scale-chromatic/src/colors.js\");\n/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ \"./node_modules/d3-scale-chromatic/src/ramp.js\");\n\n\n\nvar scheme = new Array(3).concat(\n \"fee0d2fc9272de2d26\",\n \"fee5d9fcae91fb6a4acb181d\",\n \"fee5d9fcae91fb6a4ade2d26a50f15\",\n \"fee5d9fcbba1fc9272fb6a4ade2d26a50f15\",\n \"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d\"\n).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(scheme));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMtc2NhbGUtY2hyb21hdGljL3NyYy9zZXF1ZW50aWFsLXNpbmdsZS9SZWRzLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9kMy1zY2FsZS1jaHJvbWF0aWMvc3JjL3NlcXVlbnRpYWwtc2luZ2xlL1JlZHMuanM/ZTc0MCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY29sb3JzIGZyb20gXCIuLi9jb2xvcnMuanNcIjtcbmltcG9ydCByYW1wIGZyb20gXCIuLi9yYW1wLmpzXCI7XG5cbmV4cG9ydCB2YXIgc2NoZW1lID0gbmV3IEFycmF5KDMpLmNvbmNhdChcbiAgXCJmZWUwZDJmYzkyNzJkZTJkMjZcIixcbiAgXCJmZWU1ZDlmY2FlOTFmYjZhNGFjYjE4MWRcIixcbiAgXCJmZWU1ZDlmY2FlOTFmYjZhNGFkZTJkMjZhNTBmMTVcIixcbiAgXCJmZWU1ZDlmY2JiYTFmYzkyNzJmYjZhNGFkZTJkMjZhNTBmMTVcIixcbiAgXCJmZWU1ZDlmY2JiYTFmYzkyNzJmYjZhNGFlZjNiMmNjYjE4MWQ5OTAwMGRcIixcbiAgXCJmZmY1ZjBmZWUwZDJmY2JiYTFmYzkyNzJmYjZhNGFlZjNiMmNjYjE4MWQ5OTAwMGRcIixcbiAgXCJmZmY1ZjBmZWUwZDJmY2JiYTFmYzkyNzJmYjZhNGFlZjNiMmNjYjE4MWRhNTBmMTU2NzAwMGRcIlxuKS5tYXAoY29sb3JzKTtcblxuZXhwb3J0IGRlZmF1bHQgcmFtcChzY2hlbWUpO1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js\n"); + +/***/ }), + +/***/ "./node_modules/d3/d3.js": +/*!*******************************!*\ + !*** ./node_modules/d3/d3.js ***! + \*******************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;!function() {\n var d3 = {\n version: \"3.5.17\"\n };\n var d3_arraySlice = [].slice, d3_array = function(list) {\n return d3_arraySlice.call(list);\n };\n var d3_document = this.document;\n function d3_documentElement(node) {\n return node && (node.ownerDocument || node.document || node).documentElement;\n }\n function d3_window(node) {\n return node && (node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView);\n }\n if (d3_document) {\n try {\n d3_array(d3_document.documentElement.childNodes)[0].nodeType;\n } catch (e) {\n d3_array = function(list) {\n var i = list.length, array = new Array(i);\n while (i--) array[i] = list[i];\n return array;\n };\n }\n }\n if (!Date.now) Date.now = function() {\n return +new Date();\n };\n if (d3_document) {\n try {\n d3_document.createElement(\"DIV\").style.setProperty(\"opacity\", 0, \"\");\n } catch (error) {\n var d3_element_prototype = this.Element.prototype, d3_element_setAttribute = d3_element_prototype.setAttribute, d3_element_setAttributeNS = d3_element_prototype.setAttributeNS, d3_style_prototype = this.CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty;\n d3_element_prototype.setAttribute = function(name, value) {\n d3_element_setAttribute.call(this, name, value + \"\");\n };\n d3_element_prototype.setAttributeNS = function(space, local, value) {\n d3_element_setAttributeNS.call(this, space, local, value + \"\");\n };\n d3_style_prototype.setProperty = function(name, value, priority) {\n d3_style_setProperty.call(this, name, value + \"\", priority);\n };\n }\n }\n d3.ascending = d3_ascending;\n function d3_ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n }\n d3.descending = function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n };\n d3.min = function(array, f) {\n var i = -1, n = array.length, a, b;\n if (arguments.length === 1) {\n while (++i < n) if ((b = array[i]) != null && b >= b) {\n a = b;\n break;\n }\n while (++i < n) if ((b = array[i]) != null && a > b) a = b;\n } else {\n while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) {\n a = b;\n break;\n }\n while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b;\n }\n return a;\n };\n d3.max = function(array, f) {\n var i = -1, n = array.length, a, b;\n if (arguments.length === 1) {\n while (++i < n) if ((b = array[i]) != null && b >= b) {\n a = b;\n break;\n }\n while (++i < n) if ((b = array[i]) != null && b > a) a = b;\n } else {\n while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) {\n a = b;\n break;\n }\n while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b;\n }\n return a;\n };\n d3.extent = function(array, f) {\n var i = -1, n = array.length, a, b, c;\n if (arguments.length === 1) {\n while (++i < n) if ((b = array[i]) != null && b >= b) {\n a = c = b;\n break;\n }\n while (++i < n) if ((b = array[i]) != null) {\n if (a > b) a = b;\n if (c < b) c = b;\n }\n } else {\n while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) {\n a = c = b;\n break;\n }\n while (++i < n) if ((b = f.call(array, array[i], i)) != null) {\n if (a > b) a = b;\n if (c < b) c = b;\n }\n }\n return [ a, c ];\n };\n function d3_number(x) {\n return x === null ? NaN : +x;\n }\n function d3_numeric(x) {\n return !isNaN(x);\n }\n d3.sum = function(array, f) {\n var s = 0, n = array.length, a, i = -1;\n if (arguments.length === 1) {\n while (++i < n) if (d3_numeric(a = +array[i])) s += a;\n } else {\n while (++i < n) if (d3_numeric(a = +f.call(array, array[i], i))) s += a;\n }\n return s;\n };\n d3.mean = function(array, f) {\n var s = 0, n = array.length, a, i = -1, j = n;\n if (arguments.length === 1) {\n while (++i < n) if (d3_numeric(a = d3_number(array[i]))) s += a; else --j;\n } else {\n while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) s += a; else --j;\n }\n if (j) return s / j;\n };\n d3.quantile = function(values, p) {\n var H = (values.length - 1) * p + 1, h = Math.floor(H), v = +values[h - 1], e = H - h;\n return e ? v + e * (values[h] - v) : v;\n };\n d3.median = function(array, f) {\n var numbers = [], n = array.length, a, i = -1;\n if (arguments.length === 1) {\n while (++i < n) if (d3_numeric(a = d3_number(array[i]))) numbers.push(a);\n } else {\n while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) numbers.push(a);\n }\n if (numbers.length) return d3.quantile(numbers.sort(d3_ascending), .5);\n };\n d3.variance = function(array, f) {\n var n = array.length, m = 0, a, d, s = 0, i = -1, j = 0;\n if (arguments.length === 1) {\n while (++i < n) {\n if (d3_numeric(a = d3_number(array[i]))) {\n d = a - m;\n m += d / ++j;\n s += d * (a - m);\n }\n }\n } else {\n while (++i < n) {\n if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) {\n d = a - m;\n m += d / ++j;\n s += d * (a - m);\n }\n }\n }\n if (j > 1) return s / (j - 1);\n };\n d3.deviation = function() {\n var v = d3.variance.apply(this, arguments);\n return v ? Math.sqrt(v) : v;\n };\n function d3_bisector(compare) {\n return {\n left: function(a, x, lo, hi) {\n if (arguments.length < 3) lo = 0;\n if (arguments.length < 4) hi = a.length;\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (compare(a[mid], x) < 0) lo = mid + 1; else hi = mid;\n }\n return lo;\n },\n right: function(a, x, lo, hi) {\n if (arguments.length < 3) lo = 0;\n if (arguments.length < 4) hi = a.length;\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (compare(a[mid], x) > 0) hi = mid; else lo = mid + 1;\n }\n return lo;\n }\n };\n }\n var d3_bisect = d3_bisector(d3_ascending);\n d3.bisectLeft = d3_bisect.left;\n d3.bisect = d3.bisectRight = d3_bisect.right;\n d3.bisector = function(f) {\n return d3_bisector(f.length === 1 ? function(d, x) {\n return d3_ascending(f(d), x);\n } : f);\n };\n d3.shuffle = function(array, i0, i1) {\n if ((m = arguments.length) < 3) {\n i1 = array.length;\n if (m < 2) i0 = 0;\n }\n var m = i1 - i0, t, i;\n while (m) {\n i = Math.random() * m-- | 0;\n t = array[m + i0], array[m + i0] = array[i + i0], array[i + i0] = t;\n }\n return array;\n };\n d3.permute = function(array, indexes) {\n var i = indexes.length, permutes = new Array(i);\n while (i--) permutes[i] = array[indexes[i]];\n return permutes;\n };\n d3.pairs = function(array) {\n var i = 0, n = array.length - 1, p0, p1 = array[0], pairs = new Array(n < 0 ? 0 : n);\n while (i < n) pairs[i] = [ p0 = p1, p1 = array[++i] ];\n return pairs;\n };\n d3.transpose = function(matrix) {\n if (!(n = matrix.length)) return [];\n for (var i = -1, m = d3.min(matrix, d3_transposeLength), transpose = new Array(m); ++i < m; ) {\n for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n; ) {\n row[j] = matrix[j][i];\n }\n }\n return transpose;\n };\n function d3_transposeLength(d) {\n return d.length;\n }\n d3.zip = function() {\n return d3.transpose(arguments);\n };\n d3.keys = function(map) {\n var keys = [];\n for (var key in map) keys.push(key);\n return keys;\n };\n d3.values = function(map) {\n var values = [];\n for (var key in map) values.push(map[key]);\n return values;\n };\n d3.entries = function(map) {\n var entries = [];\n for (var key in map) entries.push({\n key: key,\n value: map[key]\n });\n return entries;\n };\n d3.merge = function(arrays) {\n var n = arrays.length, m, i = -1, j = 0, merged, array;\n while (++i < n) j += arrays[i].length;\n merged = new Array(j);\n while (--n >= 0) {\n array = arrays[n];\n m = array.length;\n while (--m >= 0) {\n merged[--j] = array[m];\n }\n }\n return merged;\n };\n var abs = Math.abs;\n d3.range = function(start, stop, step) {\n if (arguments.length < 3) {\n step = 1;\n if (arguments.length < 2) {\n stop = start;\n start = 0;\n }\n }\n if ((stop - start) / step === Infinity) throw new Error(\"infinite range\");\n var range = [], k = d3_range_integerScale(abs(step)), i = -1, j;\n start *= k, stop *= k, step *= k;\n if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k); else while ((j = start + step * ++i) < stop) range.push(j / k);\n return range;\n };\n function d3_range_integerScale(x) {\n var k = 1;\n while (x * k % 1) k *= 10;\n return k;\n }\n function d3_class(ctor, properties) {\n for (var key in properties) {\n Object.defineProperty(ctor.prototype, key, {\n value: properties[key],\n enumerable: false\n });\n }\n }\n d3.map = function(object, f) {\n var map = new d3_Map();\n if (object instanceof d3_Map) {\n object.forEach(function(key, value) {\n map.set(key, value);\n });\n } else if (Array.isArray(object)) {\n var i = -1, n = object.length, o;\n if (arguments.length === 1) while (++i < n) map.set(i, object[i]); else while (++i < n) map.set(f.call(object, o = object[i], i), o);\n } else {\n for (var key in object) map.set(key, object[key]);\n }\n return map;\n };\n function d3_Map() {\n this._ = Object.create(null);\n }\n var d3_map_proto = \"__proto__\", d3_map_zero = \"\\x00\";\n d3_class(d3_Map, {\n has: d3_map_has,\n get: function(key) {\n return this._[d3_map_escape(key)];\n },\n set: function(key, value) {\n return this._[d3_map_escape(key)] = value;\n },\n remove: d3_map_remove,\n keys: d3_map_keys,\n values: function() {\n var values = [];\n for (var key in this._) values.push(this._[key]);\n return values;\n },\n entries: function() {\n var entries = [];\n for (var key in this._) entries.push({\n key: d3_map_unescape(key),\n value: this._[key]\n });\n return entries;\n },\n size: d3_map_size,\n empty: d3_map_empty,\n forEach: function(f) {\n for (var key in this._) f.call(this, d3_map_unescape(key), this._[key]);\n }\n });\n function d3_map_escape(key) {\n return (key += \"\") === d3_map_proto || key[0] === d3_map_zero ? d3_map_zero + key : key;\n }\n function d3_map_unescape(key) {\n return (key += \"\")[0] === d3_map_zero ? key.slice(1) : key;\n }\n function d3_map_has(key) {\n return d3_map_escape(key) in this._;\n }\n function d3_map_remove(key) {\n return (key = d3_map_escape(key)) in this._ && delete this._[key];\n }\n function d3_map_keys() {\n var keys = [];\n for (var key in this._) keys.push(d3_map_unescape(key));\n return keys;\n }\n function d3_map_size() {\n var size = 0;\n for (var key in this._) ++size;\n return size;\n }\n function d3_map_empty() {\n for (var key in this._) return false;\n return true;\n }\n d3.nest = function() {\n var nest = {}, keys = [], sortKeys = [], sortValues, rollup;\n function map(mapType, array, depth) {\n if (depth >= keys.length) return rollup ? rollup.call(nest, array) : sortValues ? array.sort(sortValues) : array;\n var i = -1, n = array.length, key = keys[depth++], keyValue, object, setter, valuesByKey = new d3_Map(), values;\n while (++i < n) {\n if (values = valuesByKey.get(keyValue = key(object = array[i]))) {\n values.push(object);\n } else {\n valuesByKey.set(keyValue, [ object ]);\n }\n }\n if (mapType) {\n object = mapType();\n setter = function(keyValue, values) {\n object.set(keyValue, map(mapType, values, depth));\n };\n } else {\n object = {};\n setter = function(keyValue, values) {\n object[keyValue] = map(mapType, values, depth);\n };\n }\n valuesByKey.forEach(setter);\n return object;\n }\n function entries(map, depth) {\n if (depth >= keys.length) return map;\n var array = [], sortKey = sortKeys[depth++];\n map.forEach(function(key, keyMap) {\n array.push({\n key: key,\n values: entries(keyMap, depth)\n });\n });\n return sortKey ? array.sort(function(a, b) {\n return sortKey(a.key, b.key);\n }) : array;\n }\n nest.map = function(array, mapType) {\n return map(mapType, array, 0);\n };\n nest.entries = function(array) {\n return entries(map(d3.map, array, 0), 0);\n };\n nest.key = function(d) {\n keys.push(d);\n return nest;\n };\n nest.sortKeys = function(order) {\n sortKeys[keys.length - 1] = order;\n return nest;\n };\n nest.sortValues = function(order) {\n sortValues = order;\n return nest;\n };\n nest.rollup = function(f) {\n rollup = f;\n return nest;\n };\n return nest;\n };\n d3.set = function(array) {\n var set = new d3_Set();\n if (array) for (var i = 0, n = array.length; i < n; ++i) set.add(array[i]);\n return set;\n };\n function d3_Set() {\n this._ = Object.create(null);\n }\n d3_class(d3_Set, {\n has: d3_map_has,\n add: function(key) {\n this._[d3_map_escape(key += \"\")] = true;\n return key;\n },\n remove: d3_map_remove,\n values: d3_map_keys,\n size: d3_map_size,\n empty: d3_map_empty,\n forEach: function(f) {\n for (var key in this._) f.call(this, d3_map_unescape(key));\n }\n });\n d3.behavior = {};\n function d3_identity(d) {\n return d;\n }\n d3.rebind = function(target, source) {\n var i = 1, n = arguments.length, method;\n while (++i < n) target[method = arguments[i]] = d3_rebind(target, source, source[method]);\n return target;\n };\n function d3_rebind(target, source, method) {\n return function() {\n var value = method.apply(source, arguments);\n return value === source ? target : value;\n };\n }\n function d3_vendorSymbol(object, name) {\n if (name in object) return name;\n name = name.charAt(0).toUpperCase() + name.slice(1);\n for (var i = 0, n = d3_vendorPrefixes.length; i < n; ++i) {\n var prefixName = d3_vendorPrefixes[i] + name;\n if (prefixName in object) return prefixName;\n }\n }\n var d3_vendorPrefixes = [ \"webkit\", \"ms\", \"moz\", \"Moz\", \"o\", \"O\" ];\n function d3_noop() {}\n d3.dispatch = function() {\n var dispatch = new d3_dispatch(), i = -1, n = arguments.length;\n while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);\n return dispatch;\n };\n function d3_dispatch() {}\n d3_dispatch.prototype.on = function(type, listener) {\n var i = type.indexOf(\".\"), name = \"\";\n if (i >= 0) {\n name = type.slice(i + 1);\n type = type.slice(0, i);\n }\n if (type) return arguments.length < 2 ? this[type].on(name) : this[type].on(name, listener);\n if (arguments.length === 2) {\n if (listener == null) for (type in this) {\n if (this.hasOwnProperty(type)) this[type].on(name, null);\n }\n return this;\n }\n };\n function d3_dispatch_event(dispatch) {\n var listeners = [], listenerByName = new d3_Map();\n function event() {\n var z = listeners, i = -1, n = z.length, l;\n while (++i < n) if (l = z[i].on) l.apply(this, arguments);\n return dispatch;\n }\n event.on = function(name, listener) {\n var l = listenerByName.get(name), i;\n if (arguments.length < 2) return l && l.on;\n if (l) {\n l.on = null;\n listeners = listeners.slice(0, i = listeners.indexOf(l)).concat(listeners.slice(i + 1));\n listenerByName.remove(name);\n }\n if (listener) listeners.push(listenerByName.set(name, {\n on: listener\n }));\n return dispatch;\n };\n return event;\n }\n d3.event = null;\n function d3_eventPreventDefault() {\n d3.event.preventDefault();\n }\n function d3_eventSource() {\n var e = d3.event, s;\n while (s = e.sourceEvent) e = s;\n return e;\n }\n function d3_eventDispatch(target) {\n var dispatch = new d3_dispatch(), i = 0, n = arguments.length;\n while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);\n dispatch.of = function(thiz, argumentz) {\n return function(e1) {\n try {\n var e0 = e1.sourceEvent = d3.event;\n e1.target = target;\n d3.event = e1;\n dispatch[e1.type].apply(thiz, argumentz);\n } finally {\n d3.event = e0;\n }\n };\n };\n return dispatch;\n }\n d3.requote = function(s) {\n return s.replace(d3_requote_re, \"\\\\$&\");\n };\n var d3_requote_re = /[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g;\n var d3_subclass = {}.__proto__ ? function(object, prototype) {\n object.__proto__ = prototype;\n } : function(object, prototype) {\n for (var property in prototype) object[property] = prototype[property];\n };\n function d3_selection(groups) {\n d3_subclass(groups, d3_selectionPrototype);\n return groups;\n }\n var d3_select = function(s, n) {\n return n.querySelector(s);\n }, d3_selectAll = function(s, n) {\n return n.querySelectorAll(s);\n }, d3_selectMatches = function(n, s) {\n var d3_selectMatcher = n.matches || n[d3_vendorSymbol(n, \"matchesSelector\")];\n d3_selectMatches = function(n, s) {\n return d3_selectMatcher.call(n, s);\n };\n return d3_selectMatches(n, s);\n };\n if (typeof Sizzle === \"function\") {\n d3_select = function(s, n) {\n return Sizzle(s, n)[0] || null;\n };\n d3_selectAll = Sizzle;\n d3_selectMatches = Sizzle.matchesSelector;\n }\n d3.selection = function() {\n return d3.select(d3_document.documentElement);\n };\n var d3_selectionPrototype = d3.selection.prototype = [];\n d3_selectionPrototype.select = function(selector) {\n var subgroups = [], subgroup, subnode, group, node;\n selector = d3_selection_selector(selector);\n for (var j = -1, m = this.length; ++j < m; ) {\n subgroups.push(subgroup = []);\n subgroup.parentNode = (group = this[j]).parentNode;\n for (var i = -1, n = group.length; ++i < n; ) {\n if (node = group[i]) {\n subgroup.push(subnode = selector.call(node, node.__data__, i, j));\n if (subnode && \"__data__\" in node) subnode.__data__ = node.__data__;\n } else {\n subgroup.push(null);\n }\n }\n }\n return d3_selection(subgroups);\n };\n function d3_selection_selector(selector) {\n return typeof selector === \"function\" ? selector : function() {\n return d3_select(selector, this);\n };\n }\n d3_selectionPrototype.selectAll = function(selector) {\n var subgroups = [], subgroup, node;\n selector = d3_selection_selectorAll(selector);\n for (var j = -1, m = this.length; ++j < m; ) {\n for (var group = this[j], i = -1, n = group.length; ++i < n; ) {\n if (node = group[i]) {\n subgroups.push(subgroup = d3_array(selector.call(node, node.__data__, i, j)));\n subgroup.parentNode = node;\n }\n }\n }\n return d3_selection(subgroups);\n };\n function d3_selection_selectorAll(selector) {\n return typeof selector === \"function\" ? selector : function() {\n return d3_selectAll(selector, this);\n };\n }\n var d3_nsXhtml = \"http://www.w3.org/1999/xhtml\";\n var d3_nsPrefix = {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: d3_nsXhtml,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n };\n d3.ns = {\n prefix: d3_nsPrefix,\n qualify: function(name) {\n var i = name.indexOf(\":\"), prefix = name;\n if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n return d3_nsPrefix.hasOwnProperty(prefix) ? {\n space: d3_nsPrefix[prefix],\n local: name\n } : name;\n }\n };\n d3_selectionPrototype.attr = function(name, value) {\n if (arguments.length < 2) {\n if (typeof name === \"string\") {\n var node = this.node();\n name = d3.ns.qualify(name);\n return name.local ? node.getAttributeNS(name.space, name.local) : node.getAttribute(name);\n }\n for (value in name) this.each(d3_selection_attr(value, name[value]));\n return this;\n }\n return this.each(d3_selection_attr(name, value));\n };\n function d3_selection_attr(name, value) {\n name = d3.ns.qualify(name);\n function attrNull() {\n this.removeAttribute(name);\n }\n function attrNullNS() {\n this.removeAttributeNS(name.space, name.local);\n }\n function attrConstant() {\n this.setAttribute(name, value);\n }\n function attrConstantNS() {\n this.setAttributeNS(name.space, name.local, value);\n }\n function attrFunction() {\n var x = value.apply(this, arguments);\n if (x == null) this.removeAttribute(name); else this.setAttribute(name, x);\n }\n function attrFunctionNS() {\n var x = value.apply(this, arguments);\n if (x == null) this.removeAttributeNS(name.space, name.local); else this.setAttributeNS(name.space, name.local, x);\n }\n return value == null ? name.local ? attrNullNS : attrNull : typeof value === \"function\" ? name.local ? attrFunctionNS : attrFunction : name.local ? attrConstantNS : attrConstant;\n }\n function d3_collapse(s) {\n return s.trim().replace(/\\s+/g, \" \");\n }\n d3_selectionPrototype.classed = function(name, value) {\n if (arguments.length < 2) {\n if (typeof name === \"string\") {\n var node = this.node(), n = (name = d3_selection_classes(name)).length, i = -1;\n if (value = node.classList) {\n while (++i < n) if (!value.contains(name[i])) return false;\n } else {\n value = node.getAttribute(\"class\");\n while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false;\n }\n return true;\n }\n for (value in name) this.each(d3_selection_classed(value, name[value]));\n return this;\n }\n return this.each(d3_selection_classed(name, value));\n };\n function d3_selection_classedRe(name) {\n return new RegExp(\"(?:^|\\\\s+)\" + d3.requote(name) + \"(?:\\\\s+|$)\", \"g\");\n }\n function d3_selection_classes(name) {\n return (name + \"\").trim().split(/^|\\s+/);\n }\n function d3_selection_classed(name, value) {\n name = d3_selection_classes(name).map(d3_selection_classedName);\n var n = name.length;\n function classedConstant() {\n var i = -1;\n while (++i < n) name[i](this, value);\n }\n function classedFunction() {\n var i = -1, x = value.apply(this, arguments);\n while (++i < n) name[i](this, x);\n }\n return typeof value === \"function\" ? classedFunction : classedConstant;\n }\n function d3_selection_classedName(name) {\n var re = d3_selection_classedRe(name);\n return function(node, value) {\n if (c = node.classList) return value ? c.add(name) : c.remove(name);\n var c = node.getAttribute(\"class\") || \"\";\n if (value) {\n re.lastIndex = 0;\n if (!re.test(c)) node.setAttribute(\"class\", d3_collapse(c + \" \" + name));\n } else {\n node.setAttribute(\"class\", d3_collapse(c.replace(re, \" \")));\n }\n };\n }\n d3_selectionPrototype.style = function(name, value, priority) {\n var n = arguments.length;\n if (n < 3) {\n if (typeof name !== \"string\") {\n if (n < 2) value = \"\";\n for (priority in name) this.each(d3_selection_style(priority, name[priority], value));\n return this;\n }\n if (n < 2) {\n var node = this.node();\n return d3_window(node).getComputedStyle(node, null).getPropertyValue(name);\n }\n priority = \"\";\n }\n return this.each(d3_selection_style(name, value, priority));\n };\n function d3_selection_style(name, value, priority) {\n function styleNull() {\n this.style.removeProperty(name);\n }\n function styleConstant() {\n this.style.setProperty(name, value, priority);\n }\n function styleFunction() {\n var x = value.apply(this, arguments);\n if (x == null) this.style.removeProperty(name); else this.style.setProperty(name, x, priority);\n }\n return value == null ? styleNull : typeof value === \"function\" ? styleFunction : styleConstant;\n }\n d3_selectionPrototype.property = function(name, value) {\n if (arguments.length < 2) {\n if (typeof name === \"string\") return this.node()[name];\n for (value in name) this.each(d3_selection_property(value, name[value]));\n return this;\n }\n return this.each(d3_selection_property(name, value));\n };\n function d3_selection_property(name, value) {\n function propertyNull() {\n delete this[name];\n }\n function propertyConstant() {\n this[name] = value;\n }\n function propertyFunction() {\n var x = value.apply(this, arguments);\n if (x == null) delete this[name]; else this[name] = x;\n }\n return value == null ? propertyNull : typeof value === \"function\" ? propertyFunction : propertyConstant;\n }\n d3_selectionPrototype.text = function(value) {\n return arguments.length ? this.each(typeof value === \"function\" ? function() {\n var v = value.apply(this, arguments);\n this.textContent = v == null ? \"\" : v;\n } : value == null ? function() {\n this.textContent = \"\";\n } : function() {\n this.textContent = value;\n }) : this.node().textContent;\n };\n d3_selectionPrototype.html = function(value) {\n return arguments.length ? this.each(typeof value === \"function\" ? function() {\n var v = value.apply(this, arguments);\n this.innerHTML = v == null ? \"\" : v;\n } : value == null ? function() {\n this.innerHTML = \"\";\n } : function() {\n this.innerHTML = value;\n }) : this.node().innerHTML;\n };\n d3_selectionPrototype.append = function(name) {\n name = d3_selection_creator(name);\n return this.select(function() {\n return this.appendChild(name.apply(this, arguments));\n });\n };\n function d3_selection_creator(name) {\n function create() {\n var document = this.ownerDocument, namespace = this.namespaceURI;\n return namespace === d3_nsXhtml && document.documentElement.namespaceURI === d3_nsXhtml ? document.createElement(name) : document.createElementNS(namespace, name);\n }\n function createNS() {\n return this.ownerDocument.createElementNS(name.space, name.local);\n }\n return typeof name === \"function\" ? name : (name = d3.ns.qualify(name)).local ? createNS : create;\n }\n d3_selectionPrototype.insert = function(name, before) {\n name = d3_selection_creator(name);\n before = d3_selection_selector(before);\n return this.select(function() {\n return this.insertBefore(name.apply(this, arguments), before.apply(this, arguments) || null);\n });\n };\n d3_selectionPrototype.remove = function() {\n return this.each(d3_selectionRemove);\n };\n function d3_selectionRemove() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n }\n d3_selectionPrototype.data = function(value, key) {\n var i = -1, n = this.length, group, node;\n if (!arguments.length) {\n value = new Array(n = (group = this[0]).length);\n while (++i < n) {\n if (node = group[i]) {\n value[i] = node.__data__;\n }\n }\n return value;\n }\n function bind(group, groupData) {\n var i, n = group.length, m = groupData.length, n0 = Math.min(n, m), updateNodes = new Array(m), enterNodes = new Array(m), exitNodes = new Array(n), node, nodeData;\n if (key) {\n var nodeByKeyValue = new d3_Map(), keyValues = new Array(n), keyValue;\n for (i = -1; ++i < n; ) {\n if (node = group[i]) {\n if (nodeByKeyValue.has(keyValue = key.call(node, node.__data__, i))) {\n exitNodes[i] = node;\n } else {\n nodeByKeyValue.set(keyValue, node);\n }\n keyValues[i] = keyValue;\n }\n }\n for (i = -1; ++i < m; ) {\n if (!(node = nodeByKeyValue.get(keyValue = key.call(groupData, nodeData = groupData[i], i)))) {\n enterNodes[i] = d3_selection_dataNode(nodeData);\n } else if (node !== true) {\n updateNodes[i] = node;\n node.__data__ = nodeData;\n }\n nodeByKeyValue.set(keyValue, true);\n }\n for (i = -1; ++i < n; ) {\n if (i in keyValues && nodeByKeyValue.get(keyValues[i]) !== true) {\n exitNodes[i] = group[i];\n }\n }\n } else {\n for (i = -1; ++i < n0; ) {\n node = group[i];\n nodeData = groupData[i];\n if (node) {\n node.__data__ = nodeData;\n updateNodes[i] = node;\n } else {\n enterNodes[i] = d3_selection_dataNode(nodeData);\n }\n }\n for (;i < m; ++i) {\n enterNodes[i] = d3_selection_dataNode(groupData[i]);\n }\n for (;i < n; ++i) {\n exitNodes[i] = group[i];\n }\n }\n enterNodes.update = updateNodes;\n enterNodes.parentNode = updateNodes.parentNode = exitNodes.parentNode = group.parentNode;\n enter.push(enterNodes);\n update.push(updateNodes);\n exit.push(exitNodes);\n }\n var enter = d3_selection_enter([]), update = d3_selection([]), exit = d3_selection([]);\n if (typeof value === \"function\") {\n while (++i < n) {\n bind(group = this[i], value.call(group, group.parentNode.__data__, i));\n }\n } else {\n while (++i < n) {\n bind(group = this[i], value);\n }\n }\n update.enter = function() {\n return enter;\n };\n update.exit = function() {\n return exit;\n };\n return update;\n };\n function d3_selection_dataNode(data) {\n return {\n __data__: data\n };\n }\n d3_selectionPrototype.datum = function(value) {\n return arguments.length ? this.property(\"__data__\", value) : this.property(\"__data__\");\n };\n d3_selectionPrototype.filter = function(filter) {\n var subgroups = [], subgroup, group, node;\n if (typeof filter !== \"function\") filter = d3_selection_filter(filter);\n for (var j = 0, m = this.length; j < m; j++) {\n subgroups.push(subgroup = []);\n subgroup.parentNode = (group = this[j]).parentNode;\n for (var i = 0, n = group.length; i < n; i++) {\n if ((node = group[i]) && filter.call(node, node.__data__, i, j)) {\n subgroup.push(node);\n }\n }\n }\n return d3_selection(subgroups);\n };\n function d3_selection_filter(selector) {\n return function() {\n return d3_selectMatches(this, selector);\n };\n }\n d3_selectionPrototype.order = function() {\n for (var j = -1, m = this.length; ++j < m; ) {\n for (var group = this[j], i = group.length - 1, next = group[i], node; --i >= 0; ) {\n if (node = group[i]) {\n if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n return this;\n };\n d3_selectionPrototype.sort = function(comparator) {\n comparator = d3_selection_sortComparator.apply(this, arguments);\n for (var j = -1, m = this.length; ++j < m; ) this[j].sort(comparator);\n return this.order();\n };\n function d3_selection_sortComparator(comparator) {\n if (!arguments.length) comparator = d3_ascending;\n return function(a, b) {\n return a && b ? comparator(a.__data__, b.__data__) : !a - !b;\n };\n }\n d3_selectionPrototype.each = function(callback) {\n return d3_selection_each(this, function(node, i, j) {\n callback.call(node, node.__data__, i, j);\n });\n };\n function d3_selection_each(groups, callback) {\n for (var j = 0, m = groups.length; j < m; j++) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; i++) {\n if (node = group[i]) callback(node, i, j);\n }\n }\n return groups;\n }\n d3_selectionPrototype.call = function(callback) {\n var args = d3_array(arguments);\n callback.apply(args[0] = this, args);\n return this;\n };\n d3_selectionPrototype.empty = function() {\n return !this.node();\n };\n d3_selectionPrototype.node = function() {\n for (var j = 0, m = this.length; j < m; j++) {\n for (var group = this[j], i = 0, n = group.length; i < n; i++) {\n var node = group[i];\n if (node) return node;\n }\n }\n return null;\n };\n d3_selectionPrototype.size = function() {\n var n = 0;\n d3_selection_each(this, function() {\n ++n;\n });\n return n;\n };\n function d3_selection_enter(selection) {\n d3_subclass(selection, d3_selection_enterPrototype);\n return selection;\n }\n var d3_selection_enterPrototype = [];\n d3.selection.enter = d3_selection_enter;\n d3.selection.enter.prototype = d3_selection_enterPrototype;\n d3_selection_enterPrototype.append = d3_selectionPrototype.append;\n d3_selection_enterPrototype.empty = d3_selectionPrototype.empty;\n d3_selection_enterPrototype.node = d3_selectionPrototype.node;\n d3_selection_enterPrototype.call = d3_selectionPrototype.call;\n d3_selection_enterPrototype.size = d3_selectionPrototype.size;\n d3_selection_enterPrototype.select = function(selector) {\n var subgroups = [], subgroup, subnode, upgroup, group, node;\n for (var j = -1, m = this.length; ++j < m; ) {\n upgroup = (group = this[j]).update;\n subgroups.push(subgroup = []);\n subgroup.parentNode = group.parentNode;\n for (var i = -1, n = group.length; ++i < n; ) {\n if (node = group[i]) {\n subgroup.push(upgroup[i] = subnode = selector.call(group.parentNode, node.__data__, i, j));\n subnode.__data__ = node.__data__;\n } else {\n subgroup.push(null);\n }\n }\n }\n return d3_selection(subgroups);\n };\n d3_selection_enterPrototype.insert = function(name, before) {\n if (arguments.length < 2) before = d3_selection_enterInsertBefore(this);\n return d3_selectionPrototype.insert.call(this, name, before);\n };\n function d3_selection_enterInsertBefore(enter) {\n var i0, j0;\n return function(d, i, j) {\n var group = enter[j].update, n = group.length, node;\n if (j != j0) j0 = j, i0 = 0;\n if (i >= i0) i0 = i + 1;\n while (!(node = group[i0]) && ++i0 < n) ;\n return node;\n };\n }\n d3.select = function(node) {\n var group;\n if (typeof node === \"string\") {\n group = [ d3_select(node, d3_document) ];\n group.parentNode = d3_document.documentElement;\n } else {\n group = [ node ];\n group.parentNode = d3_documentElement(node);\n }\n return d3_selection([ group ]);\n };\n d3.selectAll = function(nodes) {\n var group;\n if (typeof nodes === \"string\") {\n group = d3_array(d3_selectAll(nodes, d3_document));\n group.parentNode = d3_document.documentElement;\n } else {\n group = d3_array(nodes);\n group.parentNode = null;\n }\n return d3_selection([ group ]);\n };\n d3_selectionPrototype.on = function(type, listener, capture) {\n var n = arguments.length;\n if (n < 3) {\n if (typeof type !== \"string\") {\n if (n < 2) listener = false;\n for (capture in type) this.each(d3_selection_on(capture, type[capture], listener));\n return this;\n }\n if (n < 2) return (n = this.node()[\"__on\" + type]) && n._;\n capture = false;\n }\n return this.each(d3_selection_on(type, listener, capture));\n };\n function d3_selection_on(type, listener, capture) {\n var name = \"__on\" + type, i = type.indexOf(\".\"), wrap = d3_selection_onListener;\n if (i > 0) type = type.slice(0, i);\n var filter = d3_selection_onFilters.get(type);\n if (filter) type = filter, wrap = d3_selection_onFilter;\n function onRemove() {\n var l = this[name];\n if (l) {\n this.removeEventListener(type, l, l.$);\n delete this[name];\n }\n }\n function onAdd() {\n var l = wrap(listener, d3_array(arguments));\n onRemove.call(this);\n this.addEventListener(type, this[name] = l, l.$ = capture);\n l._ = listener;\n }\n function removeAll() {\n var re = new RegExp(\"^__on([^.]+)\" + d3.requote(type) + \"$\"), match;\n for (var name in this) {\n if (match = name.match(re)) {\n var l = this[name];\n this.removeEventListener(match[1], l, l.$);\n delete this[name];\n }\n }\n }\n return i ? listener ? onAdd : onRemove : listener ? d3_noop : removeAll;\n }\n var d3_selection_onFilters = d3.map({\n mouseenter: \"mouseover\",\n mouseleave: \"mouseout\"\n });\n if (d3_document) {\n d3_selection_onFilters.forEach(function(k) {\n if (\"on\" + k in d3_document) d3_selection_onFilters.remove(k);\n });\n }\n function d3_selection_onListener(listener, argumentz) {\n return function(e) {\n var o = d3.event;\n d3.event = e;\n argumentz[0] = this.__data__;\n try {\n listener.apply(this, argumentz);\n } finally {\n d3.event = o;\n }\n };\n }\n function d3_selection_onFilter(listener, argumentz) {\n var l = d3_selection_onListener(listener, argumentz);\n return function(e) {\n var target = this, related = e.relatedTarget;\n if (!related || related !== target && !(related.compareDocumentPosition(target) & 8)) {\n l.call(target, e);\n }\n };\n }\n var d3_event_dragSelect, d3_event_dragId = 0;\n function d3_event_dragSuppress(node) {\n var name = \".dragsuppress-\" + ++d3_event_dragId, click = \"click\" + name, w = d3.select(d3_window(node)).on(\"touchmove\" + name, d3_eventPreventDefault).on(\"dragstart\" + name, d3_eventPreventDefault).on(\"selectstart\" + name, d3_eventPreventDefault);\n if (d3_event_dragSelect == null) {\n d3_event_dragSelect = \"onselectstart\" in node ? false : d3_vendorSymbol(node.style, \"userSelect\");\n }\n if (d3_event_dragSelect) {\n var style = d3_documentElement(node).style, select = style[d3_event_dragSelect];\n style[d3_event_dragSelect] = \"none\";\n }\n return function(suppressClick) {\n w.on(name, null);\n if (d3_event_dragSelect) style[d3_event_dragSelect] = select;\n if (suppressClick) {\n var off = function() {\n w.on(click, null);\n };\n w.on(click, function() {\n d3_eventPreventDefault();\n off();\n }, true);\n setTimeout(off, 0);\n }\n };\n }\n d3.mouse = function(container) {\n return d3_mousePoint(container, d3_eventSource());\n };\n var d3_mouse_bug44083 = this.navigator && /WebKit/.test(this.navigator.userAgent) ? -1 : 0;\n function d3_mousePoint(container, e) {\n if (e.changedTouches) e = e.changedTouches[0];\n var svg = container.ownerSVGElement || container;\n if (svg.createSVGPoint) {\n var point = svg.createSVGPoint();\n if (d3_mouse_bug44083 < 0) {\n var window = d3_window(container);\n if (window.scrollX || window.scrollY) {\n svg = d3.select(\"body\").append(\"svg\").style({\n position: \"absolute\",\n top: 0,\n left: 0,\n margin: 0,\n padding: 0,\n border: \"none\"\n }, \"important\");\n var ctm = svg[0][0].getScreenCTM();\n d3_mouse_bug44083 = !(ctm.f || ctm.e);\n svg.remove();\n }\n }\n if (d3_mouse_bug44083) point.x = e.pageX, point.y = e.pageY; else point.x = e.clientX, \n point.y = e.clientY;\n point = point.matrixTransform(container.getScreenCTM().inverse());\n return [ point.x, point.y ];\n }\n var rect = container.getBoundingClientRect();\n return [ e.clientX - rect.left - container.clientLeft, e.clientY - rect.top - container.clientTop ];\n }\n d3.touch = function(container, touches, identifier) {\n if (arguments.length < 3) identifier = touches, touches = d3_eventSource().changedTouches;\n if (touches) for (var i = 0, n = touches.length, touch; i < n; ++i) {\n if ((touch = touches[i]).identifier === identifier) {\n return d3_mousePoint(container, touch);\n }\n }\n };\n d3.behavior.drag = function() {\n var event = d3_eventDispatch(drag, \"drag\", \"dragstart\", \"dragend\"), origin = null, mousedown = dragstart(d3_noop, d3.mouse, d3_window, \"mousemove\", \"mouseup\"), touchstart = dragstart(d3_behavior_dragTouchId, d3.touch, d3_identity, \"touchmove\", \"touchend\");\n function drag() {\n this.on(\"mousedown.drag\", mousedown).on(\"touchstart.drag\", touchstart);\n }\n function dragstart(id, position, subject, move, end) {\n return function() {\n var that = this, target = d3.event.target.correspondingElement || d3.event.target, parent = that.parentNode, dispatch = event.of(that, arguments), dragged = 0, dragId = id(), dragName = \".drag\" + (dragId == null ? \"\" : \"-\" + dragId), dragOffset, dragSubject = d3.select(subject(target)).on(move + dragName, moved).on(end + dragName, ended), dragRestore = d3_event_dragSuppress(target), position0 = position(parent, dragId);\n if (origin) {\n dragOffset = origin.apply(that, arguments);\n dragOffset = [ dragOffset.x - position0[0], dragOffset.y - position0[1] ];\n } else {\n dragOffset = [ 0, 0 ];\n }\n dispatch({\n type: \"dragstart\"\n });\n function moved() {\n var position1 = position(parent, dragId), dx, dy;\n if (!position1) return;\n dx = position1[0] - position0[0];\n dy = position1[1] - position0[1];\n dragged |= dx | dy;\n position0 = position1;\n dispatch({\n type: \"drag\",\n x: position1[0] + dragOffset[0],\n y: position1[1] + dragOffset[1],\n dx: dx,\n dy: dy\n });\n }\n function ended() {\n if (!position(parent, dragId)) return;\n dragSubject.on(move + dragName, null).on(end + dragName, null);\n dragRestore(dragged);\n dispatch({\n type: \"dragend\"\n });\n }\n };\n }\n drag.origin = function(x) {\n if (!arguments.length) return origin;\n origin = x;\n return drag;\n };\n return d3.rebind(drag, event, \"on\");\n };\n function d3_behavior_dragTouchId() {\n return d3.event.changedTouches[0].identifier;\n }\n d3.touches = function(container, touches) {\n if (arguments.length < 2) touches = d3_eventSource().touches;\n return touches ? d3_array(touches).map(function(touch) {\n var point = d3_mousePoint(container, touch);\n point.identifier = touch.identifier;\n return point;\n }) : [];\n };\n var ε = 1e-6, ε2 = ε * ε, π = Math.PI, τ = 2 * π, τε = τ - ε, halfπ = π / 2, d3_radians = π / 180, d3_degrees = 180 / π;\n function d3_sgn(x) {\n return x > 0 ? 1 : x < 0 ? -1 : 0;\n }\n function d3_cross2d(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n }\n function d3_acos(x) {\n return x > 1 ? 0 : x < -1 ? π : Math.acos(x);\n }\n function d3_asin(x) {\n return x > 1 ? halfπ : x < -1 ? -halfπ : Math.asin(x);\n }\n function d3_sinh(x) {\n return ((x = Math.exp(x)) - 1 / x) / 2;\n }\n function d3_cosh(x) {\n return ((x = Math.exp(x)) + 1 / x) / 2;\n }\n function d3_tanh(x) {\n return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n }\n function d3_haversin(x) {\n return (x = Math.sin(x / 2)) * x;\n }\n var ρ = Math.SQRT2, ρ2 = 2, ρ4 = 4;\n d3.interpolateZoom = function(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2], dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, i, S;\n if (d2 < ε2) {\n S = Math.log(w1 / w0) / ρ;\n i = function(t) {\n return [ ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(ρ * t * S) ];\n };\n } else {\n var d1 = Math.sqrt(d2), b0 = (w1 * w1 - w0 * w0 + ρ4 * d2) / (2 * w0 * ρ2 * d1), b1 = (w1 * w1 - w0 * w0 - ρ4 * d2) / (2 * w1 * ρ2 * d1), r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / ρ;\n i = function(t) {\n var s = t * S, coshr0 = d3_cosh(r0), u = w0 / (ρ2 * d1) * (coshr0 * d3_tanh(ρ * s + r0) - d3_sinh(r0));\n return [ ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / d3_cosh(ρ * s + r0) ];\n };\n }\n i.duration = S * 1e3;\n return i;\n };\n d3.behavior.zoom = function() {\n var view = {\n x: 0,\n y: 0,\n k: 1\n }, translate0, center0, center, size = [ 960, 500 ], scaleExtent = d3_behavior_zoomInfinity, duration = 250, zooming = 0, mousedown = \"mousedown.zoom\", mousemove = \"mousemove.zoom\", mouseup = \"mouseup.zoom\", mousewheelTimer, touchstart = \"touchstart.zoom\", touchtime, event = d3_eventDispatch(zoom, \"zoomstart\", \"zoom\", \"zoomend\"), x0, x1, y0, y1;\n if (!d3_behavior_zoomWheel) {\n d3_behavior_zoomWheel = \"onwheel\" in d3_document ? (d3_behavior_zoomDelta = function() {\n return -d3.event.deltaY * (d3.event.deltaMode ? 120 : 1);\n }, \"wheel\") : \"onmousewheel\" in d3_document ? (d3_behavior_zoomDelta = function() {\n return d3.event.wheelDelta;\n }, \"mousewheel\") : (d3_behavior_zoomDelta = function() {\n return -d3.event.detail;\n }, \"MozMousePixelScroll\");\n }\n function zoom(g) {\n g.on(mousedown, mousedowned).on(d3_behavior_zoomWheel + \".zoom\", mousewheeled).on(\"dblclick.zoom\", dblclicked).on(touchstart, touchstarted);\n }\n zoom.event = function(g) {\n g.each(function() {\n var dispatch = event.of(this, arguments), view1 = view;\n if (d3_transitionInheritId) {\n d3.select(this).transition().each(\"start.zoom\", function() {\n view = this.__chart__ || {\n x: 0,\n y: 0,\n k: 1\n };\n zoomstarted(dispatch);\n }).tween(\"zoom:zoom\", function() {\n var dx = size[0], dy = size[1], cx = center0 ? center0[0] : dx / 2, cy = center0 ? center0[1] : dy / 2, i = d3.interpolateZoom([ (cx - view.x) / view.k, (cy - view.y) / view.k, dx / view.k ], [ (cx - view1.x) / view1.k, (cy - view1.y) / view1.k, dx / view1.k ]);\n return function(t) {\n var l = i(t), k = dx / l[2];\n this.__chart__ = view = {\n x: cx - l[0] * k,\n y: cy - l[1] * k,\n k: k\n };\n zoomed(dispatch);\n };\n }).each(\"interrupt.zoom\", function() {\n zoomended(dispatch);\n }).each(\"end.zoom\", function() {\n zoomended(dispatch);\n });\n } else {\n this.__chart__ = view;\n zoomstarted(dispatch);\n zoomed(dispatch);\n zoomended(dispatch);\n }\n });\n };\n zoom.translate = function(_) {\n if (!arguments.length) return [ view.x, view.y ];\n view = {\n x: +_[0],\n y: +_[1],\n k: view.k\n };\n rescale();\n return zoom;\n };\n zoom.scale = function(_) {\n if (!arguments.length) return view.k;\n view = {\n x: view.x,\n y: view.y,\n k: null\n };\n scaleTo(+_);\n rescale();\n return zoom;\n };\n zoom.scaleExtent = function(_) {\n if (!arguments.length) return scaleExtent;\n scaleExtent = _ == null ? d3_behavior_zoomInfinity : [ +_[0], +_[1] ];\n return zoom;\n };\n zoom.center = function(_) {\n if (!arguments.length) return center;\n center = _ && [ +_[0], +_[1] ];\n return zoom;\n };\n zoom.size = function(_) {\n if (!arguments.length) return size;\n size = _ && [ +_[0], +_[1] ];\n return zoom;\n };\n zoom.duration = function(_) {\n if (!arguments.length) return duration;\n duration = +_;\n return zoom;\n };\n zoom.x = function(z) {\n if (!arguments.length) return x1;\n x1 = z;\n x0 = z.copy();\n view = {\n x: 0,\n y: 0,\n k: 1\n };\n return zoom;\n };\n zoom.y = function(z) {\n if (!arguments.length) return y1;\n y1 = z;\n y0 = z.copy();\n view = {\n x: 0,\n y: 0,\n k: 1\n };\n return zoom;\n };\n function location(p) {\n return [ (p[0] - view.x) / view.k, (p[1] - view.y) / view.k ];\n }\n function point(l) {\n return [ l[0] * view.k + view.x, l[1] * view.k + view.y ];\n }\n function scaleTo(s) {\n view.k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], s));\n }\n function translateTo(p, l) {\n l = point(l);\n view.x += p[0] - l[0];\n view.y += p[1] - l[1];\n }\n function zoomTo(that, p, l, k) {\n that.__chart__ = {\n x: view.x,\n y: view.y,\n k: view.k\n };\n scaleTo(Math.pow(2, k));\n translateTo(center0 = p, l);\n that = d3.select(that);\n if (duration > 0) that = that.transition().duration(duration);\n that.call(zoom.event);\n }\n function rescale() {\n if (x1) x1.domain(x0.range().map(function(x) {\n return (x - view.x) / view.k;\n }).map(x0.invert));\n if (y1) y1.domain(y0.range().map(function(y) {\n return (y - view.y) / view.k;\n }).map(y0.invert));\n }\n function zoomstarted(dispatch) {\n if (!zooming++) dispatch({\n type: \"zoomstart\"\n });\n }\n function zoomed(dispatch) {\n rescale();\n dispatch({\n type: \"zoom\",\n scale: view.k,\n translate: [ view.x, view.y ]\n });\n }\n function zoomended(dispatch) {\n if (!--zooming) dispatch({\n type: \"zoomend\"\n }), center0 = null;\n }\n function mousedowned() {\n var that = this, dispatch = event.of(that, arguments), dragged = 0, subject = d3.select(d3_window(that)).on(mousemove, moved).on(mouseup, ended), location0 = location(d3.mouse(that)), dragRestore = d3_event_dragSuppress(that);\n d3_selection_interrupt.call(that);\n zoomstarted(dispatch);\n function moved() {\n dragged = 1;\n translateTo(d3.mouse(that), location0);\n zoomed(dispatch);\n }\n function ended() {\n subject.on(mousemove, null).on(mouseup, null);\n dragRestore(dragged);\n zoomended(dispatch);\n }\n }\n function touchstarted() {\n var that = this, dispatch = event.of(that, arguments), locations0 = {}, distance0 = 0, scale0, zoomName = \".zoom-\" + d3.event.changedTouches[0].identifier, touchmove = \"touchmove\" + zoomName, touchend = \"touchend\" + zoomName, targets = [], subject = d3.select(that), dragRestore = d3_event_dragSuppress(that);\n started();\n zoomstarted(dispatch);\n subject.on(mousedown, null).on(touchstart, started);\n function relocate() {\n var touches = d3.touches(that);\n scale0 = view.k;\n touches.forEach(function(t) {\n if (t.identifier in locations0) locations0[t.identifier] = location(t);\n });\n return touches;\n }\n function started() {\n var target = d3.event.target;\n d3.select(target).on(touchmove, moved).on(touchend, ended);\n targets.push(target);\n var changed = d3.event.changedTouches;\n for (var i = 0, n = changed.length; i < n; ++i) {\n locations0[changed[i].identifier] = null;\n }\n var touches = relocate(), now = Date.now();\n if (touches.length === 1) {\n if (now - touchtime < 500) {\n var p = touches[0];\n zoomTo(that, p, locations0[p.identifier], Math.floor(Math.log(view.k) / Math.LN2) + 1);\n d3_eventPreventDefault();\n }\n touchtime = now;\n } else if (touches.length > 1) {\n var p = touches[0], q = touches[1], dx = p[0] - q[0], dy = p[1] - q[1];\n distance0 = dx * dx + dy * dy;\n }\n }\n function moved() {\n var touches = d3.touches(that), p0, l0, p1, l1;\n d3_selection_interrupt.call(that);\n for (var i = 0, n = touches.length; i < n; ++i, l1 = null) {\n p1 = touches[i];\n if (l1 = locations0[p1.identifier]) {\n if (l0) break;\n p0 = p1, l0 = l1;\n }\n }\n if (l1) {\n var distance1 = (distance1 = p1[0] - p0[0]) * distance1 + (distance1 = p1[1] - p0[1]) * distance1, scale1 = distance0 && Math.sqrt(distance1 / distance0);\n p0 = [ (p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2 ];\n l0 = [ (l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2 ];\n scaleTo(scale1 * scale0);\n }\n touchtime = null;\n translateTo(p0, l0);\n zoomed(dispatch);\n }\n function ended() {\n if (d3.event.touches.length) {\n var changed = d3.event.changedTouches;\n for (var i = 0, n = changed.length; i < n; ++i) {\n delete locations0[changed[i].identifier];\n }\n for (var identifier in locations0) {\n return void relocate();\n }\n }\n d3.selectAll(targets).on(zoomName, null);\n subject.on(mousedown, mousedowned).on(touchstart, touchstarted);\n dragRestore();\n zoomended(dispatch);\n }\n }\n function mousewheeled() {\n var dispatch = event.of(this, arguments);\n if (mousewheelTimer) clearTimeout(mousewheelTimer); else d3_selection_interrupt.call(this), \n translate0 = location(center0 = center || d3.mouse(this)), zoomstarted(dispatch);\n mousewheelTimer = setTimeout(function() {\n mousewheelTimer = null;\n zoomended(dispatch);\n }, 50);\n d3_eventPreventDefault();\n scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * view.k);\n translateTo(center0, translate0);\n zoomed(dispatch);\n }\n function dblclicked() {\n var p = d3.mouse(this), k = Math.log(view.k) / Math.LN2;\n zoomTo(this, p, location(p), d3.event.shiftKey ? Math.ceil(k) - 1 : Math.floor(k) + 1);\n }\n return d3.rebind(zoom, event, \"on\");\n };\n var d3_behavior_zoomInfinity = [ 0, Infinity ], d3_behavior_zoomDelta, d3_behavior_zoomWheel;\n d3.color = d3_color;\n function d3_color() {}\n d3_color.prototype.toString = function() {\n return this.rgb() + \"\";\n };\n d3.hsl = d3_hsl;\n function d3_hsl(h, s, l) {\n return this instanceof d3_hsl ? void (this.h = +h, this.s = +s, this.l = +l) : arguments.length < 2 ? h instanceof d3_hsl ? new d3_hsl(h.h, h.s, h.l) : d3_rgb_parse(\"\" + h, d3_rgb_hsl, d3_hsl) : new d3_hsl(h, s, l);\n }\n var d3_hslPrototype = d3_hsl.prototype = new d3_color();\n d3_hslPrototype.brighter = function(k) {\n k = Math.pow(.7, arguments.length ? k : 1);\n return new d3_hsl(this.h, this.s, this.l / k);\n };\n d3_hslPrototype.darker = function(k) {\n k = Math.pow(.7, arguments.length ? k : 1);\n return new d3_hsl(this.h, this.s, k * this.l);\n };\n d3_hslPrototype.rgb = function() {\n return d3_hsl_rgb(this.h, this.s, this.l);\n };\n function d3_hsl_rgb(h, s, l) {\n var m1, m2;\n h = isNaN(h) ? 0 : (h %= 360) < 0 ? h + 360 : h;\n s = isNaN(s) ? 0 : s < 0 ? 0 : s > 1 ? 1 : s;\n l = l < 0 ? 0 : l > 1 ? 1 : l;\n m2 = l <= .5 ? l * (1 + s) : l + s - l * s;\n m1 = 2 * l - m2;\n function v(h) {\n if (h > 360) h -= 360; else if (h < 0) h += 360;\n if (h < 60) return m1 + (m2 - m1) * h / 60;\n if (h < 180) return m2;\n if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60;\n return m1;\n }\n function vv(h) {\n return Math.round(v(h) * 255);\n }\n return new d3_rgb(vv(h + 120), vv(h), vv(h - 120));\n }\n d3.hcl = d3_hcl;\n function d3_hcl(h, c, l) {\n return this instanceof d3_hcl ? void (this.h = +h, this.c = +c, this.l = +l) : arguments.length < 2 ? h instanceof d3_hcl ? new d3_hcl(h.h, h.c, h.l) : h instanceof d3_lab ? d3_lab_hcl(h.l, h.a, h.b) : d3_lab_hcl((h = d3_rgb_lab((h = d3.rgb(h)).r, h.g, h.b)).l, h.a, h.b) : new d3_hcl(h, c, l);\n }\n var d3_hclPrototype = d3_hcl.prototype = new d3_color();\n d3_hclPrototype.brighter = function(k) {\n return new d3_hcl(this.h, this.c, Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)));\n };\n d3_hclPrototype.darker = function(k) {\n return new d3_hcl(this.h, this.c, Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)));\n };\n d3_hclPrototype.rgb = function() {\n return d3_hcl_lab(this.h, this.c, this.l).rgb();\n };\n function d3_hcl_lab(h, c, l) {\n if (isNaN(h)) h = 0;\n if (isNaN(c)) c = 0;\n return new d3_lab(l, Math.cos(h *= d3_radians) * c, Math.sin(h) * c);\n }\n d3.lab = d3_lab;\n function d3_lab(l, a, b) {\n return this instanceof d3_lab ? void (this.l = +l, this.a = +a, this.b = +b) : arguments.length < 2 ? l instanceof d3_lab ? new d3_lab(l.l, l.a, l.b) : l instanceof d3_hcl ? d3_hcl_lab(l.h, l.c, l.l) : d3_rgb_lab((l = d3_rgb(l)).r, l.g, l.b) : new d3_lab(l, a, b);\n }\n var d3_lab_K = 18;\n var d3_lab_X = .95047, d3_lab_Y = 1, d3_lab_Z = 1.08883;\n var d3_labPrototype = d3_lab.prototype = new d3_color();\n d3_labPrototype.brighter = function(k) {\n return new d3_lab(Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);\n };\n d3_labPrototype.darker = function(k) {\n return new d3_lab(Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);\n };\n d3_labPrototype.rgb = function() {\n return d3_lab_rgb(this.l, this.a, this.b);\n };\n function d3_lab_rgb(l, a, b) {\n var y = (l + 16) / 116, x = y + a / 500, z = y - b / 200;\n x = d3_lab_xyz(x) * d3_lab_X;\n y = d3_lab_xyz(y) * d3_lab_Y;\n z = d3_lab_xyz(z) * d3_lab_Z;\n return new d3_rgb(d3_xyz_rgb(3.2404542 * x - 1.5371385 * y - .4985314 * z), d3_xyz_rgb(-.969266 * x + 1.8760108 * y + .041556 * z), d3_xyz_rgb(.0556434 * x - .2040259 * y + 1.0572252 * z));\n }\n function d3_lab_hcl(l, a, b) {\n return l > 0 ? new d3_hcl(Math.atan2(b, a) * d3_degrees, Math.sqrt(a * a + b * b), l) : new d3_hcl(NaN, NaN, l);\n }\n function d3_lab_xyz(x) {\n return x > .206893034 ? x * x * x : (x - 4 / 29) / 7.787037;\n }\n function d3_xyz_lab(x) {\n return x > .008856 ? Math.pow(x, 1 / 3) : 7.787037 * x + 4 / 29;\n }\n function d3_xyz_rgb(r) {\n return Math.round(255 * (r <= .00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - .055));\n }\n d3.rgb = d3_rgb;\n function d3_rgb(r, g, b) {\n return this instanceof d3_rgb ? void (this.r = ~~r, this.g = ~~g, this.b = ~~b) : arguments.length < 2 ? r instanceof d3_rgb ? new d3_rgb(r.r, r.g, r.b) : d3_rgb_parse(\"\" + r, d3_rgb, d3_hsl_rgb) : new d3_rgb(r, g, b);\n }\n function d3_rgbNumber(value) {\n return new d3_rgb(value >> 16, value >> 8 & 255, value & 255);\n }\n function d3_rgbString(value) {\n return d3_rgbNumber(value) + \"\";\n }\n var d3_rgbPrototype = d3_rgb.prototype = new d3_color();\n d3_rgbPrototype.brighter = function(k) {\n k = Math.pow(.7, arguments.length ? k : 1);\n var r = this.r, g = this.g, b = this.b, i = 30;\n if (!r && !g && !b) return new d3_rgb(i, i, i);\n if (r && r < i) r = i;\n if (g && g < i) g = i;\n if (b && b < i) b = i;\n return new d3_rgb(Math.min(255, r / k), Math.min(255, g / k), Math.min(255, b / k));\n };\n d3_rgbPrototype.darker = function(k) {\n k = Math.pow(.7, arguments.length ? k : 1);\n return new d3_rgb(k * this.r, k * this.g, k * this.b);\n };\n d3_rgbPrototype.hsl = function() {\n return d3_rgb_hsl(this.r, this.g, this.b);\n };\n d3_rgbPrototype.toString = function() {\n return \"#\" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b);\n };\n function d3_rgb_hex(v) {\n return v < 16 ? \"0\" + Math.max(0, v).toString(16) : Math.min(255, v).toString(16);\n }\n function d3_rgb_parse(format, rgb, hsl) {\n var r = 0, g = 0, b = 0, m1, m2, color;\n m1 = /([a-z]+)\\((.*)\\)/.exec(format = format.toLowerCase());\n if (m1) {\n m2 = m1[2].split(\",\");\n switch (m1[1]) {\n case \"hsl\":\n {\n return hsl(parseFloat(m2[0]), parseFloat(m2[1]) / 100, parseFloat(m2[2]) / 100);\n }\n\n case \"rgb\":\n {\n return rgb(d3_rgb_parseNumber(m2[0]), d3_rgb_parseNumber(m2[1]), d3_rgb_parseNumber(m2[2]));\n }\n }\n }\n if (color = d3_rgb_names.get(format)) {\n return rgb(color.r, color.g, color.b);\n }\n if (format != null && format.charAt(0) === \"#\" && !isNaN(color = parseInt(format.slice(1), 16))) {\n if (format.length === 4) {\n r = (color & 3840) >> 4;\n r = r >> 4 | r;\n g = color & 240;\n g = g >> 4 | g;\n b = color & 15;\n b = b << 4 | b;\n } else if (format.length === 7) {\n r = (color & 16711680) >> 16;\n g = (color & 65280) >> 8;\n b = color & 255;\n }\n }\n return rgb(r, g, b);\n }\n function d3_rgb_hsl(r, g, b) {\n var min = Math.min(r /= 255, g /= 255, b /= 255), max = Math.max(r, g, b), d = max - min, h, s, l = (max + min) / 2;\n if (d) {\n s = l < .5 ? d / (max + min) : d / (2 - max - min);\n if (r == max) h = (g - b) / d + (g < b ? 6 : 0); else if (g == max) h = (b - r) / d + 2; else h = (r - g) / d + 4;\n h *= 60;\n } else {\n h = NaN;\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new d3_hsl(h, s, l);\n }\n function d3_rgb_lab(r, g, b) {\n r = d3_rgb_xyz(r);\n g = d3_rgb_xyz(g);\n b = d3_rgb_xyz(b);\n var x = d3_xyz_lab((.4124564 * r + .3575761 * g + .1804375 * b) / d3_lab_X), y = d3_xyz_lab((.2126729 * r + .7151522 * g + .072175 * b) / d3_lab_Y), z = d3_xyz_lab((.0193339 * r + .119192 * g + .9503041 * b) / d3_lab_Z);\n return d3_lab(116 * y - 16, 500 * (x - y), 200 * (y - z));\n }\n function d3_rgb_xyz(r) {\n return (r /= 255) <= .04045 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4);\n }\n function d3_rgb_parseNumber(c) {\n var f = parseFloat(c);\n return c.charAt(c.length - 1) === \"%\" ? Math.round(f * 2.55) : f;\n }\n var d3_rgb_names = d3.map({\n aliceblue: 15792383,\n antiquewhite: 16444375,\n aqua: 65535,\n aquamarine: 8388564,\n azure: 15794175,\n beige: 16119260,\n bisque: 16770244,\n black: 0,\n blanchedalmond: 16772045,\n blue: 255,\n blueviolet: 9055202,\n brown: 10824234,\n burlywood: 14596231,\n cadetblue: 6266528,\n chartreuse: 8388352,\n chocolate: 13789470,\n coral: 16744272,\n cornflowerblue: 6591981,\n cornsilk: 16775388,\n crimson: 14423100,\n cyan: 65535,\n darkblue: 139,\n darkcyan: 35723,\n darkgoldenrod: 12092939,\n darkgray: 11119017,\n darkgreen: 25600,\n darkgrey: 11119017,\n darkkhaki: 12433259,\n darkmagenta: 9109643,\n darkolivegreen: 5597999,\n darkorange: 16747520,\n darkorchid: 10040012,\n darkred: 9109504,\n darksalmon: 15308410,\n darkseagreen: 9419919,\n darkslateblue: 4734347,\n darkslategray: 3100495,\n darkslategrey: 3100495,\n darkturquoise: 52945,\n darkviolet: 9699539,\n deeppink: 16716947,\n deepskyblue: 49151,\n dimgray: 6908265,\n dimgrey: 6908265,\n dodgerblue: 2003199,\n firebrick: 11674146,\n floralwhite: 16775920,\n forestgreen: 2263842,\n fuchsia: 16711935,\n gainsboro: 14474460,\n ghostwhite: 16316671,\n gold: 16766720,\n goldenrod: 14329120,\n gray: 8421504,\n green: 32768,\n greenyellow: 11403055,\n grey: 8421504,\n honeydew: 15794160,\n hotpink: 16738740,\n indianred: 13458524,\n indigo: 4915330,\n ivory: 16777200,\n khaki: 15787660,\n lavender: 15132410,\n lavenderblush: 16773365,\n lawngreen: 8190976,\n lemonchiffon: 16775885,\n lightblue: 11393254,\n lightcoral: 15761536,\n lightcyan: 14745599,\n lightgoldenrodyellow: 16448210,\n lightgray: 13882323,\n lightgreen: 9498256,\n lightgrey: 13882323,\n lightpink: 16758465,\n lightsalmon: 16752762,\n lightseagreen: 2142890,\n lightskyblue: 8900346,\n lightslategray: 7833753,\n lightslategrey: 7833753,\n lightsteelblue: 11584734,\n lightyellow: 16777184,\n lime: 65280,\n limegreen: 3329330,\n linen: 16445670,\n magenta: 16711935,\n maroon: 8388608,\n mediumaquamarine: 6737322,\n mediumblue: 205,\n mediumorchid: 12211667,\n mediumpurple: 9662683,\n mediumseagreen: 3978097,\n mediumslateblue: 8087790,\n mediumspringgreen: 64154,\n mediumturquoise: 4772300,\n mediumvioletred: 13047173,\n midnightblue: 1644912,\n mintcream: 16121850,\n mistyrose: 16770273,\n moccasin: 16770229,\n navajowhite: 16768685,\n navy: 128,\n oldlace: 16643558,\n olive: 8421376,\n olivedrab: 7048739,\n orange: 16753920,\n orangered: 16729344,\n orchid: 14315734,\n palegoldenrod: 15657130,\n palegreen: 10025880,\n paleturquoise: 11529966,\n palevioletred: 14381203,\n papayawhip: 16773077,\n peachpuff: 16767673,\n peru: 13468991,\n pink: 16761035,\n plum: 14524637,\n powderblue: 11591910,\n purple: 8388736,\n rebeccapurple: 6697881,\n red: 16711680,\n rosybrown: 12357519,\n royalblue: 4286945,\n saddlebrown: 9127187,\n salmon: 16416882,\n sandybrown: 16032864,\n seagreen: 3050327,\n seashell: 16774638,\n sienna: 10506797,\n silver: 12632256,\n skyblue: 8900331,\n slateblue: 6970061,\n slategray: 7372944,\n slategrey: 7372944,\n snow: 16775930,\n springgreen: 65407,\n steelblue: 4620980,\n tan: 13808780,\n teal: 32896,\n thistle: 14204888,\n tomato: 16737095,\n turquoise: 4251856,\n violet: 15631086,\n wheat: 16113331,\n white: 16777215,\n whitesmoke: 16119285,\n yellow: 16776960,\n yellowgreen: 10145074\n });\n d3_rgb_names.forEach(function(key, value) {\n d3_rgb_names.set(key, d3_rgbNumber(value));\n });\n function d3_functor(v) {\n return typeof v === \"function\" ? v : function() {\n return v;\n };\n }\n d3.functor = d3_functor;\n d3.xhr = d3_xhrType(d3_identity);\n function d3_xhrType(response) {\n return function(url, mimeType, callback) {\n if (arguments.length === 2 && typeof mimeType === \"function\") callback = mimeType, \n mimeType = null;\n return d3_xhr(url, mimeType, response, callback);\n };\n }\n function d3_xhr(url, mimeType, response, callback) {\n var xhr = {}, dispatch = d3.dispatch(\"beforesend\", \"progress\", \"load\", \"error\"), headers = {}, request = new XMLHttpRequest(), responseType = null;\n if (this.XDomainRequest && !(\"withCredentials\" in request) && /^(http(s)?:)?\\/\\//.test(url)) request = new XDomainRequest();\n \"onload\" in request ? request.onload = request.onerror = respond : request.onreadystatechange = function() {\n request.readyState > 3 && respond();\n };\n function respond() {\n var status = request.status, result;\n if (!status && d3_xhrHasResponse(request) || status >= 200 && status < 300 || status === 304) {\n try {\n result = response.call(xhr, request);\n } catch (e) {\n dispatch.error.call(xhr, e);\n return;\n }\n dispatch.load.call(xhr, result);\n } else {\n dispatch.error.call(xhr, request);\n }\n }\n request.onprogress = function(event) {\n var o = d3.event;\n d3.event = event;\n try {\n dispatch.progress.call(xhr, request);\n } finally {\n d3.event = o;\n }\n };\n xhr.header = function(name, value) {\n name = (name + \"\").toLowerCase();\n if (arguments.length < 2) return headers[name];\n if (value == null) delete headers[name]; else headers[name] = value + \"\";\n return xhr;\n };\n xhr.mimeType = function(value) {\n if (!arguments.length) return mimeType;\n mimeType = value == null ? null : value + \"\";\n return xhr;\n };\n xhr.responseType = function(value) {\n if (!arguments.length) return responseType;\n responseType = value;\n return xhr;\n };\n xhr.response = function(value) {\n response = value;\n return xhr;\n };\n [ \"get\", \"post\" ].forEach(function(method) {\n xhr[method] = function() {\n return xhr.send.apply(xhr, [ method ].concat(d3_array(arguments)));\n };\n });\n xhr.send = function(method, data, callback) {\n if (arguments.length === 2 && typeof data === \"function\") callback = data, data = null;\n request.open(method, url, true);\n if (mimeType != null && !(\"accept\" in headers)) headers[\"accept\"] = mimeType + \",*/*\";\n if (request.setRequestHeader) for (var name in headers) request.setRequestHeader(name, headers[name]);\n if (mimeType != null && request.overrideMimeType) request.overrideMimeType(mimeType);\n if (responseType != null) request.responseType = responseType;\n if (callback != null) xhr.on(\"error\", callback).on(\"load\", function(request) {\n callback(null, request);\n });\n dispatch.beforesend.call(xhr, request);\n request.send(data == null ? null : data);\n return xhr;\n };\n xhr.abort = function() {\n request.abort();\n return xhr;\n };\n d3.rebind(xhr, dispatch, \"on\");\n return callback == null ? xhr : xhr.get(d3_xhr_fixCallback(callback));\n }\n function d3_xhr_fixCallback(callback) {\n return callback.length === 1 ? function(error, request) {\n callback(error == null ? request : null);\n } : callback;\n }\n function d3_xhrHasResponse(request) {\n var type = request.responseType;\n return type && type !== \"text\" ? request.response : request.responseText;\n }\n d3.dsv = function(delimiter, mimeType) {\n var reFormat = new RegExp('[\"' + delimiter + \"\\n]\"), delimiterCode = delimiter.charCodeAt(0);\n function dsv(url, row, callback) {\n if (arguments.length < 3) callback = row, row = null;\n var xhr = d3_xhr(url, mimeType, row == null ? response : typedResponse(row), callback);\n xhr.row = function(_) {\n return arguments.length ? xhr.response((row = _) == null ? response : typedResponse(_)) : row;\n };\n return xhr;\n }\n function response(request) {\n return dsv.parse(request.responseText);\n }\n function typedResponse(f) {\n return function(request) {\n return dsv.parse(request.responseText, f);\n };\n }\n dsv.parse = function(text, f) {\n var o;\n return dsv.parseRows(text, function(row, i) {\n if (o) return o(row, i - 1);\n var a = new Function(\"d\", \"return {\" + row.map(function(name, i) {\n return JSON.stringify(name) + \": d[\" + i + \"]\";\n }).join(\",\") + \"}\");\n o = f ? function(row, i) {\n return f(a(row), i);\n } : a;\n });\n };\n dsv.parseRows = function(text, f) {\n var EOL = {}, EOF = {}, rows = [], N = text.length, I = 0, n = 0, t, eol;\n function token() {\n if (I >= N) return EOF;\n if (eol) return eol = false, EOL;\n var j = I;\n if (text.charCodeAt(j) === 34) {\n var i = j;\n while (i++ < N) {\n if (text.charCodeAt(i) === 34) {\n if (text.charCodeAt(i + 1) !== 34) break;\n ++i;\n }\n }\n I = i + 2;\n var c = text.charCodeAt(i + 1);\n if (c === 13) {\n eol = true;\n if (text.charCodeAt(i + 2) === 10) ++I;\n } else if (c === 10) {\n eol = true;\n }\n return text.slice(j + 1, i).replace(/\"\"/g, '\"');\n }\n while (I < N) {\n var c = text.charCodeAt(I++), k = 1;\n if (c === 10) eol = true; else if (c === 13) {\n eol = true;\n if (text.charCodeAt(I) === 10) ++I, ++k;\n } else if (c !== delimiterCode) continue;\n return text.slice(j, I - k);\n }\n return text.slice(j);\n }\n while ((t = token()) !== EOF) {\n var a = [];\n while (t !== EOL && t !== EOF) {\n a.push(t);\n t = token();\n }\n if (f && (a = f(a, n++)) == null) continue;\n rows.push(a);\n }\n return rows;\n };\n dsv.format = function(rows) {\n if (Array.isArray(rows[0])) return dsv.formatRows(rows);\n var fieldSet = new d3_Set(), fields = [];\n rows.forEach(function(row) {\n for (var field in row) {\n if (!fieldSet.has(field)) {\n fields.push(fieldSet.add(field));\n }\n }\n });\n return [ fields.map(formatValue).join(delimiter) ].concat(rows.map(function(row) {\n return fields.map(function(field) {\n return formatValue(row[field]);\n }).join(delimiter);\n })).join(\"\\n\");\n };\n dsv.formatRows = function(rows) {\n return rows.map(formatRow).join(\"\\n\");\n };\n function formatRow(row) {\n return row.map(formatValue).join(delimiter);\n }\n function formatValue(text) {\n return reFormat.test(text) ? '\"' + text.replace(/\\\"/g, '\"\"') + '\"' : text;\n }\n return dsv;\n };\n d3.csv = d3.dsv(\",\", \"text/csv\");\n d3.tsv = d3.dsv(\"\t\", \"text/tab-separated-values\");\n var d3_timer_queueHead, d3_timer_queueTail, d3_timer_interval, d3_timer_timeout, d3_timer_frame = this[d3_vendorSymbol(this, \"requestAnimationFrame\")] || function(callback) {\n setTimeout(callback, 17);\n };\n d3.timer = function() {\n d3_timer.apply(this, arguments);\n };\n function d3_timer(callback, delay, then) {\n var n = arguments.length;\n if (n < 2) delay = 0;\n if (n < 3) then = Date.now();\n var time = then + delay, timer = {\n c: callback,\n t: time,\n n: null\n };\n if (d3_timer_queueTail) d3_timer_queueTail.n = timer; else d3_timer_queueHead = timer;\n d3_timer_queueTail = timer;\n if (!d3_timer_interval) {\n d3_timer_timeout = clearTimeout(d3_timer_timeout);\n d3_timer_interval = 1;\n d3_timer_frame(d3_timer_step);\n }\n return timer;\n }\n function d3_timer_step() {\n var now = d3_timer_mark(), delay = d3_timer_sweep() - now;\n if (delay > 24) {\n if (isFinite(delay)) {\n clearTimeout(d3_timer_timeout);\n d3_timer_timeout = setTimeout(d3_timer_step, delay);\n }\n d3_timer_interval = 0;\n } else {\n d3_timer_interval = 1;\n d3_timer_frame(d3_timer_step);\n }\n }\n d3.timer.flush = function() {\n d3_timer_mark();\n d3_timer_sweep();\n };\n function d3_timer_mark() {\n var now = Date.now(), timer = d3_timer_queueHead;\n while (timer) {\n if (now >= timer.t && timer.c(now - timer.t)) timer.c = null;\n timer = timer.n;\n }\n return now;\n }\n function d3_timer_sweep() {\n var t0, t1 = d3_timer_queueHead, time = Infinity;\n while (t1) {\n if (t1.c) {\n if (t1.t < time) time = t1.t;\n t1 = (t0 = t1).n;\n } else {\n t1 = t0 ? t0.n = t1.n : d3_timer_queueHead = t1.n;\n }\n }\n d3_timer_queueTail = t0;\n return time;\n }\n function d3_format_precision(x, p) {\n return p - (x ? Math.ceil(Math.log(x) / Math.LN10) : 1);\n }\n d3.round = function(x, n) {\n return n ? Math.round(x * (n = Math.pow(10, n))) / n : Math.round(x);\n };\n var d3_formatPrefixes = [ \"y\", \"z\", \"a\", \"f\", \"p\", \"n\", \"µ\", \"m\", \"\", \"k\", \"M\", \"G\", \"T\", \"P\", \"E\", \"Z\", \"Y\" ].map(d3_formatPrefix);\n d3.formatPrefix = function(value, precision) {\n var i = 0;\n if (value = +value) {\n if (value < 0) value *= -1;\n if (precision) value = d3.round(value, d3_format_precision(value, precision));\n i = 1 + Math.floor(1e-12 + Math.log(value) / Math.LN10);\n i = Math.max(-24, Math.min(24, Math.floor((i - 1) / 3) * 3));\n }\n return d3_formatPrefixes[8 + i / 3];\n };\n function d3_formatPrefix(d, i) {\n var k = Math.pow(10, abs(8 - i) * 3);\n return {\n scale: i > 8 ? function(d) {\n return d / k;\n } : function(d) {\n return d * k;\n },\n symbol: d\n };\n }\n function d3_locale_numberFormat(locale) {\n var locale_decimal = locale.decimal, locale_thousands = locale.thousands, locale_grouping = locale.grouping, locale_currency = locale.currency, formatGroup = locale_grouping && locale_thousands ? function(value, width) {\n var i = value.length, t = [], j = 0, g = locale_grouping[0], length = 0;\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = locale_grouping[j = (j + 1) % locale_grouping.length];\n }\n return t.reverse().join(locale_thousands);\n } : d3_identity;\n return function(specifier) {\n var match = d3_format_re.exec(specifier), fill = match[1] || \" \", align = match[2] || \">\", sign = match[3] || \"-\", symbol = match[4] || \"\", zfill = match[5], width = +match[6], comma = match[7], precision = match[8], type = match[9], scale = 1, prefix = \"\", suffix = \"\", integer = false, exponent = true;\n if (precision) precision = +precision.substring(1);\n if (zfill || fill === \"0\" && align === \"=\") {\n zfill = fill = \"0\";\n align = \"=\";\n }\n switch (type) {\n case \"n\":\n comma = true;\n type = \"g\";\n break;\n\n case \"%\":\n scale = 100;\n suffix = \"%\";\n type = \"f\";\n break;\n\n case \"p\":\n scale = 100;\n suffix = \"%\";\n type = \"r\";\n break;\n\n case \"b\":\n case \"o\":\n case \"x\":\n case \"X\":\n if (symbol === \"#\") prefix = \"0\" + type.toLowerCase();\n\n case \"c\":\n exponent = false;\n\n case \"d\":\n integer = true;\n precision = 0;\n break;\n\n case \"s\":\n scale = -1;\n type = \"r\";\n break;\n }\n if (symbol === \"$\") prefix = locale_currency[0], suffix = locale_currency[1];\n if (type == \"r\" && !precision) type = \"g\";\n if (precision != null) {\n if (type == \"g\") precision = Math.max(1, Math.min(21, precision)); else if (type == \"e\" || type == \"f\") precision = Math.max(0, Math.min(20, precision));\n }\n type = d3_format_types.get(type) || d3_format_typeDefault;\n var zcomma = zfill && comma;\n return function(value) {\n var fullSuffix = suffix;\n if (integer && value % 1) return \"\";\n var negative = value < 0 || value === 0 && 1 / value < 0 ? (value = -value, \"-\") : sign === \"-\" ? \"\" : sign;\n if (scale < 0) {\n var unit = d3.formatPrefix(value, precision);\n value = unit.scale(value);\n fullSuffix = unit.symbol + suffix;\n } else {\n value *= scale;\n }\n value = type(value, precision);\n var i = value.lastIndexOf(\".\"), before, after;\n if (i < 0) {\n var j = exponent ? value.lastIndexOf(\"e\") : -1;\n if (j < 0) before = value, after = \"\"; else before = value.substring(0, j), after = value.substring(j);\n } else {\n before = value.substring(0, i);\n after = locale_decimal + value.substring(i + 1);\n }\n if (!zfill && comma) before = formatGroup(before, Infinity);\n var length = prefix.length + before.length + after.length + (zcomma ? 0 : negative.length), padding = length < width ? new Array(length = width - length + 1).join(fill) : \"\";\n if (zcomma) before = formatGroup(padding + before, padding.length ? width - after.length : Infinity);\n negative += prefix;\n value = before + after;\n return (align === \"<\" ? negative + value + padding : align === \">\" ? padding + negative + value : align === \"^\" ? padding.substring(0, length >>= 1) + negative + value + padding.substring(length) : negative + (zcomma ? value : padding + value)) + fullSuffix;\n };\n };\n }\n var d3_format_re = /(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i;\n var d3_format_types = d3.map({\n b: function(x) {\n return x.toString(2);\n },\n c: function(x) {\n return String.fromCharCode(x);\n },\n o: function(x) {\n return x.toString(8);\n },\n x: function(x) {\n return x.toString(16);\n },\n X: function(x) {\n return x.toString(16).toUpperCase();\n },\n g: function(x, p) {\n return x.toPrecision(p);\n },\n e: function(x, p) {\n return x.toExponential(p);\n },\n f: function(x, p) {\n return x.toFixed(p);\n },\n r: function(x, p) {\n return (x = d3.round(x, d3_format_precision(x, p))).toFixed(Math.max(0, Math.min(20, d3_format_precision(x * (1 + 1e-15), p))));\n }\n });\n function d3_format_typeDefault(x) {\n return x + \"\";\n }\n var d3_time = d3.time = {}, d3_date = Date;\n function d3_date_utc() {\n this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0]);\n }\n d3_date_utc.prototype = {\n getDate: function() {\n return this._.getUTCDate();\n },\n getDay: function() {\n return this._.getUTCDay();\n },\n getFullYear: function() {\n return this._.getUTCFullYear();\n },\n getHours: function() {\n return this._.getUTCHours();\n },\n getMilliseconds: function() {\n return this._.getUTCMilliseconds();\n },\n getMinutes: function() {\n return this._.getUTCMinutes();\n },\n getMonth: function() {\n return this._.getUTCMonth();\n },\n getSeconds: function() {\n return this._.getUTCSeconds();\n },\n getTime: function() {\n return this._.getTime();\n },\n getTimezoneOffset: function() {\n return 0;\n },\n valueOf: function() {\n return this._.valueOf();\n },\n setDate: function() {\n d3_time_prototype.setUTCDate.apply(this._, arguments);\n },\n setDay: function() {\n d3_time_prototype.setUTCDay.apply(this._, arguments);\n },\n setFullYear: function() {\n d3_time_prototype.setUTCFullYear.apply(this._, arguments);\n },\n setHours: function() {\n d3_time_prototype.setUTCHours.apply(this._, arguments);\n },\n setMilliseconds: function() {\n d3_time_prototype.setUTCMilliseconds.apply(this._, arguments);\n },\n setMinutes: function() {\n d3_time_prototype.setUTCMinutes.apply(this._, arguments);\n },\n setMonth: function() {\n d3_time_prototype.setUTCMonth.apply(this._, arguments);\n },\n setSeconds: function() {\n d3_time_prototype.setUTCSeconds.apply(this._, arguments);\n },\n setTime: function() {\n d3_time_prototype.setTime.apply(this._, arguments);\n }\n };\n var d3_time_prototype = Date.prototype;\n function d3_time_interval(local, step, number) {\n function round(date) {\n var d0 = local(date), d1 = offset(d0, 1);\n return date - d0 < d1 - date ? d0 : d1;\n }\n function ceil(date) {\n step(date = local(new d3_date(date - 1)), 1);\n return date;\n }\n function offset(date, k) {\n step(date = new d3_date(+date), k);\n return date;\n }\n function range(t0, t1, dt) {\n var time = ceil(t0), times = [];\n if (dt > 1) {\n while (time < t1) {\n if (!(number(time) % dt)) times.push(new Date(+time));\n step(time, 1);\n }\n } else {\n while (time < t1) times.push(new Date(+time)), step(time, 1);\n }\n return times;\n }\n function range_utc(t0, t1, dt) {\n try {\n d3_date = d3_date_utc;\n var utc = new d3_date_utc();\n utc._ = t0;\n return range(utc, t1, dt);\n } finally {\n d3_date = Date;\n }\n }\n local.floor = local;\n local.round = round;\n local.ceil = ceil;\n local.offset = offset;\n local.range = range;\n var utc = local.utc = d3_time_interval_utc(local);\n utc.floor = utc;\n utc.round = d3_time_interval_utc(round);\n utc.ceil = d3_time_interval_utc(ceil);\n utc.offset = d3_time_interval_utc(offset);\n utc.range = range_utc;\n return local;\n }\n function d3_time_interval_utc(method) {\n return function(date, k) {\n try {\n d3_date = d3_date_utc;\n var utc = new d3_date_utc();\n utc._ = date;\n return method(utc, k)._;\n } finally {\n d3_date = Date;\n }\n };\n }\n d3_time.year = d3_time_interval(function(date) {\n date = d3_time.day(date);\n date.setMonth(0, 1);\n return date;\n }, function(date, offset) {\n date.setFullYear(date.getFullYear() + offset);\n }, function(date) {\n return date.getFullYear();\n });\n d3_time.years = d3_time.year.range;\n d3_time.years.utc = d3_time.year.utc.range;\n d3_time.day = d3_time_interval(function(date) {\n var day = new d3_date(2e3, 0);\n day.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n return day;\n }, function(date, offset) {\n date.setDate(date.getDate() + offset);\n }, function(date) {\n return date.getDate() - 1;\n });\n d3_time.days = d3_time.day.range;\n d3_time.days.utc = d3_time.day.utc.range;\n d3_time.dayOfYear = function(date) {\n var year = d3_time.year(date);\n return Math.floor((date - year - (date.getTimezoneOffset() - year.getTimezoneOffset()) * 6e4) / 864e5);\n };\n [ \"sunday\", \"monday\", \"tuesday\", \"wednesday\", \"thursday\", \"friday\", \"saturday\" ].forEach(function(day, i) {\n i = 7 - i;\n var interval = d3_time[day] = d3_time_interval(function(date) {\n (date = d3_time.day(date)).setDate(date.getDate() - (date.getDay() + i) % 7);\n return date;\n }, function(date, offset) {\n date.setDate(date.getDate() + Math.floor(offset) * 7);\n }, function(date) {\n var day = d3_time.year(date).getDay();\n return Math.floor((d3_time.dayOfYear(date) + (day + i) % 7) / 7) - (day !== i);\n });\n d3_time[day + \"s\"] = interval.range;\n d3_time[day + \"s\"].utc = interval.utc.range;\n d3_time[day + \"OfYear\"] = function(date) {\n var day = d3_time.year(date).getDay();\n return Math.floor((d3_time.dayOfYear(date) + (day + i) % 7) / 7);\n };\n });\n d3_time.week = d3_time.sunday;\n d3_time.weeks = d3_time.sunday.range;\n d3_time.weeks.utc = d3_time.sunday.utc.range;\n d3_time.weekOfYear = d3_time.sundayOfYear;\n function d3_locale_timeFormat(locale) {\n var locale_dateTime = locale.dateTime, locale_date = locale.date, locale_time = locale.time, locale_periods = locale.periods, locale_days = locale.days, locale_shortDays = locale.shortDays, locale_months = locale.months, locale_shortMonths = locale.shortMonths;\n function d3_time_format(template) {\n var n = template.length;\n function format(date) {\n var string = [], i = -1, j = 0, c, p, f;\n while (++i < n) {\n if (template.charCodeAt(i) === 37) {\n string.push(template.slice(j, i));\n if ((p = d3_time_formatPads[c = template.charAt(++i)]) != null) c = template.charAt(++i);\n if (f = d3_time_formats[c]) c = f(date, p == null ? c === \"e\" ? \" \" : \"0\" : p);\n string.push(c);\n j = i + 1;\n }\n }\n string.push(template.slice(j, i));\n return string.join(\"\");\n }\n format.parse = function(string) {\n var d = {\n y: 1900,\n m: 0,\n d: 1,\n H: 0,\n M: 0,\n S: 0,\n L: 0,\n Z: null\n }, i = d3_time_parse(d, template, string, 0);\n if (i != string.length) return null;\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n var localZ = d.Z != null && d3_date !== d3_date_utc, date = new (localZ ? d3_date_utc : d3_date)();\n if (\"j\" in d) date.setFullYear(d.y, 0, d.j); else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"W\" in d ? 1 : 0;\n date.setFullYear(d.y, 0, 1);\n date.setFullYear(d.y, 0, \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (date.getDay() + 5) % 7 : d.w + d.U * 7 - (date.getDay() + 6) % 7);\n } else date.setFullYear(d.y, d.m, d.d);\n date.setHours(d.H + (d.Z / 100 | 0), d.M + d.Z % 100, d.S, d.L);\n return localZ ? date._ : date;\n };\n format.toString = function() {\n return template;\n };\n return format;\n }\n function d3_time_parse(date, template, string, j) {\n var c, p, t, i = 0, n = template.length, m = string.length;\n while (i < n) {\n if (j >= m) return -1;\n c = template.charCodeAt(i++);\n if (c === 37) {\n t = template.charAt(i++);\n p = d3_time_parsers[t in d3_time_formatPads ? template.charAt(i++) : t];\n if (!p || (j = p(date, string, j)) < 0) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n return j;\n }\n d3_time_format.utc = function(template) {\n var local = d3_time_format(template);\n function format(date) {\n try {\n d3_date = d3_date_utc;\n var utc = new d3_date();\n utc._ = date;\n return local(utc);\n } finally {\n d3_date = Date;\n }\n }\n format.parse = function(string) {\n try {\n d3_date = d3_date_utc;\n var date = local.parse(string);\n return date && date._;\n } finally {\n d3_date = Date;\n }\n };\n format.toString = local.toString;\n return format;\n };\n d3_time_format.multi = d3_time_format.utc.multi = d3_time_formatMulti;\n var d3_time_periodLookup = d3.map(), d3_time_dayRe = d3_time_formatRe(locale_days), d3_time_dayLookup = d3_time_formatLookup(locale_days), d3_time_dayAbbrevRe = d3_time_formatRe(locale_shortDays), d3_time_dayAbbrevLookup = d3_time_formatLookup(locale_shortDays), d3_time_monthRe = d3_time_formatRe(locale_months), d3_time_monthLookup = d3_time_formatLookup(locale_months), d3_time_monthAbbrevRe = d3_time_formatRe(locale_shortMonths), d3_time_monthAbbrevLookup = d3_time_formatLookup(locale_shortMonths);\n locale_periods.forEach(function(p, i) {\n d3_time_periodLookup.set(p.toLowerCase(), i);\n });\n var d3_time_formats = {\n a: function(d) {\n return locale_shortDays[d.getDay()];\n },\n A: function(d) {\n return locale_days[d.getDay()];\n },\n b: function(d) {\n return locale_shortMonths[d.getMonth()];\n },\n B: function(d) {\n return locale_months[d.getMonth()];\n },\n c: d3_time_format(locale_dateTime),\n d: function(d, p) {\n return d3_time_formatPad(d.getDate(), p, 2);\n },\n e: function(d, p) {\n return d3_time_formatPad(d.getDate(), p, 2);\n },\n H: function(d, p) {\n return d3_time_formatPad(d.getHours(), p, 2);\n },\n I: function(d, p) {\n return d3_time_formatPad(d.getHours() % 12 || 12, p, 2);\n },\n j: function(d, p) {\n return d3_time_formatPad(1 + d3_time.dayOfYear(d), p, 3);\n },\n L: function(d, p) {\n return d3_time_formatPad(d.getMilliseconds(), p, 3);\n },\n m: function(d, p) {\n return d3_time_formatPad(d.getMonth() + 1, p, 2);\n },\n M: function(d, p) {\n return d3_time_formatPad(d.getMinutes(), p, 2);\n },\n p: function(d) {\n return locale_periods[+(d.getHours() >= 12)];\n },\n S: function(d, p) {\n return d3_time_formatPad(d.getSeconds(), p, 2);\n },\n U: function(d, p) {\n return d3_time_formatPad(d3_time.sundayOfYear(d), p, 2);\n },\n w: function(d) {\n return d.getDay();\n },\n W: function(d, p) {\n return d3_time_formatPad(d3_time.mondayOfYear(d), p, 2);\n },\n x: d3_time_format(locale_date),\n X: d3_time_format(locale_time),\n y: function(d, p) {\n return d3_time_formatPad(d.getFullYear() % 100, p, 2);\n },\n Y: function(d, p) {\n return d3_time_formatPad(d.getFullYear() % 1e4, p, 4);\n },\n Z: d3_time_zone,\n \"%\": function() {\n return \"%\";\n }\n };\n var d3_time_parsers = {\n a: d3_time_parseWeekdayAbbrev,\n A: d3_time_parseWeekday,\n b: d3_time_parseMonthAbbrev,\n B: d3_time_parseMonth,\n c: d3_time_parseLocaleFull,\n d: d3_time_parseDay,\n e: d3_time_parseDay,\n H: d3_time_parseHour24,\n I: d3_time_parseHour24,\n j: d3_time_parseDayOfYear,\n L: d3_time_parseMilliseconds,\n m: d3_time_parseMonthNumber,\n M: d3_time_parseMinutes,\n p: d3_time_parseAmPm,\n S: d3_time_parseSeconds,\n U: d3_time_parseWeekNumberSunday,\n w: d3_time_parseWeekdayNumber,\n W: d3_time_parseWeekNumberMonday,\n x: d3_time_parseLocaleDate,\n X: d3_time_parseLocaleTime,\n y: d3_time_parseYear,\n Y: d3_time_parseFullYear,\n Z: d3_time_parseZone,\n \"%\": d3_time_parseLiteralPercent\n };\n function d3_time_parseWeekdayAbbrev(date, string, i) {\n d3_time_dayAbbrevRe.lastIndex = 0;\n var n = d3_time_dayAbbrevRe.exec(string.slice(i));\n return n ? (date.w = d3_time_dayAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n function d3_time_parseWeekday(date, string, i) {\n d3_time_dayRe.lastIndex = 0;\n var n = d3_time_dayRe.exec(string.slice(i));\n return n ? (date.w = d3_time_dayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n function d3_time_parseMonthAbbrev(date, string, i) {\n d3_time_monthAbbrevRe.lastIndex = 0;\n var n = d3_time_monthAbbrevRe.exec(string.slice(i));\n return n ? (date.m = d3_time_monthAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n function d3_time_parseMonth(date, string, i) {\n d3_time_monthRe.lastIndex = 0;\n var n = d3_time_monthRe.exec(string.slice(i));\n return n ? (date.m = d3_time_monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n function d3_time_parseLocaleFull(date, string, i) {\n return d3_time_parse(date, d3_time_formats.c.toString(), string, i);\n }\n function d3_time_parseLocaleDate(date, string, i) {\n return d3_time_parse(date, d3_time_formats.x.toString(), string, i);\n }\n function d3_time_parseLocaleTime(date, string, i) {\n return d3_time_parse(date, d3_time_formats.X.toString(), string, i);\n }\n function d3_time_parseAmPm(date, string, i) {\n var n = d3_time_periodLookup.get(string.slice(i, i += 2).toLowerCase());\n return n == null ? -1 : (date.p = n, i);\n }\n return d3_time_format;\n }\n var d3_time_formatPads = {\n \"-\": \"\",\n _: \" \",\n \"0\": \"0\"\n }, d3_time_numberRe = /^\\s*\\d+/, d3_time_percentRe = /^%/;\n function d3_time_formatPad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\", string = (sign ? -value : value) + \"\", length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n }\n function d3_time_formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(d3.requote).join(\"|\") + \")\", \"i\");\n }\n function d3_time_formatLookup(names) {\n var map = new d3_Map(), i = -1, n = names.length;\n while (++i < n) map.set(names[i].toLowerCase(), i);\n return map;\n }\n function d3_time_parseWeekdayNumber(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.slice(i, i + 1));\n return n ? (date.w = +n[0], i + n[0].length) : -1;\n }\n function d3_time_parseWeekNumberSunday(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.slice(i));\n return n ? (date.U = +n[0], i + n[0].length) : -1;\n }\n function d3_time_parseWeekNumberMonday(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.slice(i));\n return n ? (date.W = +n[0], i + n[0].length) : -1;\n }\n function d3_time_parseFullYear(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.slice(i, i + 4));\n return n ? (date.y = +n[0], i + n[0].length) : -1;\n }\n function d3_time_parseYear(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.slice(i, i + 2));\n return n ? (date.y = d3_time_expandYear(+n[0]), i + n[0].length) : -1;\n }\n function d3_time_parseZone(date, string, i) {\n return /^[+-]\\d{4}$/.test(string = string.slice(i, i + 5)) ? (date.Z = -string, \n i + 5) : -1;\n }\n function d3_time_expandYear(d) {\n return d + (d > 68 ? 1900 : 2e3);\n }\n function d3_time_parseMonthNumber(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.slice(i, i + 2));\n return n ? (date.m = n[0] - 1, i + n[0].length) : -1;\n }\n function d3_time_parseDay(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.slice(i, i + 2));\n return n ? (date.d = +n[0], i + n[0].length) : -1;\n }\n function d3_time_parseDayOfYear(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.slice(i, i + 3));\n return n ? (date.j = +n[0], i + n[0].length) : -1;\n }\n function d3_time_parseHour24(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.slice(i, i + 2));\n return n ? (date.H = +n[0], i + n[0].length) : -1;\n }\n function d3_time_parseMinutes(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.slice(i, i + 2));\n return n ? (date.M = +n[0], i + n[0].length) : -1;\n }\n function d3_time_parseSeconds(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.slice(i, i + 2));\n return n ? (date.S = +n[0], i + n[0].length) : -1;\n }\n function d3_time_parseMilliseconds(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.slice(i, i + 3));\n return n ? (date.L = +n[0], i + n[0].length) : -1;\n }\n function d3_time_zone(d) {\n var z = d.getTimezoneOffset(), zs = z > 0 ? \"-\" : \"+\", zh = abs(z) / 60 | 0, zm = abs(z) % 60;\n return zs + d3_time_formatPad(zh, \"0\", 2) + d3_time_formatPad(zm, \"0\", 2);\n }\n function d3_time_parseLiteralPercent(date, string, i) {\n d3_time_percentRe.lastIndex = 0;\n var n = d3_time_percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n }\n function d3_time_formatMulti(formats) {\n var n = formats.length, i = -1;\n while (++i < n) formats[i][0] = this(formats[i][0]);\n return function(date) {\n var i = 0, f = formats[i];\n while (!f[1](date)) f = formats[++i];\n return f[0](date);\n };\n }\n d3.locale = function(locale) {\n return {\n numberFormat: d3_locale_numberFormat(locale),\n timeFormat: d3_locale_timeFormat(locale)\n };\n };\n var d3_locale_enUS = d3.locale({\n decimal: \".\",\n thousands: \",\",\n grouping: [ 3 ],\n currency: [ \"$\", \"\" ],\n dateTime: \"%a %b %e %X %Y\",\n date: \"%m/%d/%Y\",\n time: \"%H:%M:%S\",\n periods: [ \"AM\", \"PM\" ],\n days: [ \"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\" ],\n shortDays: [ \"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\" ],\n months: [ \"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\" ],\n shortMonths: [ \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\" ]\n });\n d3.format = d3_locale_enUS.numberFormat;\n d3.geo = {};\n function d3_adder() {}\n d3_adder.prototype = {\n s: 0,\n t: 0,\n add: function(y) {\n d3_adderSum(y, this.t, d3_adderTemp);\n d3_adderSum(d3_adderTemp.s, this.s, this);\n if (this.s) this.t += d3_adderTemp.t; else this.s = d3_adderTemp.t;\n },\n reset: function() {\n this.s = this.t = 0;\n },\n valueOf: function() {\n return this.s;\n }\n };\n var d3_adderTemp = new d3_adder();\n function d3_adderSum(a, b, o) {\n var x = o.s = a + b, bv = x - a, av = x - bv;\n o.t = a - av + (b - bv);\n }\n d3.geo.stream = function(object, listener) {\n if (object && d3_geo_streamObjectType.hasOwnProperty(object.type)) {\n d3_geo_streamObjectType[object.type](object, listener);\n } else {\n d3_geo_streamGeometry(object, listener);\n }\n };\n function d3_geo_streamGeometry(geometry, listener) {\n if (geometry && d3_geo_streamGeometryType.hasOwnProperty(geometry.type)) {\n d3_geo_streamGeometryType[geometry.type](geometry, listener);\n }\n }\n var d3_geo_streamObjectType = {\n Feature: function(feature, listener) {\n d3_geo_streamGeometry(feature.geometry, listener);\n },\n FeatureCollection: function(object, listener) {\n var features = object.features, i = -1, n = features.length;\n while (++i < n) d3_geo_streamGeometry(features[i].geometry, listener);\n }\n };\n var d3_geo_streamGeometryType = {\n Sphere: function(object, listener) {\n listener.sphere();\n },\n Point: function(object, listener) {\n object = object.coordinates;\n listener.point(object[0], object[1], object[2]);\n },\n MultiPoint: function(object, listener) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) object = coordinates[i], listener.point(object[0], object[1], object[2]);\n },\n LineString: function(object, listener) {\n d3_geo_streamLine(object.coordinates, listener, 0);\n },\n MultiLineString: function(object, listener) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) d3_geo_streamLine(coordinates[i], listener, 0);\n },\n Polygon: function(object, listener) {\n d3_geo_streamPolygon(object.coordinates, listener);\n },\n MultiPolygon: function(object, listener) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) d3_geo_streamPolygon(coordinates[i], listener);\n },\n GeometryCollection: function(object, listener) {\n var geometries = object.geometries, i = -1, n = geometries.length;\n while (++i < n) d3_geo_streamGeometry(geometries[i], listener);\n }\n };\n function d3_geo_streamLine(coordinates, listener, closed) {\n var i = -1, n = coordinates.length - closed, coordinate;\n listener.lineStart();\n while (++i < n) coordinate = coordinates[i], listener.point(coordinate[0], coordinate[1], coordinate[2]);\n listener.lineEnd();\n }\n function d3_geo_streamPolygon(coordinates, listener) {\n var i = -1, n = coordinates.length;\n listener.polygonStart();\n while (++i < n) d3_geo_streamLine(coordinates[i], listener, 1);\n listener.polygonEnd();\n }\n d3.geo.area = function(object) {\n d3_geo_areaSum = 0;\n d3.geo.stream(object, d3_geo_area);\n return d3_geo_areaSum;\n };\n var d3_geo_areaSum, d3_geo_areaRingSum = new d3_adder();\n var d3_geo_area = {\n sphere: function() {\n d3_geo_areaSum += 4 * π;\n },\n point: d3_noop,\n lineStart: d3_noop,\n lineEnd: d3_noop,\n polygonStart: function() {\n d3_geo_areaRingSum.reset();\n d3_geo_area.lineStart = d3_geo_areaRingStart;\n },\n polygonEnd: function() {\n var area = 2 * d3_geo_areaRingSum;\n d3_geo_areaSum += area < 0 ? 4 * π + area : area;\n d3_geo_area.lineStart = d3_geo_area.lineEnd = d3_geo_area.point = d3_noop;\n }\n };\n function d3_geo_areaRingStart() {\n var λ00, φ00, λ0, cosφ0, sinφ0;\n d3_geo_area.point = function(λ, φ) {\n d3_geo_area.point = nextPoint;\n λ0 = (λ00 = λ) * d3_radians, cosφ0 = Math.cos(φ = (φ00 = φ) * d3_radians / 2 + π / 4), \n sinφ0 = Math.sin(φ);\n };\n function nextPoint(λ, φ) {\n λ *= d3_radians;\n φ = φ * d3_radians / 2 + π / 4;\n var dλ = λ - λ0, sdλ = dλ >= 0 ? 1 : -1, adλ = sdλ * dλ, cosφ = Math.cos(φ), sinφ = Math.sin(φ), k = sinφ0 * sinφ, u = cosφ0 * cosφ + k * Math.cos(adλ), v = k * sdλ * Math.sin(adλ);\n d3_geo_areaRingSum.add(Math.atan2(v, u));\n λ0 = λ, cosφ0 = cosφ, sinφ0 = sinφ;\n }\n d3_geo_area.lineEnd = function() {\n nextPoint(λ00, φ00);\n };\n }\n function d3_geo_cartesian(spherical) {\n var λ = spherical[0], φ = spherical[1], cosφ = Math.cos(φ);\n return [ cosφ * Math.cos(λ), cosφ * Math.sin(λ), Math.sin(φ) ];\n }\n function d3_geo_cartesianDot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n }\n function d3_geo_cartesianCross(a, b) {\n return [ a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0] ];\n }\n function d3_geo_cartesianAdd(a, b) {\n a[0] += b[0];\n a[1] += b[1];\n a[2] += b[2];\n }\n function d3_geo_cartesianScale(vector, k) {\n return [ vector[0] * k, vector[1] * k, vector[2] * k ];\n }\n function d3_geo_cartesianNormalize(d) {\n var l = Math.sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n d[0] /= l;\n d[1] /= l;\n d[2] /= l;\n }\n function d3_geo_spherical(cartesian) {\n return [ Math.atan2(cartesian[1], cartesian[0]), d3_asin(cartesian[2]) ];\n }\n function d3_geo_sphericalEqual(a, b) {\n return abs(a[0] - b[0]) < ε && abs(a[1] - b[1]) < ε;\n }\n d3.geo.bounds = function() {\n var λ0, φ0, λ1, φ1, λ_, λ__, φ__, p0, dλSum, ranges, range;\n var bound = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() {\n bound.point = ringPoint;\n bound.lineStart = ringStart;\n bound.lineEnd = ringEnd;\n dλSum = 0;\n d3_geo_area.polygonStart();\n },\n polygonEnd: function() {\n d3_geo_area.polygonEnd();\n bound.point = point;\n bound.lineStart = lineStart;\n bound.lineEnd = lineEnd;\n if (d3_geo_areaRingSum < 0) λ0 = -(λ1 = 180), φ0 = -(φ1 = 90); else if (dλSum > ε) φ1 = 90; else if (dλSum < -ε) φ0 = -90;\n range[0] = λ0, range[1] = λ1;\n }\n };\n function point(λ, φ) {\n ranges.push(range = [ λ0 = λ, λ1 = λ ]);\n if (φ < φ0) φ0 = φ;\n if (φ > φ1) φ1 = φ;\n }\n function linePoint(λ, φ) {\n var p = d3_geo_cartesian([ λ * d3_radians, φ * d3_radians ]);\n if (p0) {\n var normal = d3_geo_cartesianCross(p0, p), equatorial = [ normal[1], -normal[0], 0 ], inflection = d3_geo_cartesianCross(equatorial, normal);\n d3_geo_cartesianNormalize(inflection);\n inflection = d3_geo_spherical(inflection);\n var dλ = λ - λ_, s = dλ > 0 ? 1 : -1, λi = inflection[0] * d3_degrees * s, antimeridian = abs(dλ) > 180;\n if (antimeridian ^ (s * λ_ < λi && λi < s * λ)) {\n var φi = inflection[1] * d3_degrees;\n if (φi > φ1) φ1 = φi;\n } else if (λi = (λi + 360) % 360 - 180, antimeridian ^ (s * λ_ < λi && λi < s * λ)) {\n var φi = -inflection[1] * d3_degrees;\n if (φi < φ0) φ0 = φi;\n } else {\n if (φ < φ0) φ0 = φ;\n if (φ > φ1) φ1 = φ;\n }\n if (antimeridian) {\n if (λ < λ_) {\n if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ;\n } else {\n if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ;\n }\n } else {\n if (λ1 >= λ0) {\n if (λ < λ0) λ0 = λ;\n if (λ > λ1) λ1 = λ;\n } else {\n if (λ > λ_) {\n if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ;\n } else {\n if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ;\n }\n }\n }\n } else {\n point(λ, φ);\n }\n p0 = p, λ_ = λ;\n }\n function lineStart() {\n bound.point = linePoint;\n }\n function lineEnd() {\n range[0] = λ0, range[1] = λ1;\n bound.point = point;\n p0 = null;\n }\n function ringPoint(λ, φ) {\n if (p0) {\n var dλ = λ - λ_;\n dλSum += abs(dλ) > 180 ? dλ + (dλ > 0 ? 360 : -360) : dλ;\n } else λ__ = λ, φ__ = φ;\n d3_geo_area.point(λ, φ);\n linePoint(λ, φ);\n }\n function ringStart() {\n d3_geo_area.lineStart();\n }\n function ringEnd() {\n ringPoint(λ__, φ__);\n d3_geo_area.lineEnd();\n if (abs(dλSum) > ε) λ0 = -(λ1 = 180);\n range[0] = λ0, range[1] = λ1;\n p0 = null;\n }\n function angle(λ0, λ1) {\n return (λ1 -= λ0) < 0 ? λ1 + 360 : λ1;\n }\n function compareRanges(a, b) {\n return a[0] - b[0];\n }\n function withinRange(x, range) {\n return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;\n }\n return function(feature) {\n φ1 = λ1 = -(λ0 = φ0 = Infinity);\n ranges = [];\n d3.geo.stream(feature, bound);\n var n = ranges.length;\n if (n) {\n ranges.sort(compareRanges);\n for (var i = 1, a = ranges[0], b, merged = [ a ]; i < n; ++i) {\n b = ranges[i];\n if (withinRange(b[0], a) || withinRange(b[1], a)) {\n if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];\n if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];\n } else {\n merged.push(a = b);\n }\n }\n var best = -Infinity, dλ;\n for (var n = merged.length - 1, i = 0, a = merged[n], b; i <= n; a = b, ++i) {\n b = merged[i];\n if ((dλ = angle(a[1], b[0])) > best) best = dλ, λ0 = b[0], λ1 = a[1];\n }\n }\n ranges = range = null;\n return λ0 === Infinity || φ0 === Infinity ? [ [ NaN, NaN ], [ NaN, NaN ] ] : [ [ λ0, φ0 ], [ λ1, φ1 ] ];\n };\n }();\n d3.geo.centroid = function(object) {\n d3_geo_centroidW0 = d3_geo_centroidW1 = d3_geo_centroidX0 = d3_geo_centroidY0 = d3_geo_centroidZ0 = d3_geo_centroidX1 = d3_geo_centroidY1 = d3_geo_centroidZ1 = d3_geo_centroidX2 = d3_geo_centroidY2 = d3_geo_centroidZ2 = 0;\n d3.geo.stream(object, d3_geo_centroid);\n var x = d3_geo_centroidX2, y = d3_geo_centroidY2, z = d3_geo_centroidZ2, m = x * x + y * y + z * z;\n if (m < ε2) {\n x = d3_geo_centroidX1, y = d3_geo_centroidY1, z = d3_geo_centroidZ1;\n if (d3_geo_centroidW1 < ε) x = d3_geo_centroidX0, y = d3_geo_centroidY0, z = d3_geo_centroidZ0;\n m = x * x + y * y + z * z;\n if (m < ε2) return [ NaN, NaN ];\n }\n return [ Math.atan2(y, x) * d3_degrees, d3_asin(z / Math.sqrt(m)) * d3_degrees ];\n };\n var d3_geo_centroidW0, d3_geo_centroidW1, d3_geo_centroidX0, d3_geo_centroidY0, d3_geo_centroidZ0, d3_geo_centroidX1, d3_geo_centroidY1, d3_geo_centroidZ1, d3_geo_centroidX2, d3_geo_centroidY2, d3_geo_centroidZ2;\n var d3_geo_centroid = {\n sphere: d3_noop,\n point: d3_geo_centroidPoint,\n lineStart: d3_geo_centroidLineStart,\n lineEnd: d3_geo_centroidLineEnd,\n polygonStart: function() {\n d3_geo_centroid.lineStart = d3_geo_centroidRingStart;\n },\n polygonEnd: function() {\n d3_geo_centroid.lineStart = d3_geo_centroidLineStart;\n }\n };\n function d3_geo_centroidPoint(λ, φ) {\n λ *= d3_radians;\n var cosφ = Math.cos(φ *= d3_radians);\n d3_geo_centroidPointXYZ(cosφ * Math.cos(λ), cosφ * Math.sin(λ), Math.sin(φ));\n }\n function d3_geo_centroidPointXYZ(x, y, z) {\n ++d3_geo_centroidW0;\n d3_geo_centroidX0 += (x - d3_geo_centroidX0) / d3_geo_centroidW0;\n d3_geo_centroidY0 += (y - d3_geo_centroidY0) / d3_geo_centroidW0;\n d3_geo_centroidZ0 += (z - d3_geo_centroidZ0) / d3_geo_centroidW0;\n }\n function d3_geo_centroidLineStart() {\n var x0, y0, z0;\n d3_geo_centroid.point = function(λ, φ) {\n λ *= d3_radians;\n var cosφ = Math.cos(φ *= d3_radians);\n x0 = cosφ * Math.cos(λ);\n y0 = cosφ * Math.sin(λ);\n z0 = Math.sin(φ);\n d3_geo_centroid.point = nextPoint;\n d3_geo_centroidPointXYZ(x0, y0, z0);\n };\n function nextPoint(λ, φ) {\n λ *= d3_radians;\n var cosφ = Math.cos(φ *= d3_radians), x = cosφ * Math.cos(λ), y = cosφ * Math.sin(λ), z = Math.sin(φ), w = Math.atan2(Math.sqrt((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z);\n d3_geo_centroidW1 += w;\n d3_geo_centroidX1 += w * (x0 + (x0 = x));\n d3_geo_centroidY1 += w * (y0 + (y0 = y));\n d3_geo_centroidZ1 += w * (z0 + (z0 = z));\n d3_geo_centroidPointXYZ(x0, y0, z0);\n }\n }\n function d3_geo_centroidLineEnd() {\n d3_geo_centroid.point = d3_geo_centroidPoint;\n }\n function d3_geo_centroidRingStart() {\n var λ00, φ00, x0, y0, z0;\n d3_geo_centroid.point = function(λ, φ) {\n λ00 = λ, φ00 = φ;\n d3_geo_centroid.point = nextPoint;\n λ *= d3_radians;\n var cosφ = Math.cos(φ *= d3_radians);\n x0 = cosφ * Math.cos(λ);\n y0 = cosφ * Math.sin(λ);\n z0 = Math.sin(φ);\n d3_geo_centroidPointXYZ(x0, y0, z0);\n };\n d3_geo_centroid.lineEnd = function() {\n nextPoint(λ00, φ00);\n d3_geo_centroid.lineEnd = d3_geo_centroidLineEnd;\n d3_geo_centroid.point = d3_geo_centroidPoint;\n };\n function nextPoint(λ, φ) {\n λ *= d3_radians;\n var cosφ = Math.cos(φ *= d3_radians), x = cosφ * Math.cos(λ), y = cosφ * Math.sin(λ), z = Math.sin(φ), cx = y0 * z - z0 * y, cy = z0 * x - x0 * z, cz = x0 * y - y0 * x, m = Math.sqrt(cx * cx + cy * cy + cz * cz), u = x0 * x + y0 * y + z0 * z, v = m && -d3_acos(u) / m, w = Math.atan2(m, u);\n d3_geo_centroidX2 += v * cx;\n d3_geo_centroidY2 += v * cy;\n d3_geo_centroidZ2 += v * cz;\n d3_geo_centroidW1 += w;\n d3_geo_centroidX1 += w * (x0 + (x0 = x));\n d3_geo_centroidY1 += w * (y0 + (y0 = y));\n d3_geo_centroidZ1 += w * (z0 + (z0 = z));\n d3_geo_centroidPointXYZ(x0, y0, z0);\n }\n }\n function d3_geo_compose(a, b) {\n function compose(x, y) {\n return x = a(x, y), b(x[0], x[1]);\n }\n if (a.invert && b.invert) compose.invert = function(x, y) {\n return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n };\n return compose;\n }\n function d3_true() {\n return true;\n }\n function d3_geo_clipPolygon(segments, compare, clipStartInside, interpolate, listener) {\n var subject = [], clip = [];\n segments.forEach(function(segment) {\n if ((n = segment.length - 1) <= 0) return;\n var n, p0 = segment[0], p1 = segment[n];\n if (d3_geo_sphericalEqual(p0, p1)) {\n listener.lineStart();\n for (var i = 0; i < n; ++i) listener.point((p0 = segment[i])[0], p0[1]);\n listener.lineEnd();\n return;\n }\n var a = new d3_geo_clipPolygonIntersection(p0, segment, null, true), b = new d3_geo_clipPolygonIntersection(p0, null, a, false);\n a.o = b;\n subject.push(a);\n clip.push(b);\n a = new d3_geo_clipPolygonIntersection(p1, segment, null, false);\n b = new d3_geo_clipPolygonIntersection(p1, null, a, true);\n a.o = b;\n subject.push(a);\n clip.push(b);\n });\n clip.sort(compare);\n d3_geo_clipPolygonLinkCircular(subject);\n d3_geo_clipPolygonLinkCircular(clip);\n if (!subject.length) return;\n for (var i = 0, entry = clipStartInside, n = clip.length; i < n; ++i) {\n clip[i].e = entry = !entry;\n }\n var start = subject[0], points, point;\n while (1) {\n var current = start, isSubject = true;\n while (current.v) if ((current = current.n) === start) return;\n points = current.z;\n listener.lineStart();\n do {\n current.v = current.o.v = true;\n if (current.e) {\n if (isSubject) {\n for (var i = 0, n = points.length; i < n; ++i) listener.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.n.x, 1, listener);\n }\n current = current.n;\n } else {\n if (isSubject) {\n points = current.p.z;\n for (var i = points.length - 1; i >= 0; --i) listener.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.p.x, -1, listener);\n }\n current = current.p;\n }\n current = current.o;\n points = current.z;\n isSubject = !isSubject;\n } while (!current.v);\n listener.lineEnd();\n }\n }\n function d3_geo_clipPolygonLinkCircular(array) {\n if (!(n = array.length)) return;\n var n, i = 0, a = array[0], b;\n while (++i < n) {\n a.n = b = array[i];\n b.p = a;\n a = b;\n }\n a.n = b = array[0];\n b.p = a;\n }\n function d3_geo_clipPolygonIntersection(point, points, other, entry) {\n this.x = point;\n this.z = points;\n this.o = other;\n this.e = entry;\n this.v = false;\n this.n = this.p = null;\n }\n function d3_geo_clip(pointVisible, clipLine, interpolate, clipStart) {\n return function(rotate, listener) {\n var line = clipLine(listener), rotatedClipStart = rotate.invert(clipStart[0], clipStart[1]);\n var clip = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() {\n clip.point = pointRing;\n clip.lineStart = ringStart;\n clip.lineEnd = ringEnd;\n segments = [];\n polygon = [];\n },\n polygonEnd: function() {\n clip.point = point;\n clip.lineStart = lineStart;\n clip.lineEnd = lineEnd;\n segments = d3.merge(segments);\n var clipStartInside = d3_geo_pointInPolygon(rotatedClipStart, polygon);\n if (segments.length) {\n if (!polygonStarted) listener.polygonStart(), polygonStarted = true;\n d3_geo_clipPolygon(segments, d3_geo_clipSort, clipStartInside, interpolate, listener);\n } else if (clipStartInside) {\n if (!polygonStarted) listener.polygonStart(), polygonStarted = true;\n listener.lineStart();\n interpolate(null, null, 1, listener);\n listener.lineEnd();\n }\n if (polygonStarted) listener.polygonEnd(), polygonStarted = false;\n segments = polygon = null;\n },\n sphere: function() {\n listener.polygonStart();\n listener.lineStart();\n interpolate(null, null, 1, listener);\n listener.lineEnd();\n listener.polygonEnd();\n }\n };\n function point(λ, φ) {\n var point = rotate(λ, φ);\n if (pointVisible(λ = point[0], φ = point[1])) listener.point(λ, φ);\n }\n function pointLine(λ, φ) {\n var point = rotate(λ, φ);\n line.point(point[0], point[1]);\n }\n function lineStart() {\n clip.point = pointLine;\n line.lineStart();\n }\n function lineEnd() {\n clip.point = point;\n line.lineEnd();\n }\n var segments;\n var buffer = d3_geo_clipBufferListener(), ringListener = clipLine(buffer), polygonStarted = false, polygon, ring;\n function pointRing(λ, φ) {\n ring.push([ λ, φ ]);\n var point = rotate(λ, φ);\n ringListener.point(point[0], point[1]);\n }\n function ringStart() {\n ringListener.lineStart();\n ring = [];\n }\n function ringEnd() {\n pointRing(ring[0][0], ring[0][1]);\n ringListener.lineEnd();\n var clean = ringListener.clean(), ringSegments = buffer.buffer(), segment, n = ringSegments.length;\n ring.pop();\n polygon.push(ring);\n ring = null;\n if (!n) return;\n if (clean & 1) {\n segment = ringSegments[0];\n var n = segment.length - 1, i = -1, point;\n if (n > 0) {\n if (!polygonStarted) listener.polygonStart(), polygonStarted = true;\n listener.lineStart();\n while (++i < n) listener.point((point = segment[i])[0], point[1]);\n listener.lineEnd();\n }\n return;\n }\n if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n segments.push(ringSegments.filter(d3_geo_clipSegmentLength1));\n }\n return clip;\n };\n }\n function d3_geo_clipSegmentLength1(segment) {\n return segment.length > 1;\n }\n function d3_geo_clipBufferListener() {\n var lines = [], line;\n return {\n lineStart: function() {\n lines.push(line = []);\n },\n point: function(λ, φ) {\n line.push([ λ, φ ]);\n },\n lineEnd: d3_noop,\n buffer: function() {\n var buffer = lines;\n lines = [];\n line = null;\n return buffer;\n },\n rejoin: function() {\n if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n }\n };\n }\n function d3_geo_clipSort(a, b) {\n return ((a = a.x)[0] < 0 ? a[1] - halfπ - ε : halfπ - a[1]) - ((b = b.x)[0] < 0 ? b[1] - halfπ - ε : halfπ - b[1]);\n }\n var d3_geo_clipAntimeridian = d3_geo_clip(d3_true, d3_geo_clipAntimeridianLine, d3_geo_clipAntimeridianInterpolate, [ -π, -π / 2 ]);\n function d3_geo_clipAntimeridianLine(listener) {\n var λ0 = NaN, φ0 = NaN, sλ0 = NaN, clean;\n return {\n lineStart: function() {\n listener.lineStart();\n clean = 1;\n },\n point: function(λ1, φ1) {\n var sλ1 = λ1 > 0 ? π : -π, dλ = abs(λ1 - λ0);\n if (abs(dλ - π) < ε) {\n listener.point(λ0, φ0 = (φ0 + φ1) / 2 > 0 ? halfπ : -halfπ);\n listener.point(sλ0, φ0);\n listener.lineEnd();\n listener.lineStart();\n listener.point(sλ1, φ0);\n listener.point(λ1, φ0);\n clean = 0;\n } else if (sλ0 !== sλ1 && dλ >= π) {\n if (abs(λ0 - sλ0) < ε) λ0 -= sλ0 * ε;\n if (abs(λ1 - sλ1) < ε) λ1 -= sλ1 * ε;\n φ0 = d3_geo_clipAntimeridianIntersect(λ0, φ0, λ1, φ1);\n listener.point(sλ0, φ0);\n listener.lineEnd();\n listener.lineStart();\n listener.point(sλ1, φ0);\n clean = 0;\n }\n listener.point(λ0 = λ1, φ0 = φ1);\n sλ0 = sλ1;\n },\n lineEnd: function() {\n listener.lineEnd();\n λ0 = φ0 = NaN;\n },\n clean: function() {\n return 2 - clean;\n }\n };\n }\n function d3_geo_clipAntimeridianIntersect(λ0, φ0, λ1, φ1) {\n var cosφ0, cosφ1, sinλ0_λ1 = Math.sin(λ0 - λ1);\n return abs(sinλ0_λ1) > ε ? Math.atan((Math.sin(φ0) * (cosφ1 = Math.cos(φ1)) * Math.sin(λ1) - Math.sin(φ1) * (cosφ0 = Math.cos(φ0)) * Math.sin(λ0)) / (cosφ0 * cosφ1 * sinλ0_λ1)) : (φ0 + φ1) / 2;\n }\n function d3_geo_clipAntimeridianInterpolate(from, to, direction, listener) {\n var φ;\n if (from == null) {\n φ = direction * halfπ;\n listener.point(-π, φ);\n listener.point(0, φ);\n listener.point(π, φ);\n listener.point(π, 0);\n listener.point(π, -φ);\n listener.point(0, -φ);\n listener.point(-π, -φ);\n listener.point(-π, 0);\n listener.point(-π, φ);\n } else if (abs(from[0] - to[0]) > ε) {\n var s = from[0] < to[0] ? π : -π;\n φ = direction * s / 2;\n listener.point(-s, φ);\n listener.point(0, φ);\n listener.point(s, φ);\n } else {\n listener.point(to[0], to[1]);\n }\n }\n function d3_geo_pointInPolygon(point, polygon) {\n var meridian = point[0], parallel = point[1], meridianNormal = [ Math.sin(meridian), -Math.cos(meridian), 0 ], polarAngle = 0, winding = 0;\n d3_geo_areaRingSum.reset();\n for (var i = 0, n = polygon.length; i < n; ++i) {\n var ring = polygon[i], m = ring.length;\n if (!m) continue;\n var point0 = ring[0], λ0 = point0[0], φ0 = point0[1] / 2 + π / 4, sinφ0 = Math.sin(φ0), cosφ0 = Math.cos(φ0), j = 1;\n while (true) {\n if (j === m) j = 0;\n point = ring[j];\n var λ = point[0], φ = point[1] / 2 + π / 4, sinφ = Math.sin(φ), cosφ = Math.cos(φ), dλ = λ - λ0, sdλ = dλ >= 0 ? 1 : -1, adλ = sdλ * dλ, antimeridian = adλ > π, k = sinφ0 * sinφ;\n d3_geo_areaRingSum.add(Math.atan2(k * sdλ * Math.sin(adλ), cosφ0 * cosφ + k * Math.cos(adλ)));\n polarAngle += antimeridian ? dλ + sdλ * τ : dλ;\n if (antimeridian ^ λ0 >= meridian ^ λ >= meridian) {\n var arc = d3_geo_cartesianCross(d3_geo_cartesian(point0), d3_geo_cartesian(point));\n d3_geo_cartesianNormalize(arc);\n var intersection = d3_geo_cartesianCross(meridianNormal, arc);\n d3_geo_cartesianNormalize(intersection);\n var φarc = (antimeridian ^ dλ >= 0 ? -1 : 1) * d3_asin(intersection[2]);\n if (parallel > φarc || parallel === φarc && (arc[0] || arc[1])) {\n winding += antimeridian ^ dλ >= 0 ? 1 : -1;\n }\n }\n if (!j++) break;\n λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ, point0 = point;\n }\n }\n return (polarAngle < -ε || polarAngle < ε && d3_geo_areaRingSum < -ε) ^ winding & 1;\n }\n function d3_geo_clipCircle(radius) {\n var cr = Math.cos(radius), smallRadius = cr > 0, notHemisphere = abs(cr) > ε, interpolate = d3_geo_circleInterpolate(radius, 6 * d3_radians);\n return d3_geo_clip(visible, clipLine, interpolate, smallRadius ? [ 0, -radius ] : [ -π, radius - π ]);\n function visible(λ, φ) {\n return Math.cos(λ) * Math.cos(φ) > cr;\n }\n function clipLine(listener) {\n var point0, c0, v0, v00, clean;\n return {\n lineStart: function() {\n v00 = v0 = false;\n clean = 1;\n },\n point: function(λ, φ) {\n var point1 = [ λ, φ ], point2, v = visible(λ, φ), c = smallRadius ? v ? 0 : code(λ, φ) : v ? code(λ + (λ < 0 ? π : -π), φ) : 0;\n if (!point0 && (v00 = v0 = v)) listener.lineStart();\n if (v !== v0) {\n point2 = intersect(point0, point1);\n if (d3_geo_sphericalEqual(point0, point2) || d3_geo_sphericalEqual(point1, point2)) {\n point1[0] += ε;\n point1[1] += ε;\n v = visible(point1[0], point1[1]);\n }\n }\n if (v !== v0) {\n clean = 0;\n if (v) {\n listener.lineStart();\n point2 = intersect(point1, point0);\n listener.point(point2[0], point2[1]);\n } else {\n point2 = intersect(point0, point1);\n listener.point(point2[0], point2[1]);\n listener.lineEnd();\n }\n point0 = point2;\n } else if (notHemisphere && point0 && smallRadius ^ v) {\n var t;\n if (!(c & c0) && (t = intersect(point1, point0, true))) {\n clean = 0;\n if (smallRadius) {\n listener.lineStart();\n listener.point(t[0][0], t[0][1]);\n listener.point(t[1][0], t[1][1]);\n listener.lineEnd();\n } else {\n listener.point(t[1][0], t[1][1]);\n listener.lineEnd();\n listener.lineStart();\n listener.point(t[0][0], t[0][1]);\n }\n }\n }\n if (v && (!point0 || !d3_geo_sphericalEqual(point0, point1))) {\n listener.point(point1[0], point1[1]);\n }\n point0 = point1, v0 = v, c0 = c;\n },\n lineEnd: function() {\n if (v0) listener.lineEnd();\n point0 = null;\n },\n clean: function() {\n return clean | (v00 && v0) << 1;\n }\n };\n }\n function intersect(a, b, two) {\n var pa = d3_geo_cartesian(a), pb = d3_geo_cartesian(b);\n var n1 = [ 1, 0, 0 ], n2 = d3_geo_cartesianCross(pa, pb), n2n2 = d3_geo_cartesianDot(n2, n2), n1n2 = n2[0], determinant = n2n2 - n1n2 * n1n2;\n if (!determinant) return !two && a;\n var c1 = cr * n2n2 / determinant, c2 = -cr * n1n2 / determinant, n1xn2 = d3_geo_cartesianCross(n1, n2), A = d3_geo_cartesianScale(n1, c1), B = d3_geo_cartesianScale(n2, c2);\n d3_geo_cartesianAdd(A, B);\n var u = n1xn2, w = d3_geo_cartesianDot(A, u), uu = d3_geo_cartesianDot(u, u), t2 = w * w - uu * (d3_geo_cartesianDot(A, A) - 1);\n if (t2 < 0) return;\n var t = Math.sqrt(t2), q = d3_geo_cartesianScale(u, (-w - t) / uu);\n d3_geo_cartesianAdd(q, A);\n q = d3_geo_spherical(q);\n if (!two) return q;\n var λ0 = a[0], λ1 = b[0], φ0 = a[1], φ1 = b[1], z;\n if (λ1 < λ0) z = λ0, λ0 = λ1, λ1 = z;\n var δλ = λ1 - λ0, polar = abs(δλ - π) < ε, meridian = polar || δλ < ε;\n if (!polar && φ1 < φ0) z = φ0, φ0 = φ1, φ1 = z;\n if (meridian ? polar ? φ0 + φ1 > 0 ^ q[1] < (abs(q[0] - λ0) < ε ? φ0 : φ1) : φ0 <= q[1] && q[1] <= φ1 : δλ > π ^ (λ0 <= q[0] && q[0] <= λ1)) {\n var q1 = d3_geo_cartesianScale(u, (-w + t) / uu);\n d3_geo_cartesianAdd(q1, A);\n return [ q, d3_geo_spherical(q1) ];\n }\n }\n function code(λ, φ) {\n var r = smallRadius ? radius : π - radius, code = 0;\n if (λ < -r) code |= 1; else if (λ > r) code |= 2;\n if (φ < -r) code |= 4; else if (φ > r) code |= 8;\n return code;\n }\n }\n function d3_geom_clipLine(x0, y0, x1, y1) {\n return function(line) {\n var a = line.a, b = line.b, ax = a.x, ay = a.y, bx = b.x, by = b.y, t0 = 0, t1 = 1, dx = bx - ax, dy = by - ay, r;\n r = x0 - ax;\n if (!dx && r > 0) return;\n r /= dx;\n if (dx < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dx > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n r = x1 - ax;\n if (!dx && r < 0) return;\n r /= dx;\n if (dx < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dx > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n r = y0 - ay;\n if (!dy && r > 0) return;\n r /= dy;\n if (dy < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dy > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n r = y1 - ay;\n if (!dy && r < 0) return;\n r /= dy;\n if (dy < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dy > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n if (t0 > 0) line.a = {\n x: ax + t0 * dx,\n y: ay + t0 * dy\n };\n if (t1 < 1) line.b = {\n x: ax + t1 * dx,\n y: ay + t1 * dy\n };\n return line;\n };\n }\n var d3_geo_clipExtentMAX = 1e9;\n d3.geo.clipExtent = function() {\n var x0, y0, x1, y1, stream, clip, clipExtent = {\n stream: function(output) {\n if (stream) stream.valid = false;\n stream = clip(output);\n stream.valid = true;\n return stream;\n },\n extent: function(_) {\n if (!arguments.length) return [ [ x0, y0 ], [ x1, y1 ] ];\n clip = d3_geo_clipExtent(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]);\n if (stream) stream.valid = false, stream = null;\n return clipExtent;\n }\n };\n return clipExtent.extent([ [ 0, 0 ], [ 960, 500 ] ]);\n };\n function d3_geo_clipExtent(x0, y0, x1, y1) {\n return function(listener) {\n var listener_ = listener, bufferListener = d3_geo_clipBufferListener(), clipLine = d3_geom_clipLine(x0, y0, x1, y1), segments, polygon, ring;\n var clip = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() {\n listener = bufferListener;\n segments = [];\n polygon = [];\n clean = true;\n },\n polygonEnd: function() {\n listener = listener_;\n segments = d3.merge(segments);\n var clipStartInside = insidePolygon([ x0, y1 ]), inside = clean && clipStartInside, visible = segments.length;\n if (inside || visible) {\n listener.polygonStart();\n if (inside) {\n listener.lineStart();\n interpolate(null, null, 1, listener);\n listener.lineEnd();\n }\n if (visible) {\n d3_geo_clipPolygon(segments, compare, clipStartInside, interpolate, listener);\n }\n listener.polygonEnd();\n }\n segments = polygon = ring = null;\n }\n };\n function insidePolygon(p) {\n var wn = 0, n = polygon.length, y = p[1];\n for (var i = 0; i < n; ++i) {\n for (var j = 1, v = polygon[i], m = v.length, a = v[0], b; j < m; ++j) {\n b = v[j];\n if (a[1] <= y) {\n if (b[1] > y && d3_cross2d(a, b, p) > 0) ++wn;\n } else {\n if (b[1] <= y && d3_cross2d(a, b, p) < 0) --wn;\n }\n a = b;\n }\n }\n return wn !== 0;\n }\n function interpolate(from, to, direction, listener) {\n var a = 0, a1 = 0;\n if (from == null || (a = corner(from, direction)) !== (a1 = corner(to, direction)) || comparePoints(from, to) < 0 ^ direction > 0) {\n do {\n listener.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n } while ((a = (a + direction + 4) % 4) !== a1);\n } else {\n listener.point(to[0], to[1]);\n }\n }\n function pointVisible(x, y) {\n return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n }\n function point(x, y) {\n if (pointVisible(x, y)) listener.point(x, y);\n }\n var x__, y__, v__, x_, y_, v_, first, clean;\n function lineStart() {\n clip.point = linePoint;\n if (polygon) polygon.push(ring = []);\n first = true;\n v_ = false;\n x_ = y_ = NaN;\n }\n function lineEnd() {\n if (segments) {\n linePoint(x__, y__);\n if (v__ && v_) bufferListener.rejoin();\n segments.push(bufferListener.buffer());\n }\n clip.point = point;\n if (v_) listener.lineEnd();\n }\n function linePoint(x, y) {\n x = Math.max(-d3_geo_clipExtentMAX, Math.min(d3_geo_clipExtentMAX, x));\n y = Math.max(-d3_geo_clipExtentMAX, Math.min(d3_geo_clipExtentMAX, y));\n var v = pointVisible(x, y);\n if (polygon) ring.push([ x, y ]);\n if (first) {\n x__ = x, y__ = y, v__ = v;\n first = false;\n if (v) {\n listener.lineStart();\n listener.point(x, y);\n }\n } else {\n if (v && v_) listener.point(x, y); else {\n var l = {\n a: {\n x: x_,\n y: y_\n },\n b: {\n x: x,\n y: y\n }\n };\n if (clipLine(l)) {\n if (!v_) {\n listener.lineStart();\n listener.point(l.a.x, l.a.y);\n }\n listener.point(l.b.x, l.b.y);\n if (!v) listener.lineEnd();\n clean = false;\n } else if (v) {\n listener.lineStart();\n listener.point(x, y);\n clean = false;\n }\n }\n }\n x_ = x, y_ = y, v_ = v;\n }\n return clip;\n };\n function corner(p, direction) {\n return abs(p[0] - x0) < ε ? direction > 0 ? 0 : 3 : abs(p[0] - x1) < ε ? direction > 0 ? 2 : 1 : abs(p[1] - y0) < ε ? direction > 0 ? 1 : 0 : direction > 0 ? 3 : 2;\n }\n function compare(a, b) {\n return comparePoints(a.x, b.x);\n }\n function comparePoints(a, b) {\n var ca = corner(a, 1), cb = corner(b, 1);\n return ca !== cb ? ca - cb : ca === 0 ? b[1] - a[1] : ca === 1 ? a[0] - b[0] : ca === 2 ? a[1] - b[1] : b[0] - a[0];\n }\n }\n function d3_geo_conic(projectAt) {\n var φ0 = 0, φ1 = π / 3, m = d3_geo_projectionMutator(projectAt), p = m(φ0, φ1);\n p.parallels = function(_) {\n if (!arguments.length) return [ φ0 / π * 180, φ1 / π * 180 ];\n return m(φ0 = _[0] * π / 180, φ1 = _[1] * π / 180);\n };\n return p;\n }\n function d3_geo_conicEqualArea(φ0, φ1) {\n var sinφ0 = Math.sin(φ0), n = (sinφ0 + Math.sin(φ1)) / 2, C = 1 + sinφ0 * (2 * n - sinφ0), ρ0 = Math.sqrt(C) / n;\n function forward(λ, φ) {\n var ρ = Math.sqrt(C - 2 * n * Math.sin(φ)) / n;\n return [ ρ * Math.sin(λ *= n), ρ0 - ρ * Math.cos(λ) ];\n }\n forward.invert = function(x, y) {\n var ρ0_y = ρ0 - y;\n return [ Math.atan2(x, ρ0_y) / n, d3_asin((C - (x * x + ρ0_y * ρ0_y) * n * n) / (2 * n)) ];\n };\n return forward;\n }\n (d3.geo.conicEqualArea = function() {\n return d3_geo_conic(d3_geo_conicEqualArea);\n }).raw = d3_geo_conicEqualArea;\n d3.geo.albers = function() {\n return d3.geo.conicEqualArea().rotate([ 96, 0 ]).center([ -.6, 38.7 ]).parallels([ 29.5, 45.5 ]).scale(1070);\n };\n d3.geo.albersUsa = function() {\n var lower48 = d3.geo.albers();\n var alaska = d3.geo.conicEqualArea().rotate([ 154, 0 ]).center([ -2, 58.5 ]).parallels([ 55, 65 ]);\n var hawaii = d3.geo.conicEqualArea().rotate([ 157, 0 ]).center([ -3, 19.9 ]).parallels([ 8, 18 ]);\n var point, pointStream = {\n point: function(x, y) {\n point = [ x, y ];\n }\n }, lower48Point, alaskaPoint, hawaiiPoint;\n function albersUsa(coordinates) {\n var x = coordinates[0], y = coordinates[1];\n point = null;\n (lower48Point(x, y), point) || (alaskaPoint(x, y), point) || hawaiiPoint(x, y);\n return point;\n }\n albersUsa.invert = function(coordinates) {\n var k = lower48.scale(), t = lower48.translate(), x = (coordinates[0] - t[0]) / k, y = (coordinates[1] - t[1]) / k;\n return (y >= .12 && y < .234 && x >= -.425 && x < -.214 ? alaska : y >= .166 && y < .234 && x >= -.214 && x < -.115 ? hawaii : lower48).invert(coordinates);\n };\n albersUsa.stream = function(stream) {\n var lower48Stream = lower48.stream(stream), alaskaStream = alaska.stream(stream), hawaiiStream = hawaii.stream(stream);\n return {\n point: function(x, y) {\n lower48Stream.point(x, y);\n alaskaStream.point(x, y);\n hawaiiStream.point(x, y);\n },\n sphere: function() {\n lower48Stream.sphere();\n alaskaStream.sphere();\n hawaiiStream.sphere();\n },\n lineStart: function() {\n lower48Stream.lineStart();\n alaskaStream.lineStart();\n hawaiiStream.lineStart();\n },\n lineEnd: function() {\n lower48Stream.lineEnd();\n alaskaStream.lineEnd();\n hawaiiStream.lineEnd();\n },\n polygonStart: function() {\n lower48Stream.polygonStart();\n alaskaStream.polygonStart();\n hawaiiStream.polygonStart();\n },\n polygonEnd: function() {\n lower48Stream.polygonEnd();\n alaskaStream.polygonEnd();\n hawaiiStream.polygonEnd();\n }\n };\n };\n albersUsa.precision = function(_) {\n if (!arguments.length) return lower48.precision();\n lower48.precision(_);\n alaska.precision(_);\n hawaii.precision(_);\n return albersUsa;\n };\n albersUsa.scale = function(_) {\n if (!arguments.length) return lower48.scale();\n lower48.scale(_);\n alaska.scale(_ * .35);\n hawaii.scale(_);\n return albersUsa.translate(lower48.translate());\n };\n albersUsa.translate = function(_) {\n if (!arguments.length) return lower48.translate();\n var k = lower48.scale(), x = +_[0], y = +_[1];\n lower48Point = lower48.translate(_).clipExtent([ [ x - .455 * k, y - .238 * k ], [ x + .455 * k, y + .238 * k ] ]).stream(pointStream).point;\n alaskaPoint = alaska.translate([ x - .307 * k, y + .201 * k ]).clipExtent([ [ x - .425 * k + ε, y + .12 * k + ε ], [ x - .214 * k - ε, y + .234 * k - ε ] ]).stream(pointStream).point;\n hawaiiPoint = hawaii.translate([ x - .205 * k, y + .212 * k ]).clipExtent([ [ x - .214 * k + ε, y + .166 * k + ε ], [ x - .115 * k - ε, y + .234 * k - ε ] ]).stream(pointStream).point;\n return albersUsa;\n };\n return albersUsa.scale(1070);\n };\n var d3_geo_pathAreaSum, d3_geo_pathAreaPolygon, d3_geo_pathArea = {\n point: d3_noop,\n lineStart: d3_noop,\n lineEnd: d3_noop,\n polygonStart: function() {\n d3_geo_pathAreaPolygon = 0;\n d3_geo_pathArea.lineStart = d3_geo_pathAreaRingStart;\n },\n polygonEnd: function() {\n d3_geo_pathArea.lineStart = d3_geo_pathArea.lineEnd = d3_geo_pathArea.point = d3_noop;\n d3_geo_pathAreaSum += abs(d3_geo_pathAreaPolygon / 2);\n }\n };\n function d3_geo_pathAreaRingStart() {\n var x00, y00, x0, y0;\n d3_geo_pathArea.point = function(x, y) {\n d3_geo_pathArea.point = nextPoint;\n x00 = x0 = x, y00 = y0 = y;\n };\n function nextPoint(x, y) {\n d3_geo_pathAreaPolygon += y0 * x - x0 * y;\n x0 = x, y0 = y;\n }\n d3_geo_pathArea.lineEnd = function() {\n nextPoint(x00, y00);\n };\n }\n var d3_geo_pathBoundsX0, d3_geo_pathBoundsY0, d3_geo_pathBoundsX1, d3_geo_pathBoundsY1;\n var d3_geo_pathBounds = {\n point: d3_geo_pathBoundsPoint,\n lineStart: d3_noop,\n lineEnd: d3_noop,\n polygonStart: d3_noop,\n polygonEnd: d3_noop\n };\n function d3_geo_pathBoundsPoint(x, y) {\n if (x < d3_geo_pathBoundsX0) d3_geo_pathBoundsX0 = x;\n if (x > d3_geo_pathBoundsX1) d3_geo_pathBoundsX1 = x;\n if (y < d3_geo_pathBoundsY0) d3_geo_pathBoundsY0 = y;\n if (y > d3_geo_pathBoundsY1) d3_geo_pathBoundsY1 = y;\n }\n function d3_geo_pathBuffer() {\n var pointCircle = d3_geo_pathBufferCircle(4.5), buffer = [];\n var stream = {\n point: point,\n lineStart: function() {\n stream.point = pointLineStart;\n },\n lineEnd: lineEnd,\n polygonStart: function() {\n stream.lineEnd = lineEndPolygon;\n },\n polygonEnd: function() {\n stream.lineEnd = lineEnd;\n stream.point = point;\n },\n pointRadius: function(_) {\n pointCircle = d3_geo_pathBufferCircle(_);\n return stream;\n },\n result: function() {\n if (buffer.length) {\n var result = buffer.join(\"\");\n buffer = [];\n return result;\n }\n }\n };\n function point(x, y) {\n buffer.push(\"M\", x, \",\", y, pointCircle);\n }\n function pointLineStart(x, y) {\n buffer.push(\"M\", x, \",\", y);\n stream.point = pointLine;\n }\n function pointLine(x, y) {\n buffer.push(\"L\", x, \",\", y);\n }\n function lineEnd() {\n stream.point = point;\n }\n function lineEndPolygon() {\n buffer.push(\"Z\");\n }\n return stream;\n }\n function d3_geo_pathBufferCircle(radius) {\n return \"m0,\" + radius + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + -2 * radius + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + 2 * radius + \"z\";\n }\n var d3_geo_pathCentroid = {\n point: d3_geo_pathCentroidPoint,\n lineStart: d3_geo_pathCentroidLineStart,\n lineEnd: d3_geo_pathCentroidLineEnd,\n polygonStart: function() {\n d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidRingStart;\n },\n polygonEnd: function() {\n d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint;\n d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidLineStart;\n d3_geo_pathCentroid.lineEnd = d3_geo_pathCentroidLineEnd;\n }\n };\n function d3_geo_pathCentroidPoint(x, y) {\n d3_geo_centroidX0 += x;\n d3_geo_centroidY0 += y;\n ++d3_geo_centroidZ0;\n }\n function d3_geo_pathCentroidLineStart() {\n var x0, y0;\n d3_geo_pathCentroid.point = function(x, y) {\n d3_geo_pathCentroid.point = nextPoint;\n d3_geo_pathCentroidPoint(x0 = x, y0 = y);\n };\n function nextPoint(x, y) {\n var dx = x - x0, dy = y - y0, z = Math.sqrt(dx * dx + dy * dy);\n d3_geo_centroidX1 += z * (x0 + x) / 2;\n d3_geo_centroidY1 += z * (y0 + y) / 2;\n d3_geo_centroidZ1 += z;\n d3_geo_pathCentroidPoint(x0 = x, y0 = y);\n }\n }\n function d3_geo_pathCentroidLineEnd() {\n d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint;\n }\n function d3_geo_pathCentroidRingStart() {\n var x00, y00, x0, y0;\n d3_geo_pathCentroid.point = function(x, y) {\n d3_geo_pathCentroid.point = nextPoint;\n d3_geo_pathCentroidPoint(x00 = x0 = x, y00 = y0 = y);\n };\n function nextPoint(x, y) {\n var dx = x - x0, dy = y - y0, z = Math.sqrt(dx * dx + dy * dy);\n d3_geo_centroidX1 += z * (x0 + x) / 2;\n d3_geo_centroidY1 += z * (y0 + y) / 2;\n d3_geo_centroidZ1 += z;\n z = y0 * x - x0 * y;\n d3_geo_centroidX2 += z * (x0 + x);\n d3_geo_centroidY2 += z * (y0 + y);\n d3_geo_centroidZ2 += z * 3;\n d3_geo_pathCentroidPoint(x0 = x, y0 = y);\n }\n d3_geo_pathCentroid.lineEnd = function() {\n nextPoint(x00, y00);\n };\n }\n function d3_geo_pathContext(context) {\n var pointRadius = 4.5;\n var stream = {\n point: point,\n lineStart: function() {\n stream.point = pointLineStart;\n },\n lineEnd: lineEnd,\n polygonStart: function() {\n stream.lineEnd = lineEndPolygon;\n },\n polygonEnd: function() {\n stream.lineEnd = lineEnd;\n stream.point = point;\n },\n pointRadius: function(_) {\n pointRadius = _;\n return stream;\n },\n result: d3_noop\n };\n function point(x, y) {\n context.moveTo(x + pointRadius, y);\n context.arc(x, y, pointRadius, 0, τ);\n }\n function pointLineStart(x, y) {\n context.moveTo(x, y);\n stream.point = pointLine;\n }\n function pointLine(x, y) {\n context.lineTo(x, y);\n }\n function lineEnd() {\n stream.point = point;\n }\n function lineEndPolygon() {\n context.closePath();\n }\n return stream;\n }\n function d3_geo_resample(project) {\n var δ2 = .5, cosMinDistance = Math.cos(30 * d3_radians), maxDepth = 16;\n function resample(stream) {\n return (maxDepth ? resampleRecursive : resampleNone)(stream);\n }\n function resampleNone(stream) {\n return d3_geo_transformPoint(stream, function(x, y) {\n x = project(x, y);\n stream.point(x[0], x[1]);\n });\n }\n function resampleRecursive(stream) {\n var λ00, φ00, x00, y00, a00, b00, c00, λ0, x0, y0, a0, b0, c0;\n var resample = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() {\n stream.polygonStart();\n resample.lineStart = ringStart;\n },\n polygonEnd: function() {\n stream.polygonEnd();\n resample.lineStart = lineStart;\n }\n };\n function point(x, y) {\n x = project(x, y);\n stream.point(x[0], x[1]);\n }\n function lineStart() {\n x0 = NaN;\n resample.point = linePoint;\n stream.lineStart();\n }\n function linePoint(λ, φ) {\n var c = d3_geo_cartesian([ λ, φ ]), p = project(λ, φ);\n resampleLineTo(x0, y0, λ0, a0, b0, c0, x0 = p[0], y0 = p[1], λ0 = λ, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n stream.point(x0, y0);\n }\n function lineEnd() {\n resample.point = point;\n stream.lineEnd();\n }\n function ringStart() {\n lineStart();\n resample.point = ringPoint;\n resample.lineEnd = ringEnd;\n }\n function ringPoint(λ, φ) {\n linePoint(λ00 = λ, φ00 = φ), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n resample.point = linePoint;\n }\n function ringEnd() {\n resampleLineTo(x0, y0, λ0, a0, b0, c0, x00, y00, λ00, a00, b00, c00, maxDepth, stream);\n resample.lineEnd = lineEnd;\n lineEnd();\n }\n return resample;\n }\n function resampleLineTo(x0, y0, λ0, a0, b0, c0, x1, y1, λ1, a1, b1, c1, depth, stream) {\n var dx = x1 - x0, dy = y1 - y0, d2 = dx * dx + dy * dy;\n if (d2 > 4 * δ2 && depth--) {\n var a = a0 + a1, b = b0 + b1, c = c0 + c1, m = Math.sqrt(a * a + b * b + c * c), φ2 = Math.asin(c /= m), λ2 = abs(abs(c) - 1) < ε || abs(λ0 - λ1) < ε ? (λ0 + λ1) / 2 : Math.atan2(b, a), p = project(λ2, φ2), x2 = p[0], y2 = p[1], dx2 = x2 - x0, dy2 = y2 - y0, dz = dy * dx2 - dx * dy2;\n if (dz * dz / d2 > δ2 || abs((dx * dx2 + dy * dy2) / d2 - .5) > .3 || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) {\n resampleLineTo(x0, y0, λ0, a0, b0, c0, x2, y2, λ2, a /= m, b /= m, c, depth, stream);\n stream.point(x2, y2);\n resampleLineTo(x2, y2, λ2, a, b, c, x1, y1, λ1, a1, b1, c1, depth, stream);\n }\n }\n }\n resample.precision = function(_) {\n if (!arguments.length) return Math.sqrt(δ2);\n maxDepth = (δ2 = _ * _) > 0 && 16;\n return resample;\n };\n return resample;\n }\n d3.geo.path = function() {\n var pointRadius = 4.5, projection, context, projectStream, contextStream, cacheStream;\n function path(object) {\n if (object) {\n if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n if (!cacheStream || !cacheStream.valid) cacheStream = projectStream(contextStream);\n d3.geo.stream(object, cacheStream);\n }\n return contextStream.result();\n }\n path.area = function(object) {\n d3_geo_pathAreaSum = 0;\n d3.geo.stream(object, projectStream(d3_geo_pathArea));\n return d3_geo_pathAreaSum;\n };\n path.centroid = function(object) {\n d3_geo_centroidX0 = d3_geo_centroidY0 = d3_geo_centroidZ0 = d3_geo_centroidX1 = d3_geo_centroidY1 = d3_geo_centroidZ1 = d3_geo_centroidX2 = d3_geo_centroidY2 = d3_geo_centroidZ2 = 0;\n d3.geo.stream(object, projectStream(d3_geo_pathCentroid));\n return d3_geo_centroidZ2 ? [ d3_geo_centroidX2 / d3_geo_centroidZ2, d3_geo_centroidY2 / d3_geo_centroidZ2 ] : d3_geo_centroidZ1 ? [ d3_geo_centroidX1 / d3_geo_centroidZ1, d3_geo_centroidY1 / d3_geo_centroidZ1 ] : d3_geo_centroidZ0 ? [ d3_geo_centroidX0 / d3_geo_centroidZ0, d3_geo_centroidY0 / d3_geo_centroidZ0 ] : [ NaN, NaN ];\n };\n path.bounds = function(object) {\n d3_geo_pathBoundsX1 = d3_geo_pathBoundsY1 = -(d3_geo_pathBoundsX0 = d3_geo_pathBoundsY0 = Infinity);\n d3.geo.stream(object, projectStream(d3_geo_pathBounds));\n return [ [ d3_geo_pathBoundsX0, d3_geo_pathBoundsY0 ], [ d3_geo_pathBoundsX1, d3_geo_pathBoundsY1 ] ];\n };\n path.projection = function(_) {\n if (!arguments.length) return projection;\n projectStream = (projection = _) ? _.stream || d3_geo_pathProjectStream(_) : d3_identity;\n return reset();\n };\n path.context = function(_) {\n if (!arguments.length) return context;\n contextStream = (context = _) == null ? new d3_geo_pathBuffer() : new d3_geo_pathContext(_);\n if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n return reset();\n };\n path.pointRadius = function(_) {\n if (!arguments.length) return pointRadius;\n pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n return path;\n };\n function reset() {\n cacheStream = null;\n return path;\n }\n return path.projection(d3.geo.albersUsa()).context(null);\n };\n function d3_geo_pathProjectStream(project) {\n var resample = d3_geo_resample(function(x, y) {\n return project([ x * d3_degrees, y * d3_degrees ]);\n });\n return function(stream) {\n return d3_geo_projectionRadians(resample(stream));\n };\n }\n d3.geo.transform = function(methods) {\n return {\n stream: function(stream) {\n var transform = new d3_geo_transform(stream);\n for (var k in methods) transform[k] = methods[k];\n return transform;\n }\n };\n };\n function d3_geo_transform(stream) {\n this.stream = stream;\n }\n d3_geo_transform.prototype = {\n point: function(x, y) {\n this.stream.point(x, y);\n },\n sphere: function() {\n this.stream.sphere();\n },\n lineStart: function() {\n this.stream.lineStart();\n },\n lineEnd: function() {\n this.stream.lineEnd();\n },\n polygonStart: function() {\n this.stream.polygonStart();\n },\n polygonEnd: function() {\n this.stream.polygonEnd();\n }\n };\n function d3_geo_transformPoint(stream, point) {\n return {\n point: point,\n sphere: function() {\n stream.sphere();\n },\n lineStart: function() {\n stream.lineStart();\n },\n lineEnd: function() {\n stream.lineEnd();\n },\n polygonStart: function() {\n stream.polygonStart();\n },\n polygonEnd: function() {\n stream.polygonEnd();\n }\n };\n }\n d3.geo.projection = d3_geo_projection;\n d3.geo.projectionMutator = d3_geo_projectionMutator;\n function d3_geo_projection(project) {\n return d3_geo_projectionMutator(function() {\n return project;\n })();\n }\n function d3_geo_projectionMutator(projectAt) {\n var project, rotate, projectRotate, projectResample = d3_geo_resample(function(x, y) {\n x = project(x, y);\n return [ x[0] * k + δx, δy - x[1] * k ];\n }), k = 150, x = 480, y = 250, λ = 0, φ = 0, δλ = 0, δφ = 0, δγ = 0, δx, δy, preclip = d3_geo_clipAntimeridian, postclip = d3_identity, clipAngle = null, clipExtent = null, stream;\n function projection(point) {\n point = projectRotate(point[0] * d3_radians, point[1] * d3_radians);\n return [ point[0] * k + δx, δy - point[1] * k ];\n }\n function invert(point) {\n point = projectRotate.invert((point[0] - δx) / k, (δy - point[1]) / k);\n return point && [ point[0] * d3_degrees, point[1] * d3_degrees ];\n }\n projection.stream = function(output) {\n if (stream) stream.valid = false;\n stream = d3_geo_projectionRadians(preclip(rotate, projectResample(postclip(output))));\n stream.valid = true;\n return stream;\n };\n projection.clipAngle = function(_) {\n if (!arguments.length) return clipAngle;\n preclip = _ == null ? (clipAngle = _, d3_geo_clipAntimeridian) : d3_geo_clipCircle((clipAngle = +_) * d3_radians);\n return invalidate();\n };\n projection.clipExtent = function(_) {\n if (!arguments.length) return clipExtent;\n clipExtent = _;\n postclip = _ ? d3_geo_clipExtent(_[0][0], _[0][1], _[1][0], _[1][1]) : d3_identity;\n return invalidate();\n };\n projection.scale = function(_) {\n if (!arguments.length) return k;\n k = +_;\n return reset();\n };\n projection.translate = function(_) {\n if (!arguments.length) return [ x, y ];\n x = +_[0];\n y = +_[1];\n return reset();\n };\n projection.center = function(_) {\n if (!arguments.length) return [ λ * d3_degrees, φ * d3_degrees ];\n λ = _[0] % 360 * d3_radians;\n φ = _[1] % 360 * d3_radians;\n return reset();\n };\n projection.rotate = function(_) {\n if (!arguments.length) return [ δλ * d3_degrees, δφ * d3_degrees, δγ * d3_degrees ];\n δλ = _[0] % 360 * d3_radians;\n δφ = _[1] % 360 * d3_radians;\n δγ = _.length > 2 ? _[2] % 360 * d3_radians : 0;\n return reset();\n };\n d3.rebind(projection, projectResample, \"precision\");\n function reset() {\n projectRotate = d3_geo_compose(rotate = d3_geo_rotation(δλ, δφ, δγ), project);\n var center = project(λ, φ);\n δx = x - center[0] * k;\n δy = y + center[1] * k;\n return invalidate();\n }\n function invalidate() {\n if (stream) stream.valid = false, stream = null;\n return projection;\n }\n return function() {\n project = projectAt.apply(this, arguments);\n projection.invert = project.invert && invert;\n return reset();\n };\n }\n function d3_geo_projectionRadians(stream) {\n return d3_geo_transformPoint(stream, function(x, y) {\n stream.point(x * d3_radians, y * d3_radians);\n });\n }\n function d3_geo_equirectangular(λ, φ) {\n return [ λ, φ ];\n }\n (d3.geo.equirectangular = function() {\n return d3_geo_projection(d3_geo_equirectangular);\n }).raw = d3_geo_equirectangular.invert = d3_geo_equirectangular;\n d3.geo.rotation = function(rotate) {\n rotate = d3_geo_rotation(rotate[0] % 360 * d3_radians, rotate[1] * d3_radians, rotate.length > 2 ? rotate[2] * d3_radians : 0);\n function forward(coordinates) {\n coordinates = rotate(coordinates[0] * d3_radians, coordinates[1] * d3_radians);\n return coordinates[0] *= d3_degrees, coordinates[1] *= d3_degrees, coordinates;\n }\n forward.invert = function(coordinates) {\n coordinates = rotate.invert(coordinates[0] * d3_radians, coordinates[1] * d3_radians);\n return coordinates[0] *= d3_degrees, coordinates[1] *= d3_degrees, coordinates;\n };\n return forward;\n };\n function d3_geo_identityRotation(λ, φ) {\n return [ λ > π ? λ - τ : λ < -π ? λ + τ : λ, φ ];\n }\n d3_geo_identityRotation.invert = d3_geo_equirectangular;\n function d3_geo_rotation(δλ, δφ, δγ) {\n return δλ ? δφ || δγ ? d3_geo_compose(d3_geo_rotationλ(δλ), d3_geo_rotationφγ(δφ, δγ)) : d3_geo_rotationλ(δλ) : δφ || δγ ? d3_geo_rotationφγ(δφ, δγ) : d3_geo_identityRotation;\n }\n function d3_geo_forwardRotationλ(δλ) {\n return function(λ, φ) {\n return λ += δλ, [ λ > π ? λ - τ : λ < -π ? λ + τ : λ, φ ];\n };\n }\n function d3_geo_rotationλ(δλ) {\n var rotation = d3_geo_forwardRotationλ(δλ);\n rotation.invert = d3_geo_forwardRotationλ(-δλ);\n return rotation;\n }\n function d3_geo_rotationφγ(δφ, δγ) {\n var cosδφ = Math.cos(δφ), sinδφ = Math.sin(δφ), cosδγ = Math.cos(δγ), sinδγ = Math.sin(δγ);\n function rotation(λ, φ) {\n var cosφ = Math.cos(φ), x = Math.cos(λ) * cosφ, y = Math.sin(λ) * cosφ, z = Math.sin(φ), k = z * cosδφ + x * sinδφ;\n return [ Math.atan2(y * cosδγ - k * sinδγ, x * cosδφ - z * sinδφ), d3_asin(k * cosδγ + y * sinδγ) ];\n }\n rotation.invert = function(λ, φ) {\n var cosφ = Math.cos(φ), x = Math.cos(λ) * cosφ, y = Math.sin(λ) * cosφ, z = Math.sin(φ), k = z * cosδγ - y * sinδγ;\n return [ Math.atan2(y * cosδγ + z * sinδγ, x * cosδφ + k * sinδφ), d3_asin(k * cosδφ - x * sinδφ) ];\n };\n return rotation;\n }\n d3.geo.circle = function() {\n var origin = [ 0, 0 ], angle, precision = 6, interpolate;\n function circle() {\n var center = typeof origin === \"function\" ? origin.apply(this, arguments) : origin, rotate = d3_geo_rotation(-center[0] * d3_radians, -center[1] * d3_radians, 0).invert, ring = [];\n interpolate(null, null, 1, {\n point: function(x, y) {\n ring.push(x = rotate(x, y));\n x[0] *= d3_degrees, x[1] *= d3_degrees;\n }\n });\n return {\n type: \"Polygon\",\n coordinates: [ ring ]\n };\n }\n circle.origin = function(x) {\n if (!arguments.length) return origin;\n origin = x;\n return circle;\n };\n circle.angle = function(x) {\n if (!arguments.length) return angle;\n interpolate = d3_geo_circleInterpolate((angle = +x) * d3_radians, precision * d3_radians);\n return circle;\n };\n circle.precision = function(_) {\n if (!arguments.length) return precision;\n interpolate = d3_geo_circleInterpolate(angle * d3_radians, (precision = +_) * d3_radians);\n return circle;\n };\n return circle.angle(90);\n };\n function d3_geo_circleInterpolate(radius, precision) {\n var cr = Math.cos(radius), sr = Math.sin(radius);\n return function(from, to, direction, listener) {\n var step = direction * precision;\n if (from != null) {\n from = d3_geo_circleAngle(cr, from);\n to = d3_geo_circleAngle(cr, to);\n if (direction > 0 ? from < to : from > to) from += direction * τ;\n } else {\n from = radius + direction * τ;\n to = radius - .5 * step;\n }\n for (var point, t = from; direction > 0 ? t > to : t < to; t -= step) {\n listener.point((point = d3_geo_spherical([ cr, -sr * Math.cos(t), -sr * Math.sin(t) ]))[0], point[1]);\n }\n };\n }\n function d3_geo_circleAngle(cr, point) {\n var a = d3_geo_cartesian(point);\n a[0] -= cr;\n d3_geo_cartesianNormalize(a);\n var angle = d3_acos(-a[1]);\n return ((-a[2] < 0 ? -angle : angle) + 2 * Math.PI - ε) % (2 * Math.PI);\n }\n d3.geo.distance = function(a, b) {\n var Δλ = (b[0] - a[0]) * d3_radians, φ0 = a[1] * d3_radians, φ1 = b[1] * d3_radians, sinΔλ = Math.sin(Δλ), cosΔλ = Math.cos(Δλ), sinφ0 = Math.sin(φ0), cosφ0 = Math.cos(φ0), sinφ1 = Math.sin(φ1), cosφ1 = Math.cos(φ1), t;\n return Math.atan2(Math.sqrt((t = cosφ1 * sinΔλ) * t + (t = cosφ0 * sinφ1 - sinφ0 * cosφ1 * cosΔλ) * t), sinφ0 * sinφ1 + cosφ0 * cosφ1 * cosΔλ);\n };\n d3.geo.graticule = function() {\n var x1, x0, X1, X0, y1, y0, Y1, Y0, dx = 10, dy = dx, DX = 90, DY = 360, x, y, X, Y, precision = 2.5;\n function graticule() {\n return {\n type: \"MultiLineString\",\n coordinates: lines()\n };\n }\n function lines() {\n return d3.range(Math.ceil(X0 / DX) * DX, X1, DX).map(X).concat(d3.range(Math.ceil(Y0 / DY) * DY, Y1, DY).map(Y)).concat(d3.range(Math.ceil(x0 / dx) * dx, x1, dx).filter(function(x) {\n return abs(x % DX) > ε;\n }).map(x)).concat(d3.range(Math.ceil(y0 / dy) * dy, y1, dy).filter(function(y) {\n return abs(y % DY) > ε;\n }).map(y));\n }\n graticule.lines = function() {\n return lines().map(function(coordinates) {\n return {\n type: \"LineString\",\n coordinates: coordinates\n };\n });\n };\n graticule.outline = function() {\n return {\n type: \"Polygon\",\n coordinates: [ X(X0).concat(Y(Y1).slice(1), X(X1).reverse().slice(1), Y(Y0).reverse().slice(1)) ]\n };\n };\n graticule.extent = function(_) {\n if (!arguments.length) return graticule.minorExtent();\n return graticule.majorExtent(_).minorExtent(_);\n };\n graticule.majorExtent = function(_) {\n if (!arguments.length) return [ [ X0, Y0 ], [ X1, Y1 ] ];\n X0 = +_[0][0], X1 = +_[1][0];\n Y0 = +_[0][1], Y1 = +_[1][1];\n if (X0 > X1) _ = X0, X0 = X1, X1 = _;\n if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _;\n return graticule.precision(precision);\n };\n graticule.minorExtent = function(_) {\n if (!arguments.length) return [ [ x0, y0 ], [ x1, y1 ] ];\n x0 = +_[0][0], x1 = +_[1][0];\n y0 = +_[0][1], y1 = +_[1][1];\n if (x0 > x1) _ = x0, x0 = x1, x1 = _;\n if (y0 > y1) _ = y0, y0 = y1, y1 = _;\n return graticule.precision(precision);\n };\n graticule.step = function(_) {\n if (!arguments.length) return graticule.minorStep();\n return graticule.majorStep(_).minorStep(_);\n };\n graticule.majorStep = function(_) {\n if (!arguments.length) return [ DX, DY ];\n DX = +_[0], DY = +_[1];\n return graticule;\n };\n graticule.minorStep = function(_) {\n if (!arguments.length) return [ dx, dy ];\n dx = +_[0], dy = +_[1];\n return graticule;\n };\n graticule.precision = function(_) {\n if (!arguments.length) return precision;\n precision = +_;\n x = d3_geo_graticuleX(y0, y1, 90);\n y = d3_geo_graticuleY(x0, x1, precision);\n X = d3_geo_graticuleX(Y0, Y1, 90);\n Y = d3_geo_graticuleY(X0, X1, precision);\n return graticule;\n };\n return graticule.majorExtent([ [ -180, -90 + ε ], [ 180, 90 - ε ] ]).minorExtent([ [ -180, -80 - ε ], [ 180, 80 + ε ] ]);\n };\n function d3_geo_graticuleX(y0, y1, dy) {\n var y = d3.range(y0, y1 - ε, dy).concat(y1);\n return function(x) {\n return y.map(function(y) {\n return [ x, y ];\n });\n };\n }\n function d3_geo_graticuleY(x0, x1, dx) {\n var x = d3.range(x0, x1 - ε, dx).concat(x1);\n return function(y) {\n return x.map(function(x) {\n return [ x, y ];\n });\n };\n }\n function d3_source(d) {\n return d.source;\n }\n function d3_target(d) {\n return d.target;\n }\n d3.geo.greatArc = function() {\n var source = d3_source, source_, target = d3_target, target_;\n function greatArc() {\n return {\n type: \"LineString\",\n coordinates: [ source_ || source.apply(this, arguments), target_ || target.apply(this, arguments) ]\n };\n }\n greatArc.distance = function() {\n return d3.geo.distance(source_ || source.apply(this, arguments), target_ || target.apply(this, arguments));\n };\n greatArc.source = function(_) {\n if (!arguments.length) return source;\n source = _, source_ = typeof _ === \"function\" ? null : _;\n return greatArc;\n };\n greatArc.target = function(_) {\n if (!arguments.length) return target;\n target = _, target_ = typeof _ === \"function\" ? null : _;\n return greatArc;\n };\n greatArc.precision = function() {\n return arguments.length ? greatArc : 0;\n };\n return greatArc;\n };\n d3.geo.interpolate = function(source, target) {\n return d3_geo_interpolate(source[0] * d3_radians, source[1] * d3_radians, target[0] * d3_radians, target[1] * d3_radians);\n };\n function d3_geo_interpolate(x0, y0, x1, y1) {\n var cy0 = Math.cos(y0), sy0 = Math.sin(y0), cy1 = Math.cos(y1), sy1 = Math.sin(y1), kx0 = cy0 * Math.cos(x0), ky0 = cy0 * Math.sin(x0), kx1 = cy1 * Math.cos(x1), ky1 = cy1 * Math.sin(x1), d = 2 * Math.asin(Math.sqrt(d3_haversin(y1 - y0) + cy0 * cy1 * d3_haversin(x1 - x0))), k = 1 / Math.sin(d);\n var interpolate = d ? function(t) {\n var B = Math.sin(t *= d) * k, A = Math.sin(d - t) * k, x = A * kx0 + B * kx1, y = A * ky0 + B * ky1, z = A * sy0 + B * sy1;\n return [ Math.atan2(y, x) * d3_degrees, Math.atan2(z, Math.sqrt(x * x + y * y)) * d3_degrees ];\n } : function() {\n return [ x0 * d3_degrees, y0 * d3_degrees ];\n };\n interpolate.distance = d;\n return interpolate;\n }\n d3.geo.length = function(object) {\n d3_geo_lengthSum = 0;\n d3.geo.stream(object, d3_geo_length);\n return d3_geo_lengthSum;\n };\n var d3_geo_lengthSum;\n var d3_geo_length = {\n sphere: d3_noop,\n point: d3_noop,\n lineStart: d3_geo_lengthLineStart,\n lineEnd: d3_noop,\n polygonStart: d3_noop,\n polygonEnd: d3_noop\n };\n function d3_geo_lengthLineStart() {\n var λ0, sinφ0, cosφ0;\n d3_geo_length.point = function(λ, φ) {\n λ0 = λ * d3_radians, sinφ0 = Math.sin(φ *= d3_radians), cosφ0 = Math.cos(φ);\n d3_geo_length.point = nextPoint;\n };\n d3_geo_length.lineEnd = function() {\n d3_geo_length.point = d3_geo_length.lineEnd = d3_noop;\n };\n function nextPoint(λ, φ) {\n var sinφ = Math.sin(φ *= d3_radians), cosφ = Math.cos(φ), t = abs((λ *= d3_radians) - λ0), cosΔλ = Math.cos(t);\n d3_geo_lengthSum += Math.atan2(Math.sqrt((t = cosφ * Math.sin(t)) * t + (t = cosφ0 * sinφ - sinφ0 * cosφ * cosΔλ) * t), sinφ0 * sinφ + cosφ0 * cosφ * cosΔλ);\n λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ;\n }\n }\n function d3_geo_azimuthal(scale, angle) {\n function azimuthal(λ, φ) {\n var cosλ = Math.cos(λ), cosφ = Math.cos(φ), k = scale(cosλ * cosφ);\n return [ k * cosφ * Math.sin(λ), k * Math.sin(φ) ];\n }\n azimuthal.invert = function(x, y) {\n var ρ = Math.sqrt(x * x + y * y), c = angle(ρ), sinc = Math.sin(c), cosc = Math.cos(c);\n return [ Math.atan2(x * sinc, ρ * cosc), Math.asin(ρ && y * sinc / ρ) ];\n };\n return azimuthal;\n }\n var d3_geo_azimuthalEqualArea = d3_geo_azimuthal(function(cosλcosφ) {\n return Math.sqrt(2 / (1 + cosλcosφ));\n }, function(ρ) {\n return 2 * Math.asin(ρ / 2);\n });\n (d3.geo.azimuthalEqualArea = function() {\n return d3_geo_projection(d3_geo_azimuthalEqualArea);\n }).raw = d3_geo_azimuthalEqualArea;\n var d3_geo_azimuthalEquidistant = d3_geo_azimuthal(function(cosλcosφ) {\n var c = Math.acos(cosλcosφ);\n return c && c / Math.sin(c);\n }, d3_identity);\n (d3.geo.azimuthalEquidistant = function() {\n return d3_geo_projection(d3_geo_azimuthalEquidistant);\n }).raw = d3_geo_azimuthalEquidistant;\n function d3_geo_conicConformal(φ0, φ1) {\n var cosφ0 = Math.cos(φ0), t = function(φ) {\n return Math.tan(π / 4 + φ / 2);\n }, n = φ0 === φ1 ? Math.sin(φ0) : Math.log(cosφ0 / Math.cos(φ1)) / Math.log(t(φ1) / t(φ0)), F = cosφ0 * Math.pow(t(φ0), n) / n;\n if (!n) return d3_geo_mercator;\n function forward(λ, φ) {\n if (F > 0) {\n if (φ < -halfπ + ε) φ = -halfπ + ε;\n } else {\n if (φ > halfπ - ε) φ = halfπ - ε;\n }\n var ρ = F / Math.pow(t(φ), n);\n return [ ρ * Math.sin(n * λ), F - ρ * Math.cos(n * λ) ];\n }\n forward.invert = function(x, y) {\n var ρ0_y = F - y, ρ = d3_sgn(n) * Math.sqrt(x * x + ρ0_y * ρ0_y);\n return [ Math.atan2(x, ρ0_y) / n, 2 * Math.atan(Math.pow(F / ρ, 1 / n)) - halfπ ];\n };\n return forward;\n }\n (d3.geo.conicConformal = function() {\n return d3_geo_conic(d3_geo_conicConformal);\n }).raw = d3_geo_conicConformal;\n function d3_geo_conicEquidistant(φ0, φ1) {\n var cosφ0 = Math.cos(φ0), n = φ0 === φ1 ? Math.sin(φ0) : (cosφ0 - Math.cos(φ1)) / (φ1 - φ0), G = cosφ0 / n + φ0;\n if (abs(n) < ε) return d3_geo_equirectangular;\n function forward(λ, φ) {\n var ρ = G - φ;\n return [ ρ * Math.sin(n * λ), G - ρ * Math.cos(n * λ) ];\n }\n forward.invert = function(x, y) {\n var ρ0_y = G - y;\n return [ Math.atan2(x, ρ0_y) / n, G - d3_sgn(n) * Math.sqrt(x * x + ρ0_y * ρ0_y) ];\n };\n return forward;\n }\n (d3.geo.conicEquidistant = function() {\n return d3_geo_conic(d3_geo_conicEquidistant);\n }).raw = d3_geo_conicEquidistant;\n var d3_geo_gnomonic = d3_geo_azimuthal(function(cosλcosφ) {\n return 1 / cosλcosφ;\n }, Math.atan);\n (d3.geo.gnomonic = function() {\n return d3_geo_projection(d3_geo_gnomonic);\n }).raw = d3_geo_gnomonic;\n function d3_geo_mercator(λ, φ) {\n return [ λ, Math.log(Math.tan(π / 4 + φ / 2)) ];\n }\n d3_geo_mercator.invert = function(x, y) {\n return [ x, 2 * Math.atan(Math.exp(y)) - halfπ ];\n };\n function d3_geo_mercatorProjection(project) {\n var m = d3_geo_projection(project), scale = m.scale, translate = m.translate, clipExtent = m.clipExtent, clipAuto;\n m.scale = function() {\n var v = scale.apply(m, arguments);\n return v === m ? clipAuto ? m.clipExtent(null) : m : v;\n };\n m.translate = function() {\n var v = translate.apply(m, arguments);\n return v === m ? clipAuto ? m.clipExtent(null) : m : v;\n };\n m.clipExtent = function(_) {\n var v = clipExtent.apply(m, arguments);\n if (v === m) {\n if (clipAuto = _ == null) {\n var k = π * scale(), t = translate();\n clipExtent([ [ t[0] - k, t[1] - k ], [ t[0] + k, t[1] + k ] ]);\n }\n } else if (clipAuto) {\n v = null;\n }\n return v;\n };\n return m.clipExtent(null);\n }\n (d3.geo.mercator = function() {\n return d3_geo_mercatorProjection(d3_geo_mercator);\n }).raw = d3_geo_mercator;\n var d3_geo_orthographic = d3_geo_azimuthal(function() {\n return 1;\n }, Math.asin);\n (d3.geo.orthographic = function() {\n return d3_geo_projection(d3_geo_orthographic);\n }).raw = d3_geo_orthographic;\n var d3_geo_stereographic = d3_geo_azimuthal(function(cosλcosφ) {\n return 1 / (1 + cosλcosφ);\n }, function(ρ) {\n return 2 * Math.atan(ρ);\n });\n (d3.geo.stereographic = function() {\n return d3_geo_projection(d3_geo_stereographic);\n }).raw = d3_geo_stereographic;\n function d3_geo_transverseMercator(λ, φ) {\n return [ Math.log(Math.tan(π / 4 + φ / 2)), -λ ];\n }\n d3_geo_transverseMercator.invert = function(x, y) {\n return [ -y, 2 * Math.atan(Math.exp(x)) - halfπ ];\n };\n (d3.geo.transverseMercator = function() {\n var projection = d3_geo_mercatorProjection(d3_geo_transverseMercator), center = projection.center, rotate = projection.rotate;\n projection.center = function(_) {\n return _ ? center([ -_[1], _[0] ]) : (_ = center(), [ _[1], -_[0] ]);\n };\n projection.rotate = function(_) {\n return _ ? rotate([ _[0], _[1], _.length > 2 ? _[2] + 90 : 90 ]) : (_ = rotate(), \n [ _[0], _[1], _[2] - 90 ]);\n };\n return rotate([ 0, 0, 90 ]);\n }).raw = d3_geo_transverseMercator;\n d3.geom = {};\n function d3_geom_pointX(d) {\n return d[0];\n }\n function d3_geom_pointY(d) {\n return d[1];\n }\n d3.geom.hull = function(vertices) {\n var x = d3_geom_pointX, y = d3_geom_pointY;\n if (arguments.length) return hull(vertices);\n function hull(data) {\n if (data.length < 3) return [];\n var fx = d3_functor(x), fy = d3_functor(y), i, n = data.length, points = [], flippedPoints = [];\n for (i = 0; i < n; i++) {\n points.push([ +fx.call(this, data[i], i), +fy.call(this, data[i], i), i ]);\n }\n points.sort(d3_geom_hullOrder);\n for (i = 0; i < n; i++) flippedPoints.push([ points[i][0], -points[i][1] ]);\n var upper = d3_geom_hullUpper(points), lower = d3_geom_hullUpper(flippedPoints);\n var skipLeft = lower[0] === upper[0], skipRight = lower[lower.length - 1] === upper[upper.length - 1], polygon = [];\n for (i = upper.length - 1; i >= 0; --i) polygon.push(data[points[upper[i]][2]]);\n for (i = +skipLeft; i < lower.length - skipRight; ++i) polygon.push(data[points[lower[i]][2]]);\n return polygon;\n }\n hull.x = function(_) {\n return arguments.length ? (x = _, hull) : x;\n };\n hull.y = function(_) {\n return arguments.length ? (y = _, hull) : y;\n };\n return hull;\n };\n function d3_geom_hullUpper(points) {\n var n = points.length, hull = [ 0, 1 ], hs = 2;\n for (var i = 2; i < n; i++) {\n while (hs > 1 && d3_cross2d(points[hull[hs - 2]], points[hull[hs - 1]], points[i]) <= 0) --hs;\n hull[hs++] = i;\n }\n return hull.slice(0, hs);\n }\n function d3_geom_hullOrder(a, b) {\n return a[0] - b[0] || a[1] - b[1];\n }\n d3.geom.polygon = function(coordinates) {\n d3_subclass(coordinates, d3_geom_polygonPrototype);\n return coordinates;\n };\n var d3_geom_polygonPrototype = d3.geom.polygon.prototype = [];\n d3_geom_polygonPrototype.area = function() {\n var i = -1, n = this.length, a, b = this[n - 1], area = 0;\n while (++i < n) {\n a = b;\n b = this[i];\n area += a[1] * b[0] - a[0] * b[1];\n }\n return area * .5;\n };\n d3_geom_polygonPrototype.centroid = function(k) {\n var i = -1, n = this.length, x = 0, y = 0, a, b = this[n - 1], c;\n if (!arguments.length) k = -1 / (6 * this.area());\n while (++i < n) {\n a = b;\n b = this[i];\n c = a[0] * b[1] - b[0] * a[1];\n x += (a[0] + b[0]) * c;\n y += (a[1] + b[1]) * c;\n }\n return [ x * k, y * k ];\n };\n d3_geom_polygonPrototype.clip = function(subject) {\n var input, closed = d3_geom_polygonClosed(subject), i = -1, n = this.length - d3_geom_polygonClosed(this), j, m, a = this[n - 1], b, c, d;\n while (++i < n) {\n input = subject.slice();\n subject.length = 0;\n b = this[i];\n c = input[(m = input.length - closed) - 1];\n j = -1;\n while (++j < m) {\n d = input[j];\n if (d3_geom_polygonInside(d, a, b)) {\n if (!d3_geom_polygonInside(c, a, b)) {\n subject.push(d3_geom_polygonIntersect(c, d, a, b));\n }\n subject.push(d);\n } else if (d3_geom_polygonInside(c, a, b)) {\n subject.push(d3_geom_polygonIntersect(c, d, a, b));\n }\n c = d;\n }\n if (closed) subject.push(subject[0]);\n a = b;\n }\n return subject;\n };\n function d3_geom_polygonInside(p, a, b) {\n return (b[0] - a[0]) * (p[1] - a[1]) < (b[1] - a[1]) * (p[0] - a[0]);\n }\n function d3_geom_polygonIntersect(c, d, a, b) {\n var x1 = c[0], x3 = a[0], x21 = d[0] - x1, x43 = b[0] - x3, y1 = c[1], y3 = a[1], y21 = d[1] - y1, y43 = b[1] - y3, ua = (x43 * (y1 - y3) - y43 * (x1 - x3)) / (y43 * x21 - x43 * y21);\n return [ x1 + ua * x21, y1 + ua * y21 ];\n }\n function d3_geom_polygonClosed(coordinates) {\n var a = coordinates[0], b = coordinates[coordinates.length - 1];\n return !(a[0] - b[0] || a[1] - b[1]);\n }\n var d3_geom_voronoiEdges, d3_geom_voronoiCells, d3_geom_voronoiBeaches, d3_geom_voronoiBeachPool = [], d3_geom_voronoiFirstCircle, d3_geom_voronoiCircles, d3_geom_voronoiCirclePool = [];\n function d3_geom_voronoiBeach() {\n d3_geom_voronoiRedBlackNode(this);\n this.edge = this.site = this.circle = null;\n }\n function d3_geom_voronoiCreateBeach(site) {\n var beach = d3_geom_voronoiBeachPool.pop() || new d3_geom_voronoiBeach();\n beach.site = site;\n return beach;\n }\n function d3_geom_voronoiDetachBeach(beach) {\n d3_geom_voronoiDetachCircle(beach);\n d3_geom_voronoiBeaches.remove(beach);\n d3_geom_voronoiBeachPool.push(beach);\n d3_geom_voronoiRedBlackNode(beach);\n }\n function d3_geom_voronoiRemoveBeach(beach) {\n var circle = beach.circle, x = circle.x, y = circle.cy, vertex = {\n x: x,\n y: y\n }, previous = beach.P, next = beach.N, disappearing = [ beach ];\n d3_geom_voronoiDetachBeach(beach);\n var lArc = previous;\n while (lArc.circle && abs(x - lArc.circle.x) < ε && abs(y - lArc.circle.cy) < ε) {\n previous = lArc.P;\n disappearing.unshift(lArc);\n d3_geom_voronoiDetachBeach(lArc);\n lArc = previous;\n }\n disappearing.unshift(lArc);\n d3_geom_voronoiDetachCircle(lArc);\n var rArc = next;\n while (rArc.circle && abs(x - rArc.circle.x) < ε && abs(y - rArc.circle.cy) < ε) {\n next = rArc.N;\n disappearing.push(rArc);\n d3_geom_voronoiDetachBeach(rArc);\n rArc = next;\n }\n disappearing.push(rArc);\n d3_geom_voronoiDetachCircle(rArc);\n var nArcs = disappearing.length, iArc;\n for (iArc = 1; iArc < nArcs; ++iArc) {\n rArc = disappearing[iArc];\n lArc = disappearing[iArc - 1];\n d3_geom_voronoiSetEdgeEnd(rArc.edge, lArc.site, rArc.site, vertex);\n }\n lArc = disappearing[0];\n rArc = disappearing[nArcs - 1];\n rArc.edge = d3_geom_voronoiCreateEdge(lArc.site, rArc.site, null, vertex);\n d3_geom_voronoiAttachCircle(lArc);\n d3_geom_voronoiAttachCircle(rArc);\n }\n function d3_geom_voronoiAddBeach(site) {\n var x = site.x, directrix = site.y, lArc, rArc, dxl, dxr, node = d3_geom_voronoiBeaches._;\n while (node) {\n dxl = d3_geom_voronoiLeftBreakPoint(node, directrix) - x;\n if (dxl > ε) node = node.L; else {\n dxr = x - d3_geom_voronoiRightBreakPoint(node, directrix);\n if (dxr > ε) {\n if (!node.R) {\n lArc = node;\n break;\n }\n node = node.R;\n } else {\n if (dxl > -ε) {\n lArc = node.P;\n rArc = node;\n } else if (dxr > -ε) {\n lArc = node;\n rArc = node.N;\n } else {\n lArc = rArc = node;\n }\n break;\n }\n }\n }\n var newArc = d3_geom_voronoiCreateBeach(site);\n d3_geom_voronoiBeaches.insert(lArc, newArc);\n if (!lArc && !rArc) return;\n if (lArc === rArc) {\n d3_geom_voronoiDetachCircle(lArc);\n rArc = d3_geom_voronoiCreateBeach(lArc.site);\n d3_geom_voronoiBeaches.insert(newArc, rArc);\n newArc.edge = rArc.edge = d3_geom_voronoiCreateEdge(lArc.site, newArc.site);\n d3_geom_voronoiAttachCircle(lArc);\n d3_geom_voronoiAttachCircle(rArc);\n return;\n }\n if (!rArc) {\n newArc.edge = d3_geom_voronoiCreateEdge(lArc.site, newArc.site);\n return;\n }\n d3_geom_voronoiDetachCircle(lArc);\n d3_geom_voronoiDetachCircle(rArc);\n var lSite = lArc.site, ax = lSite.x, ay = lSite.y, bx = site.x - ax, by = site.y - ay, rSite = rArc.site, cx = rSite.x - ax, cy = rSite.y - ay, d = 2 * (bx * cy - by * cx), hb = bx * bx + by * by, hc = cx * cx + cy * cy, vertex = {\n x: (cy * hb - by * hc) / d + ax,\n y: (bx * hc - cx * hb) / d + ay\n };\n d3_geom_voronoiSetEdgeEnd(rArc.edge, lSite, rSite, vertex);\n newArc.edge = d3_geom_voronoiCreateEdge(lSite, site, null, vertex);\n rArc.edge = d3_geom_voronoiCreateEdge(site, rSite, null, vertex);\n d3_geom_voronoiAttachCircle(lArc);\n d3_geom_voronoiAttachCircle(rArc);\n }\n function d3_geom_voronoiLeftBreakPoint(arc, directrix) {\n var site = arc.site, rfocx = site.x, rfocy = site.y, pby2 = rfocy - directrix;\n if (!pby2) return rfocx;\n var lArc = arc.P;\n if (!lArc) return -Infinity;\n site = lArc.site;\n var lfocx = site.x, lfocy = site.y, plby2 = lfocy - directrix;\n if (!plby2) return lfocx;\n var hl = lfocx - rfocx, aby2 = 1 / pby2 - 1 / plby2, b = hl / plby2;\n if (aby2) return (-b + Math.sqrt(b * b - 2 * aby2 * (hl * hl / (-2 * plby2) - lfocy + plby2 / 2 + rfocy - pby2 / 2))) / aby2 + rfocx;\n return (rfocx + lfocx) / 2;\n }\n function d3_geom_voronoiRightBreakPoint(arc, directrix) {\n var rArc = arc.N;\n if (rArc) return d3_geom_voronoiLeftBreakPoint(rArc, directrix);\n var site = arc.site;\n return site.y === directrix ? site.x : Infinity;\n }\n function d3_geom_voronoiCell(site) {\n this.site = site;\n this.edges = [];\n }\n d3_geom_voronoiCell.prototype.prepare = function() {\n var halfEdges = this.edges, iHalfEdge = halfEdges.length, edge;\n while (iHalfEdge--) {\n edge = halfEdges[iHalfEdge].edge;\n if (!edge.b || !edge.a) halfEdges.splice(iHalfEdge, 1);\n }\n halfEdges.sort(d3_geom_voronoiHalfEdgeOrder);\n return halfEdges.length;\n };\n function d3_geom_voronoiCloseCells(extent) {\n var x0 = extent[0][0], x1 = extent[1][0], y0 = extent[0][1], y1 = extent[1][1], x2, y2, x3, y3, cells = d3_geom_voronoiCells, iCell = cells.length, cell, iHalfEdge, halfEdges, nHalfEdges, start, end;\n while (iCell--) {\n cell = cells[iCell];\n if (!cell || !cell.prepare()) continue;\n halfEdges = cell.edges;\n nHalfEdges = halfEdges.length;\n iHalfEdge = 0;\n while (iHalfEdge < nHalfEdges) {\n end = halfEdges[iHalfEdge].end(), x3 = end.x, y3 = end.y;\n start = halfEdges[++iHalfEdge % nHalfEdges].start(), x2 = start.x, y2 = start.y;\n if (abs(x3 - x2) > ε || abs(y3 - y2) > ε) {\n halfEdges.splice(iHalfEdge, 0, new d3_geom_voronoiHalfEdge(d3_geom_voronoiCreateBorderEdge(cell.site, end, abs(x3 - x0) < ε && y1 - y3 > ε ? {\n x: x0,\n y: abs(x2 - x0) < ε ? y2 : y1\n } : abs(y3 - y1) < ε && x1 - x3 > ε ? {\n x: abs(y2 - y1) < ε ? x2 : x1,\n y: y1\n } : abs(x3 - x1) < ε && y3 - y0 > ε ? {\n x: x1,\n y: abs(x2 - x1) < ε ? y2 : y0\n } : abs(y3 - y0) < ε && x3 - x0 > ε ? {\n x: abs(y2 - y0) < ε ? x2 : x0,\n y: y0\n } : null), cell.site, null));\n ++nHalfEdges;\n }\n }\n }\n }\n function d3_geom_voronoiHalfEdgeOrder(a, b) {\n return b.angle - a.angle;\n }\n function d3_geom_voronoiCircle() {\n d3_geom_voronoiRedBlackNode(this);\n this.x = this.y = this.arc = this.site = this.cy = null;\n }\n function d3_geom_voronoiAttachCircle(arc) {\n var lArc = arc.P, rArc = arc.N;\n if (!lArc || !rArc) return;\n var lSite = lArc.site, cSite = arc.site, rSite = rArc.site;\n if (lSite === rSite) return;\n var bx = cSite.x, by = cSite.y, ax = lSite.x - bx, ay = lSite.y - by, cx = rSite.x - bx, cy = rSite.y - by;\n var d = 2 * (ax * cy - ay * cx);\n if (d >= -ε2) return;\n var ha = ax * ax + ay * ay, hc = cx * cx + cy * cy, x = (cy * ha - ay * hc) / d, y = (ax * hc - cx * ha) / d, cy = y + by;\n var circle = d3_geom_voronoiCirclePool.pop() || new d3_geom_voronoiCircle();\n circle.arc = arc;\n circle.site = cSite;\n circle.x = x + bx;\n circle.y = cy + Math.sqrt(x * x + y * y);\n circle.cy = cy;\n arc.circle = circle;\n var before = null, node = d3_geom_voronoiCircles._;\n while (node) {\n if (circle.y < node.y || circle.y === node.y && circle.x <= node.x) {\n if (node.L) node = node.L; else {\n before = node.P;\n break;\n }\n } else {\n if (node.R) node = node.R; else {\n before = node;\n break;\n }\n }\n }\n d3_geom_voronoiCircles.insert(before, circle);\n if (!before) d3_geom_voronoiFirstCircle = circle;\n }\n function d3_geom_voronoiDetachCircle(arc) {\n var circle = arc.circle;\n if (circle) {\n if (!circle.P) d3_geom_voronoiFirstCircle = circle.N;\n d3_geom_voronoiCircles.remove(circle);\n d3_geom_voronoiCirclePool.push(circle);\n d3_geom_voronoiRedBlackNode(circle);\n arc.circle = null;\n }\n }\n function d3_geom_voronoiClipEdges(extent) {\n var edges = d3_geom_voronoiEdges, clip = d3_geom_clipLine(extent[0][0], extent[0][1], extent[1][0], extent[1][1]), i = edges.length, e;\n while (i--) {\n e = edges[i];\n if (!d3_geom_voronoiConnectEdge(e, extent) || !clip(e) || abs(e.a.x - e.b.x) < ε && abs(e.a.y - e.b.y) < ε) {\n e.a = e.b = null;\n edges.splice(i, 1);\n }\n }\n }\n function d3_geom_voronoiConnectEdge(edge, extent) {\n var vb = edge.b;\n if (vb) return true;\n var va = edge.a, x0 = extent[0][0], x1 = extent[1][0], y0 = extent[0][1], y1 = extent[1][1], lSite = edge.l, rSite = edge.r, lx = lSite.x, ly = lSite.y, rx = rSite.x, ry = rSite.y, fx = (lx + rx) / 2, fy = (ly + ry) / 2, fm, fb;\n if (ry === ly) {\n if (fx < x0 || fx >= x1) return;\n if (lx > rx) {\n if (!va) va = {\n x: fx,\n y: y0\n }; else if (va.y >= y1) return;\n vb = {\n x: fx,\n y: y1\n };\n } else {\n if (!va) va = {\n x: fx,\n y: y1\n }; else if (va.y < y0) return;\n vb = {\n x: fx,\n y: y0\n };\n }\n } else {\n fm = (lx - rx) / (ry - ly);\n fb = fy - fm * fx;\n if (fm < -1 || fm > 1) {\n if (lx > rx) {\n if (!va) va = {\n x: (y0 - fb) / fm,\n y: y0\n }; else if (va.y >= y1) return;\n vb = {\n x: (y1 - fb) / fm,\n y: y1\n };\n } else {\n if (!va) va = {\n x: (y1 - fb) / fm,\n y: y1\n }; else if (va.y < y0) return;\n vb = {\n x: (y0 - fb) / fm,\n y: y0\n };\n }\n } else {\n if (ly < ry) {\n if (!va) va = {\n x: x0,\n y: fm * x0 + fb\n }; else if (va.x >= x1) return;\n vb = {\n x: x1,\n y: fm * x1 + fb\n };\n } else {\n if (!va) va = {\n x: x1,\n y: fm * x1 + fb\n }; else if (va.x < x0) return;\n vb = {\n x: x0,\n y: fm * x0 + fb\n };\n }\n }\n }\n edge.a = va;\n edge.b = vb;\n return true;\n }\n function d3_geom_voronoiEdge(lSite, rSite) {\n this.l = lSite;\n this.r = rSite;\n this.a = this.b = null;\n }\n function d3_geom_voronoiCreateEdge(lSite, rSite, va, vb) {\n var edge = new d3_geom_voronoiEdge(lSite, rSite);\n d3_geom_voronoiEdges.push(edge);\n if (va) d3_geom_voronoiSetEdgeEnd(edge, lSite, rSite, va);\n if (vb) d3_geom_voronoiSetEdgeEnd(edge, rSite, lSite, vb);\n d3_geom_voronoiCells[lSite.i].edges.push(new d3_geom_voronoiHalfEdge(edge, lSite, rSite));\n d3_geom_voronoiCells[rSite.i].edges.push(new d3_geom_voronoiHalfEdge(edge, rSite, lSite));\n return edge;\n }\n function d3_geom_voronoiCreateBorderEdge(lSite, va, vb) {\n var edge = new d3_geom_voronoiEdge(lSite, null);\n edge.a = va;\n edge.b = vb;\n d3_geom_voronoiEdges.push(edge);\n return edge;\n }\n function d3_geom_voronoiSetEdgeEnd(edge, lSite, rSite, vertex) {\n if (!edge.a && !edge.b) {\n edge.a = vertex;\n edge.l = lSite;\n edge.r = rSite;\n } else if (edge.l === rSite) {\n edge.b = vertex;\n } else {\n edge.a = vertex;\n }\n }\n function d3_geom_voronoiHalfEdge(edge, lSite, rSite) {\n var va = edge.a, vb = edge.b;\n this.edge = edge;\n this.site = lSite;\n this.angle = rSite ? Math.atan2(rSite.y - lSite.y, rSite.x - lSite.x) : edge.l === lSite ? Math.atan2(vb.x - va.x, va.y - vb.y) : Math.atan2(va.x - vb.x, vb.y - va.y);\n }\n d3_geom_voronoiHalfEdge.prototype = {\n start: function() {\n return this.edge.l === this.site ? this.edge.a : this.edge.b;\n },\n end: function() {\n return this.edge.l === this.site ? this.edge.b : this.edge.a;\n }\n };\n function d3_geom_voronoiRedBlackTree() {\n this._ = null;\n }\n function d3_geom_voronoiRedBlackNode(node) {\n node.U = node.C = node.L = node.R = node.P = node.N = null;\n }\n d3_geom_voronoiRedBlackTree.prototype = {\n insert: function(after, node) {\n var parent, grandpa, uncle;\n if (after) {\n node.P = after;\n node.N = after.N;\n if (after.N) after.N.P = node;\n after.N = node;\n if (after.R) {\n after = after.R;\n while (after.L) after = after.L;\n after.L = node;\n } else {\n after.R = node;\n }\n parent = after;\n } else if (this._) {\n after = d3_geom_voronoiRedBlackFirst(this._);\n node.P = null;\n node.N = after;\n after.P = after.L = node;\n parent = after;\n } else {\n node.P = node.N = null;\n this._ = node;\n parent = null;\n }\n node.L = node.R = null;\n node.U = parent;\n node.C = true;\n after = node;\n while (parent && parent.C) {\n grandpa = parent.U;\n if (parent === grandpa.L) {\n uncle = grandpa.R;\n if (uncle && uncle.C) {\n parent.C = uncle.C = false;\n grandpa.C = true;\n after = grandpa;\n } else {\n if (after === parent.R) {\n d3_geom_voronoiRedBlackRotateLeft(this, parent);\n after = parent;\n parent = after.U;\n }\n parent.C = false;\n grandpa.C = true;\n d3_geom_voronoiRedBlackRotateRight(this, grandpa);\n }\n } else {\n uncle = grandpa.L;\n if (uncle && uncle.C) {\n parent.C = uncle.C = false;\n grandpa.C = true;\n after = grandpa;\n } else {\n if (after === parent.L) {\n d3_geom_voronoiRedBlackRotateRight(this, parent);\n after = parent;\n parent = after.U;\n }\n parent.C = false;\n grandpa.C = true;\n d3_geom_voronoiRedBlackRotateLeft(this, grandpa);\n }\n }\n parent = after.U;\n }\n this._.C = false;\n },\n remove: function(node) {\n if (node.N) node.N.P = node.P;\n if (node.P) node.P.N = node.N;\n node.N = node.P = null;\n var parent = node.U, sibling, left = node.L, right = node.R, next, red;\n if (!left) next = right; else if (!right) next = left; else next = d3_geom_voronoiRedBlackFirst(right);\n if (parent) {\n if (parent.L === node) parent.L = next; else parent.R = next;\n } else {\n this._ = next;\n }\n if (left && right) {\n red = next.C;\n next.C = node.C;\n next.L = left;\n left.U = next;\n if (next !== right) {\n parent = next.U;\n next.U = node.U;\n node = next.R;\n parent.L = node;\n next.R = right;\n right.U = next;\n } else {\n next.U = parent;\n parent = next;\n node = next.R;\n }\n } else {\n red = node.C;\n node = next;\n }\n if (node) node.U = parent;\n if (red) return;\n if (node && node.C) {\n node.C = false;\n return;\n }\n do {\n if (node === this._) break;\n if (node === parent.L) {\n sibling = parent.R;\n if (sibling.C) {\n sibling.C = false;\n parent.C = true;\n d3_geom_voronoiRedBlackRotateLeft(this, parent);\n sibling = parent.R;\n }\n if (sibling.L && sibling.L.C || sibling.R && sibling.R.C) {\n if (!sibling.R || !sibling.R.C) {\n sibling.L.C = false;\n sibling.C = true;\n d3_geom_voronoiRedBlackRotateRight(this, sibling);\n sibling = parent.R;\n }\n sibling.C = parent.C;\n parent.C = sibling.R.C = false;\n d3_geom_voronoiRedBlackRotateLeft(this, parent);\n node = this._;\n break;\n }\n } else {\n sibling = parent.L;\n if (sibling.C) {\n sibling.C = false;\n parent.C = true;\n d3_geom_voronoiRedBlackRotateRight(this, parent);\n sibling = parent.L;\n }\n if (sibling.L && sibling.L.C || sibling.R && sibling.R.C) {\n if (!sibling.L || !sibling.L.C) {\n sibling.R.C = false;\n sibling.C = true;\n d3_geom_voronoiRedBlackRotateLeft(this, sibling);\n sibling = parent.L;\n }\n sibling.C = parent.C;\n parent.C = sibling.L.C = false;\n d3_geom_voronoiRedBlackRotateRight(this, parent);\n node = this._;\n break;\n }\n }\n sibling.C = true;\n node = parent;\n parent = parent.U;\n } while (!node.C);\n if (node) node.C = false;\n }\n };\n function d3_geom_voronoiRedBlackRotateLeft(tree, node) {\n var p = node, q = node.R, parent = p.U;\n if (parent) {\n if (parent.L === p) parent.L = q; else parent.R = q;\n } else {\n tree._ = q;\n }\n q.U = parent;\n p.U = q;\n p.R = q.L;\n if (p.R) p.R.U = p;\n q.L = p;\n }\n function d3_geom_voronoiRedBlackRotateRight(tree, node) {\n var p = node, q = node.L, parent = p.U;\n if (parent) {\n if (parent.L === p) parent.L = q; else parent.R = q;\n } else {\n tree._ = q;\n }\n q.U = parent;\n p.U = q;\n p.L = q.R;\n if (p.L) p.L.U = p;\n q.R = p;\n }\n function d3_geom_voronoiRedBlackFirst(node) {\n while (node.L) node = node.L;\n return node;\n }\n function d3_geom_voronoi(sites, bbox) {\n var site = sites.sort(d3_geom_voronoiVertexOrder).pop(), x0, y0, circle;\n d3_geom_voronoiEdges = [];\n d3_geom_voronoiCells = new Array(sites.length);\n d3_geom_voronoiBeaches = new d3_geom_voronoiRedBlackTree();\n d3_geom_voronoiCircles = new d3_geom_voronoiRedBlackTree();\n while (true) {\n circle = d3_geom_voronoiFirstCircle;\n if (site && (!circle || site.y < circle.y || site.y === circle.y && site.x < circle.x)) {\n if (site.x !== x0 || site.y !== y0) {\n d3_geom_voronoiCells[site.i] = new d3_geom_voronoiCell(site);\n d3_geom_voronoiAddBeach(site);\n x0 = site.x, y0 = site.y;\n }\n site = sites.pop();\n } else if (circle) {\n d3_geom_voronoiRemoveBeach(circle.arc);\n } else {\n break;\n }\n }\n if (bbox) d3_geom_voronoiClipEdges(bbox), d3_geom_voronoiCloseCells(bbox);\n var diagram = {\n cells: d3_geom_voronoiCells,\n edges: d3_geom_voronoiEdges\n };\n d3_geom_voronoiBeaches = d3_geom_voronoiCircles = d3_geom_voronoiEdges = d3_geom_voronoiCells = null;\n return diagram;\n }\n function d3_geom_voronoiVertexOrder(a, b) {\n return b.y - a.y || b.x - a.x;\n }\n d3.geom.voronoi = function(points) {\n var x = d3_geom_pointX, y = d3_geom_pointY, fx = x, fy = y, clipExtent = d3_geom_voronoiClipExtent;\n if (points) return voronoi(points);\n function voronoi(data) {\n var polygons = new Array(data.length), x0 = clipExtent[0][0], y0 = clipExtent[0][1], x1 = clipExtent[1][0], y1 = clipExtent[1][1];\n d3_geom_voronoi(sites(data), clipExtent).cells.forEach(function(cell, i) {\n var edges = cell.edges, site = cell.site, polygon = polygons[i] = edges.length ? edges.map(function(e) {\n var s = e.start();\n return [ s.x, s.y ];\n }) : site.x >= x0 && site.x <= x1 && site.y >= y0 && site.y <= y1 ? [ [ x0, y1 ], [ x1, y1 ], [ x1, y0 ], [ x0, y0 ] ] : [];\n polygon.point = data[i];\n });\n return polygons;\n }\n function sites(data) {\n return data.map(function(d, i) {\n return {\n x: Math.round(fx(d, i) / ε) * ε,\n y: Math.round(fy(d, i) / ε) * ε,\n i: i\n };\n });\n }\n voronoi.links = function(data) {\n return d3_geom_voronoi(sites(data)).edges.filter(function(edge) {\n return edge.l && edge.r;\n }).map(function(edge) {\n return {\n source: data[edge.l.i],\n target: data[edge.r.i]\n };\n });\n };\n voronoi.triangles = function(data) {\n var triangles = [];\n d3_geom_voronoi(sites(data)).cells.forEach(function(cell, i) {\n var site = cell.site, edges = cell.edges.sort(d3_geom_voronoiHalfEdgeOrder), j = -1, m = edges.length, e0, s0, e1 = edges[m - 1].edge, s1 = e1.l === site ? e1.r : e1.l;\n while (++j < m) {\n e0 = e1;\n s0 = s1;\n e1 = edges[j].edge;\n s1 = e1.l === site ? e1.r : e1.l;\n if (i < s0.i && i < s1.i && d3_geom_voronoiTriangleArea(site, s0, s1) < 0) {\n triangles.push([ data[i], data[s0.i], data[s1.i] ]);\n }\n }\n });\n return triangles;\n };\n voronoi.x = function(_) {\n return arguments.length ? (fx = d3_functor(x = _), voronoi) : x;\n };\n voronoi.y = function(_) {\n return arguments.length ? (fy = d3_functor(y = _), voronoi) : y;\n };\n voronoi.clipExtent = function(_) {\n if (!arguments.length) return clipExtent === d3_geom_voronoiClipExtent ? null : clipExtent;\n clipExtent = _ == null ? d3_geom_voronoiClipExtent : _;\n return voronoi;\n };\n voronoi.size = function(_) {\n if (!arguments.length) return clipExtent === d3_geom_voronoiClipExtent ? null : clipExtent && clipExtent[1];\n return voronoi.clipExtent(_ && [ [ 0, 0 ], _ ]);\n };\n return voronoi;\n };\n var d3_geom_voronoiClipExtent = [ [ -1e6, -1e6 ], [ 1e6, 1e6 ] ];\n function d3_geom_voronoiTriangleArea(a, b, c) {\n return (a.x - c.x) * (b.y - a.y) - (a.x - b.x) * (c.y - a.y);\n }\n d3.geom.delaunay = function(vertices) {\n return d3.geom.voronoi().triangles(vertices);\n };\n d3.geom.quadtree = function(points, x1, y1, x2, y2) {\n var x = d3_geom_pointX, y = d3_geom_pointY, compat;\n if (compat = arguments.length) {\n x = d3_geom_quadtreeCompatX;\n y = d3_geom_quadtreeCompatY;\n if (compat === 3) {\n y2 = y1;\n x2 = x1;\n y1 = x1 = 0;\n }\n return quadtree(points);\n }\n function quadtree(data) {\n var d, fx = d3_functor(x), fy = d3_functor(y), xs, ys, i, n, x1_, y1_, x2_, y2_;\n if (x1 != null) {\n x1_ = x1, y1_ = y1, x2_ = x2, y2_ = y2;\n } else {\n x2_ = y2_ = -(x1_ = y1_ = Infinity);\n xs = [], ys = [];\n n = data.length;\n if (compat) for (i = 0; i < n; ++i) {\n d = data[i];\n if (d.x < x1_) x1_ = d.x;\n if (d.y < y1_) y1_ = d.y;\n if (d.x > x2_) x2_ = d.x;\n if (d.y > y2_) y2_ = d.y;\n xs.push(d.x);\n ys.push(d.y);\n } else for (i = 0; i < n; ++i) {\n var x_ = +fx(d = data[i], i), y_ = +fy(d, i);\n if (x_ < x1_) x1_ = x_;\n if (y_ < y1_) y1_ = y_;\n if (x_ > x2_) x2_ = x_;\n if (y_ > y2_) y2_ = y_;\n xs.push(x_);\n ys.push(y_);\n }\n }\n var dx = x2_ - x1_, dy = y2_ - y1_;\n if (dx > dy) y2_ = y1_ + dx; else x2_ = x1_ + dy;\n function insert(n, d, x, y, x1, y1, x2, y2) {\n if (isNaN(x) || isNaN(y)) return;\n if (n.leaf) {\n var nx = n.x, ny = n.y;\n if (nx != null) {\n if (abs(nx - x) + abs(ny - y) < .01) {\n insertChild(n, d, x, y, x1, y1, x2, y2);\n } else {\n var nPoint = n.point;\n n.x = n.y = n.point = null;\n insertChild(n, nPoint, nx, ny, x1, y1, x2, y2);\n insertChild(n, d, x, y, x1, y1, x2, y2);\n }\n } else {\n n.x = x, n.y = y, n.point = d;\n }\n } else {\n insertChild(n, d, x, y, x1, y1, x2, y2);\n }\n }\n function insertChild(n, d, x, y, x1, y1, x2, y2) {\n var xm = (x1 + x2) * .5, ym = (y1 + y2) * .5, right = x >= xm, below = y >= ym, i = below << 1 | right;\n n.leaf = false;\n n = n.nodes[i] || (n.nodes[i] = d3_geom_quadtreeNode());\n if (right) x1 = xm; else x2 = xm;\n if (below) y1 = ym; else y2 = ym;\n insert(n, d, x, y, x1, y1, x2, y2);\n }\n var root = d3_geom_quadtreeNode();\n root.add = function(d) {\n insert(root, d, +fx(d, ++i), +fy(d, i), x1_, y1_, x2_, y2_);\n };\n root.visit = function(f) {\n d3_geom_quadtreeVisit(f, root, x1_, y1_, x2_, y2_);\n };\n root.find = function(point) {\n return d3_geom_quadtreeFind(root, point[0], point[1], x1_, y1_, x2_, y2_);\n };\n i = -1;\n if (x1 == null) {\n while (++i < n) {\n insert(root, data[i], xs[i], ys[i], x1_, y1_, x2_, y2_);\n }\n --i;\n } else data.forEach(root.add);\n xs = ys = data = d = null;\n return root;\n }\n quadtree.x = function(_) {\n return arguments.length ? (x = _, quadtree) : x;\n };\n quadtree.y = function(_) {\n return arguments.length ? (y = _, quadtree) : y;\n };\n quadtree.extent = function(_) {\n if (!arguments.length) return x1 == null ? null : [ [ x1, y1 ], [ x2, y2 ] ];\n if (_ == null) x1 = y1 = x2 = y2 = null; else x1 = +_[0][0], y1 = +_[0][1], x2 = +_[1][0], \n y2 = +_[1][1];\n return quadtree;\n };\n quadtree.size = function(_) {\n if (!arguments.length) return x1 == null ? null : [ x2 - x1, y2 - y1 ];\n if (_ == null) x1 = y1 = x2 = y2 = null; else x1 = y1 = 0, x2 = +_[0], y2 = +_[1];\n return quadtree;\n };\n return quadtree;\n };\n function d3_geom_quadtreeCompatX(d) {\n return d.x;\n }\n function d3_geom_quadtreeCompatY(d) {\n return d.y;\n }\n function d3_geom_quadtreeNode() {\n return {\n leaf: true,\n nodes: [],\n point: null,\n x: null,\n y: null\n };\n }\n function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) {\n if (!f(node, x1, y1, x2, y2)) {\n var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, children = node.nodes;\n if (children[0]) d3_geom_quadtreeVisit(f, children[0], x1, y1, sx, sy);\n if (children[1]) d3_geom_quadtreeVisit(f, children[1], sx, y1, x2, sy);\n if (children[2]) d3_geom_quadtreeVisit(f, children[2], x1, sy, sx, y2);\n if (children[3]) d3_geom_quadtreeVisit(f, children[3], sx, sy, x2, y2);\n }\n }\n function d3_geom_quadtreeFind(root, x, y, x0, y0, x3, y3) {\n var minDistance2 = Infinity, closestPoint;\n (function find(node, x1, y1, x2, y2) {\n if (x1 > x3 || y1 > y3 || x2 < x0 || y2 < y0) return;\n if (point = node.point) {\n var point, dx = x - node.x, dy = y - node.y, distance2 = dx * dx + dy * dy;\n if (distance2 < minDistance2) {\n var distance = Math.sqrt(minDistance2 = distance2);\n x0 = x - distance, y0 = y - distance;\n x3 = x + distance, y3 = y + distance;\n closestPoint = point;\n }\n }\n var children = node.nodes, xm = (x1 + x2) * .5, ym = (y1 + y2) * .5, right = x >= xm, below = y >= ym;\n for (var i = below << 1 | right, j = i + 4; i < j; ++i) {\n if (node = children[i & 3]) switch (i & 3) {\n case 0:\n find(node, x1, y1, xm, ym);\n break;\n\n case 1:\n find(node, xm, y1, x2, ym);\n break;\n\n case 2:\n find(node, x1, ym, xm, y2);\n break;\n\n case 3:\n find(node, xm, ym, x2, y2);\n break;\n }\n }\n })(root, x0, y0, x3, y3);\n return closestPoint;\n }\n d3.interpolateRgb = d3_interpolateRgb;\n function d3_interpolateRgb(a, b) {\n a = d3.rgb(a);\n b = d3.rgb(b);\n var ar = a.r, ag = a.g, ab = a.b, br = b.r - ar, bg = b.g - ag, bb = b.b - ab;\n return function(t) {\n return \"#\" + d3_rgb_hex(Math.round(ar + br * t)) + d3_rgb_hex(Math.round(ag + bg * t)) + d3_rgb_hex(Math.round(ab + bb * t));\n };\n }\n d3.interpolateObject = d3_interpolateObject;\n function d3_interpolateObject(a, b) {\n var i = {}, c = {}, k;\n for (k in a) {\n if (k in b) {\n i[k] = d3_interpolate(a[k], b[k]);\n } else {\n c[k] = a[k];\n }\n }\n for (k in b) {\n if (!(k in a)) {\n c[k] = b[k];\n }\n }\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n }\n d3.interpolateNumber = d3_interpolateNumber;\n function d3_interpolateNumber(a, b) {\n a = +a, b = +b;\n return function(t) {\n return a * (1 - t) + b * t;\n };\n }\n d3.interpolateString = d3_interpolateString;\n function d3_interpolateString(a, b) {\n var bi = d3_interpolate_numberA.lastIndex = d3_interpolate_numberB.lastIndex = 0, am, bm, bs, i = -1, s = [], q = [];\n a = a + \"\", b = b + \"\";\n while ((am = d3_interpolate_numberA.exec(a)) && (bm = d3_interpolate_numberB.exec(b))) {\n if ((bs = bm.index) > bi) {\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) {\n if (s[i]) s[i] += bm; else s[++i] = bm;\n } else {\n s[++i] = null;\n q.push({\n i: i,\n x: d3_interpolateNumber(am, bm)\n });\n }\n bi = d3_interpolate_numberB.lastIndex;\n }\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; else s[++i] = bs;\n }\n return s.length < 2 ? q[0] ? (b = q[0].x, function(t) {\n return b(t) + \"\";\n }) : function() {\n return b;\n } : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n }\n var d3_interpolate_numberA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g, d3_interpolate_numberB = new RegExp(d3_interpolate_numberA.source, \"g\");\n d3.interpolate = d3_interpolate;\n function d3_interpolate(a, b) {\n var i = d3.interpolators.length, f;\n while (--i >= 0 && !(f = d3.interpolators[i](a, b))) ;\n return f;\n }\n d3.interpolators = [ function(a, b) {\n var t = typeof b;\n return (t === \"string\" ? d3_rgb_names.has(b.toLowerCase()) || /^(#|rgb\\(|hsl\\()/i.test(b) ? d3_interpolateRgb : d3_interpolateString : b instanceof d3_color ? d3_interpolateRgb : Array.isArray(b) ? d3_interpolateArray : t === \"object\" && isNaN(b) ? d3_interpolateObject : d3_interpolateNumber)(a, b);\n } ];\n d3.interpolateArray = d3_interpolateArray;\n function d3_interpolateArray(a, b) {\n var x = [], c = [], na = a.length, nb = b.length, n0 = Math.min(a.length, b.length), i;\n for (i = 0; i < n0; ++i) x.push(d3_interpolate(a[i], b[i]));\n for (;i < na; ++i) c[i] = a[i];\n for (;i < nb; ++i) c[i] = b[i];\n return function(t) {\n for (i = 0; i < n0; ++i) c[i] = x[i](t);\n return c;\n };\n }\n var d3_ease_default = function() {\n return d3_identity;\n };\n var d3_ease = d3.map({\n linear: d3_ease_default,\n poly: d3_ease_poly,\n quad: function() {\n return d3_ease_quad;\n },\n cubic: function() {\n return d3_ease_cubic;\n },\n sin: function() {\n return d3_ease_sin;\n },\n exp: function() {\n return d3_ease_exp;\n },\n circle: function() {\n return d3_ease_circle;\n },\n elastic: d3_ease_elastic,\n back: d3_ease_back,\n bounce: function() {\n return d3_ease_bounce;\n }\n });\n var d3_ease_mode = d3.map({\n \"in\": d3_identity,\n out: d3_ease_reverse,\n \"in-out\": d3_ease_reflect,\n \"out-in\": function(f) {\n return d3_ease_reflect(d3_ease_reverse(f));\n }\n });\n d3.ease = function(name) {\n var i = name.indexOf(\"-\"), t = i >= 0 ? name.slice(0, i) : name, m = i >= 0 ? name.slice(i + 1) : \"in\";\n t = d3_ease.get(t) || d3_ease_default;\n m = d3_ease_mode.get(m) || d3_identity;\n return d3_ease_clamp(m(t.apply(null, d3_arraySlice.call(arguments, 1))));\n };\n function d3_ease_clamp(f) {\n return function(t) {\n return t <= 0 ? 0 : t >= 1 ? 1 : f(t);\n };\n }\n function d3_ease_reverse(f) {\n return function(t) {\n return 1 - f(1 - t);\n };\n }\n function d3_ease_reflect(f) {\n return function(t) {\n return .5 * (t < .5 ? f(2 * t) : 2 - f(2 - 2 * t));\n };\n }\n function d3_ease_quad(t) {\n return t * t;\n }\n function d3_ease_cubic(t) {\n return t * t * t;\n }\n function d3_ease_cubicInOut(t) {\n if (t <= 0) return 0;\n if (t >= 1) return 1;\n var t2 = t * t, t3 = t2 * t;\n return 4 * (t < .5 ? t3 : 3 * (t - t2) + t3 - .75);\n }\n function d3_ease_poly(e) {\n return function(t) {\n return Math.pow(t, e);\n };\n }\n function d3_ease_sin(t) {\n return 1 - Math.cos(t * halfπ);\n }\n function d3_ease_exp(t) {\n return Math.pow(2, 10 * (t - 1));\n }\n function d3_ease_circle(t) {\n return 1 - Math.sqrt(1 - t * t);\n }\n function d3_ease_elastic(a, p) {\n var s;\n if (arguments.length < 2) p = .45;\n if (arguments.length) s = p / τ * Math.asin(1 / a); else a = 1, s = p / 4;\n return function(t) {\n return 1 + a * Math.pow(2, -10 * t) * Math.sin((t - s) * τ / p);\n };\n }\n function d3_ease_back(s) {\n if (!s) s = 1.70158;\n return function(t) {\n return t * t * ((s + 1) * t - s);\n };\n }\n function d3_ease_bounce(t) {\n return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;\n }\n d3.interpolateHcl = d3_interpolateHcl;\n function d3_interpolateHcl(a, b) {\n a = d3.hcl(a);\n b = d3.hcl(b);\n var ah = a.h, ac = a.c, al = a.l, bh = b.h - ah, bc = b.c - ac, bl = b.l - al;\n if (isNaN(bc)) bc = 0, ac = isNaN(ac) ? b.c : ac;\n if (isNaN(bh)) bh = 0, ah = isNaN(ah) ? b.h : ah; else if (bh > 180) bh -= 360; else if (bh < -180) bh += 360;\n return function(t) {\n return d3_hcl_lab(ah + bh * t, ac + bc * t, al + bl * t) + \"\";\n };\n }\n d3.interpolateHsl = d3_interpolateHsl;\n function d3_interpolateHsl(a, b) {\n a = d3.hsl(a);\n b = d3.hsl(b);\n var ah = a.h, as = a.s, al = a.l, bh = b.h - ah, bs = b.s - as, bl = b.l - al;\n if (isNaN(bs)) bs = 0, as = isNaN(as) ? b.s : as;\n if (isNaN(bh)) bh = 0, ah = isNaN(ah) ? b.h : ah; else if (bh > 180) bh -= 360; else if (bh < -180) bh += 360;\n return function(t) {\n return d3_hsl_rgb(ah + bh * t, as + bs * t, al + bl * t) + \"\";\n };\n }\n d3.interpolateLab = d3_interpolateLab;\n function d3_interpolateLab(a, b) {\n a = d3.lab(a);\n b = d3.lab(b);\n var al = a.l, aa = a.a, ab = a.b, bl = b.l - al, ba = b.a - aa, bb = b.b - ab;\n return function(t) {\n return d3_lab_rgb(al + bl * t, aa + ba * t, ab + bb * t) + \"\";\n };\n }\n d3.interpolateRound = d3_interpolateRound;\n function d3_interpolateRound(a, b) {\n b -= a;\n return function(t) {\n return Math.round(a + b * t);\n };\n }\n d3.transform = function(string) {\n var g = d3_document.createElementNS(d3.ns.prefix.svg, \"g\");\n return (d3.transform = function(string) {\n if (string != null) {\n g.setAttribute(\"transform\", string);\n var t = g.transform.baseVal.consolidate();\n }\n return new d3_transform(t ? t.matrix : d3_transformIdentity);\n })(string);\n };\n function d3_transform(m) {\n var r0 = [ m.a, m.b ], r1 = [ m.c, m.d ], kx = d3_transformNormalize(r0), kz = d3_transformDot(r0, r1), ky = d3_transformNormalize(d3_transformCombine(r1, r0, -kz)) || 0;\n if (r0[0] * r1[1] < r1[0] * r0[1]) {\n r0[0] *= -1;\n r0[1] *= -1;\n kx *= -1;\n kz *= -1;\n }\n this.rotate = (kx ? Math.atan2(r0[1], r0[0]) : Math.atan2(-r1[0], r1[1])) * d3_degrees;\n this.translate = [ m.e, m.f ];\n this.scale = [ kx, ky ];\n this.skew = ky ? Math.atan2(kz, ky) * d3_degrees : 0;\n }\n d3_transform.prototype.toString = function() {\n return \"translate(\" + this.translate + \")rotate(\" + this.rotate + \")skewX(\" + this.skew + \")scale(\" + this.scale + \")\";\n };\n function d3_transformDot(a, b) {\n return a[0] * b[0] + a[1] * b[1];\n }\n function d3_transformNormalize(a) {\n var k = Math.sqrt(d3_transformDot(a, a));\n if (k) {\n a[0] /= k;\n a[1] /= k;\n }\n return k;\n }\n function d3_transformCombine(a, b, k) {\n a[0] += k * b[0];\n a[1] += k * b[1];\n return a;\n }\n var d3_transformIdentity = {\n a: 1,\n b: 0,\n c: 0,\n d: 1,\n e: 0,\n f: 0\n };\n d3.interpolateTransform = d3_interpolateTransform;\n function d3_interpolateTransformPop(s) {\n return s.length ? s.pop() + \",\" : \"\";\n }\n function d3_interpolateTranslate(ta, tb, s, q) {\n if (ta[0] !== tb[0] || ta[1] !== tb[1]) {\n var i = s.push(\"translate(\", null, \",\", null, \")\");\n q.push({\n i: i - 4,\n x: d3_interpolateNumber(ta[0], tb[0])\n }, {\n i: i - 2,\n x: d3_interpolateNumber(ta[1], tb[1])\n });\n } else if (tb[0] || tb[1]) {\n s.push(\"translate(\" + tb + \")\");\n }\n }\n function d3_interpolateRotate(ra, rb, s, q) {\n if (ra !== rb) {\n if (ra - rb > 180) rb += 360; else if (rb - ra > 180) ra += 360;\n q.push({\n i: s.push(d3_interpolateTransformPop(s) + \"rotate(\", null, \")\") - 2,\n x: d3_interpolateNumber(ra, rb)\n });\n } else if (rb) {\n s.push(d3_interpolateTransformPop(s) + \"rotate(\" + rb + \")\");\n }\n }\n function d3_interpolateSkew(wa, wb, s, q) {\n if (wa !== wb) {\n q.push({\n i: s.push(d3_interpolateTransformPop(s) + \"skewX(\", null, \")\") - 2,\n x: d3_interpolateNumber(wa, wb)\n });\n } else if (wb) {\n s.push(d3_interpolateTransformPop(s) + \"skewX(\" + wb + \")\");\n }\n }\n function d3_interpolateScale(ka, kb, s, q) {\n if (ka[0] !== kb[0] || ka[1] !== kb[1]) {\n var i = s.push(d3_interpolateTransformPop(s) + \"scale(\", null, \",\", null, \")\");\n q.push({\n i: i - 4,\n x: d3_interpolateNumber(ka[0], kb[0])\n }, {\n i: i - 2,\n x: d3_interpolateNumber(ka[1], kb[1])\n });\n } else if (kb[0] !== 1 || kb[1] !== 1) {\n s.push(d3_interpolateTransformPop(s) + \"scale(\" + kb + \")\");\n }\n }\n function d3_interpolateTransform(a, b) {\n var s = [], q = [];\n a = d3.transform(a), b = d3.transform(b);\n d3_interpolateTranslate(a.translate, b.translate, s, q);\n d3_interpolateRotate(a.rotate, b.rotate, s, q);\n d3_interpolateSkew(a.skew, b.skew, s, q);\n d3_interpolateScale(a.scale, b.scale, s, q);\n a = b = null;\n return function(t) {\n var i = -1, n = q.length, o;\n while (++i < n) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n }\n function d3_uninterpolateNumber(a, b) {\n b = (b -= a = +a) || 1 / b;\n return function(x) {\n return (x - a) / b;\n };\n }\n function d3_uninterpolateClamp(a, b) {\n b = (b -= a = +a) || 1 / b;\n return function(x) {\n return Math.max(0, Math.min(1, (x - a) / b));\n };\n }\n d3.layout = {};\n d3.layout.bundle = function() {\n return function(links) {\n var paths = [], i = -1, n = links.length;\n while (++i < n) paths.push(d3_layout_bundlePath(links[i]));\n return paths;\n };\n };\n function d3_layout_bundlePath(link) {\n var start = link.source, end = link.target, lca = d3_layout_bundleLeastCommonAncestor(start, end), points = [ start ];\n while (start !== lca) {\n start = start.parent;\n points.push(start);\n }\n var k = points.length;\n while (end !== lca) {\n points.splice(k, 0, end);\n end = end.parent;\n }\n return points;\n }\n function d3_layout_bundleAncestors(node) {\n var ancestors = [], parent = node.parent;\n while (parent != null) {\n ancestors.push(node);\n node = parent;\n parent = parent.parent;\n }\n ancestors.push(node);\n return ancestors;\n }\n function d3_layout_bundleLeastCommonAncestor(a, b) {\n if (a === b) return a;\n var aNodes = d3_layout_bundleAncestors(a), bNodes = d3_layout_bundleAncestors(b), aNode = aNodes.pop(), bNode = bNodes.pop(), sharedNode = null;\n while (aNode === bNode) {\n sharedNode = aNode;\n aNode = aNodes.pop();\n bNode = bNodes.pop();\n }\n return sharedNode;\n }\n d3.layout.chord = function() {\n var chord = {}, chords, groups, matrix, n, padding = 0, sortGroups, sortSubgroups, sortChords;\n function relayout() {\n var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j;\n chords = [];\n groups = [];\n k = 0, i = -1;\n while (++i < n) {\n x = 0, j = -1;\n while (++j < n) {\n x += matrix[i][j];\n }\n groupSums.push(x);\n subgroupIndex.push(d3.range(n));\n k += x;\n }\n if (sortGroups) {\n groupIndex.sort(function(a, b) {\n return sortGroups(groupSums[a], groupSums[b]);\n });\n }\n if (sortSubgroups) {\n subgroupIndex.forEach(function(d, i) {\n d.sort(function(a, b) {\n return sortSubgroups(matrix[i][a], matrix[i][b]);\n });\n });\n }\n k = (τ - padding * n) / k;\n x = 0, i = -1;\n while (++i < n) {\n x0 = x, j = -1;\n while (++j < n) {\n var di = groupIndex[i], dj = subgroupIndex[di][j], v = matrix[di][dj], a0 = x, a1 = x += v * k;\n subgroups[di + \"-\" + dj] = {\n index: di,\n subindex: dj,\n startAngle: a0,\n endAngle: a1,\n value: v\n };\n }\n groups[di] = {\n index: di,\n startAngle: x0,\n endAngle: x,\n value: groupSums[di]\n };\n x += padding;\n }\n i = -1;\n while (++i < n) {\n j = i - 1;\n while (++j < n) {\n var source = subgroups[i + \"-\" + j], target = subgroups[j + \"-\" + i];\n if (source.value || target.value) {\n chords.push(source.value < target.value ? {\n source: target,\n target: source\n } : {\n source: source,\n target: target\n });\n }\n }\n }\n if (sortChords) resort();\n }\n function resort() {\n chords.sort(function(a, b) {\n return sortChords((a.source.value + a.target.value) / 2, (b.source.value + b.target.value) / 2);\n });\n }\n chord.matrix = function(x) {\n if (!arguments.length) return matrix;\n n = (matrix = x) && matrix.length;\n chords = groups = null;\n return chord;\n };\n chord.padding = function(x) {\n if (!arguments.length) return padding;\n padding = x;\n chords = groups = null;\n return chord;\n };\n chord.sortGroups = function(x) {\n if (!arguments.length) return sortGroups;\n sortGroups = x;\n chords = groups = null;\n return chord;\n };\n chord.sortSubgroups = function(x) {\n if (!arguments.length) return sortSubgroups;\n sortSubgroups = x;\n chords = null;\n return chord;\n };\n chord.sortChords = function(x) {\n if (!arguments.length) return sortChords;\n sortChords = x;\n if (chords) resort();\n return chord;\n };\n chord.chords = function() {\n if (!chords) relayout();\n return chords;\n };\n chord.groups = function() {\n if (!groups) relayout();\n return groups;\n };\n return chord;\n };\n d3.layout.force = function() {\n var force = {}, event = d3.dispatch(\"start\", \"tick\", \"end\"), timer, size = [ 1, 1 ], drag, alpha, friction = .9, linkDistance = d3_layout_forceLinkDistance, linkStrength = d3_layout_forceLinkStrength, charge = -30, chargeDistance2 = d3_layout_forceChargeDistance2, gravity = .1, theta2 = .64, nodes = [], links = [], distances, strengths, charges;\n function repulse(node) {\n return function(quad, x1, _, x2) {\n if (quad.point !== node) {\n var dx = quad.cx - node.x, dy = quad.cy - node.y, dw = x2 - x1, dn = dx * dx + dy * dy;\n if (dw * dw / theta2 < dn) {\n if (dn < chargeDistance2) {\n var k = quad.charge / dn;\n node.px -= dx * k;\n node.py -= dy * k;\n }\n return true;\n }\n if (quad.point && dn && dn < chargeDistance2) {\n var k = quad.pointCharge / dn;\n node.px -= dx * k;\n node.py -= dy * k;\n }\n }\n return !quad.charge;\n };\n }\n force.tick = function() {\n if ((alpha *= .99) < .005) {\n timer = null;\n event.end({\n type: \"end\",\n alpha: alpha = 0\n });\n return true;\n }\n var n = nodes.length, m = links.length, q, i, o, s, t, l, k, x, y;\n for (i = 0; i < m; ++i) {\n o = links[i];\n s = o.source;\n t = o.target;\n x = t.x - s.x;\n y = t.y - s.y;\n if (l = x * x + y * y) {\n l = alpha * strengths[i] * ((l = Math.sqrt(l)) - distances[i]) / l;\n x *= l;\n y *= l;\n t.x -= x * (k = s.weight + t.weight ? s.weight / (s.weight + t.weight) : .5);\n t.y -= y * k;\n s.x += x * (k = 1 - k);\n s.y += y * k;\n }\n }\n if (k = alpha * gravity) {\n x = size[0] / 2;\n y = size[1] / 2;\n i = -1;\n if (k) while (++i < n) {\n o = nodes[i];\n o.x += (x - o.x) * k;\n o.y += (y - o.y) * k;\n }\n }\n if (charge) {\n d3_layout_forceAccumulate(q = d3.geom.quadtree(nodes), alpha, charges);\n i = -1;\n while (++i < n) {\n if (!(o = nodes[i]).fixed) {\n q.visit(repulse(o));\n }\n }\n }\n i = -1;\n while (++i < n) {\n o = nodes[i];\n if (o.fixed) {\n o.x = o.px;\n o.y = o.py;\n } else {\n o.x -= (o.px - (o.px = o.x)) * friction;\n o.y -= (o.py - (o.py = o.y)) * friction;\n }\n }\n event.tick({\n type: \"tick\",\n alpha: alpha\n });\n };\n force.nodes = function(x) {\n if (!arguments.length) return nodes;\n nodes = x;\n return force;\n };\n force.links = function(x) {\n if (!arguments.length) return links;\n links = x;\n return force;\n };\n force.size = function(x) {\n if (!arguments.length) return size;\n size = x;\n return force;\n };\n force.linkDistance = function(x) {\n if (!arguments.length) return linkDistance;\n linkDistance = typeof x === \"function\" ? x : +x;\n return force;\n };\n force.distance = force.linkDistance;\n force.linkStrength = function(x) {\n if (!arguments.length) return linkStrength;\n linkStrength = typeof x === \"function\" ? x : +x;\n return force;\n };\n force.friction = function(x) {\n if (!arguments.length) return friction;\n friction = +x;\n return force;\n };\n force.charge = function(x) {\n if (!arguments.length) return charge;\n charge = typeof x === \"function\" ? x : +x;\n return force;\n };\n force.chargeDistance = function(x) {\n if (!arguments.length) return Math.sqrt(chargeDistance2);\n chargeDistance2 = x * x;\n return force;\n };\n force.gravity = function(x) {\n if (!arguments.length) return gravity;\n gravity = +x;\n return force;\n };\n force.theta = function(x) {\n if (!arguments.length) return Math.sqrt(theta2);\n theta2 = x * x;\n return force;\n };\n force.alpha = function(x) {\n if (!arguments.length) return alpha;\n x = +x;\n if (alpha) {\n if (x > 0) {\n alpha = x;\n } else {\n timer.c = null, timer.t = NaN, timer = null;\n event.end({\n type: \"end\",\n alpha: alpha = 0\n });\n }\n } else if (x > 0) {\n event.start({\n type: \"start\",\n alpha: alpha = x\n });\n timer = d3_timer(force.tick);\n }\n return force;\n };\n force.start = function() {\n var i, n = nodes.length, m = links.length, w = size[0], h = size[1], neighbors, o;\n for (i = 0; i < n; ++i) {\n (o = nodes[i]).index = i;\n o.weight = 0;\n }\n for (i = 0; i < m; ++i) {\n o = links[i];\n if (typeof o.source == \"number\") o.source = nodes[o.source];\n if (typeof o.target == \"number\") o.target = nodes[o.target];\n ++o.source.weight;\n ++o.target.weight;\n }\n for (i = 0; i < n; ++i) {\n o = nodes[i];\n if (isNaN(o.x)) o.x = position(\"x\", w);\n if (isNaN(o.y)) o.y = position(\"y\", h);\n if (isNaN(o.px)) o.px = o.x;\n if (isNaN(o.py)) o.py = o.y;\n }\n distances = [];\n if (typeof linkDistance === \"function\") for (i = 0; i < m; ++i) distances[i] = +linkDistance.call(this, links[i], i); else for (i = 0; i < m; ++i) distances[i] = linkDistance;\n strengths = [];\n if (typeof linkStrength === \"function\") for (i = 0; i < m; ++i) strengths[i] = +linkStrength.call(this, links[i], i); else for (i = 0; i < m; ++i) strengths[i] = linkStrength;\n charges = [];\n if (typeof charge === \"function\") for (i = 0; i < n; ++i) charges[i] = +charge.call(this, nodes[i], i); else for (i = 0; i < n; ++i) charges[i] = charge;\n function position(dimension, size) {\n if (!neighbors) {\n neighbors = new Array(n);\n for (j = 0; j < n; ++j) {\n neighbors[j] = [];\n }\n for (j = 0; j < m; ++j) {\n var o = links[j];\n neighbors[o.source.index].push(o.target);\n neighbors[o.target.index].push(o.source);\n }\n }\n var candidates = neighbors[i], j = -1, l = candidates.length, x;\n while (++j < l) if (!isNaN(x = candidates[j][dimension])) return x;\n return Math.random() * size;\n }\n return force.resume();\n };\n force.resume = function() {\n return force.alpha(.1);\n };\n force.stop = function() {\n return force.alpha(0);\n };\n force.drag = function() {\n if (!drag) drag = d3.behavior.drag().origin(d3_identity).on(\"dragstart.force\", d3_layout_forceDragstart).on(\"drag.force\", dragmove).on(\"dragend.force\", d3_layout_forceDragend);\n if (!arguments.length) return drag;\n this.on(\"mouseover.force\", d3_layout_forceMouseover).on(\"mouseout.force\", d3_layout_forceMouseout).call(drag);\n };\n function dragmove(d) {\n d.px = d3.event.x, d.py = d3.event.y;\n force.resume();\n }\n return d3.rebind(force, event, \"on\");\n };\n function d3_layout_forceDragstart(d) {\n d.fixed |= 2;\n }\n function d3_layout_forceDragend(d) {\n d.fixed &= ~6;\n }\n function d3_layout_forceMouseover(d) {\n d.fixed |= 4;\n d.px = d.x, d.py = d.y;\n }\n function d3_layout_forceMouseout(d) {\n d.fixed &= ~4;\n }\n function d3_layout_forceAccumulate(quad, alpha, charges) {\n var cx = 0, cy = 0;\n quad.charge = 0;\n if (!quad.leaf) {\n var nodes = quad.nodes, n = nodes.length, i = -1, c;\n while (++i < n) {\n c = nodes[i];\n if (c == null) continue;\n d3_layout_forceAccumulate(c, alpha, charges);\n quad.charge += c.charge;\n cx += c.charge * c.cx;\n cy += c.charge * c.cy;\n }\n }\n if (quad.point) {\n if (!quad.leaf) {\n quad.point.x += Math.random() - .5;\n quad.point.y += Math.random() - .5;\n }\n var k = alpha * charges[quad.point.index];\n quad.charge += quad.pointCharge = k;\n cx += k * quad.point.x;\n cy += k * quad.point.y;\n }\n quad.cx = cx / quad.charge;\n quad.cy = cy / quad.charge;\n }\n var d3_layout_forceLinkDistance = 20, d3_layout_forceLinkStrength = 1, d3_layout_forceChargeDistance2 = Infinity;\n d3.layout.hierarchy = function() {\n var sort = d3_layout_hierarchySort, children = d3_layout_hierarchyChildren, value = d3_layout_hierarchyValue;\n function hierarchy(root) {\n var stack = [ root ], nodes = [], node;\n root.depth = 0;\n while ((node = stack.pop()) != null) {\n nodes.push(node);\n if ((childs = children.call(hierarchy, node, node.depth)) && (n = childs.length)) {\n var n, childs, child;\n while (--n >= 0) {\n stack.push(child = childs[n]);\n child.parent = node;\n child.depth = node.depth + 1;\n }\n if (value) node.value = 0;\n node.children = childs;\n } else {\n if (value) node.value = +value.call(hierarchy, node, node.depth) || 0;\n delete node.children;\n }\n }\n d3_layout_hierarchyVisitAfter(root, function(node) {\n var childs, parent;\n if (sort && (childs = node.children)) childs.sort(sort);\n if (value && (parent = node.parent)) parent.value += node.value;\n });\n return nodes;\n }\n hierarchy.sort = function(x) {\n if (!arguments.length) return sort;\n sort = x;\n return hierarchy;\n };\n hierarchy.children = function(x) {\n if (!arguments.length) return children;\n children = x;\n return hierarchy;\n };\n hierarchy.value = function(x) {\n if (!arguments.length) return value;\n value = x;\n return hierarchy;\n };\n hierarchy.revalue = function(root) {\n if (value) {\n d3_layout_hierarchyVisitBefore(root, function(node) {\n if (node.children) node.value = 0;\n });\n d3_layout_hierarchyVisitAfter(root, function(node) {\n var parent;\n if (!node.children) node.value = +value.call(hierarchy, node, node.depth) || 0;\n if (parent = node.parent) parent.value += node.value;\n });\n }\n return root;\n };\n return hierarchy;\n };\n function d3_layout_hierarchyRebind(object, hierarchy) {\n d3.rebind(object, hierarchy, \"sort\", \"children\", \"value\");\n object.nodes = object;\n object.links = d3_layout_hierarchyLinks;\n return object;\n }\n function d3_layout_hierarchyVisitBefore(node, callback) {\n var nodes = [ node ];\n while ((node = nodes.pop()) != null) {\n callback(node);\n if ((children = node.children) && (n = children.length)) {\n var n, children;\n while (--n >= 0) nodes.push(children[n]);\n }\n }\n }\n function d3_layout_hierarchyVisitAfter(node, callback) {\n var nodes = [ node ], nodes2 = [];\n while ((node = nodes.pop()) != null) {\n nodes2.push(node);\n if ((children = node.children) && (n = children.length)) {\n var i = -1, n, children;\n while (++i < n) nodes.push(children[i]);\n }\n }\n while ((node = nodes2.pop()) != null) {\n callback(node);\n }\n }\n function d3_layout_hierarchyChildren(d) {\n return d.children;\n }\n function d3_layout_hierarchyValue(d) {\n return d.value;\n }\n function d3_layout_hierarchySort(a, b) {\n return b.value - a.value;\n }\n function d3_layout_hierarchyLinks(nodes) {\n return d3.merge(nodes.map(function(parent) {\n return (parent.children || []).map(function(child) {\n return {\n source: parent,\n target: child\n };\n });\n }));\n }\n d3.layout.partition = function() {\n var hierarchy = d3.layout.hierarchy(), size = [ 1, 1 ];\n function position(node, x, dx, dy) {\n var children = node.children;\n node.x = x;\n node.y = node.depth * dy;\n node.dx = dx;\n node.dy = dy;\n if (children && (n = children.length)) {\n var i = -1, n, c, d;\n dx = node.value ? dx / node.value : 0;\n while (++i < n) {\n position(c = children[i], x, d = c.value * dx, dy);\n x += d;\n }\n }\n }\n function depth(node) {\n var children = node.children, d = 0;\n if (children && (n = children.length)) {\n var i = -1, n;\n while (++i < n) d = Math.max(d, depth(children[i]));\n }\n return 1 + d;\n }\n function partition(d, i) {\n var nodes = hierarchy.call(this, d, i);\n position(nodes[0], 0, size[0], size[1] / depth(nodes[0]));\n return nodes;\n }\n partition.size = function(x) {\n if (!arguments.length) return size;\n size = x;\n return partition;\n };\n return d3_layout_hierarchyRebind(partition, hierarchy);\n };\n d3.layout.pie = function() {\n var value = Number, sort = d3_layout_pieSortByValue, startAngle = 0, endAngle = τ, padAngle = 0;\n function pie(data) {\n var n = data.length, values = data.map(function(d, i) {\n return +value.call(pie, d, i);\n }), a = +(typeof startAngle === \"function\" ? startAngle.apply(this, arguments) : startAngle), da = (typeof endAngle === \"function\" ? endAngle.apply(this, arguments) : endAngle) - a, p = Math.min(Math.abs(da) / n, +(typeof padAngle === \"function\" ? padAngle.apply(this, arguments) : padAngle)), pa = p * (da < 0 ? -1 : 1), sum = d3.sum(values), k = sum ? (da - n * pa) / sum : 0, index = d3.range(n), arcs = [], v;\n if (sort != null) index.sort(sort === d3_layout_pieSortByValue ? function(i, j) {\n return values[j] - values[i];\n } : function(i, j) {\n return sort(data[i], data[j]);\n });\n index.forEach(function(i) {\n arcs[i] = {\n data: data[i],\n value: v = values[i],\n startAngle: a,\n endAngle: a += v * k + pa,\n padAngle: p\n };\n });\n return arcs;\n }\n pie.value = function(_) {\n if (!arguments.length) return value;\n value = _;\n return pie;\n };\n pie.sort = function(_) {\n if (!arguments.length) return sort;\n sort = _;\n return pie;\n };\n pie.startAngle = function(_) {\n if (!arguments.length) return startAngle;\n startAngle = _;\n return pie;\n };\n pie.endAngle = function(_) {\n if (!arguments.length) return endAngle;\n endAngle = _;\n return pie;\n };\n pie.padAngle = function(_) {\n if (!arguments.length) return padAngle;\n padAngle = _;\n return pie;\n };\n return pie;\n };\n var d3_layout_pieSortByValue = {};\n d3.layout.stack = function() {\n var values = d3_identity, order = d3_layout_stackOrderDefault, offset = d3_layout_stackOffsetZero, out = d3_layout_stackOut, x = d3_layout_stackX, y = d3_layout_stackY;\n function stack(data, index) {\n if (!(n = data.length)) return data;\n var series = data.map(function(d, i) {\n return values.call(stack, d, i);\n });\n var points = series.map(function(d) {\n return d.map(function(v, i) {\n return [ x.call(stack, v, i), y.call(stack, v, i) ];\n });\n });\n var orders = order.call(stack, points, index);\n series = d3.permute(series, orders);\n points = d3.permute(points, orders);\n var offsets = offset.call(stack, points, index);\n var m = series[0].length, n, i, j, o;\n for (j = 0; j < m; ++j) {\n out.call(stack, series[0][j], o = offsets[j], points[0][j][1]);\n for (i = 1; i < n; ++i) {\n out.call(stack, series[i][j], o += points[i - 1][j][1], points[i][j][1]);\n }\n }\n return data;\n }\n stack.values = function(x) {\n if (!arguments.length) return values;\n values = x;\n return stack;\n };\n stack.order = function(x) {\n if (!arguments.length) return order;\n order = typeof x === \"function\" ? x : d3_layout_stackOrders.get(x) || d3_layout_stackOrderDefault;\n return stack;\n };\n stack.offset = function(x) {\n if (!arguments.length) return offset;\n offset = typeof x === \"function\" ? x : d3_layout_stackOffsets.get(x) || d3_layout_stackOffsetZero;\n return stack;\n };\n stack.x = function(z) {\n if (!arguments.length) return x;\n x = z;\n return stack;\n };\n stack.y = function(z) {\n if (!arguments.length) return y;\n y = z;\n return stack;\n };\n stack.out = function(z) {\n if (!arguments.length) return out;\n out = z;\n return stack;\n };\n return stack;\n };\n function d3_layout_stackX(d) {\n return d.x;\n }\n function d3_layout_stackY(d) {\n return d.y;\n }\n function d3_layout_stackOut(d, y0, y) {\n d.y0 = y0;\n d.y = y;\n }\n var d3_layout_stackOrders = d3.map({\n \"inside-out\": function(data) {\n var n = data.length, i, j, max = data.map(d3_layout_stackMaxIndex), sums = data.map(d3_layout_stackReduceSum), index = d3.range(n).sort(function(a, b) {\n return max[a] - max[b];\n }), top = 0, bottom = 0, tops = [], bottoms = [];\n for (i = 0; i < n; ++i) {\n j = index[i];\n if (top < bottom) {\n top += sums[j];\n tops.push(j);\n } else {\n bottom += sums[j];\n bottoms.push(j);\n }\n }\n return bottoms.reverse().concat(tops);\n },\n reverse: function(data) {\n return d3.range(data.length).reverse();\n },\n \"default\": d3_layout_stackOrderDefault\n });\n var d3_layout_stackOffsets = d3.map({\n silhouette: function(data) {\n var n = data.length, m = data[0].length, sums = [], max = 0, i, j, o, y0 = [];\n for (j = 0; j < m; ++j) {\n for (i = 0, o = 0; i < n; i++) o += data[i][j][1];\n if (o > max) max = o;\n sums.push(o);\n }\n for (j = 0; j < m; ++j) {\n y0[j] = (max - sums[j]) / 2;\n }\n return y0;\n },\n wiggle: function(data) {\n var n = data.length, x = data[0], m = x.length, i, j, k, s1, s2, s3, dx, o, o0, y0 = [];\n y0[0] = o = o0 = 0;\n for (j = 1; j < m; ++j) {\n for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j][1];\n for (i = 0, s2 = 0, dx = x[j][0] - x[j - 1][0]; i < n; ++i) {\n for (k = 0, s3 = (data[i][j][1] - data[i][j - 1][1]) / (2 * dx); k < i; ++k) {\n s3 += (data[k][j][1] - data[k][j - 1][1]) / dx;\n }\n s2 += s3 * data[i][j][1];\n }\n y0[j] = o -= s1 ? s2 / s1 * dx : 0;\n if (o < o0) o0 = o;\n }\n for (j = 0; j < m; ++j) y0[j] -= o0;\n return y0;\n },\n expand: function(data) {\n var n = data.length, m = data[0].length, k = 1 / n, i, j, o, y0 = [];\n for (j = 0; j < m; ++j) {\n for (i = 0, o = 0; i < n; i++) o += data[i][j][1];\n if (o) for (i = 0; i < n; i++) data[i][j][1] /= o; else for (i = 0; i < n; i++) data[i][j][1] = k;\n }\n for (j = 0; j < m; ++j) y0[j] = 0;\n return y0;\n },\n zero: d3_layout_stackOffsetZero\n });\n function d3_layout_stackOrderDefault(data) {\n return d3.range(data.length);\n }\n function d3_layout_stackOffsetZero(data) {\n var j = -1, m = data[0].length, y0 = [];\n while (++j < m) y0[j] = 0;\n return y0;\n }\n function d3_layout_stackMaxIndex(array) {\n var i = 1, j = 0, v = array[0][1], k, n = array.length;\n for (;i < n; ++i) {\n if ((k = array[i][1]) > v) {\n j = i;\n v = k;\n }\n }\n return j;\n }\n function d3_layout_stackReduceSum(d) {\n return d.reduce(d3_layout_stackSum, 0);\n }\n function d3_layout_stackSum(p, d) {\n return p + d[1];\n }\n d3.layout.histogram = function() {\n var frequency = true, valuer = Number, ranger = d3_layout_histogramRange, binner = d3_layout_histogramBinSturges;\n function histogram(data, i) {\n var bins = [], values = data.map(valuer, this), range = ranger.call(this, values, i), thresholds = binner.call(this, range, values, i), bin, i = -1, n = values.length, m = thresholds.length - 1, k = frequency ? 1 : 1 / n, x;\n while (++i < m) {\n bin = bins[i] = [];\n bin.dx = thresholds[i + 1] - (bin.x = thresholds[i]);\n bin.y = 0;\n }\n if (m > 0) {\n i = -1;\n while (++i < n) {\n x = values[i];\n if (x >= range[0] && x <= range[1]) {\n bin = bins[d3.bisect(thresholds, x, 1, m) - 1];\n bin.y += k;\n bin.push(data[i]);\n }\n }\n }\n return bins;\n }\n histogram.value = function(x) {\n if (!arguments.length) return valuer;\n valuer = x;\n return histogram;\n };\n histogram.range = function(x) {\n if (!arguments.length) return ranger;\n ranger = d3_functor(x);\n return histogram;\n };\n histogram.bins = function(x) {\n if (!arguments.length) return binner;\n binner = typeof x === \"number\" ? function(range) {\n return d3_layout_histogramBinFixed(range, x);\n } : d3_functor(x);\n return histogram;\n };\n histogram.frequency = function(x) {\n if (!arguments.length) return frequency;\n frequency = !!x;\n return histogram;\n };\n return histogram;\n };\n function d3_layout_histogramBinSturges(range, values) {\n return d3_layout_histogramBinFixed(range, Math.ceil(Math.log(values.length) / Math.LN2 + 1));\n }\n function d3_layout_histogramBinFixed(range, n) {\n var x = -1, b = +range[0], m = (range[1] - b) / n, f = [];\n while (++x <= n) f[x] = m * x + b;\n return f;\n }\n function d3_layout_histogramRange(values) {\n return [ d3.min(values), d3.max(values) ];\n }\n d3.layout.pack = function() {\n var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort), padding = 0, size = [ 1, 1 ], radius;\n function pack(d, i) {\n var nodes = hierarchy.call(this, d, i), root = nodes[0], w = size[0], h = size[1], r = radius == null ? Math.sqrt : typeof radius === \"function\" ? radius : function() {\n return radius;\n };\n root.x = root.y = 0;\n d3_layout_hierarchyVisitAfter(root, function(d) {\n d.r = +r(d.value);\n });\n d3_layout_hierarchyVisitAfter(root, d3_layout_packSiblings);\n if (padding) {\n var dr = padding * (radius ? 1 : Math.max(2 * root.r / w, 2 * root.r / h)) / 2;\n d3_layout_hierarchyVisitAfter(root, function(d) {\n d.r += dr;\n });\n d3_layout_hierarchyVisitAfter(root, d3_layout_packSiblings);\n d3_layout_hierarchyVisitAfter(root, function(d) {\n d.r -= dr;\n });\n }\n d3_layout_packTransform(root, w / 2, h / 2, radius ? 1 : 1 / Math.max(2 * root.r / w, 2 * root.r / h));\n return nodes;\n }\n pack.size = function(_) {\n if (!arguments.length) return size;\n size = _;\n return pack;\n };\n pack.radius = function(_) {\n if (!arguments.length) return radius;\n radius = _ == null || typeof _ === \"function\" ? _ : +_;\n return pack;\n };\n pack.padding = function(_) {\n if (!arguments.length) return padding;\n padding = +_;\n return pack;\n };\n return d3_layout_hierarchyRebind(pack, hierarchy);\n };\n function d3_layout_packSort(a, b) {\n return a.value - b.value;\n }\n function d3_layout_packInsert(a, b) {\n var c = a._pack_next;\n a._pack_next = b;\n b._pack_prev = a;\n b._pack_next = c;\n c._pack_prev = b;\n }\n function d3_layout_packSplice(a, b) {\n a._pack_next = b;\n b._pack_prev = a;\n }\n function d3_layout_packIntersects(a, b) {\n var dx = b.x - a.x, dy = b.y - a.y, dr = a.r + b.r;\n return .999 * dr * dr > dx * dx + dy * dy;\n }\n function d3_layout_packSiblings(node) {\n if (!(nodes = node.children) || !(n = nodes.length)) return;\n var nodes, xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity, a, b, c, i, j, k, n;\n function bound(node) {\n xMin = Math.min(node.x - node.r, xMin);\n xMax = Math.max(node.x + node.r, xMax);\n yMin = Math.min(node.y - node.r, yMin);\n yMax = Math.max(node.y + node.r, yMax);\n }\n nodes.forEach(d3_layout_packLink);\n a = nodes[0];\n a.x = -a.r;\n a.y = 0;\n bound(a);\n if (n > 1) {\n b = nodes[1];\n b.x = b.r;\n b.y = 0;\n bound(b);\n if (n > 2) {\n c = nodes[2];\n d3_layout_packPlace(a, b, c);\n bound(c);\n d3_layout_packInsert(a, c);\n a._pack_prev = c;\n d3_layout_packInsert(c, b);\n b = a._pack_next;\n for (i = 3; i < n; i++) {\n d3_layout_packPlace(a, b, c = nodes[i]);\n var isect = 0, s1 = 1, s2 = 1;\n for (j = b._pack_next; j !== b; j = j._pack_next, s1++) {\n if (d3_layout_packIntersects(j, c)) {\n isect = 1;\n break;\n }\n }\n if (isect == 1) {\n for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) {\n if (d3_layout_packIntersects(k, c)) {\n break;\n }\n }\n }\n if (isect) {\n if (s1 < s2 || s1 == s2 && b.r < a.r) d3_layout_packSplice(a, b = j); else d3_layout_packSplice(a = k, b);\n i--;\n } else {\n d3_layout_packInsert(a, c);\n b = c;\n bound(c);\n }\n }\n }\n }\n var cx = (xMin + xMax) / 2, cy = (yMin + yMax) / 2, cr = 0;\n for (i = 0; i < n; i++) {\n c = nodes[i];\n c.x -= cx;\n c.y -= cy;\n cr = Math.max(cr, c.r + Math.sqrt(c.x * c.x + c.y * c.y));\n }\n node.r = cr;\n nodes.forEach(d3_layout_packUnlink);\n }\n function d3_layout_packLink(node) {\n node._pack_next = node._pack_prev = node;\n }\n function d3_layout_packUnlink(node) {\n delete node._pack_next;\n delete node._pack_prev;\n }\n function d3_layout_packTransform(node, x, y, k) {\n var children = node.children;\n node.x = x += k * node.x;\n node.y = y += k * node.y;\n node.r *= k;\n if (children) {\n var i = -1, n = children.length;\n while (++i < n) d3_layout_packTransform(children[i], x, y, k);\n }\n }\n function d3_layout_packPlace(a, b, c) {\n var db = a.r + c.r, dx = b.x - a.x, dy = b.y - a.y;\n if (db && (dx || dy)) {\n var da = b.r + c.r, dc = dx * dx + dy * dy;\n da *= da;\n db *= db;\n var x = .5 + (db - da) / (2 * dc), y = Math.sqrt(Math.max(0, 2 * da * (db + dc) - (db -= dc) * db - da * da)) / (2 * dc);\n c.x = a.x + x * dx + y * dy;\n c.y = a.y + x * dy - y * dx;\n } else {\n c.x = a.x + db;\n c.y = a.y;\n }\n }\n d3.layout.tree = function() {\n var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = null;\n function tree(d, i) {\n var nodes = hierarchy.call(this, d, i), root0 = nodes[0], root1 = wrapTree(root0);\n d3_layout_hierarchyVisitAfter(root1, firstWalk), root1.parent.m = -root1.z;\n d3_layout_hierarchyVisitBefore(root1, secondWalk);\n if (nodeSize) d3_layout_hierarchyVisitBefore(root0, sizeNode); else {\n var left = root0, right = root0, bottom = root0;\n d3_layout_hierarchyVisitBefore(root0, function(node) {\n if (node.x < left.x) left = node;\n if (node.x > right.x) right = node;\n if (node.depth > bottom.depth) bottom = node;\n });\n var tx = separation(left, right) / 2 - left.x, kx = size[0] / (right.x + separation(right, left) / 2 + tx), ky = size[1] / (bottom.depth || 1);\n d3_layout_hierarchyVisitBefore(root0, function(node) {\n node.x = (node.x + tx) * kx;\n node.y = node.depth * ky;\n });\n }\n return nodes;\n }\n function wrapTree(root0) {\n var root1 = {\n A: null,\n children: [ root0 ]\n }, queue = [ root1 ], node1;\n while ((node1 = queue.pop()) != null) {\n for (var children = node1.children, child, i = 0, n = children.length; i < n; ++i) {\n queue.push((children[i] = child = {\n _: children[i],\n parent: node1,\n children: (child = children[i].children) && child.slice() || [],\n A: null,\n a: null,\n z: 0,\n m: 0,\n c: 0,\n s: 0,\n t: null,\n i: i\n }).a = child);\n }\n }\n return root1.children[0];\n }\n function firstWalk(v) {\n var children = v.children, siblings = v.parent.children, w = v.i ? siblings[v.i - 1] : null;\n if (children.length) {\n d3_layout_treeShift(v);\n var midpoint = (children[0].z + children[children.length - 1].z) / 2;\n if (w) {\n v.z = w.z + separation(v._, w._);\n v.m = v.z - midpoint;\n } else {\n v.z = midpoint;\n }\n } else if (w) {\n v.z = w.z + separation(v._, w._);\n }\n v.parent.A = apportion(v, w, v.parent.A || siblings[0]);\n }\n function secondWalk(v) {\n v._.x = v.z + v.parent.m;\n v.m += v.parent.m;\n }\n function apportion(v, w, ancestor) {\n if (w) {\n var vip = v, vop = v, vim = w, vom = vip.parent.children[0], sip = vip.m, sop = vop.m, sim = vim.m, som = vom.m, shift;\n while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) {\n vom = d3_layout_treeLeft(vom);\n vop = d3_layout_treeRight(vop);\n vop.a = v;\n shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);\n if (shift > 0) {\n d3_layout_treeMove(d3_layout_treeAncestor(vim, v, ancestor), v, shift);\n sip += shift;\n sop += shift;\n }\n sim += vim.m;\n sip += vip.m;\n som += vom.m;\n sop += vop.m;\n }\n if (vim && !d3_layout_treeRight(vop)) {\n vop.t = vim;\n vop.m += sim - sop;\n }\n if (vip && !d3_layout_treeLeft(vom)) {\n vom.t = vip;\n vom.m += sip - som;\n ancestor = v;\n }\n }\n return ancestor;\n }\n function sizeNode(node) {\n node.x *= size[0];\n node.y = node.depth * size[1];\n }\n tree.separation = function(x) {\n if (!arguments.length) return separation;\n separation = x;\n return tree;\n };\n tree.size = function(x) {\n if (!arguments.length) return nodeSize ? null : size;\n nodeSize = (size = x) == null ? sizeNode : null;\n return tree;\n };\n tree.nodeSize = function(x) {\n if (!arguments.length) return nodeSize ? size : null;\n nodeSize = (size = x) == null ? null : sizeNode;\n return tree;\n };\n return d3_layout_hierarchyRebind(tree, hierarchy);\n };\n function d3_layout_treeSeparation(a, b) {\n return a.parent == b.parent ? 1 : 2;\n }\n function d3_layout_treeLeft(v) {\n var children = v.children;\n return children.length ? children[0] : v.t;\n }\n function d3_layout_treeRight(v) {\n var children = v.children, n;\n return (n = children.length) ? children[n - 1] : v.t;\n }\n function d3_layout_treeMove(wm, wp, shift) {\n var change = shift / (wp.i - wm.i);\n wp.c -= change;\n wp.s += shift;\n wm.c += change;\n wp.z += shift;\n wp.m += shift;\n }\n function d3_layout_treeShift(v) {\n var shift = 0, change = 0, children = v.children, i = children.length, w;\n while (--i >= 0) {\n w = children[i];\n w.z += shift;\n w.m += shift;\n shift += w.s + (change += w.c);\n }\n }\n function d3_layout_treeAncestor(vim, v, ancestor) {\n return vim.a.parent === v.parent ? vim.a : ancestor;\n }\n d3.layout.cluster = function() {\n var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = false;\n function cluster(d, i) {\n var nodes = hierarchy.call(this, d, i), root = nodes[0], previousNode, x = 0;\n d3_layout_hierarchyVisitAfter(root, function(node) {\n var children = node.children;\n if (children && children.length) {\n node.x = d3_layout_clusterX(children);\n node.y = d3_layout_clusterY(children);\n } else {\n node.x = previousNode ? x += separation(node, previousNode) : 0;\n node.y = 0;\n previousNode = node;\n }\n });\n var left = d3_layout_clusterLeft(root), right = d3_layout_clusterRight(root), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2;\n d3_layout_hierarchyVisitAfter(root, nodeSize ? function(node) {\n node.x = (node.x - root.x) * size[0];\n node.y = (root.y - node.y) * size[1];\n } : function(node) {\n node.x = (node.x - x0) / (x1 - x0) * size[0];\n node.y = (1 - (root.y ? node.y / root.y : 1)) * size[1];\n });\n return nodes;\n }\n cluster.separation = function(x) {\n if (!arguments.length) return separation;\n separation = x;\n return cluster;\n };\n cluster.size = function(x) {\n if (!arguments.length) return nodeSize ? null : size;\n nodeSize = (size = x) == null;\n return cluster;\n };\n cluster.nodeSize = function(x) {\n if (!arguments.length) return nodeSize ? size : null;\n nodeSize = (size = x) != null;\n return cluster;\n };\n return d3_layout_hierarchyRebind(cluster, hierarchy);\n };\n function d3_layout_clusterY(children) {\n return 1 + d3.max(children, function(child) {\n return child.y;\n });\n }\n function d3_layout_clusterX(children) {\n return children.reduce(function(x, child) {\n return x + child.x;\n }, 0) / children.length;\n }\n function d3_layout_clusterLeft(node) {\n var children = node.children;\n return children && children.length ? d3_layout_clusterLeft(children[0]) : node;\n }\n function d3_layout_clusterRight(node) {\n var children = node.children, n;\n return children && (n = children.length) ? d3_layout_clusterRight(children[n - 1]) : node;\n }\n d3.layout.treemap = function() {\n var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, mode = \"squarify\", ratio = .5 * (1 + Math.sqrt(5));\n function scale(children, k) {\n var i = -1, n = children.length, child, area;\n while (++i < n) {\n area = (child = children[i]).value * (k < 0 ? 0 : k);\n child.area = isNaN(area) || area <= 0 ? 0 : area;\n }\n }\n function squarify(node) {\n var children = node.children;\n if (children && children.length) {\n var rect = pad(node), row = [], remaining = children.slice(), child, best = Infinity, score, u = mode === \"slice\" ? rect.dx : mode === \"dice\" ? rect.dy : mode === \"slice-dice\" ? node.depth & 1 ? rect.dy : rect.dx : Math.min(rect.dx, rect.dy), n;\n scale(remaining, rect.dx * rect.dy / node.value);\n row.area = 0;\n while ((n = remaining.length) > 0) {\n row.push(child = remaining[n - 1]);\n row.area += child.area;\n if (mode !== \"squarify\" || (score = worst(row, u)) <= best) {\n remaining.pop();\n best = score;\n } else {\n row.area -= row.pop().area;\n position(row, u, rect, false);\n u = Math.min(rect.dx, rect.dy);\n row.length = row.area = 0;\n best = Infinity;\n }\n }\n if (row.length) {\n position(row, u, rect, true);\n row.length = row.area = 0;\n }\n children.forEach(squarify);\n }\n }\n function stickify(node) {\n var children = node.children;\n if (children && children.length) {\n var rect = pad(node), remaining = children.slice(), child, row = [];\n scale(remaining, rect.dx * rect.dy / node.value);\n row.area = 0;\n while (child = remaining.pop()) {\n row.push(child);\n row.area += child.area;\n if (child.z != null) {\n position(row, child.z ? rect.dx : rect.dy, rect, !remaining.length);\n row.length = row.area = 0;\n }\n }\n children.forEach(stickify);\n }\n }\n function worst(row, u) {\n var s = row.area, r, rmax = 0, rmin = Infinity, i = -1, n = row.length;\n while (++i < n) {\n if (!(r = row[i].area)) continue;\n if (r < rmin) rmin = r;\n if (r > rmax) rmax = r;\n }\n s *= s;\n u *= u;\n return s ? Math.max(u * rmax * ratio / s, s / (u * rmin * ratio)) : Infinity;\n }\n function position(row, u, rect, flush) {\n var i = -1, n = row.length, x = rect.x, y = rect.y, v = u ? round(row.area / u) : 0, o;\n if (u == rect.dx) {\n if (flush || v > rect.dy) v = rect.dy;\n while (++i < n) {\n o = row[i];\n o.x = x;\n o.y = y;\n o.dy = v;\n x += o.dx = Math.min(rect.x + rect.dx - x, v ? round(o.area / v) : 0);\n }\n o.z = true;\n o.dx += rect.x + rect.dx - x;\n rect.y += v;\n rect.dy -= v;\n } else {\n if (flush || v > rect.dx) v = rect.dx;\n while (++i < n) {\n o = row[i];\n o.x = x;\n o.y = y;\n o.dx = v;\n y += o.dy = Math.min(rect.y + rect.dy - y, v ? round(o.area / v) : 0);\n }\n o.z = false;\n o.dy += rect.y + rect.dy - y;\n rect.x += v;\n rect.dx -= v;\n }\n }\n function treemap(d) {\n var nodes = stickies || hierarchy(d), root = nodes[0];\n root.x = root.y = 0;\n if (root.value) root.dx = size[0], root.dy = size[1]; else root.dx = root.dy = 0;\n if (stickies) hierarchy.revalue(root);\n scale([ root ], root.dx * root.dy / root.value);\n (stickies ? stickify : squarify)(root);\n if (sticky) stickies = nodes;\n return nodes;\n }\n treemap.size = function(x) {\n if (!arguments.length) return size;\n size = x;\n return treemap;\n };\n treemap.padding = function(x) {\n if (!arguments.length) return padding;\n function padFunction(node) {\n var p = x.call(treemap, node, node.depth);\n return p == null ? d3_layout_treemapPadNull(node) : d3_layout_treemapPad(node, typeof p === \"number\" ? [ p, p, p, p ] : p);\n }\n function padConstant(node) {\n return d3_layout_treemapPad(node, x);\n }\n var type;\n pad = (padding = x) == null ? d3_layout_treemapPadNull : (type = typeof x) === \"function\" ? padFunction : type === \"number\" ? (x = [ x, x, x, x ], \n padConstant) : padConstant;\n return treemap;\n };\n treemap.round = function(x) {\n if (!arguments.length) return round != Number;\n round = x ? Math.round : Number;\n return treemap;\n };\n treemap.sticky = function(x) {\n if (!arguments.length) return sticky;\n sticky = x;\n stickies = null;\n return treemap;\n };\n treemap.ratio = function(x) {\n if (!arguments.length) return ratio;\n ratio = x;\n return treemap;\n };\n treemap.mode = function(x) {\n if (!arguments.length) return mode;\n mode = x + \"\";\n return treemap;\n };\n return d3_layout_hierarchyRebind(treemap, hierarchy);\n };\n function d3_layout_treemapPadNull(node) {\n return {\n x: node.x,\n y: node.y,\n dx: node.dx,\n dy: node.dy\n };\n }\n function d3_layout_treemapPad(node, padding) {\n var x = node.x + padding[3], y = node.y + padding[0], dx = node.dx - padding[1] - padding[3], dy = node.dy - padding[0] - padding[2];\n if (dx < 0) {\n x += dx / 2;\n dx = 0;\n }\n if (dy < 0) {\n y += dy / 2;\n dy = 0;\n }\n return {\n x: x,\n y: y,\n dx: dx,\n dy: dy\n };\n }\n d3.random = {\n normal: function(µ, σ) {\n var n = arguments.length;\n if (n < 2) σ = 1;\n if (n < 1) µ = 0;\n return function() {\n var x, y, r;\n do {\n x = Math.random() * 2 - 1;\n y = Math.random() * 2 - 1;\n r = x * x + y * y;\n } while (!r || r > 1);\n return µ + σ * x * Math.sqrt(-2 * Math.log(r) / r);\n };\n },\n logNormal: function() {\n var random = d3.random.normal.apply(d3, arguments);\n return function() {\n return Math.exp(random());\n };\n },\n bates: function(m) {\n var random = d3.random.irwinHall(m);\n return function() {\n return random() / m;\n };\n },\n irwinHall: function(m) {\n return function() {\n for (var s = 0, j = 0; j < m; j++) s += Math.random();\n return s;\n };\n }\n };\n d3.scale = {};\n function d3_scaleExtent(domain) {\n var start = domain[0], stop = domain[domain.length - 1];\n return start < stop ? [ start, stop ] : [ stop, start ];\n }\n function d3_scaleRange(scale) {\n return scale.rangeExtent ? scale.rangeExtent() : d3_scaleExtent(scale.range());\n }\n function d3_scale_bilinear(domain, range, uninterpolate, interpolate) {\n var u = uninterpolate(domain[0], domain[1]), i = interpolate(range[0], range[1]);\n return function(x) {\n return i(u(x));\n };\n }\n function d3_scale_nice(domain, nice) {\n var i0 = 0, i1 = domain.length - 1, x0 = domain[i0], x1 = domain[i1], dx;\n if (x1 < x0) {\n dx = i0, i0 = i1, i1 = dx;\n dx = x0, x0 = x1, x1 = dx;\n }\n domain[i0] = nice.floor(x0);\n domain[i1] = nice.ceil(x1);\n return domain;\n }\n function d3_scale_niceStep(step) {\n return step ? {\n floor: function(x) {\n return Math.floor(x / step) * step;\n },\n ceil: function(x) {\n return Math.ceil(x / step) * step;\n }\n } : d3_scale_niceIdentity;\n }\n var d3_scale_niceIdentity = {\n floor: d3_identity,\n ceil: d3_identity\n };\n function d3_scale_polylinear(domain, range, uninterpolate, interpolate) {\n var u = [], i = [], j = 0, k = Math.min(domain.length, range.length) - 1;\n if (domain[k] < domain[0]) {\n domain = domain.slice().reverse();\n range = range.slice().reverse();\n }\n while (++j <= k) {\n u.push(uninterpolate(domain[j - 1], domain[j]));\n i.push(interpolate(range[j - 1], range[j]));\n }\n return function(x) {\n var j = d3.bisect(domain, x, 1, k) - 1;\n return i[j](u[j](x));\n };\n }\n d3.scale.linear = function() {\n return d3_scale_linear([ 0, 1 ], [ 0, 1 ], d3_interpolate, false);\n };\n function d3_scale_linear(domain, range, interpolate, clamp) {\n var output, input;\n function rescale() {\n var linear = Math.min(domain.length, range.length) > 2 ? d3_scale_polylinear : d3_scale_bilinear, uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber;\n output = linear(domain, range, uninterpolate, interpolate);\n input = linear(range, domain, uninterpolate, d3_interpolate);\n return scale;\n }\n function scale(x) {\n return output(x);\n }\n scale.invert = function(y) {\n return input(y);\n };\n scale.domain = function(x) {\n if (!arguments.length) return domain;\n domain = x.map(Number);\n return rescale();\n };\n scale.range = function(x) {\n if (!arguments.length) return range;\n range = x;\n return rescale();\n };\n scale.rangeRound = function(x) {\n return scale.range(x).interpolate(d3_interpolateRound);\n };\n scale.clamp = function(x) {\n if (!arguments.length) return clamp;\n clamp = x;\n return rescale();\n };\n scale.interpolate = function(x) {\n if (!arguments.length) return interpolate;\n interpolate = x;\n return rescale();\n };\n scale.ticks = function(m) {\n return d3_scale_linearTicks(domain, m);\n };\n scale.tickFormat = function(m, format) {\n return d3_scale_linearTickFormat(domain, m, format);\n };\n scale.nice = function(m) {\n d3_scale_linearNice(domain, m);\n return rescale();\n };\n scale.copy = function() {\n return d3_scale_linear(domain, range, interpolate, clamp);\n };\n return rescale();\n }\n function d3_scale_linearRebind(scale, linear) {\n return d3.rebind(scale, linear, \"range\", \"rangeRound\", \"interpolate\", \"clamp\");\n }\n function d3_scale_linearNice(domain, m) {\n d3_scale_nice(domain, d3_scale_niceStep(d3_scale_linearTickRange(domain, m)[2]));\n d3_scale_nice(domain, d3_scale_niceStep(d3_scale_linearTickRange(domain, m)[2]));\n return domain;\n }\n function d3_scale_linearTickRange(domain, m) {\n if (m == null) m = 10;\n var extent = d3_scaleExtent(domain), span = extent[1] - extent[0], step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)), err = m / span * step;\n if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2;\n extent[0] = Math.ceil(extent[0] / step) * step;\n extent[1] = Math.floor(extent[1] / step) * step + step * .5;\n extent[2] = step;\n return extent;\n }\n function d3_scale_linearTicks(domain, m) {\n return d3.range.apply(d3, d3_scale_linearTickRange(domain, m));\n }\n function d3_scale_linearTickFormat(domain, m, format) {\n var range = d3_scale_linearTickRange(domain, m);\n if (format) {\n var match = d3_format_re.exec(format);\n match.shift();\n if (match[8] === \"s\") {\n var prefix = d3.formatPrefix(Math.max(abs(range[0]), abs(range[1])));\n if (!match[7]) match[7] = \".\" + d3_scale_linearPrecision(prefix.scale(range[2]));\n match[8] = \"f\";\n format = d3.format(match.join(\"\"));\n return function(d) {\n return format(prefix.scale(d)) + prefix.symbol;\n };\n }\n if (!match[7]) match[7] = \".\" + d3_scale_linearFormatPrecision(match[8], range);\n format = match.join(\"\");\n } else {\n format = \",.\" + d3_scale_linearPrecision(range[2]) + \"f\";\n }\n return d3.format(format);\n }\n var d3_scale_linearFormatSignificant = {\n s: 1,\n g: 1,\n p: 1,\n r: 1,\n e: 1\n };\n function d3_scale_linearPrecision(value) {\n return -Math.floor(Math.log(value) / Math.LN10 + .01);\n }\n function d3_scale_linearFormatPrecision(type, range) {\n var p = d3_scale_linearPrecision(range[2]);\n return type in d3_scale_linearFormatSignificant ? Math.abs(p - d3_scale_linearPrecision(Math.max(abs(range[0]), abs(range[1])))) + +(type !== \"e\") : p - (type === \"%\") * 2;\n }\n d3.scale.log = function() {\n return d3_scale_log(d3.scale.linear().domain([ 0, 1 ]), 10, true, [ 1, 10 ]);\n };\n function d3_scale_log(linear, base, positive, domain) {\n function log(x) {\n return (positive ? Math.log(x < 0 ? 0 : x) : -Math.log(x > 0 ? 0 : -x)) / Math.log(base);\n }\n function pow(x) {\n return positive ? Math.pow(base, x) : -Math.pow(base, -x);\n }\n function scale(x) {\n return linear(log(x));\n }\n scale.invert = function(x) {\n return pow(linear.invert(x));\n };\n scale.domain = function(x) {\n if (!arguments.length) return domain;\n positive = x[0] >= 0;\n linear.domain((domain = x.map(Number)).map(log));\n return scale;\n };\n scale.base = function(_) {\n if (!arguments.length) return base;\n base = +_;\n linear.domain(domain.map(log));\n return scale;\n };\n scale.nice = function() {\n var niced = d3_scale_nice(domain.map(log), positive ? Math : d3_scale_logNiceNegative);\n linear.domain(niced);\n domain = niced.map(pow);\n return scale;\n };\n scale.ticks = function() {\n var extent = d3_scaleExtent(domain), ticks = [], u = extent[0], v = extent[1], i = Math.floor(log(u)), j = Math.ceil(log(v)), n = base % 1 ? 2 : base;\n if (isFinite(j - i)) {\n if (positive) {\n for (;i < j; i++) for (var k = 1; k < n; k++) ticks.push(pow(i) * k);\n ticks.push(pow(i));\n } else {\n ticks.push(pow(i));\n for (;i++ < j; ) for (var k = n - 1; k > 0; k--) ticks.push(pow(i) * k);\n }\n for (i = 0; ticks[i] < u; i++) {}\n for (j = ticks.length; ticks[j - 1] > v; j--) {}\n ticks = ticks.slice(i, j);\n }\n return ticks;\n };\n scale.tickFormat = function(n, format) {\n if (!arguments.length) return d3_scale_logFormat;\n if (arguments.length < 2) format = d3_scale_logFormat; else if (typeof format !== \"function\") format = d3.format(format);\n var k = Math.max(1, base * n / scale.ticks().length);\n return function(d) {\n var i = d / pow(Math.round(log(d)));\n if (i * base < base - .5) i *= base;\n return i <= k ? format(d) : \"\";\n };\n };\n scale.copy = function() {\n return d3_scale_log(linear.copy(), base, positive, domain);\n };\n return d3_scale_linearRebind(scale, linear);\n }\n var d3_scale_logFormat = d3.format(\".0e\"), d3_scale_logNiceNegative = {\n floor: function(x) {\n return -Math.ceil(-x);\n },\n ceil: function(x) {\n return -Math.floor(-x);\n }\n };\n d3.scale.pow = function() {\n return d3_scale_pow(d3.scale.linear(), 1, [ 0, 1 ]);\n };\n function d3_scale_pow(linear, exponent, domain) {\n var powp = d3_scale_powPow(exponent), powb = d3_scale_powPow(1 / exponent);\n function scale(x) {\n return linear(powp(x));\n }\n scale.invert = function(x) {\n return powb(linear.invert(x));\n };\n scale.domain = function(x) {\n if (!arguments.length) return domain;\n linear.domain((domain = x.map(Number)).map(powp));\n return scale;\n };\n scale.ticks = function(m) {\n return d3_scale_linearTicks(domain, m);\n };\n scale.tickFormat = function(m, format) {\n return d3_scale_linearTickFormat(domain, m, format);\n };\n scale.nice = function(m) {\n return scale.domain(d3_scale_linearNice(domain, m));\n };\n scale.exponent = function(x) {\n if (!arguments.length) return exponent;\n powp = d3_scale_powPow(exponent = x);\n powb = d3_scale_powPow(1 / exponent);\n linear.domain(domain.map(powp));\n return scale;\n };\n scale.copy = function() {\n return d3_scale_pow(linear.copy(), exponent, domain);\n };\n return d3_scale_linearRebind(scale, linear);\n }\n function d3_scale_powPow(e) {\n return function(x) {\n return x < 0 ? -Math.pow(-x, e) : Math.pow(x, e);\n };\n }\n d3.scale.sqrt = function() {\n return d3.scale.pow().exponent(.5);\n };\n d3.scale.ordinal = function() {\n return d3_scale_ordinal([], {\n t: \"range\",\n a: [ [] ]\n });\n };\n function d3_scale_ordinal(domain, ranger) {\n var index, range, rangeBand;\n function scale(x) {\n return range[((index.get(x) || (ranger.t === \"range\" ? index.set(x, domain.push(x)) : NaN)) - 1) % range.length];\n }\n function steps(start, step) {\n return d3.range(domain.length).map(function(i) {\n return start + step * i;\n });\n }\n scale.domain = function(x) {\n if (!arguments.length) return domain;\n domain = [];\n index = new d3_Map();\n var i = -1, n = x.length, xi;\n while (++i < n) if (!index.has(xi = x[i])) index.set(xi, domain.push(xi));\n return scale[ranger.t].apply(scale, ranger.a);\n };\n scale.range = function(x) {\n if (!arguments.length) return range;\n range = x;\n rangeBand = 0;\n ranger = {\n t: \"range\",\n a: arguments\n };\n return scale;\n };\n scale.rangePoints = function(x, padding) {\n if (arguments.length < 2) padding = 0;\n var start = x[0], stop = x[1], step = domain.length < 2 ? (start = (start + stop) / 2, \n 0) : (stop - start) / (domain.length - 1 + padding);\n range = steps(start + step * padding / 2, step);\n rangeBand = 0;\n ranger = {\n t: \"rangePoints\",\n a: arguments\n };\n return scale;\n };\n scale.rangeRoundPoints = function(x, padding) {\n if (arguments.length < 2) padding = 0;\n var start = x[0], stop = x[1], step = domain.length < 2 ? (start = stop = Math.round((start + stop) / 2), \n 0) : (stop - start) / (domain.length - 1 + padding) | 0;\n range = steps(start + Math.round(step * padding / 2 + (stop - start - (domain.length - 1 + padding) * step) / 2), step);\n rangeBand = 0;\n ranger = {\n t: \"rangeRoundPoints\",\n a: arguments\n };\n return scale;\n };\n scale.rangeBands = function(x, padding, outerPadding) {\n if (arguments.length < 2) padding = 0;\n if (arguments.length < 3) outerPadding = padding;\n var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = (stop - start) / (domain.length - padding + 2 * outerPadding);\n range = steps(start + step * outerPadding, step);\n if (reverse) range.reverse();\n rangeBand = step * (1 - padding);\n ranger = {\n t: \"rangeBands\",\n a: arguments\n };\n return scale;\n };\n scale.rangeRoundBands = function(x, padding, outerPadding) {\n if (arguments.length < 2) padding = 0;\n if (arguments.length < 3) outerPadding = padding;\n var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = Math.floor((stop - start) / (domain.length - padding + 2 * outerPadding));\n range = steps(start + Math.round((stop - start - (domain.length - padding) * step) / 2), step);\n if (reverse) range.reverse();\n rangeBand = Math.round(step * (1 - padding));\n ranger = {\n t: \"rangeRoundBands\",\n a: arguments\n };\n return scale;\n };\n scale.rangeBand = function() {\n return rangeBand;\n };\n scale.rangeExtent = function() {\n return d3_scaleExtent(ranger.a[0]);\n };\n scale.copy = function() {\n return d3_scale_ordinal(domain, ranger);\n };\n return scale.domain(domain);\n }\n d3.scale.category10 = function() {\n return d3.scale.ordinal().range(d3_category10);\n };\n d3.scale.category20 = function() {\n return d3.scale.ordinal().range(d3_category20);\n };\n d3.scale.category20b = function() {\n return d3.scale.ordinal().range(d3_category20b);\n };\n d3.scale.category20c = function() {\n return d3.scale.ordinal().range(d3_category20c);\n };\n var d3_category10 = [ 2062260, 16744206, 2924588, 14034728, 9725885, 9197131, 14907330, 8355711, 12369186, 1556175 ].map(d3_rgbString);\n var d3_category20 = [ 2062260, 11454440, 16744206, 16759672, 2924588, 10018698, 14034728, 16750742, 9725885, 12955861, 9197131, 12885140, 14907330, 16234194, 8355711, 13092807, 12369186, 14408589, 1556175, 10410725 ].map(d3_rgbString);\n var d3_category20b = [ 3750777, 5395619, 7040719, 10264286, 6519097, 9216594, 11915115, 13556636, 9202993, 12426809, 15186514, 15190932, 8666169, 11356490, 14049643, 15177372, 8077683, 10834324, 13528509, 14589654 ].map(d3_rgbString);\n var d3_category20c = [ 3244733, 7057110, 10406625, 13032431, 15095053, 16616764, 16625259, 16634018, 3253076, 7652470, 10607003, 13101504, 7695281, 10394312, 12369372, 14342891, 6513507, 9868950, 12434877, 14277081 ].map(d3_rgbString);\n d3.scale.quantile = function() {\n return d3_scale_quantile([], []);\n };\n function d3_scale_quantile(domain, range) {\n var thresholds;\n function rescale() {\n var k = 0, q = range.length;\n thresholds = [];\n while (++k < q) thresholds[k - 1] = d3.quantile(domain, k / q);\n return scale;\n }\n function scale(x) {\n if (!isNaN(x = +x)) return range[d3.bisect(thresholds, x)];\n }\n scale.domain = function(x) {\n if (!arguments.length) return domain;\n domain = x.map(d3_number).filter(d3_numeric).sort(d3_ascending);\n return rescale();\n };\n scale.range = function(x) {\n if (!arguments.length) return range;\n range = x;\n return rescale();\n };\n scale.quantiles = function() {\n return thresholds;\n };\n scale.invertExtent = function(y) {\n y = range.indexOf(y);\n return y < 0 ? [ NaN, NaN ] : [ y > 0 ? thresholds[y - 1] : domain[0], y < thresholds.length ? thresholds[y] : domain[domain.length - 1] ];\n };\n scale.copy = function() {\n return d3_scale_quantile(domain, range);\n };\n return rescale();\n }\n d3.scale.quantize = function() {\n return d3_scale_quantize(0, 1, [ 0, 1 ]);\n };\n function d3_scale_quantize(x0, x1, range) {\n var kx, i;\n function scale(x) {\n return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))];\n }\n function rescale() {\n kx = range.length / (x1 - x0);\n i = range.length - 1;\n return scale;\n }\n scale.domain = function(x) {\n if (!arguments.length) return [ x0, x1 ];\n x0 = +x[0];\n x1 = +x[x.length - 1];\n return rescale();\n };\n scale.range = function(x) {\n if (!arguments.length) return range;\n range = x;\n return rescale();\n };\n scale.invertExtent = function(y) {\n y = range.indexOf(y);\n y = y < 0 ? NaN : y / kx + x0;\n return [ y, y + 1 / kx ];\n };\n scale.copy = function() {\n return d3_scale_quantize(x0, x1, range);\n };\n return rescale();\n }\n d3.scale.threshold = function() {\n return d3_scale_threshold([ .5 ], [ 0, 1 ]);\n };\n function d3_scale_threshold(domain, range) {\n function scale(x) {\n if (x <= x) return range[d3.bisect(domain, x)];\n }\n scale.domain = function(_) {\n if (!arguments.length) return domain;\n domain = _;\n return scale;\n };\n scale.range = function(_) {\n if (!arguments.length) return range;\n range = _;\n return scale;\n };\n scale.invertExtent = function(y) {\n y = range.indexOf(y);\n return [ domain[y - 1], domain[y] ];\n };\n scale.copy = function() {\n return d3_scale_threshold(domain, range);\n };\n return scale;\n }\n d3.scale.identity = function() {\n return d3_scale_identity([ 0, 1 ]);\n };\n function d3_scale_identity(domain) {\n function identity(x) {\n return +x;\n }\n identity.invert = identity;\n identity.domain = identity.range = function(x) {\n if (!arguments.length) return domain;\n domain = x.map(identity);\n return identity;\n };\n identity.ticks = function(m) {\n return d3_scale_linearTicks(domain, m);\n };\n identity.tickFormat = function(m, format) {\n return d3_scale_linearTickFormat(domain, m, format);\n };\n identity.copy = function() {\n return d3_scale_identity(domain);\n };\n return identity;\n }\n d3.svg = {};\n function d3_zero() {\n return 0;\n }\n d3.svg.arc = function() {\n var innerRadius = d3_svg_arcInnerRadius, outerRadius = d3_svg_arcOuterRadius, cornerRadius = d3_zero, padRadius = d3_svg_arcAuto, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle, padAngle = d3_svg_arcPadAngle;\n function arc() {\n var r0 = Math.max(0, +innerRadius.apply(this, arguments)), r1 = Math.max(0, +outerRadius.apply(this, arguments)), a0 = startAngle.apply(this, arguments) - halfπ, a1 = endAngle.apply(this, arguments) - halfπ, da = Math.abs(a1 - a0), cw = a0 > a1 ? 0 : 1;\n if (r1 < r0) rc = r1, r1 = r0, r0 = rc;\n if (da >= τε) return circleSegment(r1, cw) + (r0 ? circleSegment(r0, 1 - cw) : \"\") + \"Z\";\n var rc, cr, rp, ap, p0 = 0, p1 = 0, x0, y0, x1, y1, x2, y2, x3, y3, path = [];\n if (ap = (+padAngle.apply(this, arguments) || 0) / 2) {\n rp = padRadius === d3_svg_arcAuto ? Math.sqrt(r0 * r0 + r1 * r1) : +padRadius.apply(this, arguments);\n if (!cw) p1 *= -1;\n if (r1) p1 = d3_asin(rp / r1 * Math.sin(ap));\n if (r0) p0 = d3_asin(rp / r0 * Math.sin(ap));\n }\n if (r1) {\n x0 = r1 * Math.cos(a0 + p1);\n y0 = r1 * Math.sin(a0 + p1);\n x1 = r1 * Math.cos(a1 - p1);\n y1 = r1 * Math.sin(a1 - p1);\n var l1 = Math.abs(a1 - a0 - 2 * p1) <= π ? 0 : 1;\n if (p1 && d3_svg_arcSweep(x0, y0, x1, y1) === cw ^ l1) {\n var h1 = (a0 + a1) / 2;\n x0 = r1 * Math.cos(h1);\n y0 = r1 * Math.sin(h1);\n x1 = y1 = null;\n }\n } else {\n x0 = y0 = 0;\n }\n if (r0) {\n x2 = r0 * Math.cos(a1 - p0);\n y2 = r0 * Math.sin(a1 - p0);\n x3 = r0 * Math.cos(a0 + p0);\n y3 = r0 * Math.sin(a0 + p0);\n var l0 = Math.abs(a0 - a1 + 2 * p0) <= π ? 0 : 1;\n if (p0 && d3_svg_arcSweep(x2, y2, x3, y3) === 1 - cw ^ l0) {\n var h0 = (a0 + a1) / 2;\n x2 = r0 * Math.cos(h0);\n y2 = r0 * Math.sin(h0);\n x3 = y3 = null;\n }\n } else {\n x2 = y2 = 0;\n }\n if (da > ε && (rc = Math.min(Math.abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments))) > .001) {\n cr = r0 < r1 ^ cw ? 0 : 1;\n var rc1 = rc, rc0 = rc;\n if (da < π) {\n var oc = x3 == null ? [ x2, y2 ] : x1 == null ? [ x0, y0 ] : d3_geom_polygonIntersect([ x0, y0 ], [ x3, y3 ], [ x1, y1 ], [ x2, y2 ]), ax = x0 - oc[0], ay = y0 - oc[1], bx = x1 - oc[0], by = y1 - oc[1], kc = 1 / Math.sin(Math.acos((ax * bx + ay * by) / (Math.sqrt(ax * ax + ay * ay) * Math.sqrt(bx * bx + by * by))) / 2), lc = Math.sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n rc0 = Math.min(rc, (r0 - lc) / (kc - 1));\n rc1 = Math.min(rc, (r1 - lc) / (kc + 1));\n }\n if (x1 != null) {\n var t30 = d3_svg_arcCornerTangents(x3 == null ? [ x2, y2 ] : [ x3, y3 ], [ x0, y0 ], r1, rc1, cw), t12 = d3_svg_arcCornerTangents([ x1, y1 ], [ x2, y2 ], r1, rc1, cw);\n if (rc === rc1) {\n path.push(\"M\", t30[0], \"A\", rc1, \",\", rc1, \" 0 0,\", cr, \" \", t30[1], \"A\", r1, \",\", r1, \" 0 \", 1 - cw ^ d3_svg_arcSweep(t30[1][0], t30[1][1], t12[1][0], t12[1][1]), \",\", cw, \" \", t12[1], \"A\", rc1, \",\", rc1, \" 0 0,\", cr, \" \", t12[0]);\n } else {\n path.push(\"M\", t30[0], \"A\", rc1, \",\", rc1, \" 0 1,\", cr, \" \", t12[0]);\n }\n } else {\n path.push(\"M\", x0, \",\", y0);\n }\n if (x3 != null) {\n var t03 = d3_svg_arcCornerTangents([ x0, y0 ], [ x3, y3 ], r0, -rc0, cw), t21 = d3_svg_arcCornerTangents([ x2, y2 ], x1 == null ? [ x0, y0 ] : [ x1, y1 ], r0, -rc0, cw);\n if (rc === rc0) {\n path.push(\"L\", t21[0], \"A\", rc0, \",\", rc0, \" 0 0,\", cr, \" \", t21[1], \"A\", r0, \",\", r0, \" 0 \", cw ^ d3_svg_arcSweep(t21[1][0], t21[1][1], t03[1][0], t03[1][1]), \",\", 1 - cw, \" \", t03[1], \"A\", rc0, \",\", rc0, \" 0 0,\", cr, \" \", t03[0]);\n } else {\n path.push(\"L\", t21[0], \"A\", rc0, \",\", rc0, \" 0 0,\", cr, \" \", t03[0]);\n }\n } else {\n path.push(\"L\", x2, \",\", y2);\n }\n } else {\n path.push(\"M\", x0, \",\", y0);\n if (x1 != null) path.push(\"A\", r1, \",\", r1, \" 0 \", l1, \",\", cw, \" \", x1, \",\", y1);\n path.push(\"L\", x2, \",\", y2);\n if (x3 != null) path.push(\"A\", r0, \",\", r0, \" 0 \", l0, \",\", 1 - cw, \" \", x3, \",\", y3);\n }\n path.push(\"Z\");\n return path.join(\"\");\n }\n function circleSegment(r1, cw) {\n return \"M0,\" + r1 + \"A\" + r1 + \",\" + r1 + \" 0 1,\" + cw + \" 0,\" + -r1 + \"A\" + r1 + \",\" + r1 + \" 0 1,\" + cw + \" 0,\" + r1;\n }\n arc.innerRadius = function(v) {\n if (!arguments.length) return innerRadius;\n innerRadius = d3_functor(v);\n return arc;\n };\n arc.outerRadius = function(v) {\n if (!arguments.length) return outerRadius;\n outerRadius = d3_functor(v);\n return arc;\n };\n arc.cornerRadius = function(v) {\n if (!arguments.length) return cornerRadius;\n cornerRadius = d3_functor(v);\n return arc;\n };\n arc.padRadius = function(v) {\n if (!arguments.length) return padRadius;\n padRadius = v == d3_svg_arcAuto ? d3_svg_arcAuto : d3_functor(v);\n return arc;\n };\n arc.startAngle = function(v) {\n if (!arguments.length) return startAngle;\n startAngle = d3_functor(v);\n return arc;\n };\n arc.endAngle = function(v) {\n if (!arguments.length) return endAngle;\n endAngle = d3_functor(v);\n return arc;\n };\n arc.padAngle = function(v) {\n if (!arguments.length) return padAngle;\n padAngle = d3_functor(v);\n return arc;\n };\n arc.centroid = function() {\n var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - halfπ;\n return [ Math.cos(a) * r, Math.sin(a) * r ];\n };\n return arc;\n };\n var d3_svg_arcAuto = \"auto\";\n function d3_svg_arcInnerRadius(d) {\n return d.innerRadius;\n }\n function d3_svg_arcOuterRadius(d) {\n return d.outerRadius;\n }\n function d3_svg_arcStartAngle(d) {\n return d.startAngle;\n }\n function d3_svg_arcEndAngle(d) {\n return d.endAngle;\n }\n function d3_svg_arcPadAngle(d) {\n return d && d.padAngle;\n }\n function d3_svg_arcSweep(x0, y0, x1, y1) {\n return (x0 - x1) * y0 - (y0 - y1) * x0 > 0 ? 0 : 1;\n }\n function d3_svg_arcCornerTangents(p0, p1, r1, rc, cw) {\n var x01 = p0[0] - p1[0], y01 = p0[1] - p1[1], lo = (cw ? rc : -rc) / Math.sqrt(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x1 = p0[0] + ox, y1 = p0[1] + oy, x2 = p1[0] + ox, y2 = p1[1] + oy, x3 = (x1 + x2) / 2, y3 = (y1 + y2) / 2, dx = x2 - x1, dy = y2 - y1, d2 = dx * dx + dy * dy, r = r1 - rc, D = x1 * y2 - x2 * y1, d = (dy < 0 ? -1 : 1) * Math.sqrt(Math.max(0, r * r * d2 - D * D)), cx0 = (D * dy - dx * d) / d2, cy0 = (-D * dx - dy * d) / d2, cx1 = (D * dy + dx * d) / d2, cy1 = (-D * dx + dy * d) / d2, dx0 = cx0 - x3, dy0 = cy0 - y3, dx1 = cx1 - x3, dy1 = cy1 - y3;\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n return [ [ cx0 - ox, cy0 - oy ], [ cx0 * r1 / r, cy0 * r1 / r ] ];\n }\n function d3_svg_line(projection) {\n var x = d3_geom_pointX, y = d3_geom_pointY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, tension = .7;\n function line(data) {\n var segments = [], points = [], i = -1, n = data.length, d, fx = d3_functor(x), fy = d3_functor(y);\n function segment() {\n segments.push(\"M\", interpolate(projection(points), tension));\n }\n while (++i < n) {\n if (defined.call(this, d = data[i], i)) {\n points.push([ +fx.call(this, d, i), +fy.call(this, d, i) ]);\n } else if (points.length) {\n segment();\n points = [];\n }\n }\n if (points.length) segment();\n return segments.length ? segments.join(\"\") : null;\n }\n line.x = function(_) {\n if (!arguments.length) return x;\n x = _;\n return line;\n };\n line.y = function(_) {\n if (!arguments.length) return y;\n y = _;\n return line;\n };\n line.defined = function(_) {\n if (!arguments.length) return defined;\n defined = _;\n return line;\n };\n line.interpolate = function(_) {\n if (!arguments.length) return interpolateKey;\n if (typeof _ === \"function\") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;\n return line;\n };\n line.tension = function(_) {\n if (!arguments.length) return tension;\n tension = _;\n return line;\n };\n return line;\n }\n d3.svg.line = function() {\n return d3_svg_line(d3_identity);\n };\n var d3_svg_lineInterpolators = d3.map({\n linear: d3_svg_lineLinear,\n \"linear-closed\": d3_svg_lineLinearClosed,\n step: d3_svg_lineStep,\n \"step-before\": d3_svg_lineStepBefore,\n \"step-after\": d3_svg_lineStepAfter,\n basis: d3_svg_lineBasis,\n \"basis-open\": d3_svg_lineBasisOpen,\n \"basis-closed\": d3_svg_lineBasisClosed,\n bundle: d3_svg_lineBundle,\n cardinal: d3_svg_lineCardinal,\n \"cardinal-open\": d3_svg_lineCardinalOpen,\n \"cardinal-closed\": d3_svg_lineCardinalClosed,\n monotone: d3_svg_lineMonotone\n });\n d3_svg_lineInterpolators.forEach(function(key, value) {\n value.key = key;\n value.closed = /-closed$/.test(key);\n });\n function d3_svg_lineLinear(points) {\n return points.length > 1 ? points.join(\"L\") : points + \"Z\";\n }\n function d3_svg_lineLinearClosed(points) {\n return points.join(\"L\") + \"Z\";\n }\n function d3_svg_lineStep(points) {\n var i = 0, n = points.length, p = points[0], path = [ p[0], \",\", p[1] ];\n while (++i < n) path.push(\"H\", (p[0] + (p = points[i])[0]) / 2, \"V\", p[1]);\n if (n > 1) path.push(\"H\", p[0]);\n return path.join(\"\");\n }\n function d3_svg_lineStepBefore(points) {\n var i = 0, n = points.length, p = points[0], path = [ p[0], \",\", p[1] ];\n while (++i < n) path.push(\"V\", (p = points[i])[1], \"H\", p[0]);\n return path.join(\"\");\n }\n function d3_svg_lineStepAfter(points) {\n var i = 0, n = points.length, p = points[0], path = [ p[0], \",\", p[1] ];\n while (++i < n) path.push(\"H\", (p = points[i])[0], \"V\", p[1]);\n return path.join(\"\");\n }\n function d3_svg_lineCardinalOpen(points, tension) {\n return points.length < 4 ? d3_svg_lineLinear(points) : points[1] + d3_svg_lineHermite(points.slice(1, -1), d3_svg_lineCardinalTangents(points, tension));\n }\n function d3_svg_lineCardinalClosed(points, tension) {\n return points.length < 3 ? d3_svg_lineLinearClosed(points) : points[0] + d3_svg_lineHermite((points.push(points[0]), \n points), d3_svg_lineCardinalTangents([ points[points.length - 2] ].concat(points, [ points[1] ]), tension));\n }\n function d3_svg_lineCardinal(points, tension) {\n return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineCardinalTangents(points, tension));\n }\n function d3_svg_lineHermite(points, tangents) {\n if (tangents.length < 1 || points.length != tangents.length && points.length != tangents.length + 2) {\n return d3_svg_lineLinear(points);\n }\n var quad = points.length != tangents.length, path = \"\", p0 = points[0], p = points[1], t0 = tangents[0], t = t0, pi = 1;\n if (quad) {\n path += \"Q\" + (p[0] - t0[0] * 2 / 3) + \",\" + (p[1] - t0[1] * 2 / 3) + \",\" + p[0] + \",\" + p[1];\n p0 = points[1];\n pi = 2;\n }\n if (tangents.length > 1) {\n t = tangents[1];\n p = points[pi];\n pi++;\n path += \"C\" + (p0[0] + t0[0]) + \",\" + (p0[1] + t0[1]) + \",\" + (p[0] - t[0]) + \",\" + (p[1] - t[1]) + \",\" + p[0] + \",\" + p[1];\n for (var i = 2; i < tangents.length; i++, pi++) {\n p = points[pi];\n t = tangents[i];\n path += \"S\" + (p[0] - t[0]) + \",\" + (p[1] - t[1]) + \",\" + p[0] + \",\" + p[1];\n }\n }\n if (quad) {\n var lp = points[pi];\n path += \"Q\" + (p[0] + t[0] * 2 / 3) + \",\" + (p[1] + t[1] * 2 / 3) + \",\" + lp[0] + \",\" + lp[1];\n }\n return path;\n }\n function d3_svg_lineCardinalTangents(points, tension) {\n var tangents = [], a = (1 - tension) / 2, p0, p1 = points[0], p2 = points[1], i = 1, n = points.length;\n while (++i < n) {\n p0 = p1;\n p1 = p2;\n p2 = points[i];\n tangents.push([ a * (p2[0] - p0[0]), a * (p2[1] - p0[1]) ]);\n }\n return tangents;\n }\n function d3_svg_lineBasis(points) {\n if (points.length < 3) return d3_svg_lineLinear(points);\n var i = 1, n = points.length, pi = points[0], x0 = pi[0], y0 = pi[1], px = [ x0, x0, x0, (pi = points[1])[0] ], py = [ y0, y0, y0, pi[1] ], path = [ x0, \",\", y0, \"L\", d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ];\n points.push(points[n - 1]);\n while (++i <= n) {\n pi = points[i];\n px.shift();\n px.push(pi[0]);\n py.shift();\n py.push(pi[1]);\n d3_svg_lineBasisBezier(path, px, py);\n }\n points.pop();\n path.push(\"L\", pi);\n return path.join(\"\");\n }\n function d3_svg_lineBasisOpen(points) {\n if (points.length < 4) return d3_svg_lineLinear(points);\n var path = [], i = -1, n = points.length, pi, px = [ 0 ], py = [ 0 ];\n while (++i < 3) {\n pi = points[i];\n px.push(pi[0]);\n py.push(pi[1]);\n }\n path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px) + \",\" + d3_svg_lineDot4(d3_svg_lineBasisBezier3, py));\n --i;\n while (++i < n) {\n pi = points[i];\n px.shift();\n px.push(pi[0]);\n py.shift();\n py.push(pi[1]);\n d3_svg_lineBasisBezier(path, px, py);\n }\n return path.join(\"\");\n }\n function d3_svg_lineBasisClosed(points) {\n var path, i = -1, n = points.length, m = n + 4, pi, px = [], py = [];\n while (++i < 4) {\n pi = points[i % n];\n px.push(pi[0]);\n py.push(pi[1]);\n }\n path = [ d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ];\n --i;\n while (++i < m) {\n pi = points[i % n];\n px.shift();\n px.push(pi[0]);\n py.shift();\n py.push(pi[1]);\n d3_svg_lineBasisBezier(path, px, py);\n }\n return path.join(\"\");\n }\n function d3_svg_lineBundle(points, tension) {\n var n = points.length - 1;\n if (n) {\n var x0 = points[0][0], y0 = points[0][1], dx = points[n][0] - x0, dy = points[n][1] - y0, i = -1, p, t;\n while (++i <= n) {\n p = points[i];\n t = i / n;\n p[0] = tension * p[0] + (1 - tension) * (x0 + t * dx);\n p[1] = tension * p[1] + (1 - tension) * (y0 + t * dy);\n }\n }\n return d3_svg_lineBasis(points);\n }\n function d3_svg_lineDot4(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n }\n var d3_svg_lineBasisBezier1 = [ 0, 2 / 3, 1 / 3, 0 ], d3_svg_lineBasisBezier2 = [ 0, 1 / 3, 2 / 3, 0 ], d3_svg_lineBasisBezier3 = [ 0, 1 / 6, 2 / 3, 1 / 6 ];\n function d3_svg_lineBasisBezier(path, x, y) {\n path.push(\"C\", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier1, y), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier2, x), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier2, y), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier3, x), \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier3, y));\n }\n function d3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n }\n function d3_svg_lineFiniteDifferences(points) {\n var i = 0, j = points.length - 1, m = [], p0 = points[0], p1 = points[1], d = m[0] = d3_svg_lineSlope(p0, p1);\n while (++i < j) {\n m[i] = (d + (d = d3_svg_lineSlope(p0 = p1, p1 = points[i + 1]))) / 2;\n }\n m[i] = d;\n return m;\n }\n function d3_svg_lineMonotoneTangents(points) {\n var tangents = [], d, a, b, s, m = d3_svg_lineFiniteDifferences(points), i = -1, j = points.length - 1;\n while (++i < j) {\n d = d3_svg_lineSlope(points[i], points[i + 1]);\n if (abs(d) < ε) {\n m[i] = m[i + 1] = 0;\n } else {\n a = m[i] / d;\n b = m[i + 1] / d;\n s = a * a + b * b;\n if (s > 9) {\n s = d * 3 / Math.sqrt(s);\n m[i] = s * a;\n m[i + 1] = s * b;\n }\n }\n }\n i = -1;\n while (++i <= j) {\n s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0]) / (6 * (1 + m[i] * m[i]));\n tangents.push([ s || 0, m[i] * s || 0 ]);\n }\n return tangents;\n }\n function d3_svg_lineMonotone(points) {\n return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points));\n }\n d3.svg.line.radial = function() {\n var line = d3_svg_line(d3_svg_lineRadial);\n line.radius = line.x, delete line.x;\n line.angle = line.y, delete line.y;\n return line;\n };\n function d3_svg_lineRadial(points) {\n var point, i = -1, n = points.length, r, a;\n while (++i < n) {\n point = points[i];\n r = point[0];\n a = point[1] - halfπ;\n point[0] = r * Math.cos(a);\n point[1] = r * Math.sin(a);\n }\n return points;\n }\n function d3_svg_area(projection) {\n var x0 = d3_geom_pointX, x1 = d3_geom_pointX, y0 = 0, y1 = d3_geom_pointY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, interpolateReverse = interpolate, L = \"L\", tension = .7;\n function area(data) {\n var segments = [], points0 = [], points1 = [], i = -1, n = data.length, d, fx0 = d3_functor(x0), fy0 = d3_functor(y0), fx1 = x0 === x1 ? function() {\n return x;\n } : d3_functor(x1), fy1 = y0 === y1 ? function() {\n return y;\n } : d3_functor(y1), x, y;\n function segment() {\n segments.push(\"M\", interpolate(projection(points1), tension), L, interpolateReverse(projection(points0.reverse()), tension), \"Z\");\n }\n while (++i < n) {\n if (defined.call(this, d = data[i], i)) {\n points0.push([ x = +fx0.call(this, d, i), y = +fy0.call(this, d, i) ]);\n points1.push([ +fx1.call(this, d, i), +fy1.call(this, d, i) ]);\n } else if (points0.length) {\n segment();\n points0 = [];\n points1 = [];\n }\n }\n if (points0.length) segment();\n return segments.length ? segments.join(\"\") : null;\n }\n area.x = function(_) {\n if (!arguments.length) return x1;\n x0 = x1 = _;\n return area;\n };\n area.x0 = function(_) {\n if (!arguments.length) return x0;\n x0 = _;\n return area;\n };\n area.x1 = function(_) {\n if (!arguments.length) return x1;\n x1 = _;\n return area;\n };\n area.y = function(_) {\n if (!arguments.length) return y1;\n y0 = y1 = _;\n return area;\n };\n area.y0 = function(_) {\n if (!arguments.length) return y0;\n y0 = _;\n return area;\n };\n area.y1 = function(_) {\n if (!arguments.length) return y1;\n y1 = _;\n return area;\n };\n area.defined = function(_) {\n if (!arguments.length) return defined;\n defined = _;\n return area;\n };\n area.interpolate = function(_) {\n if (!arguments.length) return interpolateKey;\n if (typeof _ === \"function\") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;\n interpolateReverse = interpolate.reverse || interpolate;\n L = interpolate.closed ? \"M\" : \"L\";\n return area;\n };\n area.tension = function(_) {\n if (!arguments.length) return tension;\n tension = _;\n return area;\n };\n return area;\n }\n d3_svg_lineStepBefore.reverse = d3_svg_lineStepAfter;\n d3_svg_lineStepAfter.reverse = d3_svg_lineStepBefore;\n d3.svg.area = function() {\n return d3_svg_area(d3_identity);\n };\n d3.svg.area.radial = function() {\n var area = d3_svg_area(d3_svg_lineRadial);\n area.radius = area.x, delete area.x;\n area.innerRadius = area.x0, delete area.x0;\n area.outerRadius = area.x1, delete area.x1;\n area.angle = area.y, delete area.y;\n area.startAngle = area.y0, delete area.y0;\n area.endAngle = area.y1, delete area.y1;\n return area;\n };\n d3.svg.chord = function() {\n var source = d3_source, target = d3_target, radius = d3_svg_chordRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;\n function chord(d, i) {\n var s = subgroup(this, source, d, i), t = subgroup(this, target, d, i);\n return \"M\" + s.p0 + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t) ? curve(s.r, s.p1, s.r, s.p0) : curve(s.r, s.p1, t.r, t.p0) + arc(t.r, t.p1, t.a1 - t.a0) + curve(t.r, t.p1, s.r, s.p0)) + \"Z\";\n }\n function subgroup(self, f, d, i) {\n var subgroup = f.call(self, d, i), r = radius.call(self, subgroup, i), a0 = startAngle.call(self, subgroup, i) - halfπ, a1 = endAngle.call(self, subgroup, i) - halfπ;\n return {\n r: r,\n a0: a0,\n a1: a1,\n p0: [ r * Math.cos(a0), r * Math.sin(a0) ],\n p1: [ r * Math.cos(a1), r * Math.sin(a1) ]\n };\n }\n function equals(a, b) {\n return a.a0 == b.a0 && a.a1 == b.a1;\n }\n function arc(r, p, a) {\n return \"A\" + r + \",\" + r + \" 0 \" + +(a > π) + \",1 \" + p;\n }\n function curve(r0, p0, r1, p1) {\n return \"Q 0,0 \" + p1;\n }\n chord.radius = function(v) {\n if (!arguments.length) return radius;\n radius = d3_functor(v);\n return chord;\n };\n chord.source = function(v) {\n if (!arguments.length) return source;\n source = d3_functor(v);\n return chord;\n };\n chord.target = function(v) {\n if (!arguments.length) return target;\n target = d3_functor(v);\n return chord;\n };\n chord.startAngle = function(v) {\n if (!arguments.length) return startAngle;\n startAngle = d3_functor(v);\n return chord;\n };\n chord.endAngle = function(v) {\n if (!arguments.length) return endAngle;\n endAngle = d3_functor(v);\n return chord;\n };\n return chord;\n };\n function d3_svg_chordRadius(d) {\n return d.radius;\n }\n d3.svg.diagonal = function() {\n var source = d3_source, target = d3_target, projection = d3_svg_diagonalProjection;\n function diagonal(d, i) {\n var p0 = source.call(this, d, i), p3 = target.call(this, d, i), m = (p0.y + p3.y) / 2, p = [ p0, {\n x: p0.x,\n y: m\n }, {\n x: p3.x,\n y: m\n }, p3 ];\n p = p.map(projection);\n return \"M\" + p[0] + \"C\" + p[1] + \" \" + p[2] + \" \" + p[3];\n }\n diagonal.source = function(x) {\n if (!arguments.length) return source;\n source = d3_functor(x);\n return diagonal;\n };\n diagonal.target = function(x) {\n if (!arguments.length) return target;\n target = d3_functor(x);\n return diagonal;\n };\n diagonal.projection = function(x) {\n if (!arguments.length) return projection;\n projection = x;\n return diagonal;\n };\n return diagonal;\n };\n function d3_svg_diagonalProjection(d) {\n return [ d.x, d.y ];\n }\n d3.svg.diagonal.radial = function() {\n var diagonal = d3.svg.diagonal(), projection = d3_svg_diagonalProjection, projection_ = diagonal.projection;\n diagonal.projection = function(x) {\n return arguments.length ? projection_(d3_svg_diagonalRadialProjection(projection = x)) : projection;\n };\n return diagonal;\n };\n function d3_svg_diagonalRadialProjection(projection) {\n return function() {\n var d = projection.apply(this, arguments), r = d[0], a = d[1] - halfπ;\n return [ r * Math.cos(a), r * Math.sin(a) ];\n };\n }\n d3.svg.symbol = function() {\n var type = d3_svg_symbolType, size = d3_svg_symbolSize;\n function symbol(d, i) {\n return (d3_svg_symbols.get(type.call(this, d, i)) || d3_svg_symbolCircle)(size.call(this, d, i));\n }\n symbol.type = function(x) {\n if (!arguments.length) return type;\n type = d3_functor(x);\n return symbol;\n };\n symbol.size = function(x) {\n if (!arguments.length) return size;\n size = d3_functor(x);\n return symbol;\n };\n return symbol;\n };\n function d3_svg_symbolSize() {\n return 64;\n }\n function d3_svg_symbolType() {\n return \"circle\";\n }\n function d3_svg_symbolCircle(size) {\n var r = Math.sqrt(size / π);\n return \"M0,\" + r + \"A\" + r + \",\" + r + \" 0 1,1 0,\" + -r + \"A\" + r + \",\" + r + \" 0 1,1 0,\" + r + \"Z\";\n }\n var d3_svg_symbols = d3.map({\n circle: d3_svg_symbolCircle,\n cross: function(size) {\n var r = Math.sqrt(size / 5) / 2;\n return \"M\" + -3 * r + \",\" + -r + \"H\" + -r + \"V\" + -3 * r + \"H\" + r + \"V\" + -r + \"H\" + 3 * r + \"V\" + r + \"H\" + r + \"V\" + 3 * r + \"H\" + -r + \"V\" + r + \"H\" + -3 * r + \"Z\";\n },\n diamond: function(size) {\n var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)), rx = ry * d3_svg_symbolTan30;\n return \"M0,\" + -ry + \"L\" + rx + \",0\" + \" 0,\" + ry + \" \" + -rx + \",0\" + \"Z\";\n },\n square: function(size) {\n var r = Math.sqrt(size) / 2;\n return \"M\" + -r + \",\" + -r + \"L\" + r + \",\" + -r + \" \" + r + \",\" + r + \" \" + -r + \",\" + r + \"Z\";\n },\n \"triangle-down\": function(size) {\n var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;\n return \"M0,\" + ry + \"L\" + rx + \",\" + -ry + \" \" + -rx + \",\" + -ry + \"Z\";\n },\n \"triangle-up\": function(size) {\n var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;\n return \"M0,\" + -ry + \"L\" + rx + \",\" + ry + \" \" + -rx + \",\" + ry + \"Z\";\n }\n });\n d3.svg.symbolTypes = d3_svg_symbols.keys();\n var d3_svg_symbolSqrt3 = Math.sqrt(3), d3_svg_symbolTan30 = Math.tan(30 * d3_radians);\n d3_selectionPrototype.transition = function(name) {\n var id = d3_transitionInheritId || ++d3_transitionId, ns = d3_transitionNamespace(name), subgroups = [], subgroup, node, transition = d3_transitionInherit || {\n time: Date.now(),\n ease: d3_ease_cubicInOut,\n delay: 0,\n duration: 250\n };\n for (var j = -1, m = this.length; ++j < m; ) {\n subgroups.push(subgroup = []);\n for (var group = this[j], i = -1, n = group.length; ++i < n; ) {\n if (node = group[i]) d3_transitionNode(node, i, ns, id, transition);\n subgroup.push(node);\n }\n }\n return d3_transition(subgroups, ns, id);\n };\n d3_selectionPrototype.interrupt = function(name) {\n return this.each(name == null ? d3_selection_interrupt : d3_selection_interruptNS(d3_transitionNamespace(name)));\n };\n var d3_selection_interrupt = d3_selection_interruptNS(d3_transitionNamespace());\n function d3_selection_interruptNS(ns) {\n return function() {\n var lock, activeId, active;\n if ((lock = this[ns]) && (active = lock[activeId = lock.active])) {\n active.timer.c = null;\n active.timer.t = NaN;\n if (--lock.count) delete lock[activeId]; else delete this[ns];\n lock.active += .5;\n active.event && active.event.interrupt.call(this, this.__data__, active.index);\n }\n };\n }\n function d3_transition(groups, ns, id) {\n d3_subclass(groups, d3_transitionPrototype);\n groups.namespace = ns;\n groups.id = id;\n return groups;\n }\n var d3_transitionPrototype = [], d3_transitionId = 0, d3_transitionInheritId, d3_transitionInherit;\n d3_transitionPrototype.call = d3_selectionPrototype.call;\n d3_transitionPrototype.empty = d3_selectionPrototype.empty;\n d3_transitionPrototype.node = d3_selectionPrototype.node;\n d3_transitionPrototype.size = d3_selectionPrototype.size;\n d3.transition = function(selection, name) {\n return selection && selection.transition ? d3_transitionInheritId ? selection.transition(name) : selection : d3.selection().transition(selection);\n };\n d3.transition.prototype = d3_transitionPrototype;\n d3_transitionPrototype.select = function(selector) {\n var id = this.id, ns = this.namespace, subgroups = [], subgroup, subnode, node;\n selector = d3_selection_selector(selector);\n for (var j = -1, m = this.length; ++j < m; ) {\n subgroups.push(subgroup = []);\n for (var group = this[j], i = -1, n = group.length; ++i < n; ) {\n if ((node = group[i]) && (subnode = selector.call(node, node.__data__, i, j))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n d3_transitionNode(subnode, i, ns, id, node[ns][id]);\n subgroup.push(subnode);\n } else {\n subgroup.push(null);\n }\n }\n }\n return d3_transition(subgroups, ns, id);\n };\n d3_transitionPrototype.selectAll = function(selector) {\n var id = this.id, ns = this.namespace, subgroups = [], subgroup, subnodes, node, subnode, transition;\n selector = d3_selection_selectorAll(selector);\n for (var j = -1, m = this.length; ++j < m; ) {\n for (var group = this[j], i = -1, n = group.length; ++i < n; ) {\n if (node = group[i]) {\n transition = node[ns][id];\n subnodes = selector.call(node, node.__data__, i, j);\n subgroups.push(subgroup = []);\n for (var k = -1, o = subnodes.length; ++k < o; ) {\n if (subnode = subnodes[k]) d3_transitionNode(subnode, k, ns, id, transition);\n subgroup.push(subnode);\n }\n }\n }\n }\n return d3_transition(subgroups, ns, id);\n };\n d3_transitionPrototype.filter = function(filter) {\n var subgroups = [], subgroup, group, node;\n if (typeof filter !== \"function\") filter = d3_selection_filter(filter);\n for (var j = 0, m = this.length; j < m; j++) {\n subgroups.push(subgroup = []);\n for (var group = this[j], i = 0, n = group.length; i < n; i++) {\n if ((node = group[i]) && filter.call(node, node.__data__, i, j)) {\n subgroup.push(node);\n }\n }\n }\n return d3_transition(subgroups, this.namespace, this.id);\n };\n d3_transitionPrototype.tween = function(name, tween) {\n var id = this.id, ns = this.namespace;\n if (arguments.length < 2) return this.node()[ns][id].tween.get(name);\n return d3_selection_each(this, tween == null ? function(node) {\n node[ns][id].tween.remove(name);\n } : function(node) {\n node[ns][id].tween.set(name, tween);\n });\n };\n function d3_transition_tween(groups, name, value, tween) {\n var id = groups.id, ns = groups.namespace;\n return d3_selection_each(groups, typeof value === \"function\" ? function(node, i, j) {\n node[ns][id].tween.set(name, tween(value.call(node, node.__data__, i, j)));\n } : (value = tween(value), function(node) {\n node[ns][id].tween.set(name, value);\n }));\n }\n d3_transitionPrototype.attr = function(nameNS, value) {\n if (arguments.length < 2) {\n for (value in nameNS) this.attr(value, nameNS[value]);\n return this;\n }\n var interpolate = nameNS == \"transform\" ? d3_interpolateTransform : d3_interpolate, name = d3.ns.qualify(nameNS);\n function attrNull() {\n this.removeAttribute(name);\n }\n function attrNullNS() {\n this.removeAttributeNS(name.space, name.local);\n }\n function attrTween(b) {\n return b == null ? attrNull : (b += \"\", function() {\n var a = this.getAttribute(name), i;\n return a !== b && (i = interpolate(a, b), function(t) {\n this.setAttribute(name, i(t));\n });\n });\n }\n function attrTweenNS(b) {\n return b == null ? attrNullNS : (b += \"\", function() {\n var a = this.getAttributeNS(name.space, name.local), i;\n return a !== b && (i = interpolate(a, b), function(t) {\n this.setAttributeNS(name.space, name.local, i(t));\n });\n });\n }\n return d3_transition_tween(this, \"attr.\" + nameNS, value, name.local ? attrTweenNS : attrTween);\n };\n d3_transitionPrototype.attrTween = function(nameNS, tween) {\n var name = d3.ns.qualify(nameNS);\n function attrTween(d, i) {\n var f = tween.call(this, d, i, this.getAttribute(name));\n return f && function(t) {\n this.setAttribute(name, f(t));\n };\n }\n function attrTweenNS(d, i) {\n var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local));\n return f && function(t) {\n this.setAttributeNS(name.space, name.local, f(t));\n };\n }\n return this.tween(\"attr.\" + nameNS, name.local ? attrTweenNS : attrTween);\n };\n d3_transitionPrototype.style = function(name, value, priority) {\n var n = arguments.length;\n if (n < 3) {\n if (typeof name !== \"string\") {\n if (n < 2) value = \"\";\n for (priority in name) this.style(priority, name[priority], value);\n return this;\n }\n priority = \"\";\n }\n function styleNull() {\n this.style.removeProperty(name);\n }\n function styleString(b) {\n return b == null ? styleNull : (b += \"\", function() {\n var a = d3_window(this).getComputedStyle(this, null).getPropertyValue(name), i;\n return a !== b && (i = d3_interpolate(a, b), function(t) {\n this.style.setProperty(name, i(t), priority);\n });\n });\n }\n return d3_transition_tween(this, \"style.\" + name, value, styleString);\n };\n d3_transitionPrototype.styleTween = function(name, tween, priority) {\n if (arguments.length < 3) priority = \"\";\n function styleTween(d, i) {\n var f = tween.call(this, d, i, d3_window(this).getComputedStyle(this, null).getPropertyValue(name));\n return f && function(t) {\n this.style.setProperty(name, f(t), priority);\n };\n }\n return this.tween(\"style.\" + name, styleTween);\n };\n d3_transitionPrototype.text = function(value) {\n return d3_transition_tween(this, \"text\", value, d3_transition_text);\n };\n function d3_transition_text(b) {\n if (b == null) b = \"\";\n return function() {\n this.textContent = b;\n };\n }\n d3_transitionPrototype.remove = function() {\n var ns = this.namespace;\n return this.each(\"end.transition\", function() {\n var p;\n if (this[ns].count < 2 && (p = this.parentNode)) p.removeChild(this);\n });\n };\n d3_transitionPrototype.ease = function(value) {\n var id = this.id, ns = this.namespace;\n if (arguments.length < 1) return this.node()[ns][id].ease;\n if (typeof value !== \"function\") value = d3.ease.apply(d3, arguments);\n return d3_selection_each(this, function(node) {\n node[ns][id].ease = value;\n });\n };\n d3_transitionPrototype.delay = function(value) {\n var id = this.id, ns = this.namespace;\n if (arguments.length < 1) return this.node()[ns][id].delay;\n return d3_selection_each(this, typeof value === \"function\" ? function(node, i, j) {\n node[ns][id].delay = +value.call(node, node.__data__, i, j);\n } : (value = +value, function(node) {\n node[ns][id].delay = value;\n }));\n };\n d3_transitionPrototype.duration = function(value) {\n var id = this.id, ns = this.namespace;\n if (arguments.length < 1) return this.node()[ns][id].duration;\n return d3_selection_each(this, typeof value === \"function\" ? function(node, i, j) {\n node[ns][id].duration = Math.max(1, value.call(node, node.__data__, i, j));\n } : (value = Math.max(1, value), function(node) {\n node[ns][id].duration = value;\n }));\n };\n d3_transitionPrototype.each = function(type, listener) {\n var id = this.id, ns = this.namespace;\n if (arguments.length < 2) {\n var inherit = d3_transitionInherit, inheritId = d3_transitionInheritId;\n try {\n d3_transitionInheritId = id;\n d3_selection_each(this, function(node, i, j) {\n d3_transitionInherit = node[ns][id];\n type.call(node, node.__data__, i, j);\n });\n } finally {\n d3_transitionInherit = inherit;\n d3_transitionInheritId = inheritId;\n }\n } else {\n d3_selection_each(this, function(node) {\n var transition = node[ns][id];\n (transition.event || (transition.event = d3.dispatch(\"start\", \"end\", \"interrupt\"))).on(type, listener);\n });\n }\n return this;\n };\n d3_transitionPrototype.transition = function() {\n var id0 = this.id, id1 = ++d3_transitionId, ns = this.namespace, subgroups = [], subgroup, group, node, transition;\n for (var j = 0, m = this.length; j < m; j++) {\n subgroups.push(subgroup = []);\n for (var group = this[j], i = 0, n = group.length; i < n; i++) {\n if (node = group[i]) {\n transition = node[ns][id0];\n d3_transitionNode(node, i, ns, id1, {\n time: transition.time,\n ease: transition.ease,\n delay: transition.delay + transition.duration,\n duration: transition.duration\n });\n }\n subgroup.push(node);\n }\n }\n return d3_transition(subgroups, ns, id1);\n };\n function d3_transitionNamespace(name) {\n return name == null ? \"__transition__\" : \"__transition_\" + name + \"__\";\n }\n function d3_transitionNode(node, i, ns, id, inherit) {\n var lock = node[ns] || (node[ns] = {\n active: 0,\n count: 0\n }), transition = lock[id], time, timer, duration, ease, tweens;\n function schedule(elapsed) {\n var delay = transition.delay;\n timer.t = delay + time;\n if (delay <= elapsed) return start(elapsed - delay);\n timer.c = start;\n }\n function start(elapsed) {\n var activeId = lock.active, active = lock[activeId];\n if (active) {\n active.timer.c = null;\n active.timer.t = NaN;\n --lock.count;\n delete lock[activeId];\n active.event && active.event.interrupt.call(node, node.__data__, active.index);\n }\n for (var cancelId in lock) {\n if (+cancelId < id) {\n var cancel = lock[cancelId];\n cancel.timer.c = null;\n cancel.timer.t = NaN;\n --lock.count;\n delete lock[cancelId];\n }\n }\n timer.c = tick;\n d3_timer(function() {\n if (timer.c && tick(elapsed || 1)) {\n timer.c = null;\n timer.t = NaN;\n }\n return 1;\n }, 0, time);\n lock.active = id;\n transition.event && transition.event.start.call(node, node.__data__, i);\n tweens = [];\n transition.tween.forEach(function(key, value) {\n if (value = value.call(node, node.__data__, i)) {\n tweens.push(value);\n }\n });\n ease = transition.ease;\n duration = transition.duration;\n }\n function tick(elapsed) {\n var t = elapsed / duration, e = ease(t), n = tweens.length;\n while (n > 0) {\n tweens[--n].call(node, e);\n }\n if (t >= 1) {\n transition.event && transition.event.end.call(node, node.__data__, i);\n if (--lock.count) delete lock[id]; else delete node[ns];\n return 1;\n }\n }\n if (!transition) {\n time = inherit.time;\n timer = d3_timer(schedule, 0, time);\n transition = lock[id] = {\n tween: new d3_Map(),\n time: time,\n timer: timer,\n delay: inherit.delay,\n duration: inherit.duration,\n ease: inherit.ease,\n index: i\n };\n inherit = null;\n ++lock.count;\n }\n }\n d3.svg.axis = function() {\n var scale = d3.scale.linear(), orient = d3_svg_axisDefaultOrient, innerTickSize = 6, outerTickSize = 6, tickPadding = 3, tickArguments_ = [ 10 ], tickValues = null, tickFormat_;\n function axis(g) {\n g.each(function() {\n var g = d3.select(this);\n var scale0 = this.__chart__ || scale, scale1 = this.__chart__ = scale.copy();\n var ticks = tickValues == null ? scale1.ticks ? scale1.ticks.apply(scale1, tickArguments_) : scale1.domain() : tickValues, tickFormat = tickFormat_ == null ? scale1.tickFormat ? scale1.tickFormat.apply(scale1, tickArguments_) : d3_identity : tickFormat_, tick = g.selectAll(\".tick\").data(ticks, scale1), tickEnter = tick.enter().insert(\"g\", \".domain\").attr(\"class\", \"tick\").style(\"opacity\", ε), tickExit = d3.transition(tick.exit()).style(\"opacity\", ε).remove(), tickUpdate = d3.transition(tick.order()).style(\"opacity\", 1), tickSpacing = Math.max(innerTickSize, 0) + tickPadding, tickTransform;\n var range = d3_scaleRange(scale1), path = g.selectAll(\".domain\").data([ 0 ]), pathUpdate = (path.enter().append(\"path\").attr(\"class\", \"domain\"), \n d3.transition(path));\n tickEnter.append(\"line\");\n tickEnter.append(\"text\");\n var lineEnter = tickEnter.select(\"line\"), lineUpdate = tickUpdate.select(\"line\"), text = tick.select(\"text\").text(tickFormat), textEnter = tickEnter.select(\"text\"), textUpdate = tickUpdate.select(\"text\"), sign = orient === \"top\" || orient === \"left\" ? -1 : 1, x1, x2, y1, y2;\n if (orient === \"bottom\" || orient === \"top\") {\n tickTransform = d3_svg_axisX, x1 = \"x\", y1 = \"y\", x2 = \"x2\", y2 = \"y2\";\n text.attr(\"dy\", sign < 0 ? \"0em\" : \".71em\").style(\"text-anchor\", \"middle\");\n pathUpdate.attr(\"d\", \"M\" + range[0] + \",\" + sign * outerTickSize + \"V0H\" + range[1] + \"V\" + sign * outerTickSize);\n } else {\n tickTransform = d3_svg_axisY, x1 = \"y\", y1 = \"x\", x2 = \"y2\", y2 = \"x2\";\n text.attr(\"dy\", \".32em\").style(\"text-anchor\", sign < 0 ? \"end\" : \"start\");\n pathUpdate.attr(\"d\", \"M\" + sign * outerTickSize + \",\" + range[0] + \"H0V\" + range[1] + \"H\" + sign * outerTickSize);\n }\n lineEnter.attr(y2, sign * innerTickSize);\n textEnter.attr(y1, sign * tickSpacing);\n lineUpdate.attr(x2, 0).attr(y2, sign * innerTickSize);\n textUpdate.attr(x1, 0).attr(y1, sign * tickSpacing);\n if (scale1.rangeBand) {\n var x = scale1, dx = x.rangeBand() / 2;\n scale0 = scale1 = function(d) {\n return x(d) + dx;\n };\n } else if (scale0.rangeBand) {\n scale0 = scale1;\n } else {\n tickExit.call(tickTransform, scale1, scale0);\n }\n tickEnter.call(tickTransform, scale0, scale1);\n tickUpdate.call(tickTransform, scale1, scale1);\n });\n }\n axis.scale = function(x) {\n if (!arguments.length) return scale;\n scale = x;\n return axis;\n };\n axis.orient = function(x) {\n if (!arguments.length) return orient;\n orient = x in d3_svg_axisOrients ? x + \"\" : d3_svg_axisDefaultOrient;\n return axis;\n };\n axis.ticks = function() {\n if (!arguments.length) return tickArguments_;\n tickArguments_ = d3_array(arguments);\n return axis;\n };\n axis.tickValues = function(x) {\n if (!arguments.length) return tickValues;\n tickValues = x;\n return axis;\n };\n axis.tickFormat = function(x) {\n if (!arguments.length) return tickFormat_;\n tickFormat_ = x;\n return axis;\n };\n axis.tickSize = function(x) {\n var n = arguments.length;\n if (!n) return innerTickSize;\n innerTickSize = +x;\n outerTickSize = +arguments[n - 1];\n return axis;\n };\n axis.innerTickSize = function(x) {\n if (!arguments.length) return innerTickSize;\n innerTickSize = +x;\n return axis;\n };\n axis.outerTickSize = function(x) {\n if (!arguments.length) return outerTickSize;\n outerTickSize = +x;\n return axis;\n };\n axis.tickPadding = function(x) {\n if (!arguments.length) return tickPadding;\n tickPadding = +x;\n return axis;\n };\n axis.tickSubdivide = function() {\n return arguments.length && axis;\n };\n return axis;\n };\n var d3_svg_axisDefaultOrient = \"bottom\", d3_svg_axisOrients = {\n top: 1,\n right: 1,\n bottom: 1,\n left: 1\n };\n function d3_svg_axisX(selection, x0, x1) {\n selection.attr(\"transform\", function(d) {\n var v0 = x0(d);\n return \"translate(\" + (isFinite(v0) ? v0 : x1(d)) + \",0)\";\n });\n }\n function d3_svg_axisY(selection, y0, y1) {\n selection.attr(\"transform\", function(d) {\n var v0 = y0(d);\n return \"translate(0,\" + (isFinite(v0) ? v0 : y1(d)) + \")\";\n });\n }\n d3.svg.brush = function() {\n var event = d3_eventDispatch(brush, \"brushstart\", \"brush\", \"brushend\"), x = null, y = null, xExtent = [ 0, 0 ], yExtent = [ 0, 0 ], xExtentDomain, yExtentDomain, xClamp = true, yClamp = true, resizes = d3_svg_brushResizes[0];\n function brush(g) {\n g.each(function() {\n var g = d3.select(this).style(\"pointer-events\", \"all\").style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\").on(\"mousedown.brush\", brushstart).on(\"touchstart.brush\", brushstart);\n var background = g.selectAll(\".background\").data([ 0 ]);\n background.enter().append(\"rect\").attr(\"class\", \"background\").style(\"visibility\", \"hidden\").style(\"cursor\", \"crosshair\");\n g.selectAll(\".extent\").data([ 0 ]).enter().append(\"rect\").attr(\"class\", \"extent\").style(\"cursor\", \"move\");\n var resize = g.selectAll(\".resize\").data(resizes, d3_identity);\n resize.exit().remove();\n resize.enter().append(\"g\").attr(\"class\", function(d) {\n return \"resize \" + d;\n }).style(\"cursor\", function(d) {\n return d3_svg_brushCursor[d];\n }).append(\"rect\").attr(\"x\", function(d) {\n return /[ew]$/.test(d) ? -3 : null;\n }).attr(\"y\", function(d) {\n return /^[ns]/.test(d) ? -3 : null;\n }).attr(\"width\", 6).attr(\"height\", 6).style(\"visibility\", \"hidden\");\n resize.style(\"display\", brush.empty() ? \"none\" : null);\n var gUpdate = d3.transition(g), backgroundUpdate = d3.transition(background), range;\n if (x) {\n range = d3_scaleRange(x);\n backgroundUpdate.attr(\"x\", range[0]).attr(\"width\", range[1] - range[0]);\n redrawX(gUpdate);\n }\n if (y) {\n range = d3_scaleRange(y);\n backgroundUpdate.attr(\"y\", range[0]).attr(\"height\", range[1] - range[0]);\n redrawY(gUpdate);\n }\n redraw(gUpdate);\n });\n }\n brush.event = function(g) {\n g.each(function() {\n var event_ = event.of(this, arguments), extent1 = {\n x: xExtent,\n y: yExtent,\n i: xExtentDomain,\n j: yExtentDomain\n }, extent0 = this.__chart__ || extent1;\n this.__chart__ = extent1;\n if (d3_transitionInheritId) {\n d3.select(this).transition().each(\"start.brush\", function() {\n xExtentDomain = extent0.i;\n yExtentDomain = extent0.j;\n xExtent = extent0.x;\n yExtent = extent0.y;\n event_({\n type: \"brushstart\"\n });\n }).tween(\"brush:brush\", function() {\n var xi = d3_interpolateArray(xExtent, extent1.x), yi = d3_interpolateArray(yExtent, extent1.y);\n xExtentDomain = yExtentDomain = null;\n return function(t) {\n xExtent = extent1.x = xi(t);\n yExtent = extent1.y = yi(t);\n event_({\n type: \"brush\",\n mode: \"resize\"\n });\n };\n }).each(\"end.brush\", function() {\n xExtentDomain = extent1.i;\n yExtentDomain = extent1.j;\n event_({\n type: \"brush\",\n mode: \"resize\"\n });\n event_({\n type: \"brushend\"\n });\n });\n } else {\n event_({\n type: \"brushstart\"\n });\n event_({\n type: \"brush\",\n mode: \"resize\"\n });\n event_({\n type: \"brushend\"\n });\n }\n });\n };\n function redraw(g) {\n g.selectAll(\".resize\").attr(\"transform\", function(d) {\n return \"translate(\" + xExtent[+/e$/.test(d)] + \",\" + yExtent[+/^s/.test(d)] + \")\";\n });\n }\n function redrawX(g) {\n g.select(\".extent\").attr(\"x\", xExtent[0]);\n g.selectAll(\".extent,.n>rect,.s>rect\").attr(\"width\", xExtent[1] - xExtent[0]);\n }\n function redrawY(g) {\n g.select(\".extent\").attr(\"y\", yExtent[0]);\n g.selectAll(\".extent,.e>rect,.w>rect\").attr(\"height\", yExtent[1] - yExtent[0]);\n }\n function brushstart() {\n var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed(\"extent\"), dragRestore = d3_event_dragSuppress(target), center, origin = d3.mouse(target), offset;\n var w = d3.select(d3_window(target)).on(\"keydown.brush\", keydown).on(\"keyup.brush\", keyup);\n if (d3.event.changedTouches) {\n w.on(\"touchmove.brush\", brushmove).on(\"touchend.brush\", brushend);\n } else {\n w.on(\"mousemove.brush\", brushmove).on(\"mouseup.brush\", brushend);\n }\n g.interrupt().selectAll(\"*\").interrupt();\n if (dragging) {\n origin[0] = xExtent[0] - origin[0];\n origin[1] = yExtent[0] - origin[1];\n } else if (resizing) {\n var ex = +/w$/.test(resizing), ey = +/^n/.test(resizing);\n offset = [ xExtent[1 - ex] - origin[0], yExtent[1 - ey] - origin[1] ];\n origin[0] = xExtent[ex];\n origin[1] = yExtent[ey];\n } else if (d3.event.altKey) center = origin.slice();\n g.style(\"pointer-events\", \"none\").selectAll(\".resize\").style(\"display\", null);\n d3.select(\"body\").style(\"cursor\", eventTarget.style(\"cursor\"));\n event_({\n type: \"brushstart\"\n });\n brushmove();\n function keydown() {\n if (d3.event.keyCode == 32) {\n if (!dragging) {\n center = null;\n origin[0] -= xExtent[1];\n origin[1] -= yExtent[1];\n dragging = 2;\n }\n d3_eventPreventDefault();\n }\n }\n function keyup() {\n if (d3.event.keyCode == 32 && dragging == 2) {\n origin[0] += xExtent[1];\n origin[1] += yExtent[1];\n dragging = 0;\n d3_eventPreventDefault();\n }\n }\n function brushmove() {\n var point = d3.mouse(target), moved = false;\n if (offset) {\n point[0] += offset[0];\n point[1] += offset[1];\n }\n if (!dragging) {\n if (d3.event.altKey) {\n if (!center) center = [ (xExtent[0] + xExtent[1]) / 2, (yExtent[0] + yExtent[1]) / 2 ];\n origin[0] = xExtent[+(point[0] < center[0])];\n origin[1] = yExtent[+(point[1] < center[1])];\n } else center = null;\n }\n if (resizingX && move1(point, x, 0)) {\n redrawX(g);\n moved = true;\n }\n if (resizingY && move1(point, y, 1)) {\n redrawY(g);\n moved = true;\n }\n if (moved) {\n redraw(g);\n event_({\n type: \"brush\",\n mode: dragging ? \"move\" : \"resize\"\n });\n }\n }\n function move1(point, scale, i) {\n var range = d3_scaleRange(scale), r0 = range[0], r1 = range[1], position = origin[i], extent = i ? yExtent : xExtent, size = extent[1] - extent[0], min, max;\n if (dragging) {\n r0 -= position;\n r1 -= size + position;\n }\n min = (i ? yClamp : xClamp) ? Math.max(r0, Math.min(r1, point[i])) : point[i];\n if (dragging) {\n max = (min += position) + size;\n } else {\n if (center) position = Math.max(r0, Math.min(r1, 2 * center[i] - min));\n if (position < min) {\n max = min;\n min = position;\n } else {\n max = position;\n }\n }\n if (extent[0] != min || extent[1] != max) {\n if (i) yExtentDomain = null; else xExtentDomain = null;\n extent[0] = min;\n extent[1] = max;\n return true;\n }\n }\n function brushend() {\n brushmove();\n g.style(\"pointer-events\", \"all\").selectAll(\".resize\").style(\"display\", brush.empty() ? \"none\" : null);\n d3.select(\"body\").style(\"cursor\", null);\n w.on(\"mousemove.brush\", null).on(\"mouseup.brush\", null).on(\"touchmove.brush\", null).on(\"touchend.brush\", null).on(\"keydown.brush\", null).on(\"keyup.brush\", null);\n dragRestore();\n event_({\n type: \"brushend\"\n });\n }\n }\n brush.x = function(z) {\n if (!arguments.length) return x;\n x = z;\n resizes = d3_svg_brushResizes[!x << 1 | !y];\n return brush;\n };\n brush.y = function(z) {\n if (!arguments.length) return y;\n y = z;\n resizes = d3_svg_brushResizes[!x << 1 | !y];\n return brush;\n };\n brush.clamp = function(z) {\n if (!arguments.length) return x && y ? [ xClamp, yClamp ] : x ? xClamp : y ? yClamp : null;\n if (x && y) xClamp = !!z[0], yClamp = !!z[1]; else if (x) xClamp = !!z; else if (y) yClamp = !!z;\n return brush;\n };\n brush.extent = function(z) {\n var x0, x1, y0, y1, t;\n if (!arguments.length) {\n if (x) {\n if (xExtentDomain) {\n x0 = xExtentDomain[0], x1 = xExtentDomain[1];\n } else {\n x0 = xExtent[0], x1 = xExtent[1];\n if (x.invert) x0 = x.invert(x0), x1 = x.invert(x1);\n if (x1 < x0) t = x0, x0 = x1, x1 = t;\n }\n }\n if (y) {\n if (yExtentDomain) {\n y0 = yExtentDomain[0], y1 = yExtentDomain[1];\n } else {\n y0 = yExtent[0], y1 = yExtent[1];\n if (y.invert) y0 = y.invert(y0), y1 = y.invert(y1);\n if (y1 < y0) t = y0, y0 = y1, y1 = t;\n }\n }\n return x && y ? [ [ x0, y0 ], [ x1, y1 ] ] : x ? [ x0, x1 ] : y && [ y0, y1 ];\n }\n if (x) {\n x0 = z[0], x1 = z[1];\n if (y) x0 = x0[0], x1 = x1[0];\n xExtentDomain = [ x0, x1 ];\n if (x.invert) x0 = x(x0), x1 = x(x1);\n if (x1 < x0) t = x0, x0 = x1, x1 = t;\n if (x0 != xExtent[0] || x1 != xExtent[1]) xExtent = [ x0, x1 ];\n }\n if (y) {\n y0 = z[0], y1 = z[1];\n if (x) y0 = y0[1], y1 = y1[1];\n yExtentDomain = [ y0, y1 ];\n if (y.invert) y0 = y(y0), y1 = y(y1);\n if (y1 < y0) t = y0, y0 = y1, y1 = t;\n if (y0 != yExtent[0] || y1 != yExtent[1]) yExtent = [ y0, y1 ];\n }\n return brush;\n };\n brush.clear = function() {\n if (!brush.empty()) {\n xExtent = [ 0, 0 ], yExtent = [ 0, 0 ];\n xExtentDomain = yExtentDomain = null;\n }\n return brush;\n };\n brush.empty = function() {\n return !!x && xExtent[0] == xExtent[1] || !!y && yExtent[0] == yExtent[1];\n };\n return d3.rebind(brush, event, \"on\");\n };\n var d3_svg_brushCursor = {\n n: \"ns-resize\",\n e: \"ew-resize\",\n s: \"ns-resize\",\n w: \"ew-resize\",\n nw: \"nwse-resize\",\n ne: \"nesw-resize\",\n se: \"nwse-resize\",\n sw: \"nesw-resize\"\n };\n var d3_svg_brushResizes = [ [ \"n\", \"e\", \"s\", \"w\", \"nw\", \"ne\", \"se\", \"sw\" ], [ \"e\", \"w\" ], [ \"n\", \"s\" ], [] ];\n var d3_time_format = d3_time.format = d3_locale_enUS.timeFormat;\n var d3_time_formatUtc = d3_time_format.utc;\n var d3_time_formatIso = d3_time_formatUtc(\"%Y-%m-%dT%H:%M:%S.%LZ\");\n d3_time_format.iso = Date.prototype.toISOString && +new Date(\"2000-01-01T00:00:00.000Z\") ? d3_time_formatIsoNative : d3_time_formatIso;\n function d3_time_formatIsoNative(date) {\n return date.toISOString();\n }\n d3_time_formatIsoNative.parse = function(string) {\n var date = new Date(string);\n return isNaN(date) ? null : date;\n };\n d3_time_formatIsoNative.toString = d3_time_formatIso.toString;\n d3_time.second = d3_time_interval(function(date) {\n return new d3_date(Math.floor(date / 1e3) * 1e3);\n }, function(date, offset) {\n date.setTime(date.getTime() + Math.floor(offset) * 1e3);\n }, function(date) {\n return date.getSeconds();\n });\n d3_time.seconds = d3_time.second.range;\n d3_time.seconds.utc = d3_time.second.utc.range;\n d3_time.minute = d3_time_interval(function(date) {\n return new d3_date(Math.floor(date / 6e4) * 6e4);\n }, function(date, offset) {\n date.setTime(date.getTime() + Math.floor(offset) * 6e4);\n }, function(date) {\n return date.getMinutes();\n });\n d3_time.minutes = d3_time.minute.range;\n d3_time.minutes.utc = d3_time.minute.utc.range;\n d3_time.hour = d3_time_interval(function(date) {\n var timezone = date.getTimezoneOffset() / 60;\n return new d3_date((Math.floor(date / 36e5 - timezone) + timezone) * 36e5);\n }, function(date, offset) {\n date.setTime(date.getTime() + Math.floor(offset) * 36e5);\n }, function(date) {\n return date.getHours();\n });\n d3_time.hours = d3_time.hour.range;\n d3_time.hours.utc = d3_time.hour.utc.range;\n d3_time.month = d3_time_interval(function(date) {\n date = d3_time.day(date);\n date.setDate(1);\n return date;\n }, function(date, offset) {\n date.setMonth(date.getMonth() + offset);\n }, function(date) {\n return date.getMonth();\n });\n d3_time.months = d3_time.month.range;\n d3_time.months.utc = d3_time.month.utc.range;\n function d3_time_scale(linear, methods, format) {\n function scale(x) {\n return linear(x);\n }\n scale.invert = function(x) {\n return d3_time_scaleDate(linear.invert(x));\n };\n scale.domain = function(x) {\n if (!arguments.length) return linear.domain().map(d3_time_scaleDate);\n linear.domain(x);\n return scale;\n };\n function tickMethod(extent, count) {\n var span = extent[1] - extent[0], target = span / count, i = d3.bisect(d3_time_scaleSteps, target);\n return i == d3_time_scaleSteps.length ? [ methods.year, d3_scale_linearTickRange(extent.map(function(d) {\n return d / 31536e6;\n }), count)[2] ] : !i ? [ d3_time_scaleMilliseconds, d3_scale_linearTickRange(extent, count)[2] ] : methods[target / d3_time_scaleSteps[i - 1] < d3_time_scaleSteps[i] / target ? i - 1 : i];\n }\n scale.nice = function(interval, skip) {\n var domain = scale.domain(), extent = d3_scaleExtent(domain), method = interval == null ? tickMethod(extent, 10) : typeof interval === \"number\" && tickMethod(extent, interval);\n if (method) interval = method[0], skip = method[1];\n function skipped(date) {\n return !isNaN(date) && !interval.range(date, d3_time_scaleDate(+date + 1), skip).length;\n }\n return scale.domain(d3_scale_nice(domain, skip > 1 ? {\n floor: function(date) {\n while (skipped(date = interval.floor(date))) date = d3_time_scaleDate(date - 1);\n return date;\n },\n ceil: function(date) {\n while (skipped(date = interval.ceil(date))) date = d3_time_scaleDate(+date + 1);\n return date;\n }\n } : interval));\n };\n scale.ticks = function(interval, skip) {\n var extent = d3_scaleExtent(scale.domain()), method = interval == null ? tickMethod(extent, 10) : typeof interval === \"number\" ? tickMethod(extent, interval) : !interval.range && [ {\n range: interval\n }, skip ];\n if (method) interval = method[0], skip = method[1];\n return interval.range(extent[0], d3_time_scaleDate(+extent[1] + 1), skip < 1 ? 1 : skip);\n };\n scale.tickFormat = function() {\n return format;\n };\n scale.copy = function() {\n return d3_time_scale(linear.copy(), methods, format);\n };\n return d3_scale_linearRebind(scale, linear);\n }\n function d3_time_scaleDate(t) {\n return new Date(t);\n }\n var d3_time_scaleSteps = [ 1e3, 5e3, 15e3, 3e4, 6e4, 3e5, 9e5, 18e5, 36e5, 108e5, 216e5, 432e5, 864e5, 1728e5, 6048e5, 2592e6, 7776e6, 31536e6 ];\n var d3_time_scaleLocalMethods = [ [ d3_time.second, 1 ], [ d3_time.second, 5 ], [ d3_time.second, 15 ], [ d3_time.second, 30 ], [ d3_time.minute, 1 ], [ d3_time.minute, 5 ], [ d3_time.minute, 15 ], [ d3_time.minute, 30 ], [ d3_time.hour, 1 ], [ d3_time.hour, 3 ], [ d3_time.hour, 6 ], [ d3_time.hour, 12 ], [ d3_time.day, 1 ], [ d3_time.day, 2 ], [ d3_time.week, 1 ], [ d3_time.month, 1 ], [ d3_time.month, 3 ], [ d3_time.year, 1 ] ];\n var d3_time_scaleLocalFormat = d3_time_format.multi([ [ \".%L\", function(d) {\n return d.getMilliseconds();\n } ], [ \":%S\", function(d) {\n return d.getSeconds();\n } ], [ \"%I:%M\", function(d) {\n return d.getMinutes();\n } ], [ \"%I %p\", function(d) {\n return d.getHours();\n } ], [ \"%a %d\", function(d) {\n return d.getDay() && d.getDate() != 1;\n } ], [ \"%b %d\", function(d) {\n return d.getDate() != 1;\n } ], [ \"%B\", function(d) {\n return d.getMonth();\n } ], [ \"%Y\", d3_true ] ]);\n var d3_time_scaleMilliseconds = {\n range: function(start, stop, step) {\n return d3.range(Math.ceil(start / step) * step, +stop, step).map(d3_time_scaleDate);\n },\n floor: d3_identity,\n ceil: d3_identity\n };\n d3_time_scaleLocalMethods.year = d3_time.year;\n d3_time.scale = function() {\n return d3_time_scale(d3.scale.linear(), d3_time_scaleLocalMethods, d3_time_scaleLocalFormat);\n };\n var d3_time_scaleUtcMethods = d3_time_scaleLocalMethods.map(function(m) {\n return [ m[0].utc, m[1] ];\n });\n var d3_time_scaleUtcFormat = d3_time_formatUtc.multi([ [ \".%L\", function(d) {\n return d.getUTCMilliseconds();\n } ], [ \":%S\", function(d) {\n return d.getUTCSeconds();\n } ], [ \"%I:%M\", function(d) {\n return d.getUTCMinutes();\n } ], [ \"%I %p\", function(d) {\n return d.getUTCHours();\n } ], [ \"%a %d\", function(d) {\n return d.getUTCDay() && d.getUTCDate() != 1;\n } ], [ \"%b %d\", function(d) {\n return d.getUTCDate() != 1;\n } ], [ \"%B\", function(d) {\n return d.getUTCMonth();\n } ], [ \"%Y\", d3_true ] ]);\n d3_time_scaleUtcMethods.year = d3_time.year.utc;\n d3_time.scale.utc = function() {\n return d3_time_scale(d3.scale.linear(), d3_time_scaleUtcMethods, d3_time_scaleUtcFormat);\n };\n d3.text = d3_xhrType(function(request) {\n return request.responseText;\n });\n d3.json = function(url, callback) {\n return d3_xhr(url, \"application/json\", d3_json, callback);\n };\n function d3_json(request) {\n return JSON.parse(request.responseText);\n }\n d3.html = function(url, callback) {\n return d3_xhr(url, \"text/html\", d3_html, callback);\n };\n function d3_html(request) {\n var range = d3_document.createRange();\n range.selectNode(d3_document.body);\n return range.createContextualFragment(request.responseText);\n }\n d3.xml = d3_xhrType(function(request) {\n return request.responseXML;\n });\n if (true) this.d3 = d3, !(__WEBPACK_AMD_DEFINE_FACTORY__ = (d3),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); else {}\n}();//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvZDMvZDMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9jb21wbGV4dmlld2VyLy4vbm9kZV9tb2R1bGVzL2QzL2QzLmpzPzZlNTgiXSwic291cmNlc0NvbnRlbnQiOlsiIWZ1bmN0aW9uKCkge1xuICB2YXIgZDMgPSB7XG4gICAgdmVyc2lvbjogXCIzLjUuMTdcIlxuICB9O1xuICB2YXIgZDNfYXJyYXlTbGljZSA9IFtdLnNsaWNlLCBkM19hcnJheSA9IGZ1bmN0aW9uKGxpc3QpIHtcbiAgICByZXR1cm4gZDNfYXJyYXlTbGljZS5jYWxsKGxpc3QpO1xuICB9O1xuICB2YXIgZDNfZG9jdW1lbnQgPSB0aGlzLmRvY3VtZW50O1xuICBmdW5jdGlvbiBkM19kb2N1bWVudEVsZW1lbnQobm9kZSkge1xuICAgIHJldHVybiBub2RlICYmIChub2RlLm93bmVyRG9jdW1lbnQgfHwgbm9kZS5kb2N1bWVudCB8fCBub2RlKS5kb2N1bWVudEVsZW1lbnQ7XG4gIH1cbiAgZnVuY3Rpb24gZDNfd2luZG93KG5vZGUpIHtcbiAgIC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vZGUgPyAxMjAgOiAxKTtcbiAgICAgIH0sIFwid2hlZWxcIikgOiBcIm9ubW91c2V3aGVlbFwiIGluIGQzX2RvY3VtZW50ID8gKGQzX2JlaGF2aW9yX3pvb21EZWx0YSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICByZXR1cm4gZDMuZXZlbnQud2hlZWxEZWx0YTtcbiAgICAgIH0sIFwibW91c2V3aGVlbFwiKSA6IChkM19iZWhhdmlvcl96b29tRGVsdGEgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgcmV0dXJuIC1kMy5ldmVudC5kZXRhaWw7XG4gICAgICB9LCBcIk1vek1vdXNlUGl4ZWxTY3JvbGxcIik7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHpvb20oZykge1xuICAgICAgZy5vbihtb3VzZWRvd24sIG1vdXNlZG93bmVkKS5vbihkM19iZWhhdmlvcl96b29tV2hlZWwgKyBcIi56b29tXCIsIG1vdXNld2hlZWxlZCkub24oXCJkYmxjbGljay56b29tXCIsIGRibGNsaWNrZWQpLm9uKHRvdWNoc3RhcnQsIHRvdWNoc3RhcnRlZCk7XG4gICAgfVxuICAgIHpvb20uZXZlbnQgPSBmdW5jdGlvbihnKSB7XG4gICAgICBnLmVhY2goZnVuY3Rpb24oKSB7XG4gICAgICAgIHZhciBkaXNwYXRjaCA9IGV2ZW50Lm9mKHRoaXMsIGFyZ3VtZW50cyksIHZpZXcxID0gdmlldztcbiAgICAgICAgaWYgKGQzX3RyYW5zaXRpb25Jbmhlcml0SWQpIHtcbiAgICAgICAgICBkMy5zZWxlY3QodGhpcykudHJhbnNpdGlvbigpLmVhY2goXCJzdGFydC56b29tXCIsIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgdmlldyA9IHRoaXMuX19jaGFydF9fIHx8IHtcbiAgICAgICAgICAgICAgeDogMCxcbiAgICAgICAgICAgICAgeTogMCxcbiAgICAgICAgICAgICAgazogMVxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHpvb21zdGFydGVkKGRpc3BhdGNoKTtcbiAgICAgICAgICB9KS50d2VlbihcInpvb206em9vbVwiLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHZhciBkeCA9IHNpemVbMF0sIGR5ID0gc2l6ZVsxXSwgY3ggPSBjZW50ZXIwID8gY2VudGVyMFswXSA6IGR4IC8gMiwgY3kgPSBjZW50ZXIwID8gY2VudGVyMFsxXSA6IGR5IC8gMiwgaSA9IGQzLmludGVycG9sYXRlWm9vbShbIChjeCAtIHZpZXcueCkgLyB2aWV3LmssIChjeSAtIHZpZXcueSkgLyB2aWV3LmssIGR4IC8gdmlldy5rIF0sIFsgKGN4IC0gdmlldzEueCkgLyB2aWV3MS5rLCAoY3kgLSB2aWV3MS55KSAvIHZpZXcxLmssIGR4IC8gdmlldzEuayBdKTtcbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7XG4gICAgICAgICAgICAgIHZhciBsID0gaSh0KSwgayA9IGR4IC8gbFsyXTtcbiAgICAgICAgICAgICAgdGhpcy5fX2NoYXJ0X18gPSB2aWV3ID0ge1xuICAgICAgICAgICAgICAgIHg6IGN4IC0gbFswXSAqIGssXG4gICAgICAgICAgICAgICAgeTogY3kgLSBsWzFdICogayxcbiAgICAgICAgICAgICAgICBrOiBrXG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgIHpvb21lZChkaXNwYXRjaCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgIH0pLmVhY2goXCJpbnRlcnJ1cHQuem9vbVwiLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHpvb21lbmRlZChkaXNwYXRjaCk7XG4gICAgICAgICAgfSkuZWFjaChcImVuZC56b29tXCIsIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgem9vbWVuZGVkKGRpc3BhdGNoKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0aGlzLl9fY2hhcnRfXyA9IHZpZXc7XG4gICAgICAgICAgem9vbXN0YXJ0ZWQoZGlzcGF0Y2gpO1xuICAgICAgICAgIHpvb21lZChkaXNwYXRjaCk7XG4gICAgICAgICAgem9vbWVuZGVkKGRpc3BhdGNoKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgICB6b29tLnRyYW5zbGF0ZSA9IGZ1bmN0aW9uKF8pIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIFsgdmlldy54LCB2aWV3LnkgXTtcbiAgICAgIHZpZXcgPSB7XG4gICAgICAgIHg6ICtfWzBdLFxuICAgICAgICB5OiArX1sxXSxcbiAgICAgICAgazogdmlldy5rXG4gICAgICB9O1xuICAgICAgcmVzY2FsZSgpO1xuICAgICAgcmV0dXJuIHpvb207XG4gICAgfTtcbiAgICB6b29tLnNjYWxlID0gZnVuY3Rpb24oXykge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4gdmlldy5rO1xuICAgICAgdmlldyA9IHtcbiAgICAgICAgeDogdmlldy54LFxuICAgICAgICB5OiB2aWV3LnksXG4gICAgICAgIGs6IG51bGxcbiAgICAgIH07XG4gICAgICBzY2FsZVRvKCtfKTtcbiAgICAgIHJlc2NhbGUoKTtcbiAgICAgIHJldHVybiB6b29tO1xuICAgIH07XG4gICAgem9vbS5zY2FsZUV4dGVudCA9IGZ1bmN0aW9uKF8pIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIHNjYWxlRXh0ZW50O1xuICAgICAgc2NhbGVFeHRlbnQgPSBfID09IG51bGwgPyBkM19iZWhhdmlvcl96b29tSW5maW5pdHkgOiBbICtfWzBdLCArX1sxXSBdO1xuICAgICAgcmV0dXJuIHpvb207XG4gICAgfTtcbiAgICB6b29tLmNlbnRlciA9IGZ1bmN0aW9uKF8pIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIGNlbnRlcjtcbiAgICAgIGNlbnRlciA9IF8gJiYgWyArX1swXSwgK19bMV0gXTtcbiAgICAgIHJldHVybiB6b29tO1xuICAgIH07XG4gICAgem9vbS5zaXplID0gZnVuY3Rpb24oXykge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4gc2l6ZTtcbiAgICAgIHNpemUgPSBfICYmIFsgK19bMF0sICtfWzFdIF07XG4gICAgICByZXR1cm4gem9vbTtcbiAgICB9O1xuICAgIHpvb20uZHVyYXRpb24gPSBmdW5jdGlvbihfKSB7XG4gICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBkdXJhdGlvbjtcbiAgICAgIGR1cmF0aW9uID0gK187XG4gICAgICByZXR1cm4gem9vbTtcbiAgICB9O1xuICAgIHpvb20ueCA9IGZ1bmN0aW9uKHopIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIHgxO1xuICAgICAgeDEgPSB6O1xuICAgICAgeDAgPSB6LmNvcHkoKTtcbiAgICAgIHZpZXcgPSB7XG4gICAgICAgIHg6IDAsXG4gICAgICAgIHk6IDAsXG4gICAgICAgIGs6IDFcbiAgICAgIH07XG4gICAgICByZXR1cm4gem9vbTtcbiAgICB9O1xuICAgIHpvb20ueSA9IGZ1bmN0aW9uKHopIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIHkxO1xuICAgICAgeTEgPSB6O1xuICAgICAgeTAgPSB6LmNvcHkoKTtcbiAgICAgIHZpZXcgPSB7XG4gICAgICAgIHg6IDAsXG4gICAgICAgIHk6IDAsXG4gICAgICAgIGs6IDFcbiAgICAgIH07XG4gICAgICByZXR1cm4gem9vbTtcbiAgICB9O1xuICAgIGZ1bmN0aW9uIGxvY2F0aW9uKHApIHtcbiAgICAgIHJldHVybiBbIChwWzBdIC0gdmlldy54KSAvIHZpZXcuaywgKHBbMV0gLSB2aWV3LnkpIC8gdmlldy5rIF07XG4gICAgfVxuICAgIGZ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yAxKTtcbiAgICAgICAgICAgIGQzX2V2ZW50UHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdG91Y2h0aW1lID0gbm93O1xuICAgICAgICB9IGVsc2UgaWYgKHRvdWNoZXMubGVuZ3RoID4gMSkge1xuICAgICAgICAgIHZhciBwID0gdG91Y2hlc1swXSwgcSA9IHRvdWNoZXNbMV0sIGR4ID0gcFswXSAtIHFbMF0sIGR5ID0gcFsxXSAtIHFbMV07XG4gICAgICAgICAgZGlzdGFuY2UwID0gZHggKiBkeCArIGR5ICogZHk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIG1vdmVkKCkge1xuICAgICAgICB2YXIgdG91Y2hlcyA9IGQzLnRvdWNoZXModGhhdCksIHAwLCBsMCwgcDEsIGwxO1xuICAgICAgICBkM19zZWxlY3Rpb25faW50ZXJydXB0LmNhbGwodGhhdCk7XG4gICAgICAgIGZvciAodmFyIGkgPSAwLCBuID0gdG91Y2hlcy5sZW5ndGg7IGkgPCBuOyArK2ksIGwxID0gbnVsbCkge1xuICAgICAgICAgIHAxID0gdG91Y2hlc1tpXTtcbiAgICAgICAgICBpZiAobDEgPSBsb2NhdGlvbnMwW3AxLmlkZW50aWZpZXJdKSB7XG4gICAgICAgICAgICBpZiAobDApIGJyZWFrO1xuICAgICAgICAgICAgcDAgPSBwMSwgbDAgPSBsMTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGwxKSB7XG4gICAgICAgICAgdmFyIGRpc3RhbmNlMSA9IChkaXN0YW5jZTEgPSBwMVswXSAtIHAwWzBdKSAqIGRpc3RhbmNlMSArIChkaXN0YW5jZTEgPSBwMVsxXSAtIHAwWzFdKSAqIGRpc3RhbmNlMSwgc2NhbGUxID0gZGlzdGFuY2UwICYmIE1hdGguc3FydChkaXN0YW5jZTEgLyBkaXN0YW5jZTApO1xuICAgICAgICAgIHAwID0gWyAocDBbMF0gKyBwMVswX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dmFyIG87XG4gICAgICByZXR1cm4gZHN2LnBhcnNlUm93cyh0ZXh0LCBmdW5jdGlvbihyb3csIGkpIHtcbiAgICAgICAgaWYgKG8pIHJldHVybiBvKHJvdywgaSAtIDEpO1xuICAgICAgICB2YXIgYSA9IG5ldyBGdW5jdGlvbihcImRcIiwgXCJyZXR1cm4ge1wiICsgcm93Lm1hcChmdW5jdGlvbihuYW1lLCBpKSB7XG4gICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KG5hbWUpICsgXCI6IGRbXCIgKyBpICsgXCJdXCI7XG4gICAgICAgIH0pLmpvaW4oXCIsXCIpICsgXCJ9XCIpO1xuICAgICAgICBvID0gZiA/IGZ1bmN0aW9uKHJvdywgaSkge1xuICAgICAgICAgIHJldHVybiBmKGEocm93KSwgaSk7XG4gICAgICAgIH0gOiBhO1xuICAgICAgfSk7XG4gICAgfTtcbiAgICBkc3YucGFyc2VSb3dzID0gZnVuY3Rpb24odGV4dCwgZikge1xuICAgICAgdmFyIEVPTCA9IHt9LCBFT0YgPSB7fSwgcm93cyA9IFtdLCBOID0gdGV4dC5sZW5ndGgsIEkgPSAwLCBuID0gMCwgdCwgZW9sO1xuICAgICAgZnVuY3Rpb24gdG9rZW4oKSB7XG4gICAgICAgIGlmIChJID49IE4pIHJldHVybiBFT0Y7XG4gICAgICAgIGlmIChlb2wpIHJldHVybiBlb2wgPSBmYWxzZSwgRU9MO1xuICAgICAgICB2YXIgaiA9IEk7XG4gICAgICAgIGlmICh0ZXh0LmNoYXJDb2RlQXQoaikgPT09IDM0KSB7XG4gICAgICAgICAgdmFyIGkgPSBqO1xuICAgICAgICAgIHdoaWxlIChpKysgPCBOKSB7XG4gICAgICAgICAgICBpZiAodGV4dC5jaGFyQ29kZUF0KGkpID09PSAzNCkge1xuICAgICAgICAgICAgICBpZiAodGV4dC5jaGFyQ29kZUF0KGkgKyAxKSAhPT0gMzQpIGJyZWFrO1xuICAgICAgICAgICAgICArK2k7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIEkgPSBpICsgMjtcbiAgICAgICAgICB2YXIgYyA9IHRleHQuY2hhckNvZGVBdChpICsgMSk7XG4gICAgICAgICAgaWYgKGMgPT09IDEzKSB7XG4gICAgICAgICAgICBlb2wgPSB0cnVlO1xuICAgICAgICAgICAgaWYgKHRleHQuY2hhckNvZGVBdChpICsgMikgPT09IDEwKSArK0k7XG4gICAgICAgICAgfSBlbHNlIGlmIChjID09PSAxMCkge1xuICAgICAgICAgICAgZW9sID0gdHJ1ZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIHRleHQuc2xpY2UoaiArIDEsIGkpLnJlcGxhY2UoL1wiXCIvZywgJ1wiJyk7XG4gICAgICAgIH1cbiAgICAgICAgd2hpbGUgKEkgPCBOKSB7XG4gICAgICAgICAgdmFyIGMgPSB0ZXh0LmNoYXJDb2RlQXQoSSsrKSwgayA9IDE7XG4gICAgICAgICAgaWYgKGMgPT09IDEwKSBlb2wgPSB0cnVlOyBlbHNlIGlmIChjID09PSAxMykge1xuICAgICAgICAgICAgZW9sID0gdHJ1ZTtcbiAgICAgICAgICAgIGlmICh0ZXh0LmNoYXJDb2RlQXQoSSkgPT09IDEwKSArK0ksICsraztcbiAgICAgICAgICB9IGVsc2UgaWYgKGMgIT09IGRlbGltaXRlckNvZGUpIGNvbnRpbnVlO1xuICAgICAgICAgIHJldHVybiB0ZXh0LnNsaWNlKGosIEkgLSBrKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGV4dC5zbGljZShqKTtcbiAgICAgIH1cbiAgICAgIHdoaWxlICgodCA9IHRva2VuKCkpICE9PSBFT0YpIHtcbiAgICAgICAgdmFyIGEgPSBbXTtcbiAgICAgICAgd2hpbGUgKHQgIT09IEVPTCAmJiB0ICE9PSBFT0YpIHtcbiAgICAgICAgICBhLnB1c2godCk7XG4gICAgICAgICAgdCA9IHRva2VuKCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYg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uICAgICAgSDogZnVuY3Rpb24oZCwgcCkge1xuICAgICAgICByZXR1cm4gZDNfdGltZV9mb3JtYXRQYWQoZC5nZXRIb3VycygpLCBwLCAyKTtcbiAgICAgIH0sXG4gICAgICBJOiBmdW5jdGlvbihkLCBwKSB7XG4gICAgICAgIHJldHVybiBkM190aW1lX2Zvcm1hdFBhZChkLmdldEhvdXJzKCkgJSAxMiB8fCAxMiwgcCwgMik7XG4gICAgICB9LFxuICAgICAgajogZnVuY3Rpb24oZCwgcCkge1xuICAgICAgICByZXR1cm4gZDNfdGltZV9mb3JtYXRQYWQoMSArIGQzX3RpbWUuZGF5T2ZZZWFyKGQpLCBwLCAzKTtcbiAgICAgIH0sXG4gICAgICBMOiBmdW5jdGlvbihkLCBwKSB7XG4gICAgICAgIHJldHVybiBkM190aW1lX2Zvcm1hdFBhZChkLmdldE1pbGxpc2Vjb25kcygpLCBwLCAzKTtcbiAgICAgIH0sXG4gICAgICBtOiBmdW5jdGlvbihkLCBwKSB7XG4gICAgICAgIHJldHVybiBkM190aW1lX2Zvcm1hdFBhZChkLmdldE1vbnRoKCkgKyAxLCBwLCAyKTtcbiAgICAgIH0sXG4gICAgICBNOiBmdW5jdGlvbihkLCBwKSB7XG4gICAgICAgIHJldHVybiBkM190aW1lX2Zvcm1hdFBhZChkLmdldE1pbnV0ZXMoKSwgcCwgMik7XG4gICAgICB9LFxuICAgICAgcDogZnVuY3Rpb24oZCkge1xuICAgICAgICByZXR1cm4gbG9jYWxlX3BlcmlvZHNbKyhkLmdldEhvdXJzKCkgPj0gMTIpXTtcbiAgICAgIH0sXG4gICAgICBTOiBmdW5jdGlvbihkLCBwKSB7XG4gICAgICAgIHJldHVybiBkM190aW1lX2Zvcm1hdFBhZChkLmdldFNlY29uZHMoKSwgcCwgMik7XG4gICAgICB9LFxuICAgICAgVTogZnVuY3Rpb24oZCwgcCkge1xuICAgICAgICByZXR1cm4gZDNfdGltZV9mb3JtYXRQYWQoZDNfdGltZS5zdW5kYXlP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19kZWdyZWVzO1xuICAgICAgICAgIGlmICjPhmkgPiDPhjEpIM+GMSA9IM+GaTtcbiAgICAgICAgfSBlbHNlIGlmICjOu2kgPSAozrtpICsgMzYwKSAlIDM2MCAtIDE4MCwgYW50aW1lcmlkaWFuIF4gKHMgKiDOu18gPCDOu2kgJiYgzrtpIDwgcyAqIM67KSkge1xuICAgICAgICAgIHZhciDPhmkgPSAtaW5mbGVjdGlvblsxXSAqIGQzX2RlZ3JlZXM7XG4gICAgICAgICAgaWYgKM+GaSA8IM+GMCkgz4YwID0gz4ZpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGlmICjPhiA8IM+GMCkgz4YwID0gz4Y7XG4gICAgICAgICAgaWYgKM+GID4gz4YxKSDPhjEgPSDPhjtcbiAgICAgICAgfVxuICAgICAgICBpZiAoYW50aW1lcmlkaWFuKSB7XG4gICAgICAgICAgaWYgKM67IDwgzrtfKSB7XG4gICAgICAgICAgICBpZiAoYW5nbGUozrswLCDOuykgPiBhbmdsZSjOuzAsIM67MSkpIM67MSA9IM67O1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAoYW5nbGUozrssIM67MSkgPiBhbmdsZSjOuzAsIM67MSkpIM67MCA9IM67O1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBpZiAozrsxID49IM67MCkge1xuICAgICAgICAgICAgaWYgKM67IDwgzrswKSDOuzAgPSDOuztcbiAgICAgICAgICAgIGlmICjOuyA+IM67MSkgzrsxID0gzrs7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmICjOuyA+IM67Xykge1xuICAgICAgICAgICAgICBpZiAoYW5nbGUozrswLCDOuykgPiBhbmdsZSjOuzAsIM67MSkpIM67MSA9IM67O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgaWYgKGFuZ2xlKM67LCDOuzEpID4gYW5nbGUozrswLCDOuzEpKSDOuzAgPSDOuztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHBvaW50KM67LCDPhik7XG4gICAgICB9XG4gICAgICBwMCA9IHAsIM67XyA9IM67O1xuICAgIH1cbiAgICBmdW5jdGlvbiBsaW5lU3RhcnQoKSB7XG4gICAgICBib3VuZC5wb2ludCA9IGxpbmVQb2ludDtcbiAgICB9XG4gICAgZnVuY3Rpb24gbGluZUVuZCgpIHtcbiAgICAgIHJhbmdlWzBdID0gzrswLCByYW5nZVsxXSA9IM67MTtcbiAgICAgIGJvdW5kLnBvaW50ID0gcG9pbnQ7XG4gICAgICBwMCA9IG51bGw7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJpbmdQb2ludCjOuywgz4YpIHtcbiAgICAgIGlmIChwMCkge1xuICAgICAgICB2YXIgZM67ID0gzrsgLSDOu187XG4gICAgICAgIGTOu1N1bSArPSBhYnMoZM67KSA+IDE4MCA/IGTOuyArIChkzrsgPiAwID8gMzYwIDogLTM2MCkgOiBkzrs7XG4gICAgICB9IGVsc2UgzrtfXyA9IM67LCDPhl9fID0gz4Y7XG4gICAgICBkM19nZW9fYXJlYS5wb2ludCjOuywgz4YpO1xuICAgICAgbGluZVBvaW50KM67LCDPhik7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJpbmdTdGFydCgpIHtcbiAgICAgIGQzX2dlb19hcmVhLmxpbmVTdGFydCgpO1xuICAgIH1cbiAgICBmdW5jdGlvbiByaW5nRW5kKCkge1xuICAgICAgcmluZ1BvaW50KM67X18sIM+GX18pO1xuICAgICAgZDNfZ2VvX2FyZWEubGluZUVuZCgpO1xuICAgICAgaWYgKGFicyhkzrtTdW0pID4gzrUpIM67MCA9IC0ozrsxID0gMTgwKTtcbiAgICAgIHJhbmdlWzBdID0gzrswLCByYW5nZVsxXSA9IM67MTtcbiAgICAgIHAwID0gbnVsbDtcbiAgICB9XG4gICAgZnVuY3Rpb24gYW5nbG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YXRlKGN1cnJlbnQueCwgY3VycmVudC5uLngsIDEsIGxpc3RlbmVyKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgY3VycmVudCA9IGN1cnJlbnQubjtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBpZiAoaXNTdWJqZWN0KSB7XG4gICAgICAgICAgICBwb2ludHMgPSBjdXJyZW50LnAuejtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSBwb2ludHMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIGxpc3RlbmVyLnBvaW50KChwb2ludCA9IHBvaW50c1tpXSlbMF0sIHBvaW50WzFdKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaW50ZXJwb2xhdGUoY3VycmVudC54LCBjdXJyZW50LnAueCwgLTEsIGxpc3RlbmVyKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgY3VycmVudCA9IGN1cnJlbnQucDtcbiAgICAgICAgfVxuICAgICAgICBjdXJyZW50ID0gY3VycmVudC5vO1xuICAgICAgICBwb2ludHMgPSBjdXJyZW50Lno7XG4gICAgICAgIGlzU3ViamVjdCA9ICFpc1N1YmplY3Q7XG4gICAgICB9IHdoaWxlICghY3VycmVudC52KTtcbiAgICAgIGxpc3RlbmVyLmxpbmVFbmQoKTtcbiAgICB9XG4gIH1cbiAgZnVuY3Rpb24gZDNfZ2VvX2NsaXBQb2x5Z29uTGlua0NpcmN1bGFyKGFycmF5KSB7XG4gICAgaWYgKCEobiA9IGFycmF5Lmxlbmd0aCkpIHJldHVybjtcbiAgICB2YXIgbiwgaSA9IDAsIGEgPSBhcnJheVswXSwgYjtcbiAgICB3aGlsZSAoKytpIDwgbikge1xuICAgICAgYS5uID0gYiA9IGFycmF5W2ldO1xuICAgICAgYi5wID0gYTtcbiAgICAgIGEgPSBiO1xuICAgIH1cbiAgICBhLm4gPSBiID0gYXJyYXlbMF07XG4gICAgYi5wID0gYTtcbiAgfVxuICBmdW5jdGlvbiBkM19nZW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bmVyLmxpbmVFbmQoKTtcbiAgICAgICAgICBsaXN0ZW5lci5saW5lU3RhcnQoKTtcbiAgICAgICAgICBsaXN0ZW5lci5wb2ludChzzrsxLCDPhjApO1xuICAgICAgICAgIGxpc3RlbmVyLnBvaW50KM67MSwgz4YwKTtcbiAgICAgICAgICBjbGVhbiA9IDA7XG4gICAgICAgIH0gZWxzZSBpZiAoc867MCAhPT0gc867MSAmJiBkzrsgPj0gz4ApIHtcbiAgICAgICAgICBpZiAoYWJzKM67MCAtIHPOuzApIDwgzrUpIM67MCAtPSBzzrswICogzrU7XG4gICAgICAgICAgaWYgKGFicyjOuzEgLSBzzrsxKSA8IM61KSDOuzEgLT0gc867MSAqIM61O1xuICAgICAgICAgIM+GMCA9IGQzX2dlb19jbGlwQW50aW1lcmlkaWFuSW50ZXJzZWN0KM67MCwgz4YwLCDOuzEsIM+GMSk7XG4gICAgICAgICAgbGlzdGVuZXIucG9pbnQoc867MCwgz4YwKTtcbiAgICAgICAgICBsaXN0ZW5lci5saW5lRW5kKCk7XG4gICAgICAgICAgbGlzdGVuZXIubGluZVN0YXJ0KCk7XG4gICAgICAgICAgbGlzdGVuZXIucG9pbnQoc867MSwgz4YwKTtcbiAgICAgICAgICBjbGVhbiA9IDA7XG4gICAgICAgIH1cbiAgICAgICAgbGlzdGVuZXIucG9pbnQozrswID0gzrsxLCDPhjAgPSDPhjEpO1xuICAgICAgICBzzrswID0gc867MTtcbiAgICAgIH0sXG4gICAgICBsaW5lRW5kOiBmdW5jdGlvbigpIHtcbiAgICAgICAgbGlzdGVuZXIubGluZUVuZCgpO1xuICAgICAgICDOuzAgPSDPhjAgPSBOYU47XG4gICAgICB9LFxuICAgICAgY2xlYW46IGZ1bmN0aW9uKCkge1xuICAgICAgICByZXR1cm4gMiAtIGNsZWFuO1xuICAgICAgfVxuICAgIH07XG4gIH1cbiAgZnVuY3Rpb24gZDNfZ2VvX2NsaXBBbnRpbWVyaWRpYW5JbnRlcnNlY3QozrswLCDPhjA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9LFxuICAgICAgICBwb2ludDogZnVuY3Rpb24ozrssIM+GKSB7XG4gICAgICAgICAgdmFyIHBvaW50MSA9IFsgzrssIM+GIF0sIHBvaW50MiwgdiA9IHZpc2libGUozrssIM+GKSwgYyA9IHNtYWxsUmFkaXVzID8gdiA/IDAgOiBjb2RlKM67LCDPhikgOiB2ID8gY29kZSjOuyArICjOuyA8IDAgPyDPgCA6IC3PgCksIM+GKSA6IDA7XG4gICAgICAgICAgaWYgKCFwb2ludDAgJiYgKHYwMCA9IHYwID0gdikpIGxpc3RlbmVyLmxpbmVTdGFydCgpO1xuICAgICAgICAgIGlmICh2ICE9PSB2MCkge1xuICAgICAgICAgICAgcG9pbnQyID0gaW50ZXJzZWN0KHBvaW50MCwgcG9pbnQxKTtcbiAgICAgICAgICAgIGlmIChkM19nZW9fc3BoZXJpY2FsRXF1YWwocG9pbnQwLCBwb2ludDIpIHx8IGQzX2dlb19zcGhlcmljYWxFcXVhbChwb2ludDEsIHBvaW50MikpIHtcbiAgICAgICAgICAgICAgcG9pbnQxWzBdICs9IM61O1xuICAgICAgICAgICAgICBwb2ludDFbMV0gKz0gzrU7XG4gICAgICAgICAgICAgIHYgPSB2aXNpYmxlKHBvaW50MVswXSwgcG9pbnQxWzFdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKHYgIT09IHYwKSB7XG4gICAgICAgICAgICBjbGVhbiA9IDA7XG4gICAgICAgICAgICBpZiAodikge1xuICAgICAgICAgICAgICBsaXN0ZW5lci5saW5lU3RhcnQoKTtcbiAgICAgICAgICAgICAgcG9pbnQyID0gaW50ZXJzZWN0KHBvaW50MSwgcG9pbnQwKTtcbiAgICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQocG9pbnQyWzBdLCBwb2ludDJbMV0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcG9pbnQyID0gaW50ZXJzZWN0KHBvaW50MCwgcG9pbnQxKTtcbiAgICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQocG9pbnQyWzBdLCBwb2ludDJbMV0pO1xuICAgICAgICAgICAgICBsaXN0ZW5lci5saW5lRW5kKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBwb2ludDAgPSBwb2ludDI7XG4gICAgICAgICAgfSBlbHNlIGlmIChub3RIZW1pc3BoZXJlICYmIHBvaW50MCAmJiBzbWFsbFJhZGl1cyBeIHYpIHtcbiAgICAgICAgICAgIHZhciB0O1xuICAgICAgICAgICAgaWYgKCEoYyAmIGMwKSAmJiAodCA9IGludGVyc2VjdChwb2ludDEsIHBvaW50MCwgdHJ1ZSkpKSB7XG4gICAgICAgICAgICAgIGNsZWFuID0gMDtcbiAgICAgICAgICAgICAgaWYgKHNtYWxsUmFkaXVzKSB7XG4gICAgICAgICAgICAgICAgbGlzdGVuZXIubGluZVN0YXJ0KCk7XG4gICAgICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQodFswXVswXSwgdFswXVsxXSk7XG4gICAgICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQodFsxXVswXSwgdFsxXVsxXSk7XG4gICAgICAgICAgICAgICAgbGlzdGVuZXIubGluZUVuZCgpO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGxpc3RlbmVyLnBvaW50KHRbMV1bMF0sIHRbMV1bMV0pO1xuICAgICAgICAgICAgICAgIGxpc3RlbmVyLmxpbmVFbmQoKTtcbiAgICAgICAgICAgICAgICBsaXN0ZW5lci5saW5lU3RhcnQoKTtcbiAgICAgICAgICAgICAgICBsaXN0ZW5lci5wb2ludCh0WzBdWzBdLCB0WzBdWzFdKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAodiAmJiAoIXBvaW50MCB8fCAhZDNfZ2VvX3NwaGVyaWNhbEVxdWFsKHBvaW50MCwgcG9pbnQxKSkpIHtcbiAgICAgICAgICAgIGxpc3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XUpO1xuICAgICAgICBkM19nZW9fY2FydGVzaWFuQWRkKHExLCBBKTtcbiAgICAgICAgcmV0dXJuIFsgcSwgZDNfZ2VvX3NwaGVyaWNhbChxMSkgXTtcbiAgICAgIH1cbiAgICB9XG4gICAgZnVuY3Rpb24gY29kZSjOuywgz4YpIHtcbiAgICAgIHZhciByID0gc21hbGxSYWRpdXMgPyByYWRpdXMgOiDPgCAtIHJhZGl1cywgY29kZSA9IDA7XG4gICAgICBpZiAozrsgPCAtcikgY29kZSB8PSAxOyBlbHNlIGlmICjOuyA+IHIpIGNvZGUgfD0gMjtcbiAgICAgIGlmICjPhiA8IC1yKSBjb2RlIHw9IDQ7IGVsc2UgaWYgKM+GID4gcikgY29kZSB8PSA4O1xuICAgICAgcmV0dXJuIGNvZGU7XG4gICAgfVxuICB9XG4gIGZ1bmN0aW9uIGQzX2dlb21fY2xpcExpbmUoeDAsIHkwLCB4MSwgeTEpIHtcbiAgICByZXR1cm4gZnVuY3Rpb24obGluZSkge1xuICAgICAgdmFyIGEgPSBsaW5lLmEsIGIgPSBsaW5lLmIsIGF4ID0gYS54LCBheSA9IGEueSwgYnggPSBiLngsIGJ5ID0gYi55LCB0MCA9IDAsIHQxID0gMSwgZHggPSBieCAtIGF4LCBkeSA9IGJ5IC0gYXksIHI7XG4gICAgICByID0geDAgLSBheDtcbiAgICAgIGlmICghZHggJiYgciA+IDApIHJldHVybjtcbiAgICAgIHIgLz0gZHg7XG4gICAgICBpZiAoZHggPCAwKSB7XG4gICAgICAgIGlmIChyIDwgdDApIHJldHVybjtcbiAgICAgICAgaWYgKHIgPCB0MSkgdDEgPSByO1xuICAgICAgfSBlbHNlIGlmIChkeCA+IDApIHtcbiAgICAgICAgaWYgKHIgPiB0MSkgcmV0dXJuO1xuICAgICAgICBpZiAociA+IHQwKSB0MCA9IHI7XG4gICAgICB9XG4gICAgICByID0geDEgLSBheDtcbiAgICAgIGlmICghZHggJiYgciA8IDApIHJldHVybjtcbiAgICAgIHIgLz0gZHg7XG4gICAgICBpZiAoZHggPCAwKSB7XG4gICAgICAgIGlmIChyID4gdDEpIHJldHVybjtcbiAgICAgICAgaWYgKHIgPiB0MCkgdDAgPSByO1xuICAgICAgfSBlbHNlIGlmIChkeCA+IDApIHtcbiAgICAgICAgaWYgKHIgPCB0MCkgcmV0dXJuO1xuICAgICAgICBpZiAociA8IHQxKSB0MSA9IHI7XG4gICAgICB9XG4gICAgICByID0geTAgLSBheTtcbiAgICAgIGlmICghZHkgJiYgciA+IDApIHJldHVybjtcbiAgICAgIHIgLz0gZHk7XG4gICAgICBpZiAoZHkgPCAwKSB7XG4gICAgICAgIGlmIChyIDwgdDApIHJldHVybjtcbiAgICAgICAgaWYgKHIgPCB0MSkgdDEgPSByO1xuICAgICAgfSBlbHNlIGlmIChkeSA+IDApIHtcbiAgICAgICAgaWYgKHIgPiB0MSkgcmV0dXJuO1xuICAgICAgICBpZiAociA+IHQwKSB0MCA9IHI7XG4gICAgICB9XG4gICAgICByID0geTEgLSBheTtcbiAgICAgIGlmICghZHkgJiYgciA8IDApIHJldHVybjtcbiAgICAgIHIgLz0gZHk7XG4gICAgICBpZiAoZHkgPCAwKSB7XG4gICAgICAgIGlmIChyID4gdDEpIHJldHVybjtcbiAgICAgICAgaWYgKHIgPiB0MCkgdDAgPSByO1xuICAgICAgfSBlbHNlIGlmIChkeSA+IDApIHtcbiAgICAgICAgaWYgKHIgPCB0MCkgcmV0dXJuO1xuICAgICAgICBpZiAociA8IHQxKSB0MSA9IHI7XG4gICAgICB9XG4gICAgICBpZiAodDAgPiAwKSBsaW5lLmEgPSB7XG4gICAgICAgIHg6IGF4ICsgdDAgKiBkeCxcbiAgICAgICAgeTogYXkgKyB0MCAqIGR5XG4gICAgICB9O1xuICAgICAgaWYgKHQxIDwgMSkgbGluZS5iID0ge1xuICAgICAgICB4OiBheCArIHQxICogZHgsXG4gICAgICAgIHk6IGF5ICsgdDEgKiBkeVxuICAgICAgfTtcbiAgICAgIHJldHVybiBsaW5l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uICAgICAgICAgICAgaWYgKHZpc2libGUpIHtcbiAgICAgICAgICAgICAgZDNfZ2VvX2NsaXBQb2x5Z29uKHNlZ21lbnRzLCBjb21wYXJlLCBjbGlwU3RhcnRJbnNpZGUsIGludGVycG9sYXRlLCBsaXN0ZW5lcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBsaXN0ZW5lci5wb2x5Z29uRW5kKCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHNlZ21lbnRzID0gcG9seWdvbiA9IHJpbmcgPSBudWxsO1xuICAgICAgICB9XG4gICAgICB9O1xuICAgICAgZnVuY3Rpb24gaW5zaWRlUG9seWdvbihwKSB7XG4gICAgICAgIHZhciB3biA9IDAsIG4gPSBwb2x5Z29uLmxlbmd0aCwgeSA9IHBbMV07XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbjsgKytpKSB7XG4gICAgICAgICAgZm9yICh2YXIgaiA9IDEsIHYgPSBwb2x5Z29uW2ldLCBtID0gdi5sZW5ndGgsIGEgPSB2WzBdLCBiOyBqIDwgbTsgKytqKSB7XG4gICAgICAgICAgICBiID0gdltqXTtcbiAgICAgICAgICAgIGlmIChhWzFdIDw9IHkpIHtcbiAgICAgICAgICAgICAgaWYgKGJbMV0gPiB5ICYmIGQzX2Nyb3NzMmQoYSwgYiwgcCkgPiAwKSArK3duO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgaWYgKGJbMV0gPD0geSAmJiBkM19jcm9zczJkKGEsIGIsIHApIDwgMCkgLS13bjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGEgPSBiO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd24gIT09IDA7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBpbnRlcnBvbGF0ZShmcm9tLCB0bywgZGlyZWN0aW9uLCBsaXN0ZW5lcikge1xuICAgICAgICB2YXIgYSA9IDAsIGExID0gMDtcbiAgICAgICAg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ICAgICAgaWYgKHNlZ21lbnRzKSB7XG4gICAgICAgICAgbGluZVBvaW50KHhfXywgeV9fKTtcbiAgICAgICAgICBpZiAodl9fICYmIHZfKSBidWZmZXJMaXN0ZW5lci5yZWpvaW4oKTtcbiAgICAgICAgICBzZWdtZW50cy5wdXNoKGJ1ZmZlckxpc3RlbmVyLmJ1ZmZlcigpKTtcbiAgICAgICAgfVxuICAgICAgICBjbGlwLnBvaW50ID0gcG9pbnQ7XG4gICAgICAgIGlmICh2XykgbGlzdGVuZXIubGluZUVuZCgpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gbGluZVBvaW50KHgsIHkpIHtcbiAgICAgICAgeCA9IE1hdGgubWF4KC1kM19nZW9fY2xpcEV4dGVudE1BWCwgTWF0aC5taW4oZDNfZ2VvX2NsaXBFeHRlbnRNQVgsIHgpKTtcbiAgICAgICAgeSA9IE1hdGgubWF4KC1kM19nZW9fY2xpcEV4dGVudE1BWCwgTWF0aC5taW4oZDNfZ2VvX2NsaXBFeHRlbnRNQVgsIHkpKTtcbiAgICAgICAgdmFyIHYgPSBwb2ludFZpc2libGUoeCwgeSk7XG4gICAgICAgIGlmIChwb2x5Z29uKSByaW5nLnB1c2goWyB4LCB5IF0pO1xuICAgICAgICBpZiAoZmlyc3QpIHtcbiAgICAgICAgICB4X18gPSB4LCB5X18gPSB5LCB2X18gPSB2O1xuICAgICAgICAgIGZpcnN0ID0gZmFsc2U7XG4gICAgICAgICAgaWYgKHYpIHtcbiAgICAgICAgICAgIGxpc3RlbmVyLmxpbmVTdGFydCgpO1xuICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQoeCwgeSk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGlmICh2ICYmIHZfKSBsaXN0ZW5lci5wb2ludCh4LCB5KTsgZWxzZSB7XG4gICAgICAgICAgICB2YXIgbCA9IHtcbiAgICAgICAgICAgICAgYToge1xuICAgICAgICAgICAgICAgIHg6IHhfLFxuICAgICAgICAgICAgICAgIHk6IHlfXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIGI6IHtcbiAgICAgICAgICAgICAgICB4OiB4LFxuICAgICAgICAgICAgICAgIHk6IHlcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGlmIChjbGlwTGluZShsKSkge1xuICAgICAgICAgICAgICBpZiAoIXZfKSB7XG4gICAgICAgICAgICAgICAgbGlzdGVuZXIubGluZVN0YXJ0KCk7XG4gICAgICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQobC5hLngsIGwuYS55KTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBsaXN0ZW5lci5wb2ludChsLmIueCwgbC5iLnkpO1xuICAgICAgICAgICAgICBpZiAoIXYpIGxpc3RlbmVyLmxpbmVFbmQoKTtcbiAgICAgICAgICAgICAgY2xlYW4gPSBmYWxzZTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodikge1xuICAgICAgICAgICAgICBsaXN0ZW5lci5saW5lU3RhcnQoKTtcbiAgICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQoeCwgeSk7XG4gICAgICAgICAgICAgIGNsZWFuID0gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHhfID0geCwgeV8gPSB5LCB2XyA9IHY7XG4gICAgICB9XG4gICAgICByZXR1cm4gY2xpcDtcbiAgICB9O1xuICAgIGZ1bmN0aW9uIGNvcm5lcihwLCBkaXJlY3Rpb24pIHtcbiAgICAgIHJldHVybiBhYnMocFswXSAtIHgwKSA8IM61ID8gZGlyZWN0aW9uID4gMCA/IDAgOiAzIDogYWJzKHBbMF0gLSB4MSkgPCDOtSA/IGRpcmVjdGlvbiA+IDAgPyAyIDogMSA6IGFicyhwWzFdIC0geTApIDwgzrUgPyBkaXJlY3Rpb24gPiAwID8gMSA6IDAgOiBkaXJlY3Rpb24gPiAwID8gMyA6IDI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gICAgICAgICAgaWYgKCF2YSkgdmEgPSB7XG4gICAgICAgICAgICB4OiAoeTAgLSBmYikgLyBmbSxcbiAgICAgICAgICAgIHk6IHkwXG4gICAgICAgICAgfTsgZWxzZSBpZiAodmEueSA+PSB5MSkgcmV0dXJuO1xuICAgICAgICAgIHZiID0ge1xuICAgICAgICAgICAgeDogKHkxIC0gZmIpIC8gZm0sXG4gICAgICAgICAgICB5OiB5MVxuICAgICAgICAgIH07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaWYgKCF2YSkgdmEgPSB7XG4gICAgICAgICAgICB4OiAoeTEgLSBmYikgLyBmbSxcbiAgICAgICAgICAgIHk6IHkxXG4gICAgICAgICAgfTsgZWxzZSBpZiAodmEueSA8IHkwKSByZXR1cm47XG4gICAgICAgICAgdmIgPSB7XG4gICAgICAgICAgICB4OiAoeTAgLSBmYikgLyBmbSxcbiAgICAgICAgICAgIHk6IHkwXG4gICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaWYgKGx5IDwgcnkpIHtcbiAgICAgICAgICBpZiAoIXZhKSB2YSA9IHtcbiAgICAgICAgICAgIHg6IHgwLFxuICAgICAgICAgICAgeTogZm0gKiB4MCArIGZiXG4gICAgICAgICAgfTsgZWxzZSBpZiAodmEueCA+PSB4MSkgcmV0dXJuO1xuICAgICAgICAgIHZiID0ge1xuICAgICAgICAgICAgeDogeDEsXG4gICAgICAgICAgICB5OiBmbSAqIHgxICsgZmJcbiAgICAgICAgICB9O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGlmICghdmEpIHZhID0ge1xuICAgICAgICAgICAgeDogeDEsXG4gICAgICAgICAgICB5OiBmbSAqIHgxICsgZmJcbiAgICAgICAgICB9OyBlbHNlIGlmICh2YS54IDwgeDApIHJldHVybjtcbiAgICAgICAgICB2YiA9IHtcbiAgICAgICAgICAgIHg6IHgwLFxuICAgICAgICAgICAgeTogZm0gKiB4MCArIGZiX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AgIHBhcmVudCA9IGFmdGVyLlU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBwYXJlbnQuQyA9IGZhbHNlO1xuICAgICAgICAgICAgZ3JhbmRwYS5DID0gdHJ1ZTtcbiAgICAgICAgICAgIGQzX2dlb21fdm9yb25vaVJlZEJsYWNrUm90YXRlUmlnaHQodGhpcywgZ3JhbmRwYSk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHVuY2xlID0gZ3JhbmRwYS5MO1xuICAgICAgICAgIGlmICh1bmNsZSAmJiB1bmNsZS5DKSB7XG4gICAgICAgICAgICBwYXJlbnQuQyA9IHVuY2xlLkMgPSBmYWxzZTtcbiAgICAgICAgICAgIGdyYW5kcGEuQyA9IHRydWU7XG4gICAgICAgICAgICBhZnRlciA9IGdyYW5kcGE7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmIChhZnRlciA9PT0gcGFyZW50LkwpIHtcbiAgICAgICAgICAgICAgZDNfZ2VvbV92b3Jvbm9pUmVkQmxhY2tSb3RhdGVSaWdodCh0aGlzLCBwYXJlbnQpO1xuICAgICAgICAgICAgICBhZnRlciA9IHBhcmVudDtcbiAgICAgICAgICAgICAgcGFyZW50ID0gYWZ0ZXIuVTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHBhcmVudC5DID0gZmFsc2U7XG4gICAgICAgICAgICBncmFuZHBhLkMgPSB0cnVlO1xuICAgICAgICAgICAgZDNfZ2VvbV92b3Jvbm9pUmVkQmxhY2tSb3RhdGVMZWZ0KHRoaXMsIGdyYW5kcGEpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBwYXJlbnQgPSBhZnRlci5VO1xuICAgICAgfVxuICAgICAgdGhpcy5fLkMgPSBmYWxzZTtcbiAgICB9LFxuICAgIHJlbW92ZTogZnVuY3Rpb24obm9kZSkge1xuICAgICAgaWYgKG5vZGUuTikgbm9kZS5OLlAgPSBub2RlLl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AgfSBlbHNlIHtcbiAgICAgICAgcmVkID0gbm9kZS5DO1xuICAgICAgICBub2RlID0gbmV4dDtcbiAgICAgIH1cbiAgICAgIGlmIChub2RlKSBub2RlLlUgPSBwYXJlbnQ7XG4gICAgICBpZiAocmVkKSByZXR1cm47XG4gICAgICBpZiAobm9kZSAmJiBub2RlLkMpIHtcbiAgICAgICAgbm9kZS5DID0gZmFsc2U7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cbiAgICAgIGRvIHtcbiAgICAgICAgaWYgKG5vZGUgPT09IHRoaXMuXykgYnJlYWs7XG4gICAgICAgIGlmIChub2RlID09PSBwYXJlbnQuTCkge1xuICAgICAgICAgIHNpYmxpbmcgPSBwYXJlbnQuUjtcbiAgICAgICAgICBpZiAoc2libGluZy5DKSB7XG4gICAgICAgICAgICBzaWJsaW5nLkMgPSBmYWxzZTtcbiAgICAgICAgICAgIHBhcmVudC5DID0gdHJ1ZTtcbiAgICAgICAgICAgIGQzX2dlb21fdm9yb25vaVJlZEJsYWNrUm90YXRlTGVmdCh0aGlzLCBwYXJlbnQpO1xuICAgICAgICAgICAgc2libGluZyA9IHBhcmVudC5SO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoc2libGluZy5MICYmIHNpYmxpbmcuTC5DIHx8IHNpYmxpbmcuUiAmJiBzaWJsaW5nLlIuQykge1xuICAgICAgICAgICAgaWYgKCFzaWJsaW5nLlIgfHwgIXNpYmxpbmcuUi5DKSB7XG4gICAgICAgICAgICAgIHNpYmxpbmcuTC5DID0gZmFsc2U7XG4gICAgICAgICAgICAgIHNpYmxpbmcuQyA9IHRydWU7XG4gICAgICAgICAgICAgIGQzX2dlb21fdm9yb25vaVJlZEJsYWNrUm90YXRlUmlnaHQodGhpcywgc2libGluZyk7XG4gICAgICAgICAgICAgIHNpYmxpbmcgPSBwYXJlbnQuUjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNpYmxpbmcuQyA9IHBhcmVudC5DO1xuICAgICAgICAgICAgcGFyZW50LkMgPSBzaWJsaW5nLlIuQyA9IGZhbHNlO1xuICAgICAgICAgICAgZDNfZ2VvbV92b3Jvbm9pUmVkQmxhY2tSb3RhdGVMZWZ0KHRoaXMsIHBhcmVudCk7XG4gICAgICAgICAgICBub2RlID0gdGhpcy5fO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHNpYmxpbmcgPSBwYXJlbnQuTDtcbiAgICAgICAgICBpZiAoc2libGluZy5DKSB7XG4gICAgICAgICAgICBzaWJsaW5nLkMgPSBmYWxzZTtcbiAgICAgICAgICAgIHBhcmVudC5DID0gdHJ1ZTtcbiAgICAgICAgICAgIGQzX2dlb21fdm9yb25vaVJlZEJsYWNrUm90YXRlUmlnaHQodGhpcywgcGFyZW50KTtcbiAgICAgICAgICAgIHNpYmxpbmcgPSBwYXJlbnQuTDtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKHNpYmxpbmcuTCAmJiBzaWJsaW5nLkwuQyB8fCBzaWJsaW5nLlIgJiYgc2libGluZy5SLkMpIHtcbiAgICAgICAgICAgIGlmICghc2libGluZy5MIHx8ICFzaWJsaW5nLkwuQykge1xuICAgICAgICAgICAgICBzaWJsaW5nLlIuQyA9IGZhbHNlO1xuICAgICAgICAgICAgICBzaWJsaW5nLkMgPSB0cnVlO1xuICAgICAgICAgICAgICBkM19nZW9tX3Zvcm9ub2lSZWRCbGFja1JvdGF0ZUxlZnQodGhpcywgc2libGluZyk7XG4gICAgICAgICAgICAgIHNpYmxpbmcgPSBwYXJlbnQuTDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNpYmxpbmcuQyA9IHBhcmVudC5DO1xuICAgICAgICAgICAgcGFyZW50LkMgPSBzaWJsaW5nLkwuQyA9IGZhbHNlO1xuICAgICAgICAgICAgZDNfZ2VvbV92b3Jvbm9pUmVkQmxhY2tSb3RhdGVSaWdodCh0aGlzLCBwYXJlb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B4Ml8sIHkyXztcbiAgICAgIGlmICh4MSAhPSBudWxsKSB7XG4gICAgICAgIHgxXyA9IHgxLCB5MV8gPSB5MSwgeDJfID0geDIsIHkyXyA9IHkyO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgeDJfID0geTJfID0gLSh4MV8gPSB5MV8gPSBJbmZpbml0eSk7XG4gICAgICAgIHhzID0gW10sIHlzID0gW107XG4gICAgICAgIG4gPSBkYXRhLmxlbmd0aDtcbiAgICAgICAgaWYgKGNvbXBhdCkgZm9yIChpID0gMDsgaSA8IG47ICsraSkge1xuICAgICAgICAgIGQgPSBkYXRhW2ldO1xuICAgICAgICAgIGlmIChkLnggPCB4MV8pIHgxXyA9IGQueDtcbiAgICAgICAgICBpZiAoZC55IDwgeTFfKSB5MV8gPSBkLnk7XG4gICAgICAgICAgaWYgKGQueCA+IHgyXykgeDJfID0gZC54O1xuICAgICAgICAgIGlmIChkLnkgPiB5Ml8pIHkyXyA9IGQueTtcbiAgICAgICAgICB4cy5wdXNoKGQueCk7XG4gICAgICAgICAgeXMucHVzaChkLnkpO1xuICAgICAgICB9IGVsc2UgZm9yIChpID0gMDsgaSA8IG47ICsraSkge1xuICAgICAgICAgIHZhciB4XyA9ICtmeChkID0gZGF0YVtpXSwgaSksIHlfID0gK2Z5KGQsIGkpO1xuICAgICAgICAgIGlmICh4XyA8IHgxXykgeDFfID0geF87XG4gICAgICAgICAgaWYgKHlfIDwgeTFfKSB5MV8gPSB5XztcbiAgICAgICAgICBpZiAoeF8gPiB4Ml8pIHgyXyA9IHhfO1xuICAgICAgICAgIGlmICh5XyA+IHkyXykgeTJfID0geV87XG4gICAgICAgICAgeHMucHVzaCh4Xyk7XG4gICAgICAgICAgeXMucHVzaCh5Xyk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHZhciBkeCA9IHgyXyAtIHgxXywgZHkgPSB5Ml8gLSB5MV87XG4gICAgICBpZiAoZHggPiBkeSkgeTJfID0geTFfICsgZHg7IGVsc2UgeDJfID0geDFfICsgZHk7XG4gICAgICBmdW5jdGlvbiBpbnNlcnQobiwgZCwgeCwgeSwgeDEsIHkxLCB4MiwgeTIpIHtcbiAgICAgICAgaWYgKGlzTmFOKHgpIHx8IGlzTmFOKHkpKSByZXR1cm47XG4gICAgICAgIGlmIChuLmxlYWYpIHtcbiAgICAgICAgICB2YXIgbnggPSBuLngsIG55ID0gbi55O1xuICAgICAgICAgIGlmIChueCAhPSBudWxsKSB7XG4gICAgICAgICAgICBpZiAoYWJzKG54IC0geCkgKyBhYnMobnkgLSB5KSA8IC4wMSkge1xuICAgICAgICAgICAgICBpbnNlcnRDaGlsZChuLCBkLCB4LCB5LCB4MSwgeTEsIHgyLCB5Mik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB2YXIgblBvaW50ID0gbi5wb2ludDtcbiAgICAgICAgICAgICAgbi54ID0gbi55ID0gbi5wb2ludCA9IG51bGw7XG4gICAgICAgICAgICAgIGluc2VydENoaWxkKG4sIG5Qb2ludCwgbngsIG55LCB4MSwgeTEsIHgyLCB5Mik7XG4gICAgICAgICAgICAgIGluc2VydENoaWxkKG4sIGQsIHgsIHksIHgxLCB5MSwgeDIsIHkyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbi54ID0geCwgbi55ID0geSwgbi5wb2ludCA9IGQ7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGluc2VydENoaWxkKG4sIGQsIHgsIHksIHgxLCB5MSwgeDIsIHkyKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZnVuY3Rpb24gaW5zZXJ0Q2hpbGQobiwgZCwgeCwgeSwgeDEsIHkxLCB4MiwgeTIpIHtcbiAgICAgICAgdmFyIHhtID0gKHgxICsgeDIpICogLjUsIHltID0gKHkxICsgeTIpICogLjUsIHJpZ2h0ID0geCA+PSB4bSwgYmVsb3cgPSB5ID49IHltLCB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mdW5jdGlvbihkLCBpKSB7XG4gICAgICAgICAgZC5zb3J0KGZ1bmN0aW9uKGEsIGIpIHtcbiAgICAgICAgICAgIHJldHVybiBzb3J0U3ViZ3JvdXBzKG1hdHJpeFtpXVthXSwgbWF0cml4W2ldW2JdKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICBrID0gKM+EIC0gcGFkZGluZyAqIG4pIC8gaztcbiAgICAgIHggPSAwLCBpID0gLTE7XG4gICAgICB3aGlsZSAoKytpIDwgbikge1xuICAgICAgICB4MCA9IHgsIGogPSAtMTtcbiAgICAgICAgd2hpbGUgKCsraiA8IG4pIHtcbiAgICAgICAgICB2YXIgZGkgPSBncm91cEluZGV4W2ldLCBkaiA9IHN1Ymdyb3VwSW5kZXhbZGldW2pdLCB2ID0gbWF0cml4W2RpXVtkal0sIGEwID0geCwgYTEgPSB4ICs9IHYgKiBrO1xuICAgICAgICAgIHN1Ymdyb3Vwc1tkaSArIFwiLVwiICsgZGpdID0ge1xuICAgICAgICAgICAgaW5kZXg6IGRpLFxuICAgICAgICAgICAgc3ViaW5kZXg6IGRqLFxuICAgICAgICAgICAgc3RhcnRBbmdsZTogYTAsXG4gICAgICAgICAgICBlbmRBbmdsZTogYTEsXG4gICAgICAgICAgICB2YWx1ZTogdlxuICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgZ3JvdXBzW2RpXSA9IHtcbiAgICAgICAgICBpbmRleDogZGksXG4gICAgICAgICAgc3RhcnRBbmdsZTogeDAsXG4gICAgICAgICAgZW5kQW5nbGU6IHgsXG4gICAgICAgICAgdmFsdWU6IGdyb3VwU3Vtc1tkaV1cbiAgICAgICAgfTtcbiAgICAgICAgeCArPSBwYWRkaW5nO1xuICAgICAgfVxuICAgICAgaSA9IC0xO1xuICAgICAgd2hpbGUgKCsraSA8IG4pIHtcbiAgICAgICAgaiA9IGkgLSAxO1xuICAgICAgICB3aGlsZSAoKytqIDwgbikge1xuICAgICAgICAgIHZhciBzb3VyY2UgPSBzdWJncm91cHNbaSArIFwiLVwiICsgal0sIHRhcmdldCA9IHN1Ymdyb3Vwc1tqICsgXCItXCIgKyBpXTtcbiAgICAgICAgICBpZiAoc291cmNlLnZhbHVlIHx8IHRhcmdldC52YWx1ZSkge1xuICAgICAgICAgICAgY2hvcmRzLnB1c2goc291cmNlLnZhbHVlIDwgdGFyZ2V0LnZhbHVlID8ge1xuICAgICAgICAgICAgICBzb3VyY2U6IHRhcmdldCxcbiAgICAgICAgICAgICAgdGFyZ2V0OiBzb3VyY2VcbiAgICAgICAgICAgIH0gOiB7XG4gICAgICAgICAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgICAgICAgICB0YXJnZXQ6IHRhcmdldFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICBpZiAoc29ydENob3JkcykgcmVzb3J0KCk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJlc29ydCgpIHtcbiAgICAgIGNob3Jkcy5zb3J0KGZ1bmN0aW9uKGEsIGIpIHtcbiAgICAgICAgcmV0dXJuIHNvcnRDaG9yZHMoKGEuc291cmNlLnZhbHVlICsgYS50YXJnZXQudmFsdWUpIC8gMiwgKGIuc291cmNlLnZhbHVlICsgYi50YXJnZXQudmFsdWUpIC8gMik7XG4gICAgICB9KTtcbiAgICB9XG4gICAgY2hvcmQubWF0cml4ID0gZnVuY3Rpb24oeCkge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4gbWF0cml4O1xuICAgICAgbiA9IChtYXRyaXggPSB4KSAmJiBtYXRyaXgubGVuZ3RoO1xuICAgICAgY2hvcmRzID0gZ3JvdXBzID0gbnVsbDtcbiAgICAgIHJldHVybiBjaG9yZDtcbiAgICB9O1xuICAgIGNob3JkLnBhZGRpbmcgPSBmdW5jdGlvbih4KSB7XG4gICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHV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ICAgICAgfVxuICAgICAgICAgIGlmIChxdWFkLnBvaW50ICYmIGRuICYmIGRuIDwgY2hhcmdlRGlzdGFuY2UyKSB7XG4gICAgICAgICAgICB2YXIgayA9IHF1YWQucG9pbnRDaGFyZ2UgLyBkbjtcbiAgICAgICAgICAgIG5vZGUucHggLT0gZHggKiBrO1xuICAgICAgICAgICAgbm9kZS5weSAtPSBkeSAqIGs7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiAhcXVhZC5jaGFyZ2U7XG4gICAgICB9O1xuICAgIH1cbiAgICBmb3JjZS50aWNrID0gZnVuY3Rpb24oKSB7XG4gICAgICBpZiAoKGFscGhhICo9IC45OSkgPCAuMDA1KSB7XG4gICAgICAgIHRpbWVyID0gbnVsbDtcbiAgICAgICAgZXZlbnQuZW5kKHtcbiAgICAgICAgICB0eXBlOiBcImVuZFwiLFxuICAgICAgICAgIGFscGhhOiBhbHBoYSA9IDBcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgfVxuICAgICAgdmFyIG4gPSBub2Rlcy5sZW5ndGgsIG0gPSBsaW5rcy5sZW5ndGgsIHEsIGksIG8sIHMsIHQsIGwsIGssIHgsIHk7XG4gICAgICBmb3IgKGkgPSAwOyBpIDwgbTsgKytpKSB7XG4gICAgICAgIG8gPSBsaW5rc1tpXTtcbiAgICAgICAgcyA9IG8uc291cmNlO1xuICAgICAgICB0ID0gby50YXJnZXQ7XG4gICAgICAgIHggPSB0LnggLSBzLng7XG4gICAgICAgIHkgPSB0LnkgLSBzLnk7XG4gICAgICAgIGlmIChsID0geCAqIHggKyB5ICogeSkge1xuICAgICAgICAgIGwgPSBhbHBoYSAqIHN0cmVuZ3Roc1tpXSAqICgobCA9IE1hdGguc3FydChsKSkgLSBkaXN0YW5jZXNbaV0pIC8gbDtcbiAgICAgICAgICB4ICo9IGw7XG4gICAgICAgICAgeSAqPSBsO1xuICAgICAgICAgIHQueCAtPSB4ICogKGsgPSBzLndlaWdodCArIHQud2VpZ2h0ID8gcy53ZWlnaHQgLyAocy53ZWlnaHQgKyB0LndlaWdodCkgOiAuNSk7XG4gICAgICAgICAgdC55IC09IHkgKiBrO1xuICAgICAgICAgIHMueCArPSB4ICogKGsgPSAxIC0gayk7XG4gICAgICAgICAgcy55ICs9IHkgKiBrO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBpZiAoayA9IGFscGhhICogZ3Jhdml0eSkge1xuICAgICAgICB4ID0gc2l6ZVswXSAvIDI7XG4gICAgICAgIHkgPSBzaXplWzFdIC8gMjtcbiAgICAgICAgaSA9IC0xO1xuICAgICAgICBpZiAoaykgd2hpbGUgKCsraSA8IG4pIHtcbiAgICAgICAgICBvID0gbm9kZXNbaV07XG4gICAgICAgICAgby54ICs9ICh4IC0gby54KSAqIGs7XG4gICAgICAgICAgby55ICs9ICh5IC0gby55KSAqIGs7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGlmIChjaGFyZ2UpIHtcbiAgICAgICAgZDNfbGF5b3V0X2ZvcmNlQWNjdW11bGF0ZShxID0gZDMuZ2VvbS5xdWFkdHJlZShub2RlcyksIGFscGhhLCBjaGFyZ2VzKTtcbiAgICAgICAgaSA9IC0xO1xuICAgICAgICB3aGlsZSAoKytpIDwgbikge1xuICAgICAgICAgIGlmICghKG8gPSBub2Rlc1tpXSkuZml4ZWQpIHtcbiAgICAgICAgICAgIHEudmlzaXQocmVwdWxzZShvKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICBpID0gLTE7XG4gICAgICB3aGlsZSAoKytpIDwgbikge1xuICAgICAgICBvID0gbm9kZXNbaV07XG4gICAgICAgIGlmIChvLmZpeGVkKSB7XG4gICAgICAgICAgby54ID0gby5weDtcbiAgICAgICAgICBvLnkgPSBvLnB5O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIG8ueCAtPSAoby5weCAtIChvLnB4ID0gby54KSkgKiBmcmljdGlvbj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G4gICAgfTtcbiAgICBmb3JjZS5hbHBoYSA9IGZ1bmN0aW9uKHgpIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIGFscGhhO1xuICAgICAgeCA9ICt4O1xuICAgICAgaWYgKGFscGhhKSB7XG4gICAgICAgIGlmICh4ID4gMCkge1xuICAgICAgICAgIGFscGhhID0geDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0aW1lci5jID0gbnVsbCwgdGltZXIudCA9IE5hTiwgdGltZXIgPSBudWxsO1xuICAgICAgICAgIGV2ZW50LmVuZCh7XG4gICAgICAgICAgICB0eXBlOiBcImVuZFwiLFxuICAgICAgICAgICAgYWxwaGE6IGFscGhhID0gMFxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKHggPiAwKSB7XG4gICAgICAgIGV2ZW50LnN0YXJ0KHtcbiAgICAgICAgICB0eXBlOiBcInN0YXJ0XCIsXG4gICAgICAgICAgYWxwaGE6IGFscGhhID0geFxuICAgICAgICB9KTtcbiAgICAgICAgdGltZXIgPSBkM190aW1lcihmb3JjZS50aWNrKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBmb3JjZTtcbiAgICB9O1xuICAgIGZvcmNlLnN0YXJ0ID0gZnVuY3Rpb24oKSB7XG4gICAgICB2YXIgaSwgbiA9IG5vZGVzLmxlbmd0aCwgbSA9IGxpbmtzLmxlbmd0aCwgdyA9IHNpemVbMF0sIGggPSBzaXplWzFdLCBuZWlnaGJvcnMsIG87XG4gICAgICBmb3IgKGkgPSAwOyBpIDwgbjsgKytpKSB7XG4gICAgICAgIChvID0gbm9kZXNbaV0pLmluZGV4ID0gaTtcbiAgICAgICAgby53ZWlnaHQgPSAwO1xuICAgICAgfVxuICAgICAgZm9yIChpID0gMDsgaSA8IG07ICsraSkge1xuICAgICAgICBvID0gbGlua3NbaV07XG4gICAgICAgIGlmICh0eXBlb2Ygby5zb3VyY2UgPT0gXCJud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ID0gbztcbiAgICAgICAgc3Vtcy5wdXNoKG8pO1xuICAgICAgfVxuICAgICAgZm9yIChqID0gMDsgaiA8IG07ICsraikge1xuICAgICAgICB5MFtqXSA9IChtYXggLSBzdW1zW2pdKSAvIDI7XG4gICAgICB9XG4gICAgICByZXR1cm4geTA7XG4gICAgfSxcbiAgICB3aWdnbGU6IGZ1bmN0aW9uKGRhdGEpIHtcbiAgICAgIHZhciBuID0gZGF0YS5sZW5ndGgsIHggPSBkYXRhWzBdLCBtID0geC5sZW5ndGgsIGksIGosIGssIHMxLCBzMiwgczMsIGR4LCBvLCBvMCwgeTAgPSBbXTtcbiAgICAgIHkwWzBdID0gbyA9IG8wID0gMDtcbiAgICAgIGZvciAoaiA9IDE7IGogPCBtOyArK2opIHtcbiAgICAgICAgZm9yIChpID0gMCwgczEgPSAwOyBpIDwgbjsgKytpKSBzMSArPSBkYXRhW2ldW2pdWzFdO1xuICAgICAgICBmb3IgKGkgPSAwLCBzMiA9IDAsIGR4ID0geFtqXVswXSAtIHhbaiAtIDFdWzBdOyBpIDwgbjsgKytpKSB7XG4gICAgICAgICAgZm9yIChrID0gMCwgczMgPSAoZGF0YVtpXVtqXVsxXSAtIGRhdGFbaV1baiAtIDFdWzFdKSAvICgyICogZHgpOyBrIDwgaTsgKytrKSB7XG4gICAgICAgICAgICBzMyArPSAoZGF0YVtrXVtqXVsxXSAtIGRhdGFba11baiAtIDFdWzFdKSAvIGR4O1xuICAgICAgICAgIH1cbiAgICAgICAgICBzMiArPSBzMyAqIGRhdGFbaV1bal1bMV07XG4gICAgICAgIH1cbiAgICAgICAgeTBbal0gPSBvIC09IHMxID8gczIgLyBzMSAqIGR4IDogMDtcbiAgICAgICAgaWYgKG8gPCBvMCkgbzAgPSBvO1xuICAgICAgfVxuICAgICAgZm9yIChqID0gMDsgaiA8IG07ICsraikgeTBbal0gLT0gbzA7XG4gICAgICByZXR1cm4geTA7XG4gICAgfSxcbiAgICBleHBhbmQ6IGZ1bmN0aW9uK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m9kZXNbMl07XG4gICAgICAgIGQzX2xheW91dF9wYWNrUGxhY2UoYSwgYiwgYyk7XG4gICAgICAgIGJvdW5kKGMpO1xuICAgICAgICBkM19sYXlvdXRfcGFja0luc2VydChhLCBjKTtcbiAgICAgICAgYS5fcGFja19wcmV2ID0gYztcbiAgICAgICAgZDNfbGF5b3V0X3BhY2tJbnNlcnQoYywgYik7XG4gICAgICAgIGIgPSBhLl9wYWNrX25leHQ7XG4gICAgICAgIGZvciAoaSA9IDM7IGkgPCBuOyBpKyspIHtcbiAgICAgICAgICBkM19sYXlvdXRfcGFja1BsYWNlKGEsIGIsIGMgPSBub2Rlc1tpXSk7XG4gICAgICAgICAgdmFyIGlzZWN0ID0gMCwgczEgPSAxLCBzMiA9IDE7XG4gICAgICAgICAgZm9yIChqID0gYi5fcGFja19uZXh0OyBqICE9PSBiOyBqID0gai5fcGFja19uZXh0LCBzMSsrKSB7XG4gICAgICAgICAgICBpZiAoZDNfbGF5b3V0X3BhY2tJbnRlcnNlY3RzKGosIGMpKSB7XG4gICAgICAgICAgICAgIGlzZWN0ID0gMTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChpc2VjdCA9PSAxKSB7XG4gICAgICAgICAgICBmb3IgKGsgPSBhLl9wYWNrX3ByZXY7IGsgIT09IGouX3BhY2tfcHJldjsgayA9IGsuX3BhY2tfcHJldiwgczIrKykge1xuICAgICAgICAgICAgICBpZiAoZDNfbGF5b3V0X3BhY2tJbnRlcnNlY3RzKGssIGMpKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGlzZWN0KSB7XG4gICAgICAgICAgICBpZiAoczEgPCBzMiB8fCBzMSA9PSBzMiAmJiBiLnIgPCBhLnIpIGQzX2xheW91dF9wYWNrU3BsaWNlKGEsIGIgPSBq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nggPSAobm9kZS54ICsgdHgpICoga3g7XG4gICAgICAgICAgbm9kZS55ID0gbm9kZS5kZXB0aCAqIGt5O1xuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBub2RlcztcbiAgICB9XG4gICAgZnVuY3Rpb24gd3JhcFRyZWUocm9vdDApIHtcbiAgICAgIHZhciByb290MSA9IHtcbiAgICAgICAgQTogbnVsbCxcbiAgICAgICAgY2hpbGRyZW46IFsgcm9vdDAgXVxuICAgICAgfSwgcXVldWUgPSBbIHJvb3QxIF0sIG5vZGUxO1xuICAgICAgd2hpbGUgKChub2RlMSA9IHF1ZXVlLnBvcCgpKSAhPSBudWxsKSB7XG4gICAgICAgIGZvciAodmFyIGNoaWxkcmVuID0gbm9kZTEuY2hpbGRyZW4sIGNoaWxkLCBpID0gMCwgbiA9IGNoaWxkcmVuLmxlbmd0aDsgaSA8IG47ICsraSkge1xuICAgICAgICAgIHF1ZXVlLnB1c2goKGNoaWxkcmVuW2ldID0gY2hpbGQgPSB7XG4gICAgICAgICAgICBfOiBjaGlsZHJlbltpXSxcbiAgICAgICAgICAgIHBhcmVudDogbm9kZTEsXG4gICAgICAgICAgICBjaGlsZHJlbjogKGNoaWxkID0gY2hpbGRyZW5baV0uY2hpbGRyZW4pICYmIGNoaWxkLnNsaWNlKCkgfHwgW10sXG4gICAgICAgICAgICBBOiBudWxsLFxuICAgICAgICAgICAgYTogbnVsbCxcbiAgICAgICAgICAgIHo6IDAsXG4gICAgICAgICAgICBtOiAwLFxuICAgICAgICAgICAgYzogMCxcbiAgICAgICAgICAgIHM6IDAsXG4gICAgICAgICAgICB0OiBudWxsLFxuICAgICAgICAgICAgaTogaVxuICAgICAgICAgIH0pLmEgPSBjaGlsZCk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHJldHVybiByb290MS5jaGlsZHJlblswXTtcbiAgICB9XG4gICAgZnVuY3Rpb24gZmlyc3RXYWxrKHYpIHtcbiAgICAgIHZhciBjaGlsZH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HJlZVJpZ2h0KHZpbSksIHZpcCA9IGQzX2xheW91dF90cmVlTGVmdCh2aXApLCB2aW0gJiYgdmlwKSB7XG4gICAgICAgICAgdm9tID0gZDNfbGF5b3V0X3RyZWVMZWZ0KHZvbSk7XG4gICAgICAgICAgdm9wID0gZDNfbGF5b3V0X3RyZWVSaWdodCh2b3ApO1xuICAgICAgICAgIHZvcC5hID0gdjtcbiAgICAgICAgICBzaGlmdCA9IHZpbS56ICsgc2ltIC0gdmlwLnogLSBzaXAgKyBzZXBhcmF0aW9uKHZpbS5fLCB2aXAuXyk7XG4gICAgICAgICAgaWYgKHNoaWZ0ID4gMCkge1xuICAgICAgICAgICAgZDNfbGF5b3V0X3RyZWVNb3ZlKGQzX2xheW91dF90cmVlQW5jZXN0b3IodmltLCB2LCBhbmNlc3RvciksIHYsIHNoaWZ0KTtcbiAgICAgICAgICAgIHNpcCArPSBzaGlmdDtcbiAgICAgICAgICAgIHNvcCArPSBzaGlmdDtcbiAgICAgICAgICB9XG4gICAgICAgICAgc2ltICs9IHZpbS5tO1xuICAgICAgICAgIHNpcCArPSB2aXAubTtcbiAgICAgICAgICBzb20gKz0gdm9tLm07XG4gICAgICAgICAgc29wICs9IHZvcC5tO1xuICAgICAgICB9XG4gICAgICAgIGlmICh2aW0gJiYgIWQzX2xheW91dF90cmVlUmlnaHQodm9wKSkge1xuICAgICAgICAgIHZvcC50ID0gdmltO1xuICAgICAgICAgIHZvcC5tICs9IHNpbSAtIHNvcDtcbiAgICAgICAgfVxuICAgICAgICBpZiAodmlwICYmICFkM19sYXlvdXRfdHJlZUxlZnQodm9tKSkge1xuICAgICAgICAgIHZvbS50ID0gdmlwO1xuICAgICAgICAgIHZvbS5tICs9IHNpcCAtIHNvbTtcbiAgICAgICAgICBhbmNlc3RvciA9IHY7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHJldHVybiBhbmNlc3RvcjtcbiAgICB9XG4gICAgZnVuY3Rpb24gc2l6ZU5vZGUobm9kZSk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FmdGVyKHJvb3QsIG5vZGVTaXplID8gZnVuY3Rpb24obm9kZSkge1xuICAgICAgICBub2RlLnggPSAobm9kZS54IC0gcm9vdC54KSAqIHNpemVbMF07XG4gICAgICAgIG5vZGUueSA9IChyb290LnkgLSBub2RlLnkpICogc2l6ZVsxXTtcbiAgICAgIH0gOiBmdW5jdGlvbihub2RlKSB7XG4gICAgICAgIG5vZGUueCA9IChub2RlLnggLSB4MCkgLyAoeDEgLSB4MCkgKiBzaXplWzBdO1xuICAgICAgICBub2RlLnkgPSAoMSAtIChyb290LnkgPyBub2RlLnkgLyByb290LnkgOiAxKSkgKiBzaXplWzFdO1xuICAgICAgfSk7XG4gICAgICByZXR1cm4gbm9kZXM7XG4gICAgfVxuICAgIGNsdXN0ZXIuc2VwYXJhdGlvbiA9IGZ1bmN0aW9uKHgpIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIHNlcGFyYXRpb247XG4gICAgICBzZXBhcmF0aW9uID0geDtcbiAgICAgIHJldHVybiBjbHVzdGVyO1xuICAgIH07XG4gICAgY2x1c3Rlci5zaXplID0gZnVuY3Rpb24oeCkge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4gbm9kZVNpemUgPyBudWxsIDogc2l6ZTtcbiAgICAgIG5vZGVTaXplID0gKHNpemUgPSB4KSA9PSBudWxsO1xuICAgICAgcmV0dXJuIGNsdXN0ZXI7XG4gICAgfTtcbiAgICBjbHVzdGVyLm5vZGVTaXplID0gZnVuY3Rpb24oeCkge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4gbm9kZVNpemUgPyBzaXplIDogbnVsbDtcbiAgICAgIG5vZGVTaXplID0gKHNpemUgPSB4KSAhPSBudWxsO1xuICAgICAgcmV0dXJuIGNsdXN0ZXI7XG4gICAgfTtcbiAgICByZXR1cm4gZDNfbGF5b3V0X2hpZXJhcmNoeVJlYmluZChjbHVzdGVyLCBoa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ge1xuICAgICAgICAgIHJvdy5wdXNoKGNoaWxkID0gcmVtYWluaW5nW24gLSAxXSk7XG4gICAgICAgICAgcm93LmFyZWEgKz0gY2hpbGQuYXJlYTtcbiAgICAgICAgICBpZiAobW9kZSAhPT0gXCJzcXVhcmlmeVwiIHx8IChzY29yZSA9IHdvcnN0KHJvdywgdSkpIDw9IGJlc3QpIHtcbiAgICAgICAgICAgIHJlbWFpbmluZy5wb3AoKTtcbiAgICAgICAgICAgIGJlc3QgPSBzY29yZTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcm93LmFyZWEgLT0gcm93LnBvcCgpLmFyZWE7XG4gICAgICAgICAgICBwb3NpdGlvbihyb3csIHUsIHJlY3QsIGZhbHNlKTtcbiAgICAgICAgICAgIHUgPSBNYXRoLm1pbihyZWN0LmR4LCByZWN0LmR5KTtcbiAgICAgICAgICAgIHJvdy5sZW5ndGggPSByb3cuYXJlYSA9IDA7XG4gICAgICAgICAgICBiZXN0ID0gSW5maW5pdHk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChyb3cubGVuZ3RoKSB7XG4gICAgICAgICAgcG9zaXRpb24ocm93LCB1LCByZWN0LCB0cnVlKTtcbiAgICAgICAgICByb3cubGVuZ3RoID0gcm93LmFyZWEgPSAwO1xuICAgICAgICB9XG4gICAgICAgIGNoaWxkcmVuLmZvckVhY2goc3F1YXJpZnkpO1xuICAgICAgfVxuICAgIH1cbiAgICBmdW5jdGlvbiBzdGlja2lmeShub2RlKSB7XG4gICAgICB2YXIgY2hpbGRyZW4gPSBub2RlLmNoaWxkcmVuO1xuICAgICAgaWYgKGNoaWxkcmVuICYmIGNoaWxkcmVuLmxlbmd0aCkge1xuICAgICAgICB2YXIgcmVjdCA9IHBhZChub2RlKSwgcmVtYWluaW5nID0gY2hpbGRyZW4uc2xpY2UoKSwgY2hpbGQsIHJvdyA9IFtdO1xuICAgICAgICBzY2FsZShyZW1haW5pbmcsIHJlY3QuZHggKiByZWN0LmR5IC8gbm9kZS52YWx1ZSk7XG4gICAgICAgIHJvdy5hcmVhID0gMDtcbiAgICAgICAgd2hpbGUgKGNoaWxkID0gcmVtYWluaW5nLnBvcCgpKSB7XG4gICAgICAgICAgcm93LnB1c2goY2hpbGQpO1xuICAgICAgICAgIHJvdy5hcmVhICs9IGNoaWxkLmFyZWE7XG4gICAgICAgICAgaWYgKGNoaWxkLnogIT0gbnVsbCkge1xuICAgICAgICAgICAgcG9zaXRpb24ocm93LCBjaGlsZC56ID8gcmVjdC5keCA6IHJlY3QuZHksIHJlY3QsICFyZW1haW5pbmcubGVuZ3RoKTtcbiAgICAgICAgICAgIHJvdy5sZW5ndGggPSByb3cuYXJlYSA9IDA7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGNoaWxkcmVuLmZvckVhY2goc3RpY2tpZnkpO1xuICAgICAgfVxuICAgIH1cbiAgICBmdW5jdGlvbiB3b3JzdChyb3csIHUpIHtcbiAgICAgIHZhciBzID0gcm93LmFyZWEsIHIsIHJtYXggPSAwLCBybWluID0gSW5maW5pdHksIGkgPSAtMSwgbiA9IHJvdy5sZW5ndGg7XG4gICAgICB3aGlsZSAoKytpIDwgbikge1xuICAgICAgICBpZiAoIShyID0gcm93W2ldLmFyZWEpKSBjb250aW51ZTtcbiAgICAgICAgaWYgKHIgPCBybWluKSBybWluID0gcjtcbiAgICAgICAgaWYgKHIgPiBybWF4KSBybWF4ID0gcjtcbiAgICAgIH1cbiAgICAgIHMgKj0gcztcbiAgICAgIHUgKj0gdTtcbiAgICAgIHJldHVybiBzID8gTWF0aC5tYXgodSAqIHJtYXggKiByYXRpbyAvIHMsIHMgLyAodSAqIHJtaW4gKiByYXRpbykpIDogSW5maW5pdHk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHBvc2l0aW9uKHJvdywgdSwgcmVjdCwgZmx1c2gpIHtcbiAgICAgIHZhciBpID0gLTEsIG4gPSByb3cubGVuZ3RoLCB4ID0gcmVjdC54LCB5ID0gcmVjdC55LCB2ID0gdSA/IHJvdW5kKHJvdy5hcmVhIC8gdSkgOiAwLCBvO1xuICAgICAgaWYgKHUgPT0gcmVjdC5keCkge1xuICAgICAgICBpZiAoZmx1c2ggfHwgdiA+IHJlY3QuZHkpIHYgPSByZWN0LmR5O1xuICAgICAgICB3aGlsZSAoKytpIDwgbikge1xuICAgICAgICAgIG8gPSByb3dbaV07XG4gICAgICAgICAgby54ID0geDtcbiAgICAgICAgICBvLnkgPSB5O1xuICAgICAgICAgIG8uZHkgPSB2O1xuICAgICAgICAgIHggKz0gby5keCA9IE1hdGgubWluKHJlY3QueCArIHJlY3QuZHggLSB4LCB2ID8gcm91bmQoby5hcmVhIC8gdikgOiAwKTtcbiAgICAgICAgfVxuICAgICAgICBvLnogPSB0cnVlO1xuICAgICAgICBvLmR4ICs9IHJlY3QueCArIHJlY3QuZHggLSB4O1xuICAgICAgICByZWN0LnkgKz0gdjtcbiAgICAgICAgcmVjdC5keSAtPSB2O1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaWYgKGZsdXNoIHx8IHYgPiByZWN0LmR4KSB2ID0gcmVjdC5keDtcbiAgICAgICAgd2hpbGUgKCsraSA8IG4pIHtcbiAgICAgICAgICBvID0gcm93W2ldO1xuICAgICAgICAgIG8ueCA9IHg7XG4gICAgICAgICAgby55ID0geTtcbiAgICAgICAgICBvLmR4ID0gdjtcbiAgICAgICAgICB5ICs9IG8uZHkgPSBNYXRoLm1pbihyZWN0LnkgKyByZWN0LmR5IC0geSwgdiA/IHJvdW5kKG8uYXJlYSAvIHYpIDogMCk7XG4gICAgICAgIH1cbiAgICAgICAgby56ID0gZmFsc2U7XG4gICAgICAgIG8uZHkgKz0gcmVjdC55ICsgcmVjdC5keSAtIHk7XG4gICAgICAgIHJlY3QueCArPSB2O1xuICAgICAgICByZWN0LmR4IC09IHY7XG4gICAgICB9XG4gICAgfVxuICAgIGZ1bmN0aW9uIHRyZWVtYXAoZCkge1xuICAgICAg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AgICAgICB2YXIgeCwgeSwgcjtcbiAgICAgICAgZG8ge1xuICAgICAgICAgIHggPSBNYXRoLnJhbmRvbSgpICogMiAtIDE7XG4gICAgICAgICAgeSA9IE1hdGgucmFuZG9tKCkgKiAyIC0gMTtcbiAgICAgICAgICByID0geCAqIHggKyB5ICogeTtcbiAgICAgICAgfSB3aGlsZSAoIXIgfHwgciA+IDEpO1xuICAgICAgICByZXR1cm4gwrUgKyDPgyAqIHggKiBNYXRoLnNxcnQoLTIgKiBNYXRoLmxvZyhyKSAvIHIpO1xuICAgICAgfTtcbiAgICB9LFxuICAgIGxvZ05vcm1hbDogZnVuY3Rpb24oKSB7XG4gICAgICB2YXIgcmFuZG9tID0gZDMucmFuZG9tLm5vcm1hbC5hcHBseShkMywgYXJndW1lbnRzKTtcbiAgICAgIHJldHVybiBmdW5jdGlvbigpIHtcbiAgICAgICAgcmV0dXJuIE1hdGguZXhwKHJhbmRvbSgpKTtcbiAgICAgIH07XG4gICAgfSxcbiAgICBiYXRlczogZnVuY3Rpb24obSkge1xuICAgICAgdmFyIHJhbmRvbSA9IGQzLnJhbmRvbS5pcndpbkhhbGwobSk7XG4gICAgICByZXR1cm4gZnVuY3Rpb24oKSB7XG4gICAgICAgIHJldHVybiByYW5kb20oKSAvIG07XG4gICAgICB9O1xuICAgIH0sXG4gICAgaXJ3aW5IYWxsOiBmdW5jdGlvbihtKSB7XG4gICAgICByZXR1cm4gZnVuY3Rpb24oKSB7XG4gICAgICAgIGZvciAodmFyIHMgPSAwLCBqID0gMDsgaiA8IG07IGorKykgcyArPSBNYXRoLnJhbmRvbSgpO1xuICAgICAgICByZXR1cm4gcztcbiAgICAgIH07XG4gICAgfVxuICB9O1xuICBkMy5zY2FsZSA9IHt9O1xuICBmdW5jdGlvbiBkM19zY2FsZUV4dGVudChkb21haW4pIHtcbiAgICB2YXIgc3RhcnQgPSBkb21haW5bMF0sIHN0b3AgPSBkb21haW5bZG9tYWluLmxlbmd0aCAtIDFdO1xuICAgI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hcChsb2cpKTtcbiAgICAgIHJldHVybiBzY2FsZTtcbiAgICB9O1xuICAgIHNjYWxlLm5pY2UgPSBmdW5jdGlvbigpIHtcbiAgICAgIHZhciBuaWNlZCA9IGQzX3NjYWxlX25pY2UoZG9tYWluLm1hcChsb2cpLCBwb3NpdGl2ZSA/IE1hdGggOiBkM19zY2FsZV9sb2dOaWNlTmVnYXRpdmUpO1xuICAgICAgbGluZWFyLmRvbWFpbihuaWNlZCk7XG4gICAgICBkb21haW4gPSBuaWNlZC5tYXAocG93KTtcbiAgICAgIHJldHVybiBzY2FsZTtcbiAgICB9O1xuICAgIHNjYWxlLnRpY2tzID0gZnVuY3Rpb24oKSB7XG4gICAgICB2YXIgZXh0ZW50ID0gZDNfc2NhbGVFeHRlbnQoZG9tYWluKSwgdGlja3MgPSBbXSwgdSA9IGV4dGVudFswXSwgdiA9IGV4dGVudFsxXSwgaSA9IE1hdGguZmxvb3IobG9nKHUpKSwgaiA9IE1hdGguY2VpbChsb2codikpLCBuID0gYmFzZSAlIDEgPyAyIDogYmFzZTtcbiAgICAgIGlmIChpc0Zpbml0ZShqIC0gaSkpIHtcbiAgICAgICAgaWYgKHBvc2l0aXZlKSB7XG4gICAgICAgICAgZm9yICg7aSA8IGo7IGkrKykgZm9yICh2YXIgayA9IDE7IGsgPCBuOyBrKyspIHRpY2tzLnB1c2gocG93KGkpICogayk7XG4gICAgICAgICAgdGlja3MucHVzaChwb3coaSkpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRpY2tzLnB1c2gocG93KGkpKTtcbiAgICAgICAgICBmb3IgKDtpKysgPCBqOyApIGZvciAodmFyIGsgPSBuIC0gMTsgayA+IDA7IGstLSkgdGlja3MucHVzaChwb3coaSkgKiBrKTtcbiAgICAgICAgfVxuICAgICAgICBmb3IgKGkgPSAwOyB0aWNrc1tpXSA8IHU7IGkrKykge31cbiAgICAgICAgZm9yIChqID0gdGlja3MubGVuZ3RoOyB0aWNrc1tqIC0gMV0gPi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FyZ3VtZW50cykgfHwgMCkgLyAyKSB7XG4gICAgICAgIHJwID0gcGFkUmFkaXVzID09PSBkM19zdmdfYXJjQXV0byA/IE1hdGguc3FydChyMCAqIHIwICsgcjEgKiByMSkgOiArcGFkUmFkaXVzLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7XG4gICAgICAgIGlmICghY3cpIHAxICo9IC0xO1xuICAgICAgICBpZiAocjEpIHAxID0gZDNfYXNpbihycCAvIHIxICogTWF0aC5zaW4oYXApKTtcbiAgICAgICAgaWYgKHIwKSBwMCA9IGQzX2FzaW4ocnAgLyByMCAqIE1hdGguc2luKGFwKSk7XG4gICAgICB9XG4gICAgICBpZiAocjEpIHtcbiAgICAgICAgeDAgPSByMSAqIE1hdGguY29zKGEwICsgcDEpO1xuICAgICAgICB5MCA9IHIxICogTWF0aC5zaW4oYTAgKyBwMSk7XG4gICAgICAgIHgxID0gcjEgKiBNYXRoLmNvcyhhMSAtIHAxKTtcbiAgICAgICAgeTEgPSByMSAqIE1hdGguc2luKGExIC0gcDEpO1xuICAgICAgICB2YXIgbDEgPSBNYXRoLmFicyhhMSAtIGEwIC0gMiAqIHAxKSA8PSDPgCA/IDAgOiAxO1xuICAgICAgICBpZiAocDEgJiYgZDNfc3ZnX2FyY1N3ZWVwKHgwLCB5MCwgeDEsIHkxKSA9PT0gY3cgXiBsMSkge1xuICAgICAgICAgIHZhciBoMSA9IChhMCArIGExKSAvIDI7XG4gICAgICAgICAgeDAgPSByMSAqIE1hdGguY29zKGgxKTtcbiAgICAgICAgICB5MCA9IHIxICogTWF0aC5zaW4oaDEpO1xuICAgICAgICAgIHgxID0geTEgPSBudWxsO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB4MCA9IHkwID0gMDtcbiAgICAgIH1cbiAgICAgIGlmIChyMCkge1xuICAgICAgICB4MiA9IHIwICogTWF0aC5jb3MoYTEgLSBwMCk7XG4gICAgICAgIHkyID0gcjAgKiBNYXRoLnNpbihhMSAtIHAwKTtcbiAgICAgICAgeDMgPSByMCAqIE1hdGguY29zKGEwICsgcDApO1xuICAgICAgICB5MyA9IHIwICogTWF0aC5zaW4oYTAgKyBwMCk7XG4gICAgICAgIHZhciBsMCA9IE1hdGguYWJzKGEwIC0gYTEgKyAyICogcDApIDw9IM+AID8gMCA6IDE7XG4gICAgICAgIGlmIChwMCAmJiBkM19zdmdfYXJjU3dlZXAoeDIsIHkyLCB4MywgeTMpID09PSAxIC0gY3cgXiBsMCkge1xuICAgICAgICAgIHZhciBoMCA9IChhMCArIGExKSAvIDI7XG4gICAgICAgICAgeDIgPSByMCAqIE1hdGguY29zKGgwKTtcbiAgICAgICAgICB5MiA9IHIwICogTWF0aC5zaW4oaDApO1xuICAgICAgICAgIHgzID0geTMgPSBudWxsO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB4MiA9IHkyID0gMDtcbiAgICAgIH1cbiAgICAgIGlmIChkYSA+IM61ICYmIChyYyA9IE1hdGgubWluKE1hdGguYWJzKHIxIC0gcjApIC8gMiwgK2Nvcm5lclJhZGl1cy5hcHBseSh0aGlzLCBhcmd1bWVudHMpKSkgPiAuMDAxKSB7XG4gICAgICAgIGNyID0gcjAgPCByMSBeIGN3ID8gMCA6IDE7XG4gICAgICAgIHZhciByYzEgPSByYywgcmMwID0gcmM7XG4gICAgICAgIGlmIChkYSA8IM+AKSB7XG4gICAgICAgICAgdmFyIG9jID0geDMgPT0gbnVsbCA/IFsgeDIsIHkyIF0gOiB4MSA9PSBudWxsID8gWyB4MCwgeTAgXSA6IGQzX2dlb21fcG9seWdvbkludGVyc2VjdChbIHgwLCB5MCBdLCBbIHgzLCB5MyBdLCBbIHgxLCB5MSBdLCBbIHgyLCB5MiBdKSwgYXggPSB4MCAtIG9jWzBdLCBheSA9IHkwIC0gb2NbMV0sIGJ4ID0geDEgLSBvY1swXSwgYnkgPSB5MSAtIG9jWzFdLCBrYyA9IDEgLyBNYXRoLnNpbihNYXRoLmFjb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vaW4oXCJcIikgOiBudWxsO1xuICAgIH1cbiAgICBhcmVhLnggPSBmdW5jdGlvbihfKSB7XG4gICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiB4MTtcbiAgICAgIHgwID0geDEgPSBfO1xuICAgICAgcmV0dXJuIGFyZWE7XG4gICAgfTtcbiAgICBhcmVhLngwID0gZnVuY3Rpb24oXykge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4geDA7XG4gICAgICB4MCA9IF87XG4gICAgICByZXR1cm4gYXJlYTtcbiAgICB9O1xuICAgIGFyZWEueDEgPSBmdW5jdGlvbihfKSB7XG4gICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiB4MTtcbiAgICAgIHgxID0gXztcbiAgICAgIHJldHVybiBhcmVhO1xuICAgIH07XG4gICAgYXJlYS55ID0gZnVuY3Rpb24oXykge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4geTE7XG4gICAgICB5MCA9IHkxID0gXztcbiAgICAgIHJldHVybiBhcmVhO1xuICAgIH07XG4gICAgYXJlYS55MCA9IGZ1bmN0aW9uKF8pIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIHkwO1xuICAgICAgeTAgPSBfO1xuICAgICAgcmV0dXJuIGFyZWE7XG4gICAgfTtcbiAgICBhcmVhLnkxID0gZnVuY3Rpb24oXykge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4geTE7XG4gICAgICB5MSA9IF87XG4gICAgICByZXR1cm4gYXJlYTtcbiAgICB9O1xuICAgIGFyZWEuZGVmaW5lZCA9IGZ1bmN0aW9uKF8pIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIGRlZmluZWQ7XG4gICAgICBkZWZpbmVkID0gXztcbiAgICAgIHJldHVybiBhcmVhO1xuICAgIH07XG4gICAgYXJlY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Y3RpdmUudGltZXIudCA9IE5hTjtcbiAgICAgICAgLS1sb2NrLmNvdW50O1xuICAgICAgICBkZWxldGUgbG9ja1thY3RpdmVJZF07XG4gICAgICAgIGFjdGl2ZS5ldmVudCAmJiBhY3RpdmUuZXZlbnQuaW50ZXJydXB0LmNhbGwobm9kZSwgbm9kZS5fX2RhdGFfXywgYWN0aXZlLmluZGV4KTtcbiAgICAgIH1cbiAgICAgIGZvciAodmFyIGNhbmNlbElkIGluIGxvY2spIHtcbiAgICAgICAgaWYgKCtjYW5jZWxJZCA8IGlkKSB7XG4gICAgICAgICAgdmFyIGNhbmNlbCA9IGxvY2tbY2FuY2VsSWRdO1xuICAgICAgICAgIGNhbmNlbC50aW1lci5jID0gbnVsbDtcbiAgICAgICAgICBjYW5jZWwudGltZXIudCA9IE5hTjtcbiAgICAgICAgICAtLWxvY2suY291bnQ7XG4gICAgICAgICAgZGVsZXRlIGxvY2tbY2FuY2VsSWRdO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICB0aW1lci5jID0gdGljaztcbiAgICAgIGQzX3RpbWVyKGZ1bmN0aW9uKCkge1xuICAgICAgICBpZiAodGltZXIuYyAmJiB0aWNrKGVsYXBzZWQgfHwgMSkpIHtcbiAgICAgICAgICB0aW1lci5jID0gbnVsbDtcbiAgICAgICAgICB0aW1lci50ID0gTmFOO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiAxO1xuICAgICAgfSwgMCwgdGltZSk7XG4gICAgICBsb2NrLmFjdGl2ZSA9IGlkO1xuICAgICAgdHJhbnNpdGlvbi5ldmVudCAmJiB0cmFuc2l0aW9uLmV2ZW50LnN0YXJ0LmNhbGwobm9kZSwgbm9kZS5fX2RhdGFfXywgaSk7XG4gICAgICB0d2VlbnMgPSBbXTtcbiAgICAgIHRyYW5zaXRpb24udHdlZW4uZm9yRWFjaChmdW5jdGlvbihrZXksIHZhbHVlKSB7XG4gICAgICAgIGlmICh2YWx1ZSA9IHZhbHVlLmNhbGwobm9kZSw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ICBkMy5zZWxlY3QodGhpcykudHJhbnNpdGlvbigpLmVhY2goXCJzdGFydC5icnVzaFwiLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHhFeHRlbnREb21haW4gPSBleHRlbnQwLmk7XG4gICAgICAgICAgICB5RXh0ZW50RG9tYWluID0gZXh0ZW50MC5qO1xuICAgICAgICAgICAgeEV4dGVudCA9IGV4dGVudDAueDtcbiAgICAgICAgICAgIHlFeHRlbnQgPSBleHRlbnQwLnk7XG4gICAgICAgICAgICBldmVudF8oe1xuICAgICAgICAgICAgICB0eXBlOiBcImJydXNoc3RhcnRcIlxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSkudHdlZW4oXCJicnVzaDpicnVzaFwiLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHZhciB4aSA9IGQzX2ludGVycG9sYXRlQXJyYXkoeEV4dGVudCwgZXh0ZW50MS54KSwgeWkgPSBkM19pbnRlcnBvbGF0ZUFycmF5KHlFeHRlbnQsIGV4dGVudDEueSk7XG4gICAgICAgICAgICB4RXh0ZW50RG9tYWluID0geUV4dGVudERvbWFpbiA9IG51bGw7XG4gICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24odCkge1xuICAgICAgICAgICAgICB4RXh0ZW50ID0gZXh0ZW50MS54ID0geGkodCk7XG4gICAgICAgICAgICAgIHlFeHRlbnQgPSBleHRlbnQxLnkgPSB5aSh0KTtcbiAgICAgICAgICAgICAgZXZlbnRfKHtcbiAgICAgICAgICAgICAgICB0eXBlOiBcImJydXNoXCIsXG4gICAgICAgICAgICAgICAgbW9kZTogXCJyZXNpemVcIlxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgfSkuZWFjaChcImVuZC5icnVzaFwiLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHhFeHRlbnREb21haW4gPSBleHRlbnQxLmk7XG4gICAgICAgICAgICB5RXh0ZW50RG9tYWluID0gZXh0ZW50MS5qO1xuIC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AgICAgIGJydXNobW92ZSgpO1xuICAgICAgZnVuY3Rpb24ga2V5ZG93bigpIHtcbiAgICAgICAgaWYgKGQzLmV2ZW50LmtleUNvZGUgPT0gMzIpIHtcbiAgICAgICAgICBpZiAoIWRyYWdnaW5nKSB7XG4gICAgICAgICAgICBjZW50ZXIgPSBudWxsO1xuICAgICAgICAgICAgb3JpZ2luWzBdIC09IHhFeHRlbnRbMV07XG4gICAgICAgICAgICBvcmlnaW5bMV0gLT0geUV4dGVudFsxXTtcbiAgICAgICAgICAgIGRyYWdnaW5nID0gMjtcbiAgICAgICAgICB9XG4gICAgICAgICAgZDNfZXZlbnRQcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBrZXl1cCgpIHtcbiAgICAgICAgaWYgKGQzLmV2ZW50LmtleUNvZGUgPT0gMzIgJiYgZHJhZ2dpbmcgPT0gMikge1xuICAgICAgICAgIG9yaWdpblswXSArPSB4RXh0ZW50WzFdO1xuICAgICAgICAgIG9yaWdpblsxXSArPSB5RXh0ZW50WzFdO1xuICAgICAgICAgIGRyYWdnaW5nID0gMDtcbiAgICAgICAgICBkM19ldmVudFByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIGJydXNobW92ZSgpIHtcbiAgICAgICAgdmFyIHBvaW50ID0gZDMubW91c2UodGFyZ2V0KSwgbW92ZWQgPSBmYWxzZTtcbiAgICAgICAgaWYgKG9mZnNldCkge1xuICAgICAgICAgIHBvaW50WzBdICs9IG9mZnNldFswXTtcbiAgICAgICAgICBwb2ludFsxXSArPSBvZmZzZXRbMV07XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFkcmFnZ2luZykge1xuICAgICAgICAgIGlmIChkMy5ldmVudC5hbHRLZXkpIHtcbiAgICAgICAgICAgIGlmICghY2VudGVyKSBjZW50ZXIgPSBbICh4RXh0ZW50WzBdICsgeEV4dGVudFsxXSkgLyAyLCAoeUV4dGVudFswXSArIHlFeHRlbnRbMV0pIC8gMiBdO1xuICAgICAgICAgICAgb3JpZ2luWzBdID0geEV4dGVudFsrKHBvaW50WzBdIDwgY2VudGVyWzBdKV07XG4gICAgICAgICAgICBvcmlnaW5bMV0gPSB5RXh0ZW50WysocG9pbnRbMV0gPCBjZW50ZXJbMV0pXTtcbiAgICAgICAgICB9IGVsc2UgY2VudGVyID0gbnVsbDtcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzaXppbmdYICYmIG1vdmUxKHBvaW50LCB4LCAwKSkge1xuICAgICAgICAgIHJlZHJhd1goZyk7XG4gICAgICAgICAgbW92ZWQgPSB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXNpemluZ1kgJiYgbW92ZTEocG9pbnQsIHksIDEpKSB7XG4gICAgICAgICAgcmVkcmF3WShnKTtcbiAgICAgICAgICBtb3ZlZCA9IHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1vdmVkKSB7XG4gICAgICAgICAgcmVkcmF3KGcpO1xuICAgICAgICAgIGV2ZW50Xyh7XG4gICAgICAgICAgICB0eXBlOiBcImJydXNoXCIsXG4gICAgICAgICAgICBtb2RlOiBkcmFnZ2luZyA/IFwibW92ZVwiIDogXCJyZXNpemVcIlxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBtb3ZlMShwb2ludCwgc2NhbGUsIGkpIHtcbiAgICAgICAgdmFyIHJhbmdlID0gZDNfc2NhbGVSYW5nZShzY2FsZSksIHIwID0gcmFuZ2VbMF0sIHIxID0gcmFuZ2VbMV0sIHBvc2l0aW9uID0gb3JpZ2luW2ldLCBleHRlbnQgPSBpID8geUV4dGVudCA6IHhFeHRlbnQsIHNpemUgPSBleHRlbnRbMV0gLSBleHRlbnRbMF0sIG1pbiwgbWF4O1xuICAgICAgICBpZiAoZHJhZ2dpbmcpIHtcbiAgICAgICAgICByMCAtPSBwb3NpdGlvbjtcbiAgICAgICAgICByMSAtPSBzaXplICsgcG9zaXRpb247XG4gICAgICAgIH1cbiAgICAgICAgbWluID0gKGkgPyB5Q2xhbXAgOiB4Q2xhbXApID8gTWF0aC5tYXgocjAsIE1hdGgubWluKHIxLCBwb2ludFtpXSkpIDogcG9pbnRbaV07XG4gICAgICAgIGlmIChkcmFnZ2luZykge1xuICAgICAgICAgIG1heCA9IChtaW4gKz0gcG9zaXRpb24pICsgc2l6ZTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBpZiAoY2VudGVyKSBwb3NpdGlvbiA9IE1hdGgubWF4KHIwLCBNYXRoLm1pbihyMSwgMiAqIGNlbnRlcltpXSAtIG1pbikpO1xuICAgICAgICAgIGlmIChwb3NpdGlvbiA8IG1pbikge1xuICAgICAgICAgICAgbWF4ID0gbWluO1xuICAgICAgICAgICAgbWluID0gcG9zaXRpb247XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG1heCA9IHBvc2l0aW9uO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoZXh0ZW50WzBdICE9IG1pbiB8fCBleHRlbnRbMV0gIT0gbWF4KSB7XG4gICAgICAgICAgaWYgKGkpIHlFeHRlbnREb21haW4gPSBudWxsOyBlbHNlIHhFeHRlbnREb21haW4gPSBudWxsO1xuICAgICAgICAgIGV4dGVudFswXSA9IG1pbjtcbiAgICAgICAgICBleHRlbnRbMV0gPSBtYXg7XG4gICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIGJydXNoZW5kKCkge1xuICAgICAgICBicnVzaG1vdmUoKTtcbiAgICAgICAgZy5zdHlsZShcInBvaW50ZXItZXZlbnRzXCIsIFwiYWxsXCIpLnNlbGVjdEFsbChcIi5yZXNpemVcIikuc3R5bGUoXCJkaXNwbGF5XCIsIGJydXNoLmVtcHR5KCkgPyBcIm5vbmVcIiA6IG51bG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q2xhbXAgPSAhIXpbMV07IGVsc2UgaWYgKHgpIHhDbGFtcCA9ICEhejsgZWxzZSBpZiAoeSkgeUNsYW1wID0gISF6O1xuICAgICAgcmV0dXJuIGJydXNoO1xuICAgIH07XG4gICAgYnJ1c2guZXh0ZW50ID0gZnVuY3Rpb24oeikge1xuICAgICAgdmFyIHgwLCB4MSwgeTAsIHkxLCB0O1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSB7XG4gICAgICAgIGlmICh4KSB7XG4gICAgICAgICAgaWYgKHhFeHRlbnREb21haW4pIHtcbiAgICAgICAgICAgIHgwID0geEV4dGVudERvbWFpblswXSwgeDEgPSB4RXh0ZW50RG9tYWluWzFdO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB4MCA9IHhFeHRlbnRbMF0sIHgxID0geEV4dGVudFsxXTtcbiAgICAgICAgICAgIGlmICh4LmludmVydCkgeDAgPSB4LmludmVydCh4MCksIHgxID0geC5pbnZlcnQoeDEpO1xuICAgICAgICAgICAgaWYgKHgxIDwgeDApIHQgPSB4MCwgeDAgPSB4MSwgeDEgPSB0O1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoeSkge1xuICAgICAgICAgIGlmICh5RXh0ZW50RG9tYWluKSB7XG4gICAgICAgICAgICB5MCA9IHlFeHRlbnREb21haW5bMF0sIHkxID0geUV4dGVudERvbWFpblsxXTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgeTAgPSB5RXh0ZW50WzBdLCB5MSA9IHlFeHRlbnRbMV07XG4gICAgICAgICAgICBpZiAoeS5pbnZlcnQpIHkwID0geS5pbnZlcnQoeTApLCB5MSA9IHkuaW52ZXJ0KHkxKTtcbiAgICAgICAgICAgIGlmICh5MSA8IHkwKSB0ID0geTAsIHkwID0geTEsIHkxID0gdDtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHggJiYgeSA/IFsgWyB4MCwgeTAgXSwgWyB4MSwgeTEgXSBdIDogeCA/IFsgeDAsIHgxIF0gOiB5ICYmIFsgeTAsIHkxIF07XG4gICAgICB9XG4gICAgICBpZiAoeCkge1xuICAgICAgICB4MCA9IHpbMF0sIHgxID0gelsxXTtcbiAgICAgICAgaWYgKHkpIHgwID0geDBbMF0sIHgxID0geDFbMF07XG4gICAgICAgIHhFeHRlbnREb21haW4gPSBbIHgwLCB4MSBdO1xuICAgICAgICBpZiAoeC5pbnZlcnQpIHgwID0geCh4MCksIHgxID0geCh4MSk7XG4gICAgICAgIGlmICh4MSA8IHgwKSB0ID0geDAsIHgwID0geDEsIHgxID0gdDtcbiAgICAgICAgaWYgKHgwICE9IHhFeHRlbnRbMF0gfHwgeDEgIT0geEV4dGVudFsxXSkgeEV4dGVudCA9IFsgeDAsIHgxIF07XG4gICAgICB9XG4gICAgICBpZiAoeSkge1xuICAgICAgICB5MCA9IHpbMF0sIHkxID0gelsxXTtcbiAgICAgICAgaWYgKHgpIHkwID0geTBbMV0sIHkxID0geTFbMV07XG4gICAgICAgIHlFeHRlbnREb21haW4gPSBbIHkwLCB5MSBdO1xuICAgICAgICBpZiAoeS5pbnZlcnQpIHkwID0geSh5MCksIHkxID0geSh5MSk7XG4gICAgICAgIGlmICh5MSA8IHkwKSB0ID0geTAsIHkwID0geTEsIHkxID0gdDtcbiAgICAgICAgaWYgKHkwICE9IHlFeHRlbnRbMF0gfHwgeTEgIT0geUV4dGVudFsxXSkgeUV4dGVudCA9IFsgeTAsIHkxIF07XG4gICAgICB9XG4gICAgICByZXR1cm4gYnJ1c2g7XG4gICAgfTtcbiAgICBicnVzaC5jbGVhciA9IGZ1bmN0aW9uKCkge1xuICAgICAgaWYgKCFicnVzaC5lbXB0eSgpKSB7XG4gICAgICAgIHhFeHRlbnQgPSBbIDAsIDAgXSwgeUV4dGVudCA9IFsgMCwgMCBdO1xuICAgICAgICB4RXh0ZW50RG9tYWluID0geUV4dGVudERvbWFpbiA9IG51bGw7XG4gIC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Q0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/d3/d3.js\n"); + +/***/ }), + +/***/ "./node_modules/intersectionjs/intersection.js": +/*!*****************************************************!*\ + !*** ./node_modules/intersectionjs/intersection.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var Point2D = __webpack_require__(/*! point2d */ \"./node_modules/point2d/index.js\");\n\n/*****\n*\n* Intersection.js\n*\n* copyright 2002, Kevin Lindsey\n*\n*****/\n\n/*****\n*\n* constructor\n*\n*****/\nfunction Intersection(status) {\n if ( arguments.length > 0 ) {\n this.init(status);\n }\n}\n\n\n/*****\n*\n* init\n*\n*****/\nIntersection.prototype.init = function(status) {\n this.status = status;\n this.points = new Array();\n};\n\n\n/*****\n*\n* appendPoint\n*\n*****/\nIntersection.prototype.appendPoint = function(point) {\n this.points.push(point);\n};\n\n\n/*****\n*\n* appendPoints\n*\n*****/\nIntersection.prototype.appendPoints = function(points) {\n this.points = this.points.concat(points);\n};\n\n\n/*****\n*\n* class methods\n*\n*****/\n\n/*****\n*\n* intersectShapes\n*\n*****/\nIntersection.intersectShapes = function(shape1, shape2) {\n var ip1 = shape1.getIntersectionParams();\n var ip2 = shape2.getIntersectionParams();\n var result;\n\n if ( ip1 != null && ip2 != null ) {\n if ( ip1.name == \"Path\" ) {\n result = Intersection.intersectPathShape(shape1, shape2);\n } else if ( ip2.name == \"Path\" ) {\n result = Intersection.intersectPathShape(shape2, shape1);\n } else {\n var method;\n var params;\n\n if ( ip1.name < ip2.name ) {\n method = \"intersect\" + ip1.name + ip2.name;\n params = ip1.params.concat( ip2.params );\n } else {\n method = \"intersect\" + ip2.name + ip1.name;\n params = ip2.params.concat( ip1.params );\n }\n\n if ( !(method in Intersection) )\n throw new Error(\"Intersection not available: \" + method);\n\n result = Intersection[method].apply(null, params);\n }\n } else {\n result = new Intersection(\"No Intersection\");\n }\n\n return result;\n};\n\n\n/*****\n*\n* intersectPathShape\n*\n*****/\nIntersection.intersectPathShape = function(path, shape) {\n return path.intersectShape(shape);\n};\n\n\n/*****\n*\n* intersectBezier2Bezier2\n*\n*****/\nIntersection.intersectBezier2Bezier2 = function(a1, a2, a3, b1, b2, b3) {\n var a, b;\n var c12, c11, c10;\n var c22, c21, c20;\n var result = new Intersection(\"No Intersection\");\n var poly;\n\n a = a2.multiply(-2);\n c12 = a1.add(a.add(a3));\n\n a = a1.multiply(-2);\n b = a2.multiply(2);\n c11 = a.add(b);\n\n c10 = new Point2D(a1.x, a1.y);\n\n a = b2.multiply(-2);\n c22 = b1.add(a.add(b3));\n\n a = b1.multiply(-2);\n b = b2.multiply(2);\n c21 = a.add(b);\n\n c20 = new Point2D(b1.x, b1.y);\n \n if ( c12.y == 0 ) {\n var v0 = c12.x*(c10.y - c20.y);\n var v1 = v0 - c11.x*c11.y;\n var v2 = v0 + v1;\n var v3 = c11.y*c11.y;\n\n poly = new Polynomial(\n c12.x*c22.y*c22.y,\n 2*c12.x*c21.y*c22.y,\n c12.x*c21.y*c21.y - c22.x*v3 - c22.y*v0 - c22.y*v1,\n -c21.x*v3 - c21.y*v0 - c21.y*v1,\n (c10.x - c20.x)*v3 + (c10.y - c20.y)*v1\n );\n } else {\n var v0 = c12.x*c22.y - c12.y*c22.x;\n var v1 = c12.x*c21.y - c21.x*c12.y;\n var v2 = c11.x*c12.y - c11.y*c12.x;\n var v3 = c10.y - c20.y;\n var v4 = c12.y*(c10.x - c20.x) - c12.x*v3;\n var v5 = -c11.y*v2 + c12.y*v4;\n var v6 = v2*v2;\n\n poly = new Polynomial(\n v0*v0,\n 2*v0*v1,\n (-c22.y*v6 + c12.y*v1*v1 + c12.y*v0*v4 + v0*v5) / c12.y,\n (-c21.y*v6 + c12.y*v1*v4 + v1*v5) / c12.y,\n (v3*v6 + v4*v5) / c12.y\n );\n }\n\n var roots = poly.getRoots();\n for ( var i = 0; i < roots.length; i++ ) {\n var s = roots[i];\n\n if ( 0 <= s && s <= 1 ) {\n var xRoots = new Polynomial(\n c12.x,\n c11.x,\n c10.x - c20.x - s*c21.x - s*s*c22.x\n ).getRoots();\n var yRoots = new Polynomial(\n c12.y,\n c11.y,\n c10.y - c20.y - s*c21.y - s*s*c22.y\n ).getRoots();\n\n if ( xRoots.length > 0 && yRoots.length > 0 ) {\n var TOLERANCE = 1e-4;\n\n checkRoots:\n for ( var j = 0; j < xRoots.length; j++ ) {\n var xRoot = xRoots[j];\n\n if ( 0 <= xRoot && xRoot <= 1 ) {\n for ( var k = 0; k < yRoots.length; k++ ) {\n if ( Math.abs( xRoot - yRoots[k] ) < TOLERANCE ) {\n result.points.push( c22.multiply(s*s).add(c21.multiply(s).add(c20)) );\n break checkRoots;\n }\n }\n }\n }\n }\n }\n }\n\n if ( result.points.length > 0 ) result.status = \"Intersection\";\n\n return result;\n};\n\n\n/*****\n*\n* intersectBezier2Bezier3\n*\n*****/\nIntersection.intersectBezier2Bezier3 = function(a1, a2, a3, b1, b2, b3, b4) {\n var a, b,c, d;\n var c12, c11, c10;\n var c23, c22, c21, c20;\n var result = new Intersection(\"No Intersection\");\n\n a = a2.multiply(-2);\n c12 = a1.add(a.add(a3));\n\n a = a1.multiply(-2);\n b = a2.multiply(2);\n c11 = a.add(b);\n\n c10 = new Point2D(a1.x, a1.y);\n\n a = b1.multiply(-1);\n b = b2.multiply(3);\n c = b3.multiply(-3);\n d = a.add(b.add(c.add(b4)));\n c23 = new Vector2D(d.x, d.y);\n\n a = b1.multiply(3);\n b = b2.multiply(-6);\n c = b3.multiply(3);\n d = a.add(b.add(c));\n c22 = new Vector2D(d.x, d.y);\n\n a = b1.multiply(-3);\n b = b2.multiply(3);\n c = a.add(b);\n c21 = new Vector2D(c.x, c.y);\n\n c20 = new Vector2D(b1.x, b1.y);\n\n var c10x2 = c10.x*c10.x;\n var c10y2 = c10.y*c10.y;\n var c11x2 = c11.x*c11.x;\n var c11y2 = c11.y*c11.y;\n var c12x2 = c12.x*c12.x;\n var c12y2 = c12.y*c12.y;\n var c20x2 = c20.x*c20.x;\n var c20y2 = c20.y*c20.y;\n var c21x2 = c21.x*c21.x;\n var c21y2 = c21.y*c21.y;\n var c22x2 = c22.x*c22.x;\n var c22y2 = c22.y*c22.y;\n var c23x2 = c23.x*c23.x;\n var c23y2 = c23.y*c23.y;\n\n var poly = new Polynomial(\n -2*c12.x*c12.y*c23.x*c23.y + c12x2*c23y2 + c12y2*c23x2,\n -2*c12.x*c12.y*c22.x*c23.y - 2*c12.x*c12.y*c22.y*c23.x + 2*c12y2*c22.x*c23.x +\n 2*c12x2*c22.y*c23.y,\n -2*c12.x*c21.x*c12.y*c23.y - 2*c12.x*c12.y*c21.y*c23.x - 2*c12.x*c12.y*c22.x*c22.y +\n 2*c21.x*c12y2*c23.x + c12y2*c22x2 + c12x2*(2*c21.y*c23.y + c22y2),\n 2*c10.x*c12.x*c12.y*c23.y + 2*c10.y*c12.x*c12.y*c23.x + c11.x*c11.y*c12.x*c23.y +\n c11.x*c11.y*c12.y*c23.x - 2*c20.x*c12.x*c12.y*c23.y - 2*c12.x*c20.y*c12.y*c23.x -\n 2*c12.x*c21.x*c12.y*c22.y - 2*c12.x*c12.y*c21.y*c22.x - 2*c10.x*c12y2*c23.x -\n 2*c10.y*c12x2*c23.y + 2*c20.x*c12y2*c23.x + 2*c21.x*c12y2*c22.x -\n c11y2*c12.x*c23.x - c11x2*c12.y*c23.y + c12x2*(2*c20.y*c23.y + 2*c21.y*c22.y),\n 2*c10.x*c12.x*c12.y*c22.y + 2*c10.y*c12.x*c12.y*c22.x + c11.x*c11.y*c12.x*c22.y +\n c11.x*c11.y*c12.y*c22.x - 2*c20.x*c12.x*c12.y*c22.y - 2*c12.x*c20.y*c12.y*c22.x -\n 2*c12.x*c21.x*c12.y*c21.y - 2*c10.x*c12y2*c22.x - 2*c10.y*c12x2*c22.y +\n 2*c20.x*c12y2*c22.x - c11y2*c12.x*c22.x - c11x2*c12.y*c22.y + c21x2*c12y2 +\n c12x2*(2*c20.y*c22.y + c21y2),\n 2*c10.x*c12.x*c12.y*c21.y + 2*c10.y*c12.x*c21.x*c12.y + c11.x*c11.y*c12.x*c21.y +\n c11.x*c11.y*c21.x*c12.y - 2*c20.x*c12.x*c12.y*c21.y - 2*c12.x*c20.y*c21.x*c12.y -\n 2*c10.x*c21.x*c12y2 - 2*c10.y*c12x2*c21.y + 2*c20.x*c21.x*c12y2 -\n c11y2*c12.x*c21.x - c11x2*c12.y*c21.y + 2*c12x2*c20.y*c21.y,\n -2*c10.x*c10.y*c12.x*c12.y - c10.x*c11.x*c11.y*c12.y - c10.y*c11.x*c11.y*c12.x +\n 2*c10.x*c12.x*c20.y*c12.y + 2*c10.y*c20.x*c12.x*c12.y + c11.x*c20.x*c11.y*c12.y +\n c11.x*c11.y*c12.x*c20.y - 2*c20.x*c12.x*c20.y*c12.y - 2*c10.x*c20.x*c12y2 +\n c10.x*c11y2*c12.x + c10.y*c11x2*c12.y - 2*c10.y*c12x2*c20.y -\n c20.x*c11y2*c12.x - c11x2*c20.y*c12.y + c10x2*c12y2 + c10y2*c12x2 +\n c20x2*c12y2 + c12x2*c20y2\n );\n var roots = poly.getRootsInInterval(0,1);\n\n for ( var i = 0; i < roots.length; i++ ) {\n var s = roots[i];\n var xRoots = new Polynomial(\n c12.x,\n c11.x,\n c10.x - c20.x - s*c21.x - s*s*c22.x - s*s*s*c23.x\n ).getRoots();\n var yRoots = new Polynomial(\n c12.y,\n c11.y,\n c10.y - c20.y - s*c21.y - s*s*c22.y - s*s*s*c23.y\n ).getRoots();\n\n if ( xRoots.length > 0 && yRoots.length > 0 ) {\n var TOLERANCE = 1e-4;\n\n checkRoots:\n for ( var j = 0; j < xRoots.length; j++ ) {\n var xRoot = xRoots[j];\n \n if ( 0 <= xRoot && xRoot <= 1 ) {\n for ( var k = 0; k < yRoots.length; k++ ) {\n if ( Math.abs( xRoot - yRoots[k] ) < TOLERANCE ) {\n result.points.push(\n c23.multiply(s*s*s).add(c22.multiply(s*s).add(c21.multiply(s).add(c20)))\n );\n break checkRoots;\n }\n }\n }\n }\n }\n }\n\n if ( result.points.length > 0 ) result.status = \"Intersection\";\n\n return result;\n\n};\n\n\n/*****\n*\n* intersectBezier2Circle\n*\n*****/\nIntersection.intersectBezier2Circle = function(p1, p2, p3, c, r) {\n return Intersection.intersectBezier2Ellipse(p1, p2, p3, c, r, r);\n};\n\n\n/*****\n*\n* intersectBezier2Ellipse\n*\n*****/\nIntersection.intersectBezier2Ellipse = function(p1, p2, p3, ec, rx, ry) {\n var a, b; // temporary variables\n var c2, c1, c0; // coefficients of quadratic\n var result = new Intersection(\"No Intersection\");\n\n a = p2.multiply(-2);\n c2 = p1.add(a.add(p3));\n\n a = p1.multiply(-2);\n b = p2.multiply(2);\n c1 = a.add(b);\n\n c0 = new Point2D(p1.x, p1.y);\n\n var rxrx = rx*rx;\n var ryry = ry*ry;\n var roots = new Polynomial(\n ryry*c2.x*c2.x + rxrx*c2.y*c2.y,\n 2*(ryry*c2.x*c1.x + rxrx*c2.y*c1.y),\n ryry*(2*c2.x*c0.x + c1.x*c1.x) + rxrx*(2*c2.y*c0.y+c1.y*c1.y) -\n 2*(ryry*ec.x*c2.x + rxrx*ec.y*c2.y),\n 2*(ryry*c1.x*(c0.x-ec.x) + rxrx*c1.y*(c0.y-ec.y)),\n ryry*(c0.x*c0.x+ec.x*ec.x) + rxrx*(c0.y*c0.y + ec.y*ec.y) -\n 2*(ryry*ec.x*c0.x + rxrx*ec.y*c0.y) - rxrx*ryry\n ).getRoots();\n\n for ( var i = 0; i < roots.length; i++ ) {\n var t = roots[i];\n\n if ( 0 <= t && t <= 1 )\n result.points.push( c2.multiply(t*t).add(c1.multiply(t).add(c0)) );\n }\n\n if ( result.points.length > 0 ) result.status = \"Intersection\";\n\n return result;\n};\n\n\n/*****\n*\n* intersectBezier2Line\n*\n*****/\nIntersection.intersectBezier2Line = function(p1, p2, p3, a1, a2) {\n var a, b; // temporary variables\n var c2, c1, c0; // coefficients of quadratic\n var cl; // c coefficient for normal form of line\n var n; // normal for normal form of line\n var min = a1.min(a2); // used to determine if point is on line segment\n var max = a1.max(a2); // used to determine if point is on line segment\n var result = new Intersection(\"No Intersection\");\n \n a = p2.multiply(-2);\n c2 = p1.add(a.add(p3));\n\n a = p1.multiply(-2);\n b = p2.multiply(2);\n c1 = a.add(b);\n\n c0 = new Point2D(p1.x, p1.y);\n\n // Convert line to normal form: ax + by + c = 0\n // Find normal to line: negative inverse of original line's slope\n n = new Vector2D(a1.y - a2.y, a2.x - a1.x);\n \n // Determine new c coefficient\n cl = a1.x*a2.y - a2.x*a1.y;\n\n // Transform cubic coefficients to line's coordinate system and find roots\n // of cubic\n roots = new Polynomial(\n n.dot(c2),\n n.dot(c1),\n n.dot(c0) + cl\n ).getRoots();\n\n // Any roots in closed interval [0,1] are intersections on Bezier, but\n // might not be on the line segment.\n // Find intersections and calculate point coordinates\n for ( var i = 0; i < roots.length; i++ ) {\n var t = roots[i];\n\n if ( 0 <= t && t <= 1 ) {\n // We're within the Bezier curve\n // Find point on Bezier\n var p4 = p1.lerp(p2, t);\n var p5 = p2.lerp(p3, t);\n\n var p6 = p4.lerp(p5, t);\n\n // See if point is on line segment\n // Had to make special cases for vertical and horizontal lines due\n // to slight errors in calculation of p6\n if ( a1.x == a2.x ) {\n if ( min.y <= p6.y && p6.y <= max.y ) {\n result.status = \"Intersection\";\n result.appendPoint( p6 );\n }\n } else if ( a1.y == a2.y ) {\n if ( min.x <= p6.x && p6.x <= max.x ) {\n result.status = \"Intersection\";\n result.appendPoint( p6 );\n }\n } else if ( p6.gte(min) && p6.lte(max) ) {\n result.status = \"Intersection\";\n result.appendPoint( p6 );\n }\n }\n }\n\n return result;\n};\n\n\n/*****\n*\n* intersectBezier2Polygon\n*\n*****/\nIntersection.intersectBezier2Polygon = function(p1, p2, p3, points) {\n var result = new Intersection(\"No Intersection\");\n var length = points.length;\n\n for ( var i = 0; i < length; i++ ) {\n var a1 = points[i];\n var a2 = points[(i+1) % length];\n var inter = Intersection.intersectBezier2Line(p1, p2, p3, a1, a2);\n\n result.appendPoints(inter.points);\n }\n\n if ( result.points.length > 0 ) result.status = \"Intersection\";\n\n return result;\n};\n\n\n/*****\n*\n* intersectBezier2Rectangle\n*\n*****/\nIntersection.intersectBezier2Rectangle = function(p1, p2, p3, r1, r2) {\n var min = r1.min(r2);\n var max = r1.max(r2);\n var topRight = new Point2D( max.x, min.y );\n var bottomLeft = new Point2D( min.x, max.y );\n \n var inter1 = Intersection.intersectBezier2Line(p1, p2, p3, min, topRight);\n var inter2 = Intersection.intersectBezier2Line(p1, p2, p3, topRight, max);\n var inter3 = Intersection.intersectBezier2Line(p1, p2, p3, max, bottomLeft);\n var inter4 = Intersection.intersectBezier2Line(p1, p2, p3, bottomLeft, min);\n \n var result = new Intersection(\"No Intersection\");\n\n result.appendPoints(inter1.points);\n result.appendPoints(inter2.points);\n result.appendPoints(inter3.points);\n result.appendPoints(inter4.points);\n\n if ( result.points.length > 0 ) result.status = \"Intersection\";\n\n return result;\n};\n\n\n/*****\n*\n* intersectBezier3Bezier3\n*\n*****/\nIntersection.intersectBezier3Bezier3 = function(a1, a2, a3, a4, b1, b2, b3, b4) {\n var a, b, c, d; // temporary variables\n var c13, c12, c11, c10; // coefficients of cubic\n var c23, c22, c21, c20; // coefficients of cubic\n var result = new Intersection(\"No Intersection\");\n\n // Calculate the coefficients of cubic polynomial\n a = a1.multiply(-1);\n b = a2.multiply(3);\n c = a3.multiply(-3);\n d = a.add(b.add(c.add(a4)));\n c13 = new Vector2D(d.x, d.y);\n\n a = a1.multiply(3);\n b = a2.multiply(-6);\n c = a3.multiply(3);\n d = a.add(b.add(c));\n c12 = new Vector2D(d.x, d.y);\n\n a = a1.multiply(-3);\n b = a2.multiply(3);\n c = a.add(b);\n c11 = new Vector2D(c.x, c.y);\n\n c10 = new Vector2D(a1.x, a1.y);\n\n a = b1.multiply(-1);\n b = b2.multiply(3);\n c = b3.multiply(-3);\n d = a.add(b.add(c.add(b4)));\n c23 = new Vector2D(d.x, d.y);\n\n a = b1.multiply(3);\n b = b2.multiply(-6);\n c = b3.multiply(3);\n d = a.add(b.add(c));\n c22 = new Vector2D(d.x, d.y);\n\n a = b1.multiply(-3);\n b = b2.multiply(3);\n c = a.add(b);\n c21 = new Vector2D(c.x, c.y);\n\n c20 = new Vector2D(b1.x, b1.y);\n\n var c10x2 = c10.x*c10.x;\n var c10x3 = c10.x*c10.x*c10.x;\n var c10y2 = c10.y*c10.y;\n var c10y3 = c10.y*c10.y*c10.y;\n var c11x2 = c11.x*c11.x;\n var c11x3 = c11.x*c11.x*c11.x;\n var c11y2 = c11.y*c11.y;\n var c11y3 = c11.y*c11.y*c11.y;\n var c12x2 = c12.x*c12.x;\n var c12x3 = c12.x*c12.x*c12.x;\n var c12y2 = c12.y*c12.y;\n var c12y3 = c12.y*c12.y*c12.y;\n var c13x2 = c13.x*c13.x;\n var c13x3 = c13.x*c13.x*c13.x;\n var c13y2 = c13.y*c13.y;\n var c13y3 = c13.y*c13.y*c13.y;\n var c20x2 = c20.x*c20.x;\n var c20x3 = c20.x*c20.x*c20.x;\n var c20y2 = c20.y*c20.y;\n var c20y3 = c20.y*c20.y*c20.y;\n var c21x2 = c21.x*c21.x;\n var c21x3 = c21.x*c21.x*c21.x;\n var c21y2 = c21.y*c21.y;\n var c22x2 = c22.x*c22.x;\n var c22x3 = c22.x*c22.x*c22.x;\n var c22y2 = c22.y*c22.y;\n var c23x2 = c23.x*c23.x;\n var c23x3 = c23.x*c23.x*c23.x;\n var c23y2 = c23.y*c23.y;\n var c23y3 = c23.y*c23.y*c23.y;\n var poly = new Polynomial(\n -c13x3*c23y3 + c13y3*c23x3 - 3*c13.x*c13y2*c23x2*c23.y +\n 3*c13x2*c13.y*c23.x*c23y2,\n -6*c13.x*c22.x*c13y2*c23.x*c23.y + 6*c13x2*c13.y*c22.y*c23.x*c23.y + 3*c22.x*c13y3*c23x2 -\n 3*c13x3*c22.y*c23y2 - 3*c13.x*c13y2*c22.y*c23x2 + 3*c13x2*c22.x*c13.y*c23y2,\n -6*c21.x*c13.x*c13y2*c23.x*c23.y - 6*c13.x*c22.x*c13y2*c22.y*c23.x + 6*c13x2*c22.x*c13.y*c22.y*c23.y +\n 3*c21.x*c13y3*c23x2 + 3*c22x2*c13y3*c23.x + 3*c21.x*c13x2*c13.y*c23y2 - 3*c13.x*c21.y*c13y2*c23x2 -\n 3*c13.x*c22x2*c13y2*c23.y + c13x2*c13.y*c23.x*(6*c21.y*c23.y + 3*c22y2) + c13x3*(-c21.y*c23y2 -\n 2*c22y2*c23.y - c23.y*(2*c21.y*c23.y + c22y2)),\n c11.x*c12.y*c13.x*c13.y*c23.x*c23.y - c11.y*c12.x*c13.x*c13.y*c23.x*c23.y + 6*c21.x*c22.x*c13y3*c23.x +\n 3*c11.x*c12.x*c13.x*c13.y*c23y2 + 6*c10.x*c13.x*c13y2*c23.x*c23.y - 3*c11.x*c12.x*c13y2*c23.x*c23.y -\n 3*c11.y*c12.y*c13.x*c13.y*c23x2 - 6*c10.y*c13x2*c13.y*c23.x*c23.y - 6*c20.x*c13.x*c13y2*c23.x*c23.y +\n 3*c11.y*c12.y*c13x2*c23.x*c23.y - 2*c12.x*c12y2*c13.x*c23.x*c23.y - 6*c21.x*c13.x*c22.x*c13y2*c23.y -\n 6*c21.x*c13.x*c13y2*c22.y*c23.x - 6*c13.x*c21.y*c22.x*c13y2*c23.x + 6*c21.x*c13x2*c13.y*c22.y*c23.y +\n 2*c12x2*c12.y*c13.y*c23.x*c23.y + c22x3*c13y3 - 3*c10.x*c13y3*c23x2 + 3*c10.y*c13x3*c23y2 +\n 3*c20.x*c13y3*c23x2 + c12y3*c13.x*c23x2 - c12x3*c13.y*c23y2 - 3*c10.x*c13x2*c13.y*c23y2 +\n 3*c10.y*c13.x*c13y2*c23x2 - 2*c11.x*c12.y*c13x2*c23y2 + c11.x*c12.y*c13y2*c23x2 - c11.y*c12.x*c13x2*c23y2 +\n 2*c11.y*c12.x*c13y2*c23x2 + 3*c20.x*c13x2*c13.y*c23y2 - c12.x*c12y2*c13.y*c23x2 -\n 3*c20.y*c13.x*c13y2*c23x2 + c12x2*c12.y*c13.x*c23y2 - 3*c13.x*c22x2*c13y2*c22.y +\n c13x2*c13.y*c23.x*(6*c20.y*c23.y + 6*c21.y*c22.y) + c13x2*c22.x*c13.y*(6*c21.y*c23.y + 3*c22y2) +\n c13x3*(-2*c21.y*c22.y*c23.y - c20.y*c23y2 - c22.y*(2*c21.y*c23.y + c22y2) - c23.y*(2*c20.y*c23.y + 2*c21.y*c22.y)),\n 6*c11.x*c12.x*c13.x*c13.y*c22.y*c23.y + c11.x*c12.y*c13.x*c22.x*c13.y*c23.y + c11.x*c12.y*c13.x*c13.y*c22.y*c23.x -\n c11.y*c12.x*c13.x*c22.x*c13.y*c23.y - c11.y*c12.x*c13.x*c13.y*c22.y*c23.x - 6*c11.y*c12.y*c13.x*c22.x*c13.y*c23.x -\n 6*c10.x*c22.x*c13y3*c23.x + 6*c20.x*c22.x*c13y3*c23.x + 6*c10.y*c13x3*c22.y*c23.y + 2*c12y3*c13.x*c22.x*c23.x -\n 2*c12x3*c13.y*c22.y*c23.y + 6*c10.x*c13.x*c22.x*c13y2*c23.y + 6*c10.x*c13.x*c13y2*c22.y*c23.x +\n 6*c10.y*c13.x*c22.x*c13y2*c23.x - 3*c11.x*c12.x*c22.x*c13y2*c23.y - 3*c11.x*c12.x*c13y2*c22.y*c23.x +\n 2*c11.x*c12.y*c22.x*c13y2*c23.x + 4*c11.y*c12.x*c22.x*c13y2*c23.x - 6*c10.x*c13x2*c13.y*c22.y*c23.y -\n 6*c10.y*c13x2*c22.x*c13.y*c23.y - 6*c10.y*c13x2*c13.y*c22.y*c23.x - 4*c11.x*c12.y*c13x2*c22.y*c23.y -\n 6*c20.x*c13.x*c22.x*c13y2*c23.y - 6*c20.x*c13.x*c13y2*c22.y*c23.x - 2*c11.y*c12.x*c13x2*c22.y*c23.y +\n 3*c11.y*c12.y*c13x2*c22.x*c23.y + 3*c11.y*c12.y*c13x2*c22.y*c23.x - 2*c12.x*c12y2*c13.x*c22.x*c23.y -\n 2*c12.x*c12y2*c13.x*c22.y*c23.x - 2*c12.x*c12y2*c22.x*c13.y*c23.x - 6*c20.y*c13.x*c22.x*c13y2*c23.x -\n 6*c21.x*c13.x*c21.y*c13y2*c23.x - 6*c21.x*c13.x*c22.x*c13y2*c22.y + 6*c20.x*c13x2*c13.y*c22.y*c23.y +\n 2*c12x2*c12.y*c13.x*c22.y*c23.y + 2*c12x2*c12.y*c22.x*c13.y*c23.y + 2*c12x2*c12.y*c13.y*c22.y*c23.x +\n 3*c21.x*c22x2*c13y3 + 3*c21x2*c13y3*c23.x - 3*c13.x*c21.y*c22x2*c13y2 - 3*c21x2*c13.x*c13y2*c23.y +\n c13x2*c22.x*c13.y*(6*c20.y*c23.y + 6*c21.y*c22.y) + c13x2*c13.y*c23.x*(6*c20.y*c22.y + 3*c21y2) +\n c21.x*c13x2*c13.y*(6*c21.y*c23.y + 3*c22y2) + c13x3*(-2*c20.y*c22.y*c23.y - c23.y*(2*c20.y*c22.y + c21y2) -\n c21.y*(2*c21.y*c23.y + c22y2) - c22.y*(2*c20.y*c23.y + 2*c21.y*c22.y)),\n c11.x*c21.x*c12.y*c13.x*c13.y*c23.y + c11.x*c12.y*c13.x*c21.y*c13.y*c23.x + c11.x*c12.y*c13.x*c22.x*c13.y*c22.y -\n c11.y*c12.x*c21.x*c13.x*c13.y*c23.y - c11.y*c12.x*c13.x*c21.y*c13.y*c23.x - c11.y*c12.x*c13.x*c22.x*c13.y*c22.y -\n 6*c11.y*c21.x*c12.y*c13.x*c13.y*c23.x - 6*c10.x*c21.x*c13y3*c23.x + 6*c20.x*c21.x*c13y3*c23.x +\n 2*c21.x*c12y3*c13.x*c23.x + 6*c10.x*c21.x*c13.x*c13y2*c23.y + 6*c10.x*c13.x*c21.y*c13y2*c23.x +\n 6*c10.x*c13.x*c22.x*c13y2*c22.y + 6*c10.y*c21.x*c13.x*c13y2*c23.x - 3*c11.x*c12.x*c21.x*c13y2*c23.y -\n 3*c11.x*c12.x*c21.y*c13y2*c23.x - 3*c11.x*c12.x*c22.x*c13y2*c22.y + 2*c11.x*c21.x*c12.y*c13y2*c23.x +\n 4*c11.y*c12.x*c21.x*c13y2*c23.x - 6*c10.y*c21.x*c13x2*c13.y*c23.y - 6*c10.y*c13x2*c21.y*c13.y*c23.x -\n 6*c10.y*c13x2*c22.x*c13.y*c22.y - 6*c20.x*c21.x*c13.x*c13y2*c23.y - 6*c20.x*c13.x*c21.y*c13y2*c23.x -\n 6*c20.x*c13.x*c22.x*c13y2*c22.y + 3*c11.y*c21.x*c12.y*c13x2*c23.y - 3*c11.y*c12.y*c13.x*c22x2*c13.y +\n 3*c11.y*c12.y*c13x2*c21.y*c23.x + 3*c11.y*c12.y*c13x2*c22.x*c22.y - 2*c12.x*c21.x*c12y2*c13.x*c23.y -\n 2*c12.x*c21.x*c12y2*c13.y*c23.x - 2*c12.x*c12y2*c13.x*c21.y*c23.x - 2*c12.x*c12y2*c13.x*c22.x*c22.y -\n 6*c20.y*c21.x*c13.x*c13y2*c23.x - 6*c21.x*c13.x*c21.y*c22.x*c13y2 + 6*c20.y*c13x2*c21.y*c13.y*c23.x +\n 2*c12x2*c21.x*c12.y*c13.y*c23.y + 2*c12x2*c12.y*c21.y*c13.y*c23.x + 2*c12x2*c12.y*c22.x*c13.y*c22.y -\n 3*c10.x*c22x2*c13y3 + 3*c20.x*c22x2*c13y3 + 3*c21x2*c22.x*c13y3 + c12y3*c13.x*c22x2 +\n 3*c10.y*c13.x*c22x2*c13y2 + c11.x*c12.y*c22x2*c13y2 + 2*c11.y*c12.x*c22x2*c13y2 -\n c12.x*c12y2*c22x2*c13.y - 3*c20.y*c13.x*c22x2*c13y2 - 3*c21x2*c13.x*c13y2*c22.y +\n c12x2*c12.y*c13.x*(2*c21.y*c23.y + c22y2) + c11.x*c12.x*c13.x*c13.y*(6*c21.y*c23.y + 3*c22y2) +\n c21.x*c13x2*c13.y*(6*c20.y*c23.y + 6*c21.y*c22.y) + c12x3*c13.y*(-2*c21.y*c23.y - c22y2) +\n c10.y*c13x3*(6*c21.y*c23.y + 3*c22y2) + c11.y*c12.x*c13x2*(-2*c21.y*c23.y - c22y2) +\n c11.x*c12.y*c13x2*(-4*c21.y*c23.y - 2*c22y2) + c10.x*c13x2*c13.y*(-6*c21.y*c23.y - 3*c22y2) +\n c13x2*c22.x*c13.y*(6*c20.y*c22.y + 3*c21y2) + c20.x*c13x2*c13.y*(6*c21.y*c23.y + 3*c22y2) +\n c13x3*(-2*c20.y*c21.y*c23.y - c22.y*(2*c20.y*c22.y + c21y2) - c20.y*(2*c21.y*c23.y + c22y2) -\n c21.y*(2*c20.y*c23.y + 2*c21.y*c22.y)),\n -c10.x*c11.x*c12.y*c13.x*c13.y*c23.y + c10.x*c11.y*c12.x*c13.x*c13.y*c23.y + 6*c10.x*c11.y*c12.y*c13.x*c13.y*c23.x -\n 6*c10.y*c11.x*c12.x*c13.x*c13.y*c23.y - c10.y*c11.x*c12.y*c13.x*c13.y*c23.x + c10.y*c11.y*c12.x*c13.x*c13.y*c23.x +\n c11.x*c11.y*c12.x*c12.y*c13.x*c23.y - c11.x*c11.y*c12.x*c12.y*c13.y*c23.x + c11.x*c20.x*c12.y*c13.x*c13.y*c23.y +\n c11.x*c20.y*c12.y*c13.x*c13.y*c23.x + c11.x*c21.x*c12.y*c13.x*c13.y*c22.y + c11.x*c12.y*c13.x*c21.y*c22.x*c13.y -\n c20.x*c11.y*c12.x*c13.x*c13.y*c23.y - 6*c20.x*c11.y*c12.y*c13.x*c13.y*c23.x - c11.y*c12.x*c20.y*c13.x*c13.y*c23.x -\n c11.y*c12.x*c21.x*c13.x*c13.y*c22.y - c11.y*c12.x*c13.x*c21.y*c22.x*c13.y - 6*c11.y*c21.x*c12.y*c13.x*c22.x*c13.y -\n 6*c10.x*c20.x*c13y3*c23.x - 6*c10.x*c21.x*c22.x*c13y3 - 2*c10.x*c12y3*c13.x*c23.x + 6*c20.x*c21.x*c22.x*c13y3 +\n 2*c20.x*c12y3*c13.x*c23.x + 2*c21.x*c12y3*c13.x*c22.x + 2*c10.y*c12x3*c13.y*c23.y - 6*c10.x*c10.y*c13.x*c13y2*c23.x +\n 3*c10.x*c11.x*c12.x*c13y2*c23.y - 2*c10.x*c11.x*c12.y*c13y2*c23.x - 4*c10.x*c11.y*c12.x*c13y2*c23.x +\n 3*c10.y*c11.x*c12.x*c13y2*c23.x + 6*c10.x*c10.y*c13x2*c13.y*c23.y + 6*c10.x*c20.x*c13.x*c13y2*c23.y -\n 3*c10.x*c11.y*c12.y*c13x2*c23.y + 2*c10.x*c12.x*c12y2*c13.x*c23.y + 2*c10.x*c12.x*c12y2*c13.y*c23.x +\n 6*c10.x*c20.y*c13.x*c13y2*c23.x + 6*c10.x*c21.x*c13.x*c13y2*c22.y + 6*c10.x*c13.x*c21.y*c22.x*c13y2 +\n 4*c10.y*c11.x*c12.y*c13x2*c23.y + 6*c10.y*c20.x*c13.x*c13y2*c23.x + 2*c10.y*c11.y*c12.x*c13x2*c23.y -\n 3*c10.y*c11.y*c12.y*c13x2*c23.x + 2*c10.y*c12.x*c12y2*c13.x*c23.x + 6*c10.y*c21.x*c13.x*c22.x*c13y2 -\n 3*c11.x*c20.x*c12.x*c13y2*c23.y + 2*c11.x*c20.x*c12.y*c13y2*c23.x + c11.x*c11.y*c12y2*c13.x*c23.x -\n 3*c11.x*c12.x*c20.y*c13y2*c23.x - 3*c11.x*c12.x*c21.x*c13y2*c22.y - 3*c11.x*c12.x*c21.y*c22.x*c13y2 +\n 2*c11.x*c21.x*c12.y*c22.x*c13y2 + 4*c20.x*c11.y*c12.x*c13y2*c23.x + 4*c11.y*c12.x*c21.x*c22.x*c13y2 -\n 2*c10.x*c12x2*c12.y*c13.y*c23.y - 6*c10.y*c20.x*c13x2*c13.y*c23.y - 6*c10.y*c20.y*c13x2*c13.y*c23.x -\n 6*c10.y*c21.x*c13x2*c13.y*c22.y - 2*c10.y*c12x2*c12.y*c13.x*c23.y - 2*c10.y*c12x2*c12.y*c13.y*c23.x -\n 6*c10.y*c13x2*c21.y*c22.x*c13.y - c11.x*c11.y*c12x2*c13.y*c23.y - 2*c11.x*c11y2*c13.x*c13.y*c23.x +\n 3*c20.x*c11.y*c12.y*c13x2*c23.y - 2*c20.x*c12.x*c12y2*c13.x*c23.y - 2*c20.x*c12.x*c12y2*c13.y*c23.x -\n 6*c20.x*c20.y*c13.x*c13y2*c23.x - 6*c20.x*c21.x*c13.x*c13y2*c22.y - 6*c20.x*c13.x*c21.y*c22.x*c13y2 +\n 3*c11.y*c20.y*c12.y*c13x2*c23.x + 3*c11.y*c21.x*c12.y*c13x2*c22.y + 3*c11.y*c12.y*c13x2*c21.y*c22.x -\n 2*c12.x*c20.y*c12y2*c13.x*c23.x - 2*c12.x*c21.x*c12y2*c13.x*c22.y - 2*c12.x*c21.x*c12y2*c22.x*c13.y -\n 2*c12.x*c12y2*c13.x*c21.y*c22.x - 6*c20.y*c21.x*c13.x*c22.x*c13y2 - c11y2*c12.x*c12.y*c13.x*c23.x +\n 2*c20.x*c12x2*c12.y*c13.y*c23.y + 6*c20.y*c13x2*c21.y*c22.x*c13.y + 2*c11x2*c11.y*c13.x*c13.y*c23.y +\n c11x2*c12.x*c12.y*c13.y*c23.y + 2*c12x2*c20.y*c12.y*c13.y*c23.x + 2*c12x2*c21.x*c12.y*c13.y*c22.y +\n 2*c12x2*c12.y*c21.y*c22.x*c13.y + c21x3*c13y3 + 3*c10x2*c13y3*c23.x - 3*c10y2*c13x3*c23.y +\n 3*c20x2*c13y3*c23.x + c11y3*c13x2*c23.x - c11x3*c13y2*c23.y - c11.x*c11y2*c13x2*c23.y +\n c11x2*c11.y*c13y2*c23.x - 3*c10x2*c13.x*c13y2*c23.y + 3*c10y2*c13x2*c13.y*c23.x - c11x2*c12y2*c13.x*c23.y +\n c11y2*c12x2*c13.y*c23.x - 3*c21x2*c13.x*c21.y*c13y2 - 3*c20x2*c13.x*c13y2*c23.y + 3*c20y2*c13x2*c13.y*c23.x +\n c11.x*c12.x*c13.x*c13.y*(6*c20.y*c23.y + 6*c21.y*c22.y) + c12x3*c13.y*(-2*c20.y*c23.y - 2*c21.y*c22.y) +\n c10.y*c13x3*(6*c20.y*c23.y + 6*c21.y*c22.y) + c11.y*c12.x*c13x2*(-2*c20.y*c23.y - 2*c21.y*c22.y) +\n c12x2*c12.y*c13.x*(2*c20.y*c23.y + 2*c21.y*c22.y) + c11.x*c12.y*c13x2*(-4*c20.y*c23.y - 4*c21.y*c22.y) +\n c10.x*c13x2*c13.y*(-6*c20.y*c23.y - 6*c21.y*c22.y) + c20.x*c13x2*c13.y*(6*c20.y*c23.y + 6*c21.y*c22.y) +\n c21.x*c13x2*c13.y*(6*c20.y*c22.y + 3*c21y2) + c13x3*(-2*c20.y*c21.y*c22.y - c20y2*c23.y -\n c21.y*(2*c20.y*c22.y + c21y2) - c20.y*(2*c20.y*c23.y + 2*c21.y*c22.y)),\n -c10.x*c11.x*c12.y*c13.x*c13.y*c22.y + c10.x*c11.y*c12.x*c13.x*c13.y*c22.y + 6*c10.x*c11.y*c12.y*c13.x*c22.x*c13.y -\n 6*c10.y*c11.x*c12.x*c13.x*c13.y*c22.y - c10.y*c11.x*c12.y*c13.x*c22.x*c13.y + c10.y*c11.y*c12.x*c13.x*c22.x*c13.y +\n c11.x*c11.y*c12.x*c12.y*c13.x*c22.y - c11.x*c11.y*c12.x*c12.y*c22.x*c13.y + c11.x*c20.x*c12.y*c13.x*c13.y*c22.y +\n c11.x*c20.y*c12.y*c13.x*c22.x*c13.y + c11.x*c21.x*c12.y*c13.x*c21.y*c13.y - c20.x*c11.y*c12.x*c13.x*c13.y*c22.y -\n 6*c20.x*c11.y*c12.y*c13.x*c22.x*c13.y - c11.y*c12.x*c20.y*c13.x*c22.x*c13.y - c11.y*c12.x*c21.x*c13.x*c21.y*c13.y -\n 6*c10.x*c20.x*c22.x*c13y3 - 2*c10.x*c12y3*c13.x*c22.x + 2*c20.x*c12y3*c13.x*c22.x + 2*c10.y*c12x3*c13.y*c22.y -\n 6*c10.x*c10.y*c13.x*c22.x*c13y2 + 3*c10.x*c11.x*c12.x*c13y2*c22.y - 2*c10.x*c11.x*c12.y*c22.x*c13y2 -\n 4*c10.x*c11.y*c12.x*c22.x*c13y2 + 3*c10.y*c11.x*c12.x*c22.x*c13y2 + 6*c10.x*c10.y*c13x2*c13.y*c22.y +\n 6*c10.x*c20.x*c13.x*c13y2*c22.y - 3*c10.x*c11.y*c12.y*c13x2*c22.y + 2*c10.x*c12.x*c12y2*c13.x*c22.y +\n 2*c10.x*c12.x*c12y2*c22.x*c13.y + 6*c10.x*c20.y*c13.x*c22.x*c13y2 + 6*c10.x*c21.x*c13.x*c21.y*c13y2 +\n 4*c10.y*c11.x*c12.y*c13x2*c22.y + 6*c10.y*c20.x*c13.x*c22.x*c13y2 + 2*c10.y*c11.y*c12.x*c13x2*c22.y -\n 3*c10.y*c11.y*c12.y*c13x2*c22.x + 2*c10.y*c12.x*c12y2*c13.x*c22.x - 3*c11.x*c20.x*c12.x*c13y2*c22.y +\n 2*c11.x*c20.x*c12.y*c22.x*c13y2 + c11.x*c11.y*c12y2*c13.x*c22.x - 3*c11.x*c12.x*c20.y*c22.x*c13y2 -\n 3*c11.x*c12.x*c21.x*c21.y*c13y2 + 4*c20.x*c11.y*c12.x*c22.x*c13y2 - 2*c10.x*c12x2*c12.y*c13.y*c22.y -\n 6*c10.y*c20.x*c13x2*c13.y*c22.y - 6*c10.y*c20.y*c13x2*c22.x*c13.y - 6*c10.y*c21.x*c13x2*c21.y*c13.y -\n 2*c10.y*c12x2*c12.y*c13.x*c22.y - 2*c10.y*c12x2*c12.y*c22.x*c13.y - c11.x*c11.y*c12x2*c13.y*c22.y -\n 2*c11.x*c11y2*c13.x*c22.x*c13.y + 3*c20.x*c11.y*c12.y*c13x2*c22.y - 2*c20.x*c12.x*c12y2*c13.x*c22.y -\n 2*c20.x*c12.x*c12y2*c22.x*c13.y - 6*c20.x*c20.y*c13.x*c22.x*c13y2 - 6*c20.x*c21.x*c13.x*c21.y*c13y2 +\n 3*c11.y*c20.y*c12.y*c13x2*c22.x + 3*c11.y*c21.x*c12.y*c13x2*c21.y - 2*c12.x*c20.y*c12y2*c13.x*c22.x -\n 2*c12.x*c21.x*c12y2*c13.x*c21.y - c11y2*c12.x*c12.y*c13.x*c22.x + 2*c20.x*c12x2*c12.y*c13.y*c22.y -\n 3*c11.y*c21x2*c12.y*c13.x*c13.y + 6*c20.y*c21.x*c13x2*c21.y*c13.y + 2*c11x2*c11.y*c13.x*c13.y*c22.y +\n c11x2*c12.x*c12.y*c13.y*c22.y + 2*c12x2*c20.y*c12.y*c22.x*c13.y + 2*c12x2*c21.x*c12.y*c21.y*c13.y -\n 3*c10.x*c21x2*c13y3 + 3*c20.x*c21x2*c13y3 + 3*c10x2*c22.x*c13y3 - 3*c10y2*c13x3*c22.y + 3*c20x2*c22.x*c13y3 +\n c21x2*c12y3*c13.x + c11y3*c13x2*c22.x - c11x3*c13y2*c22.y + 3*c10.y*c21x2*c13.x*c13y2 -\n c11.x*c11y2*c13x2*c22.y + c11.x*c21x2*c12.y*c13y2 + 2*c11.y*c12.x*c21x2*c13y2 + c11x2*c11.y*c22.x*c13y2 -\n c12.x*c21x2*c12y2*c13.y - 3*c20.y*c21x2*c13.x*c13y2 - 3*c10x2*c13.x*c13y2*c22.y + 3*c10y2*c13x2*c22.x*c13.y -\n c11x2*c12y2*c13.x*c22.y + c11y2*c12x2*c22.x*c13.y - 3*c20x2*c13.x*c13y2*c22.y + 3*c20y2*c13x2*c22.x*c13.y +\n c12x2*c12.y*c13.x*(2*c20.y*c22.y + c21y2) + c11.x*c12.x*c13.x*c13.y*(6*c20.y*c22.y + 3*c21y2) +\n c12x3*c13.y*(-2*c20.y*c22.y - c21y2) + c10.y*c13x3*(6*c20.y*c22.y + 3*c21y2) +\n c11.y*c12.x*c13x2*(-2*c20.y*c22.y - c21y2) + c11.x*c12.y*c13x2*(-4*c20.y*c22.y - 2*c21y2) +\n c10.x*c13x2*c13.y*(-6*c20.y*c22.y - 3*c21y2) + c20.x*c13x2*c13.y*(6*c20.y*c22.y + 3*c21y2) +\n c13x3*(-2*c20.y*c21y2 - c20y2*c22.y - c20.y*(2*c20.y*c22.y + c21y2)),\n -c10.x*c11.x*c12.y*c13.x*c21.y*c13.y + c10.x*c11.y*c12.x*c13.x*c21.y*c13.y + 6*c10.x*c11.y*c21.x*c12.y*c13.x*c13.y -\n 6*c10.y*c11.x*c12.x*c13.x*c21.y*c13.y - c10.y*c11.x*c21.x*c12.y*c13.x*c13.y + c10.y*c11.y*c12.x*c21.x*c13.x*c13.y -\n c11.x*c11.y*c12.x*c21.x*c12.y*c13.y + c11.x*c11.y*c12.x*c12.y*c13.x*c21.y + c11.x*c20.x*c12.y*c13.x*c21.y*c13.y +\n 6*c11.x*c12.x*c20.y*c13.x*c21.y*c13.y + c11.x*c20.y*c21.x*c12.y*c13.x*c13.y - c20.x*c11.y*c12.x*c13.x*c21.y*c13.y -\n 6*c20.x*c11.y*c21.x*c12.y*c13.x*c13.y - c11.y*c12.x*c20.y*c21.x*c13.x*c13.y - 6*c10.x*c20.x*c21.x*c13y3 -\n 2*c10.x*c21.x*c12y3*c13.x + 6*c10.y*c20.y*c13x3*c21.y + 2*c20.x*c21.x*c12y3*c13.x + 2*c10.y*c12x3*c21.y*c13.y -\n 2*c12x3*c20.y*c21.y*c13.y - 6*c10.x*c10.y*c21.x*c13.x*c13y2 + 3*c10.x*c11.x*c12.x*c21.y*c13y2 -\n 2*c10.x*c11.x*c21.x*c12.y*c13y2 - 4*c10.x*c11.y*c12.x*c21.x*c13y2 + 3*c10.y*c11.x*c12.x*c21.x*c13y2 +\n 6*c10.x*c10.y*c13x2*c21.y*c13.y + 6*c10.x*c20.x*c13.x*c21.y*c13y2 - 3*c10.x*c11.y*c12.y*c13x2*c21.y +\n 2*c10.x*c12.x*c21.x*c12y2*c13.y + 2*c10.x*c12.x*c12y2*c13.x*c21.y + 6*c10.x*c20.y*c21.x*c13.x*c13y2 +\n 4*c10.y*c11.x*c12.y*c13x2*c21.y + 6*c10.y*c20.x*c21.x*c13.x*c13y2 + 2*c10.y*c11.y*c12.x*c13x2*c21.y -\n 3*c10.y*c11.y*c21.x*c12.y*c13x2 + 2*c10.y*c12.x*c21.x*c12y2*c13.x - 3*c11.x*c20.x*c12.x*c21.y*c13y2 +\n 2*c11.x*c20.x*c21.x*c12.y*c13y2 + c11.x*c11.y*c21.x*c12y2*c13.x - 3*c11.x*c12.x*c20.y*c21.x*c13y2 +\n 4*c20.x*c11.y*c12.x*c21.x*c13y2 - 6*c10.x*c20.y*c13x2*c21.y*c13.y - 2*c10.x*c12x2*c12.y*c21.y*c13.y -\n 6*c10.y*c20.x*c13x2*c21.y*c13.y - 6*c10.y*c20.y*c21.x*c13x2*c13.y - 2*c10.y*c12x2*c21.x*c12.y*c13.y -\n 2*c10.y*c12x2*c12.y*c13.x*c21.y - c11.x*c11.y*c12x2*c21.y*c13.y - 4*c11.x*c20.y*c12.y*c13x2*c21.y -\n 2*c11.x*c11y2*c21.x*c13.x*c13.y + 3*c20.x*c11.y*c12.y*c13x2*c21.y - 2*c20.x*c12.x*c21.x*c12y2*c13.y -\n 2*c20.x*c12.x*c12y2*c13.x*c21.y - 6*c20.x*c20.y*c21.x*c13.x*c13y2 - 2*c11.y*c12.x*c20.y*c13x2*c21.y +\n 3*c11.y*c20.y*c21.x*c12.y*c13x2 - 2*c12.x*c20.y*c21.x*c12y2*c13.x - c11y2*c12.x*c21.x*c12.y*c13.x +\n 6*c20.x*c20.y*c13x2*c21.y*c13.y + 2*c20.x*c12x2*c12.y*c21.y*c13.y + 2*c11x2*c11.y*c13.x*c21.y*c13.y +\n c11x2*c12.x*c12.y*c21.y*c13.y + 2*c12x2*c20.y*c21.x*c12.y*c13.y + 2*c12x2*c20.y*c12.y*c13.x*c21.y +\n 3*c10x2*c21.x*c13y3 - 3*c10y2*c13x3*c21.y + 3*c20x2*c21.x*c13y3 + c11y3*c21.x*c13x2 - c11x3*c21.y*c13y2 -\n 3*c20y2*c13x3*c21.y - c11.x*c11y2*c13x2*c21.y + c11x2*c11.y*c21.x*c13y2 - 3*c10x2*c13.x*c21.y*c13y2 +\n 3*c10y2*c21.x*c13x2*c13.y - c11x2*c12y2*c13.x*c21.y + c11y2*c12x2*c21.x*c13.y - 3*c20x2*c13.x*c21.y*c13y2 +\n 3*c20y2*c21.x*c13x2*c13.y,\n c10.x*c10.y*c11.x*c12.y*c13.x*c13.y - c10.x*c10.y*c11.y*c12.x*c13.x*c13.y + c10.x*c11.x*c11.y*c12.x*c12.y*c13.y -\n c10.y*c11.x*c11.y*c12.x*c12.y*c13.x - c10.x*c11.x*c20.y*c12.y*c13.x*c13.y + 6*c10.x*c20.x*c11.y*c12.y*c13.x*c13.y +\n c10.x*c11.y*c12.x*c20.y*c13.x*c13.y - c10.y*c11.x*c20.x*c12.y*c13.x*c13.y - 6*c10.y*c11.x*c12.x*c20.y*c13.x*c13.y +\n c10.y*c20.x*c11.y*c12.x*c13.x*c13.y - c11.x*c20.x*c11.y*c12.x*c12.y*c13.y + c11.x*c11.y*c12.x*c20.y*c12.y*c13.x +\n c11.x*c20.x*c20.y*c12.y*c13.x*c13.y - c20.x*c11.y*c12.x*c20.y*c13.x*c13.y - 2*c10.x*c20.x*c12y3*c13.x +\n 2*c10.y*c12x3*c20.y*c13.y - 3*c10.x*c10.y*c11.x*c12.x*c13y2 - 6*c10.x*c10.y*c20.x*c13.x*c13y2 +\n 3*c10.x*c10.y*c11.y*c12.y*c13x2 - 2*c10.x*c10.y*c12.x*c12y2*c13.x - 2*c10.x*c11.x*c20.x*c12.y*c13y2 -\n c10.x*c11.x*c11.y*c12y2*c13.x + 3*c10.x*c11.x*c12.x*c20.y*c13y2 - 4*c10.x*c20.x*c11.y*c12.x*c13y2 +\n 3*c10.y*c11.x*c20.x*c12.x*c13y2 + 6*c10.x*c10.y*c20.y*c13x2*c13.y + 2*c10.x*c10.y*c12x2*c12.y*c13.y +\n 2*c10.x*c11.x*c11y2*c13.x*c13.y + 2*c10.x*c20.x*c12.x*c12y2*c13.y + 6*c10.x*c20.x*c20.y*c13.x*c13y2 -\n 3*c10.x*c11.y*c20.y*c12.y*c13x2 + 2*c10.x*c12.x*c20.y*c12y2*c13.x + c10.x*c11y2*c12.x*c12.y*c13.x +\n c10.y*c11.x*c11.y*c12x2*c13.y + 4*c10.y*c11.x*c20.y*c12.y*c13x2 - 3*c10.y*c20.x*c11.y*c12.y*c13x2 +\n 2*c10.y*c20.x*c12.x*c12y2*c13.x + 2*c10.y*c11.y*c12.x*c20.y*c13x2 + c11.x*c20.x*c11.y*c12y2*c13.x -\n 3*c11.x*c20.x*c12.x*c20.y*c13y2 - 2*c10.x*c12x2*c20.y*c12.y*c13.y - 6*c10.y*c20.x*c20.y*c13x2*c13.y -\n 2*c10.y*c20.x*c12x2*c12.y*c13.y - 2*c10.y*c11x2*c11.y*c13.x*c13.y - c10.y*c11x2*c12.x*c12.y*c13.y -\n 2*c10.y*c12x2*c20.y*c12.y*c13.x - 2*c11.x*c20.x*c11y2*c13.x*c13.y - c11.x*c11.y*c12x2*c20.y*c13.y +\n 3*c20.x*c11.y*c20.y*c12.y*c13x2 - 2*c20.x*c12.x*c20.y*c12y2*c13.x - c20.x*c11y2*c12.x*c12.y*c13.x +\n 3*c10y2*c11.x*c12.x*c13.x*c13.y + 3*c11.x*c12.x*c20y2*c13.x*c13.y + 2*c20.x*c12x2*c20.y*c12.y*c13.y -\n 3*c10x2*c11.y*c12.y*c13.x*c13.y + 2*c11x2*c11.y*c20.y*c13.x*c13.y + c11x2*c12.x*c20.y*c12.y*c13.y -\n 3*c20x2*c11.y*c12.y*c13.x*c13.y - c10x3*c13y3 + c10y3*c13x3 + c20x3*c13y3 - c20y3*c13x3 -\n 3*c10.x*c20x2*c13y3 - c10.x*c11y3*c13x2 + 3*c10x2*c20.x*c13y3 + c10.y*c11x3*c13y2 +\n 3*c10.y*c20y2*c13x3 + c20.x*c11y3*c13x2 + c10x2*c12y3*c13.x - 3*c10y2*c20.y*c13x3 - c10y2*c12x3*c13.y +\n c20x2*c12y3*c13.x - c11x3*c20.y*c13y2 - c12x3*c20y2*c13.y - c10.x*c11x2*c11.y*c13y2 +\n c10.y*c11.x*c11y2*c13x2 - 3*c10.x*c10y2*c13x2*c13.y - c10.x*c11y2*c12x2*c13.y + c10.y*c11x2*c12y2*c13.x -\n c11.x*c11y2*c20.y*c13x2 + 3*c10x2*c10.y*c13.x*c13y2 + c10x2*c11.x*c12.y*c13y2 +\n 2*c10x2*c11.y*c12.x*c13y2 - 2*c10y2*c11.x*c12.y*c13x2 - c10y2*c11.y*c12.x*c13x2 + c11x2*c20.x*c11.y*c13y2 -\n 3*c10.x*c20y2*c13x2*c13.y + 3*c10.y*c20x2*c13.x*c13y2 + c11.x*c20x2*c12.y*c13y2 - 2*c11.x*c20y2*c12.y*c13x2 +\n c20.x*c11y2*c12x2*c13.y - c11.y*c12.x*c20y2*c13x2 - c10x2*c12.x*c12y2*c13.y - 3*c10x2*c20.y*c13.x*c13y2 +\n 3*c10y2*c20.x*c13x2*c13.y + c10y2*c12x2*c12.y*c13.x - c11x2*c20.y*c12y2*c13.x + 2*c20x2*c11.y*c12.x*c13y2 +\n 3*c20.x*c20y2*c13x2*c13.y - c20x2*c12.x*c12y2*c13.y - 3*c20x2*c20.y*c13.x*c13y2 + c12x2*c20y2*c12.y*c13.x\n );\n var roots = poly.getRootsInInterval(0,1);\n\n for ( var i = 0; i < roots.length; i++ ) {\n var s = roots[i];\n var xRoots = new Polynomial(\n c13.x,\n c12.x,\n c11.x,\n c10.x - c20.x - s*c21.x - s*s*c22.x - s*s*s*c23.x\n ).getRoots();\n var yRoots = new Polynomial(\n c13.y,\n c12.y,\n c11.y,\n c10.y - c20.y - s*c21.y - s*s*c22.y - s*s*s*c23.y\n ).getRoots();\n\n if ( xRoots.length > 0 && yRoots.length > 0 ) {\n var TOLERANCE = 1e-4;\n\n checkRoots:\n for ( var j = 0; j < xRoots.length; j++ ) {\n var xRoot = xRoots[j];\n \n if ( 0 <= xRoot && xRoot <= 1 ) {\n for ( var k = 0; k < yRoots.length; k++ ) {\n if ( Math.abs( xRoot - yRoots[k] ) < TOLERANCE ) {\n result.points.push(\n c23.multiply(s*s*s).add(c22.multiply(s*s).add(c21.multiply(s).add(c20)))\n );\n break checkRoots;\n }\n }\n }\n }\n }\n }\n\n if ( result.points.length > 0 ) result.status = \"Intersection\";\n\n return result;\n};\n\n\n/*****\n*\n* intersectBezier3Circle\n*\n*****/\nIntersection.intersectBezier3Circle = function(p1, p2, p3, p4, c, r) {\n return Intersection.intersectBezier3Ellipse(p1, p2, p3, p4, c, r, r);\n};\n\n\n/*****\n*\n* intersectBezier3Ellipse\n*\n*****/\nIntersection.intersectBezier3Ellipse = function(p1, p2, p3, p4, ec, rx, ry) {\n var a, b, c, d; // temporary variables\n var c3, c2, c1, c0; // coefficients of cubic\n var result = new Intersection(\"No Intersection\");\n\n // Calculate the coefficients of cubic polynomial\n a = p1.multiply(-1);\n b = p2.multiply(3);\n c = p3.multiply(-3);\n d = a.add(b.add(c.add(p4)));\n c3 = new Vector2D(d.x, d.y);\n\n a = p1.multiply(3);\n b = p2.multiply(-6);\n c = p3.multiply(3);\n d = a.add(b.add(c));\n c2 = new Vector2D(d.x, d.y);\n\n a = p1.multiply(-3);\n b = p2.multiply(3);\n c = a.add(b);\n c1 = new Vector2D(c.x, c.y);\n\n c0 = new Vector2D(p1.x, p1.y);\n\n var rxrx = rx*rx;\n var ryry = ry*ry;\n var poly = new Polynomial(\n c3.x*c3.x*ryry + c3.y*c3.y*rxrx,\n 2*(c3.x*c2.x*ryry + c3.y*c2.y*rxrx),\n 2*(c3.x*c1.x*ryry + c3.y*c1.y*rxrx) + c2.x*c2.x*ryry + c2.y*c2.y*rxrx,\n 2*c3.x*ryry*(c0.x - ec.x) + 2*c3.y*rxrx*(c0.y - ec.y) +\n 2*(c2.x*c1.x*ryry + c2.y*c1.y*rxrx),\n 2*c2.x*ryry*(c0.x - ec.x) + 2*c2.y*rxrx*(c0.y - ec.y) +\n c1.x*c1.x*ryry + c1.y*c1.y*rxrx,\n 2*c1.x*ryry*(c0.x - ec.x) + 2*c1.y*rxrx*(c0.y - ec.y),\n c0.x*c0.x*ryry - 2*c0.y*ec.y*rxrx - 2*c0.x*ec.x*ryry +\n c0.y*c0.y*rxrx + ec.x*ec.x*ryry + ec.y*ec.y*rxrx - rxrx*ryry\n );\n var roots = poly.getRootsInInterval(0,1);\n\n for ( var i = 0; i < roots.length; i++ ) {\n var t = roots[i];\n\n result.points.push(\n c3.multiply(t*t*t).add(c2.multiply(t*t).add(c1.multiply(t).add(c0)))\n );\n }\n\n if ( result.points.length > 0 ) result.status = \"Intersection\";\n\n return result;\n};\n\n\n/*****\n*\n* intersectBezier3Line\n*\n* Many thanks to Dan Sunday at SoftSurfer.com. He gave me a very thorough\n* sketch of the algorithm used here. Without his help, I'm not sure when I\n* would have figured out this intersection problem.\n*\n*****/\nIntersection.intersectBezier3Line = function(p1, p2, p3, p4, a1, a2) {\n var a, b, c, d; // temporary variables\n var c3, c2, c1, c0; // coefficients of cubic\n var cl; // c coefficient for normal form of line\n var n; // normal for normal form of line\n var min = a1.min(a2); // used to determine if point is on line segment\n var max = a1.max(a2); // used to determine if point is on line segment\n var result = new Intersection(\"No Intersection\");\n \n // Start with Bezier using Bernstein polynomials for weighting functions:\n // (1-t^3)P1 + 3t(1-t)^2P2 + 3t^2(1-t)P3 + t^3P4\n //\n // Expand and collect terms to form linear combinations of original Bezier\n // controls. This ends up with a vector cubic in t:\n // (-P1+3P2-3P3+P4)t^3 + (3P1-6P2+3P3)t^2 + (-3P1+3P2)t + P1\n // /\\ /\\ /\\ /\\\n // || || || ||\n // c3 c2 c1 c0\n \n // Calculate the coefficients\n a = p1.multiply(-1);\n b = p2.multiply(3);\n c = p3.multiply(-3);\n d = a.add(b.add(c.add(p4)));\n c3 = new Vector2D(d.x, d.y);\n\n a = p1.multiply(3);\n b = p2.multiply(-6);\n c = p3.multiply(3);\n d = a.add(b.add(c));\n c2 = new Vector2D(d.x, d.y);\n\n a = p1.multiply(-3);\n b = p2.multiply(3);\n c = a.add(b);\n c1 = new Vector2D(c.x, c.y);\n\n c0 = new Vector2D(p1.x, p1.y);\n \n // Convert line to normal form: ax + by + c = 0\n // Find normal to line: negative inverse of original line's slope\n n = new Vector2D(a1.y - a2.y, a2.x - a1.x);\n \n // Determine new c coefficient\n cl = a1.x*a2.y - a2.x*a1.y;\n\n // ?Rotate each cubic coefficient using line for new coordinate system?\n // Find roots of rotated cubic\n roots = new Polynomial(\n n.dot(c3),\n n.dot(c2),\n n.dot(c1),\n n.dot(c0) + cl\n ).getRoots();\n\n // Any roots in closed interval [0,1] are intersections on Bezier, but\n // might not be on the line segment.\n // Find intersections and calculate point coordinates\n for ( var i = 0; i < roots.length; i++ ) {\n var t = roots[i];\n\n if ( 0 <= t && t <= 1 ) {\n // We're within the Bezier curve\n // Find point on Bezier\n var p5 = p1.lerp(p2, t);\n var p6 = p2.lerp(p3, t);\n var p7 = p3.lerp(p4, t);\n\n var p8 = p5.lerp(p6, t);\n var p9 = p6.lerp(p7, t);\n\n var p10 = p8.lerp(p9, t);\n\n // See if point is on line segment\n // Had to make special cases for vertical and horizontal lines due\n // to slight errors in calculation of p10\n if ( a1.x == a2.x ) {\n if ( min.y <= p10.y && p10.y <= max.y ) {\n result.status = \"Intersection\";\n result.appendPoint( p10 );\n }\n } else if ( a1.y == a2.y ) {\n if ( min.x <= p10.x && p10.x <= max.x ) {\n result.status = \"Intersection\";\n result.appendPoint( p10 );\n }\n } else if ( p10.gte(min) && p10.lte(max) ) {\n result.status = \"Intersection\";\n result.appendPoint( p10 );\n }\n }\n }\n\n return result;\n};\n\n\n/*****\n*\n* intersectBezier3Polygon\n*\n*****/\nIntersection.intersectBezier3Polygon = function(p1, p2, p3, p4, points) {\n var result = new Intersection(\"No Intersection\");\n var length = points.length;\n\n for ( var i = 0; i < length; i++ ) {\n var a1 = points[i];\n var a2 = points[(i+1) % length];\n var inter = Intersection.intersectBezier3Line(p1, p2, p3, p4, a1, a2);\n\n result.appendPoints(inter.points);\n }\n\n if ( result.points.length > 0 ) result.status = \"Intersection\";\n\n return result;\n};\n\n\n/*****\n*\n* intersectBezier3Rectangle\n*\n*****/\nIntersection.intersectBezier3Rectangle = function(p1, p2, p3, p4, r1, r2) {\n var min = r1.min(r2);\n var max = r1.max(r2);\n var topRight = new Point2D( max.x, min.y );\n var bottomLeft = new Point2D( min.x, max.y );\n \n var inter1 = Intersection.intersectBezier3Line(p1, p2, p3, p4, min, topRight);\n var inter2 = Intersection.intersectBezier3Line(p1, p2, p3, p4, topRight, max);\n var inter3 = Intersection.intersectBezier3Line(p1, p2, p3, p4, max, bottomLeft);\n var inter4 = Intersection.intersectBezier3Line(p1, p2, p3, p4, bottomLeft, min);\n \n var result = new Intersection(\"No Intersection\");\n\n result.appendPoints(inter1.points);\n result.appendPoints(inter2.points);\n result.appendPoints(inter3.points);\n result.appendPoints(inter4.points);\n\n if ( result.points.length > 0 ) result.status = \"Intersection\";\n\n return result;\n};\n\n\n/*****\n*\n* intersectCircleCircle\n*\n*****/\nIntersection.intersectCircleCircle = function(c1, r1, c2, r2) {\n var result;\n \n // Determine minimum and maximum radii where circles can intersect\n var r_max = r1 + r2;\n var r_min = Math.abs(r1 - r2);\n \n // Determine actual distance between circle circles\n var c_dist = c1.distanceFrom( c2 );\n\n if ( c_dist > r_max ) {\n result = new Intersection(\"Outside\");\n } else if ( c_dist < r_min ) {\n result = new Intersection(\"Inside\");\n } else {\n result = new Intersection(\"Intersection\");\n\n var a = (r1*r1 - r2*r2 + c_dist*c_dist) / ( 2*c_dist );\n var h = Math.sqrt(r1*r1 - a*a);\n var p = c1.lerp(c2, a/c_dist);\n var b = h / c_dist;\n\n result.points.push(\n new Point2D(\n p.x - b * (c2.y - c1.y),\n p.y + b * (c2.x - c1.x)\n )\n );\n result.points.push(\n new Point2D(\n p.x + b * (c2.y - c1.y),\n p.y - b * (c2.x - c1.x)\n )\n );\n }\n\n return result;\n};\n\n\n/*****\n*\n* intersectCircleEllipse\n*\n*****/\nIntersection.intersectCircleEllipse = function(cc, r, ec, rx, ry) {\n return Intersection.intersectEllipseEllipse(cc, r, r, ec, rx, ry);\n};\n\n\n/*****\n*\n* intersectCircleLine\n*\n*****/\nIntersection.intersectCircleLine = function(c, r, a1, a2) {\n var result;\n var a = (a2.x - a1.x) * (a2.x - a1.x) +\n (a2.y - a1.y) * (a2.y - a1.y);\n var b = 2 * ( (a2.x - a1.x) * (a1.x - c.x) +\n (a2.y - a1.y) * (a1.y - c.y) );\n var cc = c.x*c.x + c.y*c.y + a1.x*a1.x + a1.y*a1.y -\n 2 * (c.x * a1.x + c.y * a1.y) - r*r;\n var deter = b*b - 4*a*cc;\n\n if ( deter < 0 ) {\n result = new Intersection(\"Outside\");\n } else if ( deter == 0 ) {\n result = new Intersection(\"Tangent\");\n // NOTE: should calculate this point\n } else {\n var e = Math.sqrt(deter);\n var u1 = ( -b + e ) / ( 2*a );\n var u2 = ( -b - e ) / ( 2*a );\n\n if ( (u1 < 0 || u1 > 1) && (u2 < 0 || u2 > 1) ) {\n if ( (u1 < 0 && u2 < 0) || (u1 > 1 && u2 > 1) ) {\n result = new Intersection(\"Outside\");\n } else {\n result = new Intersection(\"Inside\");\n }\n } else {\n result = new Intersection(\"Intersection\");\n\n if ( 0 <= u1 && u1 <= 1)\n result.points.push( a1.lerp(a2, u1) );\n\n if ( 0 <= u2 && u2 <= 1)\n result.points.push( a1.lerp(a2, u2) );\n }\n }\n \n return result;\n};\n\n\n/*****\n*\n* intersectCirclePolygon\n*\n*****/\nIntersection.intersectCirclePolygon = function(c, r, points) {\n var result = new Intersection(\"No Intersection\");\n var length = points.length;\n var inter;\n\n for ( var i = 0; i < length; i++ ) {\n var a1 = points[i];\n var a2 = points[(i+1) % length];\n\n inter = Intersection.intersectCircleLine(c, r, a1, a2);\n result.appendPoints(inter.points);\n }\n\n if ( result.points.length > 0 )\n result.status = \"Intersection\";\n else\n result.status = inter.status;\n\n return result;\n};\n\n\n/*****\n*\n* intersectCircleRectangle\n*\n*****/\nIntersection.intersectCircleRectangle = function(c, r, r1, r2) {\n var min = r1.min(r2);\n var max = r1.max(r2);\n var topRight = new Point2D( max.x, min.y );\n var bottomLeft = new Point2D( min.x, max.y );\n \n var inter1 = Intersection.intersectCircleLine(c, r, min, topRight);\n var inter2 = Intersection.intersectCircleLine(c, r, topRight, max);\n var inter3 = Intersection.intersectCircleLine(c, r, max, bottomLeft);\n var inter4 = Intersection.intersectCircleLine(c, r, bottomLeft, min);\n \n var result = new Intersection(\"No Intersection\");\n\n result.appendPoints(inter1.points);\n result.appendPoints(inter2.points);\n result.appendPoints(inter3.points);\n result.appendPoints(inter4.points);\n\n if ( result.points.length > 0 )\n result.status = \"Intersection\";\n else\n result.status = inter1.status;\n\n return result;\n};\n\n\n/*****\n*\n* intersectEllipseEllipse\n* \n* This code is based on MgcIntr2DElpElp.cpp written by David Eberly. His\n* code along with many other excellent examples are avaiable at his site:\n* http://www.magic-software.com\n*\n* NOTE: Rotation will need to be added to this function\n*\n*****/\nIntersection.intersectEllipseEllipse = function(c1, rx1, ry1, c2, rx2, ry2) {\n var a = [\n ry1*ry1, 0, rx1*rx1, -2*ry1*ry1*c1.x, -2*rx1*rx1*c1.y,\n ry1*ry1*c1.x*c1.x + rx1*rx1*c1.y*c1.y - rx1*rx1*ry1*ry1\n ];\n var b = [\n ry2*ry2, 0, rx2*rx2, -2*ry2*ry2*c2.x, -2*rx2*rx2*c2.y,\n ry2*ry2*c2.x*c2.x + rx2*rx2*c2.y*c2.y - rx2*rx2*ry2*ry2\n ];\n\n var yPoly = Intersection.bezout(a, b);\n var yRoots = yPoly.getRoots();\n var epsilon = 1e-3;\n var norm0 = ( a[0]*a[0] + 2*a[1]*a[1] + a[2]*a[2] ) * epsilon;\n var norm1 = ( b[0]*b[0] + 2*b[1]*b[1] + b[2]*b[2] ) * epsilon;\n var result = new Intersection(\"No Intersection\");\n\n for ( var y = 0; y < yRoots.length; y++ ) {\n var xPoly = new Polynomial(\n a[0],\n a[3] + yRoots[y] * a[1],\n a[5] + yRoots[y] * (a[4] + yRoots[y]*a[2])\n );\n var xRoots = xPoly.getRoots();\n\n for ( var x = 0; x < xRoots.length; x++ ) {\n var test =\n ( a[0]*xRoots[x] + a[1]*yRoots[y] + a[3] ) * xRoots[x] + \n ( a[2]*yRoots[y] + a[4] ) * yRoots[y] + a[5];\n if ( Math.abs(test) < norm0 ) {\n test =\n ( b[0]*xRoots[x] + b[1]*yRoots[y] + b[3] ) * xRoots[x] +\n ( b[2]*yRoots[y] + b[4] ) * yRoots[y] + b[5];\n if ( Math.abs(test) < norm1 ) {\n result.appendPoint( new Point2D( xRoots[x], yRoots[y] ) );\n }\n }\n }\n }\n\n if ( result.points.length > 0 ) result.status = \"Intersection\";\n\n return result;\n};\n\n\n/*****\n*\n* intersectEllipseLine\n* \n* NOTE: Rotation will need to be added to this function\n*\n*****/\nIntersection.intersectEllipseLine = function(c, rx, ry, a1, a2) {\n var result;\n var origin = new Vector2D(a1.x, a1.y);\n var dir = Vector2D.fromPoints(a1, a2);\n var center = new Vector2D(c.x, c.y);\n var diff = origin.subtract(center);\n var mDir = new Vector2D( dir.x/(rx*rx), dir.y/(ry*ry) );\n var mDiff = new Vector2D( diff.x/(rx*rx), diff.y/(ry*ry) );\n\n var a = dir.dot(mDir);\n var b = dir.dot(mDiff);\n var c = diff.dot(mDiff) - 1.0;\n var d = b*b - a*c;\n\n if ( d < 0 ) {\n result = new Intersection(\"Outside\");\n } else if ( d > 0 ) {\n var root = Math.sqrt(d);\n var t_a = (-b - root) / a;\n var t_b = (-b + root) / a;\n\n if ( (t_a < 0 || 1 < t_a) && (t_b < 0 || 1 < t_b) ) {\n if ( (t_a < 0 && t_b < 0) || (t_a > 1 && t_b > 1) )\n result = new Intersection(\"Outside\");\n else\n result = new Intersection(\"Inside\");\n } else {\n result = new Intersection(\"Intersection\");\n if ( 0 <= t_a && t_a <= 1 )\n result.appendPoint( a1.lerp(a2, t_a) );\n if ( 0 <= t_b && t_b <= 1 )\n result.appendPoint( a1.lerp(a2, t_b) );\n }\n } else {\n var t = -b/a;\n if ( 0 <= t && t <= 1 ) {\n result = new Intersection(\"Intersection\");\n result.appendPoint( a1.lerp(a2, t) );\n } else {\n result = new Intersection(\"Outside\");\n }\n }\n \n return result;\n};\n\n\n/*****\n*\n* intersectEllipsePolygon\n*\n*****/\nIntersection.intersectEllipsePolygon = function(c, rx, ry, points) {\n var result = new Intersection(\"No Intersection\");\n var length = points.length;\n\n for ( var i = 0; i < length; i++ ) {\n var b1 = points[i];\n var b2 = points[(i+1) % length];\n var inter = Intersection.intersectEllipseLine(c, rx, ry, b1, b2);\n\n result.appendPoints(inter.points);\n }\n\n if ( result.points.length > 0 )\n result.status = \"Intersection\";\n\n return result;\n};\n\n\n/*****\n*\n* intersectEllipseRectangle\n*\n*****/\nIntersection.intersectEllipseRectangle = function(c, rx, ry, r1, r2) {\n var min = r1.min(r2);\n var max = r1.max(r2);\n var topRight = new Point2D( max.x, min.y );\n var bottomLeft = new Point2D( min.x, max.y );\n \n var inter1 = Intersection.intersectEllipseLine(c, rx, ry, min, topRight);\n var inter2 = Intersection.intersectEllipseLine(c, rx, ry, topRight, max);\n var inter3 = Intersection.intersectEllipseLine(c, rx, ry, max, bottomLeft);\n var inter4 = Intersection.intersectEllipseLine(c, rx, ry, bottomLeft, min);\n \n var result = new Intersection(\"No Intersection\");\n\n result.appendPoints(inter1.points);\n result.appendPoints(inter2.points);\n result.appendPoints(inter3.points);\n result.appendPoints(inter4.points);\n\n if ( result.points.length > 0 )\n result.status = \"Intersection\";\n\n return result;\n};\n\n\n/*****\n*\n* intersectLineLine\n*\n*****/\nIntersection.intersectLineLine = function(a1, a2, b1, b2) {\n var result;\n \n var ua_t = (b2.x - b1.x) * (a1.y - b1.y) - (b2.y - b1.y) * (a1.x - b1.x);\n var ub_t = (a2.x - a1.x) * (a1.y - b1.y) - (a2.y - a1.y) * (a1.x - b1.x);\n var u_b = (b2.y - b1.y) * (a2.x - a1.x) - (b2.x - b1.x) * (a2.y - a1.y);\n\n if ( u_b != 0 ) {\n var ua = ua_t / u_b;\n var ub = ub_t / u_b;\n\n if ( 0 <= ua && ua <= 1 && 0 <= ub && ub <= 1 ) {\n result = new Intersection(\"Intersection\");\n result.points.push(\n new Point2D(\n a1.x + ua * (a2.x - a1.x),\n a1.y + ua * (a2.y - a1.y)\n )\n );\n } else {\n result = new Intersection(\"No Intersection\");\n }\n } else {\n if ( ua_t == 0 || ub_t == 0 ) {\n result = new Intersection(\"Coincident\");\n } else {\n result = new Intersection(\"Parallel\");\n }\n }\n\n return result;\n};\n\n\n/*****\n*\n* intersectLinePolygon\n*\n*****/\nIntersection.intersectLinePolygon = function(a1, a2, points) {\n var result = new Intersection(\"No Intersection\");\n var length = points.length;\n\n for ( var i = 0; i < length; i++ ) {\n var b1 = points[i];\n var b2 = points[(i+1) % length];\n var inter = Intersection.intersectLineLine(a1, a2, b1, b2);\n\n result.appendPoints(inter.points);\n }\n\n if ( result.points.length > 0 ) result.status = \"Intersection\";\n\n return result;\n};\n\n\n/*****\n*\n* intersectLineRectangle\n*\n*****/\nIntersection.intersectLineRectangle = function(a1, a2, r1, r2) {\n var min = r1.min(r2);\n var max = r1.max(r2);\n var topRight = new Point2D( max.x, min.y );\n var bottomLeft = new Point2D( min.x, max.y );\n \n var inter1 = Intersection.intersectLineLine(min, topRight, a1, a2);\n var inter2 = Intersection.intersectLineLine(topRight, max, a1, a2);\n var inter3 = Intersection.intersectLineLine(max, bottomLeft, a1, a2);\n var inter4 = Intersection.intersectLineLine(bottomLeft, min, a1, a2);\n \n var result = new Intersection(\"No Intersection\");\n\n result.appendPoints(inter1.points);\n result.appendPoints(inter2.points);\n result.appendPoints(inter3.points);\n result.appendPoints(inter4.points);\n\n if ( result.points.length > 0 )\n result.status = \"Intersection\";\n\n return result;\n};\n\n\n/*****\n*\n* intersectPolygonPolygon\n*\n*****/\nIntersection.intersectPolygonPolygon = function(points1, points2) {\n var result = new Intersection(\"No Intersection\");\n var length = points1.length;\n\n for ( var i = 0; i < length; i++ ) {\n var a1 = points1[i];\n var a2 = points1[(i+1) % length];\n var inter = Intersection.intersectLinePolygon(a1, a2, points2);\n\n result.appendPoints(inter.points);\n }\n\n if ( result.points.length > 0 )\n result.status = \"Intersection\";\n\n return result;\n\n};\n\n\n/*****\n*\n* intersectPolygonRectangle\n*\n*****/\nIntersection.intersectPolygonRectangle = function(points, r1, r2) {\n var min = r1.min(r2);\n var max = r1.max(r2);\n var topRight = new Point2D( max.x, min.y );\n var bottomLeft = new Point2D( min.x, max.y );\n \n var inter1 = Intersection.intersectLinePolygon(min, topRight, points);\n var inter2 = Intersection.intersectLinePolygon(topRight, max, points);\n var inter3 = Intersection.intersectLinePolygon(max, bottomLeft, points);\n var inter4 = Intersection.intersectLinePolygon(bottomLeft, min, points);\n \n var result = new Intersection(\"No Intersection\");\n\n result.appendPoints(inter1.points);\n result.appendPoints(inter2.points);\n result.appendPoints(inter3.points);\n result.appendPoints(inter4.points);\n\n if ( result.points.length > 0 )\n result.status = \"Intersection\";\n\n return result;\n};\n\n\n/*****\n*\n* intersectRayRay\n*\n*****/\nIntersection.intersectRayRay = function(a1, a2, b1, b2) {\n var result;\n \n var ua_t = (b2.x - b1.x) * (a1.y - b1.y) - (b2.y - b1.y) * (a1.x - b1.x);\n var ub_t = (a2.x - a1.x) * (a1.y - b1.y) - (a2.y - a1.y) * (a1.x - b1.x);\n var u_b = (b2.y - b1.y) * (a2.x - a1.x) - (b2.x - b1.x) * (a2.y - a1.y);\n\n if ( u_b != 0 ) {\n var ua = ua_t / u_b;\n\n result = new Intersection(\"Intersection\");\n result.points.push(\n new Point2D(\n a1.x + ua * (a2.x - a1.x),\n a1.y + ua * (a2.y - a1.y)\n )\n );\n } else {\n if ( ua_t == 0 || ub_t == 0 ) {\n result = new Intersection(\"Coincident\");\n } else {\n result = new Intersection(\"Parallel\");\n }\n }\n\n return result;\n};\n\n\n/*****\n*\n* intersectRectangleRectangle\n*\n*****/\nIntersection.intersectRectangleRectangle = function(a1, a2, b1, b2) {\n var min = a1.min(a2);\n var max = a1.max(a2);\n var topRight = new Point2D( max.x, min.y );\n var bottomLeft = new Point2D( min.x, max.y );\n \n var inter1 = Intersection.intersectLineRectangle(min, topRight, b1, b2);\n var inter2 = Intersection.intersectLineRectangle(topRight, max, b1, b2);\n var inter3 = Intersection.intersectLineRectangle(max, bottomLeft, b1, b2);\n var inter4 = Intersection.intersectLineRectangle(bottomLeft, min, b1, b2);\n \n var result = new Intersection(\"No Intersection\");\n\n result.appendPoints(inter1.points);\n result.appendPoints(inter2.points);\n result.appendPoints(inter3.points);\n result.appendPoints(inter4.points);\n\n if ( result.points.length > 0 )\n result.status = \"Intersection\";\n\n return result;\n};\n\n\n/*****\n*\n* bezout\n*\n* This code is based on MgcIntr2DElpElp.cpp written by David Eberly. His\n* code along with many other excellent examples are avaiable at his site:\n* http://www.magic-software.com\n*\n*****/\nIntersection.bezout = function(e1, e2) {\n var AB = e1[0]*e2[1] - e2[0]*e1[1];\n var AC = e1[0]*e2[2] - e2[0]*e1[2];\n var AD = e1[0]*e2[3] - e2[0]*e1[3];\n var AE = e1[0]*e2[4] - e2[0]*e1[4];\n var AF = e1[0]*e2[5] - e2[0]*e1[5];\n var BC = e1[1]*e2[2] - e2[1]*e1[2];\n var BE = e1[1]*e2[4] - e2[1]*e1[4];\n var BF = e1[1]*e2[5] - e2[1]*e1[5];\n var CD = e1[2]*e2[3] - e2[2]*e1[3];\n var DE = e1[3]*e2[4] - e2[3]*e1[4];\n var DF = e1[3]*e2[5] - e2[3]*e1[5];\n var BFpDE = BF + DE;\n var BEmCD = BE - CD;\n\n return new Polynomial(\n AB*BC - AC*AC,\n AB*BEmCD + AD*BC - 2*AC*AE,\n AB*BFpDE + AD*BEmCD - AE*AE - 2*AC*AF,\n AB*DF + AD*BFpDE - 2*AE*AF,\n AD*DF - AF*AF\n );\n};\n\nmodule.exports = Intersection//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvaW50ZXJzZWN0aW9uanMvaW50ZXJzZWN0aW9uLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vY29tcGxleHZpZXdlci8uL25vZGVfbW9kdWxlcy9pbnRlcnNlY3Rpb25qcy9pbnRlcnNlY3Rpb24uanM/MmFlYyJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgUG9pbnQyRCA9IHJlcXVpcmUoJ3BvaW50MmQnKTtcblxuLyoqKioqXG4qXG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nRlcnNlY3Rpb25QYXJhbXMoKTtcbiAgICB2YXIgaXAyID0gc2hhcGUyLmdldEludGVyc2VjdGlvblBhcmFtcygpO1xuICAgIHZhciByZXN1bHQ7XG5cbiAgICBpZiAoIGlwMSAhPSBudWxsICYmIGlwMiAhPSBudWxsICkge1xuICAgICAgICBpZiAoIGlwMS5uYW1lID09IFwiUGF0aFwiICkge1xuICAgICAgICAgICAgcmVzdWx0ID0gSW50ZXJzZWN0aW9uLmludGVyc2VjdFBhdGhTaGFwZShzaGFwZTEsIHNoYXBlMik7XG4gICAgICAgIH0gZWxzZSBpZiAoIGlwMi5uYW1lID09IFwiUGF0aFwiICkge1xuICAgICAgICAgICAgcmVzdWx0ID0gSW50ZXJzZWN0aW9uLmludGVyc2VjdFBhdGhTaGFwZShzaGFwZTIsIHNoYXBlMSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgbWV0aG9kO1xuICAgICAgICAgICAgdmFyIHBhcmFtcztcblxuICAgICAgICAgICAgaWYgKCBpcDEubmFtZSA8IGlwMi5uYW1lICkge1xuICAgICAgICAgICAgICAgIG1ldGhvZCA9IFwiaW50ZXJzZWN0XCIgKyBpcDEubmFtZSArIGlwMi5uYW1lO1xuICAgICAgICAgICAgICAgIHBhcmFtcyA9IGlwMS5wYXJhbXMuY29uY2F0KCBpcDIucGFyYW1zICk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG1ldGhvZCA9IFwiaW50ZXJzZWN0XCIgKyBpcDIubmFtZSArIGlwMS5uYW1lO1xuICAgICAgICAgICAgICAgIHBhcmFtcyA9IGlwMi5wYXJhbXMuY29uY2F0KCBpcDEucGFyYW1zICk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICggIShtZXRob2QgaW4gSW50ZXJzZWN0aW9uKSApXG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiSW50ZXJzZWN0aW9uIG5vdCBhdmFpbGF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xLmFkZChhLmFkZChiMykpO1xuXG4gICAgYSA9IGIxLm11bHRpcGx5KC0yKTtcbiAgICBiID0gYjIubXVsdGlwbHkoMik7XG4gICAgYzIxID0gYS5hZGQoYik7XG5cbiAgICBjMjAgPSBuZXcgUG9pbnQyRChiMS54LCBiMS55KTtcbiAgICBcbiAgICBpZiAoIGMxMi55ID09IDAgKSB7XG4gICAgICAgIHZhciB2MCA9IGMxMi54KihjMTAueSAtIGMyMC55KTtcbiAgICAgICAgdmFyIHYxID0gdjAgLSBjMTEueCpjMTEueTtcbiAgICAgICAgdmFyIHYyID0gdjAgKyB2MTtcbiAgICAgICAgdmFyIHYzID0gYzExLnkqYzExLnk7XG5cbiAgICAgICAgcG9seSA9IG5ldyBQb2x5bm9taWFsKFxuICAgICAgICAgICAgYzEyLngqYzIyLnkqYzIyLnksXG4gICAgICAgICAgICAyKmMxMi54KmMyMS55KmMyMi55LFxuICAgICAgICAgICAgYzEyLngqYzIxLnkqYzIxLnkgLSBjMjIueCp2MyAtIGMyMi55KnYwIC0gYzIyLnkqdjEsXG4gICAgICAgICAgICAtYzIxLngqdjMgLSBjMjEueSp2MCAtIGMyMS55KnYxLFxuICAgICAgICAgICAgKGMxMC54IC0gYzIwLngpKnYzICsgKGMxMC55IC0gYzIwLnkpKnYxXG4gICAgICAgICk7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIHYwID0gYzEyLngqYzIyLnkgLSBjMTIueSpjMjIueDtcbiAgICAgICAgdmFyIHYxID0gYzEyLngqYzIxLnkgLSBjMjEueCpjMTIueTtcbiAgICAgICAgdmFyIHYyID0gYzExLngqYzEyLnkgLSBjMTEueSpjMTIueDtcbiAgICAgICAgdmFyIHYzID0gYzEwLnkgLSBjMjAueTtcbiAgICAgICAgdmFyIHY0ID0gYzEyLnkqKGMxMC54IC0gYzIwLngpIC0gYzEyLngqdjM7XG4gICAgICAgIHZhciB2NSA9IC1jMTEueSp2MiArIGMxMi55KnY0O1xuICAgICAgICB2YXIgdjYgPSB2Mip2MjtcblxuICAgICAgICBwb2x5ID0gbmV3IFBvbHlub21pYWwoXG4gICAgICAgICAgICB2MCp2MCxcbiAgICAgICAgICAgIDIqdjAqdjEsXG4gICAgICAgICAgICAoLWMyMi55KnY2ICsgYzEyLnkqdjEqdjEgKyBjMTIueSp2MCp2NCArIHYwKnY1KSAvIGMxMi55LFxuICAgICAgICAgICAgKC1jMjEueSp2NiArIGMxMi55KnYxKnY0ICsgdjEqdjUpIC8gYzEyLnksXG4gICAgICAgICAgICAodjMqdjYgKyB2NCp2NSkgLyBjMTIueVxuICAgICAgICApO1xuICAgIH1cblxuICAgIHZhciByb290cyA9IHBvbHkuZ2V0Um9vdHMoKTtcbiAgICBmb3IgKCB2YXIgaSA9IDA7IGkgPCByb290cy5sZW5ndGg7IGkrKyApIHtcbiAgICAgICAgdmFyIHMgPSByb290c1tpXTtcblxuICAgICAgICBpZiAoIDAgPD0gcyAmJiBzIDw9IDEgKSB7XG4gICAgICAgICAgICB2YXIgeFJvb3RzID0gbmV3IFBvbHlub21pYWwoXG4gICAgICAgICAgICAgICAgYzEyLngsXG4gICAgICAgICAgICAgICAgYzExLngsXG4gICAgICAgICAgICAgICAgYzEwLnggLSBjMjAueCAtIHMqYzIxLnggLSBzKnMqYzIyLnhcbiAgICAgICAgICAgICkuZ2V0Um9vdHMoKTtcbiAgICAgICAgICAgIHZhciB5Um9vdHMgPSBuZXcgUG9seW5vbWlhbChcbiAgICAgICAgICAgICAgICBjMTIueSxcbiAgICAgICAgICAgICAgICBjMTEueSxcbiAgICAgICAgICAgICAgICBjMTAueSAtIGMyMC55IC0gcypjMjEueSAtIHMqcypjMjIueVxuICAgICAgICAgICAgKS5nZXRSb290cygpO1xuXG4gICAgICAgICAgICBpZiAoIHhSb290cy5sZW5ndGggPiAwICYmIHlSb290cy5sZW5ndGggPiAwICkge1xuICAgICAgICAgICAgICAgIHZhciBUT0xFUkFOQ0UgPSAxZS00O1xuXG4gICAgICAgICAgICAgICAgY2hlY2tSb290czpcbiAgICAgICAgICAgICAgICBmb3IgKCB2YXIgaiA9IDA7IGogPCB4Um9vdHMubGVuZ3RoOyBqKysgKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciB4Um9vdCA9IHhSb290c1tqXTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoIDAgPD0geFJvb3QgJiYgeFJvb3QgPD0gMSApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoIHZhciBrID0gMDsgayA8IHlSb290cy5sZW5ndGg7IGsrKyApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIE1hdGguYWJzKCB4Um9vdCAtIHlSb290c1trXSApIDwgVE9MRVJBTkNFICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQucG9pbnRzLnB1c2goIGMyMi5tdWx0aXBseShzKnMpLmFkZChjMjEubXVsdGlwbHkocykuYWRkKGMyMCkpICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIGNoZWNrUm9vdHM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgaWYgKCByZXN1bHQucG9pbnRzLmxlbmd0aCA+IDAgKSByZXN1bHQuc3RhdHVzID0gXCJJbnRlcnNlY3Rpb25cIjtcblxuICAgIHJldHVybiByZXN1bHQ7XG59O1xuXG5cbi8qKioqKlxuKlxuKiAgIGludGVyc2VjdEJlemllcjJCZXppZXIzXG4qXG4qKioqKi9cbkludGVyc2VjdGlvbi5pbnRlcnNlY3RCZXppZXIyQmV6aWVyMyA9IGZ1bmN0aW9uKGExLCBhMiwgYTMsIGIxLCBiMiwgYjMsIGI0KSB7XG4gICAgdmFyIGEsIGIsYywgZDtcbiAgICB2YXIgYzEyLCBjMTE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yIGMxMngyID0gYzEyLngqYzEyLng7XG4gICAgdmFyIGMxMnkyID0gYzEyLnkqYzEyLnk7XG4gICAgdmFyIGMyMHgyID0gYzIwLngqYzIwLng7XG4gICAgdmFyIGMyMHkyID0gYzIwLnkqYzIwLnk7XG4gICAgdmFyIGMyMXgyID0gYzIxLngqYzIxLng7XG4gICAgdmFyIGMyMXkyID0gYzIxLnkqYzIxLnk7XG4gICAgdmFyIGMyMngyID0gYzIyLngqYzIyLng7XG4gICAgdmFyIGMyMnkyID0gYzIyLnkqYzIyLnk7XG4gICAgdmFyIGMyM3gyID0gYzIzLngqYzIzLng7XG4gICAgdmFyIGMyM3kyID0gYzIzLnkqYzIzLnk7XG5cbiAgICB2YXIgcG9seSA9IG5ldyBQb2x5bm9taWFsKFxuICAgICAgICAtMipjMTIueCpjMTIueSpjMjMueCpjMjMueSArIGMxMngyKmMyM3kyICsgYzEyeTIqYzIzeDIsXG4gICAgICAgIC0yKmMxMi54KmMxMi55KmMyMi54KmMyMy55IC0gMipjMTIueCpjMTIueSpjMjIueSpjMjMueCArIDIqYzEyeTIqYzIyLngqYzIzLnggK1xuICAgICAgICAgICAgMipjMTJ4MipjMjIueSpjMjMueSxcbiAgICAgICAgLTIqYzEyLngqYzIxLngqYzEyLnkqYzIzLnkgLSAyKmMxMi54KmMxMi55KmMyMS55KmMyMy54IC0gMipjMTIueCpjMTIueSpjMjIueCpjMjIueSArXG4gICAgICAgICAgICAyKmMyMS54KmMxMnkyKmMyMy54ICsgYzEyeTIqYzIyeDIgKyBjMTJ4MiooMipjMjEueSpjMjMueSArIGMyMnkyKSxcbiAgICAgICAgMipjMTAueCpjMTIueCpjMTIueSpjMjMueSArIDIqYzEwLnkqYzEyLngqYzEyLnkqYzIzLnggKyBjMTEueCpjMTEueSpjMTIueCpjMjMueSArXG4gICAgICAgICAgICBjMTEueCpjMTEueSpjMTIueSpjMjMueCAtIDIqYzIwLngqYzEyLngqYzEyLnkqYzIzLnkgLSAyKmMxMi54KmMyMC55KmMxMi55KmMyMy54IC1cbiAgICAgICAgICAgIDIqYzEyLngqYzIxLngqYzEyLnkqYzIyLnkgLSAyKmMxMi54KmMxMi55KmMyMS55KmMyMi54IC0gMipjMTAueCpjMTJ5MipjMjMueCAtXG4gICAgICAgICAgICAyKmMxMC55KmMxMngyKmMyMy55ICsgMipjMjAueCpjMTJ5MipjMjMueCArIDIqYzIxLngqYzEyeTIqYzIyLnggLVxuICAgICAgICAgICAgYzExeTIqYzEyLngqYzIzLnggLSBjMTF4MipjMTIueSpjMjMueSArIGMxMngyKigyKmMyMC55KmMyMy55ICsgMipjMjEueSpjMjIueSksXG4gICAgICAgIDIqYzEwLngqYzEyLngqYzEyLnkqYzIyLnkgKyAyKmMxMC55KmMxMi54KmMxMi55KmMyMi54ICsgYzExLngqYzExLnkqYzEyLngqYzIyLnkgK1xuICAgICAgICAgICAgYzExLngqYzExLnkqYzEyLnkqYzIyLnggLSAyKmMyMC54KmMxMi54KmMxMi55KmMyMi55IC0gMipjMTIueCpjMjAueSpjMTIueSpjMjIueCAtXG4gICAgICAgICAgICAyKmMxMi54KmMyMS54KmMxMi55KmMyMS55IC0gMipjMTAueCpjMTJ5MipjMjIueCAtIDIqYzEwLnkqYzEyeDIqYzIyLnkgK1xuICAgICAgICAgICAgMipjMjAueCpjMTJ5MipjMjIueCAtIGMxMXkyKmMxMi54KmMyMi54IC0gYzExeDIqYzEyLnkqYzIyLnkgKyBjMjF4MipjMTJ5MiArXG4gICAgICAgICAgICBjMTJ4MiooMipjMjAueSpjMjIueSArIGMyMXkyKSxcbiAgICAgICAgMipjMTAueCpjMTIueCpjMTIueSpjMjEueSArIDIqYzEwLnkqYzEyLngqYzIxLngqYzEyLnkgKyBjMTEueCpjMTEueSpjMTIueCpjMjEueSArXG4gICAgICAgICAgICBjMTEueCpjMTEueSpjMjEueCpjMTIueSAtIDIqYzIwLngqYzEyLngqYzEyLnkqYzIxLnkgLSAyKmMxMi54KmMyMC55KmMyMS54KmMxMi55IC1cbiAgICAgICAgICAgIDIqYzEwLngqYzIxLngqYzEyeTIgLSAyKmMxMC55KmMxMngyKmMyMS55ICsgMipjMjAueCpjMjEueCpjMTJ5MiAtXG4gICAgICAgICAgICBjMTF5MipjMTIueCpjMjEueCAtIGMxMXgyKmMxMi55KmMyMS55ICsgMipjMTJ4MipjMjAueSpjMjEueSxcbiAgICAgICAgLTIqYzEwLngqYzEwLnkqYzEyLngqYzEyLnkgLSBjMTAueCpjMTEueCpjMTEueSpjMTIueSAtIGMxMC55KmMxMS54KmMxMS55KmMxMi54ICtcbiAgICAgICAgICAgIDIqYzEwLngqYzEyLngqYzIwLnkqYzEyLnkgKyAyKmMxMC55KmMyMC54KmMxMi54KmMxMi55ICsgYzExLngqYzIwLngqYzExLnkqYzEyLnkgK1xuICAgICAgICAgICAgYzExLngqYzExLnkqYzEyLngqYzIwLnkgLSAyKmMyMC54KmMxMi54KmMyMC55KmMxMi55IC0gMipjMTAueCpjMjAueCpjMTJ5MiArXG4gICAgICAgICAgICBjMTAueCpjMTF5MipjMTIueCArIGMxMC55KmMxMXgyKmMxMi55IC0gMipjMTAueSpjMTJ4MipjMjAueSAtXG4gICAgICAgICAgICBjMjAueCpjMTF5MipjMTIueCAtIGMxMXgyKmMyMC55KmMxMi55ICsgYzEweDIqYzEyeTIgKyBjMTB5MipjMTJ4MiArXG4gICAgICAgICAgICBjMjB4MipjMTJ5MiArIGMxMngyKmMyMHkyXG4gICAgKTtcbiAgICB2YXIgcm9vdHMgPSBwb2x5LmdldFJvb3RzSW5JbnRlcnZhbCgwLDEpO1xuXG4gICAgZm9yICggdmFyIGkgPSAwOyBpIDwgcm9vdHMubGVuZ3RoOyBpKysgKSB7XG4gICAgICAgIHZhciBzID0gcm9vdHNbaV07XG4gICAgICAgIHZhciB4Um9vdHMgPSBuZXcgUG9seW5vbWlhbChcbiAgICAgICAgICAgIGMxMi54LFxuICAgICAgICAgICAgYzExLngsXG4gICAgICAgICAgICBjMTAueCAtIGMyMC54IC0gcypjMjEueCAtIHMqcypjMjIueCAtIHMqcypzKmMyMy54XG4gICAgICAgICkuZ2V0Um9vdHMoKTtcbiAgICAgICAgdmFyIHlSb290cyA9IG5ldyBQb2x5bm9taWFsKFxuICAgICAgICAgICAgYzEyLnksXG4gICAgICAgICAgICBjMTEueSxcbiAgICAgICAgICAgIGMxMC55IC0gYzIwLnkgLSBzKmMyMS55IC0gcypzKmMyMi55IC0gcypzKnMqYzIzLnlcbiAgICAgICAgKS5nZXRSb290cygpO1xuXG4gICAgICAgIGlmICggeFJvb3RzLmxlbmd0aCA+IDAgJiYgeVJvb3RzLmxlbmd0aCA+IDAgKSB7XG4gICAgICAgICAgICB2YXIgVE9MRVJBTkNFID0gMWUtNDtcblxuICAgICAgICAgICAgY2hlY2tSb290czpcbiAgICAgICAgICAgIGZvciAoIHZhciBqID0gMDsgaiA8IHhSb290cy5sZW5ndGg7IGorKyApIHtcbiAgICAgICAgICAgICAgICB2YXIgeFJvb3QgPSB4Um9vdHNbal07XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgaWYgKCAwIDw9IHhSb290ICYmIHhSb290IDw9IDEgKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAoIHZhciBrID0gMDsgayA8IHlSb290cy5sZW5ndGg7IGsrKyApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICggTWF0aC5hYnMoIHhSb290IC0geVJvb3RzW2tdICkgPCBUT0xFUkFOQ0UgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnBvaW50cy5wdXNoKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjMjMubXVsdGlwbHkocypzKnMpLmFkZChjMjIubXVsdGlwbHkocypzKS5hZGQoYzIxLm11bHRpcGx5KHMpLmFkZChjMjApKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIGNoZWNrUm9vdHM7XG4gICA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BwMS55KTtcblxuICAgIHZhciByeHJ4ICA9IHJ4KnJ4O1xuICAgIHZhciByeXJ5ICA9IHJ5KnJ5O1xuICAgIHZhciByb290cyA9IG5ldyBQb2x5bm9taWFsKFxuICAgICAgICByeXJ5KmMyLngqYzIueCArIHJ4cngqYzIueSpjMi55LFxuICAgICAgICAyKihyeXJ5KmMyLngqYzEueCArIHJ4cngqYzIueSpjMS55KSxcbiAgICAgICAgcnlyeSooMipjMi54KmMwLnggKyBjMS54KmMxLngpICsgcnhyeCooMipjMi55KmMwLnkrYzEueSpjMS55KSAtXG4gICAgICAgICAgICAyKihyeXJ5KmVjLngqYzIueCArIHJ4cngqZWMueSpjMi55KSxcbiAgICAgICAgMioocnlyeSpjMS54KihjMC54LWVjLngpICsgcnhyeCpjMS55KihjMC55LWVjLnkpKSxcbiAgICAgICAgcnlyeSooYzAueCpjMC54K2VjLngqZWMueCkgKyByeHJ4KihjMC55KmMwLnkgKyBlYy55KmVjLnkpIC1cbiAgICAgICAgICAgIDIqKHJ5cnkqZWMueCpjMC54ICsgcnhyeCplYy55KmMwLnkpIC0gcnhyeCpyeXJ5XG4gICAgKS5nZXRSb290cygpO1xuXG4gICAgZm9yICggdmFyIGkgPSAwOyBpIDwgcm9vdHMubGVuZ3RoOyBpKysgKSB7XG4gICAgICAgIHZhciB0ID0gcm9vdHNbaV07XG5cbiAgICAgICAgaWYgKCAwIDw9IHQgJiYgdCA8PSAxIClcbiAgICAgICAgICAgIHJlc3VsdC5wb2ludHMucHVzaCggYzIubXVsdGlwbHkodCp0KS5hZGQoYzEubXVsdGlwbHkodCkuYWRkKGMwKSkgKTtcbiAgICB9XG5cbiAgICBpZiAoIHJlc3VsdC5wb2ludHMubGVuZ3RoID4gMCApIHJlc3VsdC5zdGF0dXMgPSBcIkludGVyc2VjdGlvblwiO1xuXG4gICAgcmV0dXJuIHJlc3VsdDtcbn07XG5cblxuLyoqKioqXG4qXG4qICAgaW50ZXJzZWN0QmV6aWVyMkxpbmVcbip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IG5ldyBWZWN0b3IyRChhMS55IC0gYTIueSwgYTIueCAtIGExLngpO1xuICAgIFxuICAgIC8vIERldGVybWluZSBuZXcgYyBjb2VmZmljaWVudFxuICAgIGNsID0gYTEueCphMi55IC0gYTIueCphMS55O1xuXG4gICAgLy8gVHJhbnNmb3JtIGN1YmljIGNvZWZmaWNpZW50cyB0byBsaW5lJ3MgY29vcmRpbmF0ZSBzeXN0ZW0gYW5kIGZpbmQgcm9vdHNcbiAgICAvLyBvZiBjdWJpY1xuICAgIHJvb3RzID0gbmV3IFBvbHlub21pYWwoXG4gICAgICAgIG4uZG90KGMyKSxcbiAgICAgICAgbi5kb3QoYzEpLFxuICAgICAgICBuLmRvdChjMCkgKyBjbFxuICAgICkuZ2V0Um9vdHMoKTtcblxuICAgIC8vIEFueSByb290cyBpbiBjbG9zZWQgaW50ZXJ2YWwgWzAsMV0gYXJlIGludGVyc2VjdGlvbnMgb24gQmV6aWVyLCBidXRcbiAgICAvLyBtaWdodCBub3QgYmUgb24gdGhlIGxpbmUgc2VnbWVudC5cbiAgICAvLyBGaW5kIGludGVyc2VjdGlvbnMgYW5kIGNhbGN1bGF0ZSBwb2ludCBjb29yZGluYXRlc1xuICAgIGZvciAoIHZhciBpID0gMDsgaSA8IHJvb3RzLmxlbmd0aDsgaSsrICkge1xuICAgICAgICB2YXIgdCA9IHJvb3RzW2ldO1xuXG4gICAgICAgIGlmICggMCA8PSB0ICYmIHQgPD0gMSApIHtcbiAgICAgICAgICAgIC8vIFdlJ3JlIHdpdGhpbiB0aGUgQmV6aWVyIGN1cnZlXG4gICAgICAgICAgICAvLyBGaW5kIHBvaW50IG9uIEJlemllclxuICAgICAgICAgICAgdmFyIHA0ID0gcDEubGVycChwMiwgdCk7XG4gICAgICAgICAgICB2YXIgcDUgPSBwMi5sZXJwKHAzLCB0KTtcblxuICAgICAgICAgICAgdmFyIHA2ID0gcDQubGVycChwNSwgdCk7XG5cbiAgICAgICAgICAgIC8vIFNlZSBpZiBwb2ludCBpcyBvbiBsaW5lIHNlZ21lbnRcbiAgICAgICAgICAgIC8vIEhhZCB0byBtYWtlIHNwZWNpYWwgY2FzZXMgZm9yIHZlcnRpY2FsIGFuZCBob3Jpem9udGFsIGxpbmVzIGR1ZVxuICAgICAgICAgICAgLy8gdG8gc2xpZ2h0IGVycm9ycyBpbiBjYWxjdWxhdGlvbiBvZiBwNlxuICAgICAgICAgICAgaWYgKCBhMS54ID09IGEyLnggKSB7XG4gICAgICAgICAgICAgICAgaWYgKCBtaW4ueSA8PSBwNi55ICYmIHA2LnkgPD0gbWF4LnkgKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5zdGF0dXMgPSBcIkludGVyc2VjdGlvblwiO1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQuYXBwZW5kUG9pbnQoIHA2ICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICggYTEueSA9PSBhMi55ICkge1xuICAgICAgICAgICAgICAgIGlmICggbWluLnggPD0gcDYueCAmJiBwNi54IDw9IG1heC54ICkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQuc3RhdHVzID0gXCJJbnRlcnNlY3Rpb25cIjtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LmFwcGVuZFBvaW50KCBwNiApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIHA2Lmd0ZShtaW4pICYmIHA2Lmx0ZShtYXgpICkge1xuICAgICAgICAgICAgICAgIHJlc3VsdC5zdGF0dXMgPSBcIkludGVyc2VjdGlvblwiO1xuICAgICAgICAgICAgICAgIHJlc3VsdC5hcHBlbmRQb2ludCggcDYgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiByZXN1bHQ7XG59O1xuXG5cbi8qKioqKlxuKlxuKiAgIGludGVyc2VjdEJlemllcjJQb2x5Z29uXG4qXG4qKioqKi9cbkludGVyc2VjdGlv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y55ICtcbiAgICAgICAgICAgIDMqYzIxLngqYzEzeTMqYzIzeDIgKyAzKmMyMngyKmMxM3kzKmMyMy54ICsgMypjMjEueCpjMTN4MipjMTMueSpjMjN5MiAtIDMqYzEzLngqYzIxLnkqYzEzeTIqYzIzeDIgLVxuICAgICAgICAgICAgMypjMTMueCpjMjJ4MipjMTN5MipjMjMueSArIGMxM3gyKmMxMy55KmMyMy54Kig2KmMyMS55KmMyMy55ICsgMypjMjJ5MikgKyBjMTN4MyooLWMyMS55KmMyM3kyIC1cbiAgICAgICAgICAgIDIqYzIyeTIqYzIzLnkgLSBjMjMueSooMipjMjEueSpjMjMueSArIGMyMnkyKSksXG4gICAgICAgIGMxMS54KmMxMi55KmMxMy54KmMxMy55KmMyMy54KmMyMy55IC0gYzExLnkqYzEyLngqYzEzLngqYzEzLnkqYzIzLngqYzIzLnkgKyA2KmMyMS54KmMyMi54KmMxM3kzKmMyMy54ICtcbiAgICAgICAgICAgIDMqYzExLngqYzEyLngqYzEzLngqYzEzLnkqYzIzeTIgKyA2KmMxMC54KmMxMy54KmMxM3kyKmMyMy54KmMyMy55IC0gMypjMTEueCpjMTIueCpjMTN5MipjMjMueCpjMjMueSAtXG4gICAgICAgICAgICAzKmMxMS55KmMxMi55KmMxMy54KmMxMy55KmMyM3gyIC0gNipjMTAueSpjMTN4MipjMTMueSpjMjMueCpjMjMueSAtIDYqYzIwLngqYzEzLngqYzEzeTIqYzIzLngqYzIzLnkgK1xuICAgICAgICAgICAgMypjMTEueSpjMTIueSpjMTN4MipjMjMueCpjMjMueSAtIDIqYzEyLngqYzEyeTIqYzEzLngqYzIzLngqYzIzLnkgLSA2KmMyMS54KmMxMy54KmMyMi54KmMxM3kyKmMyMy55IC1cbiAgICAgICAgICAgIDYqYzIxLngqYzEzLngqYzEzeTIqYzIyLnkqYzIzLnggLSA2KmMxMy54KmMyMS55KmMyMi54KmMxM3kyKmMyMy54ICsgNipjMjEueCpjMTN4MipjMTMueSpjMjIueSpjMjMueSArXG4gICAgICAgICAgICAyKmMxMngyKmMxMi55KmMxMy55KmMyMy54KmMyMy55ICsgYzIyeDMqYzEzeTMgLSAzKmMxMC54KmMxM3kzKmMyM3gyICsgMypjMTAueSpjMTN4MypjMjN5MiArXG4gICAgICAgICAgICAzKmMyMC54KmMxM3kzKmMyM3gyICsgYzEyeTMqYzEzLngqYzIzeDIgLSBjMTJ4MypjMTMueSpjMjN5MiAtIDMqYzEwLngqYzEzeDIqYzEzLnkqYzIzeTIgK1xuICAgICAgICAgICAgMypjMTAueSpjMTMueCpjMTN5MipjMjN4MiAtIDIqYzExLngqYzEyLnkqYzEzeDIqYzIzeTIgKyBjMTEueCpjMTIueSpjMTN5MipjMjN4MiAtIGMxMS55KmMxMi54KmMxM3gyKmMyM3kyICtcbiAgICAgICAgICAgIDIqYzExLnkqYzEyLngqYzEzeTIqYzIzeDIgKyAzKmMyMC54KmMxM3gyKmMxMy55KmMyM3kyIC0gYzEyLngqYzEyeTIqYzEzLnkqYzIzeDIgLVxuICAgICAgICAgICAgMypjMjAueSpjMTMueCpjMTN5MipjMjN4MiArIGMxMngyKmMxMi55KmMxMy54KmMyM3kyIC0gMypjMTMueCpjMjJ4MipjMTN5MipjMjIueSArXG4gICAgICAgICAgICBjMTN4MipjMTMueSpjMjMueCooNipjMjAueSpjMjMueSArIDYqYzIxLnkqYzIyLnkpICsgYzEzeDIqYzIyLngqYzEzLnkqKDYqYzIxLnkqYzIzLnkgKyAzKmMyMnkyKSArXG4gICAgICAgICAgICBjMTN4MyooLTIqYzIxLnkqYzIyLnkqYzIzLnkgLSBjMjAueSpjMjN5MiAtIGMyMi55KigyKmMyMS55KmMyMy55ICsgYzIyeTIpIC0gYzIzLnkqKDIqYzIwLnkqYzIzLnkgKyAyKmMyMS55KmMyMi55KSksXG4gICAgICAgIDYqYzExLngqYzEyLngqYzEzLngqYzEzLnkqYzIyLnkqYzIzLnkgKyBjMTEueCpjMTIueSpjMTMueCpjMjIueCpjMTMueSpjMjMueSArIGMxMS54KmMxMi55KmMxMy54KmMxMy55KmMyMi55KmMyMy54IC1cbiAgICAgICAgICAgIGMxMS55KmMxMi54KmMxMy54KmMyMi54KmMxMy55KmMyMy55IC0gYzExLnkqYzEyLngqYzEzLngqYzEzLnkqYzIyLnkqYzIzLnggLSA2KmMxMS55KmMxMi55KmMxMy54KmMyMi54KmMxMy55KmMyMy54IC1cbiAgICAgICAgICAgIDYqYzEwLngqYzIyLngqYzEzeTMqYzIzLnggKyA2KmMyMC54KmMyMi54KmMxM3kzKmMyMy54ICsgNipjMTAueSpjMTN4MypjMjIueSpjMjMueSArIDIqYzEyeTMqYzEzLngqYzIyLngqYzIzLnggLVxuICAgICAgICAgICAgMipjMTJ4MypjMTMueSpjMjIueSpjMjMueSArIDYqYzEwLngqYzEzLngqYzIyLngqYzEzeTIqYzIzLnkgKyA2KmMxMC54KmMxMy54KmMxM3kyKmMyMi55KmMyMy54ICtcbiAgICAgICAgICAgIDYqYzEwLnkqYzEzLngqYzIyLngqYzEzeTIqYzIzLnggLSAzKmMxMS54KmMxMi54KmMyMi54KmMxM3kyKmMyMy55IC0gMypjMTEueCpjMTIueCpjMTN5MipjMjIueSpjMjMueCArXG4gICAgICAgICAgICAyKmMxMS54KmMxMi55KmMyMi54KmMxM3kyKmMyMy54ICsgNCpjMTEueSpjMTIueCpjMjIueCpjMTN5MipjMjMueCAtIDYqYzEwLngqYzEzeDIqYzEzLnkqYzIyLnkqYzIzLnkgLVxuICAgICAgICAgICAgNipjMTAueSpjMTN4MipjMjIueCpjMTMueSpjMjMueSAtIDYqYzEwLnkqYzEzeDIqYzEzLnkqYzIyLnkqYzIzLnggLSA0KmMxMS54KmMxMi55KmMxM3gyKmMyMi55KmMyMy55IC1cbiAgICAgICAgICAgIDYqYzIwLngqYzEzLngqYzIyLngqYzEzeTIqYzIzLnkgLSA2KmMyMC54KmMxMy54KmMxM3kyKmMyMi55KmMyMy54IC0gMipjMTEueSpjMTIueCpjMTN4MipjMjIueSpjMjMueSArXG4gICAgICAgICAgICAzKmMxMS55KmMxMi55KmMxM3gyKmMyMi54KmMyMy55ICsgMypjMTEueSpjMTIueSpjMTN4MipjMjIueSpjMjMueCAtIDIqYzEyLngqYzEyeTIqYzEzLngqYzIyLngqYzIzLnkgLVxuICAgICAgICAgICAgMipjMTIueCpjMTJ5MipjMTMueCpjMjIueSpjMjMueCAtIDIqYzEyLngqYzEyeTIqYzIyLngqYzEzLnkqYzIzLnggLSA2KmMyMC55KmMxMy54KmMyMi54KmMxM3kyKmMyMy54IC1cbiAgICAgICAgICAgIDYqYzIxLngqYzEzLngqYzIxLnkqYzEzeTIqYzIzLnggLSA2KmMyMS54KmMxMy54KmMyMi54KmMxM3kyKmMyMi55ICsgNipjMjAueCpjMTN4MipjMTMueSpjMjIueSpjMjMueSArXG4gICAgICAgICAgICAyKmMxMngyKmMxMi55KmMxMy54KmMyMi55KmMyMy55ICsgMipjMTJ4MipjMTIueSpjMjIueCpjMTMueSpjMjMueSArIDIqYzEyeDIqYzEyLnkqYzEzLnkqYzIyLnkqYzIzLnggK1xuICAgICAgICAgICAgMypjMjEueCpjMjJ4MipjMTN5MyArIDMqYzIxeDIqYzEzeTMqYzIzLnggLSAzKmMxMy54KmMyMS55KmMyMngyKmMxM3kyIC0gMypjMjF4MipjMTMueCpjMTN5MipjMjMueSArXG4gICAgICAgICAgICBjMTN4MipjMjIueCpjMTMueSooNipjMjAueSpjMjMueSArIDYqYzIxLnkqYzIyLnkpICsgYzEzeDIqYzEzLnkqYzIzLngqKDYqYzIwLnkqYzIyLnkgKyAzKmMyMXkyKSArXG4gICAgICAgICAgICBjMjEueCpjMTN4MipjMTMueSooNipjMjEueSpjMjMueSArIDMqYzIyeTIpICsgYzEzeDMqKC0yKmMyMC55KmMyMi55KmMyMy55IC0gYzIzLnkqKDIqYzIwLnkqYzIyLnkgKyBjMjF5MikgLVxuICAgICAgICAgICAgYzIxLnkqKDIqYzIxLnkqYzIzLnkgKyBjMjJ5MikgLSBjMjIueSooMipjMjAueSpjMjMueSArIDIqYzIxLnkqYzIyLnkpKSxcbiAgICAgICAgYzExLngqYzIxLngqYzEyLnkqYzEzLngqYzEzLnkqYzIzLnkgKyBjMTEueCpjMTIueSpjMTMueCpjMjEueSpjMTMueSpjMjMueCArIGMxMS54KmMxMi55KmMxMy54KmMyMi54KmMxMy55KmMyMi55IC1cbiAgICAgICAgICAgIGMxMS55KmMxMi54KmMyMS54KmMxMy54KmMxMy55KmMyMy55IC0gYzExLnkqYzEyLngqYzEzLngqYzIxLnkqYzEzLnkqYzIzLnggLSBjMTEueSpjMTIueCpjMTMueCpjMjIueCpjMTMueSpjMjIueSAtXG4gICAgICAgICAgICA2KmMxMS55KmMyMS54KmMxMi55KmMxMy54KmMxMy55KmMyMy54IC0gNipjMTAueCpjMjEueCpjMTN5MypjMjMueCArIDYqYzIwLngqYzIxLngqYzEzeTMqYzIzLnggK1xuICAgICAgICAgICAgMipjMjEueCpjMTJ5MypjMTMueCpjMjMueCArIDYqYzEwLngqYzIxLngqYzEzLngqYzEzeTIqYzIzLnkgKyA2KmMxMC54KmMxMy54KmMyMS55KmMxM3kyKmMyMy54ICtcbiAgICAgICAgICAgIDYqYzEwLngqYzEzLngqYzIyLngqYzEzeTIqYzIyLnkgKyA2KmMxMC55KmMyMS54KmMxMy54KmMxM3kyKmMyMy54IC0gMypjMTEueCpjMTIueCpjMjEueCpjMTN5MipjMjMueSAtXG4gICAgICAgICAgICAzKmMxMS54KmMxMi54KmMyMS55KmMxM3kyKmMyMy54IC0gMypjMTEueCpjMTIueCpjMjIueCpjMTN5MipjMjIueSArIDIqYzExLngqYzIxLngqYzEyLnkqYzEzeTIqYzIzLnggK1xuICAgICAgICAgICAgNCpjMTEueSpjMTIueCpjMjEueCpjMTN5MipjMjMueCAtIDYqYzEwLnkqYzIxLngqYzEzeDIqYzEzLnkqYzIzLnkgLSA2KmMxMC55KmMxM3gyKmMyMS55KmMxMy55KmMyMy54IC1cbiAgICAgICAgICAgIDYqYzEwLnkqYzEzeDIqYzIyLngqYzEzLnkqYzIyLnkgLSA2KmMyMC54KmMyMS54KmMxMy54KmMxM3kyKmMyMy55IC0gNipjMjAueCpjMTMueCpjMjEueSpjMTN5MipjMjMueCAtXG4gICAgICAgICAgICA2KmMyMC54KmMxMy54KmMyMi54KmMxM3kyKmMyMi55ICsgMypjMTEueSpjMjEueCpjMTIueSpjMTN4MipjMjMueSAtIDMqYzExLnkqYzEyLnkqYzEzLngqYzIyeDIqYzEzLnkgK1xuICAgICAgICAgICAgMypjMTEueSpjMTIueSpjMTN4MipjMjEueSpjMjMueCArIDMqYzExLnkqYzEyLnkqYzEzeDIqYzIyLngqYzIyLnkgLSAyKmMxMi54KmMyMS54KmMxMnkyKmMxMy54KmMyMy55IC1cbiAgICAgICAgICAgIDIqYzEyLngqYzIxLngqYzEyeTIqYzEzLnkqYzIzLnggLSAyKmMxMi54KmMxMnkyKmMxMy54KmMyMS55KmMyMy54IC0gMipjMTIueCpjMTJ5MipjMTMueCpjMjIueCpjMjIueSAtXG4gICAgICAgICAgICA2KmMyMC55KmMyMS54KmMxMy54KmMxM3kyKmMyMy54IC0gNipjMjEueCpjMTMueCpjMjEueSpjMjIueCpjMTN5MiArIDYqYzIwLnkqYzEzeDIqYzIxLnkqYzEzLnkqYzIzLnggK1xuICAgICAgICAgICAgMipjMTJ4MipjMjEueCpjMTIueSpjMTMueSpjMjMueSArIDIqYzEyeDIqYzEyLnkqYzIxLnkqYzEzLnkqYzIzLnggKyAyKmMxMngyKmMxMi55KmMyMi54KmMxMy55KmMyMi55IC1cbiAgICAgICAgICAgIDMqYzEwLngqYzIyeDIqYzEzeTMgKyAzKmMyMC54KmMyMngyKmMxM3kzICsgMypjMjF4MipjMjIueCpjMTN5MyArIGMxMnkzKmMxMy54KmMyMngyICtcbiAgICAgICAgICAgIDMqYzEwLnkqYzEzLngqYzIyeDIqYzEzeTIgKyBjMTEueCpjMTIueSpjMjJ4MipjMTN5MiArIDIqYzExLnkqYzEyLngqYzIyeDIqYzEzeTIgLVxuICAgICAgICAgICAgYzEyLngqYzEyeTIqYzIyeDIqYzEzLnkgLSAzKmMyMC55KmMxMy54KmMyMngyKmMxM3kyIC0gMypjMjF4MipjMTMueCpjMTN5MipjMjIueSArXG4gICAgICAgICAgICBjMTJ4MipjMTIueSpjMTMueCooMipjMjEueSpjMjMueSArIGMyMnkyKSArIGMxMS54KmMxMi54KmMxMy54KmMxMy55Kig2KmMyMS55KmMyMy55ICsgMypjMjJ5MikgK1xuICAgICAgICAgICAgYzIxLngqYzEzeDIqYzEzLnkqKDYqYzIwLnkqYzIzLnkgKyA2KmMyMS55KmMyMi55KSArIGMxMngzKmMxMy55KigtMipjMjEueSpjMjMueSAtIGMyMnkyKSArXG4gICAgICAgICAgICBjMTAueSpjMTN4MyooNipjMjEueSpjMjMueSArIDMqYzIyeTIpICsgYzExLnkqYzEyLngqYzEzeDIqKC0yKmMyMS55KmMyMy55IC0gYzIyeTIpICtcbiAgICAgICAgICAgIGMxMS54KmMxMi55KmMxM3gyKigtNCpjMjEueSpjMjMueSAtIDIqYzIyeTIpICsgYzEwLngqYzEzeDIqYzEzLnkqKC02KmMyMS55KmMyMy55IC0gMypjMjJ5MikgK1xuICAgICAgICAgICAgYzEzeDIqYzIyLngqYzEzLnkqKDYqYzIwLnkqYzIyLnkgKyAzKmMyMXkyKSArIGMyMC54KmMxM3gyKmMxMy55Kig2KmMyMS55KmMyMy55ICsgMypjMjJ5MikgK1xuICAgICAgICAgICAgYzEzeDMqKC0yKmMyMC55KmMyMS55KmMyMy55IC0gYzIyLnkqKDIqYzIwLnkqYzIyLnkgKyBjMjF5MikgLSBjMjAueSooMipjMjEueSpjMjMueSArIGMyMnkyKSAtXG4gICAgICAgICAgICBjMjEueSooMipjMjAueSpjMjMueSArIDIqYzIxLnkqYzIyLnkpKSxcbiAgICAgICAgLWMxMC54KmMxMS54KmMxMi55KmMxMy54KmMxMy55KmMyMy55ICsgYzEwLngqYzExLnkqYzEyLngqYzEzLngqYzEzLnkqYzIzLnkgKyA2KmMxMC54KmMxMS55KmMxMi55KmMxMy54KmMxMy55KmMyMy54IC1cbiAgICAgICAgICAgIDYqYzEwLnkqYzExLngqYzEyLngqYzEzLngqYzEzLnkqYzIzLnkgLSBjMTAueSpjMTEueCpjMTIueSpjMTMueCpjMTMueSpjMjMueCArIGMxMC55KmMxMS55KmMxMi54KmMxMy54KmMxMy55KmMyMy54ICtcbiAgICAgICAgICAgIGMxMS54KmMxMS55KmMxMi54KmMxMi55KmMxMy54KmMyMy55IC0gYzExLngqYzExLnkqYzEyLngqYzEyLnkqYzEzLnkqYzIzLnggKyBjMTEueCpjMjAueCpjMTIueSpjMTMueCpjMTMueSpjMjMueSArXG4gICAgICAgICAgICBjMTEueCpjMjAueSpjMTIueSpjMTMueCpjMTMueSpjMjMueCArIGMxMS54KmMyMS54KmMxMi55KmMxMy54KmMxMy55KmMyMi55ICsgYzExLngqYzEyLnkqYzEzLngqYzIxLnkqYzIyLngqYzEzLnkgLVxuICAgICAgICAgICAgYzIwLngqYzExLnkqYzEyLngqYzEzLngqYzEzLnkqYzIzLnkgLSA2KmMyMC54KmMxMS55KmMxMi55KmMxMy54KmMxMy55KmMyMy54IC0gYzExLnkqYzEyLngqYzIwLnkqYzEzLngqYzEzLnkqYzIzLnggLVxuICAgICAgICAgICAgYzExLnkqYzEyLngqYzIxLngqYzEzLngqYzEzLnkqYzIyLnkgLSBjMTEueSpjMTIueCpjMTMueCpjMjEueSpjMjIueCpjMTMueSAtIDYqYzExLnkqYzIxLngqYzEyLnkqYzEzLngqYzIyLngqYzEzLnkgLVxuICAgICAgICAgICAgNipjMTAueCpjMjAueCpjMTN5MypjMjMueCAtIDYqYzEwLngqYzIxLngqYzIyLngqYzEzeTMgLSAyKmMxMC54KmMxMnkzKmMxMy54KmMyMy54ICsgNipjMjAueCpjMjEueCpjMjIueCpjMTN5MyArXG4gICAgICAgICAgICAyKmMyMC54KmMxMnkzKmMxMy54KmMyMy54ICsgMipjMjEueCpjMTJ5MypjMTMueCpjMjIueCArIDIqYzEwLnkqYzEyeDMqYzEzLnkqYzIzLnkgLSA2KmMxMC54KmMxMC55KmMxMy54KmMxM3kyKmMyMy54ICtcbiAgICAgICAgICAgIDMqYzEwLngqYzExLngqYzEyLngqYzEzeTIqYzIzLnkgLSAyKmMxMC54KmMxMS54KmMxMi55KmMxM3kyKmMyMy54IC0gNCpjMTAueCpjMTEueSpjMTIueCpjMTN5MipjMjMueCArXG4gICAgICAgICAgICAzKmMxMC55KmMxMS54KmMxMi54KmMxM3kyKmMyMy54ICsgNipjMTAueCpjMTAueSpjMTN4MipjMTMueSpjMjMueSArIDYqYzEwLngqYzIwLngqYzEzLngqYzEzeTIqYzIzLnkgLVxuICAgICAgICAgICAgMypjMTAueCpjMTEueSpjMTIueSpjMTN4MipjMjMueSArIDIqYzEwLngqYzEyLngqYzEyeTIqYzEzLngqYzIzLnkgKyAyKmMxMC54KmMxMi54KmMxMnkyKmMxMy55KmMyMy54ICtcbiAgICAgICAgICAgIDYqYzEwLngqYzIwLnkqYzEzLngqYzEzeTIqYzIzLnggKyA2KmMxMC54KmMyMS54KmMxMy54KmMxM3kyKmMyMi55ICsgNipjMTAueCpjMTMueCpjMjEueSpjMjIueCpjMTN5MiArXG4gICAgICAgICAgICA0KmMxMC55KmMxMS54KmMxMi55KmMxM3gyKmMyMy55ICsgNipjMTAueSpjMjAueCpjMTMueCpjMTN5MipjMjMueCArIDIqYzEwLnkqYzExLnkqYzEyLngqYzEzeDIqYzIzLnkgLVxuICAgICAgICAgICAgMypjMTAueSpjMTEueSpjMTIueSpjMTN4MipjMjMueCArIDIqYzEwLnkqYzEyLngqYzEyeTIqYzEzLngqYzIzLnggKyA2KmMxMC55KmMyMS54KmMxMy54KmMyMi54KmMxM3kyIC1cbiAgICAgICAgICAgIDMqYzExLngqYzIwLngqYzEyLngqYzEzeTIqYzIzLnkgKyAyKmMxMS54KmMyMC54KmMxMi55KmMxM3kyKmMyMy54ICsgYzExLngqYzExLnkqYzEyeTIqYzEzLngqYzIzLnggLVxuICAgICAgICAgICAgMypjMTEueCpjMTIueCpjMjAueSpjMTN5MipjMjMueCAtIDMqYzExLngqYzEyLngqYzIxLngqYzEzeTIqYzIyLnkgLSAzKmMxMS54KmMxMi54KmMyMS55KmMyMi54KmMxM3kyICtcbiAgICAgICAgICAgIDIqYzExLngqYzIxLngqYzEyLnkqYzIyLngqYzEzeTIgKyA0KmMyMC54KmMxMS55KmMxMi54KmMxM3kyKmMyMy54ICsgNCpjMTEueSpjMTIueCpjMjEueCpjMjIueCpjMTN5MiAtXG4gICAgICAgICAgICAyKmMxMC54KmMxMngyKmMxMi55KmMxMy55KmMyMy55IC0gNipjMTAueSpjMjAueCpjMTN4MipjMTMueSpjMjMueSAtIDYqYzEwLnkqYzIwLnkqYzEzeDIqYzEzLnkqYzIzLnggLVxuICAgICAgICAgICAgNipjMTAueSpjMjEueCpjMTN4MipjMTMueSpjMjIueSAtIDIqYzEwLnkqYzEyeDIqYzEyLnkqYzEzLngqYzIzLnkgLSAyKmMxMC55KmMxMngyKmMxMi55KmMxMy55KmMyMy54IC1cbiAgICAgICAgICAgIDYqYzEwLnkqYzEzeDIqYzIxLnkqYzIyLngqYzEzLnkgLSBjMTEueCpjMTEueSpjMTJ4MipjMTMueSpjMjMueSAtIDIqYzExLngqYzExeTIqYzEzLngqYzEzLnkqYzIzLnggK1xuICAgICAgICAgICAgMypjMjAueCpjMTEueSpjMTIueSpjMTN4MipjMjMueSAtIDIqYzIwLngqYzEyLngqYzEyeTIqYzEzLngqYzIzLnkgLSAyKmMyMC54KmMxMi54KmMxMnkyKmMxMy55KmMyMy54IC1cbiAgICAgICAgICAgIDYqYzIwLngqYzIwLnkqYzEzLngqYzEzeTIqYzIzLnggLSA2KmMyMC54KmMyMS54KmMxMy54KmMxM3kyKmMyMi55IC0gNipjMjAueCpjMTMueCpjMjEueSpjMjIueCpjMTN5MiArXG4gICAgICAgICAgICAzKmMxMS55KmMyMC55KmMxMi55KmMxM3gyKmMyMy54ICsgMypjMTEueSpjMjEueCpjMTIueSpjMTN4MipjMjIueSArIDMqYzExLnkqYzEyLnkqYzEzeDIqYzIxLnkqYzIyLnggLVxuICAgICAgICAgICAgMipjMTIueCpjMjAueSpjMTJ5MipjMTMueCpjMjMueCAtIDIqYzEyLngqYzIxLngqYzEyeTIqYzEzLngqYzIyLnkgLSAyKmMxMi54KmMyMS54KmMxMnkyKmMyMi54KmMxMy55IC1cbiAgICAgICAgICAgIDIqYzEyLngqYzEyeTIqYzEzLngqYzIxLnkqYzIyLnggLSA2KmMyMC55KmMyMS54KmMxMy54KmMyMi54KmMxM3kyIC0gYzExeTIqYzEyLngqYzEyLnkqYzEzLngqYzIzLnggK1xuICAgICAgICAgICAgMipjMjAueCpjMTJ4MipjMTIueSpjMTMueSpjMjMueSArIDYqYzIwLnkqYzEzeDIqYzIxLnkqYzIyLngqYzEzLnkgKyAyKmMxMXgyKmMxMS55KmMxMy54KmMxMy55KmMyMy55ICtcbiAgICAgICAgICAgIGMxMXgyKmMxMi54KmMxMi55KmMxMy55KmMyMy55ICsgMipjMTJ4MipjMjAueSpjMTIueSpjMTMueSpjMjMueCArIDIqYzEyeDIqYzIxLngqYzEyLnkqYzEzLnkqYzIyLnkgK1xuICAgICAgICAgICAgMipjMTJ4MipjMTIueSpjMjEueSpjMjIueCpjMTMueSArIGMyMXgzKmMxM3kzICsgMypjMTB4MipjMTN5MypjMjMueCAtIDMqYzEweTIqYzEzeDMqYzIzLnkgK1xuICAgICAgICAgICAgMypjMjB4MipjMTN5MypjMjMueCArIGMxMXkzKmMxM3gyKmMyMy54IC0gYzExeDMqYzEzeTIqYzIzLnkgLSBjMTEueCpjMTF5MipjMTN4MipjMjMueSArXG4gICAgICAgICAgICBjMTF4MipjMTEueSpjMTN5MipjMjMueCAtIDMqYzEweDIqYzEzLngqYzEzeTIqYzIzLnkgKyAzKmMxMHkyKmMxM3gyKmMxMy55KmMyMy54IC0gYzExeDIqYzEyeTIqYzEzLngqYzIzLnkgK1xuICAgICAgICAgICAgYzExeTIqYzEyeDIqYzEzLnkqYzIzLnggLSAzKmMyMXgyKmMxMy54KmMyMS55KmMxM3kyIC0gMypjMjB4MipjMTMueCpjMTN5MipjMjMueSArIDMqYzIweTIqYzEzeDIqYzEzLnkqYzIzLnggK1xuICAgICAgICAgICAgYzExLngqYzEyLngqYzEzLngqYzEzLnkqKDYqYzIwLnkqYzIzLnkgKyA2KmMyMS55KmMyMi55KSArIGMxMngzKmMxMy55KigtMipjMjAueSpjMjMueSAtIDIqYzIxLnkqYzIyLnkpICtcbiAgICAgICAgICAgIGMxMC55KmMxM3gzKig2KmMyMC55KmMyMy55ICsgNipjMjEueSpjMjIueSkgKyBjMTEueSpjMTIueCpjMTN4MiooLTIqYzIwLnkqYzIzLnkgLSAyKmMyMS55KmMyMi55KSArXG4gICAgICAgICAgICBjMTJ4MipjMTIueSpjMTMueCooMipjMjAueSpjMjMueSArIDIqYzIxLnkqYzIyLnkpICsgYzExLngqYzEyLnkqYzEzeDIqKC00KmMyMC55KmMyMy55IC0gNCpjMjEueSpjMjIueSkgK1xuICAgICAgICAgICAgYzEwLngqYzEzeDIqYzEzLnkqKC02KmMyMC55KmMyMy55IC0gNipjMjEueSpjMjIueSkgKyBjMjAueCpjMTN4MipjMTMueSooNipjMjAueSpjMjMueSArIDYqYzIxLnkqYzIyLnkpICtcbiAgICAgICAgICAgIGMyMS54KmMxM3gyKmMxMy55Kig2KmMyMC55KmMyMi55ICsgMypjMjF5MikgKyBjMTN4MyooLTIqYzIwLnkqYzIxLnkqYzIyLnkgLSBjMjB5MipjMjMueSAtXG4gICAgICAgICAgICBjMjEueSooMipjMjAueSpjMjIueSArIGMyMXkyKSAtIGMyMC55KigyKmMyMC55KmMyMy55ICsgMipjMjEueSpjMjIueSkpLFxuICAgICAgICAtYzEwLngqYzExLngqYzEyLnkqYzEzLngqYzEzLnkqYzIyLnkgKyBjMTAueCpjMTEueSpjMTIueCpjMTMueCpjMTMueSpjMjIueSArIDYqYzEwLngqYzExLnkqYzEyLnkqYzEzLngqYzIyLngqYzEzLnkgLVxuICAgICAgICAgICAgNipjMTAueSpjMTEueCpjMTIueCpjMTMueCpjMTMueSpjMjIueSAtIGMxMC55KmMxMS54KmMxMi55KmMxMy54KmMyMi54KmMxMy55ICsgYzEwLnkqYzExLnkqYzEyLngqYzEzLngqYzIyLngqYzEzLnkgK1xuICAgICAgICAgICAgYzExLngqYzExLnkqYzEyLngqYzEyLnkqYzEzLngqYzIyLnkgLSBjMTEueCpjMTEueSpjMTIueCpjMTIueSpjMjIueCpjMTMueSArIGMxMS54KmMyMC54KmMxMi55KmMxMy54KmMxMy55KmMyMi55ICtcbiAgICAgICAgICAgIGMxMS54KmMyMC55KmMxMi55KmMxMy54KmMyMi54KmMxMy55ICsgYzExLngqYzIxLngqYzEyLnkqYzEzLngqYzIxLnkqYzEzLnkgLSBjMjAueCpjMTEueSpjMTIueCpjMTMueCpjMTMueSpjMjIueSAtXG4gICAgICAgICAgICA2KmMyMC54KmMxMS55KmMxMi55KmMxMy54KmMyMi54KmMxMy55IC0gYzExLnkqYzEyLngqYzIwLnkqYzEzLngqYzIyLngqYzEzLnkgLSBjMTEueSpjMTIueCpjMjEueCpjMTMueCpjMjEueSpjMTMueSAtXG4gICAgICAgICAgICA2KmMxMC54KmMyMC54KmMyMi54KmMxM3kzIC0gMipjMTAueCpjMTJ5MypjMTMueCpjMjIueCArIDIqYzIwLngqYzEyeTMqYzEzLngqYzIyLnggKyAyKmMxMC55KmMxMngzKmMxMy55KmMyMi55IC1cbiAgICAgICAgICAgIDYqYzEwLngqYzEwLnkqYzEzLngqYzIyLngqYzEzeTIgKyAzKmMxMC54KmMxMS54KmMxMi54KmMxM3kyKmMyMi55IC0gMipjMTAueCpjMTEueCpjMTIueSpjMjIueCpjMTN5MiAtXG4gICAgICAgICAgICA0KmMxMC54KmMxMS55KmMxMi54KmMyMi54KmMxM3kyICsgMypjMTAueSpjMTEueCpjMTIueCpjMjIueCpjMTN5MiArIDYqYzEwLngqYzEwLnkqYzEzeDIqYzEzLnkqYzIyLnkgK1xuICAgICAgICAgICAgNipjMTAueCpjMjAueCpjMTMueCpjMTN5MipjMjIueSAtIDMqYzEwLngqYzExLnkqYzEyLnkqYzEzeDIqYzIyLnkgKyAyKmMxMC54KmMxMi54KmMxMnkyKmMxMy54KmMyMi55ICtcbiAgICAgICAgICAgIDIqYzEwLngqYzEyLngqYzEyeTIqYzIyLngqYzEzLnkgKyA2KmMxMC54KmMyMC55KmMxMy54KmMyMi54KmMxM3kyICsgNipjMTAueCpjMjEueCpjMTMueCpjMjEueSpjMTN5MiArXG4gICAgICAgICAgICA0KmMxMC55KmMxMS54KmMxMi55KmMxM3gyKmMyMi55ICsgNipjMTAueSpjMjAueCpjMTMueCpjMjIueCpjMTN5MiArIDIqYzEwLnkqYzExLnkqYzEyLngqYzEzeDIqYzIyLnkgLVxuICAgICAgICAgICAgMypjMTAueSpjMTEueSpjMTIueSpjMTN4MipjMjIueCArIDIqYzEwLnkqYzEyLngqYzEyeTIqYzEzLngqYzIyLnggLSAzKmMxMS54KmMyMC54KmMxMi54KmMxM3kyKmMyMi55ICtcbiAgICAgICAgICAgIDIqYzExLngqYzIwLngqYzEyLnkqYzIyLngqYzEzeTIgKyBjMTEueCpjMTEueSpjMTJ5MipjMTMueCpjMjIueCAtIDMqYzExLngqYzEyLngqYzIwLnkqYzIyLngqYzEzeTIgLVxuICAgICAgICAgICAgMypjMTEueCpjMTIueCpjMjEueCpjMjEueSpjMTN5MiArIDQqYzIwLngqYzExLnkqYzEyLngqYzIyLngqYzEzeTIgLSAyKmMxMC54KmMxMngyKmMxMi55KmMxMy55KmMyMi55IC1cbiAgICAgICAgICAgIDYqYzEwLnkqYzIwLngqYzEzeDIqYzEzLnkqYzIyLnkgLSA2KmMxMC55KmMyMC55KmMxM3gyKmMyMi54KmMxMy55IC0gNipjMTAueSpjMjEueCpjMTN4MipjMjEueSpjMTMueSAtXG4gICAgICAgICAgICAyKmMxMC55KmMxMngyKmMxMi55KmMxMy54KmMyMi55IC0gMipjMTAueSpjMTJ4MipjMTIueSpjMjIueCpjMTMueSAtIGMxMS54KmMxMS55KmMxMngyKmMxMy55KmMyMi55IC1cbiAgICAgICAgICAgIDIqYzExLngqYzExeTIqYzEzLngqYzIyLngqYzEzLnkgKyAzKmMyMC54KmMxMS55KmMxMi55KmMxM3gyKmMyMi55IC0gMipjMjAueCpjMTIueCpjMTJ5MipjMTMueCpjMjIueSAtXG4gICAgICAgICAgICAyKmMyMC54KmMxMi54KmMxMnkyKmMyMi54KmMxMy55IC0gNipjMjAueCpjMjAueSpjMTMueCpjMjIueCpjMTN5MiAtIDYqYzIwLngqYzIxLngqYzEzLngqYzIxLnkqYzEzeTIgK1xuICAgICAgICAgICAgMypjMTEueSpjMjAueSpjMTIueSpjMTN4MipjMjIueCArIDMqYzExLnkqYzIxLngqYzEyLnkqYzEzeDIqYzIxLnkgLSAyKmMxMi54KmMyMC55KmMxMnkyKmMxMy54KmMyMi54IC1cbiAgICAgICAgICAgIDIqYzEyLngqYzIxLngqYzEyeTIqYzEzLngqYzIxLnkgLSBjMTF5MipjMTIueCpjMTIueSpjMTMueCpjMjIueCArIDIqYzIwLngqYzEyeDIqYzEyLnkqYzEzLnkqYzIyLnkgLVxuICAgICAgICAgICAgMypjMTEueSpjMjF4MipjMTIueSpjMTMueCpjMTMueSArIDYqYzIwLnkqYzIxLngqYzEzeDIqYzIxLnkqYzEzLnkgKyAyKmMxMXgyKmMxMS55KmMxMy54KmMxMy55KmMyMi55ICtcbiAgICAgICAgICAgIGMxMXgyKmMxMi54KmMxMi55KmMxMy55KmMyMi55ICsgMipjMTJ4MipjMjAueSpjMTIueSpjMjIueCpjMTMueSArIDIqYzEyeDIqYzIxLngqYzEyLnkqYzIxLnkqYzEzLnkgLVxuICAgICAgICAgICAgMypjMTAueCpjMjF4MipjMTN5MyArIDMqYzIwLngqYzIxeDIqYzEzeTMgKyAzKmMxMHgyKmMyMi54KmMxM3kzIC0gMypjMTB5MipjMTN4MypjMjIueSArIDMqYzIweDIqYzIyLngqYzEzeTMgK1xuICAgICAgICAgICAgYzIxeDIqYzEyeTMqYzEzLnggKyBjMTF5MypjMTN4MipjMjIueCAtIGMxMXgzKmMxM3kyKmMyMi55ICsgMypjMTAueSpjMjF4MipjMTMueCpjMTN5MiAtXG4gICAgICAgICAgICBjMTEueCpjMTF5MipjMTN4MipjMjIueSArIGMxMS54KmMyMXgyKmMxMi55KmMxM3kyICsgMipjMTEueSpjMTIueCpjMjF4MipjMTN5MiArIGMxMXgyKmMxMS55KmMyMi54KmMxM3kyIC1cbiAgICAgICAgICAgIGMxMi54KmMyMXgyKmMxMnkyKmMxMy55IC0gMypjMjAueSpjMjF4MipjMTMueCpjMTN5MiAtIDMqYzEweDIqYzEzLngqYzEzeTIqYzIyLnkgKyAzKmMxMHkyKmMxM3gyKmMyMi54KmMxMy55IC1cbiAgICAgICAgICAgIGMxMXgyKmMxMnkyKmMxMy54KmMyMi55ICsgYzExeTIqYzEyeDIqYzIyLngqYzEzLnkgLSAzKmMyMHgyKmMxMy54KmMxM3kyKmMyMi55ICsgMypjMjB5MipjMTN4MipjMjIueCpjMTMueSArXG4gICAgICAgICAgICBjMTJ4MipjMTIueSpjMTMueCooMipjMjAueSpjMjIueSArIGMyMXkyKSArIGMxMS54KmMxMi54KmMxMy54KmMxMy55Kig2KmMyMC55KmMyMi55ICsgMypjMjF5MikgK1xuICAgICAgICAgICAgYzEyeDMqYzEzLnkqKC0yKmMyMC55KmMyMi55IC0gYzIxeTIpICsgYzEwLnkqYzEzeDMqKDYqYzIwLnkqYzIyLnkgKyAzKmMyMXkyKSArXG4gICAgICAgICAgICBjMTEueSpjMTIueCpjMTN4MiooLTIqYzIwLnkqYzIyLnkgLSBjMjF5MikgKyBjMTEueCpjMTIueSpjMTN4MiooLTQqYzIwLnkqYzIyLnkgLSAyKmMyMXkyKSArXG4gICAgICAgICAgICBjMTAueCpjMTN4MipjMTMueSooLTYqYzIwLnkqYzIyLnkgLSAzKmMyMXkyKSArIGMyMC54KmMxM3gyKmMxMy55Kig2KmMyMC55KmMyMi55ICsgMypjMjF5MikgK1xuICAgICAgICAgICAgYzEzeDMqKC0yKmMyMC55KmMyMXkyIC0gYzIweTIqYzIyLnkgLSBjMjAueSooMipjMjAueSpjMjIueSArIGMyMXkyKSksXG4gICAgICAgIC1jMTAueCpjMTEueCpjMTIueSpjMTMueCpjMjEueSpjMTMueSArIGMxMC54KmMxMS55KmMxMi54KmMxMy54KmMyMS55KmMxMy55ICsgNipjMTAueCpjMTEueSpjMjEueCpjMTIueSpjMTMueCpjMTMueSAtXG4gICAgICAgICAgICA2KmMxMC55KmMxMS54KmMxMi54KmMxMy54KmMyMS55KmMxMy55IC0gYzEwLnkqYzExLngqYzIxLngqYzEyLnkqYzEzLngqYzEzLnkgKyBjMTAueSpjMTEueSpjMTIueCpjMjEueCpjMTMueCpjMTMueSAtXG4gICAgICAgICAgICBjMTEueCpjMTEueSpjMTIueCpjMjEueCpjMTIueSpjMTMueSArIGMxMS54KmMxMS55KmMxMi54KmMxMi55KmMxMy54KmMyMS55ICsgYzExLngqYzIwLngqYzEyLnkqYzEzLngqYzIxLnkqYzEzLnkgK1xuICAgICAgICAgICAgNipjMTEueCpjMTIueCpjMjAueSpjMTMueCpjMjEueSpjMTMueSArIGMxMS54KmMyMC55KmMyMS54KmMxMi55KmMxMy54KmMxMy55IC0gYzIwLngqYzExLnkqYzEyLngqYzEzLngqYzIxLnkqYzEzLnkgLVxuICAgICAgICAgICAgNipjMjAueCpjMTEueSpjMjEueCpjMTIueSpjMTMueCpjMTMueSAtIGMxMS55KmMxMi54KmMyMC55KmMyMS54KmMxMy54KmMxMy55IC0gNipjMTAueCpjMjAueCpjMjEueCpjMTN5MyAtXG4gICAgICAgICAgICAyKmMxMC54KmMyMS54KmMxMnkzKmMxMy54ICsgNipjMTAueSpjMjAueSpjMTN4MypjMjEueSArIDIqYzIwLngqYzIxLngqYzEyeTMqYzEzLnggKyAyKmMxMC55KmMxMngzKmMyMS55KmMxMy55IC1cbiAgICAgICAgICAgIDIqYzEyeDMqYzIwLnkqYzIxLnkqYzEzLnkgLSA2KmMxMC54KmMxMC55KmMyMS54KmMxMy54KmMxM3kyICsgMypjMTAueCpjMTEueCpjMTIueCpjMjEueSpjMTN5MiAtXG4gICAgICAgICAgICAyKmMxMC54KmMxMS54KmMyMS54KmMxMi55KmMxM3kyIC0gNCpjMTAueCpjMTEueSpjMTIueCpjMjEueCpjMTN5MiArIDMqYzEwLnkqYzExLngqYzEyLngqYzIxLngqYzEzeTIgK1xuICAgICAgICAgICAgNipjMTAueCpjMTAueSpjMTN4MipjMjEueSpjMTMueSArIDYqYzEwLngqYzIwLngqYzEzLngqYzIxLnkqYzEzeTIgLSAzKmMxMC54KmMxMS55KmMxMi55KmMxM3gyKmMyMS55ICtcbiAgICAgICAgICAgIDIqYzEwLngqYzEyLngqYzIxLngqYzEyeTIqYzEzLnkgKyAyKmMxMC54KmMxMi54KmMxMnkyKmMxMy54KmMyMS55ICsgNipjMTAueCpjMjAueSpjMjEueCpjMTMueCpjMTN5MiArXG4gICAgICAgICAgICA0KmMxMC55KmMxMS54KmMxMi55KmMxM3gyKmMyMS55ICsgNipjMTAueSpjMjAueCpjMjEueCpjMTMueCpjMTN5MiArIDIqYzEwLnkqYzExLnkqYzEyLngqYzEzeDIqYzIxLnkgLVxuICAgICAgICAgICAgMypjMTAueSpjMTEueSpjMjEueCpjMTIueSpjMTN4MiArIDIqYzEwLnkqYzEyLngqYzIxLngqYzEyeTIqYzEzLnggLSAzKmMxMS54KmMyMC54KmMxMi54KmMyMS55KmMxM3kyICtcbiAgICAgICAgICAgIDIqYzExLngqYzIwLngqYzIxLngqYzEyLnkqYzEzeTIgKyBjMTEueCpjMTEueSpjMjEueCpjMTJ5MipjMTMueCAtIDMqYzExLngqYzEyLngqYzIwLnkqYzIxLngqYzEzeTIgK1xuICAgICAgICAgICAgNCpjMjAueCpjMTEueSpjMTIueCpjMjEueCpjMTN5MiAtIDYqYzEwLngqYzIwLnkqYzEzeDIqYzIxLnkqYzEzLnkgLSAyKmMxMC54KmMxMngyKmMxMi55KmMyMS55KmMxMy55IC1cbiAgICAgICAgICAgIDYqYzEwLnkqYzIwLngqYzEzeDIqYzIxLnkqYzEzLnkgLSA2KmMxMC55KmMyMC55KmMyMS54KmMxM3gyKmMxMy55IC0gMipjMTAueSpjMTJ4MipjMjEueCpjMTIueSpjMTMueSAtXG4gICAgICAgICAgICAyKmMxMC55KmMxMngyKmMxMi55KmMxMy54KmMyMS55IC0gYzExLngqYzExLnkqYzEyeDIqYzIxLnkqYzEzLnkgLSA0KmMxMS54KmMyMC55KmMxMi55KmMxM3gyKmMyMS55IC1cbiAgICAgICAgICAgIDIqYzExLngqYzExeTIqYzIxLngqYzEzLngqYzEzLnkgKyAzKmMyMC54KmMxMS55KmMxMi55KmMxM3gyKmMyMS55IC0gMipjMjAueCpjMTIueCpjMjEueCpjMTJ5MipjMTMueSAtXG4gICAgICAgICAgICAyKmMyMC54KmMxMi54KmMxMnkyKmMxMy54KmMyMS55IC0gNipjMjAueCpjMjAueSpjMjEueCpjMTMueCpjMTN5MiAtIDIqYzExLnkqYzEyLngqYzIwLnkqYzEzeDIqYzIxLnkgK1xuICAgICAgICAgICAgMypjMTEueSpjMjAueSpjMjEueCpjMTIueSpjMTN4MiAtIDIqYzEyLngqYzIwLnkqYzIxLngqYzEyeTIqYzEzLnggLSBjMTF5MipjMTIueCpjMjEueCpjMTIueSpjMTMueCArXG4gICAgICAgICAgICA2KmMyMC54KmMyMC55KmMxM3gyKmMyMS55KmMxMy55ICsgMipjMjAueCpjMTJ4MipjMTIueSpjMjEueSpjMTMueSArIDIqYzExeDIqYzExLnkqYzEzLngqYzIxLnkqYzEzLnkgK1xuICAgICAgICAgICAgYzExeDIqYzEyLngqYzEyLnkqYzIxLnkqYzEzLnkgKyAyKmMxMngyKmMyMC55KmMyMS54KmMxMi55KmMxMy55ICsgMipjMTJ4MipjMjAueSpjMTIueSpjMTMueCpjMjEueSArXG4gICAgICAgICAgICAzKmMxMHgyKmMyMS54KmMxM3kzIC0gMypjMTB5MipjMTN4MypjMjEueSArIDMqYzIweDIqYzIxLngqYzEzeTMgKyBjMTF5MypjMjEueCpjMTN4MiAtIGMxMXgzKmMyMS55KmMxM3kyIC1cbiAgICAgICAgICAgIDMqYzIweTIqYzEzeDMqYzIxLnkgLSBjMTEueCpjMTF5MipjMTN4MipjMjEueSArIGMxMXgyKmMxMS55KmMyMS54KmMxM3kyIC0gMypjMTB4MipjMTMueCpjMjEueSpjMTN5MiArXG4gICAgICAgICAgICAzKmMxMHkyKmMyMS54KmMxM3gyKmMxMy55IC0gYzExeDIqYzEyeTIqYzEzLngqYzIxLnkgKyBjMTF5MipjMTJ4MipjMjEueCpjMTMueSAtIDMqYzIweDIqYzEzLngqYzIxLnkqYzEzeTIgK1xuICAgICAgICAgICAgMypjMjB5MipjMjEueCpjMTN4MipjMTMueSxcbiAgICAgICAgYzEwLngqYzEwLnkqYzExLngqYzEyLnkqYzEzLngqYzEzLnkgLSBjMTAueCpjMTAueSpjMTEueSpjMTIueCpjMTMueCpjMTMueSArIGMxMC54KmMxMS54KmMxMS55KmMxMi54KmMxMi55KmMxMy55IC1cbiAgICAgICAgICAgIGMxMC55KmMxMS54KmMxMS55KmMxMi54KmMxMi55KmMxMy54IC0gYzEwLngqYzExLngqYzIwLnkqYzEyLnkqYzEzLngqYzEzLnkgKyA2KmMxMC54KmMyMC54KmMxMS55KmMxMi55KmMxMy54KmMxMy55ICtcbiAgICAgICAgICAgIGMxMC54KmMxMS55KmMxMi54KmMyMC55KmMxMy54KmMxMy55IC0gYzEwLnkqYzExLngqYzIwLngqYzEyLnkqYzEzLngqYzEzLnkgLSA2KmMxMC55KmMxMS54KmMxMi54KmMyMC55KmMxMy54KmMxMy55ICtcbiAgICAgICAgICAgIGMxMC55KmMyMC54KmMxMS55KmMxMi54KmMxMy54KmMxMy55IC0gYzExLngqYzIwLngqYzExLnkqYzEyLngqYzEyLnkqYzEzLnkgKyBjMTEueCpjMTEueSpjMTIueCpjMjAueSpjMTIueSpjMTMueCArXG4gICAgICAgICAgICBjMTEueCpjMjAueCpjMjAueSpjMTIueSpjMTMueCpjMTMueSAtIGMyMC54KmMxMS55KmMxMi54KmMyMC55KmMxMy54KmMxMy55IC0gMipjMTAueCpjMjAueCpjMTJ5MypjMTMueCArXG4gICAgICAgICAgICAyKmMxMC55KmMxMngzKmMyMC55KmMxMy55IC0gMypjMTAueCpjMTAueSpjMTEueCpjMTIueCpjMTN5MiAtIDYqYzEwLngqYzEwLnkqYzIwLngqYzEzLngqYzEzeTIgK1xuICAgICAgICAgICAgMypjMTAueCpjMTAueSpjMTEueSpjMTIueSpjMTN4MiAtIDIqYzEwLngqYzEwLnkqYzEyLngqYzEyeTIqYzEzLnggLSAyKmMxMC54KmMxMS54KmMyMC54KmMxMi55KmMxM3kyIC1cbiAgICAgICAgICAgIGMxMC54KmMxMS54KmMxMS55KmMxMnkyKmMxMy54ICsgMypjMTAueCpjMTEueCpjMTIueCpjMjAueSpjMTN5MiAtIDQqYzEwLngqYzIwLngqYzExLnkqYzEyLngqYzEzeTIgK1xuICAgICAgICAgICAgMypjMTAueSpjMTEueCpjMjAueCpjMTIueCpjMTN5MiArIDYqYzEwLngqYzEwLnkqYzIwLnkqYzEzeDIqYzEzLnkgKyAyKmMxMC54KmMxMC55KmMxMngyKmMxMi55KmMxMy55ICtcbiAgICAgICAgICAgIDIqYzEwLngqYzExLngqYzExeTIqYzEzLngqYzEzLnkgKyAyKmMxMC54KmMyMC54KmMxMi54KmMxMnkyKmMxMy55ICsgNipjMTAueCpjMjAueCpjMjAueSpjMTMueCpjMTN5MiAtXG4gICAgICAgICAgICAzKmMxMC54KmMxMS55KmMyMC55KmMxMi55KmMxM3gyICsgMipjMTAueCpjMTIueCpjMjAueSpjMTJ5MipjMTMueCArIGMxMC54KmMxMXkyKmMxMi54KmMxMi55KmMxMy54ICtcbiAgICAgICAgICAgIGMxMC55KmMxMS54KmMxMS55KmMxMngyKmMxMy55ICsgNCpjMTAueSpjMTEueCpjMjAueSpjMTIueSpjMTN4MiAtIDMqYzEwLnkqYzIwLngqYzExLnkqYzEyLnkqYzEzeDIgK1xuICAgICAgICAgICAgMipjMTAueSpjMjAueCpjMTIueCpjMTJ5MipjMTMueCArIDIqYzEwLnkqYzExLnkqYzEyLngqYzIwLnkqYzEzeDIgKyBjMTEueCpjMjAueCpjMTEueSpjMTJ5MipjMTMueCAtXG4gICAgICAgICAgICAzKmMxMS54KmMyMC54KmMxMi54KmMyMC55KmMxM3kyIC0gMipjMTAueCpjMTJ4MipjMjAueSpjMTIueSpjMTMueSAtIDYqYzEwLnkqYzIwLngqYzIwLnkqYzEzeDIqYzEzLnkgLVxuICAgICAgICAgICAgMipjMTAueSpjMjAueCpjMTJ4MipjMTIueSpjMTMueSAtIDIqYzEwLnkqYzExeDIqYzExLnkqYzEzLngqYzEzLnkgLSBjMTAueSpjMTF4MipjMTIueCpjMTIueSpjMTMueSAtXG4gICAgICAgICAgICAyKmMxMC55KmMxMngyKmMyMC55KmMxMi55KmMxMy54IC0gMipjMTEueCpjMjAueCpjMTF5MipjMTMueCpjMTMueSAtIGMxMS54KmMxMS55KmMxMngyKmMyMC55KmMxMy55ICtcbiAgICAgICAgICAgIDMqYzIwLngqYzExLnkqYzIwLnkqYzEyLnkqYzEzeDIgLSAyKmMyMC54KmMxMi54KmMyMC55KmMxMnkyKmMxMy54IC0gYzIwLngqYzExeTIqYzEyLngqYzEyLnkqYzEzLnggK1xuICAgICAgICAgICAgMypjMTB5MipjMTEueCpjMTIueCpjMTMueCpjMTMueSArIDMqYzExLngqYzEyLngqYzIweTIqYzEzLngqYzEzLnkgKyAyKmMyMC54KmMxMngyKmMyMC55KmMxMi55KmMxMy55IC1cbiAgICAgICAgICAgIDMqYzEweDIqYzExLnkqYzEyLnkqYzEzLngqYzEzLnkgKyAyKmMxMXgyKmMxMS55KmMyMC55KmMxMy54KmMxMy55ICsgYzExeDIqYzEyLngqYzIwLnkqYzEyLnkqYzEzLnkgLVxuICAgICAgICAgICAgMypjMjB4MipjMTEueSpjMTIueSpjMTMueCpjMTMueSAtIGMxMHgzKmMxM3kzICsgYzEweTMqYzEzeDMgKyBjMjB4MypjMTN5MyAtIGMyMHkzKmMxM3gzIC1cbiAgICAgICAgICAgIDMqYzEwLngqYzIweDIqYzEzeTMgLSBjMTAueCpjMTF5MypjMTN4MiArIDMqYzEweDIqYzIwLngqYzEzeTMgKyBjMTAueSpjMTF4MypjMTN5MiArXG4gICAgICAgICAgICAzKmMxMC55KmMyMHkyKmMxM3gzICsgYzIwLngqYzExeTMqYzEzeDIgKyBjMTB4MipjMTJ5MypjMTMueCAtIDMqYzEweTIqYzIwLnkqYzEzeDMgLSBjMTB5MipjMTJ4MypjMTMueSArXG4gICAgICAgICAgICBjMjB4MipjMTJ5MypjMTMueCAtIGMxMXgzKmMyMC55KmMxM3kyIC0gYzEyeDMqYzIweTIqYzEzLnkgLSBjMTAueCpjMTF4MipjMTEueSpjMTN5MiArXG4gICAgICAgICAgICBjMTAueSpjMTEueCpjMTF5MipjMTN4MiAtIDMqYzEwLngqYzEweTIqYzEzeDIqYzEzLnkgLSBjMTAueCpjMTF5MipjMTJ4MipjMTMueSArIGMxMC55KmMxMXgyKmMxMnkyKmMxMy54IC1cbiAgICAgICAgICAgIGMxMS54KmMxMXkyKmMyMC55KmMxM3gyICsgMypjMTB4MipjMTAueSpjMTMueCpjMTN5MiArIGMxMHgyKmMxMS54KmMxMi55KmMxM3kyICtcbiAgICAgICAgICAgIDIqYzEweDIqYzExLnkqYzEyLngqYzEzeTIgLSAyKmMxMHkyKmMxMS54KmMxMi55KmMxM3gyIC0gYzEweTIqYzExLnkqYzEyLngqYzEzeDIgKyBjMTF4MipjMjAueCpjMTEueSpjMTN5MiAtXG4gICAgICAgICAgICAzKmMxMC54KmMyMHkyKmMxM3gyKmMxMy55ICsgMypjMTAueSpjMjB4MipjMTMueCpjMTN5MiArIGMxMS54KmMyMHgyKmMxMi55KmMxM3kyIC0gMipjMTEueCpjMjB5MipjMTIueSpjMTN4MiArXG4gICAgICAgICAgICBjMjAueCpjMTF5MipjMTJ4MipjMTMueSAtIGMxMS55KmMxMi54KmMyMHkyKmMxM3gyIC0gYzEweDIqYzEyLngqYzEyeTIqYzEzLnkgLSAzKmMxMHgyKmMyMC55KmMxMy54KmMxM3kyICtcbiAgICAgICAgICAgIDMqYzEweTIqYzIwLngqYzEzeDIqYzEzLnkgKyBjMTB5MipjMTJ4MipjMTIueSpjMTMueCAtIGMxMXgyKmMyMC55KmMxMnkyKmMxMy54ICsgMipjMjB4MipjMTEueSpjMTIueCpjMTN5MiArXG4gICAgICAgICAgICAzKmMyMC54KmMyMHkyKmMxM3gyKmMxMy55IC0gYzIweDIqYzEyLngqYzEyeTIqYzEzLnkgLSAzKmMyMHgyKmMyMC55KmMxMy54KmMxM3kyICsgYzEyeDIqYzIweTIqYzEyLnkqYzEzLnhcbiAgICApO1xuICAgIHZhciByb290cyA9IHBvbHkuZ2V0Um9vdHNJbkludGVydmFsKDAsMSk7XG5cbiAgICBmb3IgKCB2YXIgaSA9IDA7IGkgPCByb290cy5sZW5ndGg7IGkrKyApIHtcbiAgICAgICAgdmFyIHMgPSByb290c1tpXTtcbiAgICAgICAgdmFyIHhSb290cyA9IG5ldyBQb2x5bm9taWFsKFxuICAgICAgICAgICAgYzEzLngsXG4gICAgICAgICAgICBjMTIueCxcbiAgICAgICAgICAgIGMxMS54LFxuICAgICAgICAgICAgYzEwLnggLSBjMjAueCAtIHMqYzIxLnggLSBzKnMqYzIyLnggLSBzKnMqcypjMjMueFxuICAgICAgICApLmdldFJvb3RzKCk7XG4gICAgICAgIHZhciB5Um9vdHMgPSBuZXcgUG9seW5vbWlhbChcbiAgICAgICAgICAgIGMxMy55LFxuICAgICAgICAgICAgYzEyLnksXG4gICAgICAgICAgICBjMTEueSxcbiAgICAgICAgICAgIGMxMC55IC0gYzIwLnkgLSBzKmMyMS55IC0gcypzKmMyMi55IC0gcypzKnMqYzIzLnlcbiAgICAgICAgKS5nZXRSb290cygpO1xuXG4gICAgICAgIGlmICggeFJvb3RzLmxlbmd0aCA+IDAgJiYgeVJvb3RzLmxlbmd0aCA+IDAgKSB7XG4gICAgICAgICAgICB2YXIgVE9MRVJBTkNFID0gMWUtNDtcblxuICAgICAgICAgICAgY2hlY2tSb290czpcbiAgICAgICAgICAgIGZvciAoIHZhciBqID0gMDsgaiA8IHhSb290cy5sZW5ndGg7IGorKyApIHtcbiAgICAgICAgICAgICAgICB2YXIgeFJvb3QgPSB4Um9vdHNbal07XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgaWYgKCAwIDw9IHhSb290ICYmIHhSb290IDw9IDEgKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAoIHZhciBrID0gMDsgayA8IHlSb290cy5sZW5ndGg7IGsrKyApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICggTWF0aC5hYnMoIHhSb290IC0geVJvb3RzW2tdICkgPCBUT0xFUkFOQ0UgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnBvaW50cy5wdXNoKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjMjMubXVsdGlwbHkocypzKnMpLmFkZChjMjIubXVsdGlwbHkocypzKS5hZGQoYzIxLm11bHRpcGx5KHMpLmFkZChjMjApKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIGNoZWNrUm9vdHM7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoIHJlc3VsdC5wb2ludHMubGVuZ3RoID4gMCApIHJlc3VsdC5zd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gIC8vID9Sb3RhdGUgZWFjaCBjdWJpYyBjb2VmZmljaWVudCB1c2luZyBsaW5lIGZvciBuZXcgY29vcmRpbmF0ZSBzeXN0ZW0/XG4gICAgLy8gRmluZCByb290cyBvZiByb3RhdGVkIGN1YmljXG4gICAgcm9vdHMgPSBuZXcgUG9seW5vbWlhbChcbiAgICAgICAgbi5kb3QoYzMpLFxuICAgICAgICBuLmRvdChjMiksXG4gICAgICAgIG4uZG90KGMxKSxcbiAgICAgICAgbi5kb3QoYzApICsgY2xcbiAgICApLmdldFJvb3RzKCk7XG5cbiAgICAvLyBBbnkgcm9vdHMgaW4gY2xvc2VkIGludGVydmFsIFswLDFdIGFyZSBpbnRlcnNlY3Rpb25zIG9uIEJlemllciwgYnV0XG4gICAgLy8gbWlnaHQgbm90IGJlIG9uIHRoZSBsaW5lIHNlZ21lbnQuXG4gICAgLy8gRmluZCBpbnRlcnNlY3Rpb25zIGFuZCBjYWxjdWxhdGUgcG9pbnQgY29vcmRpbmF0ZXNcbiAgICBmb3IgKCB2YXIgaSA9IDA7IGkgPCByb290cy5sZW5ndGg7IGkrKyApIHtcbiAgICAgICAgdmFyIHQgPSByb290c1tpXTtcblxuICAgICAgICBpZiAoIDAgPD0gdCAmJiB0IDw9IDEgKSB7XG4gICAgICAgICAgICAvLyBXZSdyZSB3aXRoaW4gdGhlIEJlemllciBjdXJ2ZVxuICAgICAgICAgICAgLy8gRmluZCBwb2ludCBvbiBCZXppZXJcbiAgICAgICAgICAgIHZhciBwNSA9IHAxLmxlcnAocDIsIHQpO1xuICAgICAgICAgICAgdmFyIHA2ID0gcDIubGVycChwMywgdCk7XG4gICAgICAgICAgICB2YXIgcDcgPSBwMy5sZXJwKHA0LCB0KTtcblxuICAgICAgICAgICAgdmFyIHA4ID0gcDUubGVycChwNiwgdCk7XG4gICAgICAgICAgICB2YXIgcDkgPSBwNi5sZXJwKHA3LCB0KTtcblxuICAgICAgICAgICAgdmFyIHAxMCA9IHA4LmxlcnAocDksIHQpO1xuXG4gICAgICAgICAgICAvLyBTZWUgaWYgcG9pbnQgaXMgb24gbGluZSBzZWdtZW50XG4gICAgICAgICAgICAvLyBIYWQgdG8gbWFrZSBzcGVjaWFsIGNhc2VzIGZvciB2ZXJ0aWNhbCBhbmQgaG9yaXpvbnRhbCBsaW5lcyBkdWVcbiAgICAgICAgICAgIC8vIHRvIHNsaWdodCBlcnJvcnMgaW4gY2FsY3VsYXRpb24gb2YgcDEwXG4gICAgICAgICAgICBpZiAoIGExLnggPT0gYTIueCApIHtcbiAgICAgICAgICAgICAgICBpZiAoIG1pbi55IDw9IHAxMC55ICYmIHAxMC55IDw9IG1heC55ICkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQuc3RhdHVzID0gXCJJbnRlcnNlY3Rpb25cIjtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LmFwcGVuZFBvaW50KCBwMTAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCBhMS55ID09IGEyLnkgKSB7XG4gICAgICAgICAgICAgICAgaWYgKCBtaW4ueCA8PSBwMTAueCAmJiBwMTAueCA8PSBtYXgueCApIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnN0YXR1cyA9IFwiSW50ZXJzZWN0aW9uXCI7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5hcHBlbmRQb2ludCggcDEwICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICggcDEwLmd0ZShtaW4pICYmIHAxMC5sdGUobWF4KSApIHtcbiAgICAgICAgICAgICAgICByZXN1bHQuc3RhdHVzID0gXCJJbnRlcnNlY3Rpb25cIjtcbiAgICAgICAgICAgICAgICByZXN1bHQuYXBwZW5kUG9pbnQoIHAxMCApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIHJlc3VsdDtcbn07XG5cblxuLyoqKioqXG4qXG4qICAgaW50Z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N1bHQ7XG4gICAgXG4gICAgLy8gRGV0ZXJtaW5lIG1pbmltdW0gYW5kIG1heGltdW0gcmFkaWkgd2hlcmUgY2lyY2xlcyBjYW4gaW50ZXJzZWN0XG4gICAgdmFyIHJfbWF4ID0gcjEgKyByMjtcbiAgICB2YXIgcl9taW4gPSBNYXRoLmFicyhyMSAtIHIyKTtcbiAgICBcbiAgICAvLyBEZXRlcm1pbmUgYWN0dWFsIGRpc3RhbmNlIGJldHdlZW4gY2lyY2xlIGNpcmNsZXNcbiAgICB2YXIgY19kaXN0ID0gYzEuZGlzdGFuY2VGcm9tKCBjMiApO1xuXG4gICAgaWYgKCBjX2Rpc3QgPiByX21heCApIHtcbiAgICAgICAgcmVzdWx0ID0gbmV3IEludGVyc2VjdGlvbihcIk91dHNpZGVcIik7XG4gICAgfSBlbHNlIGlmICggY19kaXN0IDwgcl9taW4gKSB7XG4gICAgICAgIHJlc3VsdCA9IG5ldyBJbnRlcnNlY3Rpb24oXCJJbnNpZGVcIik7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgcmVzdWx0ID0gbmV3IEludGVyc2VjdGlvbihcIkludGVyc2VjdGlvblwiKTtcblxuICAgICAgICB2YXIgYSA9IChyMSpyMSAtIHIyKnIyICsgY19kaXN0KmNfZGlzdCkgLyAoIDIqY19kaXN0ICk7XG4gICAgICAgIHZhciBoID0gTWF0aC5zcXJ0KHIxKnIxIC0gYSphKTtcbiAgICAgICAgdmFyIHAgPSBjMS5sZXJwKGMyLCBhL2NfZGlzdCk7XG4gICAgICAgIHZhciBiID0gaCAvIGNfZGlzdDtcblxuICAgICAgICByZXN1bHQucG9pbnRzLnB1c2goXG4gICAgICAgICAgICBuZXcgUG9pbnQyRChcbiAgICAgICAgICAgICAgICBwLnggLSBiICogKGMyLnkgLSBjMS55KSxcbiAgICAgICAgICAgICAgICBwLnkgKyBiICogKGMyLnggLSBjMS54KVxuICAgICAgICAgICAgKVxuICAgICAgICApO1xuICAgICAgICByZXN1bHQucG9pbnRzLnB1c2goXG4gICAgICAgICAgICBuZXcgUG9pbnQyRChcbiAgICAgICAgICAgICAgICBwLnggKyBiICogKGMyLnkgLSBjMS55KSxcbiAgICAgICAgICAgICAgICBwLnkgLSBiICogKGMyLnggLSBjMS54KVxuICAgICAgICAgICAgKVxuICAgICAgICApO1xuICAgIH1cblxuICAgIHJldHVybiByZXN1bHQ7XG59O1xuXG5cbi8qKioqKlxuKlxuKiAgIGludGVyc2VjdENpcmNsZUVsbGlwc2VcbipcbioqKioqL1xuSW50ZXJzZWN0aW9uLmludGVyc2VjdENpcmNsZUVsbGlwc2UgPSBmdW5jdGlvbihjYywgciwgZWMsIHJ4LCByeSkge1xuICAgIHJldHVybiBJbnRlcnNlY3Rpb24uaW50ZXJzZWN0RWxsaXBzZUVsbGlwc2UoY2MsIHIsIHIsIGVjLCByeCwgcnkpO1xufTtcblxuXG4vKioqKipcbipcbiogICBpbnRlcnNlY3RDaXJjbGVMaW5lXG4qXG4qKioqKi9cbkludGVyc2VjdGlvbi5pbnRlcnNlY3RDaXJjbGVMaW5lID0gZnVuY3Rpb24oYywgciwgYTEsIGEyKSB7XG4gICAgdmFyIHJlc3VsdDtcbiAgICB2YXIgYSAgPSAoYTIueCAtIGExLngpICogKGEyLnggLSBhMS54KSArXG4gICAgICAgICAgICAgKGEyLnkgLSBhMS55KSAqIChhMi55IC0gYTEueSk7XG4gICAgdmFyIGIgID0gMiAqICggKGEyLnggLSBhMS54KSAqIChhMS54IC0gYy54KSArXG4gICAgICAgICAgICAgICAgICAgKGEyLnkgLSBhMS55KSAqIChhMS55IC0gYy55KSAgICk7XG4gICAgdmFyIGNjID0gYy54KmMueCArIGMueSpjLnkgKyBhMS54KmExLnggKyBhMS55KmExLnkgLVxuICAgICAgICAgICAgIDIgKiAoYy54ICogYTEueCArIGMueSAqIGExLnkpIC0gcipyO1xuICAgIHZhciBkZXRlciA9IGIqYiAtIDQqYSpjYztcblxuICAgIGlmICggZGV0ZXIgPCAwICkge1xuICAgICAgICByZXN1bHQgPSBuZXcgSW50ZXJzZWN0aW9uKFwiT3V0c2lkZVwiKTtcbiAgICB9IGVsc2UgaWYgKCBkZXRlciA9PSAwICkge1xuICAgICAgICByZXN1bHQgPSBuZXcgSW50ZXJzZWN0aW9uKFwiVGFuZ2VudFwiKTtcbiAgICAgICAgLy8gTk9URTogc2hvdWxkIGNhbGN1bGF0ZSB0aGlzIHBvaW50XG4gICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIGUgID0gTWF0aC5zcXJ0KGRldGVyKTtcbiAgICAgICAgdmFyIHUxID0gKCAtYiArIGUgKSAvICggMiphICk7XG4gICAgICAgIHZhciB1MiA9ICggLWIgLSBlICkgLyAoIDIqYSApO1xuXG4gICAgICAgIGlmICggKHUxIDwgMCB8fCB1MSA+IDEpICYmICh1MiA8IDAgfHwgdTIgPiAxKSApIHtcbiAgICAgICAgICAgIGlmICggKHUxIDwgMCAmJiB1MiA8IDApIHx8ICh1MSA+IDEgJiYgdTIgPiAxKSApIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBuZXcgSW50ZXJzZWN0aW9uKFwiT3V0c2lkZVwiKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gbmV3IEludGVyc2VjdGlvbihcIkluc2lkZVwiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJlc3VsdCA9IG5ldyBJbnRlcnNlY3Rpb24oXCJJbnRlcnNlY3Rpb25cIik7XG5cbiAgICAgICAgICAgIGlmICggMCA8PSB1MSAmJiB1MSA8PSAxKVxuICAgICAgICAgICAgICAgIHJlc3VsdC5wb2ludHMucHVzaCggYTEubGVycChhMiwgdTEpICk7XG5cbiAgICAgICAgICAgIGlmICggMCA8PSB1MiAmJiB1MiA8PSAxKVxuICAgICAgICAgICAgICAgIHJlc3VsdC5wb2ludHMucHVzaCggYTEubGVycChhMiwgdTIpICk7XG4gICAgICA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bMF0qYVswXSArIDIqYVsxXSphWzFdICsgYVsyXSphWzJdICkgKiBlcHNpbG9uO1xuICAgIHZhciBub3JtMSAgID0gKCBiWzBdKmJbMF0gKyAyKmJbMV0qYlsxXSArIGJbMl0qYlsyXSApICogZXBzaWxvbjtcbiAgICB2YXIgcmVzdWx0ICA9IG5ldyBJbnRlcnNlY3Rpb24oXCJObyBJbnRlcnNlY3Rpb25cIik7XG5cbiAgICBmb3IgKCB2YXIgeSA9IDA7IHkgPCB5Um9vdHMubGVuZ3RoOyB5KysgKSB7XG4gICAgICAgIHZhciB4UG9seSA9IG5ldyBQb2x5bm9taWFsKFxuICAgICAgICAgICAgYVswXSxcbiAgICAgICAgICAgIGFbM10gKyB5Um9vdHNbeV0gKiBhWzFdLFxuICAgICAgICAgICAgYVs1XSArIHlSb290c1t5XSAqIChhWzRdICsgeVJvb3RzW3ldKmFbMl0pXG4gICAgICAgICk7XG4gICAgICAgIHZhciB4Um9vdHMgPSB4UG9seS5nZXRSb290cygpO1xuXG4gICAgICAgIGZvciAoIHZhciB4ID0gMDsgeCA8IHhSb290cy5sZW5ndGg7IHgrKyApIHtcbiAgICAgICAgICAgIHZhciB0ZXN0ID1cbiAgICAgICAgICAgICAgICAoIGFbMF0qeFJvb3RzW3hdICsgYVsxXSp5Um9vdHNbeV0gKyBhWzNdICkgKiB4Um9vdHNbeF0gKyBcbiAgICAgICAgICAgICAgICAoIGFbMl0qeVJvb3RzW3ldICsgYVs0XSApICogeVJvb3RzW3ldICsgYVs1XTtcbiAgICAgICAgICAgIGlmICggTWF0aC5hYnModGVzdCkgPCBub3JtMCApIHtcbiAgICAgICAgICAgICAgICB0ZXN0ID1cbiAgICAgICAgICAgICAgICAgICAgKCBiWzBdKnhSb290c1t4XSArIGJbMV0qeVJvb3RzW3ldICsgYlszXSApICogeFJvb3RzW3hdICtcbiAgICAgICAgICAgICAgICAgICAgKCBiWzJdKnlSb290c1t5XSArIGJbNF0gKSAqIHlSb290c1t5XSArIGJbNV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90KG1EaWZmKTtcbiAgICB2YXIgYyA9IGRpZmYuZG90KG1EaWZmKSAtIDEuMDtcbiAgICB2YXIgZCA9IGIqYiAtIGEqYztcblxuICAgIGlmICggZCA8IDAgKSB7XG4gICAgICAgIHJlc3VsdCA9IG5ldyBJbnRlcnNlY3Rpb24oXCJPdXRzaWRlXCIpO1xuICAgIH0gZWxzZSBpZiAoIGQgPiAwICkge1xuICAgICAgICB2YXIgcm9vdCA9IE1hdGguc3FydChkKTtcbiAgICAgICAgdmFyIHRfYSAgPSAoLWIgLSByb290KSAvIGE7XG4gICAgICAgIHZhciB0X2IgID0gKC1iICsgcm9vdCkgLyBhO1xuXG4gICAgICAgIGlmICggKHRfYSA8IDAgfHwgMSA8IHRfYSkgJiYgKHRfYiA8IDAgfHwgMSA8IHRfYikgKSB7XG4gICAgICAgICAgICBpZiAoICh0X2EgPCAwICYmIHRfYiA8IDApIHx8ICh0X2EgPiAxICYmIHRfYiA+IDEpIClcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBuZXcgSW50ZXJzZWN0aW9uKFwiT3V0c2lkZVwiKTtcbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBuZXcgSW50ZXJzZWN0aW9uKFwiSW5zaWRlXCIpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmVzdWx0ID0gbmV3IEludGVyc2VjdGlvbihcIkludGVyc2VjdGlvblwiKTtcbiAgICAgICAgICAgIGlmICggMCA8PSB0X2EgJiYgdF9hIDw9IDEgKVxuICAgICAgICAgICAgICAgIHJlc3VsdC5hcHBlbmRQb2ludCggYTEubGVycChhMiwgdF9hKSApO1xuICAgICAgICAgICAgaWYgKCAwIDw9IHRfYiAmJiB0X2IgPD0gMSApXG4gICAgICAgICAgICAgICAgcmVzdWx0LmFwcGVuZFBvaW50KCBhMS5sZXJwKGEyLCB0X2IpICk7XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICB2YXIg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BlbmRQb2ludHMoaW50ZXI0LnBvaW50cyk7XG5cbiAgICBpZiAoIHJlc3VsdC5wb2ludHMubGVuZ3RoID4gMCApXG4gICAgICAgIHJlc3VsdC5zdGF0dXMgPSBcIkludGVyc2VjdGlvblwiO1xuXG4gICAgcmV0dXJuIHJlc3VsdDtcbn07XG5cblxuLyoqKioqXG4qXG4qICAgaW50ZXJzZWN0TGluZUxpbmVcbipcbioqKioqL1xuSW50ZXJzZWN0aW9uLmludGVyc2VjdExpbmVMaW5lID0gZnVuY3Rpb24oYTEsIGEyLCBiMSwgYjIpIHtcbiAgICB2YXIgcmVzdWx0O1xuICAgIFxuICAgIHZhciB1YV90ID0gKGIyLnggLSBiMS54KSAqIChhMS55IC0gYjEueSkgLSAoYjIueSAtIGIxLnkpICogKGExLnggLSBiMS54KTtcbiAgICB2YXIgdWJfdCA9IChhMi54IC0gYTEueCkgKiAoYTEueSAtIGIxLnkpIC0gKGEyLnkgLSBhMS55KSAqIChhMS54IC0gYjEueCk7XG4gICAgdmFyIHVfYiAgPSAoYjIueSAtIGIxLnkpICogKGEyLnggLSBhMS54KSAtIChiMi54IC0gYjEueCkgKiAoYTIueSAtIGExLnkpO1xuXG4gICAgaWYgKCB1X2IgIT0gMCApIHtcbiAgICAgICAgdmFyIHVhID0gdWFfdCAvIHVfYjtcbiAgICAgICAgdmFyIHViID0gdWJfdCAvIHVfYjtcblxuICAgICAgICBpZiAoIDAgPD0gdWEgJiYgdWEgPD0gMSAmJiAwIDw9IHViICYmIHViIDw9IDEgKSB7XG4gICAgICAgICAgICByZXN1bHQgPSBuZXcgSW50ZXJzZWN0aW9uKFwiSW50ZXJzZWN0aW9uXCIpO1xuICAgICAgICAgICAgcmVzdWx0LnBvaW50cy5wdXNoKFxuICAgICAgICAgICAgICAgIG5ldyBQb2ludDJEKFxuICAgICAgICAgICAgICAgICAgICBhMS54ICsgdWEgKiAoYTIueCAtIGExLngpLFxuICAgICAgICAgICAgICAgICAgICBhMS55ICsgdWEgK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wiSW50ZXJzZWN0aW9uXCI7XG5cbiAgICByZXR1cm4gcmVzdWx0O1xufTtcblxuXG4vKioqKipcbipcbiogICBpbnRlcnNlY3RSYXlSYXlcbipcbioqKioqL1xuSW50ZXJzZWN0aW9uLmludGVyc2VjdFJheVJheSA9IGZ1bmN0aW9uKGExLCBhMiwgYjEsIGIyKSB7XG4gICAgdmFyIHJlc3VsdDtcbiAgICBcbiAgICB2YXIgdWFfdCA9IChiMi54IC0gYjEueCkgKiAoYTEueSAtIGIxLnkpIC0gKGIyLnkgLSBiMS55KSAqIChhMS54IC0gYjEueCk7XG4gICAgdmFyIHViX3QgPSAoYTIueCAtIGExLngpICogKGExLnkgLSBiMS55KSAtIChhMi55IC0gYTEueSkgKiAoYTEueCAtIGIxLngpO1xuICAgIHZhciB1X2IgID0gKGIyLnkgLSBiMS55KSAqIChhMi54IC0gYTEueCkgLSAoYjIueCAtIGIxLngpICogKGEyLnkgLSBhMS55KTtcblxuICAgIGlmICggdV9iICE9IDAgKSB7XG4gICAgICAgIHZhciB1YSA9IHVhX3QgLyB1X2I7XG5cbiAgICAgICAgcmVzdWx0ID0gbmV3IEludGVyc2VjdGlvbihcIkludGVyc2VjdGlvblwiKTtcbiAgICAgICAgcmVzdWx0LnBvaW50cy5wdXNoKFxuICAgICAgICAgICAgbmV3IFBvaW50MkQoXG4gICAgICAgICAgICAgICAgYTEueCArIHVhICogKGEyLnggLSBhMS54KSxcbiAgICAgICAgICAgICAgICBhMS55ICsgdWEgKiAoYTIueSAtIGExLnkpXG4gICAgICAgICAgICApXG4gICAgICAgICk7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgaWYgKCB1YV90ID09IDAgfHwgdWJfdCA9PSAwICkge1xuICAgICAgICAgICAgcmVzdWx0ID0gbmV3IEludGVyc2VjdGlvbihcIkNvaW5jaWRlbnRcIik7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXN1bHQgPSBuZXcgSW50ZXJzZWN0aW9uKFwiUGFy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UFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/intersectionjs/intersection.js\n"); + +/***/ }), + +/***/ "./node_modules/point2d/index.js": +/*!***************************************!*\ + !*** ./node_modules/point2d/index.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("\n/**\n * An immutable point in 2d space\n * @param {Number} x The x coordinate\n * @param {Number} y The y coordinate\n */\nfunction Point (x, y) {\n this.x = x || 0;\n this.y = y || 0;\n Object.freeze(this);\n}\n\n/**\n * Returns the Euclidean distance between this point and another point\n * @param {Point} point The other point\n * @returns {Number} The Euclidean distance\n */\nPoint.prototype.distance = function (point) {\n return Math.sqrt(Math.pow(this.x - point.x, 2) + Math.pow(this.y - point.y, 2));\n};\n\n/**\n * Returns the Manhattan distance between this point and another point\n * @param {Point} point The other point\n * @returns {Number} The Manhattan distance\n */\nPoint.prototype.manhattanDistance = function (point) {\n var scalePoint = this.sub(point).abs();\n return scalePoint.x + scalePoint.y;\n};\n\n/**\n * Returns a new point with coordinates in absolute value\n * @returns {Point} The new point\n */\nPoint.prototype.abs = function () {\n return new Point(Math.abs(this.x), Math.abs(this.y));\n};\n\n/**\n * Returns true if the x and y coordinate of this point equals the x and y coordinate of the other point\n * @param {Point} point The other point\n * @returns {Boolean} If the points equal\n */\nPoint.prototype.equals = function (point) {\n return this.x === point.x && this.y === point.y;\n};\n\n/**\n * Returns a new point with the coordinates added together\n * @param {Point} point The other point\n * @returns {Point} A new point\n */\nPoint.prototype.add = function (point) {\n return new Point(this.x + point.x, this.y + point.y);\n};\n\n/**\n * Returns a new point with the coordinates of this point subtracted by the other point\n * @param {Point} point The other point\n * @returns {Point} The new point\n */\nPoint.prototype.sub = function (point) {\n return new Point(this.x - point.x, this.y - point.y);\n};\n\nmodule.exports = Point;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvcG9pbnQyZC9pbmRleC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL2NvbXBsZXh2aWV3ZXIvLi9ub2RlX21vZHVsZXMvcG9pbnQyZC9pbmRleC5qcz9kZDdiIl0sInNvdXJjZXNDb250ZW50IjpbIlxuLyoqXG4gKiBBbiBpbW11dGFibGUgcG9pbnQgaW4gMmQgc3BhY2VcbiAqIEBwYXJhbSB7TnVtYmVyfSB4IFRoZSB4IGNvb3JkaW5hdGVcbiAqIEBwYXJhbSB7TnVtYmVyfSB5IFRoZSB5IGNvb3JkaW5hdGVcbiAqL1xuZnVuY3Rpb24gUG9pbnQgKHgsIHkpIHtcbiAgdGhpcy54ID0geCB8fCAwO1xuICB0aGlzLnkgPSB5IHx8IDA7XG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b2ludC54LCB0aGlzLnkgLSBwb2ludC55KTtcbn07XG5cbm1vZHVsZS5leHBvcnRzID0gUG9pbnQ7Il0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/point2d/index.js\n"); + +/***/ }), + +/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": +/*!****************************************************************************!*\ + !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar isOldIE = function isOldIE() {\n var memo;\n return function memorize() {\n if (typeof memo === 'undefined') {\n // Test for IE <= 9 as proposed by Browserhacks\n // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n // Tests for existence of standard globals is to allow style-loader\n // to operate correctly into non-standard environments\n // @see https://github.com/webpack-contrib/style-loader/issues/177\n memo = Boolean(window && document && document.all && !window.atob);\n }\n\n return memo;\n };\n}();\n\nvar getTarget = function getTarget() {\n var memo = {};\n return function memorize(target) {\n if (typeof memo[target] === 'undefined') {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n };\n}();\n\nvar stylesInDom = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDom.length; i++) {\n if (stylesInDom[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var index = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3]\n };\n\n if (index !== -1) {\n stylesInDom[index].references++;\n stylesInDom[index].updater(obj);\n } else {\n stylesInDom.push({\n identifier: identifier,\n updater: addStyle(obj, options),\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction insertStyleElement(options) {\n var style = document.createElement('style');\n var attributes = options.attributes || {};\n\n if (typeof attributes.nonce === 'undefined') {\n var nonce = true ? __webpack_require__.nc : undefined;\n\n if (nonce) {\n attributes.nonce = nonce;\n }\n }\n\n Object.keys(attributes).forEach(function (key) {\n style.setAttribute(key, attributes[key]);\n });\n\n if (typeof options.insert === 'function') {\n options.insert(style);\n } else {\n var target = getTarget(options.insert || 'head');\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n }\n\n return style;\n}\n\nfunction removeStyleElement(style) {\n // istanbul ignore if\n if (style.parentNode === null) {\n return false;\n }\n\n style.parentNode.removeChild(style);\n}\n/* istanbul ignore next */\n\n\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join('\\n');\n };\n}();\n\nfunction applyToSingletonTag(style, index, remove, obj) {\n var css = remove ? '' : obj.media ? \"@media \".concat(obj.media, \" {\").concat(obj.css, \"}\") : obj.css; // For old IE\n\n /* istanbul ignore if */\n\n if (style.styleSheet) {\n style.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = style.childNodes;\n\n if (childNodes[index]) {\n style.removeChild(childNodes[index]);\n }\n\n if (childNodes.length) {\n style.insertBefore(cssNode, childNodes[index]);\n } else {\n style.appendChild(cssNode);\n }\n }\n}\n\nfunction applyToTag(style, options, obj) {\n var css = obj.css;\n var media = obj.media;\n var sourceMap = obj.sourceMap;\n\n if (media) {\n style.setAttribute('media', media);\n } else {\n style.removeAttribute('media');\n }\n\n if (sourceMap && btoa) {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n while (style.firstChild) {\n style.removeChild(style.firstChild);\n }\n\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar singleton = null;\nvar singletonCounter = 0;\n\nfunction addStyle(obj, options) {\n var style;\n var update;\n var remove;\n\n if (options.singleton) {\n var styleIndex = singletonCounter++;\n style = singleton || (singleton = insertStyleElement(options));\n update = applyToSingletonTag.bind(null, style, styleIndex, false);\n remove = applyToSingletonTag.bind(null, style, styleIndex, true);\n } else {\n style = insertStyleElement(options);\n update = applyToTag.bind(null, style, options);\n\n remove = function remove() {\n removeStyleElement(style);\n };\n }\n\n update(obj);\n return function updateStyle(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {\n return;\n }\n\n update(obj = newObj);\n } else {\n remove();\n }\n };\n}\n\nmodule.exports = function (list, options) {\n options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of