Upload folder using huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- node_modules/d3-color/src/cubehelix.js +61 -0
- node_modules/d3-color/src/define.js +10 -0
- node_modules/d3-color/src/index.js +3 -0
- node_modules/d3-color/src/lab.js +123 -0
- node_modules/d3-color/src/math.js +2 -0
- node_modules/d3-ease/LICENSE +28 -0
- node_modules/d3-ease/README.md +253 -0
- node_modules/d3-ease/dist/d3-ease.js +262 -0
- node_modules/d3-ease/dist/d3-ease.min.js +2 -0
- node_modules/d3-ease/package.json +51 -0
- node_modules/d3-ease/src/back.js +37 -0
- node_modules/d3-ease/src/bounce.js +22 -0
- node_modules/d3-ease/src/circle.js +11 -0
- node_modules/d3-ease/src/cubic.js +11 -0
- node_modules/d3-ease/src/elastic.js +46 -0
- node_modules/d3-ease/src/exp.js +13 -0
- node_modules/d3-ease/src/index.js +66 -0
- node_modules/d3-ease/src/linear.js +1 -0
- node_modules/d3-ease/src/math.js +4 -0
- node_modules/d3-ease/src/poly.js +37 -0
- node_modules/d3-ease/src/quad.js +11 -0
- node_modules/d3-ease/src/sin.js +14 -0
- node_modules/d3-format/LICENSE +13 -0
- node_modules/d3-format/README.md +12 -0
- node_modules/d3-format/dist/d3-format.js +342 -0
- node_modules/d3-format/dist/d3-format.min.js +2 -0
- node_modules/d3-format/locale/ar-001.json +7 -0
- node_modules/d3-format/locale/ar-AE.json +7 -0
- node_modules/d3-format/locale/ar-BH.json +7 -0
- node_modules/d3-format/locale/ar-DJ.json +7 -0
- node_modules/d3-format/locale/ar-DZ.json +6 -0
- node_modules/d3-format/locale/ar-EG.json +7 -0
- node_modules/d3-format/locale/ar-EH.json +6 -0
- node_modules/d3-format/locale/ar-ER.json +7 -0
- node_modules/d3-format/locale/ar-IL.json +7 -0
- node_modules/d3-format/locale/ar-IQ.json +7 -0
- node_modules/d3-format/locale/ar-JO.json +7 -0
- node_modules/d3-format/locale/ar-KM.json +7 -0
- node_modules/d3-format/locale/ar-KW.json +7 -0
- node_modules/d3-format/locale/ar-LB.json +7 -0
- node_modules/d3-format/locale/ar-LY.json +6 -0
- node_modules/d3-format/locale/ar-MA.json +6 -0
- node_modules/d3-format/locale/ar-MR.json +7 -0
- node_modules/d3-format/locale/ar-OM.json +7 -0
- node_modules/d3-format/locale/ar-PS.json +7 -0
- node_modules/d3-format/locale/ar-QA.json +7 -0
- node_modules/d3-format/locale/ar-SA.json +7 -0
- node_modules/d3-format/locale/ar-SD.json +7 -0
- node_modules/d3-format/locale/ar-SO.json +7 -0
- node_modules/d3-format/locale/ar-SS.json +7 -0
node_modules/d3-color/src/cubehelix.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import define, {extend} from "./define.js";
|
| 2 |
+
import {Color, rgbConvert, Rgb, darker, brighter} from "./color.js";
|
| 3 |
+
import {degrees, radians} from "./math.js";
|
| 4 |
+
|
| 5 |
+
var A = -0.14861,
|
| 6 |
+
B = +1.78277,
|
| 7 |
+
C = -0.29227,
|
| 8 |
+
D = -0.90649,
|
| 9 |
+
E = +1.97294,
|
| 10 |
+
ED = E * D,
|
| 11 |
+
EB = E * B,
|
| 12 |
+
BC_DA = B * C - D * A;
|
| 13 |
+
|
| 14 |
+
function cubehelixConvert(o) {
|
| 15 |
+
if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);
|
| 16 |
+
if (!(o instanceof Rgb)) o = rgbConvert(o);
|
| 17 |
+
var r = o.r / 255,
|
| 18 |
+
g = o.g / 255,
|
| 19 |
+
b = o.b / 255,
|
| 20 |
+
l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),
|
| 21 |
+
bl = b - l,
|
| 22 |
+
k = (E * (g - l) - C * bl) / D,
|
| 23 |
+
s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1
|
| 24 |
+
h = s ? Math.atan2(k, bl) * degrees - 120 : NaN;
|
| 25 |
+
return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
export default function cubehelix(h, s, l, opacity) {
|
| 29 |
+
return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
export function Cubehelix(h, s, l, opacity) {
|
| 33 |
+
this.h = +h;
|
| 34 |
+
this.s = +s;
|
| 35 |
+
this.l = +l;
|
| 36 |
+
this.opacity = +opacity;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
define(Cubehelix, cubehelix, extend(Color, {
|
| 40 |
+
brighter(k) {
|
| 41 |
+
k = k == null ? brighter : Math.pow(brighter, k);
|
| 42 |
+
return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
|
| 43 |
+
},
|
| 44 |
+
darker(k) {
|
| 45 |
+
k = k == null ? darker : Math.pow(darker, k);
|
| 46 |
+
return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
|
| 47 |
+
},
|
| 48 |
+
rgb() {
|
| 49 |
+
var h = isNaN(this.h) ? 0 : (this.h + 120) * radians,
|
| 50 |
+
l = +this.l,
|
| 51 |
+
a = isNaN(this.s) ? 0 : this.s * l * (1 - l),
|
| 52 |
+
cosh = Math.cos(h),
|
| 53 |
+
sinh = Math.sin(h);
|
| 54 |
+
return new Rgb(
|
| 55 |
+
255 * (l + a * (A * cosh + B * sinh)),
|
| 56 |
+
255 * (l + a * (C * cosh + D * sinh)),
|
| 57 |
+
255 * (l + a * (E * cosh)),
|
| 58 |
+
this.opacity
|
| 59 |
+
);
|
| 60 |
+
}
|
| 61 |
+
}));
|
node_modules/d3-color/src/define.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export default function(constructor, factory, prototype) {
|
| 2 |
+
constructor.prototype = factory.prototype = prototype;
|
| 3 |
+
prototype.constructor = constructor;
|
| 4 |
+
}
|
| 5 |
+
|
| 6 |
+
export function extend(parent, definition) {
|
| 7 |
+
var prototype = Object.create(parent.prototype);
|
| 8 |
+
for (var key in definition) prototype[key] = definition[key];
|
| 9 |
+
return prototype;
|
| 10 |
+
}
|
node_modules/d3-color/src/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export {default as color, rgb, hsl} from "./color.js";
|
| 2 |
+
export {default as lab, hcl, lch, gray} from "./lab.js";
|
| 3 |
+
export {default as cubehelix} from "./cubehelix.js";
|
node_modules/d3-color/src/lab.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import define, {extend} from "./define.js";
|
| 2 |
+
import {Color, rgbConvert, Rgb} from "./color.js";
|
| 3 |
+
import {degrees, radians} from "./math.js";
|
| 4 |
+
|
| 5 |
+
// https://observablehq.com/@mbostock/lab-and-rgb
|
| 6 |
+
const K = 18,
|
| 7 |
+
Xn = 0.96422,
|
| 8 |
+
Yn = 1,
|
| 9 |
+
Zn = 0.82521,
|
| 10 |
+
t0 = 4 / 29,
|
| 11 |
+
t1 = 6 / 29,
|
| 12 |
+
t2 = 3 * t1 * t1,
|
| 13 |
+
t3 = t1 * t1 * t1;
|
| 14 |
+
|
| 15 |
+
function labConvert(o) {
|
| 16 |
+
if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);
|
| 17 |
+
if (o instanceof Hcl) return hcl2lab(o);
|
| 18 |
+
if (!(o instanceof Rgb)) o = rgbConvert(o);
|
| 19 |
+
var r = rgb2lrgb(o.r),
|
| 20 |
+
g = rgb2lrgb(o.g),
|
| 21 |
+
b = rgb2lrgb(o.b),
|
| 22 |
+
y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;
|
| 23 |
+
if (r === g && g === b) x = z = y; else {
|
| 24 |
+
x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);
|
| 25 |
+
z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);
|
| 26 |
+
}
|
| 27 |
+
return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
export function gray(l, opacity) {
|
| 31 |
+
return new Lab(l, 0, 0, opacity == null ? 1 : opacity);
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
export default function lab(l, a, b, opacity) {
|
| 35 |
+
return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
export function Lab(l, a, b, opacity) {
|
| 39 |
+
this.l = +l;
|
| 40 |
+
this.a = +a;
|
| 41 |
+
this.b = +b;
|
| 42 |
+
this.opacity = +opacity;
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
define(Lab, lab, extend(Color, {
|
| 46 |
+
brighter(k) {
|
| 47 |
+
return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);
|
| 48 |
+
},
|
| 49 |
+
darker(k) {
|
| 50 |
+
return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);
|
| 51 |
+
},
|
| 52 |
+
rgb() {
|
| 53 |
+
var y = (this.l + 16) / 116,
|
| 54 |
+
x = isNaN(this.a) ? y : y + this.a / 500,
|
| 55 |
+
z = isNaN(this.b) ? y : y - this.b / 200;
|
| 56 |
+
x = Xn * lab2xyz(x);
|
| 57 |
+
y = Yn * lab2xyz(y);
|
| 58 |
+
z = Zn * lab2xyz(z);
|
| 59 |
+
return new Rgb(
|
| 60 |
+
lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),
|
| 61 |
+
lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),
|
| 62 |
+
lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),
|
| 63 |
+
this.opacity
|
| 64 |
+
);
|
| 65 |
+
}
|
| 66 |
+
}));
|
| 67 |
+
|
| 68 |
+
function xyz2lab(t) {
|
| 69 |
+
return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
function lab2xyz(t) {
|
| 73 |
+
return t > t1 ? t * t * t : t2 * (t - t0);
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
function lrgb2rgb(x) {
|
| 77 |
+
return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
function rgb2lrgb(x) {
|
| 81 |
+
return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
function hclConvert(o) {
|
| 85 |
+
if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);
|
| 86 |
+
if (!(o instanceof Lab)) o = labConvert(o);
|
| 87 |
+
if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);
|
| 88 |
+
var h = Math.atan2(o.b, o.a) * degrees;
|
| 89 |
+
return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
export function lch(l, c, h, opacity) {
|
| 93 |
+
return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
export function hcl(h, c, l, opacity) {
|
| 97 |
+
return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
export function Hcl(h, c, l, opacity) {
|
| 101 |
+
this.h = +h;
|
| 102 |
+
this.c = +c;
|
| 103 |
+
this.l = +l;
|
| 104 |
+
this.opacity = +opacity;
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
function hcl2lab(o) {
|
| 108 |
+
if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);
|
| 109 |
+
var h = o.h * radians;
|
| 110 |
+
return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
define(Hcl, hcl, extend(Color, {
|
| 114 |
+
brighter(k) {
|
| 115 |
+
return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);
|
| 116 |
+
},
|
| 117 |
+
darker(k) {
|
| 118 |
+
return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);
|
| 119 |
+
},
|
| 120 |
+
rgb() {
|
| 121 |
+
return hcl2lab(this).rgb();
|
| 122 |
+
}
|
| 123 |
+
}));
|
node_modules/d3-color/src/math.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export const radians = Math.PI / 180;
|
| 2 |
+
export const degrees = 180 / Math.PI;
|
node_modules/d3-ease/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copyright 2010-2021 Mike Bostock
|
| 2 |
+
Copyright 2001 Robert Penner
|
| 3 |
+
All rights reserved.
|
| 4 |
+
|
| 5 |
+
Redistribution and use in source and binary forms, with or without modification,
|
| 6 |
+
are permitted provided that the following conditions are met:
|
| 7 |
+
|
| 8 |
+
* Redistributions of source code must retain the above copyright notice, this
|
| 9 |
+
list of conditions and the following disclaimer.
|
| 10 |
+
|
| 11 |
+
* Redistributions in binary form must reproduce the above copyright notice,
|
| 12 |
+
this list of conditions and the following disclaimer in the documentation
|
| 13 |
+
and/or other materials provided with the distribution.
|
| 14 |
+
|
| 15 |
+
* Neither the name of the author nor the names of contributors may be used to
|
| 16 |
+
endorse or promote products derived from this software without specific prior
|
| 17 |
+
written permission.
|
| 18 |
+
|
| 19 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
| 20 |
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
| 21 |
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 22 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
| 23 |
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
| 24 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
| 25 |
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
| 26 |
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 27 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
| 28 |
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
node_modules/d3-ease/README.md
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# d3-ease
|
| 2 |
+
|
| 3 |
+
*Easing* is a method of distorting time to control apparent motion in animation. It is most commonly used for [slow-in, slow-out](https://en.wikipedia.org/wiki/12_basic_principles_of_animation#Slow_In_and_Slow_Out). By easing time, [animated transitions](https://github.com/d3/d3-transition) are smoother and exhibit more plausible motion.
|
| 4 |
+
|
| 5 |
+
The easing types in this module implement the [ease method](#ease_ease), which takes a normalized time *t* and returns the corresponding “eased” time *tʹ*. Both the normalized time and the eased time are typically in the range [0,1], where 0 represents the start of the animation and 1 represents the end; some easing types, such as [elastic](#easeElastic), may return eased times slightly outside this range. A good easing type should return 0 if *t* = 0 and 1 if *t* = 1. See the [easing explorer](https://observablehq.com/@d3/easing) for a visual demonstration.
|
| 6 |
+
|
| 7 |
+
These easing types are largely based on work by [Robert Penner](http://robertpenner.com/easing/).
|
| 8 |
+
|
| 9 |
+
## Installing
|
| 10 |
+
|
| 11 |
+
If you use npm, `npm install d3-ease`. You can also download the [latest release on GitHub](https://github.com/d3/d3-ease/releases/latest). For vanilla HTML in modern browsers, import d3-ease from Skypack:
|
| 12 |
+
|
| 13 |
+
```html
|
| 14 |
+
<script type="module">
|
| 15 |
+
|
| 16 |
+
import {easeCubic} from "https://cdn.skypack.dev/d3-ease@3";
|
| 17 |
+
|
| 18 |
+
const e = easeCubic(0.25);
|
| 19 |
+
|
| 20 |
+
</script>
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
For legacy environments, you can load d3-ease’s UMD bundle from an npm-based CDN such as jsDelivr; a `d3` global is exported:
|
| 24 |
+
|
| 25 |
+
```html
|
| 26 |
+
<script src="https://cdn.jsdelivr.net/npm/d3-ease@3"></script>
|
| 27 |
+
<script>
|
| 28 |
+
|
| 29 |
+
const e = d3.easeCubic(0.25);
|
| 30 |
+
|
| 31 |
+
</script>
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
[Try d3-ease in your browser.](https://observablehq.com/@d3/easing-animations)
|
| 35 |
+
|
| 36 |
+
## API Reference
|
| 37 |
+
|
| 38 |
+
<a name="_ease" href="#_ease">#</a> <i>ease</i>(<i>t</i>)
|
| 39 |
+
|
| 40 |
+
Given the specified normalized time *t*, typically in the range [0,1], returns the “eased” time *tʹ*, also typically in [0,1]. 0 represents the start of the animation and 1 represents the end. A good implementation returns 0 if *t* = 0 and 1 if *t* = 1. See the [easing explorer](https://observablehq.com/@d3/easing) for a visual demonstration. For example, to apply [cubic](#easeCubic) easing:
|
| 41 |
+
|
| 42 |
+
```js
|
| 43 |
+
const te = d3.easeCubic(t);
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
Similarly, to apply custom [elastic](#easeElastic) easing:
|
| 47 |
+
|
| 48 |
+
```js
|
| 49 |
+
// Before the animation starts, create your easing function.
|
| 50 |
+
const customElastic = d3.easeElastic.period(0.4);
|
| 51 |
+
|
| 52 |
+
// During the animation, apply the easing function.
|
| 53 |
+
const te = customElastic(t);
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
<a name="easeLinear" href="#easeLinear">#</a> d3.<b>easeLinear</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/linear.js "Source")
|
| 57 |
+
|
| 58 |
+
Linear easing; the identity function; *linear*(*t*) returns *t*.
|
| 59 |
+
|
| 60 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/linear.png" alt="linear">](https://observablehq.com/@d3/easing#linear)
|
| 61 |
+
|
| 62 |
+
<a name="easePolyIn" href="#easePolyIn">#</a> d3.<b>easePolyIn</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/poly.js#L3 "Source")
|
| 63 |
+
|
| 64 |
+
Polynomial easing; raises *t* to the specified [exponent](#poly_exponent). If the exponent is not specified, it defaults to 3, equivalent to [cubicIn](#easeCubicIn).
|
| 65 |
+
|
| 66 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/polyIn.png" alt="polyIn">](https://observablehq.com/@d3/easing#polyIn)
|
| 67 |
+
|
| 68 |
+
<a name="easePolyOut" href="#easePolyOut">#</a> d3.<b>easePolyOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/poly.js#L15 "Source")
|
| 69 |
+
|
| 70 |
+
Reverse polynomial easing; equivalent to 1 - [polyIn](#easePolyIn)(1 - *t*). If the [exponent](#poly_exponent) is not specified, it defaults to 3, equivalent to [cubicOut](#easeCubicOut).
|
| 71 |
+
|
| 72 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/polyOut.png" alt="polyOut">](https://observablehq.com/@d3/easing#polyOut)
|
| 73 |
+
|
| 74 |
+
<a name="easePoly" href="#easePoly">#</a> d3.<b>easePoly</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/poly.js "Source")
|
| 75 |
+
<br><a name="easePolyInOut" href="#easePolyInOut">#</a> d3.<b>easePolyInOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/poly.js#L27 "Source")
|
| 76 |
+
|
| 77 |
+
Symmetric polynomial easing; scales [polyIn](#easePolyIn) for *t* in [0, 0.5] and [polyOut](#easePolyOut) for *t* in [0.5, 1]. If the [exponent](#poly_exponent) is not specified, it defaults to 3, equivalent to [cubic](#easeCubic).
|
| 78 |
+
|
| 79 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/polyInOut.png" alt="polyInOut">](https://observablehq.com/@d3/easing#polyInOut)
|
| 80 |
+
|
| 81 |
+
<a name="poly_exponent" href="#poly_exponent">#</a> <i>poly</i>.<b>exponent</b>(<i>e</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/poly.js#L1 "Source")
|
| 82 |
+
|
| 83 |
+
Returns a new polynomial easing with the specified exponent *e*. For example, to create equivalents of [linear](#easeLinear), [quad](#easeQuad), and [cubic](#easeCubic):
|
| 84 |
+
|
| 85 |
+
```js
|
| 86 |
+
const linear = d3.easePoly.exponent(1);
|
| 87 |
+
const quad = d3.easePoly.exponent(2);
|
| 88 |
+
const cubic = d3.easePoly.exponent(3);
|
| 89 |
+
```
|
| 90 |
+
|
| 91 |
+
<a name="easeQuadIn" href="#easeQuadIn">#</a> d3.<b>easeQuadIn</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/quad.js#L1 "Source")
|
| 92 |
+
|
| 93 |
+
Quadratic easing; equivalent to [polyIn](#easePolyIn).[exponent](#poly_exponent)(2).
|
| 94 |
+
|
| 95 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/quadIn.png" alt="quadIn">](https://observablehq.com/@d3/easing#quadIn)
|
| 96 |
+
|
| 97 |
+
<a name="easeQuadOut" href="#easeQuadOut">#</a> d3.<b>easeQuadOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/quad.js#L5 "Source")
|
| 98 |
+
|
| 99 |
+
Reverse quadratic easing; equivalent to 1 - [quadIn](#easeQuadIn)(1 - *t*). Also equivalent to [polyOut](#easePolyOut).[exponent](#poly_exponent)(2).
|
| 100 |
+
|
| 101 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/quadOut.png" alt="quadOut">](https://observablehq.com/@d3/easing#quadOut)
|
| 102 |
+
|
| 103 |
+
<a name="easeQuad" href="#easeQuad">#</a> d3.<b>easeQuad</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/quad.js "Source")
|
| 104 |
+
<br><a name="easeQuadInOut" href="#easeQuadInOut">#</a> d3.<b>easeQuadInOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/quad.js#L9 "Source")
|
| 105 |
+
|
| 106 |
+
Symmetric quadratic easing; scales [quadIn](#easeQuadIn) for *t* in [0, 0.5] and [quadOut](#easeQuadOut) for *t* in [0.5, 1]. Also equivalent to [poly](#easePoly).[exponent](#poly_exponent)(2).
|
| 107 |
+
|
| 108 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/quadInOut.png" alt="quadInOut">](https://observablehq.com/@d3/easing#quadInOut)
|
| 109 |
+
|
| 110 |
+
<a name="easeCubicIn" href="#easeCubicIn">#</a> d3.<b>easeCubicIn</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/cubic.js#L1 "Source")
|
| 111 |
+
|
| 112 |
+
Cubic easing; equivalent to [polyIn](#easePolyIn).[exponent](#poly_exponent)(3).
|
| 113 |
+
|
| 114 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/cubicIn.png" alt="cubicIn">](https://observablehq.com/@d3/easing#cubicIn)
|
| 115 |
+
|
| 116 |
+
<a name="easeCubicOut" href="#easeCubicOut">#</a> d3.<b>easeCubicOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/cubic.js#L5 "Source")
|
| 117 |
+
|
| 118 |
+
Reverse cubic easing; equivalent to 1 - [cubicIn](#easeCubicIn)(1 - *t*). Also equivalent to [polyOut](#easePolyOut).[exponent](#poly_exponent)(3).
|
| 119 |
+
|
| 120 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/cubicOut.png" alt="cubicOut">](https://observablehq.com/@d3/easing#cubicOut)
|
| 121 |
+
|
| 122 |
+
<a name="easeCubic" href="#easeCubic">#</a> d3.<b>easeCubic</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/cubic.js "Source")
|
| 123 |
+
<br><a name="easeCubicInOut" href="#easeCubicInOut">#</a> d3.<b>easeCubicInOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/cubic.js#L9 "Source")
|
| 124 |
+
|
| 125 |
+
Symmetric cubic easing; scales [cubicIn](#easeCubicIn) for *t* in [0, 0.5] and [cubicOut](#easeCubicOut) for *t* in [0.5, 1]. Also equivalent to [poly](#easePoly).[exponent](#poly_exponent)(3).
|
| 126 |
+
|
| 127 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/cubicInOut.png" alt="cubicInOut">](https://observablehq.com/@d3/easing#cubicInOut)
|
| 128 |
+
|
| 129 |
+
<a name="easeSinIn" href="#easeSinIn">#</a> d3.<b>easeSinIn</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/sin.js#L4 "Source")
|
| 130 |
+
|
| 131 |
+
Sinusoidal easing; returns sin(*t*).
|
| 132 |
+
|
| 133 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/sinIn.png" alt="sinIn">](https://observablehq.com/@d3/easing#sinIn)
|
| 134 |
+
|
| 135 |
+
<a name="easeSinOut" href="#easeSinOut">#</a> d3.<b>easeSinOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/sin.js#L8 "Source")
|
| 136 |
+
|
| 137 |
+
Reverse sinusoidal easing; equivalent to 1 - [sinIn](#easeSinIn)(1 - *t*).
|
| 138 |
+
|
| 139 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/sinOut.png" alt="sinOut">](https://observablehq.com/@d3/easing#sinOut)
|
| 140 |
+
|
| 141 |
+
<a name="easeSin" href="#easeSin">#</a> d3.<b>easeSin</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/sin.js "Source")
|
| 142 |
+
<br><a name="easeSinInOut" href="#easeSinInOut">#</a> d3.<b>easeSinInOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/sin.js#L12 "Source")
|
| 143 |
+
|
| 144 |
+
Symmetric sinusoidal easing; scales [sinIn](#easeSinIn) for *t* in [0, 0.5] and [sinOut](#easeSinOut) for *t* in [0.5, 1].
|
| 145 |
+
|
| 146 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/sinInOut.png" alt="sinInOut">](https://observablehq.com/@d3/easing#sinInOut)
|
| 147 |
+
|
| 148 |
+
<a name="easeExpIn" href="#easeExpIn">#</a> d3.<b>easeExpIn</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/exp.js#L1 "Source")
|
| 149 |
+
|
| 150 |
+
Exponential easing; raises 2 to the exponent 10 \* (*t* - 1).
|
| 151 |
+
|
| 152 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/expIn.png" alt="expIn">](https://observablehq.com/@d3/easing#expIn)
|
| 153 |
+
|
| 154 |
+
<a name="easeExpOut" href="#easeExpOut">#</a> d3.<b>easeExpOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/exp.js#L5 "Source")
|
| 155 |
+
|
| 156 |
+
Reverse exponential easing; equivalent to 1 - [expIn](#easeExpIn)(1 - *t*).
|
| 157 |
+
|
| 158 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/expOut.png" alt="expOut">](https://observablehq.com/@d3/easing#expOut)
|
| 159 |
+
|
| 160 |
+
<a name="easeExp" href="#easeExp">#</a> d3.<b>easeExp</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/exp.js "Source")
|
| 161 |
+
<br><a name="easeExpInOut" href="#easeExpInOut">#</a> d3.<b>easeExpInOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/exp.js#L9 "Source")
|
| 162 |
+
|
| 163 |
+
Symmetric exponential easing; scales [expIn](#easeExpIn) for *t* in [0, 0.5] and [expOut](#easeExpOut) for *t* in [0.5, 1].
|
| 164 |
+
|
| 165 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/expInOut.png" alt="expInOut">](https://observablehq.com/@d3/easing#expInOut)
|
| 166 |
+
|
| 167 |
+
<a name="easeCircleIn" href="#easeCircleIn">#</a> d3.<b>easeCircleIn</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/circle.js#L1 "Source")
|
| 168 |
+
|
| 169 |
+
Circular easing.
|
| 170 |
+
|
| 171 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/circleIn.png" alt="circleIn">](https://observablehq.com/@d3/easing#circleIn)
|
| 172 |
+
|
| 173 |
+
<a name="easeCircleOut" href="#easeCircleOut">#</a> d3.<b>easeCircleOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/circle.js#L5 "Source")
|
| 174 |
+
|
| 175 |
+
Reverse circular easing; equivalent to 1 - [circleIn](#easeCircleIn)(1 - *t*).
|
| 176 |
+
|
| 177 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/circleOut.png" alt="circleOut">](https://observablehq.com/@d3/easing#circleOut)
|
| 178 |
+
|
| 179 |
+
<a name="easeCircle" href="#easeCircle">#</a> d3.<b>easeCircle</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/circle.js "Source")
|
| 180 |
+
<br><a name="easeCircleInOut" href="#easeCircleInOut">#</a> d3.<b>easeCircleInOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/circle.js#L9 "Source")
|
| 181 |
+
|
| 182 |
+
Symmetric circular easing; scales [circleIn](#easeCircleIn) for *t* in [0, 0.5] and [circleOut](#easeCircleOut) for *t* in [0.5, 1].
|
| 183 |
+
|
| 184 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/circleInOut.png" alt="circleInOut">](https://observablehq.com/@d3/easing#circleInOut)
|
| 185 |
+
|
| 186 |
+
<a name="easeElasticIn" href="#easeElasticIn">#</a> d3.<b>easeElasticIn</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/elastic.js#L5 "Source")
|
| 187 |
+
|
| 188 |
+
Elastic easing, like a rubber band. The [amplitude](#elastic_amplitude) and [period](#elastic_period) of the oscillation are configurable; if not specified, they default to 1 and 0.3, respectively.
|
| 189 |
+
|
| 190 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/elasticIn.png" alt="elasticIn">](https://observablehq.com/@d3/easing#elasticIn)
|
| 191 |
+
|
| 192 |
+
<a name="easeElastic" href="#easeElastic">#</a> d3.<b>easeElastic</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/elastic.js "Source")
|
| 193 |
+
<br><a name="easeElasticOut" href="#easeElasticOut">#</a> d3.<b>easeElasticOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/elastic.js#L18 "Source")
|
| 194 |
+
|
| 195 |
+
Reverse elastic easing; equivalent to 1 - [elasticIn](#easeElasticIn)(1 - *t*).
|
| 196 |
+
|
| 197 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/elasticOut.png" alt="elasticOut">](https://observablehq.com/@d3/easing#elasticOut)
|
| 198 |
+
|
| 199 |
+
<a name="easeElasticInOut" href="#easeElasticInOut">#</a> d3.<b>easeElasticInOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/elastic.js#L31 "Source")
|
| 200 |
+
|
| 201 |
+
Symmetric elastic easing; scales [elasticIn](#easeElasticIn) for *t* in [0, 0.5] and [elasticOut](#easeElasticOut) for *t* in [0.5, 1].
|
| 202 |
+
|
| 203 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/elasticInOut.png" alt="elasticInOut">](https://observablehq.com/@d3/easing#elasticInOut)
|
| 204 |
+
|
| 205 |
+
<a name="elastic_amplitude" href="#elastic_amplitude">#</a> <i>elastic</i>.<b>amplitude</b>(<i>a</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/elastic.js#L40 "Source")
|
| 206 |
+
|
| 207 |
+
Returns a new elastic easing with the specified amplitude *a*.
|
| 208 |
+
|
| 209 |
+
<a name="elastic_period" href="#elastic_period">#</a> <i>elastic</i>.<b>period</b>(<i>p</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/elastic.js#L41 "Source")
|
| 210 |
+
|
| 211 |
+
Returns a new elastic easing with the specified period *p*.
|
| 212 |
+
|
| 213 |
+
<a name="easeBackIn" href="#easeBackIn">#</a> d3.<b>easeBackIn</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/back.js#L3 "Source")
|
| 214 |
+
|
| 215 |
+
[Anticipatory](https://en.wikipedia.org/wiki/12_basic_principles_of_animation#Anticipation) easing, like a dancer bending his knees before jumping off the floor. The degree of [overshoot](#back_overshoot) is configurable; if not specified, it defaults to 1.70158.
|
| 216 |
+
|
| 217 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/backIn.png" alt="backIn">](https://observablehq.com/@d3/easing#backIn)
|
| 218 |
+
|
| 219 |
+
<a name="easeBackOut" href="#easeBackOut">#</a> d3.<b>easeBackOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/back.js#L15 "Source")
|
| 220 |
+
|
| 221 |
+
Reverse anticipatory easing; equivalent to 1 - [backIn](#easeBackIn)(1 - *t*).
|
| 222 |
+
|
| 223 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/backOut.png" alt="backOut">](https://observablehq.com/@d3/easing#backOut)
|
| 224 |
+
|
| 225 |
+
<a name="easeBack" href="#easeBack">#</a> d3.<b>easeBack</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/back.js "Source")
|
| 226 |
+
<br><a name="easeBackInOut" href="#easeBackInOut">#</a> d3.<b>easeBackInOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/back.js#L27 "Source")
|
| 227 |
+
|
| 228 |
+
Symmetric anticipatory easing; scales [backIn](#easeBackIn) for *t* in [0, 0.5] and [backOut](#easeBackOut) for *t* in [0.5, 1].
|
| 229 |
+
|
| 230 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/backInOut.png" alt="backInOut">](https://observablehq.com/@d3/easing#backInOut)
|
| 231 |
+
|
| 232 |
+
<a name="back_overshoot" href="#back_overshoot">#</a> <i>back</i>.<b>overshoot</b>(<i>s</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/back.js#L1 "Source")
|
| 233 |
+
|
| 234 |
+
Returns a new back easing with the specified overshoot *s*.
|
| 235 |
+
|
| 236 |
+
<a name="easeBounceIn" href="#easeBounceIn">#</a> d3.<b>easeBounceIn</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/bounce.js#L12 "Source")
|
| 237 |
+
|
| 238 |
+
Bounce easing, like a rubber ball.
|
| 239 |
+
|
| 240 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/bounceIn.png" alt="bounceIn">](https://observablehq.com/@d3/easing#bounceIn)
|
| 241 |
+
|
| 242 |
+
<a name="easeBounce" href="#easeBounce">#</a> d3.<b>easeBounce</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/bounce.js "Source")
|
| 243 |
+
<br><a name="easeBounceOut" href="#easeBounceOut">#</a> d3.<b>easeBounceOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/bounce.js#L16 "Source")
|
| 244 |
+
|
| 245 |
+
Reverse bounce easing; equivalent to 1 - [bounceIn](#easeBounceIn)(1 - *t*).
|
| 246 |
+
|
| 247 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/bounceOut.png" alt="bounceOut">](https://observablehq.com/@d3/easing#bounceOut)
|
| 248 |
+
|
| 249 |
+
<a name="easeBounceInOut" href="#easeBounceInOut">#</a> d3.<b>easeBounceInOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/bounce.js#L20 "Source")
|
| 250 |
+
|
| 251 |
+
Symmetric bounce easing; scales [bounceIn](#easeBounceIn) for *t* in [0, 0.5] and [bounceOut](#easeBounceOut) for *t* in [0.5, 1].
|
| 252 |
+
|
| 253 |
+
[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/bounceInOut.png" alt="bounceInOut">](https://observablehq.com/@d3/easing#bounceInOut)
|
node_modules/d3-ease/dist/d3-ease.js
ADDED
|
@@ -0,0 +1,262 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// https://d3js.org/d3-ease/ v3.0.1 Copyright 2010-2021 Mike Bostock, 2001 Robert Penner
|
| 2 |
+
(function (global, factory) {
|
| 3 |
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
| 4 |
+
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
| 5 |
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.d3 = global.d3 || {}));
|
| 6 |
+
}(this, (function (exports) { 'use strict';
|
| 7 |
+
|
| 8 |
+
const linear = t => +t;
|
| 9 |
+
|
| 10 |
+
function quadIn(t) {
|
| 11 |
+
return t * t;
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
function quadOut(t) {
|
| 15 |
+
return t * (2 - t);
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
function quadInOut(t) {
|
| 19 |
+
return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
function cubicIn(t) {
|
| 23 |
+
return t * t * t;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
function cubicOut(t) {
|
| 27 |
+
return --t * t * t + 1;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
function cubicInOut(t) {
|
| 31 |
+
return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
var exponent = 3;
|
| 35 |
+
|
| 36 |
+
var polyIn = (function custom(e) {
|
| 37 |
+
e = +e;
|
| 38 |
+
|
| 39 |
+
function polyIn(t) {
|
| 40 |
+
return Math.pow(t, e);
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
polyIn.exponent = custom;
|
| 44 |
+
|
| 45 |
+
return polyIn;
|
| 46 |
+
})(exponent);
|
| 47 |
+
|
| 48 |
+
var polyOut = (function custom(e) {
|
| 49 |
+
e = +e;
|
| 50 |
+
|
| 51 |
+
function polyOut(t) {
|
| 52 |
+
return 1 - Math.pow(1 - t, e);
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
polyOut.exponent = custom;
|
| 56 |
+
|
| 57 |
+
return polyOut;
|
| 58 |
+
})(exponent);
|
| 59 |
+
|
| 60 |
+
var polyInOut = (function custom(e) {
|
| 61 |
+
e = +e;
|
| 62 |
+
|
| 63 |
+
function polyInOut(t) {
|
| 64 |
+
return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
polyInOut.exponent = custom;
|
| 68 |
+
|
| 69 |
+
return polyInOut;
|
| 70 |
+
})(exponent);
|
| 71 |
+
|
| 72 |
+
var pi = Math.PI,
|
| 73 |
+
halfPi = pi / 2;
|
| 74 |
+
|
| 75 |
+
function sinIn(t) {
|
| 76 |
+
return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi);
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
function sinOut(t) {
|
| 80 |
+
return Math.sin(t * halfPi);
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
function sinInOut(t) {
|
| 84 |
+
return (1 - Math.cos(pi * t)) / 2;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
// tpmt is two power minus ten times t scaled to [0,1]
|
| 88 |
+
function tpmt(x) {
|
| 89 |
+
return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
function expIn(t) {
|
| 93 |
+
return tpmt(1 - +t);
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
function expOut(t) {
|
| 97 |
+
return 1 - tpmt(t);
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
function expInOut(t) {
|
| 101 |
+
return ((t *= 2) <= 1 ? tpmt(1 - t) : 2 - tpmt(t - 1)) / 2;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
function circleIn(t) {
|
| 105 |
+
return 1 - Math.sqrt(1 - t * t);
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
function circleOut(t) {
|
| 109 |
+
return Math.sqrt(1 - --t * t);
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
function circleInOut(t) {
|
| 113 |
+
return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
var b1 = 4 / 11,
|
| 117 |
+
b2 = 6 / 11,
|
| 118 |
+
b3 = 8 / 11,
|
| 119 |
+
b4 = 3 / 4,
|
| 120 |
+
b5 = 9 / 11,
|
| 121 |
+
b6 = 10 / 11,
|
| 122 |
+
b7 = 15 / 16,
|
| 123 |
+
b8 = 21 / 22,
|
| 124 |
+
b9 = 63 / 64,
|
| 125 |
+
b0 = 1 / b1 / b1;
|
| 126 |
+
|
| 127 |
+
function bounceIn(t) {
|
| 128 |
+
return 1 - bounceOut(1 - t);
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
function bounceOut(t) {
|
| 132 |
+
return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
function bounceInOut(t) {
|
| 136 |
+
return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
var overshoot = 1.70158;
|
| 140 |
+
|
| 141 |
+
var backIn = (function custom(s) {
|
| 142 |
+
s = +s;
|
| 143 |
+
|
| 144 |
+
function backIn(t) {
|
| 145 |
+
return (t = +t) * t * (s * (t - 1) + t);
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
backIn.overshoot = custom;
|
| 149 |
+
|
| 150 |
+
return backIn;
|
| 151 |
+
})(overshoot);
|
| 152 |
+
|
| 153 |
+
var backOut = (function custom(s) {
|
| 154 |
+
s = +s;
|
| 155 |
+
|
| 156 |
+
function backOut(t) {
|
| 157 |
+
return --t * t * ((t + 1) * s + t) + 1;
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
backOut.overshoot = custom;
|
| 161 |
+
|
| 162 |
+
return backOut;
|
| 163 |
+
})(overshoot);
|
| 164 |
+
|
| 165 |
+
var backInOut = (function custom(s) {
|
| 166 |
+
s = +s;
|
| 167 |
+
|
| 168 |
+
function backInOut(t) {
|
| 169 |
+
return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
backInOut.overshoot = custom;
|
| 173 |
+
|
| 174 |
+
return backInOut;
|
| 175 |
+
})(overshoot);
|
| 176 |
+
|
| 177 |
+
var tau = 2 * Math.PI,
|
| 178 |
+
amplitude = 1,
|
| 179 |
+
period = 0.3;
|
| 180 |
+
|
| 181 |
+
var elasticIn = (function custom(a, p) {
|
| 182 |
+
var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);
|
| 183 |
+
|
| 184 |
+
function elasticIn(t) {
|
| 185 |
+
return a * tpmt(-(--t)) * Math.sin((s - t) / p);
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
elasticIn.amplitude = function(a) { return custom(a, p * tau); };
|
| 189 |
+
elasticIn.period = function(p) { return custom(a, p); };
|
| 190 |
+
|
| 191 |
+
return elasticIn;
|
| 192 |
+
})(amplitude, period);
|
| 193 |
+
|
| 194 |
+
var elasticOut = (function custom(a, p) {
|
| 195 |
+
var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);
|
| 196 |
+
|
| 197 |
+
function elasticOut(t) {
|
| 198 |
+
return 1 - a * tpmt(t = +t) * Math.sin((t + s) / p);
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
elasticOut.amplitude = function(a) { return custom(a, p * tau); };
|
| 202 |
+
elasticOut.period = function(p) { return custom(a, p); };
|
| 203 |
+
|
| 204 |
+
return elasticOut;
|
| 205 |
+
})(amplitude, period);
|
| 206 |
+
|
| 207 |
+
var elasticInOut = (function custom(a, p) {
|
| 208 |
+
var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);
|
| 209 |
+
|
| 210 |
+
function elasticInOut(t) {
|
| 211 |
+
return ((t = t * 2 - 1) < 0
|
| 212 |
+
? a * tpmt(-t) * Math.sin((s - t) / p)
|
| 213 |
+
: 2 - a * tpmt(t) * Math.sin((s + t) / p)) / 2;
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
elasticInOut.amplitude = function(a) { return custom(a, p * tau); };
|
| 217 |
+
elasticInOut.period = function(p) { return custom(a, p); };
|
| 218 |
+
|
| 219 |
+
return elasticInOut;
|
| 220 |
+
})(amplitude, period);
|
| 221 |
+
|
| 222 |
+
exports.easeBack = backInOut;
|
| 223 |
+
exports.easeBackIn = backIn;
|
| 224 |
+
exports.easeBackInOut = backInOut;
|
| 225 |
+
exports.easeBackOut = backOut;
|
| 226 |
+
exports.easeBounce = bounceOut;
|
| 227 |
+
exports.easeBounceIn = bounceIn;
|
| 228 |
+
exports.easeBounceInOut = bounceInOut;
|
| 229 |
+
exports.easeBounceOut = bounceOut;
|
| 230 |
+
exports.easeCircle = circleInOut;
|
| 231 |
+
exports.easeCircleIn = circleIn;
|
| 232 |
+
exports.easeCircleInOut = circleInOut;
|
| 233 |
+
exports.easeCircleOut = circleOut;
|
| 234 |
+
exports.easeCubic = cubicInOut;
|
| 235 |
+
exports.easeCubicIn = cubicIn;
|
| 236 |
+
exports.easeCubicInOut = cubicInOut;
|
| 237 |
+
exports.easeCubicOut = cubicOut;
|
| 238 |
+
exports.easeElastic = elasticOut;
|
| 239 |
+
exports.easeElasticIn = elasticIn;
|
| 240 |
+
exports.easeElasticInOut = elasticInOut;
|
| 241 |
+
exports.easeElasticOut = elasticOut;
|
| 242 |
+
exports.easeExp = expInOut;
|
| 243 |
+
exports.easeExpIn = expIn;
|
| 244 |
+
exports.easeExpInOut = expInOut;
|
| 245 |
+
exports.easeExpOut = expOut;
|
| 246 |
+
exports.easeLinear = linear;
|
| 247 |
+
exports.easePoly = polyInOut;
|
| 248 |
+
exports.easePolyIn = polyIn;
|
| 249 |
+
exports.easePolyInOut = polyInOut;
|
| 250 |
+
exports.easePolyOut = polyOut;
|
| 251 |
+
exports.easeQuad = quadInOut;
|
| 252 |
+
exports.easeQuadIn = quadIn;
|
| 253 |
+
exports.easeQuadInOut = quadInOut;
|
| 254 |
+
exports.easeQuadOut = quadOut;
|
| 255 |
+
exports.easeSin = sinInOut;
|
| 256 |
+
exports.easeSinIn = sinIn;
|
| 257 |
+
exports.easeSinInOut = sinInOut;
|
| 258 |
+
exports.easeSinOut = sinOut;
|
| 259 |
+
|
| 260 |
+
Object.defineProperty(exports, '__esModule', { value: true });
|
| 261 |
+
|
| 262 |
+
})));
|
node_modules/d3-ease/dist/d3-ease.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// https://d3js.org/d3-ease/ v3.0.1 Copyright 2010-2021 Mike Bostock, 2001 Robert Penner
|
| 2 |
+
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((n="undefined"!=typeof globalThis?globalThis:n||self).d3=n.d3||{})}(this,(function(n){"use strict";function e(n){return((n*=2)<=1?n*n:--n*(2-n)+1)/2}function t(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var u=function n(e){function t(n){return Math.pow(n,e)}return e=+e,t.exponent=n,t}(3),r=function n(e){function t(n){return 1-Math.pow(1-n,e)}return e=+e,t.exponent=n,t}(3),a=function n(e){function t(n){return((n*=2)<=1?Math.pow(n,e):2-Math.pow(2-n,e))/2}return e=+e,t.exponent=n,t}(3),o=Math.PI,i=o/2;function c(n){return(1-Math.cos(o*n))/2}function s(n){return 1.0009775171065494*(Math.pow(2,-10*n)-.0009765625)}function f(n){return((n*=2)<=1?s(1-n):2-s(n-1))/2}function h(n){return((n*=2)<=1?1-Math.sqrt(1-n*n):Math.sqrt(1-(n-=2)*n)+1)/2}var p=4/11,M=7.5625;function d(n){return(n=+n)<p?M*n*n:n<.7272727272727273?M*(n-=.5454545454545454)*n+.75:n<.9090909090909091?M*(n-=.8181818181818182)*n+.9375:M*(n-=.9545454545454546)*n+.984375}var l=1.70158,I=function n(e){function t(n){return(n=+n)*n*(e*(n-1)+n)}return e=+e,t.overshoot=n,t}(l),O=function n(e){function t(n){return--n*n*((n+1)*e+n)+1}return e=+e,t.overshoot=n,t}(l),x=function n(e){function t(n){return((n*=2)<1?n*n*((e+1)*n-e):(n-=2)*n*((e+1)*n+e)+2)/2}return e=+e,t.overshoot=n,t}(l),v=2*Math.PI,y=function n(e,t){var u=Math.asin(1/(e=Math.max(1,e)))*(t/=v);function r(n){return e*s(- --n)*Math.sin((u-n)/t)}return r.amplitude=function(e){return n(e,t*v)},r.period=function(t){return n(e,t)},r}(1,.3),b=function n(e,t){var u=Math.asin(1/(e=Math.max(1,e)))*(t/=v);function r(n){return 1-e*s(n=+n)*Math.sin((n+u)/t)}return r.amplitude=function(e){return n(e,t*v)},r.period=function(t){return n(e,t)},r}(1,.3),m=function n(e,t){var u=Math.asin(1/(e=Math.max(1,e)))*(t/=v);function r(n){return((n=2*n-1)<0?e*s(-n)*Math.sin((u-n)/t):2-e*s(n)*Math.sin((u+n)/t))/2}return r.amplitude=function(e){return n(e,t*v)},r.period=function(t){return n(e,t)},r}(1,.3);n.easeBack=x,n.easeBackIn=I,n.easeBackInOut=x,n.easeBackOut=O,n.easeBounce=d,n.easeBounceIn=function(n){return 1-d(1-n)},n.easeBounceInOut=function(n){return((n*=2)<=1?1-d(1-n):d(n-1)+1)/2},n.easeBounceOut=d,n.easeCircle=h,n.easeCircleIn=function(n){return 1-Math.sqrt(1-n*n)},n.easeCircleInOut=h,n.easeCircleOut=function(n){return Math.sqrt(1- --n*n)},n.easeCubic=t,n.easeCubicIn=function(n){return n*n*n},n.easeCubicInOut=t,n.easeCubicOut=function(n){return--n*n*n+1},n.easeElastic=b,n.easeElasticIn=y,n.easeElasticInOut=m,n.easeElasticOut=b,n.easeExp=f,n.easeExpIn=function(n){return s(1-+n)},n.easeExpInOut=f,n.easeExpOut=function(n){return 1-s(n)},n.easeLinear=n=>+n,n.easePoly=a,n.easePolyIn=u,n.easePolyInOut=a,n.easePolyOut=r,n.easeQuad=e,n.easeQuadIn=function(n){return n*n},n.easeQuadInOut=e,n.easeQuadOut=function(n){return n*(2-n)},n.easeSin=c,n.easeSinIn=function(n){return 1==+n?1:1-Math.cos(n*i)},n.easeSinInOut=c,n.easeSinOut=function(n){return Math.sin(n*i)},Object.defineProperty(n,"__esModule",{value:!0})}));
|
node_modules/d3-ease/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "d3-ease",
|
| 3 |
+
"version": "3.0.1",
|
| 4 |
+
"description": "Easing functions for smooth animation.",
|
| 5 |
+
"homepage": "https://d3js.org/d3-ease/",
|
| 6 |
+
"repository": {
|
| 7 |
+
"type": "git",
|
| 8 |
+
"url": "https://github.com/d3/d3-ease.git"
|
| 9 |
+
},
|
| 10 |
+
"keywords": [
|
| 11 |
+
"d3",
|
| 12 |
+
"d3-module",
|
| 13 |
+
"ease",
|
| 14 |
+
"easing",
|
| 15 |
+
"animation",
|
| 16 |
+
"transition"
|
| 17 |
+
],
|
| 18 |
+
"license": "BSD-3-Clause",
|
| 19 |
+
"author": {
|
| 20 |
+
"name": "Mike Bostock",
|
| 21 |
+
"url": "http://bost.ocks.org/mike"
|
| 22 |
+
},
|
| 23 |
+
"type": "module",
|
| 24 |
+
"files": [
|
| 25 |
+
"dist/**/*.js",
|
| 26 |
+
"src/**/*.js"
|
| 27 |
+
],
|
| 28 |
+
"module": "src/index.js",
|
| 29 |
+
"main": "src/index.js",
|
| 30 |
+
"jsdelivr": "dist/d3-ease.min.js",
|
| 31 |
+
"unpkg": "dist/d3-ease.min.js",
|
| 32 |
+
"exports": {
|
| 33 |
+
"umd": "./dist/d3-ease.min.js",
|
| 34 |
+
"default": "./src/index.js"
|
| 35 |
+
},
|
| 36 |
+
"sideEffects": false,
|
| 37 |
+
"devDependencies": {
|
| 38 |
+
"eslint": "7",
|
| 39 |
+
"mocha": "8",
|
| 40 |
+
"rollup": "2",
|
| 41 |
+
"rollup-plugin-terser": "7"
|
| 42 |
+
},
|
| 43 |
+
"scripts": {
|
| 44 |
+
"test": "mocha 'test/**/*-test.js' && eslint src test",
|
| 45 |
+
"prepublishOnly": "rm -rf dist && yarn test && rollup -c",
|
| 46 |
+
"postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd -"
|
| 47 |
+
},
|
| 48 |
+
"engines": {
|
| 49 |
+
"node": ">=12"
|
| 50 |
+
}
|
| 51 |
+
}
|
node_modules/d3-ease/src/back.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var overshoot = 1.70158;
|
| 2 |
+
|
| 3 |
+
export var backIn = (function custom(s) {
|
| 4 |
+
s = +s;
|
| 5 |
+
|
| 6 |
+
function backIn(t) {
|
| 7 |
+
return (t = +t) * t * (s * (t - 1) + t);
|
| 8 |
+
}
|
| 9 |
+
|
| 10 |
+
backIn.overshoot = custom;
|
| 11 |
+
|
| 12 |
+
return backIn;
|
| 13 |
+
})(overshoot);
|
| 14 |
+
|
| 15 |
+
export var backOut = (function custom(s) {
|
| 16 |
+
s = +s;
|
| 17 |
+
|
| 18 |
+
function backOut(t) {
|
| 19 |
+
return --t * t * ((t + 1) * s + t) + 1;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
backOut.overshoot = custom;
|
| 23 |
+
|
| 24 |
+
return backOut;
|
| 25 |
+
})(overshoot);
|
| 26 |
+
|
| 27 |
+
export var backInOut = (function custom(s) {
|
| 28 |
+
s = +s;
|
| 29 |
+
|
| 30 |
+
function backInOut(t) {
|
| 31 |
+
return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
backInOut.overshoot = custom;
|
| 35 |
+
|
| 36 |
+
return backInOut;
|
| 37 |
+
})(overshoot);
|
node_modules/d3-ease/src/bounce.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var b1 = 4 / 11,
|
| 2 |
+
b2 = 6 / 11,
|
| 3 |
+
b3 = 8 / 11,
|
| 4 |
+
b4 = 3 / 4,
|
| 5 |
+
b5 = 9 / 11,
|
| 6 |
+
b6 = 10 / 11,
|
| 7 |
+
b7 = 15 / 16,
|
| 8 |
+
b8 = 21 / 22,
|
| 9 |
+
b9 = 63 / 64,
|
| 10 |
+
b0 = 1 / b1 / b1;
|
| 11 |
+
|
| 12 |
+
export function bounceIn(t) {
|
| 13 |
+
return 1 - bounceOut(1 - t);
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
export function bounceOut(t) {
|
| 17 |
+
return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
export function bounceInOut(t) {
|
| 21 |
+
return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;
|
| 22 |
+
}
|
node_modules/d3-ease/src/circle.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export function circleIn(t) {
|
| 2 |
+
return 1 - Math.sqrt(1 - t * t);
|
| 3 |
+
}
|
| 4 |
+
|
| 5 |
+
export function circleOut(t) {
|
| 6 |
+
return Math.sqrt(1 - --t * t);
|
| 7 |
+
}
|
| 8 |
+
|
| 9 |
+
export function circleInOut(t) {
|
| 10 |
+
return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;
|
| 11 |
+
}
|
node_modules/d3-ease/src/cubic.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export function cubicIn(t) {
|
| 2 |
+
return t * t * t;
|
| 3 |
+
}
|
| 4 |
+
|
| 5 |
+
export function cubicOut(t) {
|
| 6 |
+
return --t * t * t + 1;
|
| 7 |
+
}
|
| 8 |
+
|
| 9 |
+
export function cubicInOut(t) {
|
| 10 |
+
return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
|
| 11 |
+
}
|
node_modules/d3-ease/src/elastic.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import {tpmt} from "./math.js";
|
| 2 |
+
|
| 3 |
+
var tau = 2 * Math.PI,
|
| 4 |
+
amplitude = 1,
|
| 5 |
+
period = 0.3;
|
| 6 |
+
|
| 7 |
+
export var elasticIn = (function custom(a, p) {
|
| 8 |
+
var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);
|
| 9 |
+
|
| 10 |
+
function elasticIn(t) {
|
| 11 |
+
return a * tpmt(-(--t)) * Math.sin((s - t) / p);
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
elasticIn.amplitude = function(a) { return custom(a, p * tau); };
|
| 15 |
+
elasticIn.period = function(p) { return custom(a, p); };
|
| 16 |
+
|
| 17 |
+
return elasticIn;
|
| 18 |
+
})(amplitude, period);
|
| 19 |
+
|
| 20 |
+
export var elasticOut = (function custom(a, p) {
|
| 21 |
+
var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);
|
| 22 |
+
|
| 23 |
+
function elasticOut(t) {
|
| 24 |
+
return 1 - a * tpmt(t = +t) * Math.sin((t + s) / p);
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
elasticOut.amplitude = function(a) { return custom(a, p * tau); };
|
| 28 |
+
elasticOut.period = function(p) { return custom(a, p); };
|
| 29 |
+
|
| 30 |
+
return elasticOut;
|
| 31 |
+
})(amplitude, period);
|
| 32 |
+
|
| 33 |
+
export var elasticInOut = (function custom(a, p) {
|
| 34 |
+
var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);
|
| 35 |
+
|
| 36 |
+
function elasticInOut(t) {
|
| 37 |
+
return ((t = t * 2 - 1) < 0
|
| 38 |
+
? a * tpmt(-t) * Math.sin((s - t) / p)
|
| 39 |
+
: 2 - a * tpmt(t) * Math.sin((s + t) / p)) / 2;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
elasticInOut.amplitude = function(a) { return custom(a, p * tau); };
|
| 43 |
+
elasticInOut.period = function(p) { return custom(a, p); };
|
| 44 |
+
|
| 45 |
+
return elasticInOut;
|
| 46 |
+
})(amplitude, period);
|
node_modules/d3-ease/src/exp.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import {tpmt} from "./math.js";
|
| 2 |
+
|
| 3 |
+
export function expIn(t) {
|
| 4 |
+
return tpmt(1 - +t);
|
| 5 |
+
}
|
| 6 |
+
|
| 7 |
+
export function expOut(t) {
|
| 8 |
+
return 1 - tpmt(t);
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
export function expInOut(t) {
|
| 12 |
+
return ((t *= 2) <= 1 ? tpmt(1 - t) : 2 - tpmt(t - 1)) / 2;
|
| 13 |
+
}
|
node_modules/d3-ease/src/index.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export {
|
| 2 |
+
linear as easeLinear
|
| 3 |
+
} from "./linear.js";
|
| 4 |
+
|
| 5 |
+
export {
|
| 6 |
+
quadInOut as easeQuad,
|
| 7 |
+
quadIn as easeQuadIn,
|
| 8 |
+
quadOut as easeQuadOut,
|
| 9 |
+
quadInOut as easeQuadInOut
|
| 10 |
+
} from "./quad.js";
|
| 11 |
+
|
| 12 |
+
export {
|
| 13 |
+
cubicInOut as easeCubic,
|
| 14 |
+
cubicIn as easeCubicIn,
|
| 15 |
+
cubicOut as easeCubicOut,
|
| 16 |
+
cubicInOut as easeCubicInOut
|
| 17 |
+
} from "./cubic.js";
|
| 18 |
+
|
| 19 |
+
export {
|
| 20 |
+
polyInOut as easePoly,
|
| 21 |
+
polyIn as easePolyIn,
|
| 22 |
+
polyOut as easePolyOut,
|
| 23 |
+
polyInOut as easePolyInOut
|
| 24 |
+
} from "./poly.js";
|
| 25 |
+
|
| 26 |
+
export {
|
| 27 |
+
sinInOut as easeSin,
|
| 28 |
+
sinIn as easeSinIn,
|
| 29 |
+
sinOut as easeSinOut,
|
| 30 |
+
sinInOut as easeSinInOut
|
| 31 |
+
} from "./sin.js";
|
| 32 |
+
|
| 33 |
+
export {
|
| 34 |
+
expInOut as easeExp,
|
| 35 |
+
expIn as easeExpIn,
|
| 36 |
+
expOut as easeExpOut,
|
| 37 |
+
expInOut as easeExpInOut
|
| 38 |
+
} from "./exp.js";
|
| 39 |
+
|
| 40 |
+
export {
|
| 41 |
+
circleInOut as easeCircle,
|
| 42 |
+
circleIn as easeCircleIn,
|
| 43 |
+
circleOut as easeCircleOut,
|
| 44 |
+
circleInOut as easeCircleInOut
|
| 45 |
+
} from "./circle.js";
|
| 46 |
+
|
| 47 |
+
export {
|
| 48 |
+
bounceOut as easeBounce,
|
| 49 |
+
bounceIn as easeBounceIn,
|
| 50 |
+
bounceOut as easeBounceOut,
|
| 51 |
+
bounceInOut as easeBounceInOut
|
| 52 |
+
} from "./bounce.js";
|
| 53 |
+
|
| 54 |
+
export {
|
| 55 |
+
backInOut as easeBack,
|
| 56 |
+
backIn as easeBackIn,
|
| 57 |
+
backOut as easeBackOut,
|
| 58 |
+
backInOut as easeBackInOut
|
| 59 |
+
} from "./back.js";
|
| 60 |
+
|
| 61 |
+
export {
|
| 62 |
+
elasticOut as easeElastic,
|
| 63 |
+
elasticIn as easeElasticIn,
|
| 64 |
+
elasticOut as easeElasticOut,
|
| 65 |
+
elasticInOut as easeElasticInOut
|
| 66 |
+
} from "./elastic.js";
|
node_modules/d3-ease/src/linear.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
export const linear = t => +t;
|
node_modules/d3-ease/src/math.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// tpmt is two power minus ten times t scaled to [0,1]
|
| 2 |
+
export function tpmt(x) {
|
| 3 |
+
return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494;
|
| 4 |
+
}
|
node_modules/d3-ease/src/poly.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var exponent = 3;
|
| 2 |
+
|
| 3 |
+
export var polyIn = (function custom(e) {
|
| 4 |
+
e = +e;
|
| 5 |
+
|
| 6 |
+
function polyIn(t) {
|
| 7 |
+
return Math.pow(t, e);
|
| 8 |
+
}
|
| 9 |
+
|
| 10 |
+
polyIn.exponent = custom;
|
| 11 |
+
|
| 12 |
+
return polyIn;
|
| 13 |
+
})(exponent);
|
| 14 |
+
|
| 15 |
+
export var polyOut = (function custom(e) {
|
| 16 |
+
e = +e;
|
| 17 |
+
|
| 18 |
+
function polyOut(t) {
|
| 19 |
+
return 1 - Math.pow(1 - t, e);
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
polyOut.exponent = custom;
|
| 23 |
+
|
| 24 |
+
return polyOut;
|
| 25 |
+
})(exponent);
|
| 26 |
+
|
| 27 |
+
export var polyInOut = (function custom(e) {
|
| 28 |
+
e = +e;
|
| 29 |
+
|
| 30 |
+
function polyInOut(t) {
|
| 31 |
+
return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
polyInOut.exponent = custom;
|
| 35 |
+
|
| 36 |
+
return polyInOut;
|
| 37 |
+
})(exponent);
|
node_modules/d3-ease/src/quad.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export function quadIn(t) {
|
| 2 |
+
return t * t;
|
| 3 |
+
}
|
| 4 |
+
|
| 5 |
+
export function quadOut(t) {
|
| 6 |
+
return t * (2 - t);
|
| 7 |
+
}
|
| 8 |
+
|
| 9 |
+
export function quadInOut(t) {
|
| 10 |
+
return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;
|
| 11 |
+
}
|
node_modules/d3-ease/src/sin.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var pi = Math.PI,
|
| 2 |
+
halfPi = pi / 2;
|
| 3 |
+
|
| 4 |
+
export function sinIn(t) {
|
| 5 |
+
return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi);
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
export function sinOut(t) {
|
| 9 |
+
return Math.sin(t * halfPi);
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
export function sinInOut(t) {
|
| 13 |
+
return (1 - Math.cos(pi * t)) / 2;
|
| 14 |
+
}
|
node_modules/d3-format/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copyright 2010-2026 Mike Bostock
|
| 2 |
+
|
| 3 |
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
| 4 |
+
with or without fee is hereby granted, provided that the above copyright notice
|
| 5 |
+
and this permission notice appear in all copies.
|
| 6 |
+
|
| 7 |
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
| 8 |
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
| 9 |
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
| 10 |
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
| 11 |
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
| 12 |
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
| 13 |
+
THIS SOFTWARE.
|
node_modules/d3-format/README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# d3-format
|
| 2 |
+
|
| 3 |
+
<a href="https://d3js.org"><img src="https://github.com/d3/d3/raw/main/docs/public/logo.svg" width="256" height="256"></a>
|
| 4 |
+
|
| 5 |
+
This module formats numbers for human consumption, with a consistent output allowing comparison. Grouped digits, currencies, scientific notation…
|
| 6 |
+
|
| 7 |
+
## Resources
|
| 8 |
+
|
| 9 |
+
- [Documentation](https://d3js.org/d3-format)
|
| 10 |
+
- [Examples](https://observablehq.com/@d3/d3-format)
|
| 11 |
+
- [Releases](https://github.com/d3/d3-format/releases)
|
| 12 |
+
- [Getting help](https://d3js.org/community)
|
node_modules/d3-format/dist/d3-format.js
ADDED
|
@@ -0,0 +1,342 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// https://d3js.org/d3-format/ v3.1.2 Copyright 2010-2026 Mike Bostock
|
| 2 |
+
(function (global, factory) {
|
| 3 |
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
| 4 |
+
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
| 5 |
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.d3 = global.d3 || {}));
|
| 6 |
+
})(this, (function (exports) { 'use strict';
|
| 7 |
+
|
| 8 |
+
function formatDecimal(x) {
|
| 9 |
+
return Math.abs(x = Math.round(x)) >= 1e21
|
| 10 |
+
? x.toLocaleString("en").replace(/,/g, "")
|
| 11 |
+
: x.toString(10);
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
// Computes the decimal coefficient and exponent of the specified number x with
|
| 15 |
+
// significant digits p, where x is positive and p is in [1, 21] or undefined.
|
| 16 |
+
// For example, formatDecimalParts(1.23) returns ["123", 0].
|
| 17 |
+
function formatDecimalParts(x, p) {
|
| 18 |
+
if (!isFinite(x) || x === 0) return null; // NaN, ±Infinity, ±0
|
| 19 |
+
var i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e"), coefficient = x.slice(0, i);
|
| 20 |
+
|
| 21 |
+
// The string returned by toExponential either has the form \d\.\d+e[-+]\d+
|
| 22 |
+
// (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3).
|
| 23 |
+
return [
|
| 24 |
+
coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
|
| 25 |
+
+x.slice(i + 1)
|
| 26 |
+
];
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
function exponent(x) {
|
| 30 |
+
return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
function formatGroup(grouping, thousands) {
|
| 34 |
+
return function(value, width) {
|
| 35 |
+
var i = value.length,
|
| 36 |
+
t = [],
|
| 37 |
+
j = 0,
|
| 38 |
+
g = grouping[0],
|
| 39 |
+
length = 0;
|
| 40 |
+
|
| 41 |
+
while (i > 0 && g > 0) {
|
| 42 |
+
if (length + g + 1 > width) g = Math.max(1, width - length);
|
| 43 |
+
t.push(value.substring(i -= g, i + g));
|
| 44 |
+
if ((length += g + 1) > width) break;
|
| 45 |
+
g = grouping[j = (j + 1) % grouping.length];
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
return t.reverse().join(thousands);
|
| 49 |
+
};
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
function formatNumerals(numerals) {
|
| 53 |
+
return function(value) {
|
| 54 |
+
return value.replace(/[0-9]/g, function(i) {
|
| 55 |
+
return numerals[+i];
|
| 56 |
+
});
|
| 57 |
+
};
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
// [[fill]align][sign][symbol][0][width][,][.precision][~][type]
|
| 61 |
+
var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
| 62 |
+
|
| 63 |
+
function formatSpecifier(specifier) {
|
| 64 |
+
if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
|
| 65 |
+
var match;
|
| 66 |
+
return new FormatSpecifier({
|
| 67 |
+
fill: match[1],
|
| 68 |
+
align: match[2],
|
| 69 |
+
sign: match[3],
|
| 70 |
+
symbol: match[4],
|
| 71 |
+
zero: match[5],
|
| 72 |
+
width: match[6],
|
| 73 |
+
comma: match[7],
|
| 74 |
+
precision: match[8] && match[8].slice(1),
|
| 75 |
+
trim: match[9],
|
| 76 |
+
type: match[10]
|
| 77 |
+
});
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof
|
| 81 |
+
|
| 82 |
+
function FormatSpecifier(specifier) {
|
| 83 |
+
this.fill = specifier.fill === undefined ? " " : specifier.fill + "";
|
| 84 |
+
this.align = specifier.align === undefined ? ">" : specifier.align + "";
|
| 85 |
+
this.sign = specifier.sign === undefined ? "-" : specifier.sign + "";
|
| 86 |
+
this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + "";
|
| 87 |
+
this.zero = !!specifier.zero;
|
| 88 |
+
this.width = specifier.width === undefined ? undefined : +specifier.width;
|
| 89 |
+
this.comma = !!specifier.comma;
|
| 90 |
+
this.precision = specifier.precision === undefined ? undefined : +specifier.precision;
|
| 91 |
+
this.trim = !!specifier.trim;
|
| 92 |
+
this.type = specifier.type === undefined ? "" : specifier.type + "";
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
FormatSpecifier.prototype.toString = function() {
|
| 96 |
+
return this.fill
|
| 97 |
+
+ this.align
|
| 98 |
+
+ this.sign
|
| 99 |
+
+ this.symbol
|
| 100 |
+
+ (this.zero ? "0" : "")
|
| 101 |
+
+ (this.width === undefined ? "" : Math.max(1, this.width | 0))
|
| 102 |
+
+ (this.comma ? "," : "")
|
| 103 |
+
+ (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0))
|
| 104 |
+
+ (this.trim ? "~" : "")
|
| 105 |
+
+ this.type;
|
| 106 |
+
};
|
| 107 |
+
|
| 108 |
+
// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.
|
| 109 |
+
function formatTrim(s) {
|
| 110 |
+
out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {
|
| 111 |
+
switch (s[i]) {
|
| 112 |
+
case ".": i0 = i1 = i; break;
|
| 113 |
+
case "0": if (i0 === 0) i0 = i; i1 = i; break;
|
| 114 |
+
default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;
|
| 115 |
+
}
|
| 116 |
+
}
|
| 117 |
+
return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
var prefixExponent;
|
| 121 |
+
|
| 122 |
+
function formatPrefixAuto(x, p) {
|
| 123 |
+
var d = formatDecimalParts(x, p);
|
| 124 |
+
if (!d) return prefixExponent = undefined, x.toPrecision(p);
|
| 125 |
+
var coefficient = d[0],
|
| 126 |
+
exponent = d[1],
|
| 127 |
+
i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,
|
| 128 |
+
n = coefficient.length;
|
| 129 |
+
return i === n ? coefficient
|
| 130 |
+
: i > n ? coefficient + new Array(i - n + 1).join("0")
|
| 131 |
+
: i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i)
|
| 132 |
+
: "0." + new Array(1 - i).join("0") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
function formatRounded(x, p) {
|
| 136 |
+
var d = formatDecimalParts(x, p);
|
| 137 |
+
if (!d) return x + "";
|
| 138 |
+
var coefficient = d[0],
|
| 139 |
+
exponent = d[1];
|
| 140 |
+
return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient
|
| 141 |
+
: coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1)
|
| 142 |
+
: coefficient + new Array(exponent - coefficient.length + 2).join("0");
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
var formatTypes = {
|
| 146 |
+
"%": (x, p) => (x * 100).toFixed(p),
|
| 147 |
+
"b": (x) => Math.round(x).toString(2),
|
| 148 |
+
"c": (x) => x + "",
|
| 149 |
+
"d": formatDecimal,
|
| 150 |
+
"e": (x, p) => x.toExponential(p),
|
| 151 |
+
"f": (x, p) => x.toFixed(p),
|
| 152 |
+
"g": (x, p) => x.toPrecision(p),
|
| 153 |
+
"o": (x) => Math.round(x).toString(8),
|
| 154 |
+
"p": (x, p) => formatRounded(x * 100, p),
|
| 155 |
+
"r": formatRounded,
|
| 156 |
+
"s": formatPrefixAuto,
|
| 157 |
+
"X": (x) => Math.round(x).toString(16).toUpperCase(),
|
| 158 |
+
"x": (x) => Math.round(x).toString(16)
|
| 159 |
+
};
|
| 160 |
+
|
| 161 |
+
function identity(x) {
|
| 162 |
+
return x;
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
var map = Array.prototype.map,
|
| 166 |
+
prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];
|
| 167 |
+
|
| 168 |
+
function formatLocale(locale) {
|
| 169 |
+
var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + ""),
|
| 170 |
+
currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "",
|
| 171 |
+
currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "",
|
| 172 |
+
decimal = locale.decimal === undefined ? "." : locale.decimal + "",
|
| 173 |
+
numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),
|
| 174 |
+
percent = locale.percent === undefined ? "%" : locale.percent + "",
|
| 175 |
+
minus = locale.minus === undefined ? "−" : locale.minus + "",
|
| 176 |
+
nan = locale.nan === undefined ? "NaN" : locale.nan + "";
|
| 177 |
+
|
| 178 |
+
function newFormat(specifier, options) {
|
| 179 |
+
specifier = formatSpecifier(specifier);
|
| 180 |
+
|
| 181 |
+
var fill = specifier.fill,
|
| 182 |
+
align = specifier.align,
|
| 183 |
+
sign = specifier.sign,
|
| 184 |
+
symbol = specifier.symbol,
|
| 185 |
+
zero = specifier.zero,
|
| 186 |
+
width = specifier.width,
|
| 187 |
+
comma = specifier.comma,
|
| 188 |
+
precision = specifier.precision,
|
| 189 |
+
trim = specifier.trim,
|
| 190 |
+
type = specifier.type;
|
| 191 |
+
|
| 192 |
+
// The "n" type is an alias for ",g".
|
| 193 |
+
if (type === "n") comma = true, type = "g";
|
| 194 |
+
|
| 195 |
+
// The "" type, and any invalid type, is an alias for ".12~g".
|
| 196 |
+
else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = "g";
|
| 197 |
+
|
| 198 |
+
// If zero fill is specified, padding goes after sign and before digits.
|
| 199 |
+
if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "=";
|
| 200 |
+
|
| 201 |
+
// Compute the prefix and suffix.
|
| 202 |
+
// For SI-prefix, the suffix is lazily computed.
|
| 203 |
+
var prefix = (options && options.prefix !== undefined ? options.prefix : "") + (symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : ""),
|
| 204 |
+
suffix = (symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "") + (options && options.suffix !== undefined ? options.suffix : "");
|
| 205 |
+
|
| 206 |
+
// What format function should we use?
|
| 207 |
+
// Is this an integer type?
|
| 208 |
+
// Can this type generate exponential notation?
|
| 209 |
+
var formatType = formatTypes[type],
|
| 210 |
+
maybeSuffix = /[defgprs%]/.test(type);
|
| 211 |
+
|
| 212 |
+
// Set the default precision if not specified,
|
| 213 |
+
// or clamp the specified precision to the supported range.
|
| 214 |
+
// For significant precision, it must be in [1, 21].
|
| 215 |
+
// For fixed precision, it must be in [0, 20].
|
| 216 |
+
precision = precision === undefined ? 6
|
| 217 |
+
: /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))
|
| 218 |
+
: Math.max(0, Math.min(20, precision));
|
| 219 |
+
|
| 220 |
+
function format(value) {
|
| 221 |
+
var valuePrefix = prefix,
|
| 222 |
+
valueSuffix = suffix,
|
| 223 |
+
i, n, c;
|
| 224 |
+
|
| 225 |
+
if (type === "c") {
|
| 226 |
+
valueSuffix = formatType(value) + valueSuffix;
|
| 227 |
+
value = "";
|
| 228 |
+
} else {
|
| 229 |
+
value = +value;
|
| 230 |
+
|
| 231 |
+
// Determine the sign. -0 is not less than 0, but 1 / -0 is!
|
| 232 |
+
var valueNegative = value < 0 || 1 / value < 0;
|
| 233 |
+
|
| 234 |
+
// Perform the initial formatting.
|
| 235 |
+
value = isNaN(value) ? nan : formatType(Math.abs(value), precision);
|
| 236 |
+
|
| 237 |
+
// Trim insignificant zeros.
|
| 238 |
+
if (trim) value = formatTrim(value);
|
| 239 |
+
|
| 240 |
+
// If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.
|
| 241 |
+
if (valueNegative && +value === 0 && sign !== "+") valueNegative = false;
|
| 242 |
+
|
| 243 |
+
// Compute the prefix and suffix.
|
| 244 |
+
valuePrefix = (valueNegative ? (sign === "(" ? sign : minus) : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
|
| 245 |
+
valueSuffix = (type === "s" && !isNaN(value) && prefixExponent !== undefined ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
|
| 246 |
+
|
| 247 |
+
// Break the formatted value into the integer “value” part that can be
|
| 248 |
+
// grouped, and fractional or exponential “suffix” part that is not.
|
| 249 |
+
if (maybeSuffix) {
|
| 250 |
+
i = -1, n = value.length;
|
| 251 |
+
while (++i < n) {
|
| 252 |
+
if (c = value.charCodeAt(i), 48 > c || c > 57) {
|
| 253 |
+
valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
|
| 254 |
+
value = value.slice(0, i);
|
| 255 |
+
break;
|
| 256 |
+
}
|
| 257 |
+
}
|
| 258 |
+
}
|
| 259 |
+
}
|
| 260 |
+
|
| 261 |
+
// If the fill character is not "0", grouping is applied before padding.
|
| 262 |
+
if (comma && !zero) value = group(value, Infinity);
|
| 263 |
+
|
| 264 |
+
// Compute the padding.
|
| 265 |
+
var length = valuePrefix.length + value.length + valueSuffix.length,
|
| 266 |
+
padding = length < width ? new Array(width - length + 1).join(fill) : "";
|
| 267 |
+
|
| 268 |
+
// If the fill character is "0", grouping is applied after padding.
|
| 269 |
+
if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
|
| 270 |
+
|
| 271 |
+
// Reconstruct the final output based on the desired alignment.
|
| 272 |
+
switch (align) {
|
| 273 |
+
case "<": value = valuePrefix + value + valueSuffix + padding; break;
|
| 274 |
+
case "=": value = valuePrefix + padding + value + valueSuffix; break;
|
| 275 |
+
case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;
|
| 276 |
+
default: value = padding + valuePrefix + value + valueSuffix; break;
|
| 277 |
+
}
|
| 278 |
+
|
| 279 |
+
return numerals(value);
|
| 280 |
+
}
|
| 281 |
+
|
| 282 |
+
format.toString = function() {
|
| 283 |
+
return specifier + "";
|
| 284 |
+
};
|
| 285 |
+
|
| 286 |
+
return format;
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
function formatPrefix(specifier, value) {
|
| 290 |
+
var e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,
|
| 291 |
+
k = Math.pow(10, -e),
|
| 292 |
+
f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier), {suffix: prefixes[8 + e / 3]});
|
| 293 |
+
return function(value) {
|
| 294 |
+
return f(k * value);
|
| 295 |
+
};
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
return {
|
| 299 |
+
format: newFormat,
|
| 300 |
+
formatPrefix: formatPrefix
|
| 301 |
+
};
|
| 302 |
+
}
|
| 303 |
+
|
| 304 |
+
var locale;
|
| 305 |
+
exports.format = void 0;
|
| 306 |
+
exports.formatPrefix = void 0;
|
| 307 |
+
|
| 308 |
+
defaultLocale({
|
| 309 |
+
thousands: ",",
|
| 310 |
+
grouping: [3],
|
| 311 |
+
currency: ["$", ""]
|
| 312 |
+
});
|
| 313 |
+
|
| 314 |
+
function defaultLocale(definition) {
|
| 315 |
+
locale = formatLocale(definition);
|
| 316 |
+
exports.format = locale.format;
|
| 317 |
+
exports.formatPrefix = locale.formatPrefix;
|
| 318 |
+
return locale;
|
| 319 |
+
}
|
| 320 |
+
|
| 321 |
+
function precisionFixed(step) {
|
| 322 |
+
return Math.max(0, -exponent(Math.abs(step)));
|
| 323 |
+
}
|
| 324 |
+
|
| 325 |
+
function precisionPrefix(step, value) {
|
| 326 |
+
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));
|
| 327 |
+
}
|
| 328 |
+
|
| 329 |
+
function precisionRound(step, max) {
|
| 330 |
+
step = Math.abs(step), max = Math.abs(max) - step;
|
| 331 |
+
return Math.max(0, exponent(max) - exponent(step)) + 1;
|
| 332 |
+
}
|
| 333 |
+
|
| 334 |
+
exports.FormatSpecifier = FormatSpecifier;
|
| 335 |
+
exports.formatDefaultLocale = defaultLocale;
|
| 336 |
+
exports.formatLocale = formatLocale;
|
| 337 |
+
exports.formatSpecifier = formatSpecifier;
|
| 338 |
+
exports.precisionFixed = precisionFixed;
|
| 339 |
+
exports.precisionPrefix = precisionPrefix;
|
| 340 |
+
exports.precisionRound = precisionRound;
|
| 341 |
+
|
| 342 |
+
}));
|
node_modules/d3-format/dist/d3-format.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// https://d3js.org/d3-format/ v3.1.2 Copyright 2010-2026 Mike Bostock
|
| 2 |
+
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i((t="undefined"!=typeof globalThis?globalThis:t||self).d3=t.d3||{})}(this,function(t){"use strict";function i(t,i){if(!isFinite(t)||0===t)return null;var r=(t=i?t.toExponential(i-1):t.toExponential()).indexOf("e"),n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function r(t){return(t=i(Math.abs(t)))?t[1]:NaN}var n,e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(t){if(!(i=e.exec(t)))throw new Error("invalid format: "+t);var i;return new a({fill:i[1],align:i[2],sign:i[3],symbol:i[4],zero:i[5],width:i[6],comma:i[7],precision:i[8]&&i[8].slice(1),trim:i[9],type:i[10]})}function a(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function s(t,r){var n=i(t,r);if(!n)return t+"";var e=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+e:e.length>o+1?e.slice(0,o+1)+"."+e.slice(o+1):e+new Array(o-e.length+2).join("0")}o.prototype=a.prototype,a.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var c={"%":(t,i)=>(100*t).toFixed(i),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,i)=>t.toExponential(i),f:(t,i)=>t.toFixed(i),g:(t,i)=>t.toPrecision(i),o:t=>Math.round(t).toString(8),p:(t,i)=>s(100*t,i),r:s,s:function(t,r){var e=i(t,r);if(!e)return n=void 0,t.toPrecision(r);var o=e[0],a=e[1],s=a-(n=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,c=o.length;return s===c?o:s>c?o+new Array(s-c+1).join("0"):s>0?o.slice(0,s)+"."+o.slice(s):"0."+new Array(1-s).join("0")+i(t,Math.max(0,r+s-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function f(t){return t}var u,h=Array.prototype.map,l=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function d(t){var i,e,a=void 0===t.grouping||void 0===t.thousands?f:(i=h.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var n=t.length,o=[],a=0,s=i[0],c=0;n>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),o.push(t.substring(n-=s,n+s)),!((c+=s+1)>r));)s=i[a=(a+1)%i.length];return o.reverse().join(e)}),s=void 0===t.currency?"":t.currency[0]+"",u=void 0===t.currency?"":t.currency[1]+"",d=void 0===t.decimal?".":t.decimal+"",m=void 0===t.numerals?f:function(t){return function(i){return i.replace(/[0-9]/g,function(i){return t[+i]})}}(h.call(t.numerals,String)),p=void 0===t.percent?"%":t.percent+"",g=void 0===t.minus?"−":t.minus+"",v=void 0===t.nan?"NaN":t.nan+"";function x(t,i){var r=(t=o(t)).fill,e=t.align,f=t.sign,h=t.symbol,x=t.zero,M=t.width,y=t.comma,b=t.precision,w=t.trim,S=t.type;"n"===S?(y=!0,S="g"):c[S]||(void 0===b&&(b=12),w=!0,S="g"),(x||"0"===r&&"="===e)&&(x=!0,r="0",e="=");var N=(i&&void 0!==i.prefix?i.prefix:"")+("$"===h?s:"#"===h&&/[boxX]/.test(S)?"0"+S.toLowerCase():""),k=("$"===h?u:/[%p]/.test(S)?p:"")+(i&&void 0!==i.suffix?i.suffix:""),P=c[S],j=/[defgprs%]/.test(S);function z(t){var i,o,s,c=N,u=k;if("c"===S)u=P(t)+u,t="";else{var h=(t=+t)<0||1/t<0;if(t=isNaN(t)?v:P(Math.abs(t),b),w&&(t=function(t){t:for(var i,r=t.length,n=1,e=-1;n<r;++n)switch(t[n]){case".":e=i=n;break;case"0":0===e&&(e=n),i=n;break;default:if(!+t[n])break t;e>0&&(e=0)}return e>0?t.slice(0,e)+t.slice(i+1):t}(t)),h&&0===+t&&"+"!==f&&(h=!1),c=(h?"("===f?f:g:"-"===f||"("===f?"":f)+c,u=("s"!==S||isNaN(t)||void 0===n?"":l[8+n/3])+u+(h&&"("===f?")":""),j)for(i=-1,o=t.length;++i<o;)if(48>(s=t.charCodeAt(i))||s>57){u=(46===s?d+t.slice(i+1):t.slice(i))+u,t=t.slice(0,i);break}}y&&!x&&(t=a(t,1/0));var p=c.length+t.length+u.length,z=p<M?new Array(M-p+1).join(r):"";switch(y&&x&&(t=a(z+t,z.length?M-u.length:1/0),z=""),e){case"<":t=c+t+u+z;break;case"=":t=c+z+t+u;break;case"^":t=z.slice(0,p=z.length>>1)+c+t+u+z.slice(p);break;default:t=z+c+t+u}return m(t)}return b=void 0===b?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),z.toString=function(){return t+""},z}return{format:x,formatPrefix:function(t,i){var n=3*Math.max(-8,Math.min(8,Math.floor(r(i)/3))),e=Math.pow(10,-n),a=x(((t=o(t)).type="f",t),{suffix:l[8+n/3]});return function(t){return a(e*t)}}}}function m(i){return u=d(i),t.format=u.format,t.formatPrefix=u.formatPrefix,u}t.format=void 0,t.formatPrefix=void 0,m({thousands:",",grouping:[3],currency:["$",""]}),t.FormatSpecifier=a,t.formatDefaultLocale=m,t.formatLocale=d,t.formatSpecifier=o,t.precisionFixed=function(t){return Math.max(0,-r(Math.abs(t)))},t.precisionPrefix=function(t,i){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(r(i)/3)))-r(Math.abs(t)))},t.precisionRound=function(t,i){return t=Math.abs(t),i=Math.abs(i)-t,Math.max(0,r(i)-r(t))+1}});
|
node_modules/d3-format/locale/ar-001.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["", ""],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|
node_modules/d3-format/locale/ar-AE.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["", " \u062f\u002e\u0625\u002e"],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|
node_modules/d3-format/locale/ar-BH.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["", " \u062f\u002e\u0628\u002e"],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|
node_modules/d3-format/locale/ar-DJ.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["\u200f\u0046\u0064\u006a ", ""],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|
node_modules/d3-format/locale/ar-DZ.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u002c",
|
| 3 |
+
"thousands": "\u002e",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["\u062f\u002e\u062c\u002e ", ""]
|
| 6 |
+
}
|
node_modules/d3-format/locale/ar-EG.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["", " \u062c\u002e\u0645\u002e"],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|
node_modules/d3-format/locale/ar-EH.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u002e",
|
| 3 |
+
"thousands": "\u002c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["\u062f\u002e\u0645\u002e ", ""]
|
| 6 |
+
}
|
node_modules/d3-format/locale/ar-ER.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["\u004e\u0066\u006b ", ""],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|
node_modules/d3-format/locale/ar-IL.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["\u20aa ", ""],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|
node_modules/d3-format/locale/ar-IQ.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["", " \u062f\u002e\u0639\u002e"],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|
node_modules/d3-format/locale/ar-JO.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["", " \u062f\u002e\u0623\u002e"],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|
node_modules/d3-format/locale/ar-KM.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["", " \u0641\u002e\u062c\u002e\u0642\u002e"],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|
node_modules/d3-format/locale/ar-KW.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["", " \u062f\u002e\u0643\u002e"],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|
node_modules/d3-format/locale/ar-LB.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["", " \u0644\u002e\u0644\u002e"],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|
node_modules/d3-format/locale/ar-LY.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u002c",
|
| 3 |
+
"thousands": "\u002e",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["\u062f\u002e\u0644\u002e ", ""]
|
| 6 |
+
}
|
node_modules/d3-format/locale/ar-MA.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u002c",
|
| 3 |
+
"thousands": "\u002e",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["\u062f\u002e\u0645\u002e ", ""]
|
| 6 |
+
}
|
node_modules/d3-format/locale/ar-MR.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["", " \u0623\u002e\u0645\u002e"],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|
node_modules/d3-format/locale/ar-OM.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["", " \u0631\u002e\u0639\u002e"],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|
node_modules/d3-format/locale/ar-PS.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["\u20aa ", ""],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|
node_modules/d3-format/locale/ar-QA.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["", " \u0631\u002e\u0642\u002e"],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|
node_modules/d3-format/locale/ar-SA.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["", " \u0631\u002e\u0633\u002e"],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|
node_modules/d3-format/locale/ar-SD.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["", " \u062c\u002e\u0633\u002e"],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|
node_modules/d3-format/locale/ar-SO.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["\u200f\u0053 ", ""],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|
node_modules/d3-format/locale/ar-SS.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decimal": "\u066b",
|
| 3 |
+
"thousands": "\u066c",
|
| 4 |
+
"grouping": [3],
|
| 5 |
+
"currency": ["\u00a3 ", ""],
|
| 6 |
+
"numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
|
| 7 |
+
}
|