diff --git a/.vuepress/.cache/deps/c4Diagram-4de0d805-OPSDSO4B.js b/.vuepress/.cache/deps/c4Diagram-4de0d805-OPSDSO4B.js
new file mode 100644
index 00000000..9d02e36b
--- /dev/null
+++ b/.vuepress/.cache/deps/c4Diagram-4de0d805-OPSDSO4B.js
@@ -0,0 +1,2522 @@
+import {
+ drawRect,
+ getNoteRect
+} from "./chunk-NSOH2RQP.js";
+import {
+ assignWithDepth$1,
+ calculateTextHeight,
+ calculateTextWidth,
+ common$1,
+ configureSvgSize,
+ getAccDescription,
+ getAccTitle,
+ getConfig$1,
+ log$1,
+ mermaidAPI,
+ require_dayjs_min,
+ require_dist,
+ sanitizeText$2,
+ select_default,
+ setAccDescription,
+ setAccTitle,
+ wrapLabel
+} from "./chunk-4QTAVOE5.js";
+import {
+ __toESM
+} from "./chunk-HM4MQYWN.js";
+
+// node_modules/mermaid/dist/c4Diagram-4de0d805.js
+var import_sanitize_url = __toESM(require_dist(), 1);
+var import_dayjs = __toESM(require_dayjs_min(), 1);
+var parser = function() {
+ var o = function(k, v, o2, l) {
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
+ ;
+ return o2;
+ }, $V0 = [1, 6], $V1 = [1, 7], $V2 = [1, 8], $V3 = [1, 9], $V4 = [1, 16], $V5 = [1, 11], $V6 = [1, 12], $V7 = [1, 13], $V8 = [1, 14], $V9 = [1, 15], $Va = [1, 27], $Vb = [1, 33], $Vc = [1, 34], $Vd = [1, 35], $Ve = [1, 36], $Vf = [1, 37], $Vg = [1, 72], $Vh = [1, 73], $Vi = [1, 74], $Vj = [1, 75], $Vk = [1, 76], $Vl = [1, 77], $Vm = [1, 78], $Vn = [1, 38], $Vo = [1, 39], $Vp = [1, 40], $Vq = [1, 41], $Vr = [1, 42], $Vs = [1, 43], $Vt = [1, 44], $Vu = [1, 45], $Vv = [1, 46], $Vw = [1, 47], $Vx = [1, 48], $Vy = [1, 49], $Vz = [1, 50], $VA = [1, 51], $VB = [1, 52], $VC = [1, 53], $VD = [1, 54], $VE = [1, 55], $VF = [1, 56], $VG = [1, 57], $VH = [1, 59], $VI = [1, 60], $VJ = [1, 61], $VK = [1, 62], $VL = [1, 63], $VM = [1, 64], $VN = [1, 65], $VO = [1, 66], $VP = [1, 67], $VQ = [1, 68], $VR = [1, 69], $VS = [24, 52], $VT = [24, 44, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84], $VU = [15, 24, 44, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84], $VV = [1, 94], $VW = [1, 95], $VX = [1, 96], $VY = [1, 97], $VZ = [15, 24, 52], $V_ = [7, 8, 9, 10, 18, 22, 25, 26, 27, 28], $V$ = [15, 24, 43, 52], $V01 = [15, 24, 43, 52, 86, 87, 89, 90], $V11 = [15, 43], $V21 = [44, 46, 47, 48, 49, 50, 51, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84];
+ var parser2 = {
+ trace: function trace() {
+ },
+ yy: {},
+ symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "direction": 5, "directive": 6, "direction_tb": 7, "direction_bt": 8, "direction_rl": 9, "direction_lr": 10, "graphConfig": 11, "openDirective": 12, "typeDirective": 13, "closeDirective": 14, "NEWLINE": 15, ":": 16, "argDirective": 17, "open_directive": 18, "type_directive": 19, "arg_directive": 20, "close_directive": 21, "C4_CONTEXT": 22, "statements": 23, "EOF": 24, "C4_CONTAINER": 25, "C4_COMPONENT": 26, "C4_DYNAMIC": 27, "C4_DEPLOYMENT": 28, "otherStatements": 29, "diagramStatements": 30, "otherStatement": 31, "title": 32, "accDescription": 33, "acc_title": 34, "acc_title_value": 35, "acc_descr": 36, "acc_descr_value": 37, "acc_descr_multiline_value": 38, "boundaryStatement": 39, "boundaryStartStatement": 40, "boundaryStopStatement": 41, "boundaryStart": 42, "LBRACE": 43, "ENTERPRISE_BOUNDARY": 44, "attributes": 45, "SYSTEM_BOUNDARY": 46, "BOUNDARY": 47, "CONTAINER_BOUNDARY": 48, "NODE": 49, "NODE_L": 50, "NODE_R": 51, "RBRACE": 52, "diagramStatement": 53, "PERSON": 54, "PERSON_EXT": 55, "SYSTEM": 56, "SYSTEM_DB": 57, "SYSTEM_QUEUE": 58, "SYSTEM_EXT": 59, "SYSTEM_EXT_DB": 60, "SYSTEM_EXT_QUEUE": 61, "CONTAINER": 62, "CONTAINER_DB": 63, "CONTAINER_QUEUE": 64, "CONTAINER_EXT": 65, "CONTAINER_EXT_DB": 66, "CONTAINER_EXT_QUEUE": 67, "COMPONENT": 68, "COMPONENT_DB": 69, "COMPONENT_QUEUE": 70, "COMPONENT_EXT": 71, "COMPONENT_EXT_DB": 72, "COMPONENT_EXT_QUEUE": 73, "REL": 74, "BIREL": 75, "REL_U": 76, "REL_D": 77, "REL_L": 78, "REL_R": 79, "REL_B": 80, "REL_INDEX": 81, "UPDATE_EL_STYLE": 82, "UPDATE_REL_STYLE": 83, "UPDATE_LAYOUT_CONFIG": 84, "attribute": 85, "STR": 86, "STR_KEY": 87, "STR_VALUE": 88, "ATTRIBUTE": 89, "ATTRIBUTE_EMPTY": 90, "$accept": 0, "$end": 1 },
+ terminals_: { 2: "error", 7: "direction_tb", 8: "direction_bt", 9: "direction_rl", 10: "direction_lr", 15: "NEWLINE", 16: ":", 18: "open_directive", 19: "type_directive", 20: "arg_directive", 21: "close_directive", 22: "C4_CONTEXT", 24: "EOF", 25: "C4_CONTAINER", 26: "C4_COMPONENT", 27: "C4_DYNAMIC", 28: "C4_DEPLOYMENT", 32: "title", 33: "accDescription", 34: "acc_title", 35: "acc_title_value", 36: "acc_descr", 37: "acc_descr_value", 38: "acc_descr_multiline_value", 43: "LBRACE", 44: "ENTERPRISE_BOUNDARY", 46: "SYSTEM_BOUNDARY", 47: "BOUNDARY", 48: "CONTAINER_BOUNDARY", 49: "NODE", 50: "NODE_L", 51: "NODE_R", 52: "RBRACE", 54: "PERSON", 55: "PERSON_EXT", 56: "SYSTEM", 57: "SYSTEM_DB", 58: "SYSTEM_QUEUE", 59: "SYSTEM_EXT", 60: "SYSTEM_EXT_DB", 61: "SYSTEM_EXT_QUEUE", 62: "CONTAINER", 63: "CONTAINER_DB", 64: "CONTAINER_QUEUE", 65: "CONTAINER_EXT", 66: "CONTAINER_EXT_DB", 67: "CONTAINER_EXT_QUEUE", 68: "COMPONENT", 69: "COMPONENT_DB", 70: "COMPONENT_QUEUE", 71: "COMPONENT_EXT", 72: "COMPONENT_EXT_DB", 73: "COMPONENT_EXT_QUEUE", 74: "REL", 75: "BIREL", 76: "REL_U", 77: "REL_D", 78: "REL_L", 79: "REL_R", 80: "REL_B", 81: "REL_INDEX", 82: "UPDATE_EL_STYLE", 83: "UPDATE_REL_STYLE", 84: "UPDATE_LAYOUT_CONFIG", 86: "STR", 87: "STR_KEY", 88: "STR_VALUE", 89: "ATTRIBUTE", 90: "ATTRIBUTE_EMPTY" },
+ productions_: [0, [3, 1], [3, 1], [3, 2], [5, 1], [5, 1], [5, 1], [5, 1], [4, 1], [6, 4], [6, 6], [12, 1], [13, 1], [17, 1], [14, 1], [11, 4], [11, 4], [11, 4], [11, 4], [11, 4], [23, 1], [23, 1], [23, 2], [29, 1], [29, 2], [29, 3], [31, 1], [31, 1], [31, 2], [31, 2], [31, 1], [39, 3], [40, 3], [40, 3], [40, 4], [42, 2], [42, 2], [42, 2], [42, 2], [42, 2], [42, 2], [42, 2], [41, 1], [30, 1], [30, 2], [30, 3], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 1], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [45, 1], [45, 2], [85, 1], [85, 2], [85, 1], [85, 1]],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+ var $0 = $$.length - 1;
+ switch (yystate) {
+ case 4:
+ yy.setDirection("TB");
+ break;
+ case 5:
+ yy.setDirection("BT");
+ break;
+ case 6:
+ yy.setDirection("RL");
+ break;
+ case 7:
+ yy.setDirection("LR");
+ break;
+ case 11:
+ yy.parseDirective("%%{", "open_directive");
+ break;
+ case 12:
+ break;
+ case 13:
+ $$[$0] = $$[$0].trim().replace(/'/g, '"');
+ yy.parseDirective($$[$0], "arg_directive");
+ break;
+ case 14:
+ yy.parseDirective("}%%", "close_directive", "c4Context");
+ break;
+ case 15:
+ case 16:
+ case 17:
+ case 18:
+ case 19:
+ yy.setC4Type($$[$0 - 3]);
+ break;
+ case 26:
+ yy.setTitle($$[$0].substring(6));
+ this.$ = $$[$0].substring(6);
+ break;
+ case 27:
+ yy.setAccDescription($$[$0].substring(15));
+ this.$ = $$[$0].substring(15);
+ break;
+ case 28:
+ this.$ = $$[$0].trim();
+ yy.setTitle(this.$);
+ break;
+ case 29:
+ case 30:
+ this.$ = $$[$0].trim();
+ yy.setAccDescription(this.$);
+ break;
+ case 35:
+ case 36:
+ $$[$0].splice(2, 0, "ENTERPRISE");
+ yy.addPersonOrSystemBoundary(...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 37:
+ yy.addPersonOrSystemBoundary(...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 38:
+ $$[$0].splice(2, 0, "CONTAINER");
+ yy.addContainerBoundary(...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 39:
+ yy.addDeploymentNode("node", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 40:
+ yy.addDeploymentNode("nodeL", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 41:
+ yy.addDeploymentNode("nodeR", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 42:
+ yy.popBoundaryParseStack();
+ break;
+ case 46:
+ yy.addPersonOrSystem("person", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 47:
+ yy.addPersonOrSystem("external_person", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 48:
+ yy.addPersonOrSystem("system", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 49:
+ yy.addPersonOrSystem("system_db", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 50:
+ yy.addPersonOrSystem("system_queue", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 51:
+ yy.addPersonOrSystem("external_system", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 52:
+ yy.addPersonOrSystem("external_system_db", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 53:
+ yy.addPersonOrSystem("external_system_queue", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 54:
+ yy.addContainer("container", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 55:
+ yy.addContainer("container_db", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 56:
+ yy.addContainer("container_queue", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 57:
+ yy.addContainer("external_container", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 58:
+ yy.addContainer("external_container_db", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 59:
+ yy.addContainer("external_container_queue", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 60:
+ yy.addComponent("component", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 61:
+ yy.addComponent("component_db", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 62:
+ yy.addComponent("component_queue", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 63:
+ yy.addComponent("external_component", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 64:
+ yy.addComponent("external_component_db", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 65:
+ yy.addComponent("external_component_queue", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 67:
+ yy.addRel("rel", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 68:
+ yy.addRel("birel", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 69:
+ yy.addRel("rel_u", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 70:
+ yy.addRel("rel_d", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 71:
+ yy.addRel("rel_l", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 72:
+ yy.addRel("rel_r", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 73:
+ yy.addRel("rel_b", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 74:
+ $$[$0].splice(0, 1);
+ yy.addRel("rel", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 75:
+ yy.updateElStyle("update_el_style", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 76:
+ yy.updateRelStyle("update_rel_style", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 77:
+ yy.updateLayoutConfig("update_layout_config", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 78:
+ this.$ = [$$[$0]];
+ break;
+ case 79:
+ $$[$0].unshift($$[$0 - 1]);
+ this.$ = $$[$0];
+ break;
+ case 80:
+ case 82:
+ this.$ = $$[$0].trim();
+ break;
+ case 81:
+ let kv = {};
+ kv[$$[$0 - 1].trim()] = $$[$0].trim();
+ this.$ = kv;
+ break;
+ case 83:
+ this.$ = "";
+ break;
+ }
+ },
+ table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: $V0, 8: $V1, 9: $V2, 10: $V3, 11: 5, 12: 10, 18: $V4, 22: $V5, 25: $V6, 26: $V7, 27: $V8, 28: $V9 }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 3: 17, 4: 2, 5: 3, 6: 4, 7: $V0, 8: $V1, 9: $V2, 10: $V3, 11: 5, 12: 10, 18: $V4, 22: $V5, 25: $V6, 26: $V7, 27: $V8, 28: $V9 }, { 1: [2, 8] }, { 1: [2, 4] }, { 1: [2, 5] }, { 1: [2, 6] }, { 1: [2, 7] }, { 13: 18, 19: [1, 19] }, { 15: [1, 20] }, { 15: [1, 21] }, { 15: [1, 22] }, { 15: [1, 23] }, { 15: [1, 24] }, { 19: [2, 11] }, { 1: [2, 3] }, { 14: 25, 16: [1, 26], 21: $Va }, o([16, 21], [2, 12]), { 23: 28, 29: 29, 30: 30, 31: 31, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf, 39: 58, 40: 70, 42: 71, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 53: 32, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }, { 23: 79, 29: 29, 30: 30, 31: 31, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf, 39: 58, 40: 70, 42: 71, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 53: 32, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }, { 23: 80, 29: 29, 30: 30, 31: 31, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf, 39: 58, 40: 70, 42: 71, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 53: 32, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }, { 23: 81, 29: 29, 30: 30, 31: 31, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf, 39: 58, 40: 70, 42: 71, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 53: 32, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }, { 23: 82, 29: 29, 30: 30, 31: 31, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf, 39: 58, 40: 70, 42: 71, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 53: 32, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }, { 15: [1, 83] }, { 17: 84, 20: [1, 85] }, { 15: [2, 14] }, { 24: [1, 86] }, o($VS, [2, 20], { 53: 32, 39: 58, 40: 70, 42: 71, 30: 87, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }), o($VS, [2, 21]), o($VT, [2, 23], { 15: [1, 88] }), o($VS, [2, 43], { 15: [1, 89] }), o($VU, [2, 26]), o($VU, [2, 27]), { 35: [1, 90] }, { 37: [1, 91] }, o($VU, [2, 30]), { 45: 92, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 98, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 99, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 100, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 101, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 102, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 103, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 104, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 105, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 106, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 107, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 108, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 109, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 110, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 111, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 112, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 113, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 114, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 115, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 116, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, o($VZ, [2, 66]), { 45: 117, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 118, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 119, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 120, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 121, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 122, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 123, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 124, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 125, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 126, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 127, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 30: 128, 39: 58, 40: 70, 42: 71, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 53: 32, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }, { 15: [1, 130], 43: [1, 129] }, { 45: 131, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 132, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 133, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 134, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 135, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 136, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 137, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 24: [1, 138] }, { 24: [1, 139] }, { 24: [1, 140] }, { 24: [1, 141] }, o($V_, [2, 9]), { 14: 142, 21: $Va }, { 21: [2, 13] }, { 1: [2, 15] }, o($VS, [2, 22]), o($VT, [2, 24], { 31: 31, 29: 143, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf }), o($VS, [2, 44], { 29: 29, 30: 30, 31: 31, 53: 32, 39: 58, 40: 70, 42: 71, 23: 144, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }), o($VU, [2, 28]), o($VU, [2, 29]), o($VZ, [2, 46]), o($V$, [2, 78], { 85: 93, 45: 145, 86: $VV, 87: $VW, 89: $VX, 90: $VY }), o($V01, [2, 80]), { 88: [1, 146] }, o($V01, [2, 82]), o($V01, [2, 83]), o($VZ, [2, 47]), o($VZ, [2, 48]), o($VZ, [2, 49]), o($VZ, [2, 50]), o($VZ, [2, 51]), o($VZ, [2, 52]), o($VZ, [2, 53]), o($VZ, [2, 54]), o($VZ, [2, 55]), o($VZ, [2, 56]), o($VZ, [2, 57]), o($VZ, [2, 58]), o($VZ, [2, 59]), o($VZ, [2, 60]), o($VZ, [2, 61]), o($VZ, [2, 62]), o($VZ, [2, 63]), o($VZ, [2, 64]), o($VZ, [2, 65]), o($VZ, [2, 67]), o($VZ, [2, 68]), o($VZ, [2, 69]), o($VZ, [2, 70]), o($VZ, [2, 71]), o($VZ, [2, 72]), o($VZ, [2, 73]), o($VZ, [2, 74]), o($VZ, [2, 75]), o($VZ, [2, 76]), o($VZ, [2, 77]), { 41: 147, 52: [1, 148] }, { 15: [1, 149] }, { 43: [1, 150] }, o($V11, [2, 35]), o($V11, [2, 36]), o($V11, [2, 37]), o($V11, [2, 38]), o($V11, [2, 39]), o($V11, [2, 40]), o($V11, [2, 41]), { 1: [2, 16] }, { 1: [2, 17] }, { 1: [2, 18] }, { 1: [2, 19] }, { 15: [1, 151] }, o($VT, [2, 25]), o($VS, [2, 45]), o($V$, [2, 79]), o($V01, [2, 81]), o($VZ, [2, 31]), o($VZ, [2, 42]), o($V21, [2, 32]), o($V21, [2, 33], { 15: [1, 152] }), o($V_, [2, 10]), o($V21, [2, 34])],
+ defaultActions: { 2: [2, 1], 3: [2, 2], 5: [2, 8], 6: [2, 4], 7: [2, 5], 8: [2, 6], 9: [2, 7], 16: [2, 11], 17: [2, 3], 27: [2, 14], 85: [2, 13], 86: [2, 15], 138: [2, 16], 139: [2, 17], 140: [2, 18], 141: [2, 19] },
+ parseError: function parseError(str, hash) {
+ if (hash.recoverable) {
+ this.trace(str);
+ } else {
+ var error = new Error(str);
+ error.hash = hash;
+ throw error;
+ }
+ },
+ parse: function parse(input) {
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
+ var args = lstack.slice.call(arguments, 1);
+ var lexer2 = Object.create(this.lexer);
+ var sharedState = { yy: {} };
+ for (var k in this.yy) {
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
+ sharedState.yy[k] = this.yy[k];
+ }
+ }
+ lexer2.setInput(input, sharedState.yy);
+ sharedState.yy.lexer = lexer2;
+ sharedState.yy.parser = this;
+ if (typeof lexer2.yylloc == "undefined") {
+ lexer2.yylloc = {};
+ }
+ var yyloc = lexer2.yylloc;
+ lstack.push(yyloc);
+ var ranges = lexer2.options && lexer2.options.ranges;
+ if (typeof sharedState.yy.parseError === "function") {
+ this.parseError = sharedState.yy.parseError;
+ } else {
+ this.parseError = Object.getPrototypeOf(this).parseError;
+ }
+ function lex() {
+ var token;
+ token = tstack.pop() || lexer2.lex() || EOF;
+ if (typeof token !== "number") {
+ if (token instanceof Array) {
+ tstack = token;
+ token = tstack.pop();
+ }
+ token = self.symbols_[token] || token;
+ }
+ return token;
+ }
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
+ while (true) {
+ state = stack[stack.length - 1];
+ if (this.defaultActions[state]) {
+ action = this.defaultActions[state];
+ } else {
+ if (symbol === null || typeof symbol == "undefined") {
+ symbol = lex();
+ }
+ action = table[state] && table[state][symbol];
+ }
+ if (typeof action === "undefined" || !action.length || !action[0]) {
+ var errStr = "";
+ expected = [];
+ for (p in table[state]) {
+ if (this.terminals_[p] && p > TERROR) {
+ expected.push("'" + this.terminals_[p] + "'");
+ }
+ }
+ if (lexer2.showPosition) {
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
+ } else {
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
+ }
+ this.parseError(errStr, {
+ text: lexer2.match,
+ token: this.terminals_[symbol] || symbol,
+ line: lexer2.yylineno,
+ loc: yyloc,
+ expected
+ });
+ }
+ if (action[0] instanceof Array && action.length > 1) {
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
+ }
+ switch (action[0]) {
+ case 1:
+ stack.push(symbol);
+ vstack.push(lexer2.yytext);
+ lstack.push(lexer2.yylloc);
+ stack.push(action[1]);
+ symbol = null;
+ {
+ yyleng = lexer2.yyleng;
+ yytext = lexer2.yytext;
+ yylineno = lexer2.yylineno;
+ yyloc = lexer2.yylloc;
+ }
+ break;
+ case 2:
+ len = this.productions_[action[1]][1];
+ yyval.$ = vstack[vstack.length - len];
+ yyval._$ = {
+ first_line: lstack[lstack.length - (len || 1)].first_line,
+ last_line: lstack[lstack.length - 1].last_line,
+ first_column: lstack[lstack.length - (len || 1)].first_column,
+ last_column: lstack[lstack.length - 1].last_column
+ };
+ if (ranges) {
+ yyval._$.range = [
+ lstack[lstack.length - (len || 1)].range[0],
+ lstack[lstack.length - 1].range[1]
+ ];
+ }
+ r = this.performAction.apply(yyval, [
+ yytext,
+ yyleng,
+ yylineno,
+ sharedState.yy,
+ action[1],
+ vstack,
+ lstack
+ ].concat(args));
+ if (typeof r !== "undefined") {
+ return r;
+ }
+ if (len) {
+ stack = stack.slice(0, -1 * len * 2);
+ vstack = vstack.slice(0, -1 * len);
+ lstack = lstack.slice(0, -1 * len);
+ }
+ stack.push(this.productions_[action[1]][0]);
+ vstack.push(yyval.$);
+ lstack.push(yyval._$);
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
+ stack.push(newState);
+ break;
+ case 3:
+ return true;
+ }
+ }
+ return true;
+ }
+ };
+ var lexer = function() {
+ var lexer2 = {
+ EOF: 1,
+ parseError: function parseError(str, hash) {
+ if (this.yy.parser) {
+ this.yy.parser.parseError(str, hash);
+ } else {
+ throw new Error(str);
+ }
+ },
+ // resets the lexer, sets new input
+ setInput: function(input, yy) {
+ this.yy = yy || this.yy || {};
+ this._input = input;
+ this._more = this._backtrack = this.done = false;
+ this.yylineno = this.yyleng = 0;
+ this.yytext = this.matched = this.match = "";
+ this.conditionStack = ["INITIAL"];
+ this.yylloc = {
+ first_line: 1,
+ first_column: 0,
+ last_line: 1,
+ last_column: 0
+ };
+ if (this.options.ranges) {
+ this.yylloc.range = [0, 0];
+ }
+ this.offset = 0;
+ return this;
+ },
+ // consumes and returns one char from the input
+ input: function() {
+ var ch = this._input[0];
+ this.yytext += ch;
+ this.yyleng++;
+ this.offset++;
+ this.match += ch;
+ this.matched += ch;
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
+ if (lines) {
+ this.yylineno++;
+ this.yylloc.last_line++;
+ } else {
+ this.yylloc.last_column++;
+ }
+ if (this.options.ranges) {
+ this.yylloc.range[1]++;
+ }
+ this._input = this._input.slice(1);
+ return ch;
+ },
+ // unshifts one char (or a string) into the input
+ unput: function(ch) {
+ var len = ch.length;
+ var lines = ch.split(/(?:\r\n?|\n)/g);
+ this._input = ch + this._input;
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
+ this.offset -= len;
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
+ this.match = this.match.substr(0, this.match.length - 1);
+ this.matched = this.matched.substr(0, this.matched.length - 1);
+ if (lines.length - 1) {
+ this.yylineno -= lines.length - 1;
+ }
+ var r = this.yylloc.range;
+ this.yylloc = {
+ first_line: this.yylloc.first_line,
+ last_line: this.yylineno + 1,
+ first_column: this.yylloc.first_column,
+ last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
+ };
+ if (this.options.ranges) {
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
+ }
+ this.yyleng = this.yytext.length;
+ return this;
+ },
+ // When called from action, caches matched text and appends it on next action
+ more: function() {
+ this._more = true;
+ return this;
+ },
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
+ reject: function() {
+ if (this.options.backtrack_lexer) {
+ this._backtrack = true;
+ } else {
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
+ text: "",
+ token: null,
+ line: this.yylineno
+ });
+ }
+ return this;
+ },
+ // retain first n characters of the match
+ less: function(n) {
+ this.unput(this.match.slice(n));
+ },
+ // displays already matched input, i.e. for error messages
+ pastInput: function() {
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
+ },
+ // displays upcoming input, i.e. for error messages
+ upcomingInput: function() {
+ var next = this.match;
+ if (next.length < 20) {
+ next += this._input.substr(0, 20 - next.length);
+ }
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
+ },
+ // displays the character position where the lexing error occurred, i.e. for error messages
+ showPosition: function() {
+ var pre = this.pastInput();
+ var c2 = new Array(pre.length + 1).join("-");
+ return pre + this.upcomingInput() + "\n" + c2 + "^";
+ },
+ // test the lexed token: return FALSE when not a match, otherwise return token
+ test_match: function(match, indexed_rule) {
+ var token, lines, backup;
+ if (this.options.backtrack_lexer) {
+ backup = {
+ yylineno: this.yylineno,
+ yylloc: {
+ first_line: this.yylloc.first_line,
+ last_line: this.last_line,
+ first_column: this.yylloc.first_column,
+ last_column: this.yylloc.last_column
+ },
+ yytext: this.yytext,
+ match: this.match,
+ matches: this.matches,
+ matched: this.matched,
+ yyleng: this.yyleng,
+ offset: this.offset,
+ _more: this._more,
+ _input: this._input,
+ yy: this.yy,
+ conditionStack: this.conditionStack.slice(0),
+ done: this.done
+ };
+ if (this.options.ranges) {
+ backup.yylloc.range = this.yylloc.range.slice(0);
+ }
+ }
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
+ if (lines) {
+ this.yylineno += lines.length;
+ }
+ this.yylloc = {
+ first_line: this.yylloc.last_line,
+ last_line: this.yylineno + 1,
+ first_column: this.yylloc.last_column,
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
+ };
+ this.yytext += match[0];
+ this.match += match[0];
+ this.matches = match;
+ this.yyleng = this.yytext.length;
+ if (this.options.ranges) {
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
+ }
+ this._more = false;
+ this._backtrack = false;
+ this._input = this._input.slice(match[0].length);
+ this.matched += match[0];
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
+ if (this.done && this._input) {
+ this.done = false;
+ }
+ if (token) {
+ return token;
+ } else if (this._backtrack) {
+ for (var k in backup) {
+ this[k] = backup[k];
+ }
+ return false;
+ }
+ return false;
+ },
+ // return next match in input
+ next: function() {
+ if (this.done) {
+ return this.EOF;
+ }
+ if (!this._input) {
+ this.done = true;
+ }
+ var token, match, tempMatch, index;
+ if (!this._more) {
+ this.yytext = "";
+ this.match = "";
+ }
+ var rules = this._currentRules();
+ for (var i = 0; i < rules.length; i++) {
+ tempMatch = this._input.match(this.rules[rules[i]]);
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
+ match = tempMatch;
+ index = i;
+ if (this.options.backtrack_lexer) {
+ token = this.test_match(tempMatch, rules[i]);
+ if (token !== false) {
+ return token;
+ } else if (this._backtrack) {
+ match = false;
+ continue;
+ } else {
+ return false;
+ }
+ } else if (!this.options.flex) {
+ break;
+ }
+ }
+ }
+ if (match) {
+ token = this.test_match(match, rules[index]);
+ if (token !== false) {
+ return token;
+ }
+ return false;
+ }
+ if (this._input === "") {
+ return this.EOF;
+ } else {
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
+ text: "",
+ token: null,
+ line: this.yylineno
+ });
+ }
+ },
+ // return next match that has a token
+ lex: function lex() {
+ var r = this.next();
+ if (r) {
+ return r;
+ } else {
+ return this.lex();
+ }
+ },
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
+ begin: function begin(condition) {
+ this.conditionStack.push(condition);
+ },
+ // pop the previously active lexer condition state off the condition stack
+ popState: function popState() {
+ var n = this.conditionStack.length - 1;
+ if (n > 0) {
+ return this.conditionStack.pop();
+ } else {
+ return this.conditionStack[0];
+ }
+ },
+ // produce the lexer rule set which is active for the currently active lexer condition state
+ _currentRules: function _currentRules() {
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
+ } else {
+ return this.conditions["INITIAL"].rules;
+ }
+ },
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
+ topState: function topState(n) {
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
+ if (n >= 0) {
+ return this.conditionStack[n];
+ } else {
+ return "INITIAL";
+ }
+ },
+ // alias for begin(condition)
+ pushState: function pushState(condition) {
+ this.begin(condition);
+ },
+ // return the number of states currently on the stack
+ stateStackSize: function stateStackSize() {
+ return this.conditionStack.length;
+ },
+ options: {},
+ performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
+ switch ($avoiding_name_collisions) {
+ case 0:
+ this.begin("open_directive");
+ return 18;
+ case 1:
+ return 7;
+ case 2:
+ return 8;
+ case 3:
+ return 9;
+ case 4:
+ return 10;
+ case 5:
+ this.begin("type_directive");
+ return 19;
+ case 6:
+ this.popState();
+ this.begin("arg_directive");
+ return 16;
+ case 7:
+ this.popState();
+ this.popState();
+ return 21;
+ case 8:
+ return 20;
+ case 9:
+ return 32;
+ case 10:
+ return 33;
+ case 11:
+ this.begin("acc_title");
+ return 34;
+ case 12:
+ this.popState();
+ return "acc_title_value";
+ case 13:
+ this.begin("acc_descr");
+ return 36;
+ case 14:
+ this.popState();
+ return "acc_descr_value";
+ case 15:
+ this.begin("acc_descr_multiline");
+ break;
+ case 16:
+ this.popState();
+ break;
+ case 17:
+ return "acc_descr_multiline_value";
+ case 18:
+ break;
+ case 19:
+ c;
+ break;
+ case 20:
+ return 15;
+ case 21:
+ break;
+ case 22:
+ return 22;
+ case 23:
+ return 25;
+ case 24:
+ return 26;
+ case 25:
+ return 27;
+ case 26:
+ return 28;
+ case 27:
+ this.begin("person_ext");
+ return 55;
+ case 28:
+ this.begin("person");
+ return 54;
+ case 29:
+ this.begin("system_ext_queue");
+ return 61;
+ case 30:
+ this.begin("system_ext_db");
+ return 60;
+ case 31:
+ this.begin("system_ext");
+ return 59;
+ case 32:
+ this.begin("system_queue");
+ return 58;
+ case 33:
+ this.begin("system_db");
+ return 57;
+ case 34:
+ this.begin("system");
+ return 56;
+ case 35:
+ this.begin("boundary");
+ return 47;
+ case 36:
+ this.begin("enterprise_boundary");
+ return 44;
+ case 37:
+ this.begin("system_boundary");
+ return 46;
+ case 38:
+ this.begin("container_ext_queue");
+ return 67;
+ case 39:
+ this.begin("container_ext_db");
+ return 66;
+ case 40:
+ this.begin("container_ext");
+ return 65;
+ case 41:
+ this.begin("container_queue");
+ return 64;
+ case 42:
+ this.begin("container_db");
+ return 63;
+ case 43:
+ this.begin("container");
+ return 62;
+ case 44:
+ this.begin("container_boundary");
+ return 48;
+ case 45:
+ this.begin("component_ext_queue");
+ return 73;
+ case 46:
+ this.begin("component_ext_db");
+ return 72;
+ case 47:
+ this.begin("component_ext");
+ return 71;
+ case 48:
+ this.begin("component_queue");
+ return 70;
+ case 49:
+ this.begin("component_db");
+ return 69;
+ case 50:
+ this.begin("component");
+ return 68;
+ case 51:
+ this.begin("node");
+ return 49;
+ case 52:
+ this.begin("node");
+ return 49;
+ case 53:
+ this.begin("node_l");
+ return 50;
+ case 54:
+ this.begin("node_r");
+ return 51;
+ case 55:
+ this.begin("rel");
+ return 74;
+ case 56:
+ this.begin("birel");
+ return 75;
+ case 57:
+ this.begin("rel_u");
+ return 76;
+ case 58:
+ this.begin("rel_u");
+ return 76;
+ case 59:
+ this.begin("rel_d");
+ return 77;
+ case 60:
+ this.begin("rel_d");
+ return 77;
+ case 61:
+ this.begin("rel_l");
+ return 78;
+ case 62:
+ this.begin("rel_l");
+ return 78;
+ case 63:
+ this.begin("rel_r");
+ return 79;
+ case 64:
+ this.begin("rel_r");
+ return 79;
+ case 65:
+ this.begin("rel_b");
+ return 80;
+ case 66:
+ this.begin("rel_index");
+ return 81;
+ case 67:
+ this.begin("update_el_style");
+ return 82;
+ case 68:
+ this.begin("update_rel_style");
+ return 83;
+ case 69:
+ this.begin("update_layout_config");
+ return 84;
+ case 70:
+ return "EOF_IN_STRUCT";
+ case 71:
+ this.begin("attribute");
+ return "ATTRIBUTE_EMPTY";
+ case 72:
+ this.begin("attribute");
+ break;
+ case 73:
+ this.popState();
+ this.popState();
+ break;
+ case 74:
+ return 90;
+ case 75:
+ break;
+ case 76:
+ return 90;
+ case 77:
+ this.begin("string");
+ break;
+ case 78:
+ this.popState();
+ break;
+ case 79:
+ return "STR";
+ case 80:
+ this.begin("string_kv");
+ break;
+ case 81:
+ this.begin("string_kv_key");
+ return "STR_KEY";
+ case 82:
+ this.popState();
+ this.begin("string_kv_value");
+ break;
+ case 83:
+ return "STR_VALUE";
+ case 84:
+ this.popState();
+ this.popState();
+ break;
+ case 85:
+ return "STR";
+ case 86:
+ return "LBRACE";
+ case 87:
+ return "RBRACE";
+ case 88:
+ return "SPACE";
+ case 89:
+ return "EOL";
+ case 90:
+ return 24;
+ }
+ },
+ rules: [/^(?:%%\{)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:((?:(?!\}%%)[^:.])*))/, /^(?::)/, /^(?:\}%%)/, /^(?:((?:(?!\}%%).|\n)*))/, /^(?:title\s[^#\n;]+)/, /^(?:accDescription\s[^#\n;]+)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:C4Context\b)/, /^(?:C4Container\b)/, /^(?:C4Component\b)/, /^(?:C4Dynamic\b)/, /^(?:C4Deployment\b)/, /^(?:Person_Ext\b)/, /^(?:Person\b)/, /^(?:SystemQueue_Ext\b)/, /^(?:SystemDb_Ext\b)/, /^(?:System_Ext\b)/, /^(?:SystemQueue\b)/, /^(?:SystemDb\b)/, /^(?:System\b)/, /^(?:Boundary\b)/, /^(?:Enterprise_Boundary\b)/, /^(?:System_Boundary\b)/, /^(?:ContainerQueue_Ext\b)/, /^(?:ContainerDb_Ext\b)/, /^(?:Container_Ext\b)/, /^(?:ContainerQueue\b)/, /^(?:ContainerDb\b)/, /^(?:Container\b)/, /^(?:Container_Boundary\b)/, /^(?:ComponentQueue_Ext\b)/, /^(?:ComponentDb_Ext\b)/, /^(?:Component_Ext\b)/, /^(?:ComponentQueue\b)/, /^(?:ComponentDb\b)/, /^(?:Component\b)/, /^(?:Deployment_Node\b)/, /^(?:Node\b)/, /^(?:Node_L\b)/, /^(?:Node_R\b)/, /^(?:Rel\b)/, /^(?:BiRel\b)/, /^(?:Rel_Up\b)/, /^(?:Rel_U\b)/, /^(?:Rel_Down\b)/, /^(?:Rel_D\b)/, /^(?:Rel_Left\b)/, /^(?:Rel_L\b)/, /^(?:Rel_Right\b)/, /^(?:Rel_R\b)/, /^(?:Rel_Back\b)/, /^(?:RelIndex\b)/, /^(?:UpdateElementStyle\b)/, /^(?:UpdateRelStyle\b)/, /^(?:UpdateLayoutConfig\b)/, /^(?:$)/, /^(?:[(][ ]*[,])/, /^(?:[(])/, /^(?:[)])/, /^(?:,,)/, /^(?:,)/, /^(?:[ ]*["]["])/, /^(?:[ ]*["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:[ ]*[\$])/, /^(?:[^=]*)/, /^(?:[=][ ]*["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:[^,]+)/, /^(?:\{)/, /^(?:\})/, /^(?:[\s]+)/, /^(?:[\n\r]+)/, /^(?:$)/],
+ conditions: { "acc_descr_multiline": { "rules": [16, 17], "inclusive": false }, "acc_descr": { "rules": [14], "inclusive": false }, "acc_title": { "rules": [12], "inclusive": false }, "close_directive": { "rules": [], "inclusive": false }, "arg_directive": { "rules": [7, 8], "inclusive": false }, "type_directive": { "rules": [6, 7], "inclusive": false }, "open_directive": { "rules": [5], "inclusive": false }, "string_kv_value": { "rules": [83, 84], "inclusive": false }, "string_kv_key": { "rules": [82], "inclusive": false }, "string_kv": { "rules": [81], "inclusive": false }, "string": { "rules": [78, 79], "inclusive": false }, "attribute": { "rules": [73, 74, 75, 76, 77, 80, 85], "inclusive": false }, "update_layout_config": { "rules": [70, 71, 72, 73], "inclusive": false }, "update_rel_style": { "rules": [70, 71, 72, 73], "inclusive": false }, "update_el_style": { "rules": [70, 71, 72, 73], "inclusive": false }, "rel_b": { "rules": [70, 71, 72, 73], "inclusive": false }, "rel_r": { "rules": [70, 71, 72, 73], "inclusive": false }, "rel_l": { "rules": [70, 71, 72, 73], "inclusive": false }, "rel_d": { "rules": [70, 71, 72, 73], "inclusive": false }, "rel_u": { "rules": [70, 71, 72, 73], "inclusive": false }, "rel_bi": { "rules": [], "inclusive": false }, "rel": { "rules": [70, 71, 72, 73], "inclusive": false }, "node_r": { "rules": [70, 71, 72, 73], "inclusive": false }, "node_l": { "rules": [70, 71, 72, 73], "inclusive": false }, "node": { "rules": [70, 71, 72, 73], "inclusive": false }, "index": { "rules": [], "inclusive": false }, "rel_index": { "rules": [70, 71, 72, 73], "inclusive": false }, "component_ext_queue": { "rules": [], "inclusive": false }, "component_ext_db": { "rules": [70, 71, 72, 73], "inclusive": false }, "component_ext": { "rules": [70, 71, 72, 73], "inclusive": false }, "component_queue": { "rules": [70, 71, 72, 73], "inclusive": false }, "component_db": { "rules": [70, 71, 72, 73], "inclusive": false }, "component": { "rules": [70, 71, 72, 73], "inclusive": false }, "container_boundary": { "rules": [70, 71, 72, 73], "inclusive": false }, "container_ext_queue": { "rules": [70, 71, 72, 73], "inclusive": false }, "container_ext_db": { "rules": [70, 71, 72, 73], "inclusive": false }, "container_ext": { "rules": [70, 71, 72, 73], "inclusive": false }, "container_queue": { "rules": [70, 71, 72, 73], "inclusive": false }, "container_db": { "rules": [70, 71, 72, 73], "inclusive": false }, "container": { "rules": [70, 71, 72, 73], "inclusive": false }, "birel": { "rules": [70, 71, 72, 73], "inclusive": false }, "system_boundary": { "rules": [70, 71, 72, 73], "inclusive": false }, "enterprise_boundary": { "rules": [70, 71, 72, 73], "inclusive": false }, "boundary": { "rules": [70, 71, 72, 73], "inclusive": false }, "system_ext_queue": { "rules": [70, 71, 72, 73], "inclusive": false }, "system_ext_db": { "rules": [70, 71, 72, 73], "inclusive": false }, "system_ext": { "rules": [70, 71, 72, 73], "inclusive": false }, "system_queue": { "rules": [70, 71, 72, 73], "inclusive": false }, "system_db": { "rules": [70, 71, 72, 73], "inclusive": false }, "system": { "rules": [70, 71, 72, 73], "inclusive": false }, "person_ext": { "rules": [70, 71, 72, 73], "inclusive": false }, "person": { "rules": [70, 71, 72, 73], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 9, 10, 11, 13, 15, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 86, 87, 88, 89, 90], "inclusive": true } }
+ };
+ return lexer2;
+ }();
+ parser2.lexer = lexer;
+ function Parser() {
+ this.yy = {};
+ }
+ Parser.prototype = parser2;
+ parser2.Parser = Parser;
+ return new Parser();
+}();
+parser.parser = parser;
+var c4Parser = parser;
+var c4ShapeArray = [];
+var boundaryParseStack = [""];
+var currentBoundaryParse = "global";
+var parentBoundaryParse = "";
+var boundarys = [
+ {
+ alias: "global",
+ label: { text: "global" },
+ type: { text: "global" },
+ tags: null,
+ link: null,
+ parentBoundary: ""
+ }
+];
+var rels = [];
+var title = "";
+var wrapEnabled = false;
+var c4ShapeInRow$1 = 4;
+var c4BoundaryInRow$1 = 2;
+var c4Type;
+var getC4Type = function() {
+ return c4Type;
+};
+var setC4Type = function(c4TypeParam) {
+ let sanitizedText = sanitizeText$2(c4TypeParam, getConfig$1());
+ c4Type = sanitizedText;
+};
+var parseDirective = function(statement, context, type) {
+ mermaidAPI.parseDirective(this, statement, context, type);
+};
+var addRel = function(type, from, to, label, techn, descr, sprite, tags, link) {
+ if (type === void 0 || type === null || from === void 0 || from === null || to === void 0 || to === null || label === void 0 || label === null) {
+ return;
+ }
+ let rel = {};
+ const old = rels.find((rel2) => rel2.from === from && rel2.to === to);
+ if (old) {
+ rel = old;
+ } else {
+ rels.push(rel);
+ }
+ rel.type = type;
+ rel.from = from;
+ rel.to = to;
+ rel.label = { text: label };
+ if (techn === void 0 || techn === null) {
+ rel.techn = { text: "" };
+ } else {
+ if (typeof techn === "object") {
+ let [key, value] = Object.entries(techn)[0];
+ rel[key] = { text: value };
+ } else {
+ rel.techn = { text: techn };
+ }
+ }
+ if (descr === void 0 || descr === null) {
+ rel.descr = { text: "" };
+ } else {
+ if (typeof descr === "object") {
+ let [key, value] = Object.entries(descr)[0];
+ rel[key] = { text: value };
+ } else {
+ rel.descr = { text: descr };
+ }
+ }
+ if (typeof sprite === "object") {
+ let [key, value] = Object.entries(sprite)[0];
+ rel[key] = value;
+ } else {
+ rel.sprite = sprite;
+ }
+ if (typeof tags === "object") {
+ let [key, value] = Object.entries(tags)[0];
+ rel[key] = value;
+ } else {
+ rel.tags = tags;
+ }
+ if (typeof link === "object") {
+ let [key, value] = Object.entries(link)[0];
+ rel[key] = value;
+ } else {
+ rel.link = link;
+ }
+ rel.wrap = autoWrap();
+};
+var addPersonOrSystem = function(typeC4Shape, alias, label, descr, sprite, tags, link) {
+ if (alias === null || label === null) {
+ return;
+ }
+ let personOrSystem = {};
+ const old = c4ShapeArray.find((personOrSystem2) => personOrSystem2.alias === alias);
+ if (old && alias === old.alias) {
+ personOrSystem = old;
+ } else {
+ personOrSystem.alias = alias;
+ c4ShapeArray.push(personOrSystem);
+ }
+ if (label === void 0 || label === null) {
+ personOrSystem.label = { text: "" };
+ } else {
+ personOrSystem.label = { text: label };
+ }
+ if (descr === void 0 || descr === null) {
+ personOrSystem.descr = { text: "" };
+ } else {
+ if (typeof descr === "object") {
+ let [key, value] = Object.entries(descr)[0];
+ personOrSystem[key] = { text: value };
+ } else {
+ personOrSystem.descr = { text: descr };
+ }
+ }
+ if (typeof sprite === "object") {
+ let [key, value] = Object.entries(sprite)[0];
+ personOrSystem[key] = value;
+ } else {
+ personOrSystem.sprite = sprite;
+ }
+ if (typeof tags === "object") {
+ let [key, value] = Object.entries(tags)[0];
+ personOrSystem[key] = value;
+ } else {
+ personOrSystem.tags = tags;
+ }
+ if (typeof link === "object") {
+ let [key, value] = Object.entries(link)[0];
+ personOrSystem[key] = value;
+ } else {
+ personOrSystem.link = link;
+ }
+ personOrSystem.typeC4Shape = { text: typeC4Shape };
+ personOrSystem.parentBoundary = currentBoundaryParse;
+ personOrSystem.wrap = autoWrap();
+};
+var addContainer = function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) {
+ if (alias === null || label === null) {
+ return;
+ }
+ let container = {};
+ const old = c4ShapeArray.find((container2) => container2.alias === alias);
+ if (old && alias === old.alias) {
+ container = old;
+ } else {
+ container.alias = alias;
+ c4ShapeArray.push(container);
+ }
+ if (label === void 0 || label === null) {
+ container.label = { text: "" };
+ } else {
+ container.label = { text: label };
+ }
+ if (techn === void 0 || techn === null) {
+ container.techn = { text: "" };
+ } else {
+ if (typeof techn === "object") {
+ let [key, value] = Object.entries(techn)[0];
+ container[key] = { text: value };
+ } else {
+ container.techn = { text: techn };
+ }
+ }
+ if (descr === void 0 || descr === null) {
+ container.descr = { text: "" };
+ } else {
+ if (typeof descr === "object") {
+ let [key, value] = Object.entries(descr)[0];
+ container[key] = { text: value };
+ } else {
+ container.descr = { text: descr };
+ }
+ }
+ if (typeof sprite === "object") {
+ let [key, value] = Object.entries(sprite)[0];
+ container[key] = value;
+ } else {
+ container.sprite = sprite;
+ }
+ if (typeof tags === "object") {
+ let [key, value] = Object.entries(tags)[0];
+ container[key] = value;
+ } else {
+ container.tags = tags;
+ }
+ if (typeof link === "object") {
+ let [key, value] = Object.entries(link)[0];
+ container[key] = value;
+ } else {
+ container.link = link;
+ }
+ container.wrap = autoWrap();
+ container.typeC4Shape = { text: typeC4Shape };
+ container.parentBoundary = currentBoundaryParse;
+};
+var addComponent = function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) {
+ if (alias === null || label === null) {
+ return;
+ }
+ let component = {};
+ const old = c4ShapeArray.find((component2) => component2.alias === alias);
+ if (old && alias === old.alias) {
+ component = old;
+ } else {
+ component.alias = alias;
+ c4ShapeArray.push(component);
+ }
+ if (label === void 0 || label === null) {
+ component.label = { text: "" };
+ } else {
+ component.label = { text: label };
+ }
+ if (techn === void 0 || techn === null) {
+ component.techn = { text: "" };
+ } else {
+ if (typeof techn === "object") {
+ let [key, value] = Object.entries(techn)[0];
+ component[key] = { text: value };
+ } else {
+ component.techn = { text: techn };
+ }
+ }
+ if (descr === void 0 || descr === null) {
+ component.descr = { text: "" };
+ } else {
+ if (typeof descr === "object") {
+ let [key, value] = Object.entries(descr)[0];
+ component[key] = { text: value };
+ } else {
+ component.descr = { text: descr };
+ }
+ }
+ if (typeof sprite === "object") {
+ let [key, value] = Object.entries(sprite)[0];
+ component[key] = value;
+ } else {
+ component.sprite = sprite;
+ }
+ if (typeof tags === "object") {
+ let [key, value] = Object.entries(tags)[0];
+ component[key] = value;
+ } else {
+ component.tags = tags;
+ }
+ if (typeof link === "object") {
+ let [key, value] = Object.entries(link)[0];
+ component[key] = value;
+ } else {
+ component.link = link;
+ }
+ component.wrap = autoWrap();
+ component.typeC4Shape = { text: typeC4Shape };
+ component.parentBoundary = currentBoundaryParse;
+};
+var addPersonOrSystemBoundary = function(alias, label, type, tags, link) {
+ if (alias === null || label === null) {
+ return;
+ }
+ let boundary = {};
+ const old = boundarys.find((boundary2) => boundary2.alias === alias);
+ if (old && alias === old.alias) {
+ boundary = old;
+ } else {
+ boundary.alias = alias;
+ boundarys.push(boundary);
+ }
+ if (label === void 0 || label === null) {
+ boundary.label = { text: "" };
+ } else {
+ boundary.label = { text: label };
+ }
+ if (type === void 0 || type === null) {
+ boundary.type = { text: "system" };
+ } else {
+ if (typeof type === "object") {
+ let [key, value] = Object.entries(type)[0];
+ boundary[key] = { text: value };
+ } else {
+ boundary.type = { text: type };
+ }
+ }
+ if (typeof tags === "object") {
+ let [key, value] = Object.entries(tags)[0];
+ boundary[key] = value;
+ } else {
+ boundary.tags = tags;
+ }
+ if (typeof link === "object") {
+ let [key, value] = Object.entries(link)[0];
+ boundary[key] = value;
+ } else {
+ boundary.link = link;
+ }
+ boundary.parentBoundary = currentBoundaryParse;
+ boundary.wrap = autoWrap();
+ parentBoundaryParse = currentBoundaryParse;
+ currentBoundaryParse = alias;
+ boundaryParseStack.push(parentBoundaryParse);
+};
+var addContainerBoundary = function(alias, label, type, tags, link) {
+ if (alias === null || label === null) {
+ return;
+ }
+ let boundary = {};
+ const old = boundarys.find((boundary2) => boundary2.alias === alias);
+ if (old && alias === old.alias) {
+ boundary = old;
+ } else {
+ boundary.alias = alias;
+ boundarys.push(boundary);
+ }
+ if (label === void 0 || label === null) {
+ boundary.label = { text: "" };
+ } else {
+ boundary.label = { text: label };
+ }
+ if (type === void 0 || type === null) {
+ boundary.type = { text: "container" };
+ } else {
+ if (typeof type === "object") {
+ let [key, value] = Object.entries(type)[0];
+ boundary[key] = { text: value };
+ } else {
+ boundary.type = { text: type };
+ }
+ }
+ if (typeof tags === "object") {
+ let [key, value] = Object.entries(tags)[0];
+ boundary[key] = value;
+ } else {
+ boundary.tags = tags;
+ }
+ if (typeof link === "object") {
+ let [key, value] = Object.entries(link)[0];
+ boundary[key] = value;
+ } else {
+ boundary.link = link;
+ }
+ boundary.parentBoundary = currentBoundaryParse;
+ boundary.wrap = autoWrap();
+ parentBoundaryParse = currentBoundaryParse;
+ currentBoundaryParse = alias;
+ boundaryParseStack.push(parentBoundaryParse);
+};
+var addDeploymentNode = function(nodeType, alias, label, type, descr, sprite, tags, link) {
+ if (alias === null || label === null) {
+ return;
+ }
+ let boundary = {};
+ const old = boundarys.find((boundary2) => boundary2.alias === alias);
+ if (old && alias === old.alias) {
+ boundary = old;
+ } else {
+ boundary.alias = alias;
+ boundarys.push(boundary);
+ }
+ if (label === void 0 || label === null) {
+ boundary.label = { text: "" };
+ } else {
+ boundary.label = { text: label };
+ }
+ if (type === void 0 || type === null) {
+ boundary.type = { text: "node" };
+ } else {
+ if (typeof type === "object") {
+ let [key, value] = Object.entries(type)[0];
+ boundary[key] = { text: value };
+ } else {
+ boundary.type = { text: type };
+ }
+ }
+ if (descr === void 0 || descr === null) {
+ boundary.descr = { text: "" };
+ } else {
+ if (typeof descr === "object") {
+ let [key, value] = Object.entries(descr)[0];
+ boundary[key] = { text: value };
+ } else {
+ boundary.descr = { text: descr };
+ }
+ }
+ if (typeof tags === "object") {
+ let [key, value] = Object.entries(tags)[0];
+ boundary[key] = value;
+ } else {
+ boundary.tags = tags;
+ }
+ if (typeof link === "object") {
+ let [key, value] = Object.entries(link)[0];
+ boundary[key] = value;
+ } else {
+ boundary.link = link;
+ }
+ boundary.nodeType = nodeType;
+ boundary.parentBoundary = currentBoundaryParse;
+ boundary.wrap = autoWrap();
+ parentBoundaryParse = currentBoundaryParse;
+ currentBoundaryParse = alias;
+ boundaryParseStack.push(parentBoundaryParse);
+};
+var popBoundaryParseStack = function() {
+ currentBoundaryParse = parentBoundaryParse;
+ boundaryParseStack.pop();
+ parentBoundaryParse = boundaryParseStack.pop();
+ boundaryParseStack.push(parentBoundaryParse);
+};
+var updateElStyle = function(typeC4Shape, elementName, bgColor, fontColor, borderColor, shadowing, shape, sprite, techn, legendText, legendSprite) {
+ let old = c4ShapeArray.find((element) => element.alias === elementName);
+ if (old === void 0) {
+ old = boundarys.find((element) => element.alias === elementName);
+ if (old === void 0) {
+ return;
+ }
+ }
+ if (bgColor !== void 0 && bgColor !== null) {
+ if (typeof bgColor === "object") {
+ let [key, value] = Object.entries(bgColor)[0];
+ old[key] = value;
+ } else {
+ old.bgColor = bgColor;
+ }
+ }
+ if (fontColor !== void 0 && fontColor !== null) {
+ if (typeof fontColor === "object") {
+ let [key, value] = Object.entries(fontColor)[0];
+ old[key] = value;
+ } else {
+ old.fontColor = fontColor;
+ }
+ }
+ if (borderColor !== void 0 && borderColor !== null) {
+ if (typeof borderColor === "object") {
+ let [key, value] = Object.entries(borderColor)[0];
+ old[key] = value;
+ } else {
+ old.borderColor = borderColor;
+ }
+ }
+ if (shadowing !== void 0 && shadowing !== null) {
+ if (typeof shadowing === "object") {
+ let [key, value] = Object.entries(shadowing)[0];
+ old[key] = value;
+ } else {
+ old.shadowing = shadowing;
+ }
+ }
+ if (shape !== void 0 && shape !== null) {
+ if (typeof shape === "object") {
+ let [key, value] = Object.entries(shape)[0];
+ old[key] = value;
+ } else {
+ old.shape = shape;
+ }
+ }
+ if (sprite !== void 0 && sprite !== null) {
+ if (typeof sprite === "object") {
+ let [key, value] = Object.entries(sprite)[0];
+ old[key] = value;
+ } else {
+ old.sprite = sprite;
+ }
+ }
+ if (techn !== void 0 && techn !== null) {
+ if (typeof techn === "object") {
+ let [key, value] = Object.entries(techn)[0];
+ old[key] = value;
+ } else {
+ old.techn = techn;
+ }
+ }
+ if (legendText !== void 0 && legendText !== null) {
+ if (typeof legendText === "object") {
+ let [key, value] = Object.entries(legendText)[0];
+ old[key] = value;
+ } else {
+ old.legendText = legendText;
+ }
+ }
+ if (legendSprite !== void 0 && legendSprite !== null) {
+ if (typeof legendSprite === "object") {
+ let [key, value] = Object.entries(legendSprite)[0];
+ old[key] = value;
+ } else {
+ old.legendSprite = legendSprite;
+ }
+ }
+};
+var updateRelStyle = function(typeC4Shape, from, to, textColor, lineColor, offsetX, offsetY) {
+ const old = rels.find((rel) => rel.from === from && rel.to === to);
+ if (old === void 0) {
+ return;
+ }
+ if (textColor !== void 0 && textColor !== null) {
+ if (typeof textColor === "object") {
+ let [key, value] = Object.entries(textColor)[0];
+ old[key] = value;
+ } else {
+ old.textColor = textColor;
+ }
+ }
+ if (lineColor !== void 0 && lineColor !== null) {
+ if (typeof lineColor === "object") {
+ let [key, value] = Object.entries(lineColor)[0];
+ old[key] = value;
+ } else {
+ old.lineColor = lineColor;
+ }
+ }
+ if (offsetX !== void 0 && offsetX !== null) {
+ if (typeof offsetX === "object") {
+ let [key, value] = Object.entries(offsetX)[0];
+ old[key] = parseInt(value);
+ } else {
+ old.offsetX = parseInt(offsetX);
+ }
+ }
+ if (offsetY !== void 0 && offsetY !== null) {
+ if (typeof offsetY === "object") {
+ let [key, value] = Object.entries(offsetY)[0];
+ old[key] = parseInt(value);
+ } else {
+ old.offsetY = parseInt(offsetY);
+ }
+ }
+};
+var updateLayoutConfig = function(typeC4Shape, c4ShapeInRowParam, c4BoundaryInRowParam) {
+ let c4ShapeInRowValue = c4ShapeInRow$1;
+ let c4BoundaryInRowValue = c4BoundaryInRow$1;
+ if (typeof c4ShapeInRowParam === "object") {
+ const value = Object.values(c4ShapeInRowParam)[0];
+ c4ShapeInRowValue = parseInt(value);
+ } else {
+ c4ShapeInRowValue = parseInt(c4ShapeInRowParam);
+ }
+ if (typeof c4BoundaryInRowParam === "object") {
+ const value = Object.values(c4BoundaryInRowParam)[0];
+ c4BoundaryInRowValue = parseInt(value);
+ } else {
+ c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam);
+ }
+ if (c4ShapeInRowValue >= 1) {
+ c4ShapeInRow$1 = c4ShapeInRowValue;
+ }
+ if (c4BoundaryInRowValue >= 1) {
+ c4BoundaryInRow$1 = c4BoundaryInRowValue;
+ }
+};
+var getC4ShapeInRow = function() {
+ return c4ShapeInRow$1;
+};
+var getC4BoundaryInRow = function() {
+ return c4BoundaryInRow$1;
+};
+var getCurrentBoundaryParse = function() {
+ return currentBoundaryParse;
+};
+var getParentBoundaryParse = function() {
+ return parentBoundaryParse;
+};
+var getC4ShapeArray = function(parentBoundary) {
+ if (parentBoundary === void 0 || parentBoundary === null) {
+ return c4ShapeArray;
+ } else {
+ return c4ShapeArray.filter((personOrSystem) => {
+ return personOrSystem.parentBoundary === parentBoundary;
+ });
+ }
+};
+var getC4Shape = function(alias) {
+ return c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias);
+};
+var getC4ShapeKeys = function(parentBoundary) {
+ return Object.keys(getC4ShapeArray(parentBoundary));
+};
+var getBoundarys = function(parentBoundary) {
+ if (parentBoundary === void 0 || parentBoundary === null) {
+ return boundarys;
+ } else {
+ return boundarys.filter((boundary) => boundary.parentBoundary === parentBoundary);
+ }
+};
+var getRels = function() {
+ return rels;
+};
+var getTitle = function() {
+ return title;
+};
+var setWrap = function(wrapSetting) {
+ wrapEnabled = wrapSetting;
+};
+var autoWrap = function() {
+ return wrapEnabled;
+};
+var clear = function() {
+ c4ShapeArray = [];
+ boundarys = [
+ {
+ alias: "global",
+ label: { text: "global" },
+ type: { text: "global" },
+ tags: null,
+ link: null,
+ parentBoundary: ""
+ }
+ ];
+ parentBoundaryParse = "";
+ currentBoundaryParse = "global";
+ boundaryParseStack = [""];
+ rels = [];
+ boundaryParseStack = [""];
+ title = "";
+ wrapEnabled = false;
+ c4ShapeInRow$1 = 4;
+ c4BoundaryInRow$1 = 2;
+};
+var LINETYPE = {
+ SOLID: 0,
+ DOTTED: 1,
+ NOTE: 2,
+ SOLID_CROSS: 3,
+ DOTTED_CROSS: 4,
+ SOLID_OPEN: 5,
+ DOTTED_OPEN: 6,
+ LOOP_START: 10,
+ LOOP_END: 11,
+ ALT_START: 12,
+ ALT_ELSE: 13,
+ ALT_END: 14,
+ OPT_START: 15,
+ OPT_END: 16,
+ ACTIVE_START: 17,
+ ACTIVE_END: 18,
+ PAR_START: 19,
+ PAR_AND: 20,
+ PAR_END: 21,
+ RECT_START: 22,
+ RECT_END: 23,
+ SOLID_POINT: 24,
+ DOTTED_POINT: 25
+};
+var ARROWTYPE = {
+ FILLED: 0,
+ OPEN: 1
+};
+var PLACEMENT = {
+ LEFTOF: 0,
+ RIGHTOF: 1,
+ OVER: 2
+};
+var setTitle = function(txt) {
+ let sanitizedText = sanitizeText$2(txt, getConfig$1());
+ title = sanitizedText;
+};
+var c4Db = {
+ addPersonOrSystem,
+ addPersonOrSystemBoundary,
+ addContainer,
+ addContainerBoundary,
+ addComponent,
+ addDeploymentNode,
+ popBoundaryParseStack,
+ addRel,
+ updateElStyle,
+ updateRelStyle,
+ updateLayoutConfig,
+ autoWrap,
+ setWrap,
+ getC4ShapeArray,
+ getC4Shape,
+ getC4ShapeKeys,
+ getBoundarys,
+ getCurrentBoundaryParse,
+ getParentBoundaryParse,
+ getRels,
+ getTitle,
+ getC4Type,
+ getC4ShapeInRow,
+ getC4BoundaryInRow,
+ setAccTitle,
+ getAccTitle,
+ getAccDescription,
+ setAccDescription,
+ parseDirective,
+ getConfig: () => getConfig$1().c4,
+ clear,
+ LINETYPE,
+ ARROWTYPE,
+ PLACEMENT,
+ setTitle,
+ setC4Type
+ // apply,
+};
+var drawRect2 = function(elem, rectData) {
+ return drawRect(elem, rectData);
+};
+var drawImage = function(elem, width, height, x, y, link) {
+ const imageElem = elem.append("image");
+ imageElem.attr("width", width);
+ imageElem.attr("height", height);
+ imageElem.attr("x", x);
+ imageElem.attr("y", y);
+ let sanitizedLink = link.startsWith("data:image/png;base64") ? link : (0, import_sanitize_url.sanitizeUrl)(link);
+ imageElem.attr("xlink:href", sanitizedLink);
+};
+var drawRels$1 = (elem, rels2, conf2) => {
+ const relsElem = elem.append("g");
+ let i = 0;
+ for (let rel of rels2) {
+ let textColor = rel.textColor ? rel.textColor : "#444444";
+ let strokeColor = rel.lineColor ? rel.lineColor : "#444444";
+ let offsetX = rel.offsetX ? parseInt(rel.offsetX) : 0;
+ let offsetY = rel.offsetY ? parseInt(rel.offsetY) : 0;
+ let url = "";
+ if (i === 0) {
+ let line = relsElem.append("line");
+ line.attr("x1", rel.startPoint.x);
+ line.attr("y1", rel.startPoint.y);
+ line.attr("x2", rel.endPoint.x);
+ line.attr("y2", rel.endPoint.y);
+ line.attr("stroke-width", "1");
+ line.attr("stroke", strokeColor);
+ line.style("fill", "none");
+ if (rel.type !== "rel_b") {
+ line.attr("marker-end", "url(" + url + "#arrowhead)");
+ }
+ if (rel.type === "birel" || rel.type === "rel_b") {
+ line.attr("marker-start", "url(" + url + "#arrowend)");
+ }
+ i = -1;
+ } else {
+ let line = relsElem.append("path");
+ line.attr("fill", "none").attr("stroke-width", "1").attr("stroke", strokeColor).attr(
+ "d",
+ "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", rel.startPoint.x).replaceAll("starty", rel.startPoint.y).replaceAll(
+ "controlx",
+ rel.startPoint.x + (rel.endPoint.x - rel.startPoint.x) / 2 - (rel.endPoint.x - rel.startPoint.x) / 4
+ ).replaceAll("controly", rel.startPoint.y + (rel.endPoint.y - rel.startPoint.y) / 2).replaceAll("stopx", rel.endPoint.x).replaceAll("stopy", rel.endPoint.y)
+ );
+ if (rel.type !== "rel_b") {
+ line.attr("marker-end", "url(" + url + "#arrowhead)");
+ }
+ if (rel.type === "birel" || rel.type === "rel_b") {
+ line.attr("marker-start", "url(" + url + "#arrowend)");
+ }
+ }
+ let messageConf = conf2.messageFont();
+ _drawTextCandidateFunc(conf2)(
+ rel.label.text,
+ relsElem,
+ Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX,
+ Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + offsetY,
+ rel.label.width,
+ rel.label.height,
+ { fill: textColor },
+ messageConf
+ );
+ if (rel.techn && rel.techn.text !== "") {
+ messageConf = conf2.messageFont();
+ _drawTextCandidateFunc(conf2)(
+ "[" + rel.techn.text + "]",
+ relsElem,
+ Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX,
+ Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + conf2.messageFontSize + 5 + offsetY,
+ Math.max(rel.label.width, rel.techn.width),
+ rel.techn.height,
+ { fill: textColor, "font-style": "italic" },
+ messageConf
+ );
+ }
+ }
+};
+var drawBoundary$1 = function(elem, boundary, conf2) {
+ const boundaryElem = elem.append("g");
+ let fillColor = boundary.bgColor ? boundary.bgColor : "none";
+ let strokeColor = boundary.borderColor ? boundary.borderColor : "#444444";
+ let fontColor = boundary.fontColor ? boundary.fontColor : "black";
+ let attrsValue = { "stroke-width": 1, "stroke-dasharray": "7.0,7.0" };
+ if (boundary.nodeType) {
+ attrsValue = { "stroke-width": 1 };
+ }
+ let rectData = {
+ x: boundary.x,
+ y: boundary.y,
+ fill: fillColor,
+ stroke: strokeColor,
+ width: boundary.width,
+ height: boundary.height,
+ rx: 2.5,
+ ry: 2.5,
+ attrs: attrsValue
+ };
+ drawRect2(boundaryElem, rectData);
+ let boundaryConf = conf2.boundaryFont();
+ boundaryConf.fontWeight = "bold";
+ boundaryConf.fontSize = boundaryConf.fontSize + 2;
+ boundaryConf.fontColor = fontColor;
+ _drawTextCandidateFunc(conf2)(
+ boundary.label.text,
+ boundaryElem,
+ boundary.x,
+ boundary.y + boundary.label.Y,
+ boundary.width,
+ boundary.height,
+ { fill: "#444444" },
+ boundaryConf
+ );
+ if (boundary.type && boundary.type.text !== "") {
+ boundaryConf = conf2.boundaryFont();
+ boundaryConf.fontColor = fontColor;
+ _drawTextCandidateFunc(conf2)(
+ boundary.type.text,
+ boundaryElem,
+ boundary.x,
+ boundary.y + boundary.type.Y,
+ boundary.width,
+ boundary.height,
+ { fill: "#444444" },
+ boundaryConf
+ );
+ }
+ if (boundary.descr && boundary.descr.text !== "") {
+ boundaryConf = conf2.boundaryFont();
+ boundaryConf.fontSize = boundaryConf.fontSize - 2;
+ boundaryConf.fontColor = fontColor;
+ _drawTextCandidateFunc(conf2)(
+ boundary.descr.text,
+ boundaryElem,
+ boundary.x,
+ boundary.y + boundary.descr.Y,
+ boundary.width,
+ boundary.height,
+ { fill: "#444444" },
+ boundaryConf
+ );
+ }
+};
+var drawC4Shape = function(elem, c4Shape, conf2) {
+ var _a;
+ let fillColor = c4Shape.bgColor ? c4Shape.bgColor : conf2[c4Shape.typeC4Shape.text + "_bg_color"];
+ let strokeColor = c4Shape.borderColor ? c4Shape.borderColor : conf2[c4Shape.typeC4Shape.text + "_border_color"];
+ let fontColor = c4Shape.fontColor ? c4Shape.fontColor : "#FFFFFF";
+ let personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmL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gzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
+ break;
+ case "external_person":
+ personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";
+ break;
+ }
+ const c4ShapeElem = elem.append("g");
+ c4ShapeElem.attr("class", "person-man");
+ const rect = getNoteRect();
+ switch (c4Shape.typeC4Shape.text) {
+ case "person":
+ case "external_person":
+ case "system":
+ case "external_system":
+ case "container":
+ case "external_container":
+ case "component":
+ case "external_component":
+ rect.x = c4Shape.x;
+ rect.y = c4Shape.y;
+ rect.fill = fillColor;
+ rect.width = c4Shape.width;
+ rect.height = c4Shape.height;
+ rect.stroke = strokeColor;
+ rect.rx = 2.5;
+ rect.ry = 2.5;
+ rect.attrs = { "stroke-width": 0.5 };
+ drawRect2(c4ShapeElem, rect);
+ break;
+ case "system_db":
+ case "external_system_db":
+ case "container_db":
+ case "external_container_db":
+ case "component_db":
+ case "external_component_db":
+ c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
+ "d",
+ "Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2).replaceAll("height", c4Shape.height)
+ );
+ c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
+ "d",
+ "Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2)
+ );
+ break;
+ case "system_queue":
+ case "external_system_queue":
+ case "container_queue":
+ case "external_container_queue":
+ case "component_queue":
+ case "external_component_queue":
+ c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
+ "d",
+ "Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("width", c4Shape.width).replaceAll("half", c4Shape.height / 2)
+ );
+ c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
+ "d",
+ "Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", c4Shape.x + c4Shape.width).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.height / 2)
+ );
+ break;
+ }
+ let c4ShapeFontConf = getC4ShapeFont(conf2, c4Shape.typeC4Shape.text);
+ c4ShapeElem.append("text").attr("fill", fontColor).attr("font-family", c4ShapeFontConf.fontFamily).attr("font-size", c4ShapeFontConf.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", c4Shape.typeC4Shape.width).attr("x", c4Shape.x + c4Shape.width / 2 - c4Shape.typeC4Shape.width / 2).attr("y", c4Shape.y + c4Shape.typeC4Shape.Y).text("<<" + c4Shape.typeC4Shape.text + ">>");
+ switch (c4Shape.typeC4Shape.text) {
+ case "person":
+ case "external_person":
+ drawImage(
+ c4ShapeElem,
+ 48,
+ 48,
+ c4Shape.x + c4Shape.width / 2 - 24,
+ c4Shape.y + c4Shape.image.Y,
+ personImg
+ );
+ break;
+ }
+ let textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"]();
+ textFontConf.fontWeight = "bold";
+ textFontConf.fontSize = textFontConf.fontSize + 2;
+ textFontConf.fontColor = fontColor;
+ _drawTextCandidateFunc(conf2)(
+ c4Shape.label.text,
+ c4ShapeElem,
+ c4Shape.x,
+ c4Shape.y + c4Shape.label.Y,
+ c4Shape.width,
+ c4Shape.height,
+ { fill: fontColor },
+ textFontConf
+ );
+ textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"]();
+ textFontConf.fontColor = fontColor;
+ if (c4Shape.techn && ((_a = c4Shape.techn) == null ? void 0 : _a.text) !== "") {
+ _drawTextCandidateFunc(conf2)(
+ c4Shape.techn.text,
+ c4ShapeElem,
+ c4Shape.x,
+ c4Shape.y + c4Shape.techn.Y,
+ c4Shape.width,
+ c4Shape.height,
+ { fill: fontColor, "font-style": "italic" },
+ textFontConf
+ );
+ } else if (c4Shape.type && c4Shape.type.text !== "") {
+ _drawTextCandidateFunc(conf2)(
+ c4Shape.type.text,
+ c4ShapeElem,
+ c4Shape.x,
+ c4Shape.y + c4Shape.type.Y,
+ c4Shape.width,
+ c4Shape.height,
+ { fill: fontColor, "font-style": "italic" },
+ textFontConf
+ );
+ }
+ if (c4Shape.descr && c4Shape.descr.text !== "") {
+ textFontConf = conf2.personFont();
+ textFontConf.fontColor = fontColor;
+ _drawTextCandidateFunc(conf2)(
+ c4Shape.descr.text,
+ c4ShapeElem,
+ c4Shape.x,
+ c4Shape.y + c4Shape.descr.Y,
+ c4Shape.width,
+ c4Shape.height,
+ { fill: fontColor },
+ textFontConf
+ );
+ }
+ return c4Shape.height;
+};
+var insertDatabaseIcon = function(elem) {
+ elem.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
+ "d",
+ "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z"
+ );
+};
+var insertComputerIcon = function(elem) {
+ elem.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
+ "d",
+ "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"
+ );
+};
+var insertClockIcon = function(elem) {
+ elem.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
+ "d",
+ "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z"
+ );
+};
+var insertArrowHead = function(elem) {
+ elem.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z");
+};
+var insertArrowEnd = function(elem) {
+ elem.append("defs").append("marker").attr("id", "arrowend").attr("refX", 1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z");
+};
+var insertArrowFilledHead = function(elem) {
+ elem.append("defs").append("marker").attr("id", "filled-head").attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
+};
+var insertDynamicNumber = function(elem) {
+ elem.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6);
+};
+var insertArrowCrossHead = function(elem) {
+ const defs = elem.append("defs");
+ const marker = defs.append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4);
+ marker.append("path").attr("fill", "black").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 9,2 V 6 L16,4 Z");
+ marker.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 0,1 L 6,7 M 6,1 L 0,7");
+};
+var getC4ShapeFont = (cnf, typeC4Shape) => {
+ return {
+ fontFamily: cnf[typeC4Shape + "FontFamily"],
+ fontSize: cnf[typeC4Shape + "FontSize"],
+ fontWeight: cnf[typeC4Shape + "FontWeight"]
+ };
+};
+var _drawTextCandidateFunc = function() {
+ function byText(content, g, x, y, width, height, textAttrs) {
+ const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("text-anchor", "middle").text(content);
+ _setTextAttrs(text, textAttrs);
+ }
+ function byTspan(content, g, x, y, width, height, textAttrs, conf2) {
+ const { fontSize, fontFamily, fontWeight } = conf2;
+ const lines = content.split(common$1.lineBreakRegex);
+ for (let i = 0; i < lines.length; i++) {
+ const dy = i * fontSize - fontSize * (lines.length - 1) / 2;
+ const text = g.append("text").attr("x", x + width / 2).attr("y", y).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", fontSize).style("font-weight", fontWeight).style("font-family", fontFamily);
+ text.append("tspan").attr("dy", dy).text(lines[i]).attr("alignment-baseline", "mathematical");
+ _setTextAttrs(text, textAttrs);
+ }
+ }
+ function byFo(content, g, x, y, width, height, textAttrs, conf2) {
+ const s = g.append("switch");
+ const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height);
+ const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
+ text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
+ byTspan(content, s, x, y, width, height, textAttrs, conf2);
+ _setTextAttrs(text, textAttrs);
+ }
+ function _setTextAttrs(toText, fromTextAttrsDict) {
+ for (const key in fromTextAttrsDict) {
+ if (fromTextAttrsDict.hasOwnProperty(key)) {
+ toText.attr(key, fromTextAttrsDict[key]);
+ }
+ }
+ }
+ return function(conf2) {
+ return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan;
+ };
+}();
+var svgDraw = {
+ drawRect: drawRect2,
+ drawBoundary: drawBoundary$1,
+ drawC4Shape,
+ drawRels: drawRels$1,
+ drawImage,
+ insertArrowHead,
+ insertArrowEnd,
+ insertArrowFilledHead,
+ insertDynamicNumber,
+ insertArrowCrossHead,
+ insertDatabaseIcon,
+ insertComputerIcon,
+ insertClockIcon
+};
+var globalBoundaryMaxX = 0;
+var globalBoundaryMaxY = 0;
+var c4ShapeInRow = 4;
+var c4BoundaryInRow = 2;
+parser.yy = c4Db;
+var conf = {};
+var Bounds = class {
+ constructor(diagObj) {
+ this.name = "";
+ this.data = {};
+ this.data.startx = void 0;
+ this.data.stopx = void 0;
+ this.data.starty = void 0;
+ this.data.stopy = void 0;
+ this.data.widthLimit = void 0;
+ this.nextData = {};
+ this.nextData.startx = void 0;
+ this.nextData.stopx = void 0;
+ this.nextData.starty = void 0;
+ this.nextData.stopy = void 0;
+ this.nextData.cnt = 0;
+ setConf(diagObj.db.getConfig());
+ }
+ setData(startx, stopx, starty, stopy) {
+ this.nextData.startx = this.data.startx = startx;
+ this.nextData.stopx = this.data.stopx = stopx;
+ this.nextData.starty = this.data.starty = starty;
+ this.nextData.stopy = this.data.stopy = stopy;
+ }
+ updateVal(obj, key, val, fun) {
+ if (obj[key] === void 0) {
+ obj[key] = val;
+ } else {
+ obj[key] = fun(val, obj[key]);
+ }
+ }
+ insert(c4Shape) {
+ this.nextData.cnt = this.nextData.cnt + 1;
+ let _startx = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + c4Shape.margin : this.nextData.stopx + c4Shape.margin * 2;
+ let _stopx = _startx + c4Shape.width;
+ let _starty = this.nextData.starty + c4Shape.margin * 2;
+ let _stopy = _starty + c4Shape.height;
+ if (_startx >= this.data.widthLimit || _stopx >= this.data.widthLimit || this.nextData.cnt > c4ShapeInRow) {
+ _startx = this.nextData.startx + c4Shape.margin + conf.nextLinePaddingX;
+ _starty = this.nextData.stopy + c4Shape.margin * 2;
+ this.nextData.stopx = _stopx = _startx + c4Shape.width;
+ this.nextData.starty = this.nextData.stopy;
+ this.nextData.stopy = _stopy = _starty + c4Shape.height;
+ this.nextData.cnt = 1;
+ }
+ c4Shape.x = _startx;
+ c4Shape.y = _starty;
+ this.updateVal(this.data, "startx", _startx, Math.min);
+ this.updateVal(this.data, "starty", _starty, Math.min);
+ this.updateVal(this.data, "stopx", _stopx, Math.max);
+ this.updateVal(this.data, "stopy", _stopy, Math.max);
+ this.updateVal(this.nextData, "startx", _startx, Math.min);
+ this.updateVal(this.nextData, "starty", _starty, Math.min);
+ this.updateVal(this.nextData, "stopx", _stopx, Math.max);
+ this.updateVal(this.nextData, "stopy", _stopy, Math.max);
+ }
+ init(diagObj) {
+ this.name = "";
+ this.data = {
+ startx: void 0,
+ stopx: void 0,
+ starty: void 0,
+ stopy: void 0,
+ widthLimit: void 0
+ };
+ this.nextData = {
+ startx: void 0,
+ stopx: void 0,
+ starty: void 0,
+ stopy: void 0,
+ cnt: 0
+ };
+ setConf(diagObj.db.getConfig());
+ }
+ bumpLastMargin(margin) {
+ this.data.stopx += margin;
+ this.data.stopy += margin;
+ }
+};
+var setConf = function(cnf) {
+ assignWithDepth$1(conf, cnf);
+ if (cnf.fontFamily) {
+ conf.personFontFamily = conf.systemFontFamily = conf.messageFontFamily = cnf.fontFamily;
+ }
+ if (cnf.fontSize) {
+ conf.personFontSize = conf.systemFontSize = conf.messageFontSize = cnf.fontSize;
+ }
+ if (cnf.fontWeight) {
+ conf.personFontWeight = conf.systemFontWeight = conf.messageFontWeight = cnf.fontWeight;
+ }
+};
+var c4ShapeFont = (cnf, typeC4Shape) => {
+ return {
+ fontFamily: cnf[typeC4Shape + "FontFamily"],
+ fontSize: cnf[typeC4Shape + "FontSize"],
+ fontWeight: cnf[typeC4Shape + "FontWeight"]
+ };
+};
+var boundaryFont = (cnf) => {
+ return {
+ fontFamily: cnf.boundaryFontFamily,
+ fontSize: cnf.boundaryFontSize,
+ fontWeight: cnf.boundaryFontWeight
+ };
+};
+var messageFont = (cnf) => {
+ return {
+ fontFamily: cnf.messageFontFamily,
+ fontSize: cnf.messageFontSize,
+ fontWeight: cnf.messageFontWeight
+ };
+};
+function calcC4ShapeTextWH(textType, c4Shape, c4ShapeTextWrap, textConf, textLimitWidth) {
+ if (!c4Shape[textType].width) {
+ if (c4ShapeTextWrap) {
+ c4Shape[textType].text = wrapLabel(c4Shape[textType].text, textLimitWidth, textConf);
+ c4Shape[textType].textLines = c4Shape[textType].text.split(common$1.lineBreakRegex).length;
+ c4Shape[textType].width = textLimitWidth;
+ c4Shape[textType].height = calculateTextHeight(c4Shape[textType].text, textConf);
+ } else {
+ let lines = c4Shape[textType].text.split(common$1.lineBreakRegex);
+ c4Shape[textType].textLines = lines.length;
+ let lineHeight = 0;
+ c4Shape[textType].height = 0;
+ c4Shape[textType].width = 0;
+ for (const line of lines) {
+ c4Shape[textType].width = Math.max(
+ calculateTextWidth(line, textConf),
+ c4Shape[textType].width
+ );
+ lineHeight = calculateTextHeight(line, textConf);
+ c4Shape[textType].height = c4Shape[textType].height + lineHeight;
+ }
+ }
+ }
+}
+var drawBoundary = function(diagram2, boundary, bounds) {
+ boundary.x = bounds.data.startx;
+ boundary.y = bounds.data.starty;
+ boundary.width = bounds.data.stopx - bounds.data.startx;
+ boundary.height = bounds.data.stopy - bounds.data.starty;
+ boundary.label.y = conf.c4ShapeMargin - 35;
+ let boundaryTextWrap = boundary.wrap && conf.wrap;
+ let boundaryLabelConf = boundaryFont(conf);
+ boundaryLabelConf.fontSize = boundaryLabelConf.fontSize + 2;
+ boundaryLabelConf.fontWeight = "bold";
+ let textLimitWidth = calculateTextWidth(boundary.label.text, boundaryLabelConf);
+ calcC4ShapeTextWH("label", boundary, boundaryTextWrap, boundaryLabelConf, textLimitWidth);
+ svgDraw.drawBoundary(diagram2, boundary, conf);
+};
+var drawC4ShapeArray = function(currentBounds, diagram2, c4ShapeArray2, c4ShapeKeys) {
+ let Y = 0;
+ for (const c4ShapeKey of c4ShapeKeys) {
+ Y = 0;
+ const c4Shape = c4ShapeArray2[c4ShapeKey];
+ let c4ShapeTypeConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
+ c4ShapeTypeConf.fontSize = c4ShapeTypeConf.fontSize - 2;
+ c4Shape.typeC4Shape.width = calculateTextWidth(
+ "«" + c4Shape.typeC4Shape.text + "»",
+ c4ShapeTypeConf
+ );
+ c4Shape.typeC4Shape.height = c4ShapeTypeConf.fontSize + 2;
+ c4Shape.typeC4Shape.Y = conf.c4ShapePadding;
+ Y = c4Shape.typeC4Shape.Y + c4Shape.typeC4Shape.height - 4;
+ c4Shape.image = { width: 0, height: 0, Y: 0 };
+ switch (c4Shape.typeC4Shape.text) {
+ case "person":
+ case "external_person":
+ c4Shape.image.width = 48;
+ c4Shape.image.height = 48;
+ c4Shape.image.Y = Y;
+ Y = c4Shape.image.Y + c4Shape.image.height;
+ break;
+ }
+ if (c4Shape.sprite) {
+ c4Shape.image.width = 48;
+ c4Shape.image.height = 48;
+ c4Shape.image.Y = Y;
+ Y = c4Shape.image.Y + c4Shape.image.height;
+ }
+ let c4ShapeTextWrap = c4Shape.wrap && conf.wrap;
+ let textLimitWidth = conf.width - conf.c4ShapePadding * 2;
+ let c4ShapeLabelConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
+ c4ShapeLabelConf.fontSize = c4ShapeLabelConf.fontSize + 2;
+ c4ShapeLabelConf.fontWeight = "bold";
+ calcC4ShapeTextWH("label", c4Shape, c4ShapeTextWrap, c4ShapeLabelConf, textLimitWidth);
+ c4Shape["label"].Y = Y + 8;
+ Y = c4Shape["label"].Y + c4Shape["label"].height;
+ if (c4Shape.type && c4Shape.type.text !== "") {
+ c4Shape.type.text = "[" + c4Shape.type.text + "]";
+ let c4ShapeTypeConf2 = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
+ calcC4ShapeTextWH("type", c4Shape, c4ShapeTextWrap, c4ShapeTypeConf2, textLimitWidth);
+ c4Shape["type"].Y = Y + 5;
+ Y = c4Shape["type"].Y + c4Shape["type"].height;
+ } else if (c4Shape.techn && c4Shape.techn.text !== "") {
+ c4Shape.techn.text = "[" + c4Shape.techn.text + "]";
+ let c4ShapeTechnConf = c4ShapeFont(conf, c4Shape.techn.text);
+ calcC4ShapeTextWH("techn", c4Shape, c4ShapeTextWrap, c4ShapeTechnConf, textLimitWidth);
+ c4Shape["techn"].Y = Y + 5;
+ Y = c4Shape["techn"].Y + c4Shape["techn"].height;
+ }
+ let rectHeight = Y;
+ let rectWidth = c4Shape.label.width;
+ if (c4Shape.descr && c4Shape.descr.text !== "") {
+ let c4ShapeDescrConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
+ calcC4ShapeTextWH("descr", c4Shape, c4ShapeTextWrap, c4ShapeDescrConf, textLimitWidth);
+ c4Shape["descr"].Y = Y + 20;
+ Y = c4Shape["descr"].Y + c4Shape["descr"].height;
+ rectWidth = Math.max(c4Shape.label.width, c4Shape.descr.width);
+ rectHeight = Y - c4Shape["descr"].textLines * 5;
+ }
+ rectWidth = rectWidth + conf.c4ShapePadding;
+ c4Shape.width = Math.max(c4Shape.width || conf.width, rectWidth, conf.width);
+ c4Shape.height = Math.max(c4Shape.height || conf.height, rectHeight, conf.height);
+ c4Shape.margin = c4Shape.margin || conf.c4ShapeMargin;
+ currentBounds.insert(c4Shape);
+ svgDraw.drawC4Shape(diagram2, c4Shape, conf);
+ }
+ currentBounds.bumpLastMargin(conf.c4ShapeMargin);
+};
+var Point = class {
+ constructor(x, y) {
+ this.x = x;
+ this.y = y;
+ }
+};
+var getIntersectPoint = function(fromNode, endPoint) {
+ let x1 = fromNode.x;
+ let y1 = fromNode.y;
+ let x2 = endPoint.x;
+ let y2 = endPoint.y;
+ let fromCenterX = x1 + fromNode.width / 2;
+ let fromCenterY = y1 + fromNode.height / 2;
+ let dx = Math.abs(x1 - x2);
+ let dy = Math.abs(y1 - y2);
+ let tanDYX = dy / dx;
+ let fromDYX = fromNode.height / fromNode.width;
+ let returnPoint = null;
+ if (y1 == y2 && x1 < x2) {
+ returnPoint = new Point(x1 + fromNode.width, fromCenterY);
+ } else if (y1 == y2 && x1 > x2) {
+ returnPoint = new Point(x1, fromCenterY);
+ } else if (x1 == x2 && y1 < y2) {
+ returnPoint = new Point(fromCenterX, y1 + fromNode.height);
+ } else if (x1 == x2 && y1 > y2) {
+ returnPoint = new Point(fromCenterX, y1);
+ }
+ if (x1 > x2 && y1 < y2) {
+ if (fromDYX >= tanDYX) {
+ returnPoint = new Point(x1, fromCenterY + tanDYX * fromNode.width / 2);
+ } else {
+ returnPoint = new Point(
+ fromCenterX - dx / dy * fromNode.height / 2,
+ y1 + fromNode.height
+ );
+ }
+ } else if (x1 < x2 && y1 < y2) {
+ if (fromDYX >= tanDYX) {
+ returnPoint = new Point(x1 + fromNode.width, fromCenterY + tanDYX * fromNode.width / 2);
+ } else {
+ returnPoint = new Point(
+ fromCenterX + dx / dy * fromNode.height / 2,
+ y1 + fromNode.height
+ );
+ }
+ } else if (x1 < x2 && y1 > y2) {
+ if (fromDYX >= tanDYX) {
+ returnPoint = new Point(x1 + fromNode.width, fromCenterY - tanDYX * fromNode.width / 2);
+ } else {
+ returnPoint = new Point(fromCenterX + fromNode.height / 2 * dx / dy, y1);
+ }
+ } else if (x1 > x2 && y1 > y2) {
+ if (fromDYX >= tanDYX) {
+ returnPoint = new Point(x1, fromCenterY - fromNode.width / 2 * tanDYX);
+ } else {
+ returnPoint = new Point(fromCenterX - fromNode.height / 2 * dx / dy, y1);
+ }
+ }
+ return returnPoint;
+};
+var getIntersectPoints = function(fromNode, endNode) {
+ let endIntersectPoint = { x: 0, y: 0 };
+ endIntersectPoint.x = endNode.x + endNode.width / 2;
+ endIntersectPoint.y = endNode.y + endNode.height / 2;
+ let startPoint = getIntersectPoint(fromNode, endIntersectPoint);
+ endIntersectPoint.x = fromNode.x + fromNode.width / 2;
+ endIntersectPoint.y = fromNode.y + fromNode.height / 2;
+ let endPoint = getIntersectPoint(endNode, endIntersectPoint);
+ return { startPoint, endPoint };
+};
+var drawRels = function(diagram2, rels2, getC4ShapeObj, diagObj) {
+ let i = 0;
+ for (let rel of rels2) {
+ i = i + 1;
+ let relTextWrap = rel.wrap && conf.wrap;
+ let relConf = messageFont(conf);
+ let diagramType = diagObj.db.getC4Type();
+ if (diagramType === "C4Dynamic") {
+ rel.label.text = i + ": " + rel.label.text;
+ }
+ let textLimitWidth = calculateTextWidth(rel.label.text, relConf);
+ calcC4ShapeTextWH("label", rel, relTextWrap, relConf, textLimitWidth);
+ if (rel.techn && rel.techn.text !== "") {
+ textLimitWidth = calculateTextWidth(rel.techn.text, relConf);
+ calcC4ShapeTextWH("techn", rel, relTextWrap, relConf, textLimitWidth);
+ }
+ if (rel.descr && rel.descr.text !== "") {
+ textLimitWidth = calculateTextWidth(rel.descr.text, relConf);
+ calcC4ShapeTextWH("descr", rel, relTextWrap, relConf, textLimitWidth);
+ }
+ let fromNode = getC4ShapeObj(rel.from);
+ let endNode = getC4ShapeObj(rel.to);
+ let points = getIntersectPoints(fromNode, endNode);
+ rel.startPoint = points.startPoint;
+ rel.endPoint = points.endPoint;
+ }
+ svgDraw.drawRels(diagram2, rels2, conf);
+};
+function drawInsideBoundary(diagram2, parentBoundaryAlias, parentBounds, currentBoundaries, diagObj) {
+ let currentBounds = new Bounds(diagObj);
+ currentBounds.data.widthLimit = parentBounds.data.widthLimit / Math.min(c4BoundaryInRow, currentBoundaries.length);
+ for (let [i, currentBoundary] of currentBoundaries.entries()) {
+ let Y = 0;
+ currentBoundary.image = { width: 0, height: 0, Y: 0 };
+ if (currentBoundary.sprite) {
+ currentBoundary.image.width = 48;
+ currentBoundary.image.height = 48;
+ currentBoundary.image.Y = Y;
+ Y = currentBoundary.image.Y + currentBoundary.image.height;
+ }
+ let currentBoundaryTextWrap = currentBoundary.wrap && conf.wrap;
+ let currentBoundaryLabelConf = boundaryFont(conf);
+ currentBoundaryLabelConf.fontSize = currentBoundaryLabelConf.fontSize + 2;
+ currentBoundaryLabelConf.fontWeight = "bold";
+ calcC4ShapeTextWH(
+ "label",
+ currentBoundary,
+ currentBoundaryTextWrap,
+ currentBoundaryLabelConf,
+ currentBounds.data.widthLimit
+ );
+ currentBoundary["label"].Y = Y + 8;
+ Y = currentBoundary["label"].Y + currentBoundary["label"].height;
+ if (currentBoundary.type && currentBoundary.type.text !== "") {
+ currentBoundary.type.text = "[" + currentBoundary.type.text + "]";
+ let currentBoundaryTypeConf = boundaryFont(conf);
+ calcC4ShapeTextWH(
+ "type",
+ currentBoundary,
+ currentBoundaryTextWrap,
+ currentBoundaryTypeConf,
+ currentBounds.data.widthLimit
+ );
+ currentBoundary["type"].Y = Y + 5;
+ Y = currentBoundary["type"].Y + currentBoundary["type"].height;
+ }
+ if (currentBoundary.descr && currentBoundary.descr.text !== "") {
+ let currentBoundaryDescrConf = boundaryFont(conf);
+ currentBoundaryDescrConf.fontSize = currentBoundaryDescrConf.fontSize - 2;
+ calcC4ShapeTextWH(
+ "descr",
+ currentBoundary,
+ currentBoundaryTextWrap,
+ currentBoundaryDescrConf,
+ currentBounds.data.widthLimit
+ );
+ currentBoundary["descr"].Y = Y + 20;
+ Y = currentBoundary["descr"].Y + currentBoundary["descr"].height;
+ }
+ if (i == 0 || i % c4BoundaryInRow === 0) {
+ let _x = parentBounds.data.startx + conf.diagramMarginX;
+ let _y = parentBounds.data.stopy + conf.diagramMarginY + Y;
+ currentBounds.setData(_x, _x, _y, _y);
+ } else {
+ let _x = currentBounds.data.stopx !== currentBounds.data.startx ? currentBounds.data.stopx + conf.diagramMarginX : currentBounds.data.startx;
+ let _y = currentBounds.data.starty;
+ currentBounds.setData(_x, _x, _y, _y);
+ }
+ currentBounds.name = currentBoundary.alias;
+ let currentPersonOrSystemArray = diagObj.db.getC4ShapeArray(currentBoundary.alias);
+ let currentPersonOrSystemKeys = diagObj.db.getC4ShapeKeys(currentBoundary.alias);
+ if (currentPersonOrSystemKeys.length > 0) {
+ drawC4ShapeArray(
+ currentBounds,
+ diagram2,
+ currentPersonOrSystemArray,
+ currentPersonOrSystemKeys
+ );
+ }
+ parentBoundaryAlias = currentBoundary.alias;
+ let nextCurrentBoundarys = diagObj.db.getBoundarys(parentBoundaryAlias);
+ if (nextCurrentBoundarys.length > 0) {
+ drawInsideBoundary(
+ diagram2,
+ parentBoundaryAlias,
+ currentBounds,
+ nextCurrentBoundarys,
+ diagObj
+ );
+ }
+ if (currentBoundary.alias !== "global") {
+ drawBoundary(diagram2, currentBoundary, currentBounds);
+ }
+ parentBounds.data.stopy = Math.max(
+ currentBounds.data.stopy + conf.c4ShapeMargin,
+ parentBounds.data.stopy
+ );
+ parentBounds.data.stopx = Math.max(
+ currentBounds.data.stopx + conf.c4ShapeMargin,
+ parentBounds.data.stopx
+ );
+ globalBoundaryMaxX = Math.max(globalBoundaryMaxX, parentBounds.data.stopx);
+ globalBoundaryMaxY = Math.max(globalBoundaryMaxY, parentBounds.data.stopy);
+ }
+}
+var draw = function(_text, id, _version, diagObj) {
+ conf = getConfig$1().c4;
+ const securityLevel = getConfig$1().securityLevel;
+ let sandboxElement;
+ if (securityLevel === "sandbox") {
+ sandboxElement = select_default("#i" + id);
+ }
+ const root = securityLevel === "sandbox" ? select_default(sandboxElement.nodes()[0].contentDocument.body) : select_default("body");
+ let db = diagObj.db;
+ diagObj.db.setWrap(conf.wrap);
+ c4ShapeInRow = db.getC4ShapeInRow();
+ c4BoundaryInRow = db.getC4BoundaryInRow();
+ log$1.debug(`C:${JSON.stringify(conf, null, 2)}`);
+ const diagram2 = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : select_default(`[id="${id}"]`);
+ svgDraw.insertComputerIcon(diagram2);
+ svgDraw.insertDatabaseIcon(diagram2);
+ svgDraw.insertClockIcon(diagram2);
+ let screenBounds = new Bounds(diagObj);
+ screenBounds.setData(
+ conf.diagramMarginX,
+ conf.diagramMarginX,
+ conf.diagramMarginY,
+ conf.diagramMarginY
+ );
+ screenBounds.data.widthLimit = screen.availWidth;
+ globalBoundaryMaxX = conf.diagramMarginX;
+ globalBoundaryMaxY = conf.diagramMarginY;
+ const title2 = diagObj.db.getTitle();
+ let currentBoundaries = diagObj.db.getBoundarys("");
+ drawInsideBoundary(diagram2, "", screenBounds, currentBoundaries, diagObj);
+ svgDraw.insertArrowHead(diagram2);
+ svgDraw.insertArrowEnd(diagram2);
+ svgDraw.insertArrowCrossHead(diagram2);
+ svgDraw.insertArrowFilledHead(diagram2);
+ drawRels(diagram2, diagObj.db.getRels(), diagObj.db.getC4Shape, diagObj);
+ screenBounds.data.stopx = globalBoundaryMaxX;
+ screenBounds.data.stopy = globalBoundaryMaxY;
+ const box = screenBounds.data;
+ let boxHeight = box.stopy - box.starty;
+ let height = boxHeight + 2 * conf.diagramMarginY;
+ let boxWidth = box.stopx - box.startx;
+ const width = boxWidth + 2 * conf.diagramMarginX;
+ if (title2) {
+ diagram2.append("text").text(title2).attr("x", (box.stopx - box.startx) / 2 - 4 * conf.diagramMarginX).attr("y", box.starty + conf.diagramMarginY);
+ }
+ configureSvgSize(diagram2, height, width, conf.useMaxWidth);
+ const extraVertForTitle = title2 ? 60 : 0;
+ diagram2.attr(
+ "viewBox",
+ box.startx - conf.diagramMarginX + " -" + (conf.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle)
+ );
+ log$1.debug(`models:`, box);
+};
+var c4Renderer = {
+ drawPersonOrSystemArray: drawC4ShapeArray,
+ drawBoundary,
+ setConf,
+ draw
+};
+var getStyles = (options) => `.person {
+ stroke: ${options.personBorder};
+ fill: ${options.personBkg};
+ }
+`;
+var c4Styles = getStyles;
+var diagram = {
+ parser: c4Parser,
+ db: c4Db,
+ renderer: c4Renderer,
+ styles: c4Styles,
+ init: (cnf) => {
+ c4Renderer.setConf(cnf.c4);
+ }
+};
+export {
+ diagram
+};
+//# sourceMappingURL=c4Diagram-4de0d805-OPSDSO4B.js.map
diff --git a/.vuepress/.cache/deps/c4Diagram-4de0d805-OPSDSO4B.js.map b/.vuepress/.cache/deps/c4Diagram-4de0d805-OPSDSO4B.js.map
new file mode 100644
index 00000000..2f6535bb
--- /dev/null
+++ b/.vuepress/.cache/deps/c4Diagram-4de0d805-OPSDSO4B.js.map
@@ -0,0 +1,7 @@
+{
+ "version": 3,
+ "sources": ["../../../node_modules/mermaid/dist/c4Diagram-4de0d805.js"],
+ "sourcesContent": ["import { s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, c as getConfig, d as sanitizeText, m as mermaidAPI, e as common, f as assignWithDepth, h as calculateTextWidth, l as log, i as configureSvgSize, w as wrapLabel, j as calculateTextHeight } from \"./mermaid-306576ad.js\";\nimport { select } from \"d3\";\nimport { d as drawRect$1, g as getNoteRect } from \"./svgDrawCommon-f26cad39.js\";\nimport { sanitizeUrl } from \"@braintree/sanitize-url\";\nimport \"ts-dedent\";\nimport \"dayjs\";\nimport \"dompurify\";\nimport \"khroma\";\nimport \"lodash-es/memoize.js\";\nimport \"stylis\";\nimport \"lodash-es/isEmpty.js\";\nvar parser = function() {\n var o = function(k, v, o2, l) {\n for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)\n ;\n return o2;\n }, $V0 = [1, 6], $V1 = [1, 7], $V2 = [1, 8], $V3 = [1, 9], $V4 = [1, 16], $V5 = [1, 11], $V6 = [1, 12], $V7 = [1, 13], $V8 = [1, 14], $V9 = [1, 15], $Va = [1, 27], $Vb = [1, 33], $Vc = [1, 34], $Vd = [1, 35], $Ve = [1, 36], $Vf = [1, 37], $Vg = [1, 72], $Vh = [1, 73], $Vi = [1, 74], $Vj = [1, 75], $Vk = [1, 76], $Vl = [1, 77], $Vm = [1, 78], $Vn = [1, 38], $Vo = [1, 39], $Vp = [1, 40], $Vq = [1, 41], $Vr = [1, 42], $Vs = [1, 43], $Vt = [1, 44], $Vu = [1, 45], $Vv = [1, 46], $Vw = [1, 47], $Vx = [1, 48], $Vy = [1, 49], $Vz = [1, 50], $VA = [1, 51], $VB = [1, 52], $VC = [1, 53], $VD = [1, 54], $VE = [1, 55], $VF = [1, 56], $VG = [1, 57], $VH = [1, 59], $VI = [1, 60], $VJ = [1, 61], $VK = [1, 62], $VL = [1, 63], $VM = [1, 64], $VN = [1, 65], $VO = [1, 66], $VP = [1, 67], $VQ = [1, 68], $VR = [1, 69], $VS = [24, 52], $VT = [24, 44, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84], $VU = [15, 24, 44, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84], $VV = [1, 94], $VW = [1, 95], $VX = [1, 96], $VY = [1, 97], $VZ = [15, 24, 52], $V_ = [7, 8, 9, 10, 18, 22, 25, 26, 27, 28], $V$ = [15, 24, 43, 52], $V01 = [15, 24, 43, 52, 86, 87, 89, 90], $V11 = [15, 43], $V21 = [44, 46, 47, 48, 49, 50, 51, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84];\n var parser2 = {\n trace: function trace() {\n },\n yy: {},\n symbols_: { \"error\": 2, \"start\": 3, \"mermaidDoc\": 4, \"direction\": 5, \"directive\": 6, \"direction_tb\": 7, \"direction_bt\": 8, \"direction_rl\": 9, \"direction_lr\": 10, \"graphConfig\": 11, \"openDirective\": 12, \"typeDirective\": 13, \"closeDirective\": 14, \"NEWLINE\": 15, \":\": 16, \"argDirective\": 17, \"open_directive\": 18, \"type_directive\": 19, \"arg_directive\": 20, \"close_directive\": 21, \"C4_CONTEXT\": 22, \"statements\": 23, \"EOF\": 24, \"C4_CONTAINER\": 25, \"C4_COMPONENT\": 26, \"C4_DYNAMIC\": 27, \"C4_DEPLOYMENT\": 28, \"otherStatements\": 29, \"diagramStatements\": 30, \"otherStatement\": 31, \"title\": 32, \"accDescription\": 33, \"acc_title\": 34, \"acc_title_value\": 35, \"acc_descr\": 36, \"acc_descr_value\": 37, \"acc_descr_multiline_value\": 38, \"boundaryStatement\": 39, \"boundaryStartStatement\": 40, \"boundaryStopStatement\": 41, \"boundaryStart\": 42, \"LBRACE\": 43, \"ENTERPRISE_BOUNDARY\": 44, \"attributes\": 45, \"SYSTEM_BOUNDARY\": 46, \"BOUNDARY\": 47, \"CONTAINER_BOUNDARY\": 48, \"NODE\": 49, \"NODE_L\": 50, \"NODE_R\": 51, \"RBRACE\": 52, \"diagramStatement\": 53, \"PERSON\": 54, \"PERSON_EXT\": 55, \"SYSTEM\": 56, \"SYSTEM_DB\": 57, \"SYSTEM_QUEUE\": 58, \"SYSTEM_EXT\": 59, \"SYSTEM_EXT_DB\": 60, \"SYSTEM_EXT_QUEUE\": 61, \"CONTAINER\": 62, \"CONTAINER_DB\": 63, \"CONTAINER_QUEUE\": 64, \"CONTAINER_EXT\": 65, \"CONTAINER_EXT_DB\": 66, \"CONTAINER_EXT_QUEUE\": 67, \"COMPONENT\": 68, \"COMPONENT_DB\": 69, \"COMPONENT_QUEUE\": 70, \"COMPONENT_EXT\": 71, \"COMPONENT_EXT_DB\": 72, \"COMPONENT_EXT_QUEUE\": 73, \"REL\": 74, \"BIREL\": 75, \"REL_U\": 76, \"REL_D\": 77, \"REL_L\": 78, \"REL_R\": 79, \"REL_B\": 80, \"REL_INDEX\": 81, \"UPDATE_EL_STYLE\": 82, \"UPDATE_REL_STYLE\": 83, \"UPDATE_LAYOUT_CONFIG\": 84, \"attribute\": 85, \"STR\": 86, \"STR_KEY\": 87, \"STR_VALUE\": 88, \"ATTRIBUTE\": 89, \"ATTRIBUTE_EMPTY\": 90, \"$accept\": 0, \"$end\": 1 },\n terminals_: { 2: \"error\", 7: \"direction_tb\", 8: \"direction_bt\", 9: \"direction_rl\", 10: \"direction_lr\", 15: \"NEWLINE\", 16: \":\", 18: \"open_directive\", 19: \"type_directive\", 20: \"arg_directive\", 21: \"close_directive\", 22: \"C4_CONTEXT\", 24: \"EOF\", 25: \"C4_CONTAINER\", 26: \"C4_COMPONENT\", 27: \"C4_DYNAMIC\", 28: \"C4_DEPLOYMENT\", 32: \"title\", 33: \"accDescription\", 34: \"acc_title\", 35: \"acc_title_value\", 36: \"acc_descr\", 37: \"acc_descr_value\", 38: \"acc_descr_multiline_value\", 43: \"LBRACE\", 44: \"ENTERPRISE_BOUNDARY\", 46: \"SYSTEM_BOUNDARY\", 47: \"BOUNDARY\", 48: \"CONTAINER_BOUNDARY\", 49: \"NODE\", 50: \"NODE_L\", 51: \"NODE_R\", 52: \"RBRACE\", 54: \"PERSON\", 55: \"PERSON_EXT\", 56: \"SYSTEM\", 57: \"SYSTEM_DB\", 58: \"SYSTEM_QUEUE\", 59: \"SYSTEM_EXT\", 60: \"SYSTEM_EXT_DB\", 61: \"SYSTEM_EXT_QUEUE\", 62: \"CONTAINER\", 63: \"CONTAINER_DB\", 64: \"CONTAINER_QUEUE\", 65: \"CONTAINER_EXT\", 66: \"CONTAINER_EXT_DB\", 67: \"CONTAINER_EXT_QUEUE\", 68: \"COMPONENT\", 69: \"COMPONENT_DB\", 70: \"COMPONENT_QUEUE\", 71: \"COMPONENT_EXT\", 72: \"COMPONENT_EXT_DB\", 73: \"COMPONENT_EXT_QUEUE\", 74: \"REL\", 75: \"BIREL\", 76: \"REL_U\", 77: \"REL_D\", 78: \"REL_L\", 79: \"REL_R\", 80: \"REL_B\", 81: \"REL_INDEX\", 82: \"UPDATE_EL_STYLE\", 83: \"UPDATE_REL_STYLE\", 84: \"UPDATE_LAYOUT_CONFIG\", 86: \"STR\", 87: \"STR_KEY\", 88: \"STR_VALUE\", 89: \"ATTRIBUTE\", 90: \"ATTRIBUTE_EMPTY\" },\n productions_: [0, [3, 1], [3, 1], [3, 2], [5, 1], [5, 1], [5, 1], [5, 1], [4, 1], [6, 4], [6, 6], [12, 1], [13, 1], [17, 1], [14, 1], [11, 4], [11, 4], [11, 4], [11, 4], [11, 4], [23, 1], [23, 1], [23, 2], [29, 1], [29, 2], [29, 3], [31, 1], [31, 1], [31, 2], [31, 2], [31, 1], [39, 3], [40, 3], [40, 3], [40, 4], [42, 2], [42, 2], [42, 2], [42, 2], [42, 2], [42, 2], [42, 2], [41, 1], [30, 1], [30, 2], [30, 3], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 1], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [45, 1], [45, 2], [85, 1], [85, 2], [85, 1], [85, 1]],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {\n var $0 = $$.length - 1;\n switch (yystate) {\n case 4:\n yy.setDirection(\"TB\");\n break;\n case 5:\n yy.setDirection(\"BT\");\n break;\n case 6:\n yy.setDirection(\"RL\");\n break;\n case 7:\n yy.setDirection(\"LR\");\n break;\n case 11:\n yy.parseDirective(\"%%{\", \"open_directive\");\n break;\n case 12:\n break;\n case 13:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"');\n yy.parseDirective($$[$0], \"arg_directive\");\n break;\n case 14:\n yy.parseDirective(\"}%%\", \"close_directive\", \"c4Context\");\n break;\n case 15:\n case 16:\n case 17:\n case 18:\n case 19:\n yy.setC4Type($$[$0 - 3]);\n break;\n case 26:\n yy.setTitle($$[$0].substring(6));\n this.$ = $$[$0].substring(6);\n break;\n case 27:\n yy.setAccDescription($$[$0].substring(15));\n this.$ = $$[$0].substring(15);\n break;\n case 28:\n this.$ = $$[$0].trim();\n yy.setTitle(this.$);\n break;\n case 29:\n case 30:\n this.$ = $$[$0].trim();\n yy.setAccDescription(this.$);\n break;\n case 35:\n case 36:\n $$[$0].splice(2, 0, \"ENTERPRISE\");\n yy.addPersonOrSystemBoundary(...$$[$0]);\n this.$ = $$[$0];\n break;\n case 37:\n yy.addPersonOrSystemBoundary(...$$[$0]);\n this.$ = $$[$0];\n break;\n case 38:\n $$[$0].splice(2, 0, \"CONTAINER\");\n yy.addContainerBoundary(...$$[$0]);\n this.$ = $$[$0];\n break;\n case 39:\n yy.addDeploymentNode(\"node\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 40:\n yy.addDeploymentNode(\"nodeL\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 41:\n yy.addDeploymentNode(\"nodeR\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 42:\n yy.popBoundaryParseStack();\n break;\n case 46:\n yy.addPersonOrSystem(\"person\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 47:\n yy.addPersonOrSystem(\"external_person\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 48:\n yy.addPersonOrSystem(\"system\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 49:\n yy.addPersonOrSystem(\"system_db\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 50:\n yy.addPersonOrSystem(\"system_queue\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 51:\n yy.addPersonOrSystem(\"external_system\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 52:\n yy.addPersonOrSystem(\"external_system_db\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 53:\n yy.addPersonOrSystem(\"external_system_queue\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 54:\n yy.addContainer(\"container\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 55:\n yy.addContainer(\"container_db\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 56:\n yy.addContainer(\"container_queue\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 57:\n yy.addContainer(\"external_container\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 58:\n yy.addContainer(\"external_container_db\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 59:\n yy.addContainer(\"external_container_queue\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 60:\n yy.addComponent(\"component\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 61:\n yy.addComponent(\"component_db\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 62:\n yy.addComponent(\"component_queue\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 63:\n yy.addComponent(\"external_component\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 64:\n yy.addComponent(\"external_component_db\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 65:\n yy.addComponent(\"external_component_queue\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 67:\n yy.addRel(\"rel\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 68:\n yy.addRel(\"birel\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 69:\n yy.addRel(\"rel_u\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 70:\n yy.addRel(\"rel_d\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 71:\n yy.addRel(\"rel_l\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 72:\n yy.addRel(\"rel_r\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 73:\n yy.addRel(\"rel_b\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 74:\n $$[$0].splice(0, 1);\n yy.addRel(\"rel\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 75:\n yy.updateElStyle(\"update_el_style\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 76:\n yy.updateRelStyle(\"update_rel_style\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 77:\n yy.updateLayoutConfig(\"update_layout_config\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 78:\n this.$ = [$$[$0]];\n break;\n case 79:\n $$[$0].unshift($$[$0 - 1]);\n this.$ = $$[$0];\n break;\n case 80:\n case 82:\n this.$ = $$[$0].trim();\n break;\n case 81:\n let kv = {};\n kv[$$[$0 - 1].trim()] = $$[$0].trim();\n this.$ = kv;\n break;\n case 83:\n this.$ = \"\";\n break;\n }\n },\n table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: $V0, 8: $V1, 9: $V2, 10: $V3, 11: 5, 12: 10, 18: $V4, 22: $V5, 25: $V6, 26: $V7, 27: $V8, 28: $V9 }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 3: 17, 4: 2, 5: 3, 6: 4, 7: $V0, 8: $V1, 9: $V2, 10: $V3, 11: 5, 12: 10, 18: $V4, 22: $V5, 25: $V6, 26: $V7, 27: $V8, 28: $V9 }, { 1: [2, 8] }, { 1: [2, 4] }, { 1: [2, 5] }, { 1: [2, 6] }, { 1: [2, 7] }, { 13: 18, 19: [1, 19] }, { 15: [1, 20] }, { 15: [1, 21] }, { 15: [1, 22] }, { 15: [1, 23] }, { 15: [1, 24] }, { 19: [2, 11] }, { 1: [2, 3] }, { 14: 25, 16: [1, 26], 21: $Va }, o([16, 21], [2, 12]), { 23: 28, 29: 29, 30: 30, 31: 31, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf, 39: 58, 40: 70, 42: 71, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 53: 32, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }, { 23: 79, 29: 29, 30: 30, 31: 31, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf, 39: 58, 40: 70, 42: 71, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 53: 32, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }, { 23: 80, 29: 29, 30: 30, 31: 31, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf, 39: 58, 40: 70, 42: 71, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 53: 32, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }, { 23: 81, 29: 29, 30: 30, 31: 31, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf, 39: 58, 40: 70, 42: 71, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 53: 32, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }, { 23: 82, 29: 29, 30: 30, 31: 31, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf, 39: 58, 40: 70, 42: 71, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 53: 32, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }, { 15: [1, 83] }, { 17: 84, 20: [1, 85] }, { 15: [2, 14] }, { 24: [1, 86] }, o($VS, [2, 20], { 53: 32, 39: 58, 40: 70, 42: 71, 30: 87, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }), o($VS, [2, 21]), o($VT, [2, 23], { 15: [1, 88] }), o($VS, [2, 43], { 15: [1, 89] }), o($VU, [2, 26]), o($VU, [2, 27]), { 35: [1, 90] }, { 37: [1, 91] }, o($VU, [2, 30]), { 45: 92, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 98, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 99, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 100, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 101, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 102, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 103, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 104, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 105, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 106, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 107, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 108, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 109, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 110, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 111, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 112, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 113, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 114, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 115, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 116, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, o($VZ, [2, 66]), { 45: 117, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 118, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 119, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 120, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 121, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 122, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 123, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 124, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 125, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 126, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 127, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 30: 128, 39: 58, 40: 70, 42: 71, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 53: 32, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }, { 15: [1, 130], 43: [1, 129] }, { 45: 131, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 132, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 133, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 134, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 135, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 136, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 137, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 24: [1, 138] }, { 24: [1, 139] }, { 24: [1, 140] }, { 24: [1, 141] }, o($V_, [2, 9]), { 14: 142, 21: $Va }, { 21: [2, 13] }, { 1: [2, 15] }, o($VS, [2, 22]), o($VT, [2, 24], { 31: 31, 29: 143, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf }), o($VS, [2, 44], { 29: 29, 30: 30, 31: 31, 53: 32, 39: 58, 40: 70, 42: 71, 23: 144, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }), o($VU, [2, 28]), o($VU, [2, 29]), o($VZ, [2, 46]), o($V$, [2, 78], { 85: 93, 45: 145, 86: $VV, 87: $VW, 89: $VX, 90: $VY }), o($V01, [2, 80]), { 88: [1, 146] }, o($V01, [2, 82]), o($V01, [2, 83]), o($VZ, [2, 47]), o($VZ, [2, 48]), o($VZ, [2, 49]), o($VZ, [2, 50]), o($VZ, [2, 51]), o($VZ, [2, 52]), o($VZ, [2, 53]), o($VZ, [2, 54]), o($VZ, [2, 55]), o($VZ, [2, 56]), o($VZ, [2, 57]), o($VZ, [2, 58]), o($VZ, [2, 59]), o($VZ, [2, 60]), o($VZ, [2, 61]), o($VZ, [2, 62]), o($VZ, [2, 63]), o($VZ, [2, 64]), o($VZ, [2, 65]), o($VZ, [2, 67]), o($VZ, [2, 68]), o($VZ, [2, 69]), o($VZ, [2, 70]), o($VZ, [2, 71]), o($VZ, [2, 72]), o($VZ, [2, 73]), o($VZ, [2, 74]), o($VZ, [2, 75]), o($VZ, [2, 76]), o($VZ, [2, 77]), { 41: 147, 52: [1, 148] }, { 15: [1, 149] }, { 43: [1, 150] }, o($V11, [2, 35]), o($V11, [2, 36]), o($V11, [2, 37]), o($V11, [2, 38]), o($V11, [2, 39]), o($V11, [2, 40]), o($V11, [2, 41]), { 1: [2, 16] }, { 1: [2, 17] }, { 1: [2, 18] }, { 1: [2, 19] }, { 15: [1, 151] }, o($VT, [2, 25]), o($VS, [2, 45]), o($V$, [2, 79]), o($V01, [2, 81]), o($VZ, [2, 31]), o($VZ, [2, 42]), o($V21, [2, 32]), o($V21, [2, 33], { 15: [1, 152] }), o($V_, [2, 10]), o($V21, [2, 34])],\n defaultActions: { 2: [2, 1], 3: [2, 2], 5: [2, 8], 6: [2, 4], 7: [2, 5], 8: [2, 6], 9: [2, 7], 16: [2, 11], 17: [2, 3], 27: [2, 14], 85: [2, 13], 86: [2, 15], 138: [2, 16], 139: [2, 17], 140: [2, 18], 141: [2, 19] },\n parseError: function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n },\n parse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = \"\", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer2 = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer2.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer2;\n sharedState.yy.parser = this;\n if (typeof lexer2.yylloc == \"undefined\") {\n lexer2.yylloc = {};\n }\n var yyloc = lexer2.yylloc;\n lstack.push(yyloc);\n var ranges = lexer2.options && lexer2.options.ranges;\n if (typeof sharedState.yy.parseError === \"function\") {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer2.lex() || EOF;\n if (typeof token !== \"number\") {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, state, action, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == \"undefined\") {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === \"undefined\" || !action.length || !action[0]) {\n var errStr = \"\";\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push(\"'\" + this.terminals_[p] + \"'\");\n }\n }\n if (lexer2.showPosition) {\n errStr = \"Parse error on line \" + (yylineno + 1) + \":\\n\" + lexer2.showPosition() + \"\\nExpecting \" + expected.join(\", \") + \", got '\" + (this.terminals_[symbol] || symbol) + \"'\";\n } else {\n errStr = \"Parse error on line \" + (yylineno + 1) + \": Unexpected \" + (symbol == EOF ? \"end of input\" : \"'\" + (this.terminals_[symbol] || symbol) + \"'\");\n }\n this.parseError(errStr, {\n text: lexer2.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer2.yylineno,\n loc: yyloc,\n expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error(\"Parse Error: multiple actions possible at state: \" + state + \", token: \" + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer2.yytext);\n lstack.push(lexer2.yylloc);\n stack.push(action[1]);\n symbol = null;\n {\n yyleng = lexer2.yyleng;\n yytext = lexer2.yytext;\n yylineno = lexer2.yylineno;\n yyloc = lexer2.yylloc;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== \"undefined\") {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n }\n };\n var lexer = function() {\n var lexer2 = {\n EOF: 1,\n parseError: function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n // resets the lexer, sets new input\n setInput: function(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = \"\";\n this.conditionStack = [\"INITIAL\"];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n this.offset = 0;\n return this;\n },\n // consumes and returns one char from the input\n input: function() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n this._input = this._input.slice(1);\n return ch;\n },\n // unshifts one char (or a string) into the input\n unput: function(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n // When called from action, caches matched text and appends it on next action\n more: function() {\n this._more = true;\n return this;\n },\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: function() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\" + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n return this;\n },\n // retain first n characters of the match\n less: function(n) {\n this.unput(this.match.slice(n));\n },\n // displays already matched input, i.e. for error messages\n pastInput: function() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? \"...\" : \"\") + past.substr(-20).replace(/\\n/g, \"\");\n },\n // displays upcoming input, i.e. for error messages\n upcomingInput: function() {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n return (next.substr(0, 20) + (next.length > 20 ? \"...\" : \"\")).replace(/\\n/g, \"\");\n },\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: function() {\n var pre = this.pastInput();\n var c2 = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c2 + \"^\";\n },\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: function(match, indexed_rule) {\n var token, lines, backup;\n if (this.options.backtrack_lexer) {\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false;\n }\n return false;\n },\n // return next match in input\n next: function() {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n var token, match, tempMatch, index;\n if (!this._more) {\n this.yytext = \"\";\n this.match = \"\";\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue;\n } else {\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". Unrecognized text.\\n\" + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n // return next match that has a token\n lex: function lex() {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: function begin(condition) {\n this.conditionStack.push(condition);\n },\n // pop the previously active lexer condition state off the condition stack\n popState: function popState() {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n // alias for begin(condition)\n pushState: function pushState(condition) {\n this.begin(condition);\n },\n // return the number of states currently on the stack\n stateStackSize: function stateStackSize() {\n return this.conditionStack.length;\n },\n options: {},\n performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n switch ($avoiding_name_collisions) {\n case 0:\n this.begin(\"open_directive\");\n return 18;\n case 1:\n return 7;\n case 2:\n return 8;\n case 3:\n return 9;\n case 4:\n return 10;\n case 5:\n this.begin(\"type_directive\");\n return 19;\n case 6:\n this.popState();\n this.begin(\"arg_directive\");\n return 16;\n case 7:\n this.popState();\n this.popState();\n return 21;\n case 8:\n return 20;\n case 9:\n return 32;\n case 10:\n return 33;\n case 11:\n this.begin(\"acc_title\");\n return 34;\n case 12:\n this.popState();\n return \"acc_title_value\";\n case 13:\n this.begin(\"acc_descr\");\n return 36;\n case 14:\n this.popState();\n return \"acc_descr_value\";\n case 15:\n this.begin(\"acc_descr_multiline\");\n break;\n case 16:\n this.popState();\n break;\n case 17:\n return \"acc_descr_multiline_value\";\n case 18:\n break;\n case 19:\n c;\n break;\n case 20:\n return 15;\n case 21:\n break;\n case 22:\n return 22;\n case 23:\n return 25;\n case 24:\n return 26;\n case 25:\n return 27;\n case 26:\n return 28;\n case 27:\n this.begin(\"person_ext\");\n return 55;\n case 28:\n this.begin(\"person\");\n return 54;\n case 29:\n this.begin(\"system_ext_queue\");\n return 61;\n case 30:\n this.begin(\"system_ext_db\");\n return 60;\n case 31:\n this.begin(\"system_ext\");\n return 59;\n case 32:\n this.begin(\"system_queue\");\n return 58;\n case 33:\n this.begin(\"system_db\");\n return 57;\n case 34:\n this.begin(\"system\");\n return 56;\n case 35:\n this.begin(\"boundary\");\n return 47;\n case 36:\n this.begin(\"enterprise_boundary\");\n return 44;\n case 37:\n this.begin(\"system_boundary\");\n return 46;\n case 38:\n this.begin(\"container_ext_queue\");\n return 67;\n case 39:\n this.begin(\"container_ext_db\");\n return 66;\n case 40:\n this.begin(\"container_ext\");\n return 65;\n case 41:\n this.begin(\"container_queue\");\n return 64;\n case 42:\n this.begin(\"container_db\");\n return 63;\n case 43:\n this.begin(\"container\");\n return 62;\n case 44:\n this.begin(\"container_boundary\");\n return 48;\n case 45:\n this.begin(\"component_ext_queue\");\n return 73;\n case 46:\n this.begin(\"component_ext_db\");\n return 72;\n case 47:\n this.begin(\"component_ext\");\n return 71;\n case 48:\n this.begin(\"component_queue\");\n return 70;\n case 49:\n this.begin(\"component_db\");\n return 69;\n case 50:\n this.begin(\"component\");\n return 68;\n case 51:\n this.begin(\"node\");\n return 49;\n case 52:\n this.begin(\"node\");\n return 49;\n case 53:\n this.begin(\"node_l\");\n return 50;\n case 54:\n this.begin(\"node_r\");\n return 51;\n case 55:\n this.begin(\"rel\");\n return 74;\n case 56:\n this.begin(\"birel\");\n return 75;\n case 57:\n this.begin(\"rel_u\");\n return 76;\n case 58:\n this.begin(\"rel_u\");\n return 76;\n case 59:\n this.begin(\"rel_d\");\n return 77;\n case 60:\n this.begin(\"rel_d\");\n return 77;\n case 61:\n this.begin(\"rel_l\");\n return 78;\n case 62:\n this.begin(\"rel_l\");\n return 78;\n case 63:\n this.begin(\"rel_r\");\n return 79;\n case 64:\n this.begin(\"rel_r\");\n return 79;\n case 65:\n this.begin(\"rel_b\");\n return 80;\n case 66:\n this.begin(\"rel_index\");\n return 81;\n case 67:\n this.begin(\"update_el_style\");\n return 82;\n case 68:\n this.begin(\"update_rel_style\");\n return 83;\n case 69:\n this.begin(\"update_layout_config\");\n return 84;\n case 70:\n return \"EOF_IN_STRUCT\";\n case 71:\n this.begin(\"attribute\");\n return \"ATTRIBUTE_EMPTY\";\n case 72:\n this.begin(\"attribute\");\n break;\n case 73:\n this.popState();\n this.popState();\n break;\n case 74:\n return 90;\n case 75:\n break;\n case 76:\n return 90;\n case 77:\n this.begin(\"string\");\n break;\n case 78:\n this.popState();\n break;\n case 79:\n return \"STR\";\n case 80:\n this.begin(\"string_kv\");\n break;\n case 81:\n this.begin(\"string_kv_key\");\n return \"STR_KEY\";\n case 82:\n this.popState();\n this.begin(\"string_kv_value\");\n break;\n case 83:\n return \"STR_VALUE\";\n case 84:\n this.popState();\n this.popState();\n break;\n case 85:\n return \"STR\";\n case 86:\n return \"LBRACE\";\n case 87:\n return \"RBRACE\";\n case 88:\n return \"SPACE\";\n case 89:\n return \"EOL\";\n case 90:\n return 24;\n }\n },\n rules: [/^(?:%%\\{)/, /^(?:.*direction\\s+TB[^\\n]*)/, /^(?:.*direction\\s+BT[^\\n]*)/, /^(?:.*direction\\s+RL[^\\n]*)/, /^(?:.*direction\\s+LR[^\\n]*)/, /^(?:((?:(?!\\}%%)[^:.])*))/, /^(?::)/, /^(?:\\}%%)/, /^(?:((?:(?!\\}%%).|\\n)*))/, /^(?:title\\s[^#\\n;]+)/, /^(?:accDescription\\s[^#\\n;]+)/, /^(?:accTitle\\s*:\\s*)/, /^(?:(?!\\n||)*[^\\n]*)/, /^(?:accDescr\\s*:\\s*)/, /^(?:(?!\\n||)*[^\\n]*)/, /^(?:accDescr\\s*\\{\\s*)/, /^(?:[\\}])/, /^(?:[^\\}]*)/, /^(?:%%(?!\\{)*[^\\n]*(\\r?\\n?)+)/, /^(?:%%[^\\n]*(\\r?\\n)*)/, /^(?:\\s*(\\r?\\n)+)/, /^(?:\\s+)/, /^(?:C4Context\\b)/, /^(?:C4Container\\b)/, /^(?:C4Component\\b)/, /^(?:C4Dynamic\\b)/, /^(?:C4Deployment\\b)/, /^(?:Person_Ext\\b)/, /^(?:Person\\b)/, /^(?:SystemQueue_Ext\\b)/, /^(?:SystemDb_Ext\\b)/, /^(?:System_Ext\\b)/, /^(?:SystemQueue\\b)/, /^(?:SystemDb\\b)/, /^(?:System\\b)/, /^(?:Boundary\\b)/, /^(?:Enterprise_Boundary\\b)/, /^(?:System_Boundary\\b)/, /^(?:ContainerQueue_Ext\\b)/, /^(?:ContainerDb_Ext\\b)/, /^(?:Container_Ext\\b)/, /^(?:ContainerQueue\\b)/, /^(?:ContainerDb\\b)/, /^(?:Container\\b)/, /^(?:Container_Boundary\\b)/, /^(?:ComponentQueue_Ext\\b)/, /^(?:ComponentDb_Ext\\b)/, /^(?:Component_Ext\\b)/, /^(?:ComponentQueue\\b)/, /^(?:ComponentDb\\b)/, /^(?:Component\\b)/, /^(?:Deployment_Node\\b)/, /^(?:Node\\b)/, /^(?:Node_L\\b)/, /^(?:Node_R\\b)/, /^(?:Rel\\b)/, /^(?:BiRel\\b)/, /^(?:Rel_Up\\b)/, /^(?:Rel_U\\b)/, /^(?:Rel_Down\\b)/, /^(?:Rel_D\\b)/, /^(?:Rel_Left\\b)/, /^(?:Rel_L\\b)/, /^(?:Rel_Right\\b)/, /^(?:Rel_R\\b)/, /^(?:Rel_Back\\b)/, /^(?:RelIndex\\b)/, /^(?:UpdateElementStyle\\b)/, /^(?:UpdateRelStyle\\b)/, /^(?:UpdateLayoutConfig\\b)/, /^(?:$)/, /^(?:[(][ ]*[,])/, /^(?:[(])/, /^(?:[)])/, /^(?:,,)/, /^(?:,)/, /^(?:[ ]*[\"][\"])/, /^(?:[ ]*[\"])/, /^(?:[\"])/, /^(?:[^\"]*)/, /^(?:[ ]*[\\$])/, /^(?:[^=]*)/, /^(?:[=][ ]*[\"])/, /^(?:[^\"]+)/, /^(?:[\"])/, /^(?:[^,]+)/, /^(?:\\{)/, /^(?:\\})/, /^(?:[\\s]+)/, /^(?:[\\n\\r]+)/, /^(?:$)/],\n conditions: { \"acc_descr_multiline\": { \"rules\": [16, 17], \"inclusive\": false }, \"acc_descr\": { \"rules\": [14], \"inclusive\": false }, \"acc_title\": { \"rules\": [12], \"inclusive\": false }, \"close_directive\": { \"rules\": [], \"inclusive\": false }, \"arg_directive\": { \"rules\": [7, 8], \"inclusive\": false }, \"type_directive\": { \"rules\": [6, 7], \"inclusive\": false }, \"open_directive\": { \"rules\": [5], \"inclusive\": false }, \"string_kv_value\": { \"rules\": [83, 84], \"inclusive\": false }, \"string_kv_key\": { \"rules\": [82], \"inclusive\": false }, \"string_kv\": { \"rules\": [81], \"inclusive\": false }, \"string\": { \"rules\": [78, 79], \"inclusive\": false }, \"attribute\": { \"rules\": [73, 74, 75, 76, 77, 80, 85], \"inclusive\": false }, \"update_layout_config\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"update_rel_style\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"update_el_style\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"rel_b\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"rel_r\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"rel_l\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"rel_d\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"rel_u\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"rel_bi\": { \"rules\": [], \"inclusive\": false }, \"rel\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"node_r\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"node_l\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"node\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"index\": { \"rules\": [], \"inclusive\": false }, \"rel_index\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"component_ext_queue\": { \"rules\": [], \"inclusive\": false }, \"component_ext_db\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"component_ext\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"component_queue\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"component_db\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"component\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"container_boundary\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"container_ext_queue\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"container_ext_db\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"container_ext\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"container_queue\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"container_db\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"container\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"birel\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"system_boundary\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"enterprise_boundary\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"boundary\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"system_ext_queue\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"system_ext_db\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"system_ext\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"system_queue\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"system_db\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"system\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"person_ext\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"person\": { \"rules\": [70, 71, 72, 73], \"inclusive\": false }, \"INITIAL\": { \"rules\": [0, 1, 2, 3, 4, 9, 10, 11, 13, 15, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 86, 87, 88, 89, 90], \"inclusive\": true } }\n };\n return lexer2;\n }();\n parser2.lexer = lexer;\n function Parser() {\n this.yy = {};\n }\n Parser.prototype = parser2;\n parser2.Parser = Parser;\n return new Parser();\n}();\nparser.parser = parser;\nconst c4Parser = parser;\nlet c4ShapeArray = [];\nlet boundaryParseStack = [\"\"];\nlet currentBoundaryParse = \"global\";\nlet parentBoundaryParse = \"\";\nlet boundarys = [\n {\n alias: \"global\",\n label: { text: \"global\" },\n type: { text: \"global\" },\n tags: null,\n link: null,\n parentBoundary: \"\"\n }\n];\nlet rels = [];\nlet title = \"\";\nlet wrapEnabled = false;\nlet c4ShapeInRow$1 = 4;\nlet c4BoundaryInRow$1 = 2;\nvar c4Type;\nconst getC4Type = function() {\n return c4Type;\n};\nconst setC4Type = function(c4TypeParam) {\n let sanitizedText = sanitizeText(c4TypeParam, getConfig());\n c4Type = sanitizedText;\n};\nconst parseDirective = function(statement, context, type) {\n mermaidAPI.parseDirective(this, statement, context, type);\n};\nconst addRel = function(type, from, to, label, techn, descr, sprite, tags, link) {\n if (type === void 0 || type === null || from === void 0 || from === null || to === void 0 || to === null || label === void 0 || label === null) {\n return;\n }\n let rel = {};\n const old = rels.find((rel2) => rel2.from === from && rel2.to === to);\n if (old) {\n rel = old;\n } else {\n rels.push(rel);\n }\n rel.type = type;\n rel.from = from;\n rel.to = to;\n rel.label = { text: label };\n if (techn === void 0 || techn === null) {\n rel.techn = { text: \"\" };\n } else {\n if (typeof techn === \"object\") {\n let [key, value] = Object.entries(techn)[0];\n rel[key] = { text: value };\n } else {\n rel.techn = { text: techn };\n }\n }\n if (descr === void 0 || descr === null) {\n rel.descr = { text: \"\" };\n } else {\n if (typeof descr === \"object\") {\n let [key, value] = Object.entries(descr)[0];\n rel[key] = { text: value };\n } else {\n rel.descr = { text: descr };\n }\n }\n if (typeof sprite === \"object\") {\n let [key, value] = Object.entries(sprite)[0];\n rel[key] = value;\n } else {\n rel.sprite = sprite;\n }\n if (typeof tags === \"object\") {\n let [key, value] = Object.entries(tags)[0];\n rel[key] = value;\n } else {\n rel.tags = tags;\n }\n if (typeof link === \"object\") {\n let [key, value] = Object.entries(link)[0];\n rel[key] = value;\n } else {\n rel.link = link;\n }\n rel.wrap = autoWrap();\n};\nconst addPersonOrSystem = function(typeC4Shape, alias, label, descr, sprite, tags, link) {\n if (alias === null || label === null) {\n return;\n }\n let personOrSystem = {};\n const old = c4ShapeArray.find((personOrSystem2) => personOrSystem2.alias === alias);\n if (old && alias === old.alias) {\n personOrSystem = old;\n } else {\n personOrSystem.alias = alias;\n c4ShapeArray.push(personOrSystem);\n }\n if (label === void 0 || label === null) {\n personOrSystem.label = { text: \"\" };\n } else {\n personOrSystem.label = { text: label };\n }\n if (descr === void 0 || descr === null) {\n personOrSystem.descr = { text: \"\" };\n } else {\n if (typeof descr === \"object\") {\n let [key, value] = Object.entries(descr)[0];\n personOrSystem[key] = { text: value };\n } else {\n personOrSystem.descr = { text: descr };\n }\n }\n if (typeof sprite === \"object\") {\n let [key, value] = Object.entries(sprite)[0];\n personOrSystem[key] = value;\n } else {\n personOrSystem.sprite = sprite;\n }\n if (typeof tags === \"object\") {\n let [key, value] = Object.entries(tags)[0];\n personOrSystem[key] = value;\n } else {\n personOrSystem.tags = tags;\n }\n if (typeof link === \"object\") {\n let [key, value] = Object.entries(link)[0];\n personOrSystem[key] = value;\n } else {\n personOrSystem.link = link;\n }\n personOrSystem.typeC4Shape = { text: typeC4Shape };\n personOrSystem.parentBoundary = currentBoundaryParse;\n personOrSystem.wrap = autoWrap();\n};\nconst addContainer = function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) {\n if (alias === null || label === null) {\n return;\n }\n let container = {};\n const old = c4ShapeArray.find((container2) => container2.alias === alias);\n if (old && alias === old.alias) {\n container = old;\n } else {\n container.alias = alias;\n c4ShapeArray.push(container);\n }\n if (label === void 0 || label === null) {\n container.label = { text: \"\" };\n } else {\n container.label = { text: label };\n }\n if (techn === void 0 || techn === null) {\n container.techn = { text: \"\" };\n } else {\n if (typeof techn === \"object\") {\n let [key, value] = Object.entries(techn)[0];\n container[key] = { text: value };\n } else {\n container.techn = { text: techn };\n }\n }\n if (descr === void 0 || descr === null) {\n container.descr = { text: \"\" };\n } else {\n if (typeof descr === \"object\") {\n let [key, value] = Object.entries(descr)[0];\n container[key] = { text: value };\n } else {\n container.descr = { text: descr };\n }\n }\n if (typeof sprite === \"object\") {\n let [key, value] = Object.entries(sprite)[0];\n container[key] = value;\n } else {\n container.sprite = sprite;\n }\n if (typeof tags === \"object\") {\n let [key, value] = Object.entries(tags)[0];\n container[key] = value;\n } else {\n container.tags = tags;\n }\n if (typeof link === \"object\") {\n let [key, value] = Object.entries(link)[0];\n container[key] = value;\n } else {\n container.link = link;\n }\n container.wrap = autoWrap();\n container.typeC4Shape = { text: typeC4Shape };\n container.parentBoundary = currentBoundaryParse;\n};\nconst addComponent = function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) {\n if (alias === null || label === null) {\n return;\n }\n let component = {};\n const old = c4ShapeArray.find((component2) => component2.alias === alias);\n if (old && alias === old.alias) {\n component = old;\n } else {\n component.alias = alias;\n c4ShapeArray.push(component);\n }\n if (label === void 0 || label === null) {\n component.label = { text: \"\" };\n } else {\n component.label = { text: label };\n }\n if (techn === void 0 || techn === null) {\n component.techn = { text: \"\" };\n } else {\n if (typeof techn === \"object\") {\n let [key, value] = Object.entries(techn)[0];\n component[key] = { text: value };\n } else {\n component.techn = { text: techn };\n }\n }\n if (descr === void 0 || descr === null) {\n component.descr = { text: \"\" };\n } else {\n if (typeof descr === \"object\") {\n let [key, value] = Object.entries(descr)[0];\n component[key] = { text: value };\n } else {\n component.descr = { text: descr };\n }\n }\n if (typeof sprite === \"object\") {\n let [key, value] = Object.entries(sprite)[0];\n component[key] = value;\n } else {\n component.sprite = sprite;\n }\n if (typeof tags === \"object\") {\n let [key, value] = Object.entries(tags)[0];\n component[key] = value;\n } else {\n component.tags = tags;\n }\n if (typeof link === \"object\") {\n let [key, value] = Object.entries(link)[0];\n component[key] = value;\n } else {\n component.link = link;\n }\n component.wrap = autoWrap();\n component.typeC4Shape = { text: typeC4Shape };\n component.parentBoundary = currentBoundaryParse;\n};\nconst addPersonOrSystemBoundary = function(alias, label, type, tags, link) {\n if (alias === null || label === null) {\n return;\n }\n let boundary = {};\n const old = boundarys.find((boundary2) => boundary2.alias === alias);\n if (old && alias === old.alias) {\n boundary = old;\n } else {\n boundary.alias = alias;\n boundarys.push(boundary);\n }\n if (label === void 0 || label === null) {\n boundary.label = { text: \"\" };\n } else {\n boundary.label = { text: label };\n }\n if (type === void 0 || type === null) {\n boundary.type = { text: \"system\" };\n } else {\n if (typeof type === \"object\") {\n let [key, value] = Object.entries(type)[0];\n boundary[key] = { text: value };\n } else {\n boundary.type = { text: type };\n }\n }\n if (typeof tags === \"object\") {\n let [key, value] = Object.entries(tags)[0];\n boundary[key] = value;\n } else {\n boundary.tags = tags;\n }\n if (typeof link === \"object\") {\n let [key, value] = Object.entries(link)[0];\n boundary[key] = value;\n } else {\n boundary.link = link;\n }\n boundary.parentBoundary = currentBoundaryParse;\n boundary.wrap = autoWrap();\n parentBoundaryParse = currentBoundaryParse;\n currentBoundaryParse = alias;\n boundaryParseStack.push(parentBoundaryParse);\n};\nconst addContainerBoundary = function(alias, label, type, tags, link) {\n if (alias === null || label === null) {\n return;\n }\n let boundary = {};\n const old = boundarys.find((boundary2) => boundary2.alias === alias);\n if (old && alias === old.alias) {\n boundary = old;\n } else {\n boundary.alias = alias;\n boundarys.push(boundary);\n }\n if (label === void 0 || label === null) {\n boundary.label = { text: \"\" };\n } else {\n boundary.label = { text: label };\n }\n if (type === void 0 || type === null) {\n boundary.type = { text: \"container\" };\n } else {\n if (typeof type === \"object\") {\n let [key, value] = Object.entries(type)[0];\n boundary[key] = { text: value };\n } else {\n boundary.type = { text: type };\n }\n }\n if (typeof tags === \"object\") {\n let [key, value] = Object.entries(tags)[0];\n boundary[key] = value;\n } else {\n boundary.tags = tags;\n }\n if (typeof link === \"object\") {\n let [key, value] = Object.entries(link)[0];\n boundary[key] = value;\n } else {\n boundary.link = link;\n }\n boundary.parentBoundary = currentBoundaryParse;\n boundary.wrap = autoWrap();\n parentBoundaryParse = currentBoundaryParse;\n currentBoundaryParse = alias;\n boundaryParseStack.push(parentBoundaryParse);\n};\nconst addDeploymentNode = function(nodeType, alias, label, type, descr, sprite, tags, link) {\n if (alias === null || label === null) {\n return;\n }\n let boundary = {};\n const old = boundarys.find((boundary2) => boundary2.alias === alias);\n if (old && alias === old.alias) {\n boundary = old;\n } else {\n boundary.alias = alias;\n boundarys.push(boundary);\n }\n if (label === void 0 || label === null) {\n boundary.label = { text: \"\" };\n } else {\n boundary.label = { text: label };\n }\n if (type === void 0 || type === null) {\n boundary.type = { text: \"node\" };\n } else {\n if (typeof type === \"object\") {\n let [key, value] = Object.entries(type)[0];\n boundary[key] = { text: value };\n } else {\n boundary.type = { text: type };\n }\n }\n if (descr === void 0 || descr === null) {\n boundary.descr = { text: \"\" };\n } else {\n if (typeof descr === \"object\") {\n let [key, value] = Object.entries(descr)[0];\n boundary[key] = { text: value };\n } else {\n boundary.descr = { text: descr };\n }\n }\n if (typeof tags === \"object\") {\n let [key, value] = Object.entries(tags)[0];\n boundary[key] = value;\n } else {\n boundary.tags = tags;\n }\n if (typeof link === \"object\") {\n let [key, value] = Object.entries(link)[0];\n boundary[key] = value;\n } else {\n boundary.link = link;\n }\n boundary.nodeType = nodeType;\n boundary.parentBoundary = currentBoundaryParse;\n boundary.wrap = autoWrap();\n parentBoundaryParse = currentBoundaryParse;\n currentBoundaryParse = alias;\n boundaryParseStack.push(parentBoundaryParse);\n};\nconst popBoundaryParseStack = function() {\n currentBoundaryParse = parentBoundaryParse;\n boundaryParseStack.pop();\n parentBoundaryParse = boundaryParseStack.pop();\n boundaryParseStack.push(parentBoundaryParse);\n};\nconst updateElStyle = function(typeC4Shape, elementName, bgColor, fontColor, borderColor, shadowing, shape, sprite, techn, legendText, legendSprite) {\n let old = c4ShapeArray.find((element) => element.alias === elementName);\n if (old === void 0) {\n old = boundarys.find((element) => element.alias === elementName);\n if (old === void 0) {\n return;\n }\n }\n if (bgColor !== void 0 && bgColor !== null) {\n if (typeof bgColor === \"object\") {\n let [key, value] = Object.entries(bgColor)[0];\n old[key] = value;\n } else {\n old.bgColor = bgColor;\n }\n }\n if (fontColor !== void 0 && fontColor !== null) {\n if (typeof fontColor === \"object\") {\n let [key, value] = Object.entries(fontColor)[0];\n old[key] = value;\n } else {\n old.fontColor = fontColor;\n }\n }\n if (borderColor !== void 0 && borderColor !== null) {\n if (typeof borderColor === \"object\") {\n let [key, value] = Object.entries(borderColor)[0];\n old[key] = value;\n } else {\n old.borderColor = borderColor;\n }\n }\n if (shadowing !== void 0 && shadowing !== null) {\n if (typeof shadowing === \"object\") {\n let [key, value] = Object.entries(shadowing)[0];\n old[key] = value;\n } else {\n old.shadowing = shadowing;\n }\n }\n if (shape !== void 0 && shape !== null) {\n if (typeof shape === \"object\") {\n let [key, value] = Object.entries(shape)[0];\n old[key] = value;\n } else {\n old.shape = shape;\n }\n }\n if (sprite !== void 0 && sprite !== null) {\n if (typeof sprite === \"object\") {\n let [key, value] = Object.entries(sprite)[0];\n old[key] = value;\n } else {\n old.sprite = sprite;\n }\n }\n if (techn !== void 0 && techn !== null) {\n if (typeof techn === \"object\") {\n let [key, value] = Object.entries(techn)[0];\n old[key] = value;\n } else {\n old.techn = techn;\n }\n }\n if (legendText !== void 0 && legendText !== null) {\n if (typeof legendText === \"object\") {\n let [key, value] = Object.entries(legendText)[0];\n old[key] = value;\n } else {\n old.legendText = legendText;\n }\n }\n if (legendSprite !== void 0 && legendSprite !== null) {\n if (typeof legendSprite === \"object\") {\n let [key, value] = Object.entries(legendSprite)[0];\n old[key] = value;\n } else {\n old.legendSprite = legendSprite;\n }\n }\n};\nconst updateRelStyle = function(typeC4Shape, from, to, textColor, lineColor, offsetX, offsetY) {\n const old = rels.find((rel) => rel.from === from && rel.to === to);\n if (old === void 0) {\n return;\n }\n if (textColor !== void 0 && textColor !== null) {\n if (typeof textColor === \"object\") {\n let [key, value] = Object.entries(textColor)[0];\n old[key] = value;\n } else {\n old.textColor = textColor;\n }\n }\n if (lineColor !== void 0 && lineColor !== null) {\n if (typeof lineColor === \"object\") {\n let [key, value] = Object.entries(lineColor)[0];\n old[key] = value;\n } else {\n old.lineColor = lineColor;\n }\n }\n if (offsetX !== void 0 && offsetX !== null) {\n if (typeof offsetX === \"object\") {\n let [key, value] = Object.entries(offsetX)[0];\n old[key] = parseInt(value);\n } else {\n old.offsetX = parseInt(offsetX);\n }\n }\n if (offsetY !== void 0 && offsetY !== null) {\n if (typeof offsetY === \"object\") {\n let [key, value] = Object.entries(offsetY)[0];\n old[key] = parseInt(value);\n } else {\n old.offsetY = parseInt(offsetY);\n }\n }\n};\nconst updateLayoutConfig = function(typeC4Shape, c4ShapeInRowParam, c4BoundaryInRowParam) {\n let c4ShapeInRowValue = c4ShapeInRow$1;\n let c4BoundaryInRowValue = c4BoundaryInRow$1;\n if (typeof c4ShapeInRowParam === \"object\") {\n const value = Object.values(c4ShapeInRowParam)[0];\n c4ShapeInRowValue = parseInt(value);\n } else {\n c4ShapeInRowValue = parseInt(c4ShapeInRowParam);\n }\n if (typeof c4BoundaryInRowParam === \"object\") {\n const value = Object.values(c4BoundaryInRowParam)[0];\n c4BoundaryInRowValue = parseInt(value);\n } else {\n c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam);\n }\n if (c4ShapeInRowValue >= 1) {\n c4ShapeInRow$1 = c4ShapeInRowValue;\n }\n if (c4BoundaryInRowValue >= 1) {\n c4BoundaryInRow$1 = c4BoundaryInRowValue;\n }\n};\nconst getC4ShapeInRow = function() {\n return c4ShapeInRow$1;\n};\nconst getC4BoundaryInRow = function() {\n return c4BoundaryInRow$1;\n};\nconst getCurrentBoundaryParse = function() {\n return currentBoundaryParse;\n};\nconst getParentBoundaryParse = function() {\n return parentBoundaryParse;\n};\nconst getC4ShapeArray = function(parentBoundary) {\n if (parentBoundary === void 0 || parentBoundary === null) {\n return c4ShapeArray;\n } else {\n return c4ShapeArray.filter((personOrSystem) => {\n return personOrSystem.parentBoundary === parentBoundary;\n });\n }\n};\nconst getC4Shape = function(alias) {\n return c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias);\n};\nconst getC4ShapeKeys = function(parentBoundary) {\n return Object.keys(getC4ShapeArray(parentBoundary));\n};\nconst getBoundarys = function(parentBoundary) {\n if (parentBoundary === void 0 || parentBoundary === null) {\n return boundarys;\n } else {\n return boundarys.filter((boundary) => boundary.parentBoundary === parentBoundary);\n }\n};\nconst getRels = function() {\n return rels;\n};\nconst getTitle = function() {\n return title;\n};\nconst setWrap = function(wrapSetting) {\n wrapEnabled = wrapSetting;\n};\nconst autoWrap = function() {\n return wrapEnabled;\n};\nconst clear = function() {\n c4ShapeArray = [];\n boundarys = [\n {\n alias: \"global\",\n label: { text: \"global\" },\n type: { text: \"global\" },\n tags: null,\n link: null,\n parentBoundary: \"\"\n }\n ];\n parentBoundaryParse = \"\";\n currentBoundaryParse = \"global\";\n boundaryParseStack = [\"\"];\n rels = [];\n boundaryParseStack = [\"\"];\n title = \"\";\n wrapEnabled = false;\n c4ShapeInRow$1 = 4;\n c4BoundaryInRow$1 = 2;\n};\nconst LINETYPE = {\n SOLID: 0,\n DOTTED: 1,\n NOTE: 2,\n SOLID_CROSS: 3,\n DOTTED_CROSS: 4,\n SOLID_OPEN: 5,\n DOTTED_OPEN: 6,\n LOOP_START: 10,\n LOOP_END: 11,\n ALT_START: 12,\n ALT_ELSE: 13,\n ALT_END: 14,\n OPT_START: 15,\n OPT_END: 16,\n ACTIVE_START: 17,\n ACTIVE_END: 18,\n PAR_START: 19,\n PAR_AND: 20,\n PAR_END: 21,\n RECT_START: 22,\n RECT_END: 23,\n SOLID_POINT: 24,\n DOTTED_POINT: 25\n};\nconst ARROWTYPE = {\n FILLED: 0,\n OPEN: 1\n};\nconst PLACEMENT = {\n LEFTOF: 0,\n RIGHTOF: 1,\n OVER: 2\n};\nconst setTitle = function(txt) {\n let sanitizedText = sanitizeText(txt, getConfig());\n title = sanitizedText;\n};\nconst c4Db = {\n addPersonOrSystem,\n addPersonOrSystemBoundary,\n addContainer,\n addContainerBoundary,\n addComponent,\n addDeploymentNode,\n popBoundaryParseStack,\n addRel,\n updateElStyle,\n updateRelStyle,\n updateLayoutConfig,\n autoWrap,\n setWrap,\n getC4ShapeArray,\n getC4Shape,\n getC4ShapeKeys,\n getBoundarys,\n getCurrentBoundaryParse,\n getParentBoundaryParse,\n getRels,\n getTitle,\n getC4Type,\n getC4ShapeInRow,\n getC4BoundaryInRow,\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n parseDirective,\n getConfig: () => getConfig().c4,\n clear,\n LINETYPE,\n ARROWTYPE,\n PLACEMENT,\n setTitle,\n setC4Type\n // apply,\n};\nconst drawRect = function(elem, rectData) {\n return drawRect$1(elem, rectData);\n};\nconst drawImage = function(elem, width, height, x, y, link) {\n const imageElem = elem.append(\"image\");\n imageElem.attr(\"width\", width);\n imageElem.attr(\"height\", height);\n imageElem.attr(\"x\", x);\n imageElem.attr(\"y\", y);\n let sanitizedLink = link.startsWith(\"data:image/png;base64\") ? link : sanitizeUrl(link);\n imageElem.attr(\"xlink:href\", sanitizedLink);\n};\nconst drawRels$1 = (elem, rels2, conf2) => {\n const relsElem = elem.append(\"g\");\n let i = 0;\n for (let rel of rels2) {\n let textColor = rel.textColor ? rel.textColor : \"#444444\";\n let strokeColor = rel.lineColor ? rel.lineColor : \"#444444\";\n let offsetX = rel.offsetX ? parseInt(rel.offsetX) : 0;\n let offsetY = rel.offsetY ? parseInt(rel.offsetY) : 0;\n let url = \"\";\n if (i === 0) {\n let line = relsElem.append(\"line\");\n line.attr(\"x1\", rel.startPoint.x);\n line.attr(\"y1\", rel.startPoint.y);\n line.attr(\"x2\", rel.endPoint.x);\n line.attr(\"y2\", rel.endPoint.y);\n line.attr(\"stroke-width\", \"1\");\n line.attr(\"stroke\", strokeColor);\n line.style(\"fill\", \"none\");\n if (rel.type !== \"rel_b\") {\n line.attr(\"marker-end\", \"url(\" + url + \"#arrowhead)\");\n }\n if (rel.type === \"birel\" || rel.type === \"rel_b\") {\n line.attr(\"marker-start\", \"url(\" + url + \"#arrowend)\");\n }\n i = -1;\n } else {\n let line = relsElem.append(\"path\");\n line.attr(\"fill\", \"none\").attr(\"stroke-width\", \"1\").attr(\"stroke\", strokeColor).attr(\n \"d\",\n \"Mstartx,starty Qcontrolx,controly stopx,stopy \".replaceAll(\"startx\", rel.startPoint.x).replaceAll(\"starty\", rel.startPoint.y).replaceAll(\n \"controlx\",\n rel.startPoint.x + (rel.endPoint.x - rel.startPoint.x) / 2 - (rel.endPoint.x - rel.startPoint.x) / 4\n ).replaceAll(\"controly\", rel.startPoint.y + (rel.endPoint.y - rel.startPoint.y) / 2).replaceAll(\"stopx\", rel.endPoint.x).replaceAll(\"stopy\", rel.endPoint.y)\n );\n if (rel.type !== \"rel_b\") {\n line.attr(\"marker-end\", \"url(\" + url + \"#arrowhead)\");\n }\n if (rel.type === \"birel\" || rel.type === \"rel_b\") {\n line.attr(\"marker-start\", \"url(\" + url + \"#arrowend)\");\n }\n }\n let messageConf = conf2.messageFont();\n _drawTextCandidateFunc(conf2)(\n rel.label.text,\n relsElem,\n Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX,\n Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + offsetY,\n rel.label.width,\n rel.label.height,\n { fill: textColor },\n messageConf\n );\n if (rel.techn && rel.techn.text !== \"\") {\n messageConf = conf2.messageFont();\n _drawTextCandidateFunc(conf2)(\n \"[\" + rel.techn.text + \"]\",\n relsElem,\n Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX,\n Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + conf2.messageFontSize + 5 + offsetY,\n Math.max(rel.label.width, rel.techn.width),\n rel.techn.height,\n { fill: textColor, \"font-style\": \"italic\" },\n messageConf\n );\n }\n }\n};\nconst drawBoundary$1 = function(elem, boundary, conf2) {\n const boundaryElem = elem.append(\"g\");\n let fillColor = boundary.bgColor ? boundary.bgColor : \"none\";\n let strokeColor = boundary.borderColor ? boundary.borderColor : \"#444444\";\n let fontColor = boundary.fontColor ? boundary.fontColor : \"black\";\n let attrsValue = { \"stroke-width\": 1, \"stroke-dasharray\": \"7.0,7.0\" };\n if (boundary.nodeType) {\n attrsValue = { \"stroke-width\": 1 };\n }\n let rectData = {\n x: boundary.x,\n y: boundary.y,\n fill: fillColor,\n stroke: strokeColor,\n width: boundary.width,\n height: boundary.height,\n rx: 2.5,\n ry: 2.5,\n attrs: attrsValue\n };\n drawRect(boundaryElem, rectData);\n let boundaryConf = conf2.boundaryFont();\n boundaryConf.fontWeight = \"bold\";\n boundaryConf.fontSize = boundaryConf.fontSize + 2;\n boundaryConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf2)(\n boundary.label.text,\n boundaryElem,\n boundary.x,\n boundary.y + boundary.label.Y,\n boundary.width,\n boundary.height,\n { fill: \"#444444\" },\n boundaryConf\n );\n if (boundary.type && boundary.type.text !== \"\") {\n boundaryConf = conf2.boundaryFont();\n boundaryConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf2)(\n boundary.type.text,\n boundaryElem,\n boundary.x,\n boundary.y + boundary.type.Y,\n boundary.width,\n boundary.height,\n { fill: \"#444444\" },\n boundaryConf\n );\n }\n if (boundary.descr && boundary.descr.text !== \"\") {\n boundaryConf = conf2.boundaryFont();\n boundaryConf.fontSize = boundaryConf.fontSize - 2;\n boundaryConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf2)(\n boundary.descr.text,\n boundaryElem,\n boundary.x,\n boundary.y + boundary.descr.Y,\n boundary.width,\n boundary.height,\n { fill: \"#444444\" },\n boundaryConf\n );\n }\n};\nconst drawC4Shape = function(elem, c4Shape, conf2) {\n var _a;\n let fillColor = c4Shape.bgColor ? c4Shape.bgColor : conf2[c4Shape.typeC4Shape.text + \"_bg_color\"];\n let strokeColor = c4Shape.borderColor ? c4Shape.borderColor : conf2[c4Shape.typeC4Shape.text + \"_border_color\"];\n let fontColor = c4Shape.fontColor ? c4Shape.fontColor : \"#FFFFFF\";\n let personImg = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU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3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=\";\n break;\n case \"external_person\":\n personImg = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=\";\n break;\n }\n const c4ShapeElem = elem.append(\"g\");\n c4ShapeElem.attr(\"class\", \"person-man\");\n const rect = getNoteRect();\n switch (c4Shape.typeC4Shape.text) {\n case \"person\":\n case \"external_person\":\n case \"system\":\n case \"external_system\":\n case \"container\":\n case \"external_container\":\n case \"component\":\n case \"external_component\":\n rect.x = c4Shape.x;\n rect.y = c4Shape.y;\n rect.fill = fillColor;\n rect.width = c4Shape.width;\n rect.height = c4Shape.height;\n rect.stroke = strokeColor;\n rect.rx = 2.5;\n rect.ry = 2.5;\n rect.attrs = { \"stroke-width\": 0.5 };\n drawRect(c4ShapeElem, rect);\n break;\n case \"system_db\":\n case \"external_system_db\":\n case \"container_db\":\n case \"external_container_db\":\n case \"component_db\":\n case \"external_component_db\":\n c4ShapeElem.append(\"path\").attr(\"fill\", fillColor).attr(\"stroke-width\", \"0.5\").attr(\"stroke\", strokeColor).attr(\n \"d\",\n \"Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height\".replaceAll(\"startx\", c4Shape.x).replaceAll(\"starty\", c4Shape.y).replaceAll(\"half\", c4Shape.width / 2).replaceAll(\"height\", c4Shape.height)\n );\n c4ShapeElem.append(\"path\").attr(\"fill\", \"none\").attr(\"stroke-width\", \"0.5\").attr(\"stroke\", strokeColor).attr(\n \"d\",\n \"Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10\".replaceAll(\"startx\", c4Shape.x).replaceAll(\"starty\", c4Shape.y).replaceAll(\"half\", c4Shape.width / 2)\n );\n break;\n case \"system_queue\":\n case \"external_system_queue\":\n case \"container_queue\":\n case \"external_container_queue\":\n case \"component_queue\":\n case \"external_component_queue\":\n c4ShapeElem.append(\"path\").attr(\"fill\", fillColor).attr(\"stroke-width\", \"0.5\").attr(\"stroke\", strokeColor).attr(\n \"d\",\n \"Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half\".replaceAll(\"startx\", c4Shape.x).replaceAll(\"starty\", c4Shape.y).replaceAll(\"width\", c4Shape.width).replaceAll(\"half\", c4Shape.height / 2)\n );\n c4ShapeElem.append(\"path\").attr(\"fill\", \"none\").attr(\"stroke-width\", \"0.5\").attr(\"stroke\", strokeColor).attr(\n \"d\",\n \"Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half\".replaceAll(\"startx\", c4Shape.x + c4Shape.width).replaceAll(\"starty\", c4Shape.y).replaceAll(\"half\", c4Shape.height / 2)\n );\n break;\n }\n let c4ShapeFontConf = getC4ShapeFont(conf2, c4Shape.typeC4Shape.text);\n c4ShapeElem.append(\"text\").attr(\"fill\", fontColor).attr(\"font-family\", c4ShapeFontConf.fontFamily).attr(\"font-size\", c4ShapeFontConf.fontSize - 2).attr(\"font-style\", \"italic\").attr(\"lengthAdjust\", \"spacing\").attr(\"textLength\", c4Shape.typeC4Shape.width).attr(\"x\", c4Shape.x + c4Shape.width / 2 - c4Shape.typeC4Shape.width / 2).attr(\"y\", c4Shape.y + c4Shape.typeC4Shape.Y).text(\"<<\" + c4Shape.typeC4Shape.text + \">>\");\n switch (c4Shape.typeC4Shape.text) {\n case \"person\":\n case \"external_person\":\n drawImage(\n c4ShapeElem,\n 48,\n 48,\n c4Shape.x + c4Shape.width / 2 - 24,\n c4Shape.y + c4Shape.image.Y,\n personImg\n );\n break;\n }\n let textFontConf = conf2[c4Shape.typeC4Shape.text + \"Font\"]();\n textFontConf.fontWeight = \"bold\";\n textFontConf.fontSize = textFontConf.fontSize + 2;\n textFontConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf2)(\n c4Shape.label.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.label.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor },\n textFontConf\n );\n textFontConf = conf2[c4Shape.typeC4Shape.text + \"Font\"]();\n textFontConf.fontColor = fontColor;\n if (c4Shape.techn && ((_a = c4Shape.techn) == null ? void 0 : _a.text) !== \"\") {\n _drawTextCandidateFunc(conf2)(\n c4Shape.techn.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.techn.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor, \"font-style\": \"italic\" },\n textFontConf\n );\n } else if (c4Shape.type && c4Shape.type.text !== \"\") {\n _drawTextCandidateFunc(conf2)(\n c4Shape.type.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.type.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor, \"font-style\": \"italic\" },\n textFontConf\n );\n }\n if (c4Shape.descr && c4Shape.descr.text !== \"\") {\n textFontConf = conf2.personFont();\n textFontConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf2)(\n c4Shape.descr.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.descr.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor },\n textFontConf\n );\n }\n return c4Shape.height;\n};\nconst insertDatabaseIcon = function(elem) {\n elem.append(\"defs\").append(\"symbol\").attr(\"id\", \"database\").attr(\"fill-rule\", \"evenodd\").attr(\"clip-rule\", \"evenodd\").append(\"path\").attr(\"transform\", \"scale(.5)\").attr(\n \"d\",\n \"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z\"\n );\n};\nconst insertComputerIcon = function(elem) {\n elem.append(\"defs\").append(\"symbol\").attr(\"id\", \"computer\").attr(\"width\", \"24\").attr(\"height\", \"24\").append(\"path\").attr(\"transform\", \"scale(.5)\").attr(\n \"d\",\n \"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z\"\n );\n};\nconst insertClockIcon = function(elem) {\n elem.append(\"defs\").append(\"symbol\").attr(\"id\", \"clock\").attr(\"width\", \"24\").attr(\"height\", \"24\").append(\"path\").attr(\"transform\", \"scale(.5)\").attr(\n \"d\",\n \"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z\"\n );\n};\nconst insertArrowHead = function(elem) {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", \"arrowhead\").attr(\"refX\", 9).attr(\"refY\", 5).attr(\"markerUnits\", \"userSpaceOnUse\").attr(\"markerWidth\", 12).attr(\"markerHeight\", 12).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 0 0 L 10 5 L 0 10 z\");\n};\nconst insertArrowEnd = function(elem) {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", \"arrowend\").attr(\"refX\", 1).attr(\"refY\", 5).attr(\"markerUnits\", \"userSpaceOnUse\").attr(\"markerWidth\", 12).attr(\"markerHeight\", 12).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 10 0 L 0 5 L 10 10 z\");\n};\nconst insertArrowFilledHead = function(elem) {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", \"filled-head\").attr(\"refX\", 18).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L14,7 L9,1 Z\");\n};\nconst insertDynamicNumber = function(elem) {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", \"sequencenumber\").attr(\"refX\", 15).attr(\"refY\", 15).attr(\"markerWidth\", 60).attr(\"markerHeight\", 40).attr(\"orient\", \"auto\").append(\"circle\").attr(\"cx\", 15).attr(\"cy\", 15).attr(\"r\", 6);\n};\nconst insertArrowCrossHead = function(elem) {\n const defs = elem.append(\"defs\");\n const marker = defs.append(\"marker\").attr(\"id\", \"crosshead\").attr(\"markerWidth\", 15).attr(\"markerHeight\", 8).attr(\"orient\", \"auto\").attr(\"refX\", 16).attr(\"refY\", 4);\n marker.append(\"path\").attr(\"fill\", \"black\").attr(\"stroke\", \"#000000\").style(\"stroke-dasharray\", \"0, 0\").attr(\"stroke-width\", \"1px\").attr(\"d\", \"M 9,2 V 6 L16,4 Z\");\n marker.append(\"path\").attr(\"fill\", \"none\").attr(\"stroke\", \"#000000\").style(\"stroke-dasharray\", \"0, 0\").attr(\"stroke-width\", \"1px\").attr(\"d\", \"M 0,1 L 6,7 M 6,1 L 0,7\");\n};\nconst getC4ShapeFont = (cnf, typeC4Shape) => {\n return {\n fontFamily: cnf[typeC4Shape + \"FontFamily\"],\n fontSize: cnf[typeC4Shape + \"FontSize\"],\n fontWeight: cnf[typeC4Shape + \"FontWeight\"]\n };\n};\nconst _drawTextCandidateFunc = function() {\n function byText(content, g, x, y, width, height, textAttrs) {\n const text = g.append(\"text\").attr(\"x\", x + width / 2).attr(\"y\", y + height / 2 + 5).style(\"text-anchor\", \"middle\").text(content);\n _setTextAttrs(text, textAttrs);\n }\n function byTspan(content, g, x, y, width, height, textAttrs, conf2) {\n const { fontSize, fontFamily, fontWeight } = conf2;\n const lines = content.split(common.lineBreakRegex);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * fontSize - fontSize * (lines.length - 1) / 2;\n const text = g.append(\"text\").attr(\"x\", x + width / 2).attr(\"y\", y).style(\"text-anchor\", \"middle\").attr(\"dominant-baseline\", \"middle\").style(\"font-size\", fontSize).style(\"font-weight\", fontWeight).style(\"font-family\", fontFamily);\n text.append(\"tspan\").attr(\"dy\", dy).text(lines[i]).attr(\"alignment-baseline\", \"mathematical\");\n _setTextAttrs(text, textAttrs);\n }\n }\n function byFo(content, g, x, y, width, height, textAttrs, conf2) {\n const s = g.append(\"switch\");\n const f = s.append(\"foreignObject\").attr(\"x\", x).attr(\"y\", y).attr(\"width\", width).attr(\"height\", height);\n const text = f.append(\"xhtml:div\").style(\"display\", \"table\").style(\"height\", \"100%\").style(\"width\", \"100%\");\n text.append(\"div\").style(\"display\", \"table-cell\").style(\"text-align\", \"center\").style(\"vertical-align\", \"middle\").text(content);\n byTspan(content, s, x, y, width, height, textAttrs, conf2);\n _setTextAttrs(text, textAttrs);\n }\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (fromTextAttrsDict.hasOwnProperty(key)) {\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n return function(conf2) {\n return conf2.textPlacement === \"fo\" ? byFo : conf2.textPlacement === \"old\" ? byText : byTspan;\n };\n}();\nconst svgDraw = {\n drawRect,\n drawBoundary: drawBoundary$1,\n drawC4Shape,\n drawRels: drawRels$1,\n drawImage,\n insertArrowHead,\n insertArrowEnd,\n insertArrowFilledHead,\n insertDynamicNumber,\n insertArrowCrossHead,\n insertDatabaseIcon,\n insertComputerIcon,\n insertClockIcon\n};\nlet globalBoundaryMaxX = 0, globalBoundaryMaxY = 0;\nlet c4ShapeInRow = 4;\nlet c4BoundaryInRow = 2;\nparser.yy = c4Db;\nlet conf = {};\nclass Bounds {\n constructor(diagObj) {\n this.name = \"\";\n this.data = {};\n this.data.startx = void 0;\n this.data.stopx = void 0;\n this.data.starty = void 0;\n this.data.stopy = void 0;\n this.data.widthLimit = void 0;\n this.nextData = {};\n this.nextData.startx = void 0;\n this.nextData.stopx = void 0;\n this.nextData.starty = void 0;\n this.nextData.stopy = void 0;\n this.nextData.cnt = 0;\n setConf(diagObj.db.getConfig());\n }\n setData(startx, stopx, starty, stopy) {\n this.nextData.startx = this.data.startx = startx;\n this.nextData.stopx = this.data.stopx = stopx;\n this.nextData.starty = this.data.starty = starty;\n this.nextData.stopy = this.data.stopy = stopy;\n }\n updateVal(obj, key, val, fun) {\n if (obj[key] === void 0) {\n obj[key] = val;\n } else {\n obj[key] = fun(val, obj[key]);\n }\n }\n insert(c4Shape) {\n this.nextData.cnt = this.nextData.cnt + 1;\n let _startx = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + c4Shape.margin : this.nextData.stopx + c4Shape.margin * 2;\n let _stopx = _startx + c4Shape.width;\n let _starty = this.nextData.starty + c4Shape.margin * 2;\n let _stopy = _starty + c4Shape.height;\n if (_startx >= this.data.widthLimit || _stopx >= this.data.widthLimit || this.nextData.cnt > c4ShapeInRow) {\n _startx = this.nextData.startx + c4Shape.margin + conf.nextLinePaddingX;\n _starty = this.nextData.stopy + c4Shape.margin * 2;\n this.nextData.stopx = _stopx = _startx + c4Shape.width;\n this.nextData.starty = this.nextData.stopy;\n this.nextData.stopy = _stopy = _starty + c4Shape.height;\n this.nextData.cnt = 1;\n }\n c4Shape.x = _startx;\n c4Shape.y = _starty;\n this.updateVal(this.data, \"startx\", _startx, Math.min);\n this.updateVal(this.data, \"starty\", _starty, Math.min);\n this.updateVal(this.data, \"stopx\", _stopx, Math.max);\n this.updateVal(this.data, \"stopy\", _stopy, Math.max);\n this.updateVal(this.nextData, \"startx\", _startx, Math.min);\n this.updateVal(this.nextData, \"starty\", _starty, Math.min);\n this.updateVal(this.nextData, \"stopx\", _stopx, Math.max);\n this.updateVal(this.nextData, \"stopy\", _stopy, Math.max);\n }\n init(diagObj) {\n this.name = \"\";\n this.data = {\n startx: void 0,\n stopx: void 0,\n starty: void 0,\n stopy: void 0,\n widthLimit: void 0\n };\n this.nextData = {\n startx: void 0,\n stopx: void 0,\n starty: void 0,\n stopy: void 0,\n cnt: 0\n };\n setConf(diagObj.db.getConfig());\n }\n bumpLastMargin(margin) {\n this.data.stopx += margin;\n this.data.stopy += margin;\n }\n}\nconst setConf = function(cnf) {\n assignWithDepth(conf, cnf);\n if (cnf.fontFamily) {\n conf.personFontFamily = conf.systemFontFamily = conf.messageFontFamily = cnf.fontFamily;\n }\n if (cnf.fontSize) {\n conf.personFontSize = conf.systemFontSize = conf.messageFontSize = cnf.fontSize;\n }\n if (cnf.fontWeight) {\n conf.personFontWeight = conf.systemFontWeight = conf.messageFontWeight = cnf.fontWeight;\n }\n};\nconst c4ShapeFont = (cnf, typeC4Shape) => {\n return {\n fontFamily: cnf[typeC4Shape + \"FontFamily\"],\n fontSize: cnf[typeC4Shape + \"FontSize\"],\n fontWeight: cnf[typeC4Shape + \"FontWeight\"]\n };\n};\nconst boundaryFont = (cnf) => {\n return {\n fontFamily: cnf.boundaryFontFamily,\n fontSize: cnf.boundaryFontSize,\n fontWeight: cnf.boundaryFontWeight\n };\n};\nconst messageFont = (cnf) => {\n return {\n fontFamily: cnf.messageFontFamily,\n fontSize: cnf.messageFontSize,\n fontWeight: cnf.messageFontWeight\n };\n};\nfunction calcC4ShapeTextWH(textType, c4Shape, c4ShapeTextWrap, textConf, textLimitWidth) {\n if (!c4Shape[textType].width) {\n if (c4ShapeTextWrap) {\n c4Shape[textType].text = wrapLabel(c4Shape[textType].text, textLimitWidth, textConf);\n c4Shape[textType].textLines = c4Shape[textType].text.split(common.lineBreakRegex).length;\n c4Shape[textType].width = textLimitWidth;\n c4Shape[textType].height = calculateTextHeight(c4Shape[textType].text, textConf);\n } else {\n let lines = c4Shape[textType].text.split(common.lineBreakRegex);\n c4Shape[textType].textLines = lines.length;\n let lineHeight = 0;\n c4Shape[textType].height = 0;\n c4Shape[textType].width = 0;\n for (const line of lines) {\n c4Shape[textType].width = Math.max(\n calculateTextWidth(line, textConf),\n c4Shape[textType].width\n );\n lineHeight = calculateTextHeight(line, textConf);\n c4Shape[textType].height = c4Shape[textType].height + lineHeight;\n }\n }\n }\n}\nconst drawBoundary = function(diagram2, boundary, bounds) {\n boundary.x = bounds.data.startx;\n boundary.y = bounds.data.starty;\n boundary.width = bounds.data.stopx - bounds.data.startx;\n boundary.height = bounds.data.stopy - bounds.data.starty;\n boundary.label.y = conf.c4ShapeMargin - 35;\n let boundaryTextWrap = boundary.wrap && conf.wrap;\n let boundaryLabelConf = boundaryFont(conf);\n boundaryLabelConf.fontSize = boundaryLabelConf.fontSize + 2;\n boundaryLabelConf.fontWeight = \"bold\";\n let textLimitWidth = calculateTextWidth(boundary.label.text, boundaryLabelConf);\n calcC4ShapeTextWH(\"label\", boundary, boundaryTextWrap, boundaryLabelConf, textLimitWidth);\n svgDraw.drawBoundary(diagram2, boundary, conf);\n};\nconst drawC4ShapeArray = function(currentBounds, diagram2, c4ShapeArray2, c4ShapeKeys) {\n let Y = 0;\n for (const c4ShapeKey of c4ShapeKeys) {\n Y = 0;\n const c4Shape = c4ShapeArray2[c4ShapeKey];\n let c4ShapeTypeConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n c4ShapeTypeConf.fontSize = c4ShapeTypeConf.fontSize - 2;\n c4Shape.typeC4Shape.width = calculateTextWidth(\n \"«\" + c4Shape.typeC4Shape.text + \"»\",\n c4ShapeTypeConf\n );\n c4Shape.typeC4Shape.height = c4ShapeTypeConf.fontSize + 2;\n c4Shape.typeC4Shape.Y = conf.c4ShapePadding;\n Y = c4Shape.typeC4Shape.Y + c4Shape.typeC4Shape.height - 4;\n c4Shape.image = { width: 0, height: 0, Y: 0 };\n switch (c4Shape.typeC4Shape.text) {\n case \"person\":\n case \"external_person\":\n c4Shape.image.width = 48;\n c4Shape.image.height = 48;\n c4Shape.image.Y = Y;\n Y = c4Shape.image.Y + c4Shape.image.height;\n break;\n }\n if (c4Shape.sprite) {\n c4Shape.image.width = 48;\n c4Shape.image.height = 48;\n c4Shape.image.Y = Y;\n Y = c4Shape.image.Y + c4Shape.image.height;\n }\n let c4ShapeTextWrap = c4Shape.wrap && conf.wrap;\n let textLimitWidth = conf.width - conf.c4ShapePadding * 2;\n let c4ShapeLabelConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n c4ShapeLabelConf.fontSize = c4ShapeLabelConf.fontSize + 2;\n c4ShapeLabelConf.fontWeight = \"bold\";\n calcC4ShapeTextWH(\"label\", c4Shape, c4ShapeTextWrap, c4ShapeLabelConf, textLimitWidth);\n c4Shape[\"label\"].Y = Y + 8;\n Y = c4Shape[\"label\"].Y + c4Shape[\"label\"].height;\n if (c4Shape.type && c4Shape.type.text !== \"\") {\n c4Shape.type.text = \"[\" + c4Shape.type.text + \"]\";\n let c4ShapeTypeConf2 = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n calcC4ShapeTextWH(\"type\", c4Shape, c4ShapeTextWrap, c4ShapeTypeConf2, textLimitWidth);\n c4Shape[\"type\"].Y = Y + 5;\n Y = c4Shape[\"type\"].Y + c4Shape[\"type\"].height;\n } else if (c4Shape.techn && c4Shape.techn.text !== \"\") {\n c4Shape.techn.text = \"[\" + c4Shape.techn.text + \"]\";\n let c4ShapeTechnConf = c4ShapeFont(conf, c4Shape.techn.text);\n calcC4ShapeTextWH(\"techn\", c4Shape, c4ShapeTextWrap, c4ShapeTechnConf, textLimitWidth);\n c4Shape[\"techn\"].Y = Y + 5;\n Y = c4Shape[\"techn\"].Y + c4Shape[\"techn\"].height;\n }\n let rectHeight = Y;\n let rectWidth = c4Shape.label.width;\n if (c4Shape.descr && c4Shape.descr.text !== \"\") {\n let c4ShapeDescrConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n calcC4ShapeTextWH(\"descr\", c4Shape, c4ShapeTextWrap, c4ShapeDescrConf, textLimitWidth);\n c4Shape[\"descr\"].Y = Y + 20;\n Y = c4Shape[\"descr\"].Y + c4Shape[\"descr\"].height;\n rectWidth = Math.max(c4Shape.label.width, c4Shape.descr.width);\n rectHeight = Y - c4Shape[\"descr\"].textLines * 5;\n }\n rectWidth = rectWidth + conf.c4ShapePadding;\n c4Shape.width = Math.max(c4Shape.width || conf.width, rectWidth, conf.width);\n c4Shape.height = Math.max(c4Shape.height || conf.height, rectHeight, conf.height);\n c4Shape.margin = c4Shape.margin || conf.c4ShapeMargin;\n currentBounds.insert(c4Shape);\n svgDraw.drawC4Shape(diagram2, c4Shape, conf);\n }\n currentBounds.bumpLastMargin(conf.c4ShapeMargin);\n};\nclass Point {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n }\n}\nlet getIntersectPoint = function(fromNode, endPoint) {\n let x1 = fromNode.x;\n let y1 = fromNode.y;\n let x2 = endPoint.x;\n let y2 = endPoint.y;\n let fromCenterX = x1 + fromNode.width / 2;\n let fromCenterY = y1 + fromNode.height / 2;\n let dx = Math.abs(x1 - x2);\n let dy = Math.abs(y1 - y2);\n let tanDYX = dy / dx;\n let fromDYX = fromNode.height / fromNode.width;\n let returnPoint = null;\n if (y1 == y2 && x1 < x2) {\n returnPoint = new Point(x1 + fromNode.width, fromCenterY);\n } else if (y1 == y2 && x1 > x2) {\n returnPoint = new Point(x1, fromCenterY);\n } else if (x1 == x2 && y1 < y2) {\n returnPoint = new Point(fromCenterX, y1 + fromNode.height);\n } else if (x1 == x2 && y1 > y2) {\n returnPoint = new Point(fromCenterX, y1);\n }\n if (x1 > x2 && y1 < y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1, fromCenterY + tanDYX * fromNode.width / 2);\n } else {\n returnPoint = new Point(\n fromCenterX - dx / dy * fromNode.height / 2,\n y1 + fromNode.height\n );\n }\n } else if (x1 < x2 && y1 < y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1 + fromNode.width, fromCenterY + tanDYX * fromNode.width / 2);\n } else {\n returnPoint = new Point(\n fromCenterX + dx / dy * fromNode.height / 2,\n y1 + fromNode.height\n );\n }\n } else if (x1 < x2 && y1 > y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1 + fromNode.width, fromCenterY - tanDYX * fromNode.width / 2);\n } else {\n returnPoint = new Point(fromCenterX + fromNode.height / 2 * dx / dy, y1);\n }\n } else if (x1 > x2 && y1 > y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1, fromCenterY - fromNode.width / 2 * tanDYX);\n } else {\n returnPoint = new Point(fromCenterX - fromNode.height / 2 * dx / dy, y1);\n }\n }\n return returnPoint;\n};\nlet getIntersectPoints = function(fromNode, endNode) {\n let endIntersectPoint = { x: 0, y: 0 };\n endIntersectPoint.x = endNode.x + endNode.width / 2;\n endIntersectPoint.y = endNode.y + endNode.height / 2;\n let startPoint = getIntersectPoint(fromNode, endIntersectPoint);\n endIntersectPoint.x = fromNode.x + fromNode.width / 2;\n endIntersectPoint.y = fromNode.y + fromNode.height / 2;\n let endPoint = getIntersectPoint(endNode, endIntersectPoint);\n return { startPoint, endPoint };\n};\nconst drawRels = function(diagram2, rels2, getC4ShapeObj, diagObj) {\n let i = 0;\n for (let rel of rels2) {\n i = i + 1;\n let relTextWrap = rel.wrap && conf.wrap;\n let relConf = messageFont(conf);\n let diagramType = diagObj.db.getC4Type();\n if (diagramType === \"C4Dynamic\") {\n rel.label.text = i + \": \" + rel.label.text;\n }\n let textLimitWidth = calculateTextWidth(rel.label.text, relConf);\n calcC4ShapeTextWH(\"label\", rel, relTextWrap, relConf, textLimitWidth);\n if (rel.techn && rel.techn.text !== \"\") {\n textLimitWidth = calculateTextWidth(rel.techn.text, relConf);\n calcC4ShapeTextWH(\"techn\", rel, relTextWrap, relConf, textLimitWidth);\n }\n if (rel.descr && rel.descr.text !== \"\") {\n textLimitWidth = calculateTextWidth(rel.descr.text, relConf);\n calcC4ShapeTextWH(\"descr\", rel, relTextWrap, relConf, textLimitWidth);\n }\n let fromNode = getC4ShapeObj(rel.from);\n let endNode = getC4ShapeObj(rel.to);\n let points = getIntersectPoints(fromNode, endNode);\n rel.startPoint = points.startPoint;\n rel.endPoint = points.endPoint;\n }\n svgDraw.drawRels(diagram2, rels2, conf);\n};\nfunction drawInsideBoundary(diagram2, parentBoundaryAlias, parentBounds, currentBoundaries, diagObj) {\n let currentBounds = new Bounds(diagObj);\n currentBounds.data.widthLimit = parentBounds.data.widthLimit / Math.min(c4BoundaryInRow, currentBoundaries.length);\n for (let [i, currentBoundary] of currentBoundaries.entries()) {\n let Y = 0;\n currentBoundary.image = { width: 0, height: 0, Y: 0 };\n if (currentBoundary.sprite) {\n currentBoundary.image.width = 48;\n currentBoundary.image.height = 48;\n currentBoundary.image.Y = Y;\n Y = currentBoundary.image.Y + currentBoundary.image.height;\n }\n let currentBoundaryTextWrap = currentBoundary.wrap && conf.wrap;\n let currentBoundaryLabelConf = boundaryFont(conf);\n currentBoundaryLabelConf.fontSize = currentBoundaryLabelConf.fontSize + 2;\n currentBoundaryLabelConf.fontWeight = \"bold\";\n calcC4ShapeTextWH(\n \"label\",\n currentBoundary,\n currentBoundaryTextWrap,\n currentBoundaryLabelConf,\n currentBounds.data.widthLimit\n );\n currentBoundary[\"label\"].Y = Y + 8;\n Y = currentBoundary[\"label\"].Y + currentBoundary[\"label\"].height;\n if (currentBoundary.type && currentBoundary.type.text !== \"\") {\n currentBoundary.type.text = \"[\" + currentBoundary.type.text + \"]\";\n let currentBoundaryTypeConf = boundaryFont(conf);\n calcC4ShapeTextWH(\n \"type\",\n currentBoundary,\n currentBoundaryTextWrap,\n currentBoundaryTypeConf,\n currentBounds.data.widthLimit\n );\n currentBoundary[\"type\"].Y = Y + 5;\n Y = currentBoundary[\"type\"].Y + currentBoundary[\"type\"].height;\n }\n if (currentBoundary.descr && currentBoundary.descr.text !== \"\") {\n let currentBoundaryDescrConf = boundaryFont(conf);\n currentBoundaryDescrConf.fontSize = currentBoundaryDescrConf.fontSize - 2;\n calcC4ShapeTextWH(\n \"descr\",\n currentBoundary,\n currentBoundaryTextWrap,\n currentBoundaryDescrConf,\n currentBounds.data.widthLimit\n );\n currentBoundary[\"descr\"].Y = Y + 20;\n Y = currentBoundary[\"descr\"].Y + currentBoundary[\"descr\"].height;\n }\n if (i == 0 || i % c4BoundaryInRow === 0) {\n let _x = parentBounds.data.startx + conf.diagramMarginX;\n let _y = parentBounds.data.stopy + conf.diagramMarginY + Y;\n currentBounds.setData(_x, _x, _y, _y);\n } else {\n let _x = currentBounds.data.stopx !== currentBounds.data.startx ? currentBounds.data.stopx + conf.diagramMarginX : currentBounds.data.startx;\n let _y = currentBounds.data.starty;\n currentBounds.setData(_x, _x, _y, _y);\n }\n currentBounds.name = currentBoundary.alias;\n let currentPersonOrSystemArray = diagObj.db.getC4ShapeArray(currentBoundary.alias);\n let currentPersonOrSystemKeys = diagObj.db.getC4ShapeKeys(currentBoundary.alias);\n if (currentPersonOrSystemKeys.length > 0) {\n drawC4ShapeArray(\n currentBounds,\n diagram2,\n currentPersonOrSystemArray,\n currentPersonOrSystemKeys\n );\n }\n parentBoundaryAlias = currentBoundary.alias;\n let nextCurrentBoundarys = diagObj.db.getBoundarys(parentBoundaryAlias);\n if (nextCurrentBoundarys.length > 0) {\n drawInsideBoundary(\n diagram2,\n parentBoundaryAlias,\n currentBounds,\n nextCurrentBoundarys,\n diagObj\n );\n }\n if (currentBoundary.alias !== \"global\") {\n drawBoundary(diagram2, currentBoundary, currentBounds);\n }\n parentBounds.data.stopy = Math.max(\n currentBounds.data.stopy + conf.c4ShapeMargin,\n parentBounds.data.stopy\n );\n parentBounds.data.stopx = Math.max(\n currentBounds.data.stopx + conf.c4ShapeMargin,\n parentBounds.data.stopx\n );\n globalBoundaryMaxX = Math.max(globalBoundaryMaxX, parentBounds.data.stopx);\n globalBoundaryMaxY = Math.max(globalBoundaryMaxY, parentBounds.data.stopy);\n }\n}\nconst draw = function(_text, id, _version, diagObj) {\n conf = getConfig().c4;\n const securityLevel = getConfig().securityLevel;\n let sandboxElement;\n if (securityLevel === \"sandbox\") {\n sandboxElement = select(\"#i\" + id);\n }\n const root = securityLevel === \"sandbox\" ? select(sandboxElement.nodes()[0].contentDocument.body) : select(\"body\");\n let db = diagObj.db;\n diagObj.db.setWrap(conf.wrap);\n c4ShapeInRow = db.getC4ShapeInRow();\n c4BoundaryInRow = db.getC4BoundaryInRow();\n log.debug(`C:${JSON.stringify(conf, null, 2)}`);\n const diagram2 = securityLevel === \"sandbox\" ? root.select(`[id=\"${id}\"]`) : select(`[id=\"${id}\"]`);\n svgDraw.insertComputerIcon(diagram2);\n svgDraw.insertDatabaseIcon(diagram2);\n svgDraw.insertClockIcon(diagram2);\n let screenBounds = new Bounds(diagObj);\n screenBounds.setData(\n conf.diagramMarginX,\n conf.diagramMarginX,\n conf.diagramMarginY,\n conf.diagramMarginY\n );\n screenBounds.data.widthLimit = screen.availWidth;\n globalBoundaryMaxX = conf.diagramMarginX;\n globalBoundaryMaxY = conf.diagramMarginY;\n const title2 = diagObj.db.getTitle();\n let currentBoundaries = diagObj.db.getBoundarys(\"\");\n drawInsideBoundary(diagram2, \"\", screenBounds, currentBoundaries, diagObj);\n svgDraw.insertArrowHead(diagram2);\n svgDraw.insertArrowEnd(diagram2);\n svgDraw.insertArrowCrossHead(diagram2);\n svgDraw.insertArrowFilledHead(diagram2);\n drawRels(diagram2, diagObj.db.getRels(), diagObj.db.getC4Shape, diagObj);\n screenBounds.data.stopx = globalBoundaryMaxX;\n screenBounds.data.stopy = globalBoundaryMaxY;\n const box = screenBounds.data;\n let boxHeight = box.stopy - box.starty;\n let height = boxHeight + 2 * conf.diagramMarginY;\n let boxWidth = box.stopx - box.startx;\n const width = boxWidth + 2 * conf.diagramMarginX;\n if (title2) {\n diagram2.append(\"text\").text(title2).attr(\"x\", (box.stopx - box.startx) / 2 - 4 * conf.diagramMarginX).attr(\"y\", box.starty + conf.diagramMarginY);\n }\n configureSvgSize(diagram2, height, width, conf.useMaxWidth);\n const extraVertForTitle = title2 ? 60 : 0;\n diagram2.attr(\n \"viewBox\",\n box.startx - conf.diagramMarginX + \" -\" + (conf.diagramMarginY + extraVertForTitle) + \" \" + width + \" \" + (height + extraVertForTitle)\n );\n log.debug(`models:`, box);\n};\nconst c4Renderer = {\n drawPersonOrSystemArray: drawC4ShapeArray,\n drawBoundary,\n setConf,\n draw\n};\nconst getStyles = (options) => `.person {\n stroke: ${options.personBorder};\n fill: ${options.personBkg};\n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ress/.cache/deps/chunk-4JMSTK7S.js
@@ -0,0 +1,1576 @@
+import {
+ createText
+} from "./chunk-SHHR4OQP.js";
+import {
+ parseMember
+} from "./chunk-SSXL5IQU.js";
+import {
+ basis_default,
+ decodeEntities,
+ evaluate,
+ getConfig$1,
+ line_default,
+ log$1,
+ sanitizeText$2,
+ select_default,
+ utils
+} from "./chunk-4QTAVOE5.js";
+
+// node_modules/mermaid/dist/edges-c959041a.js
+var insertMarkers = (elem, markerArray, type, id) => {
+ markerArray.forEach((markerName) => {
+ markers[markerName](elem, type, id);
+ });
+};
+var extension = (elem, type, id) => {
+ log$1.trace("Making markers for ", id);
+ elem.append("defs").append("marker").attr("id", type + "-extensionStart").attr("class", "marker extension " + type).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z");
+ elem.append("defs").append("marker").attr("id", type + "-extensionEnd").attr("class", "marker extension " + type).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
+};
+var composition = (elem, type) => {
+ elem.append("defs").append("marker").attr("id", type + "-compositionStart").attr("class", "marker composition " + type).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
+ elem.append("defs").append("marker").attr("id", type + "-compositionEnd").attr("class", "marker composition " + type).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
+};
+var aggregation = (elem, type) => {
+ elem.append("defs").append("marker").attr("id", type + "-aggregationStart").attr("class", "marker aggregation " + type).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
+ elem.append("defs").append("marker").attr("id", type + "-aggregationEnd").attr("class", "marker aggregation " + type).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
+};
+var dependency = (elem, type) => {
+ elem.append("defs").append("marker").attr("id", type + "-dependencyStart").attr("class", "marker dependency " + type).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z");
+ elem.append("defs").append("marker").attr("id", type + "-dependencyEnd").attr("class", "marker dependency " + type).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
+};
+var lollipop = (elem, type) => {
+ elem.append("defs").append("marker").attr("id", type + "-lollipopStart").attr("class", "marker lollipop " + type).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "white").attr("cx", 6).attr("cy", 7).attr("r", 6);
+};
+var point = (elem, type) => {
+ elem.append("marker").attr("id", type + "-pointEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 10).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
+ elem.append("marker").attr("id", type + "-pointStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 0).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
+};
+var circle$1 = (elem, type) => {
+ elem.append("marker").attr("id", type + "-circleEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
+ elem.append("marker").attr("id", type + "-circleStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
+};
+var cross = (elem, type) => {
+ elem.append("marker").attr("id", type + "-crossEnd").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
+ elem.append("marker").attr("id", type + "-crossStart").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
+};
+var barb = (elem, type) => {
+ elem.append("defs").append("marker").attr("id", type + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
+};
+var markers = {
+ extension,
+ composition,
+ aggregation,
+ dependency,
+ lollipop,
+ point,
+ circle: circle$1,
+ cross,
+ barb
+};
+var insertMarkers$1 = insertMarkers;
+function applyStyle(dom, styleFn) {
+ if (styleFn) {
+ dom.attr("style", styleFn);
+ }
+}
+function addHtmlLabel(node) {
+ const fo = select_default(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject"));
+ const div = fo.append("xhtml:div");
+ const label = node.label;
+ const labelClass = node.isNode ? "nodeLabel" : "edgeLabel";
+ div.html(
+ '" + label + ""
+ );
+ applyStyle(div, node.labelStyle);
+ div.style("display", "inline-block");
+ div.style("white-space", "nowrap");
+ div.attr("xmlns", "http://www.w3.org/1999/xhtml");
+ return fo.node();
+}
+var createLabel = (_vertexText, style, isTitle, isNode) => {
+ let vertexText = _vertexText || "";
+ if (typeof vertexText === "object") {
+ vertexText = vertexText[0];
+ }
+ if (evaluate(getConfig$1().flowchart.htmlLabels)) {
+ vertexText = vertexText.replace(/\\n|\n/g, "
");
+ log$1.info("vertexText" + vertexText);
+ const node = {
+ isNode,
+ label: decodeEntities(vertexText).replace(
+ /fa[blrs]?:fa-[\w-]+/g,
+ (s) => ``
+ ),
+ labelStyle: style.replace("fill:", "color:")
+ };
+ let vertexNode = addHtmlLabel(node);
+ return vertexNode;
+ } else {
+ const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text");
+ svgLabel.setAttribute("style", style.replace("color:", "fill:"));
+ let rows = [];
+ if (typeof vertexText === "string") {
+ rows = vertexText.split(/\\n|\n|
/gi);
+ } else if (Array.isArray(vertexText)) {
+ rows = vertexText;
+ } else {
+ rows = [];
+ }
+ for (const row of rows) {
+ const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
+ tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve");
+ tspan.setAttribute("dy", "1em");
+ tspan.setAttribute("x", "0");
+ if (isTitle) {
+ tspan.setAttribute("class", "title-row");
+ } else {
+ tspan.setAttribute("class", "row");
+ }
+ tspan.textContent = row.trim();
+ svgLabel.appendChild(tspan);
+ }
+ return svgLabel;
+ }
+};
+var createLabel$1 = createLabel;
+var labelHelper = async (parent, node, _classes, isNode) => {
+ let classes;
+ const useHtmlLabels = node.useHtmlLabels || evaluate(getConfig$1().flowchart.htmlLabels);
+ if (!_classes) {
+ classes = "node default";
+ } else {
+ classes = _classes;
+ }
+ const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id);
+ const label = shapeSvg.insert("g").attr("class", "label").attr("style", node.labelStyle);
+ let labelText;
+ if (node.labelText === void 0) {
+ labelText = "";
+ } else {
+ labelText = typeof node.labelText === "string" ? node.labelText : node.labelText[0];
+ }
+ const textNode = label.node();
+ let text;
+ if (node.labelType === "markdown") {
+ text = createText(label, sanitizeText$2(decodeEntities(labelText), getConfig$1()), {
+ useHtmlLabels,
+ width: node.width || getConfig$1().flowchart.wrappingWidth,
+ classes: "markdown-node-label"
+ });
+ } else {
+ text = textNode.appendChild(
+ createLabel$1(
+ sanitizeText$2(decodeEntities(labelText), getConfig$1()),
+ node.labelStyle,
+ false,
+ isNode
+ )
+ );
+ }
+ let bbox = text.getBBox();
+ const halfPadding = node.padding / 2;
+ if (evaluate(getConfig$1().flowchart.htmlLabels)) {
+ const div = text.children[0];
+ const dv = select_default(text);
+ const images = div.getElementsByTagName("img");
+ if (images) {
+ const noImgText = labelText.replace(/
]*>/g, "").trim() === "";
+ await Promise.all(
+ [...images].map(
+ (img) => new Promise((res) => {
+ function setupImage() {
+ img.style.display = "flex";
+ img.style.flexDirection = "column";
+ if (noImgText) {
+ const bodyFontSize = getConfig$1().fontSize ? getConfig$1().fontSize : window.getComputedStyle(document.body).fontSize;
+ const enlargingFactor = 5;
+ img.style.width = parseInt(bodyFontSize, 10) * enlargingFactor + "px";
+ } else {
+ img.style.width = "100%";
+ }
+ res(img);
+ }
+ setTimeout(() => {
+ if (img.complete) {
+ setupImage();
+ }
+ });
+ img.addEventListener("error", setupImage);
+ img.addEventListener("load", setupImage);
+ })
+ )
+ );
+ }
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ if (useHtmlLabels) {
+ label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")");
+ } else {
+ label.attr("transform", "translate(0, " + -bbox.height / 2 + ")");
+ }
+ if (node.centerLabel) {
+ label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")");
+ }
+ label.insert("rect", ":first-child");
+ return { shapeSvg, bbox, halfPadding, label };
+};
+var updateNodeBounds = (node, element) => {
+ const bbox = element.node().getBBox();
+ node.width = bbox.width;
+ node.height = bbox.height;
+};
+function insertPolygonShape(parent, w, h, points) {
+ return parent.insert("polygon", ":first-child").attr(
+ "points",
+ points.map(function(d) {
+ return d.x + "," + d.y;
+ }).join(" ")
+ ).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")");
+}
+function intersectNode(node, point2) {
+ return node.intersect(point2);
+}
+function intersectEllipse(node, rx, ry, point2) {
+ var cx = node.x;
+ var cy = node.y;
+ var px = cx - point2.x;
+ var py = cy - point2.y;
+ var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);
+ var dx = Math.abs(rx * ry * px / det);
+ if (point2.x < cx) {
+ dx = -dx;
+ }
+ var dy = Math.abs(rx * ry * py / det);
+ if (point2.y < cy) {
+ dy = -dy;
+ }
+ return { x: cx + dx, y: cy + dy };
+}
+function intersectCircle(node, rx, point2) {
+ return intersectEllipse(node, rx, rx, point2);
+}
+function intersectLine(p1, p2, q1, q2) {
+ var a1, a2, b1, b2, c1, c2;
+ var r1, r2, r3, r4;
+ var denom, offset, num;
+ var x, y;
+ a1 = p2.y - p1.y;
+ b1 = p1.x - p2.x;
+ c1 = p2.x * p1.y - p1.x * p2.y;
+ r3 = a1 * q1.x + b1 * q1.y + c1;
+ r4 = a1 * q2.x + b1 * q2.y + c1;
+ if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {
+ return;
+ }
+ a2 = q2.y - q1.y;
+ b2 = q1.x - q2.x;
+ c2 = q2.x * q1.y - q1.x * q2.y;
+ r1 = a2 * p1.x + b2 * p1.y + c2;
+ r2 = a2 * p2.x + b2 * p2.y + c2;
+ if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) {
+ return;
+ }
+ denom = a1 * b2 - a2 * b1;
+ if (denom === 0) {
+ return;
+ }
+ offset = Math.abs(denom / 2);
+ num = b1 * c2 - b2 * c1;
+ x = num < 0 ? (num - offset) / denom : (num + offset) / denom;
+ num = a2 * c1 - a1 * c2;
+ y = num < 0 ? (num - offset) / denom : (num + offset) / denom;
+ return { x, y };
+}
+function sameSign(r1, r2) {
+ return r1 * r2 > 0;
+}
+function intersectPolygon(node, polyPoints, point2) {
+ var x1 = node.x;
+ var y1 = node.y;
+ var intersections = [];
+ var minX = Number.POSITIVE_INFINITY;
+ var minY = Number.POSITIVE_INFINITY;
+ if (typeof polyPoints.forEach === "function") {
+ polyPoints.forEach(function(entry) {
+ minX = Math.min(minX, entry.x);
+ minY = Math.min(minY, entry.y);
+ });
+ } else {
+ minX = Math.min(minX, polyPoints.x);
+ minY = Math.min(minY, polyPoints.y);
+ }
+ var left = x1 - node.width / 2 - minX;
+ var top = y1 - node.height / 2 - minY;
+ for (var i = 0; i < polyPoints.length; i++) {
+ var p1 = polyPoints[i];
+ var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];
+ var intersect2 = intersectLine(
+ node,
+ point2,
+ { x: left + p1.x, y: top + p1.y },
+ { x: left + p2.x, y: top + p2.y }
+ );
+ if (intersect2) {
+ intersections.push(intersect2);
+ }
+ }
+ if (!intersections.length) {
+ return node;
+ }
+ if (intersections.length > 1) {
+ intersections.sort(function(p, q) {
+ var pdx = p.x - point2.x;
+ var pdy = p.y - point2.y;
+ var distp = Math.sqrt(pdx * pdx + pdy * pdy);
+ var qdx = q.x - point2.x;
+ var qdy = q.y - point2.y;
+ var distq = Math.sqrt(qdx * qdx + qdy * qdy);
+ return distp < distq ? -1 : distp === distq ? 0 : 1;
+ });
+ }
+ return intersections[0];
+}
+var intersectRect = (node, point2) => {
+ var x = node.x;
+ var y = node.y;
+ var dx = point2.x - x;
+ var dy = point2.y - y;
+ var w = node.width / 2;
+ var h = node.height / 2;
+ var sx, sy;
+ if (Math.abs(dy) * w > Math.abs(dx) * h) {
+ if (dy < 0) {
+ h = -h;
+ }
+ sx = dy === 0 ? 0 : h * dx / dy;
+ sy = h;
+ } else {
+ if (dx < 0) {
+ w = -w;
+ }
+ sx = w;
+ sy = dx === 0 ? 0 : w * dy / dx;
+ }
+ return { x: x + sx, y: y + sy };
+};
+var intersectRect$1 = intersectRect;
+var intersect = {
+ node: intersectNode,
+ circle: intersectCircle,
+ ellipse: intersectEllipse,
+ polygon: intersectPolygon,
+ rect: intersectRect$1
+};
+var note = async (parent, node) => {
+ const useHtmlLabels = node.useHtmlLabels || getConfig$1().flowchart.htmlLabels;
+ if (!useHtmlLabels) {
+ node.centerLabel = true;
+ }
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(
+ parent,
+ node,
+ "node " + node.classes,
+ true
+ );
+ log$1.info("Classes = ", node.classes);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
+ updateNodeBounds(node, rect2);
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+var note$1 = note;
+var formatClass = (str) => {
+ if (str) {
+ return " " + str;
+ }
+ return "";
+};
+var getClassesFromNode = (node, otherClasses) => {
+ return `${otherClasses ? otherClasses : "node default"}${formatClass(node.classes)} ${formatClass(
+ node.class
+ )}`;
+};
+var question = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const s = w + h;
+ const points = [
+ { x: s / 2, y: 0 },
+ { x: s, y: -s / 2 },
+ { x: s / 2, y: -s },
+ { x: 0, y: -s / 2 }
+ ];
+ log$1.info("Question main (Circle)");
+ const questionElem = insertPolygonShape(shapeSvg, s, s, points);
+ questionElem.attr("style", node.style);
+ updateNodeBounds(node, questionElem);
+ node.intersect = function(point2) {
+ log$1.warn("Intersect called");
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+var choice = (parent, node) => {
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
+ const s = 28;
+ const points = [
+ { x: 0, y: s / 2 },
+ { x: s / 2, y: 0 },
+ { x: 0, y: -s / 2 },
+ { x: -s / 2, y: 0 }
+ ];
+ const choice2 = shapeSvg.insert("polygon", ":first-child").attr(
+ "points",
+ points.map(function(d) {
+ return d.x + "," + d.y;
+ }).join(" ")
+ );
+ choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28);
+ node.width = 28;
+ node.height = 28;
+ node.intersect = function(point2) {
+ return intersect.circle(node, 14, point2);
+ };
+ return shapeSvg;
+};
+var hexagon = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const f = 4;
+ const h = bbox.height + node.padding;
+ const m = h / f;
+ const w = bbox.width + 2 * m + node.padding;
+ const points = [
+ { x: m, y: 0 },
+ { x: w - m, y: 0 },
+ { x: w, y: -h / 2 },
+ { x: w - m, y: -h },
+ { x: m, y: -h },
+ { x: 0, y: -h / 2 }
+ ];
+ const hex = insertPolygonShape(shapeSvg, w, h, points);
+ hex.attr("style", node.style);
+ updateNodeBounds(node, hex);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+var rect_left_inv_arrow = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: -h / 2, y: 0 },
+ { x: w, y: 0 },
+ { x: w, y: -h },
+ { x: -h / 2, y: -h },
+ { x: 0, y: -h / 2 }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ node.width = w + h;
+ node.height = h;
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+var lean_right = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true);
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: -2 * h / 6, y: 0 },
+ { x: w - h / 6, y: 0 },
+ { x: w + 2 * h / 6, y: -h },
+ { x: h / 6, y: -h }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+var lean_left = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: 2 * h / 6, y: 0 },
+ { x: w + h / 6, y: 0 },
+ { x: w - 2 * h / 6, y: -h },
+ { x: -h / 6, y: -h }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+var trapezoid = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: -2 * h / 6, y: 0 },
+ { x: w + 2 * h / 6, y: 0 },
+ { x: w - h / 6, y: -h },
+ { x: h / 6, y: -h }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+var inv_trapezoid = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: h / 6, y: 0 },
+ { x: w - h / 6, y: 0 },
+ { x: w + 2 * h / 6, y: -h },
+ { x: -2 * h / 6, y: -h }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+var rect_right_inv_arrow = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: 0, y: 0 },
+ { x: w + h / 2, y: 0 },
+ { x: w, y: -h / 2 },
+ { x: w + h / 2, y: -h },
+ { x: 0, y: -h }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+var cylinder = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const rx = w / 2;
+ const ry = rx / (2.5 + w / 50);
+ const h = bbox.height + ry + node.padding;
+ const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h;
+ const el = shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node.style).attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")");
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ const pos = intersect.rect(node, point2);
+ const x = pos.x - node.x;
+ if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) {
+ let y = ry * ry * (1 - x * x / (rx * rx));
+ if (y != 0) {
+ y = Math.sqrt(y);
+ }
+ y = ry - y;
+ if (point2.y - node.y > 0) {
+ y = -y;
+ }
+ pos.y += y;
+ }
+ return pos;
+ };
+ return shapeSvg;
+};
+var rect = async (parent, node) => {
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(
+ parent,
+ node,
+ "node " + node.classes + " " + node.class,
+ true
+ );
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const totalWidth = bbox.width + node.padding;
+ const totalHeight = bbox.height + node.padding;
+ rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", totalWidth).attr("height", totalHeight);
+ if (node.props) {
+ const propKeys = new Set(Object.keys(node.props));
+ if (node.props.borders) {
+ applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);
+ propKeys.delete("borders");
+ }
+ propKeys.forEach((propKey) => {
+ log$1.warn(`Unknown node property ${propKey}`);
+ });
+ }
+ updateNodeBounds(node, rect2);
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+var labelRect = async (parent, node) => {
+ const { shapeSvg } = await labelHelper(parent, node, "label", true);
+ log$1.trace("Classes = ", node.class);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const totalWidth = 0;
+ const totalHeight = 0;
+ rect2.attr("width", totalWidth).attr("height", totalHeight);
+ shapeSvg.attr("class", "label edgeLabel");
+ if (node.props) {
+ const propKeys = new Set(Object.keys(node.props));
+ if (node.props.borders) {
+ applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);
+ propKeys.delete("borders");
+ }
+ propKeys.forEach((propKey) => {
+ log$1.warn(`Unknown node property ${propKey}`);
+ });
+ }
+ updateNodeBounds(node, rect2);
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) {
+ const strokeDashArray = [];
+ const addBorder = (length) => {
+ strokeDashArray.push(length, 0);
+ };
+ const skipBorder = (length) => {
+ strokeDashArray.push(0, length);
+ };
+ if (borders.includes("t")) {
+ log$1.debug("add top border");
+ addBorder(totalWidth);
+ } else {
+ skipBorder(totalWidth);
+ }
+ if (borders.includes("r")) {
+ log$1.debug("add right border");
+ addBorder(totalHeight);
+ } else {
+ skipBorder(totalHeight);
+ }
+ if (borders.includes("b")) {
+ log$1.debug("add bottom border");
+ addBorder(totalWidth);
+ } else {
+ skipBorder(totalWidth);
+ }
+ if (borders.includes("l")) {
+ log$1.debug("add left border");
+ addBorder(totalHeight);
+ } else {
+ skipBorder(totalHeight);
+ }
+ rect2.attr("stroke-dasharray", strokeDashArray.join(" "));
+}
+var rectWithTitle = (parent, node) => {
+ let classes;
+ if (!node.classes) {
+ classes = "node default";
+ } else {
+ classes = "node " + node.classes;
+ }
+ const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const innerLine = shapeSvg.insert("line");
+ const label = shapeSvg.insert("g").attr("class", "label");
+ const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText;
+ let title = "";
+ if (typeof text2 === "object") {
+ title = text2[0];
+ } else {
+ title = text2;
+ }
+ log$1.info("Label text abc79", title, text2, typeof text2 === "object");
+ const text = label.node().appendChild(createLabel$1(title, node.labelStyle, true, true));
+ let bbox = { width: 0, height: 0 };
+ if (evaluate(getConfig$1().flowchart.htmlLabels)) {
+ const div = text.children[0];
+ const dv = select_default(text);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ log$1.info("Text 2", text2);
+ const textRows = text2.slice(1, text2.length);
+ let titleBox = text.getBBox();
+ const descr = label.node().appendChild(
+ createLabel$1(textRows.join ? textRows.join("
") : textRows, node.labelStyle, true, true)
+ );
+ if (evaluate(getConfig$1().flowchart.htmlLabels)) {
+ const div = descr.children[0];
+ const dv = select_default(descr);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ const halfPadding = node.padding / 2;
+ select_default(descr).attr(
+ "transform",
+ "translate( " + // (titleBox.width - bbox.width) / 2 +
+ (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")"
+ );
+ select_default(text).attr(
+ "transform",
+ "translate( " + // (titleBox.width - bbox.width) / 2 +
+ (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)"
+ );
+ bbox = label.node().getBBox();
+ label.attr(
+ "transform",
+ "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")"
+ );
+ rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
+ innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);
+ updateNodeBounds(node, rect2);
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+var stadium = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const h = bbox.height + node.padding;
+ const w = bbox.width + h / 4 + node.padding;
+ const rect2 = shapeSvg.insert("rect", ":first-child").attr("style", node.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h);
+ updateNodeBounds(node, rect2);
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+var circle = async (parent, node) => {
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const circle2 = shapeSvg.insert("circle", ":first-child");
+ circle2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
+ log$1.info("Circle main");
+ updateNodeBounds(node, circle2);
+ node.intersect = function(point2) {
+ log$1.info("Circle intersect", node, bbox.width / 2 + halfPadding, point2);
+ return intersect.circle(node, bbox.width / 2 + halfPadding, point2);
+ };
+ return shapeSvg;
+};
+var doublecircle = async (parent, node) => {
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const gap = 5;
+ const circleGroup = shapeSvg.insert("g", ":first-child");
+ const outerCircle = circleGroup.insert("circle");
+ const innerCircle = circleGroup.insert("circle");
+ circleGroup.attr("class", node.class);
+ outerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node.padding + gap * 2).attr("height", bbox.height + node.padding + gap * 2);
+ innerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
+ log$1.info("DoubleCircle main");
+ updateNodeBounds(node, outerCircle);
+ node.intersect = function(point2) {
+ log$1.info("DoubleCircle intersect", node, bbox.width / 2 + halfPadding + gap, point2);
+ return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point2);
+ };
+ return shapeSvg;
+};
+var subroutine = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: 0, y: 0 },
+ { x: w, y: 0 },
+ { x: w, y: -h },
+ { x: 0, y: -h },
+ { x: 0, y: 0 },
+ { x: -8, y: 0 },
+ { x: w + 8, y: 0 },
+ { x: w + 8, y: -h },
+ { x: -8, y: -h },
+ { x: -8, y: 0 }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+var start = (parent, node) => {
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
+ const circle2 = shapeSvg.insert("circle", ":first-child");
+ circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14);
+ updateNodeBounds(node, circle2);
+ node.intersect = function(point2) {
+ return intersect.circle(node, 7, point2);
+ };
+ return shapeSvg;
+};
+var forkJoin = (parent, node, dir) => {
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
+ let width = 70;
+ let height = 10;
+ if (dir === "LR") {
+ width = 10;
+ height = 70;
+ }
+ const shape = shapeSvg.append("rect").attr("x", -1 * width / 2).attr("y", -1 * height / 2).attr("width", width).attr("height", height).attr("class", "fork-join");
+ updateNodeBounds(node, shape);
+ node.height = node.height + node.padding / 2;
+ node.width = node.width + node.padding / 2;
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+var end = (parent, node) => {
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
+ const innerCircle = shapeSvg.insert("circle", ":first-child");
+ const circle2 = shapeSvg.insert("circle", ":first-child");
+ circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14);
+ innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10);
+ updateNodeBounds(node, circle2);
+ node.intersect = function(point2) {
+ return intersect.circle(node, 7, point2);
+ };
+ return shapeSvg;
+};
+var class_box = (parent, node) => {
+ const halfPadding = node.padding / 2;
+ const rowPadding = 4;
+ const lineHeight = 8;
+ let classes;
+ if (!node.classes) {
+ classes = "node default";
+ } else {
+ classes = "node " + node.classes;
+ }
+ const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const topLine = shapeSvg.insert("line");
+ const bottomLine = shapeSvg.insert("line");
+ let maxWidth = 0;
+ let maxHeight = rowPadding;
+ const labelContainer = shapeSvg.insert("g").attr("class", "label");
+ let verticalPos = 0;
+ const hasInterface = node.classData.annotations && node.classData.annotations[0];
+ const interfaceLabelText = node.classData.annotations[0] ? "«" + node.classData.annotations[0] + "»" : "";
+ const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node.labelStyle, true, true));
+ let interfaceBBox = interfaceLabel.getBBox();
+ if (evaluate(getConfig$1().flowchart.htmlLabels)) {
+ const div = interfaceLabel.children[0];
+ const dv = select_default(interfaceLabel);
+ interfaceBBox = div.getBoundingClientRect();
+ dv.attr("width", interfaceBBox.width);
+ dv.attr("height", interfaceBBox.height);
+ }
+ if (node.classData.annotations[0]) {
+ maxHeight += interfaceBBox.height + rowPadding;
+ maxWidth += interfaceBBox.width;
+ }
+ let classTitleString = node.classData.label;
+ if (node.classData.type !== void 0 && node.classData.type !== "") {
+ if (getConfig$1().flowchart.htmlLabels) {
+ classTitleString += "<" + node.classData.type + ">";
+ } else {
+ classTitleString += "<" + node.classData.type + ">";
+ }
+ }
+ const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node.labelStyle, true, true));
+ select_default(classTitleLabel).attr("class", "classTitle");
+ let classTitleBBox = classTitleLabel.getBBox();
+ if (evaluate(getConfig$1().flowchart.htmlLabels)) {
+ const div = classTitleLabel.children[0];
+ const dv = select_default(classTitleLabel);
+ classTitleBBox = div.getBoundingClientRect();
+ dv.attr("width", classTitleBBox.width);
+ dv.attr("height", classTitleBBox.height);
+ }
+ maxHeight += classTitleBBox.height + rowPadding;
+ if (classTitleBBox.width > maxWidth) {
+ maxWidth = classTitleBBox.width;
+ }
+ const classAttributes = [];
+ node.classData.members.forEach((str) => {
+ const parsedInfo = parseMember(str);
+ let parsedText = parsedInfo.displayText;
+ if (getConfig$1().flowchart.htmlLabels) {
+ parsedText = parsedText.replace(//g, ">");
+ }
+ const lbl = labelContainer.node().appendChild(
+ createLabel$1(
+ parsedText,
+ parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,
+ true,
+ true
+ )
+ );
+ let bbox = lbl.getBBox();
+ if (evaluate(getConfig$1().flowchart.htmlLabels)) {
+ const div = lbl.children[0];
+ const dv = select_default(lbl);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ if (bbox.width > maxWidth) {
+ maxWidth = bbox.width;
+ }
+ maxHeight += bbox.height + rowPadding;
+ classAttributes.push(lbl);
+ });
+ maxHeight += lineHeight;
+ const classMethods = [];
+ node.classData.methods.forEach((str) => {
+ const parsedInfo = parseMember(str);
+ let displayText = parsedInfo.displayText;
+ if (getConfig$1().flowchart.htmlLabels) {
+ displayText = displayText.replace(//g, ">");
+ }
+ const lbl = labelContainer.node().appendChild(
+ createLabel$1(
+ displayText,
+ parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,
+ true,
+ true
+ )
+ );
+ let bbox = lbl.getBBox();
+ if (evaluate(getConfig$1().flowchart.htmlLabels)) {
+ const div = lbl.children[0];
+ const dv = select_default(lbl);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ if (bbox.width > maxWidth) {
+ maxWidth = bbox.width;
+ }
+ maxHeight += bbox.height + rowPadding;
+ classMethods.push(lbl);
+ });
+ maxHeight += lineHeight;
+ if (hasInterface) {
+ let diffX2 = (maxWidth - interfaceBBox.width) / 2;
+ select_default(interfaceLabel).attr(
+ "transform",
+ "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")"
+ );
+ verticalPos = interfaceBBox.height + rowPadding;
+ }
+ let diffX = (maxWidth - classTitleBBox.width) / 2;
+ select_default(classTitleLabel).attr(
+ "transform",
+ "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")"
+ );
+ verticalPos += classTitleBBox.height + rowPadding;
+ topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos);
+ verticalPos += lineHeight;
+ classAttributes.forEach((lbl) => {
+ select_default(lbl).attr(
+ "transform",
+ "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")"
+ );
+ const memberBBox = lbl == null ? void 0 : lbl.getBBox();
+ verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding;
+ });
+ verticalPos += lineHeight;
+ bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos);
+ verticalPos += lineHeight;
+ classMethods.forEach((lbl) => {
+ select_default(lbl).attr(
+ "transform",
+ "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")"
+ );
+ const memberBBox = lbl == null ? void 0 : lbl.getBBox();
+ verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding;
+ });
+ rect2.attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding);
+ updateNodeBounds(node, rect2);
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+var shapes = {
+ rhombus: question,
+ question,
+ rect,
+ labelRect,
+ rectWithTitle,
+ choice,
+ circle,
+ doublecircle,
+ stadium,
+ hexagon,
+ rect_left_inv_arrow,
+ lean_right,
+ lean_left,
+ trapezoid,
+ inv_trapezoid,
+ rect_right_inv_arrow,
+ cylinder,
+ start,
+ end,
+ note: note$1,
+ subroutine,
+ fork: forkJoin,
+ join: forkJoin,
+ class_box
+};
+var nodeElems = {};
+var insertNode = async (elem, node, dir) => {
+ let newEl;
+ let el;
+ if (node.link) {
+ let target;
+ if (getConfig$1().securityLevel === "sandbox") {
+ target = "_top";
+ } else if (node.linkTarget) {
+ target = node.linkTarget || "_blank";
+ }
+ newEl = elem.insert("svg:a").attr("xlink:href", node.link).attr("target", target);
+ el = await shapes[node.shape](newEl, node, dir);
+ } else {
+ el = await shapes[node.shape](elem, node, dir);
+ newEl = el;
+ }
+ if (node.tooltip) {
+ el.attr("title", node.tooltip);
+ }
+ if (node.class) {
+ el.attr("class", "node default " + node.class);
+ }
+ nodeElems[node.id] = newEl;
+ if (node.haveCallback) {
+ nodeElems[node.id].attr("class", nodeElems[node.id].attr("class") + " clickable");
+ }
+ return newEl;
+};
+var setNodeElem = (elem, node) => {
+ nodeElems[node.id] = elem;
+};
+var clear$1 = () => {
+ nodeElems = {};
+};
+var positionNode = (node) => {
+ const el = nodeElems[node.id];
+ log$1.trace(
+ "Transforming node",
+ node.diff,
+ node,
+ "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")"
+ );
+ const padding = 8;
+ const diff = node.diff || 0;
+ if (node.clusterNode) {
+ el.attr(
+ "transform",
+ "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding) + ")"
+ );
+ } else {
+ el.attr("transform", "translate(" + node.x + ", " + node.y + ")");
+ }
+ return diff;
+};
+var edgeLabels = {};
+var terminalLabels = {};
+var clear = () => {
+ edgeLabels = {};
+ terminalLabels = {};
+};
+var insertEdgeLabel = (elem, edge) => {
+ const useHtmlLabels = evaluate(getConfig$1().flowchart.htmlLabels);
+ const labelElement = edge.labelType === "markdown" ? createText(elem, edge.label, {
+ style: edge.labelStyle,
+ useHtmlLabels,
+ addSvgBackground: true
+ }) : createLabel$1(edge.label, edge.labelStyle);
+ log$1.info("abc82", edge, edge.labelType);
+ const edgeLabel = elem.insert("g").attr("class", "edgeLabel");
+ const label = edgeLabel.insert("g").attr("class", "label");
+ label.node().appendChild(labelElement);
+ let bbox = labelElement.getBBox();
+ if (useHtmlLabels) {
+ const div = labelElement.children[0];
+ const dv = select_default(labelElement);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")");
+ edgeLabels[edge.id] = edgeLabel;
+ edge.width = bbox.width;
+ edge.height = bbox.height;
+ let fo;
+ if (edge.startLabelLeft) {
+ const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle);
+ const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals");
+ const inner = startEdgeLabelLeft.insert("g").attr("class", "inner");
+ fo = inner.node().appendChild(startLabelElement);
+ const slBox = startLabelElement.getBBox();
+ inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
+ if (!terminalLabels[edge.id]) {
+ terminalLabels[edge.id] = {};
+ }
+ terminalLabels[edge.id].startLeft = startEdgeLabelLeft;
+ setTerminalWidth(fo, edge.startLabelLeft);
+ }
+ if (edge.startLabelRight) {
+ const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle);
+ const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals");
+ const inner = startEdgeLabelRight.insert("g").attr("class", "inner");
+ fo = startEdgeLabelRight.node().appendChild(startLabelElement);
+ inner.node().appendChild(startLabelElement);
+ const slBox = startLabelElement.getBBox();
+ inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
+ if (!terminalLabels[edge.id]) {
+ terminalLabels[edge.id] = {};
+ }
+ terminalLabels[edge.id].startRight = startEdgeLabelRight;
+ setTerminalWidth(fo, edge.startLabelRight);
+ }
+ if (edge.endLabelLeft) {
+ const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle);
+ const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals");
+ const inner = endEdgeLabelLeft.insert("g").attr("class", "inner");
+ fo = inner.node().appendChild(endLabelElement);
+ const slBox = endLabelElement.getBBox();
+ inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
+ endEdgeLabelLeft.node().appendChild(endLabelElement);
+ if (!terminalLabels[edge.id]) {
+ terminalLabels[edge.id] = {};
+ }
+ terminalLabels[edge.id].endLeft = endEdgeLabelLeft;
+ setTerminalWidth(fo, edge.endLabelLeft);
+ }
+ if (edge.endLabelRight) {
+ const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle);
+ const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals");
+ const inner = endEdgeLabelRight.insert("g").attr("class", "inner");
+ fo = inner.node().appendChild(endLabelElement);
+ const slBox = endLabelElement.getBBox();
+ inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
+ endEdgeLabelRight.node().appendChild(endLabelElement);
+ if (!terminalLabels[edge.id]) {
+ terminalLabels[edge.id] = {};
+ }
+ terminalLabels[edge.id].endRight = endEdgeLabelRight;
+ setTerminalWidth(fo, edge.endLabelRight);
+ }
+ return labelElement;
+};
+function setTerminalWidth(fo, value) {
+ if (getConfig$1().flowchart.htmlLabels && fo) {
+ fo.style.width = value.length * 9 + "px";
+ fo.style.height = "12px";
+ }
+}
+var positionEdgeLabel = (edge, paths) => {
+ log$1.info("Moving label abc78 ", edge.id, edge.label, edgeLabels[edge.id]);
+ let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;
+ if (edge.label) {
+ const el = edgeLabels[edge.id];
+ let x = edge.x;
+ let y = edge.y;
+ if (path) {
+ const pos = utils.calcLabelPosition(path);
+ log$1.info(
+ "Moving label " + edge.label + " from (",
+ x,
+ ",",
+ y,
+ ") to (",
+ pos.x,
+ ",",
+ pos.y,
+ ") abc78"
+ );
+ if (paths.updatedPath) {
+ x = pos.x;
+ y = pos.y;
+ }
+ }
+ el.attr("transform", "translate(" + x + ", " + y + ")");
+ }
+ if (edge.startLabelLeft) {
+ const el = terminalLabels[edge.id].startLeft;
+ let x = edge.x;
+ let y = edge.y;
+ if (path) {
+ const pos = utils.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path);
+ x = pos.x;
+ y = pos.y;
+ }
+ el.attr("transform", "translate(" + x + ", " + y + ")");
+ }
+ if (edge.startLabelRight) {
+ const el = terminalLabels[edge.id].startRight;
+ let x = edge.x;
+ let y = edge.y;
+ if (path) {
+ const pos = utils.calcTerminalLabelPosition(
+ edge.arrowTypeStart ? 10 : 0,
+ "start_right",
+ path
+ );
+ x = pos.x;
+ y = pos.y;
+ }
+ el.attr("transform", "translate(" + x + ", " + y + ")");
+ }
+ if (edge.endLabelLeft) {
+ const el = terminalLabels[edge.id].endLeft;
+ let x = edge.x;
+ let y = edge.y;
+ if (path) {
+ const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path);
+ x = pos.x;
+ y = pos.y;
+ }
+ el.attr("transform", "translate(" + x + ", " + y + ")");
+ }
+ if (edge.endLabelRight) {
+ const el = terminalLabels[edge.id].endRight;
+ let x = edge.x;
+ let y = edge.y;
+ if (path) {
+ const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path);
+ x = pos.x;
+ y = pos.y;
+ }
+ el.attr("transform", "translate(" + x + ", " + y + ")");
+ }
+};
+var outsideNode = (node, point2) => {
+ const x = node.x;
+ const y = node.y;
+ const dx = Math.abs(point2.x - x);
+ const dy = Math.abs(point2.y - y);
+ const w = node.width / 2;
+ const h = node.height / 2;
+ if (dx >= w || dy >= h) {
+ return true;
+ }
+ return false;
+};
+var intersection = (node, outsidePoint, insidePoint) => {
+ log$1.warn(`intersection calc abc89:
+ outsidePoint: ${JSON.stringify(outsidePoint)}
+ insidePoint : ${JSON.stringify(insidePoint)}
+ node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);
+ const x = node.x;
+ const y = node.y;
+ const dx = Math.abs(x - insidePoint.x);
+ const w = node.width / 2;
+ let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;
+ const h = node.height / 2;
+ const Q = Math.abs(outsidePoint.y - insidePoint.y);
+ const R = Math.abs(outsidePoint.x - insidePoint.x);
+ if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) {
+ let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;
+ r = R * q / Q;
+ const res = {
+ x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r,
+ y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q
+ };
+ if (r === 0) {
+ res.x = outsidePoint.x;
+ res.y = outsidePoint.y;
+ }
+ if (R === 0) {
+ res.x = outsidePoint.x;
+ }
+ if (Q === 0) {
+ res.y = outsidePoint.y;
+ }
+ log$1.warn(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res);
+ return res;
+ } else {
+ if (insidePoint.x < outsidePoint.x) {
+ r = outsidePoint.x - w - x;
+ } else {
+ r = x - w - outsidePoint.x;
+ }
+ let q = Q * r / R;
+ let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r;
+ let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q;
+ log$1.warn(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y });
+ if (r === 0) {
+ _x = outsidePoint.x;
+ _y = outsidePoint.y;
+ }
+ if (R === 0) {
+ _x = outsidePoint.x;
+ }
+ if (Q === 0) {
+ _y = outsidePoint.y;
+ }
+ return { x: _x, y: _y };
+ }
+};
+var cutPathAtIntersect = (_points, boundryNode) => {
+ log$1.warn("abc88 cutPathAtIntersect", _points, boundryNode);
+ let points = [];
+ let lastPointOutside = _points[0];
+ let isInside = false;
+ _points.forEach((point2) => {
+ log$1.info("abc88 checking point", point2, boundryNode);
+ if (!outsideNode(boundryNode, point2) && !isInside) {
+ const inter = intersection(boundryNode, lastPointOutside, point2);
+ log$1.warn("abc88 inside", point2, lastPointOutside, inter);
+ log$1.warn("abc88 intersection", inter);
+ let pointPresent = false;
+ points.forEach((p) => {
+ pointPresent = pointPresent || p.x === inter.x && p.y === inter.y;
+ });
+ if (!points.some((e) => e.x === inter.x && e.y === inter.y)) {
+ points.push(inter);
+ } else {
+ log$1.warn("abc88 no intersect", inter, points);
+ }
+ isInside = true;
+ } else {
+ log$1.warn("abc88 outside", point2, lastPointOutside);
+ lastPointOutside = point2;
+ if (!isInside) {
+ points.push(point2);
+ }
+ }
+ });
+ log$1.warn("abc88 returning points", points);
+ return points;
+};
+var insertEdge = function(elem, e, edge, clusterDb, diagramType, graph) {
+ let points = edge.points;
+ let pointsHasChanged = false;
+ const tail = graph.node(e.v);
+ var head = graph.node(e.w);
+ log$1.info("abc88 InsertEdge: ", edge);
+ if (head.intersect && tail.intersect) {
+ points = points.slice(1, edge.points.length - 1);
+ points.unshift(tail.intersect(points[0]));
+ log$1.info(
+ "Last point",
+ points[points.length - 1],
+ head,
+ head.intersect(points[points.length - 1])
+ );
+ points.push(head.intersect(points[points.length - 1]));
+ }
+ if (edge.toCluster) {
+ log$1.info("to cluster abc88", clusterDb[edge.toCluster]);
+ points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node);
+ pointsHasChanged = true;
+ }
+ if (edge.fromCluster) {
+ log$1.info("from cluster abc88", clusterDb[edge.fromCluster]);
+ points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse();
+ pointsHasChanged = true;
+ }
+ const lineData = points.filter((p) => !Number.isNaN(p.y));
+ let curve;
+ if (diagramType === "graph" || diagramType === "flowchart") {
+ curve = edge.curve || basis_default;
+ } else {
+ curve = basis_default;
+ }
+ const lineFunction = line_default().x(function(d) {
+ return d.x;
+ }).y(function(d) {
+ return d.y;
+ }).curve(curve);
+ let strokeClasses;
+ switch (edge.thickness) {
+ case "normal":
+ strokeClasses = "edge-thickness-normal";
+ break;
+ case "thick":
+ strokeClasses = "edge-thickness-thick";
+ break;
+ case "invisible":
+ strokeClasses = "edge-thickness-thick";
+ break;
+ default:
+ strokeClasses = "";
+ }
+ switch (edge.pattern) {
+ case "solid":
+ strokeClasses += " edge-pattern-solid";
+ break;
+ case "dotted":
+ strokeClasses += " edge-pattern-dotted";
+ break;
+ case "dashed":
+ strokeClasses += " edge-pattern-dashed";
+ break;
+ }
+ const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style);
+ let url = "";
+ if (getConfig$1().flowchart.arrowMarkerAbsolute || getConfig$1().state.arrowMarkerAbsolute) {
+ url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search;
+ url = url.replace(/\(/g, "\\(");
+ url = url.replace(/\)/g, "\\)");
+ }
+ log$1.info("arrowTypeStart", edge.arrowTypeStart);
+ log$1.info("arrowTypeEnd", edge.arrowTypeEnd);
+ switch (edge.arrowTypeStart) {
+ case "arrow_cross":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-crossStart)");
+ break;
+ case "arrow_point":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-pointStart)");
+ break;
+ case "arrow_barb":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-barbStart)");
+ break;
+ case "arrow_circle":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-circleStart)");
+ break;
+ case "aggregation":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-aggregationStart)");
+ break;
+ case "extension":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-extensionStart)");
+ break;
+ case "composition":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-compositionStart)");
+ break;
+ case "dependency":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-dependencyStart)");
+ break;
+ case "lollipop":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-lollipopStart)");
+ break;
+ }
+ switch (edge.arrowTypeEnd) {
+ case "arrow_cross":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-crossEnd)");
+ break;
+ case "arrow_point":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-pointEnd)");
+ break;
+ case "arrow_barb":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-barbEnd)");
+ break;
+ case "arrow_circle":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-circleEnd)");
+ break;
+ case "aggregation":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-aggregationEnd)");
+ break;
+ case "extension":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-extensionEnd)");
+ break;
+ case "composition":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-compositionEnd)");
+ break;
+ case "dependency":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-dependencyEnd)");
+ break;
+ case "lollipop":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-lollipopEnd)");
+ break;
+ }
+ let paths = {};
+ if (pointsHasChanged) {
+ paths.updatedPath = points;
+ }
+ paths.originalPath = edge.points;
+ return paths;
+};
+
+export {
+ insertMarkers$1,
+ createLabel$1,
+ labelHelper,
+ updateNodeBounds,
+ intersectRect$1,
+ insertNode,
+ setNodeElem,
+ clear$1,
+ positionNode,
+ clear,
+ insertEdgeLabel,
+ positionEdgeLabel,
+ insertEdge
+};
+//# sourceMappingURL=chunk-4JMSTK7S.js.map
diff --git a/.vuepress/.cache/deps/chunk-4JMSTK7S.js.map b/.vuepress/.cache/deps/chunk-4JMSTK7S.js.map
new file mode 100644
index 00000000..ba734c9b
--- /dev/null
+++ b/.vuepress/.cache/deps/chunk-4JMSTK7S.js.map
@@ -0,0 +1,7 @@
+{
+ "version": 3,
+ "sources": ["../../../node_modules/mermaid/dist/edges-c959041a.js"],
+ "sourcesContent": ["import { l as log, n as evaluate, c as getConfig, I as decodeEntities, d as sanitizeText, u as utils } from \"./mermaid-306576ad.js\";\nimport { select, curveBasis, line } from \"d3\";\nimport { c as createText } from \"./createText-b670c180.js\";\nimport { p as parseMember } from \"./svgDraw-b48a99d5.js\";\nconst insertMarkers = (elem, markerArray, type, id) => {\n markerArray.forEach((markerName) => {\n markers[markerName](elem, type, id);\n });\n};\nconst extension = (elem, type, id) => {\n log.trace(\"Making markers for \", id);\n elem.append(\"defs\").append(\"marker\").attr(\"id\", type + \"-extensionStart\").attr(\"class\", \"marker extension \" + type).attr(\"refX\", 0).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 1,7 L18,13 V 1 Z\");\n elem.append(\"defs\").append(\"marker\").attr(\"id\", type + \"-extensionEnd\").attr(\"class\", \"marker extension \" + type).attr(\"refX\", 19).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 1,1 V 13 L18,7 Z\");\n};\nconst composition = (elem, type) => {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", type + \"-compositionStart\").attr(\"class\", \"marker composition \" + type).attr(\"refX\", 0).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L1,7 L9,1 Z\");\n elem.append(\"defs\").append(\"marker\").attr(\"id\", type + \"-compositionEnd\").attr(\"class\", \"marker composition \" + type).attr(\"refX\", 19).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L1,7 L9,1 Z\");\n};\nconst aggregation = (elem, type) => {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", type + \"-aggregationStart\").attr(\"class\", \"marker aggregation \" + type).attr(\"refX\", 0).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L1,7 L9,1 Z\");\n elem.append(\"defs\").append(\"marker\").attr(\"id\", type + \"-aggregationEnd\").attr(\"class\", \"marker aggregation \" + type).attr(\"refX\", 19).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L1,7 L9,1 Z\");\n};\nconst dependency = (elem, type) => {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", type + \"-dependencyStart\").attr(\"class\", \"marker dependency \" + type).attr(\"refX\", 0).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 5,7 L9,13 L1,7 L9,1 Z\");\n elem.append(\"defs\").append(\"marker\").attr(\"id\", type + \"-dependencyEnd\").attr(\"class\", \"marker dependency \" + type).attr(\"refX\", 19).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L14,7 L9,1 Z\");\n};\nconst lollipop = (elem, type) => {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", type + \"-lollipopStart\").attr(\"class\", \"marker lollipop \" + type).attr(\"refX\", 0).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"circle\").attr(\"stroke\", \"black\").attr(\"fill\", \"white\").attr(\"cx\", 6).attr(\"cy\", 7).attr(\"r\", 6);\n};\nconst point = (elem, type) => {\n elem.append(\"marker\").attr(\"id\", type + \"-pointEnd\").attr(\"class\", \"marker \" + type).attr(\"viewBox\", \"0 0 10 10\").attr(\"refX\", 10).attr(\"refY\", 5).attr(\"markerUnits\", \"userSpaceOnUse\").attr(\"markerWidth\", 12).attr(\"markerHeight\", 12).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 0 0 L 10 5 L 0 10 z\").attr(\"class\", \"arrowMarkerPath\").style(\"stroke-width\", 1).style(\"stroke-dasharray\", \"1,0\");\n elem.append(\"marker\").attr(\"id\", type + \"-pointStart\").attr(\"class\", \"marker \" + type).attr(\"viewBox\", \"0 0 10 10\").attr(\"refX\", 0).attr(\"refY\", 5).attr(\"markerUnits\", \"userSpaceOnUse\").attr(\"markerWidth\", 12).attr(\"markerHeight\", 12).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 0 5 L 10 10 L 10 0 z\").attr(\"class\", \"arrowMarkerPath\").style(\"stroke-width\", 1).style(\"stroke-dasharray\", \"1,0\");\n};\nconst circle$1 = (elem, type) => {\n elem.append(\"marker\").attr(\"id\", type + \"-circleEnd\").attr(\"class\", \"marker \" + type).attr(\"viewBox\", \"0 0 10 10\").attr(\"refX\", 11).attr(\"refY\", 5).attr(\"markerUnits\", \"userSpaceOnUse\").attr(\"markerWidth\", 11).attr(\"markerHeight\", 11).attr(\"orient\", \"auto\").append(\"circle\").attr(\"cx\", \"5\").attr(\"cy\", \"5\").attr(\"r\", \"5\").attr(\"class\", \"arrowMarkerPath\").style(\"stroke-width\", 1).style(\"stroke-dasharray\", \"1,0\");\n elem.append(\"marker\").attr(\"id\", type + \"-circleStart\").attr(\"class\", \"marker \" + type).attr(\"viewBox\", \"0 0 10 10\").attr(\"refX\", -1).attr(\"refY\", 5).attr(\"markerUnits\", \"userSpaceOnUse\").attr(\"markerWidth\", 11).attr(\"markerHeight\", 11).attr(\"orient\", \"auto\").append(\"circle\").attr(\"cx\", \"5\").attr(\"cy\", \"5\").attr(\"r\", \"5\").attr(\"class\", \"arrowMarkerPath\").style(\"stroke-width\", 1).style(\"stroke-dasharray\", \"1,0\");\n};\nconst cross = (elem, type) => {\n elem.append(\"marker\").attr(\"id\", type + \"-crossEnd\").attr(\"class\", \"marker cross \" + type).attr(\"viewBox\", \"0 0 11 11\").attr(\"refX\", 12).attr(\"refY\", 5.2).attr(\"markerUnits\", \"userSpaceOnUse\").attr(\"markerWidth\", 11).attr(\"markerHeight\", 11).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 1,1 l 9,9 M 10,1 l -9,9\").attr(\"class\", \"arrowMarkerPath\").style(\"stroke-width\", 2).style(\"stroke-dasharray\", \"1,0\");\n elem.append(\"marker\").attr(\"id\", type + \"-crossStart\").attr(\"class\", \"marker cross \" + type).attr(\"viewBox\", \"0 0 11 11\").attr(\"refX\", -1).attr(\"refY\", 5.2).attr(\"markerUnits\", \"userSpaceOnUse\").attr(\"markerWidth\", 11).attr(\"markerHeight\", 11).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 1,1 l 9,9 M 10,1 l -9,9\").attr(\"class\", \"arrowMarkerPath\").style(\"stroke-width\", 2).style(\"stroke-dasharray\", \"1,0\");\n};\nconst barb = (elem, type) => {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", type + \"-barbEnd\").attr(\"refX\", 19).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 14).attr(\"markerUnits\", \"strokeWidth\").attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 19,7 L9,13 L14,7 L9,1 Z\");\n};\nconst markers = {\n extension,\n composition,\n aggregation,\n dependency,\n lollipop,\n point,\n circle: circle$1,\n cross,\n barb\n};\nconst insertMarkers$1 = insertMarkers;\nfunction applyStyle(dom, styleFn) {\n if (styleFn) {\n dom.attr(\"style\", styleFn);\n }\n}\nfunction addHtmlLabel(node) {\n const fo = select(document.createElementNS(\"http://www.w3.org/2000/svg\", \"foreignObject\"));\n const div = fo.append(\"xhtml:div\");\n const label = node.label;\n const labelClass = node.isNode ? \"nodeLabel\" : \"edgeLabel\";\n div.html(\n '\" + label + \"\"\n );\n applyStyle(div, node.labelStyle);\n div.style(\"display\", \"inline-block\");\n div.style(\"white-space\", \"nowrap\");\n div.attr(\"xmlns\", \"http://www.w3.org/1999/xhtml\");\n return fo.node();\n}\nconst createLabel = (_vertexText, style, isTitle, isNode) => {\n let vertexText = _vertexText || \"\";\n if (typeof vertexText === \"object\") {\n vertexText = vertexText[0];\n }\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n vertexText = vertexText.replace(/\\\\n|\\n/g, \"
\");\n log.info(\"vertexText\" + vertexText);\n const node = {\n isNode,\n label: decodeEntities(vertexText).replace(\n /fa[blrs]?:fa-[\\w-]+/g,\n (s) => ``\n ),\n labelStyle: style.replace(\"fill:\", \"color:\")\n };\n let vertexNode = addHtmlLabel(node);\n return vertexNode;\n } else {\n const svgLabel = document.createElementNS(\"http://www.w3.org/2000/svg\", \"text\");\n svgLabel.setAttribute(\"style\", style.replace(\"color:\", \"fill:\"));\n let rows = [];\n if (typeof vertexText === \"string\") {\n rows = vertexText.split(/\\\\n|\\n|
/gi);\n } else if (Array.isArray(vertexText)) {\n rows = vertexText;\n } else {\n rows = [];\n }\n for (const row of rows) {\n const tspan = document.createElementNS(\"http://www.w3.org/2000/svg\", \"tspan\");\n tspan.setAttributeNS(\"http://www.w3.org/XML/1998/namespace\", \"xml:space\", \"preserve\");\n tspan.setAttribute(\"dy\", \"1em\");\n tspan.setAttribute(\"x\", \"0\");\n if (isTitle) {\n tspan.setAttribute(\"class\", \"title-row\");\n } else {\n tspan.setAttribute(\"class\", \"row\");\n }\n tspan.textContent = row.trim();\n svgLabel.appendChild(tspan);\n }\n return svgLabel;\n }\n};\nconst createLabel$1 = createLabel;\nconst labelHelper = async (parent, node, _classes, isNode) => {\n let classes;\n const useHtmlLabels = node.useHtmlLabels || evaluate(getConfig().flowchart.htmlLabels);\n if (!_classes) {\n classes = \"node default\";\n } else {\n classes = _classes;\n }\n const shapeSvg = parent.insert(\"g\").attr(\"class\", classes).attr(\"id\", node.domId || node.id);\n const label = shapeSvg.insert(\"g\").attr(\"class\", \"label\").attr(\"style\", node.labelStyle);\n let labelText;\n if (node.labelText === void 0) {\n labelText = \"\";\n } else {\n labelText = typeof node.labelText === \"string\" ? node.labelText : node.labelText[0];\n }\n const textNode = label.node();\n let text;\n if (node.labelType === \"markdown\") {\n text = createText(label, sanitizeText(decodeEntities(labelText), getConfig()), {\n useHtmlLabels,\n width: node.width || getConfig().flowchart.wrappingWidth,\n classes: \"markdown-node-label\"\n });\n } else {\n text = textNode.appendChild(\n createLabel$1(\n sanitizeText(decodeEntities(labelText), getConfig()),\n node.labelStyle,\n false,\n isNode\n )\n );\n }\n let bbox = text.getBBox();\n const halfPadding = node.padding / 2;\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n const images = div.getElementsByTagName(\"img\");\n if (images) {\n const noImgText = labelText.replace(/
]*>/g, \"\").trim() === \"\";\n await Promise.all(\n [...images].map(\n (img) => new Promise((res) => {\n function setupImage() {\n img.style.display = \"flex\";\n img.style.flexDirection = \"column\";\n if (noImgText) {\n const bodyFontSize = getConfig().fontSize ? getConfig().fontSize : window.getComputedStyle(document.body).fontSize;\n const enlargingFactor = 5;\n img.style.width = parseInt(bodyFontSize, 10) * enlargingFactor + \"px\";\n } else {\n img.style.width = \"100%\";\n }\n res(img);\n }\n setTimeout(() => {\n if (img.complete) {\n setupImage();\n }\n });\n img.addEventListener(\"error\", setupImage);\n img.addEventListener(\"load\", setupImage);\n })\n )\n );\n }\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n if (useHtmlLabels) {\n label.attr(\"transform\", \"translate(\" + -bbox.width / 2 + \", \" + -bbox.height / 2 + \")\");\n } else {\n label.attr(\"transform\", \"translate(0, \" + -bbox.height / 2 + \")\");\n }\n if (node.centerLabel) {\n label.attr(\"transform\", \"translate(\" + -bbox.width / 2 + \", \" + -bbox.height / 2 + \")\");\n }\n label.insert(\"rect\", \":first-child\");\n return { shapeSvg, bbox, halfPadding, label };\n};\nconst updateNodeBounds = (node, element) => {\n const bbox = element.node().getBBox();\n node.width = bbox.width;\n node.height = bbox.height;\n};\nfunction insertPolygonShape(parent, w, h, points) {\n return parent.insert(\"polygon\", \":first-child\").attr(\n \"points\",\n points.map(function(d) {\n return d.x + \",\" + d.y;\n }).join(\" \")\n ).attr(\"class\", \"label-container\").attr(\"transform\", \"translate(\" + -w / 2 + \",\" + h / 2 + \")\");\n}\nfunction intersectNode(node, point2) {\n return node.intersect(point2);\n}\nfunction intersectEllipse(node, rx, ry, point2) {\n var cx = node.x;\n var cy = node.y;\n var px = cx - point2.x;\n var py = cy - point2.y;\n var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);\n var dx = Math.abs(rx * ry * px / det);\n if (point2.x < cx) {\n dx = -dx;\n }\n var dy = Math.abs(rx * ry * py / det);\n if (point2.y < cy) {\n dy = -dy;\n }\n return { x: cx + dx, y: cy + dy };\n}\nfunction intersectCircle(node, rx, point2) {\n return intersectEllipse(node, rx, rx, point2);\n}\nfunction intersectLine(p1, p2, q1, q2) {\n var a1, a2, b1, b2, c1, c2;\n var r1, r2, r3, r4;\n var denom, offset, num;\n var x, y;\n a1 = p2.y - p1.y;\n b1 = p1.x - p2.x;\n c1 = p2.x * p1.y - p1.x * p2.y;\n r3 = a1 * q1.x + b1 * q1.y + c1;\n r4 = a1 * q2.x + b1 * q2.y + c1;\n if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {\n return;\n }\n a2 = q2.y - q1.y;\n b2 = q1.x - q2.x;\n c2 = q2.x * q1.y - q1.x * q2.y;\n r1 = a2 * p1.x + b2 * p1.y + c2;\n r2 = a2 * p2.x + b2 * p2.y + c2;\n if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) {\n return;\n }\n denom = a1 * b2 - a2 * b1;\n if (denom === 0) {\n return;\n }\n offset = Math.abs(denom / 2);\n num = b1 * c2 - b2 * c1;\n x = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n num = a2 * c1 - a1 * c2;\n y = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n return { x, y };\n}\nfunction sameSign(r1, r2) {\n return r1 * r2 > 0;\n}\nfunction intersectPolygon(node, polyPoints, point2) {\n var x1 = node.x;\n var y1 = node.y;\n var intersections = [];\n var minX = Number.POSITIVE_INFINITY;\n var minY = Number.POSITIVE_INFINITY;\n if (typeof polyPoints.forEach === \"function\") {\n polyPoints.forEach(function(entry) {\n minX = Math.min(minX, entry.x);\n minY = Math.min(minY, entry.y);\n });\n } else {\n minX = Math.min(minX, polyPoints.x);\n minY = Math.min(minY, polyPoints.y);\n }\n var left = x1 - node.width / 2 - minX;\n var top = y1 - node.height / 2 - minY;\n for (var i = 0; i < polyPoints.length; i++) {\n var p1 = polyPoints[i];\n var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];\n var intersect2 = intersectLine(\n node,\n point2,\n { x: left + p1.x, y: top + p1.y },\n { x: left + p2.x, y: top + p2.y }\n );\n if (intersect2) {\n intersections.push(intersect2);\n }\n }\n if (!intersections.length) {\n return node;\n }\n if (intersections.length > 1) {\n intersections.sort(function(p, q) {\n var pdx = p.x - point2.x;\n var pdy = p.y - point2.y;\n var distp = Math.sqrt(pdx * pdx + pdy * pdy);\n var qdx = q.x - point2.x;\n var qdy = q.y - point2.y;\n var distq = Math.sqrt(qdx * qdx + qdy * qdy);\n return distp < distq ? -1 : distp === distq ? 0 : 1;\n });\n }\n return intersections[0];\n}\nconst intersectRect = (node, point2) => {\n var x = node.x;\n var y = node.y;\n var dx = point2.x - x;\n var dy = point2.y - y;\n var w = node.width / 2;\n var h = node.height / 2;\n var sx, sy;\n if (Math.abs(dy) * w > Math.abs(dx) * h) {\n if (dy < 0) {\n h = -h;\n }\n sx = dy === 0 ? 0 : h * dx / dy;\n sy = h;\n } else {\n if (dx < 0) {\n w = -w;\n }\n sx = w;\n sy = dx === 0 ? 0 : w * dy / dx;\n }\n return { x: x + sx, y: y + sy };\n};\nconst intersectRect$1 = intersectRect;\nconst intersect = {\n node: intersectNode,\n circle: intersectCircle,\n ellipse: intersectEllipse,\n polygon: intersectPolygon,\n rect: intersectRect$1\n};\nconst note = async (parent, node) => {\n const useHtmlLabels = node.useHtmlLabels || getConfig().flowchart.htmlLabels;\n if (!useHtmlLabels) {\n node.centerLabel = true;\n }\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n \"node \" + node.classes,\n true\n );\n log.info(\"Classes = \", node.classes);\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n rect2.attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"x\", -bbox.width / 2 - halfPadding).attr(\"y\", -bbox.height / 2 - halfPadding).attr(\"width\", bbox.width + node.padding).attr(\"height\", bbox.height + node.padding);\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect.rect(node, point2);\n };\n return shapeSvg;\n};\nconst note$1 = note;\nconst formatClass = (str) => {\n if (str) {\n return \" \" + str;\n }\n return \"\";\n};\nconst getClassesFromNode = (node, otherClasses) => {\n return `${otherClasses ? otherClasses : \"node default\"}${formatClass(node.classes)} ${formatClass(\n node.class\n )}`;\n};\nconst question = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const s = w + h;\n const points = [\n { x: s / 2, y: 0 },\n { x: s, y: -s / 2 },\n { x: s / 2, y: -s },\n { x: 0, y: -s / 2 }\n ];\n log.info(\"Question main (Circle)\");\n const questionElem = insertPolygonShape(shapeSvg, s, s, points);\n questionElem.attr(\"style\", node.style);\n updateNodeBounds(node, questionElem);\n node.intersect = function(point2) {\n log.warn(\"Intersect called\");\n return intersect.polygon(node, points, point2);\n };\n return shapeSvg;\n};\nconst choice = (parent, node) => {\n const shapeSvg = parent.insert(\"g\").attr(\"class\", \"node default\").attr(\"id\", node.domId || node.id);\n const s = 28;\n const points = [\n { x: 0, y: s / 2 },\n { x: s / 2, y: 0 },\n { x: 0, y: -s / 2 },\n { x: -s / 2, y: 0 }\n ];\n const choice2 = shapeSvg.insert(\"polygon\", \":first-child\").attr(\n \"points\",\n points.map(function(d) {\n return d.x + \",\" + d.y;\n }).join(\" \")\n );\n choice2.attr(\"class\", \"state-start\").attr(\"r\", 7).attr(\"width\", 28).attr(\"height\", 28);\n node.width = 28;\n node.height = 28;\n node.intersect = function(point2) {\n return intersect.circle(node, 14, point2);\n };\n return shapeSvg;\n};\nconst hexagon = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const f = 4;\n const h = bbox.height + node.padding;\n const m = h / f;\n const w = bbox.width + 2 * m + node.padding;\n const points = [\n { x: m, y: 0 },\n { x: w - m, y: 0 },\n { x: w, y: -h / 2 },\n { x: w - m, y: -h },\n { x: m, y: -h },\n { x: 0, y: -h / 2 }\n ];\n const hex = insertPolygonShape(shapeSvg, w, h, points);\n hex.attr(\"style\", node.style);\n updateNodeBounds(node, hex);\n node.intersect = function(point2) {\n return intersect.polygon(node, points, point2);\n };\n return shapeSvg;\n};\nconst rect_left_inv_arrow = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: -h / 2, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: -h / 2, y: -h },\n { x: 0, y: -h / 2 }\n ];\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n node.width = w + h;\n node.height = h;\n node.intersect = function(point2) {\n return intersect.polygon(node, points, point2);\n };\n return shapeSvg;\n};\nconst lean_right = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true);\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: -2 * h / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + 2 * h / 6, y: -h },\n { x: h / 6, y: -h }\n ];\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n return intersect.polygon(node, points, point2);\n };\n return shapeSvg;\n};\nconst lean_left = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: 2 * h / 6, y: 0 },\n { x: w + h / 6, y: 0 },\n { x: w - 2 * h / 6, y: -h },\n { x: -h / 6, y: -h }\n ];\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n return intersect.polygon(node, points, point2);\n };\n return shapeSvg;\n};\nconst trapezoid = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: -2 * h / 6, y: 0 },\n { x: w + 2 * h / 6, y: 0 },\n { x: w - h / 6, y: -h },\n { x: h / 6, y: -h }\n ];\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n return intersect.polygon(node, points, point2);\n };\n return shapeSvg;\n};\nconst inv_trapezoid = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: h / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + 2 * h / 6, y: -h },\n { x: -2 * h / 6, y: -h }\n ];\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n return intersect.polygon(node, points, point2);\n };\n return shapeSvg;\n};\nconst rect_right_inv_arrow = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: 0, y: 0 },\n { x: w + h / 2, y: 0 },\n { x: w, y: -h / 2 },\n { x: w + h / 2, y: -h },\n { x: 0, y: -h }\n ];\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n return intersect.polygon(node, points, point2);\n };\n return shapeSvg;\n};\nconst cylinder = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const rx = w / 2;\n const ry = rx / (2.5 + w / 50);\n const h = bbox.height + ry + node.padding;\n const shape = \"M 0,\" + ry + \" a \" + rx + \",\" + ry + \" 0,0,0 \" + w + \" 0 a \" + rx + \",\" + ry + \" 0,0,0 \" + -w + \" 0 l 0,\" + h + \" a \" + rx + \",\" + ry + \" 0,0,0 \" + w + \" 0 l 0,\" + -h;\n const el = shapeSvg.attr(\"label-offset-y\", ry).insert(\"path\", \":first-child\").attr(\"style\", node.style).attr(\"d\", shape).attr(\"transform\", \"translate(\" + -w / 2 + \",\" + -(h / 2 + ry) + \")\");\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n const pos = intersect.rect(node, point2);\n const x = pos.x - node.x;\n if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) {\n let y = ry * ry * (1 - x * x / (rx * rx));\n if (y != 0) {\n y = Math.sqrt(y);\n }\n y = ry - y;\n if (point2.y - node.y > 0) {\n y = -y;\n }\n pos.y += y;\n }\n return pos;\n };\n return shapeSvg;\n};\nconst rect = async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n \"node \" + node.classes + \" \" + node.class,\n true\n );\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const totalWidth = bbox.width + node.padding;\n const totalHeight = bbox.height + node.padding;\n rect2.attr(\"class\", \"basic label-container\").attr(\"style\", node.style).attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"x\", -bbox.width / 2 - halfPadding).attr(\"y\", -bbox.height / 2 - halfPadding).attr(\"width\", totalWidth).attr(\"height\", totalHeight);\n if (node.props) {\n const propKeys = new Set(Object.keys(node.props));\n if (node.props.borders) {\n applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);\n propKeys.delete(\"borders\");\n }\n propKeys.forEach((propKey) => {\n log.warn(`Unknown node property ${propKey}`);\n });\n }\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect.rect(node, point2);\n };\n return shapeSvg;\n};\nconst labelRect = async (parent, node) => {\n const { shapeSvg } = await labelHelper(parent, node, \"label\", true);\n log.trace(\"Classes = \", node.class);\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const totalWidth = 0;\n const totalHeight = 0;\n rect2.attr(\"width\", totalWidth).attr(\"height\", totalHeight);\n shapeSvg.attr(\"class\", \"label edgeLabel\");\n if (node.props) {\n const propKeys = new Set(Object.keys(node.props));\n if (node.props.borders) {\n applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);\n propKeys.delete(\"borders\");\n }\n propKeys.forEach((propKey) => {\n log.warn(`Unknown node property ${propKey}`);\n });\n }\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect.rect(node, point2);\n };\n return shapeSvg;\n};\nfunction applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) {\n const strokeDashArray = [];\n const addBorder = (length) => {\n strokeDashArray.push(length, 0);\n };\n const skipBorder = (length) => {\n strokeDashArray.push(0, length);\n };\n if (borders.includes(\"t\")) {\n log.debug(\"add top border\");\n addBorder(totalWidth);\n } else {\n skipBorder(totalWidth);\n }\n if (borders.includes(\"r\")) {\n log.debug(\"add right border\");\n addBorder(totalHeight);\n } else {\n skipBorder(totalHeight);\n }\n if (borders.includes(\"b\")) {\n log.debug(\"add bottom border\");\n addBorder(totalWidth);\n } else {\n skipBorder(totalWidth);\n }\n if (borders.includes(\"l\")) {\n log.debug(\"add left border\");\n addBorder(totalHeight);\n } else {\n skipBorder(totalHeight);\n }\n rect2.attr(\"stroke-dasharray\", strokeDashArray.join(\" \"));\n}\nconst rectWithTitle = (parent, node) => {\n let classes;\n if (!node.classes) {\n classes = \"node default\";\n } else {\n classes = \"node \" + node.classes;\n }\n const shapeSvg = parent.insert(\"g\").attr(\"class\", classes).attr(\"id\", node.domId || node.id);\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const innerLine = shapeSvg.insert(\"line\");\n const label = shapeSvg.insert(\"g\").attr(\"class\", \"label\");\n const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText;\n let title = \"\";\n if (typeof text2 === \"object\") {\n title = text2[0];\n } else {\n title = text2;\n }\n log.info(\"Label text abc79\", title, text2, typeof text2 === \"object\");\n const text = label.node().appendChild(createLabel$1(title, node.labelStyle, true, true));\n let bbox = { width: 0, height: 0 };\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n log.info(\"Text 2\", text2);\n const textRows = text2.slice(1, text2.length);\n let titleBox = text.getBBox();\n const descr = label.node().appendChild(\n createLabel$1(textRows.join ? textRows.join(\"
\") : textRows, node.labelStyle, true, true)\n );\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = descr.children[0];\n const dv = select(descr);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n const halfPadding = node.padding / 2;\n select(descr).attr(\n \"transform\",\n \"translate( \" + // (titleBox.width - bbox.width) / 2 +\n (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + \", \" + (titleBox.height + halfPadding + 5) + \")\"\n );\n select(text).attr(\n \"transform\",\n \"translate( \" + // (titleBox.width - bbox.width) / 2 +\n (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + \", 0)\"\n );\n bbox = label.node().getBBox();\n label.attr(\n \"transform\",\n \"translate(\" + -bbox.width / 2 + \", \" + (-bbox.height / 2 - halfPadding + 3) + \")\"\n );\n rect2.attr(\"class\", \"outer title-state\").attr(\"x\", -bbox.width / 2 - halfPadding).attr(\"y\", -bbox.height / 2 - halfPadding).attr(\"width\", bbox.width + node.padding).attr(\"height\", bbox.height + node.padding);\n innerLine.attr(\"class\", \"divider\").attr(\"x1\", -bbox.width / 2 - halfPadding).attr(\"x2\", bbox.width / 2 + halfPadding).attr(\"y1\", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr(\"y2\", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect.rect(node, point2);\n };\n return shapeSvg;\n};\nconst stadium = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const h = bbox.height + node.padding;\n const w = bbox.width + h / 4 + node.padding;\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\").attr(\"style\", node.style).attr(\"rx\", h / 2).attr(\"ry\", h / 2).attr(\"x\", -w / 2).attr(\"y\", -h / 2).attr(\"width\", w).attr(\"height\", h);\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect.rect(node, point2);\n };\n return shapeSvg;\n};\nconst circle = async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const circle2 = shapeSvg.insert(\"circle\", \":first-child\");\n circle2.attr(\"style\", node.style).attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"r\", bbox.width / 2 + halfPadding).attr(\"width\", bbox.width + node.padding).attr(\"height\", bbox.height + node.padding);\n log.info(\"Circle main\");\n updateNodeBounds(node, circle2);\n node.intersect = function(point2) {\n log.info(\"Circle intersect\", node, bbox.width / 2 + halfPadding, point2);\n return intersect.circle(node, bbox.width / 2 + halfPadding, point2);\n };\n return shapeSvg;\n};\nconst doublecircle = async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const gap = 5;\n const circleGroup = shapeSvg.insert(\"g\", \":first-child\");\n const outerCircle = circleGroup.insert(\"circle\");\n const innerCircle = circleGroup.insert(\"circle\");\n circleGroup.attr(\"class\", node.class);\n outerCircle.attr(\"style\", node.style).attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"r\", bbox.width / 2 + halfPadding + gap).attr(\"width\", bbox.width + node.padding + gap * 2).attr(\"height\", bbox.height + node.padding + gap * 2);\n innerCircle.attr(\"style\", node.style).attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"r\", bbox.width / 2 + halfPadding).attr(\"width\", bbox.width + node.padding).attr(\"height\", bbox.height + node.padding);\n log.info(\"DoubleCircle main\");\n updateNodeBounds(node, outerCircle);\n node.intersect = function(point2) {\n log.info(\"DoubleCircle intersect\", node, bbox.width / 2 + halfPadding + gap, point2);\n return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point2);\n };\n return shapeSvg;\n};\nconst subroutine = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: 0, y: -h },\n { x: 0, y: 0 },\n { x: -8, y: 0 },\n { x: w + 8, y: 0 },\n { x: w + 8, y: -h },\n { x: -8, y: -h },\n { x: -8, y: 0 }\n ];\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n return intersect.polygon(node, points, point2);\n };\n return shapeSvg;\n};\nconst start = (parent, node) => {\n const shapeSvg = parent.insert(\"g\").attr(\"class\", \"node default\").attr(\"id\", node.domId || node.id);\n const circle2 = shapeSvg.insert(\"circle\", \":first-child\");\n circle2.attr(\"class\", \"state-start\").attr(\"r\", 7).attr(\"width\", 14).attr(\"height\", 14);\n updateNodeBounds(node, circle2);\n node.intersect = function(point2) {\n return intersect.circle(node, 7, point2);\n };\n return shapeSvg;\n};\nconst forkJoin = (parent, node, dir) => {\n const shapeSvg = parent.insert(\"g\").attr(\"class\", \"node default\").attr(\"id\", node.domId || node.id);\n let width = 70;\n let height = 10;\n if (dir === \"LR\") {\n width = 10;\n height = 70;\n }\n const shape = shapeSvg.append(\"rect\").attr(\"x\", -1 * width / 2).attr(\"y\", -1 * height / 2).attr(\"width\", width).attr(\"height\", height).attr(\"class\", \"fork-join\");\n updateNodeBounds(node, shape);\n node.height = node.height + node.padding / 2;\n node.width = node.width + node.padding / 2;\n node.intersect = function(point2) {\n return intersect.rect(node, point2);\n };\n return shapeSvg;\n};\nconst end = (parent, node) => {\n const shapeSvg = parent.insert(\"g\").attr(\"class\", \"node default\").attr(\"id\", node.domId || node.id);\n const innerCircle = shapeSvg.insert(\"circle\", \":first-child\");\n const circle2 = shapeSvg.insert(\"circle\", \":first-child\");\n circle2.attr(\"class\", \"state-start\").attr(\"r\", 7).attr(\"width\", 14).attr(\"height\", 14);\n innerCircle.attr(\"class\", \"state-end\").attr(\"r\", 5).attr(\"width\", 10).attr(\"height\", 10);\n updateNodeBounds(node, circle2);\n node.intersect = function(point2) {\n return intersect.circle(node, 7, point2);\n };\n return shapeSvg;\n};\nconst class_box = (parent, node) => {\n const halfPadding = node.padding / 2;\n const rowPadding = 4;\n const lineHeight = 8;\n let classes;\n if (!node.classes) {\n classes = \"node default\";\n } else {\n classes = \"node \" + node.classes;\n }\n const shapeSvg = parent.insert(\"g\").attr(\"class\", classes).attr(\"id\", node.domId || node.id);\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const topLine = shapeSvg.insert(\"line\");\n const bottomLine = shapeSvg.insert(\"line\");\n let maxWidth = 0;\n let maxHeight = rowPadding;\n const labelContainer = shapeSvg.insert(\"g\").attr(\"class\", \"label\");\n let verticalPos = 0;\n const hasInterface = node.classData.annotations && node.classData.annotations[0];\n const interfaceLabelText = node.classData.annotations[0] ? \"«\" + node.classData.annotations[0] + \"»\" : \"\";\n const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node.labelStyle, true, true));\n let interfaceBBox = interfaceLabel.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = interfaceLabel.children[0];\n const dv = select(interfaceLabel);\n interfaceBBox = div.getBoundingClientRect();\n dv.attr(\"width\", interfaceBBox.width);\n dv.attr(\"height\", interfaceBBox.height);\n }\n if (node.classData.annotations[0]) {\n maxHeight += interfaceBBox.height + rowPadding;\n maxWidth += interfaceBBox.width;\n }\n let classTitleString = node.classData.label;\n if (node.classData.type !== void 0 && node.classData.type !== \"\") {\n if (getConfig().flowchart.htmlLabels) {\n classTitleString += \"<\" + node.classData.type + \">\";\n } else {\n classTitleString += \"<\" + node.classData.type + \">\";\n }\n }\n const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node.labelStyle, true, true));\n select(classTitleLabel).attr(\"class\", \"classTitle\");\n let classTitleBBox = classTitleLabel.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = classTitleLabel.children[0];\n const dv = select(classTitleLabel);\n classTitleBBox = div.getBoundingClientRect();\n dv.attr(\"width\", classTitleBBox.width);\n dv.attr(\"height\", classTitleBBox.height);\n }\n maxHeight += classTitleBBox.height + rowPadding;\n if (classTitleBBox.width > maxWidth) {\n maxWidth = classTitleBBox.width;\n }\n const classAttributes = [];\n node.classData.members.forEach((str) => {\n const parsedInfo = parseMember(str);\n let parsedText = parsedInfo.displayText;\n if (getConfig().flowchart.htmlLabels) {\n parsedText = parsedText.replace(//g, \">\");\n }\n const lbl = labelContainer.node().appendChild(\n createLabel$1(\n parsedText,\n parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,\n true,\n true\n )\n );\n let bbox = lbl.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = lbl.children[0];\n const dv = select(lbl);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n if (bbox.width > maxWidth) {\n maxWidth = bbox.width;\n }\n maxHeight += bbox.height + rowPadding;\n classAttributes.push(lbl);\n });\n maxHeight += lineHeight;\n const classMethods = [];\n node.classData.methods.forEach((str) => {\n const parsedInfo = parseMember(str);\n let displayText = parsedInfo.displayText;\n if (getConfig().flowchart.htmlLabels) {\n displayText = displayText.replace(//g, \">\");\n }\n const lbl = labelContainer.node().appendChild(\n createLabel$1(\n displayText,\n parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,\n true,\n true\n )\n );\n let bbox = lbl.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = lbl.children[0];\n const dv = select(lbl);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n if (bbox.width > maxWidth) {\n maxWidth = bbox.width;\n }\n maxHeight += bbox.height + rowPadding;\n classMethods.push(lbl);\n });\n maxHeight += lineHeight;\n if (hasInterface) {\n let diffX2 = (maxWidth - interfaceBBox.width) / 2;\n select(interfaceLabel).attr(\n \"transform\",\n \"translate( \" + (-1 * maxWidth / 2 + diffX2) + \", \" + -1 * maxHeight / 2 + \")\"\n );\n verticalPos = interfaceBBox.height + rowPadding;\n }\n let diffX = (maxWidth - classTitleBBox.width) / 2;\n select(classTitleLabel).attr(\n \"transform\",\n \"translate( \" + (-1 * maxWidth / 2 + diffX) + \", \" + (-1 * maxHeight / 2 + verticalPos) + \")\"\n );\n verticalPos += classTitleBBox.height + rowPadding;\n topLine.attr(\"class\", \"divider\").attr(\"x1\", -maxWidth / 2 - halfPadding).attr(\"x2\", maxWidth / 2 + halfPadding).attr(\"y1\", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr(\"y2\", -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n verticalPos += lineHeight;\n classAttributes.forEach((lbl) => {\n select(lbl).attr(\n \"transform\",\n \"translate( \" + -maxWidth / 2 + \", \" + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + \")\"\n );\n const memberBBox = lbl == null ? void 0 : lbl.getBBox();\n verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding;\n });\n verticalPos += lineHeight;\n bottomLine.attr(\"class\", \"divider\").attr(\"x1\", -maxWidth / 2 - halfPadding).attr(\"x2\", maxWidth / 2 + halfPadding).attr(\"y1\", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr(\"y2\", -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n verticalPos += lineHeight;\n classMethods.forEach((lbl) => {\n select(lbl).attr(\n \"transform\",\n \"translate( \" + -maxWidth / 2 + \", \" + (-1 * maxHeight / 2 + verticalPos) + \")\"\n );\n const memberBBox = lbl == null ? void 0 : lbl.getBBox();\n verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding;\n });\n rect2.attr(\"class\", \"outer title-state\").attr(\"x\", -maxWidth / 2 - halfPadding).attr(\"y\", -(maxHeight / 2) - halfPadding).attr(\"width\", maxWidth + node.padding).attr(\"height\", maxHeight + node.padding);\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect.rect(node, point2);\n };\n return shapeSvg;\n};\nconst shapes = {\n rhombus: question,\n question,\n rect,\n labelRect,\n rectWithTitle,\n choice,\n circle,\n doublecircle,\n stadium,\n hexagon,\n rect_left_inv_arrow,\n lean_right,\n lean_left,\n trapezoid,\n inv_trapezoid,\n rect_right_inv_arrow,\n cylinder,\n start,\n end,\n note: note$1,\n subroutine,\n fork: forkJoin,\n join: forkJoin,\n class_box\n};\nlet nodeElems = {};\nconst insertNode = async (elem, node, dir) => {\n let newEl;\n let el;\n if (node.link) {\n let target;\n if (getConfig().securityLevel === \"sandbox\") {\n target = \"_top\";\n } else if (node.linkTarget) {\n target = node.linkTarget || \"_blank\";\n }\n newEl = elem.insert(\"svg:a\").attr(\"xlink:href\", node.link).attr(\"target\", target);\n el = await shapes[node.shape](newEl, node, dir);\n } else {\n el = await shapes[node.shape](elem, node, dir);\n newEl = el;\n }\n if (node.tooltip) {\n el.attr(\"title\", node.tooltip);\n }\n if (node.class) {\n el.attr(\"class\", \"node default \" + node.class);\n }\n nodeElems[node.id] = newEl;\n if (node.haveCallback) {\n nodeElems[node.id].attr(\"class\", nodeElems[node.id].attr(\"class\") + \" clickable\");\n }\n return newEl;\n};\nconst setNodeElem = (elem, node) => {\n nodeElems[node.id] = elem;\n};\nconst clear$1 = () => {\n nodeElems = {};\n};\nconst positionNode = (node) => {\n const el = nodeElems[node.id];\n log.trace(\n \"Transforming node\",\n node.diff,\n node,\n \"translate(\" + (node.x - node.width / 2 - 5) + \", \" + node.width / 2 + \")\"\n );\n const padding = 8;\n const diff = node.diff || 0;\n if (node.clusterNode) {\n el.attr(\n \"transform\",\n \"translate(\" + (node.x + diff - node.width / 2) + \", \" + (node.y - node.height / 2 - padding) + \")\"\n );\n } else {\n el.attr(\"transform\", \"translate(\" + node.x + \", \" + node.y + \")\");\n }\n return diff;\n};\nlet edgeLabels = {};\nlet terminalLabels = {};\nconst clear = () => {\n edgeLabels = {};\n terminalLabels = {};\n};\nconst insertEdgeLabel = (elem, edge) => {\n const useHtmlLabels = evaluate(getConfig().flowchart.htmlLabels);\n const labelElement = edge.labelType === \"markdown\" ? createText(elem, edge.label, {\n style: edge.labelStyle,\n useHtmlLabels,\n addSvgBackground: true\n }) : createLabel$1(edge.label, edge.labelStyle);\n log.info(\"abc82\", edge, edge.labelType);\n const edgeLabel = elem.insert(\"g\").attr(\"class\", \"edgeLabel\");\n const label = edgeLabel.insert(\"g\").attr(\"class\", \"label\");\n label.node().appendChild(labelElement);\n let bbox = labelElement.getBBox();\n if (useHtmlLabels) {\n const div = labelElement.children[0];\n const dv = select(labelElement);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n label.attr(\"transform\", \"translate(\" + -bbox.width / 2 + \", \" + -bbox.height / 2 + \")\");\n edgeLabels[edge.id] = edgeLabel;\n edge.width = bbox.width;\n edge.height = bbox.height;\n let fo;\n if (edge.startLabelLeft) {\n const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle);\n const startEdgeLabelLeft = elem.insert(\"g\").attr(\"class\", \"edgeTerminals\");\n const inner = startEdgeLabelLeft.insert(\"g\").attr(\"class\", \"inner\");\n fo = inner.node().appendChild(startLabelElement);\n const slBox = startLabelElement.getBBox();\n inner.attr(\"transform\", \"translate(\" + -slBox.width / 2 + \", \" + -slBox.height / 2 + \")\");\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].startLeft = startEdgeLabelLeft;\n setTerminalWidth(fo, edge.startLabelLeft);\n }\n if (edge.startLabelRight) {\n const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle);\n const startEdgeLabelRight = elem.insert(\"g\").attr(\"class\", \"edgeTerminals\");\n const inner = startEdgeLabelRight.insert(\"g\").attr(\"class\", \"inner\");\n fo = startEdgeLabelRight.node().appendChild(startLabelElement);\n inner.node().appendChild(startLabelElement);\n const slBox = startLabelElement.getBBox();\n inner.attr(\"transform\", \"translate(\" + -slBox.width / 2 + \", \" + -slBox.height / 2 + \")\");\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].startRight = startEdgeLabelRight;\n setTerminalWidth(fo, edge.startLabelRight);\n }\n if (edge.endLabelLeft) {\n const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle);\n const endEdgeLabelLeft = elem.insert(\"g\").attr(\"class\", \"edgeTerminals\");\n const inner = endEdgeLabelLeft.insert(\"g\").attr(\"class\", \"inner\");\n fo = inner.node().appendChild(endLabelElement);\n const slBox = endLabelElement.getBBox();\n inner.attr(\"transform\", \"translate(\" + -slBox.width / 2 + \", \" + -slBox.height / 2 + \")\");\n endEdgeLabelLeft.node().appendChild(endLabelElement);\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].endLeft = endEdgeLabelLeft;\n setTerminalWidth(fo, edge.endLabelLeft);\n }\n if (edge.endLabelRight) {\n const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle);\n const endEdgeLabelRight = elem.insert(\"g\").attr(\"class\", \"edgeTerminals\");\n const inner = endEdgeLabelRight.insert(\"g\").attr(\"class\", \"inner\");\n fo = inner.node().appendChild(endLabelElement);\n const slBox = endLabelElement.getBBox();\n inner.attr(\"transform\", \"translate(\" + -slBox.width / 2 + \", \" + -slBox.height / 2 + \")\");\n endEdgeLabelRight.node().appendChild(endLabelElement);\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].endRight = endEdgeLabelRight;\n setTerminalWidth(fo, edge.endLabelRight);\n }\n return labelElement;\n};\nfunction setTerminalWidth(fo, value) {\n if (getConfig().flowchart.htmlLabels && fo) {\n fo.style.width = value.length * 9 + \"px\";\n fo.style.height = \"12px\";\n }\n}\nconst positionEdgeLabel = (edge, paths) => {\n log.info(\"Moving label abc78 \", edge.id, edge.label, edgeLabels[edge.id]);\n let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n if (edge.label) {\n const el = edgeLabels[edge.id];\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcLabelPosition(path);\n log.info(\n \"Moving label \" + edge.label + \" from (\",\n x,\n \",\",\n y,\n \") to (\",\n pos.x,\n \",\",\n pos.y,\n \") abc78\"\n );\n if (paths.updatedPath) {\n x = pos.x;\n y = pos.y;\n }\n }\n el.attr(\"transform\", \"translate(\" + x + \", \" + y + \")\");\n }\n if (edge.startLabelLeft) {\n const el = terminalLabels[edge.id].startLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, \"start_left\", path);\n x = pos.x;\n y = pos.y;\n }\n el.attr(\"transform\", \"translate(\" + x + \", \" + y + \")\");\n }\n if (edge.startLabelRight) {\n const el = terminalLabels[edge.id].startRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcTerminalLabelPosition(\n edge.arrowTypeStart ? 10 : 0,\n \"start_right\",\n path\n );\n x = pos.x;\n y = pos.y;\n }\n el.attr(\"transform\", \"translate(\" + x + \", \" + y + \")\");\n }\n if (edge.endLabelLeft) {\n const el = terminalLabels[edge.id].endLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, \"end_left\", path);\n x = pos.x;\n y = pos.y;\n }\n el.attr(\"transform\", \"translate(\" + x + \", \" + y + \")\");\n }\n if (edge.endLabelRight) {\n const el = terminalLabels[edge.id].endRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, \"end_right\", path);\n x = pos.x;\n y = pos.y;\n }\n el.attr(\"transform\", \"translate(\" + x + \", \" + y + \")\");\n }\n};\nconst outsideNode = (node, point2) => {\n const x = node.x;\n const y = node.y;\n const dx = Math.abs(point2.x - x);\n const dy = Math.abs(point2.y - y);\n const w = node.width / 2;\n const h = node.height / 2;\n if (dx >= w || dy >= h) {\n return true;\n }\n return false;\n};\nconst intersection = (node, outsidePoint, insidePoint) => {\n log.warn(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(outsidePoint)}\n insidePoint : ${JSON.stringify(insidePoint)}\n node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);\n const x = node.x;\n const y = node.y;\n const dx = Math.abs(x - insidePoint.x);\n const w = node.width / 2;\n let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;\n const h = node.height / 2;\n const Q = Math.abs(outsidePoint.y - insidePoint.y);\n const R = Math.abs(outsidePoint.x - insidePoint.x);\n if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) {\n let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;\n r = R * q / Q;\n const res = {\n x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r,\n y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q\n };\n if (r === 0) {\n res.x = outsidePoint.x;\n res.y = outsidePoint.y;\n }\n if (R === 0) {\n res.x = outsidePoint.x;\n }\n if (Q === 0) {\n res.y = outsidePoint.y;\n }\n log.warn(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res);\n return res;\n } else {\n if (insidePoint.x < outsidePoint.x) {\n r = outsidePoint.x - w - x;\n } else {\n r = x - w - outsidePoint.x;\n }\n let q = Q * r / R;\n let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r;\n let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q;\n log.warn(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y });\n if (r === 0) {\n _x = outsidePoint.x;\n _y = outsidePoint.y;\n }\n if (R === 0) {\n _x = outsidePoint.x;\n }\n if (Q === 0) {\n _y = outsidePoint.y;\n }\n return { x: _x, y: _y };\n }\n};\nconst cutPathAtIntersect = (_points, boundryNode) => {\n log.warn(\"abc88 cutPathAtIntersect\", _points, boundryNode);\n let points = [];\n let lastPointOutside = _points[0];\n let isInside = false;\n _points.forEach((point2) => {\n log.info(\"abc88 checking point\", point2, boundryNode);\n if (!outsideNode(boundryNode, point2) && !isInside) {\n const inter = intersection(boundryNode, lastPointOutside, point2);\n log.warn(\"abc88 inside\", point2, lastPointOutside, inter);\n log.warn(\"abc88 intersection\", inter);\n let pointPresent = false;\n points.forEach((p) => {\n pointPresent = pointPresent || p.x === inter.x && p.y === inter.y;\n });\n if (!points.some((e) => e.x === inter.x && e.y === inter.y)) {\n points.push(inter);\n } else {\n log.warn(\"abc88 no intersect\", inter, points);\n }\n isInside = true;\n } else {\n log.warn(\"abc88 outside\", point2, lastPointOutside);\n lastPointOutside = point2;\n if (!isInside) {\n points.push(point2);\n }\n }\n });\n log.warn(\"abc88 returning points\", points);\n return points;\n};\nconst insertEdge = function(elem, e, edge, clusterDb, diagramType, graph) {\n let points = edge.points;\n let pointsHasChanged = false;\n const tail = graph.node(e.v);\n var head = graph.node(e.w);\n log.info(\"abc88 InsertEdge: \", edge);\n if (head.intersect && tail.intersect) {\n points = points.slice(1, edge.points.length - 1);\n points.unshift(tail.intersect(points[0]));\n log.info(\n \"Last point\",\n points[points.length - 1],\n head,\n head.intersect(points[points.length - 1])\n );\n points.push(head.intersect(points[points.length - 1]));\n }\n if (edge.toCluster) {\n log.info(\"to cluster abc88\", clusterDb[edge.toCluster]);\n points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node);\n pointsHasChanged = true;\n }\n if (edge.fromCluster) {\n log.info(\"from cluster abc88\", clusterDb[edge.fromCluster]);\n points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse();\n pointsHasChanged = true;\n }\n const lineData = points.filter((p) => !Number.isNaN(p.y));\n let curve;\n if (diagramType === \"graph\" || diagramType === \"flowchart\") {\n curve = edge.curve || curveBasis;\n } else {\n curve = curveBasis;\n }\n const lineFunction = line().x(function(d) {\n return d.x;\n }).y(function(d) {\n return d.y;\n }).curve(curve);\n let strokeClasses;\n switch (edge.thickness) {\n case \"normal\":\n strokeClasses = \"edge-thickness-normal\";\n break;\n case \"thick\":\n strokeClasses = \"edge-thickness-thick\";\n break;\n case \"invisible\":\n strokeClasses = \"edge-thickness-thick\";\n break;\n default:\n strokeClasses = \"\";\n }\n switch (edge.pattern) {\n case \"solid\":\n strokeClasses += \" edge-pattern-solid\";\n break;\n case \"dotted\":\n strokeClasses += \" edge-pattern-dotted\";\n break;\n case \"dashed\":\n strokeClasses += \" edge-pattern-dashed\";\n break;\n }\n const svgPath = elem.append(\"path\").attr(\"d\", lineFunction(lineData)).attr(\"id\", edge.id).attr(\"class\", \" \" + strokeClasses + (edge.classes ? \" \" + edge.classes : \"\")).attr(\"style\", edge.style);\n let url = \"\";\n if (getConfig().flowchart.arrowMarkerAbsolute || getConfig().state.arrowMarkerAbsolute) {\n url = window.location.protocol + \"//\" + window.location.host + window.location.pathname + window.location.search;\n url = url.replace(/\\(/g, \"\\\\(\");\n url = url.replace(/\\)/g, \"\\\\)\");\n }\n log.info(\"arrowTypeStart\", edge.arrowTypeStart);\n log.info(\"arrowTypeEnd\", edge.arrowTypeEnd);\n switch (edge.arrowTypeStart) {\n case \"arrow_cross\":\n svgPath.attr(\"marker-start\", \"url(\" + url + \"#\" + diagramType + \"-crossStart)\");\n break;\n case \"arrow_point\":\n svgPath.attr(\"marker-start\", \"url(\" + url + \"#\" + diagramType + \"-pointStart)\");\n break;\n case \"arrow_barb\":\n svgPath.attr(\"marker-start\", \"url(\" + url + \"#\" + diagramType + \"-barbStart)\");\n break;\n case \"arrow_circle\":\n svgPath.attr(\"marker-start\", \"url(\" + url + \"#\" + diagramType + \"-circleStart)\");\n break;\n case \"aggregation\":\n svgPath.attr(\"marker-start\", \"url(\" + url + \"#\" + diagramType + \"-aggregationStart)\");\n break;\n case \"extension\":\n svgPath.attr(\"marker-start\", \"url(\" + url + \"#\" + diagramType + \"-extensionStart)\");\n break;\n case \"composition\":\n svgPath.attr(\"marker-start\", \"url(\" + url + \"#\" + diagramType + \"-compositionStart)\");\n break;\n case \"dependency\":\n svgPath.attr(\"marker-start\", \"url(\" + url + \"#\" + diagramType + \"-dependencyStart)\");\n break;\n case \"lollipop\":\n svgPath.attr(\"marker-start\", \"url(\" + url + \"#\" + diagramType + \"-lollipopStart)\");\n break;\n }\n switch (edge.arrowTypeEnd) {\n case \"arrow_cross\":\n svgPath.attr(\"marker-end\", \"url(\" + url + \"#\" + diagramType + \"-crossEnd)\");\n break;\n case \"arrow_point\":\n svgPath.attr(\"marker-end\", \"url(\" + url + \"#\" + diagramType + \"-pointEnd)\");\n break;\n case \"arrow_barb\":\n svgPath.attr(\"marker-end\", \"url(\" + url + \"#\" + diagramType + \"-barbEnd)\");\n break;\n case \"arrow_circle\":\n svgPath.attr(\"marker-end\", \"url(\" + url + \"#\" + diagramType + \"-circleEnd)\");\n break;\n case \"aggregation\":\n svgPath.attr(\"marker-end\", \"url(\" + url + \"#\" + diagramType + \"-aggregationEnd)\");\n break;\n case \"extension\":\n svgPath.attr(\"marker-end\", \"url(\" + url + \"#\" + diagramType + \"-extensionEnd)\");\n break;\n case \"composition\":\n svgPath.attr(\"marker-end\", \"url(\" + url + \"#\" + diagramType + \"-compositionEnd)\");\n break;\n case \"dependency\":\n svgPath.attr(\"marker-end\", \"url(\" + url + \"#\" + diagramType + \"-dependencyEnd)\");\n break;\n case \"lollipop\":\n svgPath.attr(\"marker-end\", \"url(\" + url + \"#\" + diagramType + \"-lollipopEnd)\");\n break;\n }\n let paths = {};\n if (pointsHasChanged) {\n paths.updatedPath = points;\n }\n paths.originalPath = edge.points;\n return paths;\n};\nexport {\n insertMarkers$1 as a,\n clear$1 as b,\n createLabel$1 as c,\n clear as d,\n insertNode as e,\n insertEdgeLabel as f,\n insertEdge as g,\n positionEdgeLabel as h,\n intersectRect$1 as i,\n labelHelper as l,\n positionNode as p,\n setNodeElem as s,\n updateNodeBounds as u\n};\n"],
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAIA,IAAM,gBAAgB,CAAC,MAAM,aAAa,MAAM,OAAO;AACrD,cAAY,QAAQ,CAAC,eAAe;AAClC,YAAQ,UAAU,EAAE,MAAM,MAAM,EAAE;AAAA,EACpC,CAAC;AACH;AACA,IAAM,YAAY,CAAC,MAAM,MAAM,OAAO;AACpC,QAAI,MAAM,uBAAuB,EAAE;AACnC,OAAK,OAAO,MAAM,EAAE,OAAO,QAAQ,EAAE,KAAK,MAAM,OAAO,iBAAiB,EAAE,KAAK,SAAS,sBAAsB,IAAI,EAAE,KAAK,QAAQ,CAAC,EAAE,KAAK,QAAQ,CAAC,EAAE,KAAK,eAAe,GAAG,EAAE,KAAK,gBAAgB,GAAG,EAAE,KAAK,UAAU,MAAM,EAAE,OAAO,MAAM,EAAE,KAAK,KAAK,oBAAoB;AAC3Q,OAAK,OAAO,MAAM,EAAE,OAAO,QAAQ,EAAE,KAAK,MAAM,OAAO,eAAe,EAAE,KAAK,SAAS,sBAAsB,IAAI,EAAE,KAAK,QAAQ,EAAE,EAAE,KAAK,QAAQ,CAAC,EAAE,KAAK,eAAe,EAAE,EAAE,KAAK,gBAAgB,EAAE,EAAE,KAAK,UAAU,MAAM,EAAE,OAAO,MAAM,EAAE,KAAK,KAAK,oBAAoB;AAC1Q;AACA,IAAM,cAAc,CAAC,MAAM,SAAS;AAClC,OAAK,OAAO,MAAM,EAAE,OAAO,QAAQ,EAAE,KAAK,MAAM,OAAO,mBAAmB,EAAE,KAAK,SAAS,wBAAwB,IAAI,EAAE,KAAK,QAAQ,CAAC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.vuepress/.cache/deps/chunk-4QTAVOE5.js
new file mode 100644
index 00000000..61fff33e
--- /dev/null
+++ b/.vuepress/.cache/deps/chunk-4QTAVOE5.js
@@ -0,0 +1,18097 @@
+import {
+ __commonJS,
+ __toESM
+} from "./chunk-HM4MQYWN.js";
+
+// node_modules/dayjs/dayjs.min.js
+var require_dayjs_min = __commonJS({
+ "node_modules/dayjs/dayjs.min.js"(exports2, module2) {
+ !function(t, e) {
+ "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
+ }(exports2, function() {
+ "use strict";
+ var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s2 = "minute", u4 = "hour", a2 = "day", o = "week", c3 = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y3 = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M2 = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t4) {
+ var e3 = ["th", "st", "nd", "rd"], n2 = t4 % 100;
+ return "[" + t4 + (e3[(n2 - 20) % 10] || e3[n2] || e3[0]) + "]";
+ } }, m = function(t4, e3, n2) {
+ var r2 = String(t4);
+ return !r2 || r2.length >= e3 ? t4 : "" + Array(e3 + 1 - r2.length).join(n2) + t4;
+ }, v2 = { s: m, z: function(t4) {
+ var e3 = -t4.utcOffset(), n2 = Math.abs(e3), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
+ return (e3 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
+ }, m: function t4(e3, n2) {
+ if (e3.date() < n2.date())
+ return -t4(n2, e3);
+ var r2 = 12 * (n2.year() - e3.year()) + (n2.month() - e3.month()), i2 = e3.clone().add(r2, c3), s3 = n2 - i2 < 0, u5 = e3.clone().add(r2 + (s3 ? -1 : 1), c3);
+ return +(-(r2 + (n2 - i2) / (s3 ? i2 - u5 : u5 - i2)) || 0);
+ }, a: function(t4) {
+ return t4 < 0 ? Math.ceil(t4) || 0 : Math.floor(t4);
+ }, p: function(t4) {
+ return { M: c3, y: h, w: o, d: a2, D: d, h: u4, m: s2, s: i, ms: r, Q: f }[t4] || String(t4 || "").toLowerCase().replace(/s$/, "");
+ }, u: function(t4) {
+ return void 0 === t4;
+ } }, g = "en", D3 = {};
+ D3[g] = M2;
+ var p = function(t4) {
+ return t4 instanceof b;
+ }, S = function t4(e3, n2, r2) {
+ var i2;
+ if (!e3)
+ return g;
+ if ("string" == typeof e3) {
+ var s3 = e3.toLowerCase();
+ D3[s3] && (i2 = s3), n2 && (D3[s3] = n2, i2 = s3);
+ var u5 = e3.split("-");
+ if (!i2 && u5.length > 1)
+ return t4(u5[0]);
+ } else {
+ var a3 = e3.name;
+ D3[a3] = e3, i2 = a3;
+ }
+ return !r2 && i2 && (g = i2), i2 || !r2 && g;
+ }, w = function(t4, e3) {
+ if (p(t4))
+ return t4.clone();
+ var n2 = "object" == typeof e3 ? e3 : {};
+ return n2.date = t4, n2.args = arguments, new b(n2);
+ }, O = v2;
+ O.l = S, O.i = p, O.w = function(t4, e3) {
+ return w(t4, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
+ };
+ var b = function() {
+ function M3(t4) {
+ this.$L = S(t4.locale, null, true), this.parse(t4);
+ }
+ var m2 = M3.prototype;
+ return m2.parse = function(t4) {
+ this.$d = function(t5) {
+ var e3 = t5.date, n2 = t5.utc;
+ if (null === e3)
+ return /* @__PURE__ */ new Date(NaN);
+ if (O.u(e3))
+ return /* @__PURE__ */ new Date();
+ if (e3 instanceof Date)
+ return new Date(e3);
+ if ("string" == typeof e3 && !/Z$/i.test(e3)) {
+ var r2 = e3.match($);
+ if (r2) {
+ var i2 = r2[2] - 1 || 0, s3 = (r2[7] || "0").substring(0, 3);
+ return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s3)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s3);
+ }
+ }
+ return new Date(e3);
+ }(t4), this.$x = t4.x || {}, this.init();
+ }, m2.init = function() {
+ var t4 = this.$d;
+ this.$y = t4.getFullYear(), this.$M = t4.getMonth(), this.$D = t4.getDate(), this.$W = t4.getDay(), this.$H = t4.getHours(), this.$m = t4.getMinutes(), this.$s = t4.getSeconds(), this.$ms = t4.getMilliseconds();
+ }, m2.$utils = function() {
+ return O;
+ }, m2.isValid = function() {
+ return !(this.$d.toString() === l);
+ }, m2.isSame = function(t4, e3) {
+ var n2 = w(t4);
+ return this.startOf(e3) <= n2 && n2 <= this.endOf(e3);
+ }, m2.isAfter = function(t4, e3) {
+ return w(t4) < this.startOf(e3);
+ }, m2.isBefore = function(t4, e3) {
+ return this.endOf(e3) < w(t4);
+ }, m2.$g = function(t4, e3, n2) {
+ return O.u(t4) ? this[e3] : this.set(n2, t4);
+ }, m2.unix = function() {
+ return Math.floor(this.valueOf() / 1e3);
+ }, m2.valueOf = function() {
+ return this.$d.getTime();
+ }, m2.startOf = function(t4, e3) {
+ var n2 = this, r2 = !!O.u(e3) || e3, f2 = O.p(t4), l2 = function(t5, e4) {
+ var i2 = O.w(n2.$u ? Date.UTC(n2.$y, e4, t5) : new Date(n2.$y, e4, t5), n2);
+ return r2 ? i2 : i2.endOf(a2);
+ }, $2 = function(t5, e4) {
+ return O.w(n2.toDate()[t5].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n2);
+ }, y4 = this.$W, M4 = this.$M, m3 = this.$D, v3 = "set" + (this.$u ? "UTC" : "");
+ switch (f2) {
+ case h:
+ return r2 ? l2(1, 0) : l2(31, 11);
+ case c3:
+ return r2 ? l2(1, M4) : l2(0, M4 + 1);
+ case o:
+ var g2 = this.$locale().weekStart || 0, D4 = (y4 < g2 ? y4 + 7 : y4) - g2;
+ return l2(r2 ? m3 - D4 : m3 + (6 - D4), M4);
+ case a2:
+ case d:
+ return $2(v3 + "Hours", 0);
+ case u4:
+ return $2(v3 + "Minutes", 1);
+ case s2:
+ return $2(v3 + "Seconds", 2);
+ case i:
+ return $2(v3 + "Milliseconds", 3);
+ default:
+ return this.clone();
+ }
+ }, m2.endOf = function(t4) {
+ return this.startOf(t4, false);
+ }, m2.$set = function(t4, e3) {
+ var n2, o2 = O.p(t4), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a2] = f2 + "Date", n2[d] = f2 + "Date", n2[c3] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u4] = f2 + "Hours", n2[s2] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a2 ? this.$D + (e3 - this.$W) : e3;
+ if (o2 === c3 || o2 === h) {
+ var y4 = this.clone().set(d, 1);
+ y4.$d[l2]($2), y4.init(), this.$d = y4.set(d, Math.min(this.$D, y4.daysInMonth())).$d;
+ } else
+ l2 && this.$d[l2]($2);
+ return this.init(), this;
+ }, m2.set = function(t4, e3) {
+ return this.clone().$set(t4, e3);
+ }, m2.get = function(t4) {
+ return this[O.p(t4)]();
+ }, m2.add = function(r2, f2) {
+ var d2, l2 = this;
+ r2 = Number(r2);
+ var $2 = O.p(f2), y4 = function(t4) {
+ var e3 = w(l2);
+ return O.w(e3.date(e3.date() + Math.round(t4 * r2)), l2);
+ };
+ if ($2 === c3)
+ return this.set(c3, this.$M + r2);
+ if ($2 === h)
+ return this.set(h, this.$y + r2);
+ if ($2 === a2)
+ return y4(1);
+ if ($2 === o)
+ return y4(7);
+ var M4 = (d2 = {}, d2[s2] = e, d2[u4] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M4;
+ return O.w(m3, this);
+ }, m2.subtract = function(t4, e3) {
+ return this.add(-1 * t4, e3);
+ }, m2.format = function(t4) {
+ var e3 = this, n2 = this.$locale();
+ if (!this.isValid())
+ return n2.invalidDate || l;
+ var r2 = t4 || "YYYY-MM-DDTHH:mm:ssZ", i2 = O.z(this), s3 = this.$H, u5 = this.$m, a3 = this.$M, o2 = n2.weekdays, c5 = n2.months, f2 = n2.meridiem, h2 = function(t5, n3, i3, s4) {
+ return t5 && (t5[n3] || t5(e3, r2)) || i3[n3].slice(0, s4);
+ }, d2 = function(t5) {
+ return O.s(s3 % 12 || 12, t5, "0");
+ }, $2 = f2 || function(t5, e4, n3) {
+ var r3 = t5 < 12 ? "AM" : "PM";
+ return n3 ? r3.toLowerCase() : r3;
+ };
+ return r2.replace(y3, function(t5, r3) {
+ return r3 || function(t6) {
+ switch (t6) {
+ case "YY":
+ return String(e3.$y).slice(-2);
+ case "YYYY":
+ return O.s(e3.$y, 4, "0");
+ case "M":
+ return a3 + 1;
+ case "MM":
+ return O.s(a3 + 1, 2, "0");
+ case "MMM":
+ return h2(n2.monthsShort, a3, c5, 3);
+ case "MMMM":
+ return h2(c5, a3);
+ case "D":
+ return e3.$D;
+ case "DD":
+ return O.s(e3.$D, 2, "0");
+ case "d":
+ return String(e3.$W);
+ case "dd":
+ return h2(n2.weekdaysMin, e3.$W, o2, 2);
+ case "ddd":
+ return h2(n2.weekdaysShort, e3.$W, o2, 3);
+ case "dddd":
+ return o2[e3.$W];
+ case "H":
+ return String(s3);
+ case "HH":
+ return O.s(s3, 2, "0");
+ case "h":
+ return d2(1);
+ case "hh":
+ return d2(2);
+ case "a":
+ return $2(s3, u5, true);
+ case "A":
+ return $2(s3, u5, false);
+ case "m":
+ return String(u5);
+ case "mm":
+ return O.s(u5, 2, "0");
+ case "s":
+ return String(e3.$s);
+ case "ss":
+ return O.s(e3.$s, 2, "0");
+ case "SSS":
+ return O.s(e3.$ms, 3, "0");
+ case "Z":
+ return i2;
+ }
+ return null;
+ }(t5) || i2.replace(":", "");
+ });
+ }, m2.utcOffset = function() {
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
+ }, m2.diff = function(r2, d2, l2) {
+ var $2, y4 = this, M4 = O.p(d2), m3 = w(r2), v3 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D4 = function() {
+ return O.m(y4, m3);
+ };
+ switch (M4) {
+ case h:
+ $2 = D4() / 12;
+ break;
+ case c3:
+ $2 = D4();
+ break;
+ case f:
+ $2 = D4() / 3;
+ break;
+ case o:
+ $2 = (g2 - v3) / 6048e5;
+ break;
+ case a2:
+ $2 = (g2 - v3) / 864e5;
+ break;
+ case u4:
+ $2 = g2 / n;
+ break;
+ case s2:
+ $2 = g2 / e;
+ break;
+ case i:
+ $2 = g2 / t;
+ break;
+ default:
+ $2 = g2;
+ }
+ return l2 ? $2 : O.a($2);
+ }, m2.daysInMonth = function() {
+ return this.endOf(c3).$D;
+ }, m2.$locale = function() {
+ return D3[this.$L];
+ }, m2.locale = function(t4, e3) {
+ if (!t4)
+ return this.$L;
+ var n2 = this.clone(), r2 = S(t4, e3, true);
+ return r2 && (n2.$L = r2), n2;
+ }, m2.clone = function() {
+ return O.w(this.$d, this);
+ }, m2.toDate = function() {
+ return new Date(this.valueOf());
+ }, m2.toJSON = function() {
+ return this.isValid() ? this.toISOString() : null;
+ }, m2.toISOString = function() {
+ return this.$d.toISOString();
+ }, m2.toString = function() {
+ return this.$d.toUTCString();
+ }, M3;
+ }(), _ = b.prototype;
+ return w.prototype = _, [["$ms", r], ["$s", i], ["$m", s2], ["$H", u4], ["$W", a2], ["$M", c3], ["$y", h], ["$D", d]].forEach(function(t4) {
+ _[t4[1]] = function(e3) {
+ return this.$g(e3, t4[0], t4[1]);
+ };
+ }), w.extend = function(t4, e3) {
+ return t4.$i || (t4(e3, b, w), t4.$i = true), w;
+ }, w.locale = S, w.isDayjs = p, w.unix = function(t4) {
+ return w(1e3 * t4);
+ }, w.en = D3[g], w.Ls = D3, w.p = {}, w;
+ });
+ }
+});
+
+// node_modules/@braintree/sanitize-url/dist/index.js
+var require_dist = __commonJS({
+ "node_modules/@braintree/sanitize-url/dist/index.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", { value: true });
+ exports2.sanitizeUrl = exports2.BLANK_URL = void 0;
+ var invalidProtocolRegex = /^([^\w]*)(javascript|data|vbscript)/im;
+ var htmlEntitiesRegex = /(\w+)(^\w|;)?/g;
+ var htmlCtrlEntityRegex = /&(newline|tab);/gi;
+ var ctrlCharactersRegex = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;
+ var urlSchemeRegex = /^.+(:|:)/gim;
+ var relativeFirstCharacters = [".", "/"];
+ exports2.BLANK_URL = "about:blank";
+ function isRelativeUrlWithoutProtocol(url) {
+ return relativeFirstCharacters.indexOf(url[0]) > -1;
+ }
+ function decodeHtmlCharacters(str2) {
+ var removedNullByte = str2.replace(ctrlCharactersRegex, "");
+ return removedNullByte.replace(htmlEntitiesRegex, function(match2, dec) {
+ return String.fromCharCode(dec);
+ });
+ }
+ function sanitizeUrl2(url) {
+ if (!url) {
+ return exports2.BLANK_URL;
+ }
+ var sanitizedUrl = decodeHtmlCharacters(url).replace(htmlCtrlEntityRegex, "").replace(ctrlCharactersRegex, "").trim();
+ if (!sanitizedUrl) {
+ return exports2.BLANK_URL;
+ }
+ if (isRelativeUrlWithoutProtocol(sanitizedUrl)) {
+ return sanitizedUrl;
+ }
+ var urlSchemeParseResults = sanitizedUrl.match(urlSchemeRegex);
+ if (!urlSchemeParseResults) {
+ return sanitizedUrl;
+ }
+ var urlScheme = urlSchemeParseResults[0];
+ if (invalidProtocolRegex.test(urlScheme)) {
+ return exports2.BLANK_URL;
+ }
+ return sanitizedUrl;
+ }
+ exports2.sanitizeUrl = sanitizeUrl2;
+ }
+});
+
+// node_modules/ts-dedent/esm/index.js
+function dedent(templ) {
+ var values = [];
+ for (var _i = 1; _i < arguments.length; _i++) {
+ values[_i - 1] = arguments[_i];
+ }
+ var strings = Array.from(typeof templ === "string" ? [templ] : templ);
+ strings[strings.length - 1] = strings[strings.length - 1].replace(/\r?\n([\t ]*)$/, "");
+ var indentLengths = strings.reduce(function(arr, str2) {
+ var matches = str2.match(/\n([\t ]+|(?!\s).)/g);
+ if (matches) {
+ return arr.concat(matches.map(function(match2) {
+ var _a, _b;
+ return (_b = (_a = match2.match(/[\t ]/g)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
+ }));
+ }
+ return arr;
+ }, []);
+ if (indentLengths.length) {
+ var pattern_1 = new RegExp("\n[ ]{" + Math.min.apply(Math, indentLengths) + "}", "g");
+ strings = strings.map(function(str2) {
+ return str2.replace(pattern_1, "\n");
+ });
+ }
+ strings[0] = strings[0].replace(/^\r?\n/, "");
+ var string = strings[0];
+ values.forEach(function(value, i) {
+ var endentations = string.match(/(?:^|\n)( *)$/);
+ var endentation = endentations ? endentations[1] : "";
+ var indentedValue = value;
+ if (typeof value === "string" && value.includes("\n")) {
+ indentedValue = String(value).split("\n").map(function(str2, i2) {
+ return i2 === 0 ? str2 : "" + endentation + str2;
+ }).join("\n");
+ }
+ string += indentedValue + strings[i + 1];
+ });
+ return string;
+}
+
+// node_modules/d3-array/src/max.js
+function max(values, valueof) {
+ let max5;
+ if (valueof === void 0) {
+ for (const value of values) {
+ if (value != null && (max5 < value || max5 === void 0 && value >= value)) {
+ max5 = value;
+ }
+ }
+ } else {
+ let index2 = -1;
+ for (let value of values) {
+ if ((value = valueof(value, ++index2, values)) != null && (max5 < value || max5 === void 0 && value >= value)) {
+ max5 = value;
+ }
+ }
+ }
+ return max5;
+}
+
+// node_modules/d3-array/src/min.js
+function min(values, valueof) {
+ let min4;
+ if (valueof === void 0) {
+ for (const value of values) {
+ if (value != null && (min4 > value || min4 === void 0 && value >= value)) {
+ min4 = value;
+ }
+ }
+ } else {
+ let index2 = -1;
+ for (let value of values) {
+ if ((value = valueof(value, ++index2, values)) != null && (min4 > value || min4 === void 0 && value >= value)) {
+ min4 = value;
+ }
+ }
+ }
+ return min4;
+}
+
+// node_modules/d3-array/src/ascending.js
+function ascending(a2, b) {
+ return a2 == null || b == null ? NaN : a2 < b ? -1 : a2 > b ? 1 : a2 >= b ? 0 : NaN;
+}
+
+// node_modules/d3-array/src/descending.js
+function descending(a2, b) {
+ return a2 == null || b == null ? NaN : b < a2 ? -1 : b > a2 ? 1 : b >= a2 ? 0 : NaN;
+}
+
+// node_modules/d3-array/src/bisector.js
+function bisector(f) {
+ let compare1, compare2, delta;
+ if (f.length !== 2) {
+ compare1 = ascending;
+ compare2 = (d, x3) => ascending(f(d), x3);
+ delta = (d, x3) => f(d) - x3;
+ } else {
+ compare1 = f === ascending || f === descending ? f : zero;
+ compare2 = f;
+ delta = f;
+ }
+ function left2(a2, x3, lo = 0, hi = a2.length) {
+ if (lo < hi) {
+ if (compare1(x3, x3) !== 0)
+ return hi;
+ do {
+ const mid = lo + hi >>> 1;
+ if (compare2(a2[mid], x3) < 0)
+ lo = mid + 1;
+ else
+ hi = mid;
+ } while (lo < hi);
+ }
+ return lo;
+ }
+ function right2(a2, x3, lo = 0, hi = a2.length) {
+ if (lo < hi) {
+ if (compare1(x3, x3) !== 0)
+ return hi;
+ do {
+ const mid = lo + hi >>> 1;
+ if (compare2(a2[mid], x3) <= 0)
+ lo = mid + 1;
+ else
+ hi = mid;
+ } while (lo < hi);
+ }
+ return lo;
+ }
+ function center2(a2, x3, lo = 0, hi = a2.length) {
+ const i = left2(a2, x3, lo, hi - 1);
+ return i > lo && delta(a2[i - 1], x3) > -delta(a2[i], x3) ? i - 1 : i;
+ }
+ return { left: left2, center: center2, right: right2 };
+}
+function zero() {
+ return 0;
+}
+
+// node_modules/d3-array/src/number.js
+function number(x3) {
+ return x3 === null ? NaN : +x3;
+}
+
+// node_modules/d3-array/src/bisect.js
+var ascendingBisect = bisector(ascending);
+var bisectRight = ascendingBisect.right;
+var bisectLeft = ascendingBisect.left;
+var bisectCenter = bisector(number).center;
+var bisect_default = bisectRight;
+
+// node_modules/d3-array/src/blur.js
+var blur2 = Blur2(blurf);
+var blurImage = Blur2(blurfImage);
+function Blur2(blur3) {
+ return function(data, rx, ry = rx) {
+ if (!((rx = +rx) >= 0))
+ throw new RangeError("invalid rx");
+ if (!((ry = +ry) >= 0))
+ throw new RangeError("invalid ry");
+ let { data: values, width, height } = data;
+ if (!((width = Math.floor(width)) >= 0))
+ throw new RangeError("invalid width");
+ if (!((height = Math.floor(height !== void 0 ? height : values.length / width)) >= 0))
+ throw new RangeError("invalid height");
+ if (!width || !height || !rx && !ry)
+ return data;
+ const blurx = rx && blur3(rx);
+ const blury = ry && blur3(ry);
+ const temp = values.slice();
+ if (blurx && blury) {
+ blurh(blurx, temp, values, width, height);
+ blurh(blurx, values, temp, width, height);
+ blurh(blurx, temp, values, width, height);
+ blurv(blury, values, temp, width, height);
+ blurv(blury, temp, values, width, height);
+ blurv(blury, values, temp, width, height);
+ } else if (blurx) {
+ blurh(blurx, values, temp, width, height);
+ blurh(blurx, temp, values, width, height);
+ blurh(blurx, values, temp, width, height);
+ } else if (blury) {
+ blurv(blury, values, temp, width, height);
+ blurv(blury, temp, values, width, height);
+ blurv(blury, values, temp, width, height);
+ }
+ return data;
+ };
+}
+function blurh(blur3, T, S, w, h) {
+ for (let y3 = 0, n = w * h; y3 < n; ) {
+ blur3(T, S, y3, y3 += w, 1);
+ }
+}
+function blurv(blur3, T, S, w, h) {
+ for (let x3 = 0, n = w * h; x3 < w; ++x3) {
+ blur3(T, S, x3, x3 + n, w);
+ }
+}
+function blurfImage(radius) {
+ const blur3 = blurf(radius);
+ return (T, S, start2, stop, step) => {
+ start2 <<= 2, stop <<= 2, step <<= 2;
+ blur3(T, S, start2 + 0, stop + 0, step);
+ blur3(T, S, start2 + 1, stop + 1, step);
+ blur3(T, S, start2 + 2, stop + 2, step);
+ blur3(T, S, start2 + 3, stop + 3, step);
+ };
+}
+function blurf(radius) {
+ const radius0 = Math.floor(radius);
+ if (radius0 === radius)
+ return bluri(radius);
+ const t = radius - radius0;
+ const w = 2 * radius + 1;
+ return (T, S, start2, stop, step) => {
+ if (!((stop -= step) >= start2))
+ return;
+ let sum4 = radius0 * S[start2];
+ const s0 = step * radius0;
+ const s1 = s0 + step;
+ for (let i = start2, j = start2 + s0; i < j; i += step) {
+ sum4 += S[Math.min(stop, i)];
+ }
+ for (let i = start2, j = stop; i <= j; i += step) {
+ sum4 += S[Math.min(stop, i + s0)];
+ T[i] = (sum4 + t * (S[Math.max(start2, i - s1)] + S[Math.min(stop, i + s1)])) / w;
+ sum4 -= S[Math.max(start2, i - s0)];
+ }
+ };
+}
+function bluri(radius) {
+ const w = 2 * radius + 1;
+ return (T, S, start2, stop, step) => {
+ if (!((stop -= step) >= start2))
+ return;
+ let sum4 = radius * S[start2];
+ const s2 = step * radius;
+ for (let i = start2, j = start2 + s2; i < j; i += step) {
+ sum4 += S[Math.min(stop, i)];
+ }
+ for (let i = start2, j = stop; i <= j; i += step) {
+ sum4 += S[Math.min(stop, i + s2)];
+ T[i] = sum4 / w;
+ sum4 -= S[Math.max(start2, i - s2)];
+ }
+ };
+}
+
+// node_modules/d3-array/src/fsum.js
+var Adder = class {
+ constructor() {
+ this._partials = new Float64Array(32);
+ this._n = 0;
+ }
+ add(x3) {
+ const p = this._partials;
+ let i = 0;
+ for (let j = 0; j < this._n && j < 32; j++) {
+ const y3 = p[j], hi = x3 + y3, lo = Math.abs(x3) < Math.abs(y3) ? x3 - (hi - y3) : y3 - (hi - x3);
+ if (lo)
+ p[i++] = lo;
+ x3 = hi;
+ }
+ p[i] = x3;
+ this._n = i + 1;
+ return this;
+ }
+ valueOf() {
+ const p = this._partials;
+ let n = this._n, x3, y3, lo, hi = 0;
+ if (n > 0) {
+ hi = p[--n];
+ while (n > 0) {
+ x3 = hi;
+ y3 = p[--n];
+ hi = x3 + y3;
+ lo = y3 - (hi - x3);
+ if (lo)
+ break;
+ }
+ if (n > 0 && (lo < 0 && p[n - 1] < 0 || lo > 0 && p[n - 1] > 0)) {
+ y3 = lo * 2;
+ x3 = hi + y3;
+ if (y3 == x3 - hi)
+ hi = x3;
+ }
+ }
+ return hi;
+ }
+};
+
+// node_modules/internmap/src/index.js
+var InternMap = class extends Map {
+ constructor(entries2, key = keyof) {
+ super();
+ Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: key } });
+ if (entries2 != null)
+ for (const [key2, value] of entries2)
+ this.set(key2, value);
+ }
+ get(key) {
+ return super.get(intern_get(this, key));
+ }
+ has(key) {
+ return super.has(intern_get(this, key));
+ }
+ set(key, value) {
+ return super.set(intern_set(this, key), value);
+ }
+ delete(key) {
+ return super.delete(intern_delete(this, key));
+ }
+};
+function intern_get({ _intern, _key }, value) {
+ const key = _key(value);
+ return _intern.has(key) ? _intern.get(key) : value;
+}
+function intern_set({ _intern, _key }, value) {
+ const key = _key(value);
+ if (_intern.has(key))
+ return _intern.get(key);
+ _intern.set(key, value);
+ return value;
+}
+function intern_delete({ _intern, _key }, value) {
+ const key = _key(value);
+ if (_intern.has(key)) {
+ value = _intern.get(key);
+ _intern.delete(key);
+ }
+ return value;
+}
+function keyof(value) {
+ return value !== null && typeof value === "object" ? value.valueOf() : value;
+}
+
+// node_modules/d3-array/src/array.js
+var array = Array.prototype;
+var slice = array.slice;
+var map = array.map;
+
+// node_modules/d3-array/src/ticks.js
+var e10 = Math.sqrt(50);
+var e5 = Math.sqrt(10);
+var e2 = Math.sqrt(2);
+function tickSpec(start2, stop, count3) {
+ const step = (stop - start2) / Math.max(0, count3), power = Math.floor(Math.log10(step)), error = step / Math.pow(10, power), factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;
+ let i1, i2, inc;
+ if (power < 0) {
+ inc = Math.pow(10, -power) / factor;
+ i1 = Math.round(start2 * inc);
+ i2 = Math.round(stop * inc);
+ if (i1 / inc < start2)
+ ++i1;
+ if (i2 / inc > stop)
+ --i2;
+ inc = -inc;
+ } else {
+ inc = Math.pow(10, power) * factor;
+ i1 = Math.round(start2 / inc);
+ i2 = Math.round(stop / inc);
+ if (i1 * inc < start2)
+ ++i1;
+ if (i2 * inc > stop)
+ --i2;
+ }
+ if (i2 < i1 && 0.5 <= count3 && count3 < 2)
+ return tickSpec(start2, stop, count3 * 2);
+ return [i1, i2, inc];
+}
+function ticks(start2, stop, count3) {
+ stop = +stop, start2 = +start2, count3 = +count3;
+ if (!(count3 > 0))
+ return [];
+ if (start2 === stop)
+ return [start2];
+ const reverse2 = stop < start2, [i1, i2, inc] = reverse2 ? tickSpec(stop, start2, count3) : tickSpec(start2, stop, count3);
+ if (!(i2 >= i1))
+ return [];
+ const n = i2 - i1 + 1, ticks2 = new Array(n);
+ if (reverse2) {
+ if (inc < 0)
+ for (let i = 0; i < n; ++i)
+ ticks2[i] = (i2 - i) / -inc;
+ else
+ for (let i = 0; i < n; ++i)
+ ticks2[i] = (i2 - i) * inc;
+ } else {
+ if (inc < 0)
+ for (let i = 0; i < n; ++i)
+ ticks2[i] = (i1 + i) / -inc;
+ else
+ for (let i = 0; i < n; ++i)
+ ticks2[i] = (i1 + i) * inc;
+ }
+ return ticks2;
+}
+function tickIncrement(start2, stop, count3) {
+ stop = +stop, start2 = +start2, count3 = +count3;
+ return tickSpec(start2, stop, count3)[2];
+}
+function tickStep(start2, stop, count3) {
+ stop = +stop, start2 = +start2, count3 = +count3;
+ const reverse2 = stop < start2, inc = reverse2 ? tickIncrement(stop, start2, count3) : tickIncrement(start2, stop, count3);
+ return (reverse2 ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);
+}
+
+// node_modules/d3-array/src/merge.js
+function* flatten(arrays) {
+ for (const array4 of arrays) {
+ yield* array4;
+ }
+}
+function merge(arrays) {
+ return Array.from(flatten(arrays));
+}
+
+// node_modules/d3-array/src/shuffle.js
+var shuffle_default = shuffler(Math.random);
+function shuffler(random2) {
+ return function shuffle2(array4, i0 = 0, i1 = array4.length) {
+ let m = i1 - (i0 = +i0);
+ while (m) {
+ const i = random2() * m-- | 0, t = array4[m + i0];
+ array4[m + i0] = array4[i + i0];
+ array4[i + i0] = t;
+ }
+ return array4;
+ };
+}
+
+// node_modules/d3-axis/src/identity.js
+function identity_default(x3) {
+ return x3;
+}
+
+// node_modules/d3-axis/src/axis.js
+var top = 1;
+var right = 2;
+var bottom = 3;
+var left = 4;
+var epsilon = 1e-6;
+function translateX(x3) {
+ return "translate(" + x3 + ",0)";
+}
+function translateY(y3) {
+ return "translate(0," + y3 + ")";
+}
+function number2(scale2) {
+ return (d) => +scale2(d);
+}
+function center(scale2, offset) {
+ offset = Math.max(0, scale2.bandwidth() - offset * 2) / 2;
+ if (scale2.round())
+ offset = Math.round(offset);
+ return (d) => +scale2(d) + offset;
+}
+function entering() {
+ return !this.__axis;
+}
+function axis(orient, scale2) {
+ var tickArguments = [], tickValues = null, tickFormat2 = null, tickSizeInner = 6, tickSizeOuter = 6, tickPadding = 3, offset = typeof window !== "undefined" && window.devicePixelRatio > 1 ? 0 : 0.5, k2 = orient === top || orient === left ? -1 : 1, x3 = orient === left || orient === right ? "x" : "y", transform2 = orient === top || orient === bottom ? translateX : translateY;
+ function axis2(context) {
+ var values = tickValues == null ? scale2.ticks ? scale2.ticks.apply(scale2, tickArguments) : scale2.domain() : tickValues, format3 = tickFormat2 == null ? scale2.tickFormat ? scale2.tickFormat.apply(scale2, tickArguments) : identity_default : tickFormat2, spacing = Math.max(tickSizeInner, 0) + tickPadding, range2 = scale2.range(), range0 = +range2[0] + offset, range1 = +range2[range2.length - 1] + offset, position2 = (scale2.bandwidth ? center : number2)(scale2.copy(), offset), selection2 = context.selection ? context.selection() : context, path2 = selection2.selectAll(".domain").data([null]), tick = selection2.selectAll(".tick").data(values, scale2).order(), tickExit = tick.exit(), tickEnter = tick.enter().append("g").attr("class", "tick"), line2 = tick.select("line"), text2 = tick.select("text");
+ path2 = path2.merge(path2.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor"));
+ tick = tick.merge(tickEnter);
+ line2 = line2.merge(tickEnter.append("line").attr("stroke", "currentColor").attr(x3 + "2", k2 * tickSizeInner));
+ text2 = text2.merge(tickEnter.append("text").attr("fill", "currentColor").attr(x3, k2 * spacing).attr("dy", orient === top ? "0em" : orient === bottom ? "0.71em" : "0.32em"));
+ if (context !== selection2) {
+ path2 = path2.transition(context);
+ tick = tick.transition(context);
+ line2 = line2.transition(context);
+ text2 = text2.transition(context);
+ tickExit = tickExit.transition(context).attr("opacity", epsilon).attr("transform", function(d) {
+ return isFinite(d = position2(d)) ? transform2(d + offset) : this.getAttribute("transform");
+ });
+ tickEnter.attr("opacity", epsilon).attr("transform", function(d) {
+ var p = this.parentNode.__axis;
+ return transform2((p && isFinite(p = p(d)) ? p : position2(d)) + offset);
+ });
+ }
+ tickExit.remove();
+ path2.attr("d", orient === left || orient === right ? tickSizeOuter ? "M" + k2 * tickSizeOuter + "," + range0 + "H" + offset + "V" + range1 + "H" + k2 * tickSizeOuter : "M" + offset + "," + range0 + "V" + range1 : tickSizeOuter ? "M" + range0 + "," + k2 * tickSizeOuter + "V" + offset + "H" + range1 + "V" + k2 * tickSizeOuter : "M" + range0 + "," + offset + "H" + range1);
+ tick.attr("opacity", 1).attr("transform", function(d) {
+ return transform2(position2(d) + offset);
+ });
+ line2.attr(x3 + "2", k2 * tickSizeInner);
+ text2.attr(x3, k2 * spacing).text(format3);
+ selection2.filter(entering).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", orient === right ? "start" : orient === left ? "end" : "middle");
+ selection2.each(function() {
+ this.__axis = position2;
+ });
+ }
+ axis2.scale = function(_) {
+ return arguments.length ? (scale2 = _, axis2) : scale2;
+ };
+ axis2.ticks = function() {
+ return tickArguments = Array.from(arguments), axis2;
+ };
+ axis2.tickArguments = function(_) {
+ return arguments.length ? (tickArguments = _ == null ? [] : Array.from(_), axis2) : tickArguments.slice();
+ };
+ axis2.tickValues = function(_) {
+ return arguments.length ? (tickValues = _ == null ? null : Array.from(_), axis2) : tickValues && tickValues.slice();
+ };
+ axis2.tickFormat = function(_) {
+ return arguments.length ? (tickFormat2 = _, axis2) : tickFormat2;
+ };
+ axis2.tickSize = function(_) {
+ return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis2) : tickSizeInner;
+ };
+ axis2.tickSizeInner = function(_) {
+ return arguments.length ? (tickSizeInner = +_, axis2) : tickSizeInner;
+ };
+ axis2.tickSizeOuter = function(_) {
+ return arguments.length ? (tickSizeOuter = +_, axis2) : tickSizeOuter;
+ };
+ axis2.tickPadding = function(_) {
+ return arguments.length ? (tickPadding = +_, axis2) : tickPadding;
+ };
+ axis2.offset = function(_) {
+ return arguments.length ? (offset = +_, axis2) : offset;
+ };
+ return axis2;
+}
+function axisTop(scale2) {
+ return axis(top, scale2);
+}
+function axisBottom(scale2) {
+ return axis(bottom, scale2);
+}
+
+// node_modules/d3-selection/src/selector.js
+function none() {
+}
+function selector_default(selector) {
+ return selector == null ? none : function() {
+ return this.querySelector(selector);
+ };
+}
+
+// node_modules/d3-selection/src/selection/select.js
+function select_default(select) {
+ if (typeof select !== "function")
+ select = selector_default(select);
+ for (var groups2 = this._groups, m = groups2.length, subgroups = new Array(m), j = 0; j < m; ++j) {
+ for (var group2 = groups2[j], n = group2.length, subgroup = subgroups[j] = new Array(n), node2, subnode, i = 0; i < n; ++i) {
+ if ((node2 = group2[i]) && (subnode = select.call(node2, node2.__data__, i, group2))) {
+ if ("__data__" in node2)
+ subnode.__data__ = node2.__data__;
+ subgroup[i] = subnode;
+ }
+ }
+ }
+ return new Selection(subgroups, this._parents);
+}
+
+// node_modules/d3-selection/src/array.js
+function array2(x3) {
+ return x3 == null ? [] : Array.isArray(x3) ? x3 : Array.from(x3);
+}
+
+// node_modules/d3-selection/src/selectorAll.js
+function empty() {
+ return [];
+}
+function selectorAll_default(selector) {
+ return selector == null ? empty : function() {
+ return this.querySelectorAll(selector);
+ };
+}
+
+// node_modules/d3-selection/src/selection/selectAll.js
+function arrayAll(select) {
+ return function() {
+ return array2(select.apply(this, arguments));
+ };
+}
+function selectAll_default(select) {
+ if (typeof select === "function")
+ select = arrayAll(select);
+ else
+ select = selectorAll_default(select);
+ for (var groups2 = this._groups, m = groups2.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
+ for (var group2 = groups2[j], n = group2.length, node2, i = 0; i < n; ++i) {
+ if (node2 = group2[i]) {
+ subgroups.push(select.call(node2, node2.__data__, i, group2));
+ parents.push(node2);
+ }
+ }
+ }
+ return new Selection(subgroups, parents);
+}
+
+// node_modules/d3-selection/src/matcher.js
+function matcher_default(selector) {
+ return function() {
+ return this.matches(selector);
+ };
+}
+function childMatcher(selector) {
+ return function(node2) {
+ return node2.matches(selector);
+ };
+}
+
+// node_modules/d3-selection/src/selection/selectChild.js
+var find = Array.prototype.find;
+function childFind(match2) {
+ return function() {
+ return find.call(this.children, match2);
+ };
+}
+function childFirst() {
+ return this.firstElementChild;
+}
+function selectChild_default(match2) {
+ return this.select(match2 == null ? childFirst : childFind(typeof match2 === "function" ? match2 : childMatcher(match2)));
+}
+
+// node_modules/d3-selection/src/selection/selectChildren.js
+var filter2 = Array.prototype.filter;
+function children() {
+ return Array.from(this.children);
+}
+function childrenFilter(match2) {
+ return function() {
+ return filter2.call(this.children, match2);
+ };
+}
+function selectChildren_default(match2) {
+ return this.selectAll(match2 == null ? children : childrenFilter(typeof match2 === "function" ? match2 : childMatcher(match2)));
+}
+
+// node_modules/d3-selection/src/selection/filter.js
+function filter_default(match2) {
+ if (typeof match2 !== "function")
+ match2 = matcher_default(match2);
+ for (var groups2 = this._groups, m = groups2.length, subgroups = new Array(m), j = 0; j < m; ++j) {
+ for (var group2 = groups2[j], n = group2.length, subgroup = subgroups[j] = [], node2, i = 0; i < n; ++i) {
+ if ((node2 = group2[i]) && match2.call(node2, node2.__data__, i, group2)) {
+ subgroup.push(node2);
+ }
+ }
+ }
+ return new Selection(subgroups, this._parents);
+}
+
+// node_modules/d3-selection/src/selection/sparse.js
+function sparse_default(update) {
+ return new Array(update.length);
+}
+
+// node_modules/d3-selection/src/selection/enter.js
+function enter_default() {
+ return new Selection(this._enter || this._groups.map(sparse_default), this._parents);
+}
+function EnterNode(parent, datum2) {
+ this.ownerDocument = parent.ownerDocument;
+ this.namespaceURI = parent.namespaceURI;
+ this._next = null;
+ this._parent = parent;
+ this.__data__ = datum2;
+}
+EnterNode.prototype = {
+ constructor: EnterNode,
+ appendChild: function(child) {
+ return this._parent.insertBefore(child, this._next);
+ },
+ insertBefore: function(child, next2) {
+ return this._parent.insertBefore(child, next2);
+ },
+ querySelector: function(selector) {
+ return this._parent.querySelector(selector);
+ },
+ querySelectorAll: function(selector) {
+ return this._parent.querySelectorAll(selector);
+ }
+};
+
+// node_modules/d3-selection/src/constant.js
+function constant_default(x3) {
+ return function() {
+ return x3;
+ };
+}
+
+// node_modules/d3-selection/src/selection/data.js
+function bindIndex(parent, group2, enter, update, exit, data) {
+ var i = 0, node2, groupLength = group2.length, dataLength = data.length;
+ for (; i < dataLength; ++i) {
+ if (node2 = group2[i]) {
+ node2.__data__ = data[i];
+ update[i] = node2;
+ } else {
+ enter[i] = new EnterNode(parent, data[i]);
+ }
+ }
+ for (; i < groupLength; ++i) {
+ if (node2 = group2[i]) {
+ exit[i] = node2;
+ }
+ }
+}
+function bindKey(parent, group2, enter, update, exit, data, key) {
+ var i, node2, nodeByKeyValue = /* @__PURE__ */ new Map(), groupLength = group2.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue;
+ for (i = 0; i < groupLength; ++i) {
+ if (node2 = group2[i]) {
+ keyValues[i] = keyValue = key.call(node2, node2.__data__, i, group2) + "";
+ if (nodeByKeyValue.has(keyValue)) {
+ exit[i] = node2;
+ } else {
+ nodeByKeyValue.set(keyValue, node2);
+ }
+ }
+ }
+ for (i = 0; i < dataLength; ++i) {
+ keyValue = key.call(parent, data[i], i, data) + "";
+ if (node2 = nodeByKeyValue.get(keyValue)) {
+ update[i] = node2;
+ node2.__data__ = data[i];
+ nodeByKeyValue.delete(keyValue);
+ } else {
+ enter[i] = new EnterNode(parent, data[i]);
+ }
+ }
+ for (i = 0; i < groupLength; ++i) {
+ if ((node2 = group2[i]) && nodeByKeyValue.get(keyValues[i]) === node2) {
+ exit[i] = node2;
+ }
+ }
+}
+function datum(node2) {
+ return node2.__data__;
+}
+function data_default(value, key) {
+ if (!arguments.length)
+ return Array.from(this, datum);
+ var bind = key ? bindKey : bindIndex, parents = this._parents, groups2 = this._groups;
+ if (typeof value !== "function")
+ value = constant_default(value);
+ for (var m = groups2.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
+ var parent = parents[j], group2 = groups2[j], groupLength = group2.length, data = arraylike(value.call(parent, parent && parent.__data__, j, parents)), dataLength = data.length, enterGroup = enter[j] = new Array(dataLength), updateGroup = update[j] = new Array(dataLength), exitGroup = exit[j] = new Array(groupLength);
+ bind(parent, group2, enterGroup, updateGroup, exitGroup, data, key);
+ for (var i0 = 0, i1 = 0, previous, next2; i0 < dataLength; ++i0) {
+ if (previous = enterGroup[i0]) {
+ if (i0 >= i1)
+ i1 = i0 + 1;
+ while (!(next2 = updateGroup[i1]) && ++i1 < dataLength)
+ ;
+ previous._next = next2 || null;
+ }
+ }
+ }
+ update = new Selection(update, parents);
+ update._enter = enter;
+ update._exit = exit;
+ return update;
+}
+function arraylike(data) {
+ return typeof data === "object" && "length" in data ? data : Array.from(data);
+}
+
+// node_modules/d3-selection/src/selection/exit.js
+function exit_default() {
+ return new Selection(this._exit || this._groups.map(sparse_default), this._parents);
+}
+
+// node_modules/d3-selection/src/selection/join.js
+function join_default(onenter, onupdate, onexit) {
+ var enter = this.enter(), update = this, exit = this.exit();
+ if (typeof onenter === "function") {
+ enter = onenter(enter);
+ if (enter)
+ enter = enter.selection();
+ } else {
+ enter = enter.append(onenter + "");
+ }
+ if (onupdate != null) {
+ update = onupdate(update);
+ if (update)
+ update = update.selection();
+ }
+ if (onexit == null)
+ exit.remove();
+ else
+ onexit(exit);
+ return enter && update ? enter.merge(update).order() : update;
+}
+
+// node_modules/d3-selection/src/selection/merge.js
+function merge_default(context) {
+ var selection2 = context.selection ? context.selection() : context;
+ for (var groups0 = this._groups, groups1 = selection2._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
+ for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge3 = merges[j] = new Array(n), node2, i = 0; i < n; ++i) {
+ if (node2 = group0[i] || group1[i]) {
+ merge3[i] = node2;
+ }
+ }
+ }
+ for (; j < m0; ++j) {
+ merges[j] = groups0[j];
+ }
+ return new Selection(merges, this._parents);
+}
+
+// node_modules/d3-selection/src/selection/order.js
+function order_default() {
+ for (var groups2 = this._groups, j = -1, m = groups2.length; ++j < m; ) {
+ for (var group2 = groups2[j], i = group2.length - 1, next2 = group2[i], node2; --i >= 0; ) {
+ if (node2 = group2[i]) {
+ if (next2 && node2.compareDocumentPosition(next2) ^ 4)
+ next2.parentNode.insertBefore(node2, next2);
+ next2 = node2;
+ }
+ }
+ }
+ return this;
+}
+
+// node_modules/d3-selection/src/selection/sort.js
+function sort_default(compare) {
+ if (!compare)
+ compare = ascending2;
+ function compareNode(a2, b) {
+ return a2 && b ? compare(a2.__data__, b.__data__) : !a2 - !b;
+ }
+ for (var groups2 = this._groups, m = groups2.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
+ for (var group2 = groups2[j], n = group2.length, sortgroup = sortgroups[j] = new Array(n), node2, i = 0; i < n; ++i) {
+ if (node2 = group2[i]) {
+ sortgroup[i] = node2;
+ }
+ }
+ sortgroup.sort(compareNode);
+ }
+ return new Selection(sortgroups, this._parents).order();
+}
+function ascending2(a2, b) {
+ return a2 < b ? -1 : a2 > b ? 1 : a2 >= b ? 0 : NaN;
+}
+
+// node_modules/d3-selection/src/selection/call.js
+function call_default() {
+ var callback = arguments[0];
+ arguments[0] = this;
+ callback.apply(null, arguments);
+ return this;
+}
+
+// node_modules/d3-selection/src/selection/nodes.js
+function nodes_default() {
+ return Array.from(this);
+}
+
+// node_modules/d3-selection/src/selection/node.js
+function node_default() {
+ for (var groups2 = this._groups, j = 0, m = groups2.length; j < m; ++j) {
+ for (var group2 = groups2[j], i = 0, n = group2.length; i < n; ++i) {
+ var node2 = group2[i];
+ if (node2)
+ return node2;
+ }
+ }
+ return null;
+}
+
+// node_modules/d3-selection/src/selection/size.js
+function size_default() {
+ let size = 0;
+ for (const node2 of this)
+ ++size;
+ return size;
+}
+
+// node_modules/d3-selection/src/selection/empty.js
+function empty_default() {
+ return !this.node();
+}
+
+// node_modules/d3-selection/src/selection/each.js
+function each_default(callback) {
+ for (var groups2 = this._groups, j = 0, m = groups2.length; j < m; ++j) {
+ for (var group2 = groups2[j], i = 0, n = group2.length, node2; i < n; ++i) {
+ if (node2 = group2[i])
+ callback.call(node2, node2.__data__, i, group2);
+ }
+ }
+ return this;
+}
+
+// node_modules/d3-selection/src/namespaces.js
+var xhtml = "http://www.w3.org/1999/xhtml";
+var namespaces_default = {
+ svg: "http://www.w3.org/2000/svg",
+ xhtml,
+ xlink: "http://www.w3.org/1999/xlink",
+ xml: "http://www.w3.org/XML/1998/namespace",
+ xmlns: "http://www.w3.org/2000/xmlns/"
+};
+
+// node_modules/d3-selection/src/namespace.js
+function namespace_default(name) {
+ var prefix2 = name += "", i = prefix2.indexOf(":");
+ if (i >= 0 && (prefix2 = name.slice(0, i)) !== "xmlns")
+ name = name.slice(i + 1);
+ return namespaces_default.hasOwnProperty(prefix2) ? { space: namespaces_default[prefix2], local: name } : name;
+}
+
+// node_modules/d3-selection/src/selection/attr.js
+function attrRemove(name) {
+ return function() {
+ this.removeAttribute(name);
+ };
+}
+function attrRemoveNS(fullname) {
+ return function() {
+ this.removeAttributeNS(fullname.space, fullname.local);
+ };
+}
+function attrConstant(name, value) {
+ return function() {
+ this.setAttribute(name, value);
+ };
+}
+function attrConstantNS(fullname, value) {
+ return function() {
+ this.setAttributeNS(fullname.space, fullname.local, value);
+ };
+}
+function attrFunction(name, value) {
+ return function() {
+ var v2 = value.apply(this, arguments);
+ if (v2 == null)
+ this.removeAttribute(name);
+ else
+ this.setAttribute(name, v2);
+ };
+}
+function attrFunctionNS(fullname, value) {
+ return function() {
+ var v2 = value.apply(this, arguments);
+ if (v2 == null)
+ this.removeAttributeNS(fullname.space, fullname.local);
+ else
+ this.setAttributeNS(fullname.space, fullname.local, v2);
+ };
+}
+function attr_default(name, value) {
+ var fullname = namespace_default(name);
+ if (arguments.length < 2) {
+ var node2 = this.node();
+ return fullname.local ? node2.getAttributeNS(fullname.space, fullname.local) : node2.getAttribute(fullname);
+ }
+ return this.each((value == null ? fullname.local ? attrRemoveNS : attrRemove : typeof value === "function" ? fullname.local ? attrFunctionNS : attrFunction : fullname.local ? attrConstantNS : attrConstant)(fullname, value));
+}
+
+// node_modules/d3-selection/src/window.js
+function window_default(node2) {
+ return node2.ownerDocument && node2.ownerDocument.defaultView || node2.document && node2 || node2.defaultView;
+}
+
+// node_modules/d3-selection/src/selection/style.js
+function styleRemove(name) {
+ return function() {
+ this.style.removeProperty(name);
+ };
+}
+function styleConstant(name, value, priority) {
+ return function() {
+ this.style.setProperty(name, value, priority);
+ };
+}
+function styleFunction(name, value, priority) {
+ return function() {
+ var v2 = value.apply(this, arguments);
+ if (v2 == null)
+ this.style.removeProperty(name);
+ else
+ this.style.setProperty(name, v2, priority);
+ };
+}
+function style_default(name, value, priority) {
+ return arguments.length > 1 ? this.each((value == null ? styleRemove : typeof value === "function" ? styleFunction : styleConstant)(name, value, priority == null ? "" : priority)) : styleValue(this.node(), name);
+}
+function styleValue(node2, name) {
+ return node2.style.getPropertyValue(name) || window_default(node2).getComputedStyle(node2, null).getPropertyValue(name);
+}
+
+// node_modules/d3-selection/src/selection/property.js
+function propertyRemove(name) {
+ return function() {
+ delete this[name];
+ };
+}
+function propertyConstant(name, value) {
+ return function() {
+ this[name] = value;
+ };
+}
+function propertyFunction(name, value) {
+ return function() {
+ var v2 = value.apply(this, arguments);
+ if (v2 == null)
+ delete this[name];
+ else
+ this[name] = v2;
+ };
+}
+function property_default(name, value) {
+ return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value === "function" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name];
+}
+
+// node_modules/d3-selection/src/selection/classed.js
+function classArray(string) {
+ return string.trim().split(/^|\s+/);
+}
+function classList(node2) {
+ return node2.classList || new ClassList(node2);
+}
+function ClassList(node2) {
+ this._node = node2;
+ this._names = classArray(node2.getAttribute("class") || "");
+}
+ClassList.prototype = {
+ add: function(name) {
+ var i = this._names.indexOf(name);
+ if (i < 0) {
+ this._names.push(name);
+ this._node.setAttribute("class", this._names.join(" "));
+ }
+ },
+ remove: function(name) {
+ var i = this._names.indexOf(name);
+ if (i >= 0) {
+ this._names.splice(i, 1);
+ this._node.setAttribute("class", this._names.join(" "));
+ }
+ },
+ contains: function(name) {
+ return this._names.indexOf(name) >= 0;
+ }
+};
+function classedAdd(node2, names) {
+ var list = classList(node2), i = -1, n = names.length;
+ while (++i < n)
+ list.add(names[i]);
+}
+function classedRemove(node2, names) {
+ var list = classList(node2), i = -1, n = names.length;
+ while (++i < n)
+ list.remove(names[i]);
+}
+function classedTrue(names) {
+ return function() {
+ classedAdd(this, names);
+ };
+}
+function classedFalse(names) {
+ return function() {
+ classedRemove(this, names);
+ };
+}
+function classedFunction(names, value) {
+ return function() {
+ (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);
+ };
+}
+function classed_default(name, value) {
+ var names = classArray(name + "");
+ if (arguments.length < 2) {
+ var list = classList(this.node()), i = -1, n = names.length;
+ while (++i < n)
+ if (!list.contains(names[i]))
+ return false;
+ return true;
+ }
+ return this.each((typeof value === "function" ? classedFunction : value ? classedTrue : classedFalse)(names, value));
+}
+
+// node_modules/d3-selection/src/selection/text.js
+function textRemove() {
+ this.textContent = "";
+}
+function textConstant(value) {
+ return function() {
+ this.textContent = value;
+ };
+}
+function textFunction(value) {
+ return function() {
+ var v2 = value.apply(this, arguments);
+ this.textContent = v2 == null ? "" : v2;
+ };
+}
+function text_default(value) {
+ return arguments.length ? this.each(value == null ? textRemove : (typeof value === "function" ? textFunction : textConstant)(value)) : this.node().textContent;
+}
+
+// node_modules/d3-selection/src/selection/html.js
+function htmlRemove() {
+ this.innerHTML = "";
+}
+function htmlConstant(value) {
+ return function() {
+ this.innerHTML = value;
+ };
+}
+function htmlFunction(value) {
+ return function() {
+ var v2 = value.apply(this, arguments);
+ this.innerHTML = v2 == null ? "" : v2;
+ };
+}
+function html_default(value) {
+ return arguments.length ? this.each(value == null ? htmlRemove : (typeof value === "function" ? htmlFunction : htmlConstant)(value)) : this.node().innerHTML;
+}
+
+// node_modules/d3-selection/src/selection/raise.js
+function raise() {
+ if (this.nextSibling)
+ this.parentNode.appendChild(this);
+}
+function raise_default() {
+ return this.each(raise);
+}
+
+// node_modules/d3-selection/src/selection/lower.js
+function lower() {
+ if (this.previousSibling)
+ this.parentNode.insertBefore(this, this.parentNode.firstChild);
+}
+function lower_default() {
+ return this.each(lower);
+}
+
+// node_modules/d3-selection/src/creator.js
+function creatorInherit(name) {
+ return function() {
+ var document2 = this.ownerDocument, uri = this.namespaceURI;
+ return uri === xhtml && document2.documentElement.namespaceURI === xhtml ? document2.createElement(name) : document2.createElementNS(uri, name);
+ };
+}
+function creatorFixed(fullname) {
+ return function() {
+ return this.ownerDocument.createElementNS(fullname.space, fullname.local);
+ };
+}
+function creator_default(name) {
+ var fullname = namespace_default(name);
+ return (fullname.local ? creatorFixed : creatorInherit)(fullname);
+}
+
+// node_modules/d3-selection/src/selection/append.js
+function append_default(name) {
+ var create3 = typeof name === "function" ? name : creator_default(name);
+ return this.select(function() {
+ return this.appendChild(create3.apply(this, arguments));
+ });
+}
+
+// node_modules/d3-selection/src/selection/insert.js
+function constantNull() {
+ return null;
+}
+function insert_default(name, before) {
+ var create3 = typeof name === "function" ? name : creator_default(name), select = before == null ? constantNull : typeof before === "function" ? before : selector_default(before);
+ return this.select(function() {
+ return this.insertBefore(create3.apply(this, arguments), select.apply(this, arguments) || null);
+ });
+}
+
+// node_modules/d3-selection/src/selection/remove.js
+function remove() {
+ var parent = this.parentNode;
+ if (parent)
+ parent.removeChild(this);
+}
+function remove_default() {
+ return this.each(remove);
+}
+
+// node_modules/d3-selection/src/selection/clone.js
+function selection_cloneShallow() {
+ var clone2 = this.cloneNode(false), parent = this.parentNode;
+ return parent ? parent.insertBefore(clone2, this.nextSibling) : clone2;
+}
+function selection_cloneDeep() {
+ var clone2 = this.cloneNode(true), parent = this.parentNode;
+ return parent ? parent.insertBefore(clone2, this.nextSibling) : clone2;
+}
+function clone_default(deep) {
+ return this.select(deep ? selection_cloneDeep : selection_cloneShallow);
+}
+
+// node_modules/d3-selection/src/selection/datum.js
+function datum_default(value) {
+ return arguments.length ? this.property("__data__", value) : this.node().__data__;
+}
+
+// node_modules/d3-selection/src/selection/on.js
+function contextListener(listener) {
+ return function(event) {
+ listener.call(this, event, this.__data__);
+ };
+}
+function parseTypenames(typenames) {
+ return typenames.trim().split(/^|\s+/).map(function(t) {
+ var name = "", i = t.indexOf(".");
+ if (i >= 0)
+ name = t.slice(i + 1), t = t.slice(0, i);
+ return { type: t, name };
+ });
+}
+function onRemove(typename) {
+ return function() {
+ var on = this.__on;
+ if (!on)
+ return;
+ for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {
+ if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {
+ this.removeEventListener(o.type, o.listener, o.options);
+ } else {
+ on[++i] = o;
+ }
+ }
+ if (++i)
+ on.length = i;
+ else
+ delete this.__on;
+ };
+}
+function onAdd(typename, value, options) {
+ return function() {
+ var on = this.__on, o, listener = contextListener(value);
+ if (on)
+ for (var j = 0, m = on.length; j < m; ++j) {
+ if ((o = on[j]).type === typename.type && o.name === typename.name) {
+ this.removeEventListener(o.type, o.listener, o.options);
+ this.addEventListener(o.type, o.listener = listener, o.options = options);
+ o.value = value;
+ return;
+ }
+ }
+ this.addEventListener(typename.type, listener, options);
+ o = { type: typename.type, name: typename.name, value, listener, options };
+ if (!on)
+ this.__on = [o];
+ else
+ on.push(o);
+ };
+}
+function on_default(typename, value, options) {
+ var typenames = parseTypenames(typename + ""), i, n = typenames.length, t;
+ if (arguments.length < 2) {
+ var on = this.node().__on;
+ if (on)
+ for (var j = 0, m = on.length, o; j < m; ++j) {
+ for (i = 0, o = on[j]; i < n; ++i) {
+ if ((t = typenames[i]).type === o.type && t.name === o.name) {
+ return o.value;
+ }
+ }
+ }
+ return;
+ }
+ on = value ? onAdd : onRemove;
+ for (i = 0; i < n; ++i)
+ this.each(on(typenames[i], value, options));
+ return this;
+}
+
+// node_modules/d3-selection/src/selection/dispatch.js
+function dispatchEvent(node2, type3, params) {
+ var window2 = window_default(node2), event = window2.CustomEvent;
+ if (typeof event === "function") {
+ event = new event(type3, params);
+ } else {
+ event = window2.document.createEvent("Event");
+ if (params)
+ event.initEvent(type3, params.bubbles, params.cancelable), event.detail = params.detail;
+ else
+ event.initEvent(type3, false, false);
+ }
+ node2.dispatchEvent(event);
+}
+function dispatchConstant(type3, params) {
+ return function() {
+ return dispatchEvent(this, type3, params);
+ };
+}
+function dispatchFunction(type3, params) {
+ return function() {
+ return dispatchEvent(this, type3, params.apply(this, arguments));
+ };
+}
+function dispatch_default(type3, params) {
+ return this.each((typeof params === "function" ? dispatchFunction : dispatchConstant)(type3, params));
+}
+
+// node_modules/d3-selection/src/selection/iterator.js
+function* iterator_default() {
+ for (var groups2 = this._groups, j = 0, m = groups2.length; j < m; ++j) {
+ for (var group2 = groups2[j], i = 0, n = group2.length, node2; i < n; ++i) {
+ if (node2 = group2[i])
+ yield node2;
+ }
+ }
+}
+
+// node_modules/d3-selection/src/selection/index.js
+var root = [null];
+function Selection(groups2, parents) {
+ this._groups = groups2;
+ this._parents = parents;
+}
+function selection() {
+ return new Selection([[document.documentElement]], root);
+}
+function selection_selection() {
+ return this;
+}
+Selection.prototype = selection.prototype = {
+ constructor: Selection,
+ select: select_default,
+ selectAll: selectAll_default,
+ selectChild: selectChild_default,
+ selectChildren: selectChildren_default,
+ filter: filter_default,
+ data: data_default,
+ enter: enter_default,
+ exit: exit_default,
+ join: join_default,
+ merge: merge_default,
+ selection: selection_selection,
+ order: order_default,
+ sort: sort_default,
+ call: call_default,
+ nodes: nodes_default,
+ node: node_default,
+ size: size_default,
+ empty: empty_default,
+ each: each_default,
+ attr: attr_default,
+ style: style_default,
+ property: property_default,
+ classed: classed_default,
+ text: text_default,
+ html: html_default,
+ raise: raise_default,
+ lower: lower_default,
+ append: append_default,
+ insert: insert_default,
+ remove: remove_default,
+ clone: clone_default,
+ datum: datum_default,
+ on: on_default,
+ dispatch: dispatch_default,
+ [Symbol.iterator]: iterator_default
+};
+var selection_default = selection;
+
+// node_modules/d3-selection/src/select.js
+function select_default2(selector) {
+ return typeof selector === "string" ? new Selection([[document.querySelector(selector)]], [document.documentElement]) : new Selection([[selector]], root);
+}
+
+// node_modules/d3-selection/src/selectAll.js
+function selectAll_default2(selector) {
+ return typeof selector === "string" ? new Selection([document.querySelectorAll(selector)], [document.documentElement]) : new Selection([array2(selector)], root);
+}
+
+// node_modules/d3-selection/src/local.js
+var nextId = 0;
+function local() {
+ return new Local();
+}
+function Local() {
+ this._ = "@" + (++nextId).toString(36);
+}
+Local.prototype = local.prototype = {
+ constructor: Local,
+ get: function(node2) {
+ var id3 = this._;
+ while (!(id3 in node2))
+ if (!(node2 = node2.parentNode))
+ return;
+ return node2[id3];
+ },
+ set: function(node2, value) {
+ return node2[this._] = value;
+ },
+ remove: function(node2) {
+ return this._ in node2 && delete node2[this._];
+ },
+ toString: function() {
+ return this._;
+ }
+};
+
+// node_modules/d3-color/src/define.js
+function define_default(constructor, factory, prototype) {
+ constructor.prototype = factory.prototype = prototype;
+ prototype.constructor = constructor;
+}
+function extend(parent, definition) {
+ var prototype = Object.create(parent.prototype);
+ for (var key in definition)
+ prototype[key] = definition[key];
+ return prototype;
+}
+
+// node_modules/d3-color/src/color.js
+function Color() {
+}
+var darker = 0.7;
+var brighter = 1 / darker;
+var reI = "\\s*([+-]?\\d+)\\s*";
+var reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*";
+var reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*";
+var reHex = /^#([0-9a-f]{3,8})$/;
+var reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`);
+var reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`);
+var reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`);
+var reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`);
+var reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`);
+var reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
+var named = {
+ aliceblue: 15792383,
+ antiquewhite: 16444375,
+ aqua: 65535,
+ aquamarine: 8388564,
+ azure: 15794175,
+ beige: 16119260,
+ bisque: 16770244,
+ black: 0,
+ blanchedalmond: 16772045,
+ blue: 255,
+ blueviolet: 9055202,
+ brown: 10824234,
+ burlywood: 14596231,
+ cadetblue: 6266528,
+ chartreuse: 8388352,
+ chocolate: 13789470,
+ coral: 16744272,
+ cornflowerblue: 6591981,
+ cornsilk: 16775388,
+ crimson: 14423100,
+ cyan: 65535,
+ darkblue: 139,
+ darkcyan: 35723,
+ darkgoldenrod: 12092939,
+ darkgray: 11119017,
+ darkgreen: 25600,
+ darkgrey: 11119017,
+ darkkhaki: 12433259,
+ darkmagenta: 9109643,
+ darkolivegreen: 5597999,
+ darkorange: 16747520,
+ darkorchid: 10040012,
+ darkred: 9109504,
+ darksalmon: 15308410,
+ darkseagreen: 9419919,
+ darkslateblue: 4734347,
+ darkslategray: 3100495,
+ darkslategrey: 3100495,
+ darkturquoise: 52945,
+ darkviolet: 9699539,
+ deeppink: 16716947,
+ deepskyblue: 49151,
+ dimgray: 6908265,
+ dimgrey: 6908265,
+ dodgerblue: 2003199,
+ firebrick: 11674146,
+ floralwhite: 16775920,
+ forestgreen: 2263842,
+ fuchsia: 16711935,
+ gainsboro: 14474460,
+ ghostwhite: 16316671,
+ gold: 16766720,
+ goldenrod: 14329120,
+ gray: 8421504,
+ green: 32768,
+ greenyellow: 11403055,
+ grey: 8421504,
+ honeydew: 15794160,
+ hotpink: 16738740,
+ indianred: 13458524,
+ indigo: 4915330,
+ ivory: 16777200,
+ khaki: 15787660,
+ lavender: 15132410,
+ lavenderblush: 16773365,
+ lawngreen: 8190976,
+ lemonchiffon: 16775885,
+ lightblue: 11393254,
+ lightcoral: 15761536,
+ lightcyan: 14745599,
+ lightgoldenrodyellow: 16448210,
+ lightgray: 13882323,
+ lightgreen: 9498256,
+ lightgrey: 13882323,
+ lightpink: 16758465,
+ lightsalmon: 16752762,
+ lightseagreen: 2142890,
+ lightskyblue: 8900346,
+ lightslategray: 7833753,
+ lightslategrey: 7833753,
+ lightsteelblue: 11584734,
+ lightyellow: 16777184,
+ lime: 65280,
+ limegreen: 3329330,
+ linen: 16445670,
+ magenta: 16711935,
+ maroon: 8388608,
+ mediumaquamarine: 6737322,
+ mediumblue: 205,
+ mediumorchid: 12211667,
+ mediumpurple: 9662683,
+ mediumseagreen: 3978097,
+ mediumslateblue: 8087790,
+ mediumspringgreen: 64154,
+ mediumturquoise: 4772300,
+ mediumvioletred: 13047173,
+ midnightblue: 1644912,
+ mintcream: 16121850,
+ mistyrose: 16770273,
+ moccasin: 16770229,
+ navajowhite: 16768685,
+ navy: 128,
+ oldlace: 16643558,
+ olive: 8421376,
+ olivedrab: 7048739,
+ orange: 16753920,
+ orangered: 16729344,
+ orchid: 14315734,
+ palegoldenrod: 15657130,
+ palegreen: 10025880,
+ paleturquoise: 11529966,
+ palevioletred: 14381203,
+ papayawhip: 16773077,
+ peachpuff: 16767673,
+ peru: 13468991,
+ pink: 16761035,
+ plum: 14524637,
+ powderblue: 11591910,
+ purple: 8388736,
+ rebeccapurple: 6697881,
+ red: 16711680,
+ rosybrown: 12357519,
+ royalblue: 4286945,
+ saddlebrown: 9127187,
+ salmon: 16416882,
+ sandybrown: 16032864,
+ seagreen: 3050327,
+ seashell: 16774638,
+ sienna: 10506797,
+ silver: 12632256,
+ skyblue: 8900331,
+ slateblue: 6970061,
+ slategray: 7372944,
+ slategrey: 7372944,
+ snow: 16775930,
+ springgreen: 65407,
+ steelblue: 4620980,
+ tan: 13808780,
+ teal: 32896,
+ thistle: 14204888,
+ tomato: 16737095,
+ turquoise: 4251856,
+ violet: 15631086,
+ wheat: 16113331,
+ white: 16777215,
+ whitesmoke: 16119285,
+ yellow: 16776960,
+ yellowgreen: 10145074
+};
+define_default(Color, color, {
+ copy(channels2) {
+ return Object.assign(new this.constructor(), this, channels2);
+ },
+ displayable() {
+ return this.rgb().displayable();
+ },
+ hex: color_formatHex,
+ // Deprecated! Use color.formatHex.
+ formatHex: color_formatHex,
+ formatHex8: color_formatHex8,
+ formatHsl: color_formatHsl,
+ formatRgb: color_formatRgb,
+ toString: color_formatRgb
+});
+function color_formatHex() {
+ return this.rgb().formatHex();
+}
+function color_formatHex8() {
+ return this.rgb().formatHex8();
+}
+function color_formatHsl() {
+ return hslConvert(this).formatHsl();
+}
+function color_formatRgb() {
+ return this.rgb().formatRgb();
+}
+function color(format3) {
+ var m, l;
+ format3 = (format3 + "").trim().toLowerCase();
+ return (m = reHex.exec(format3)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) : l === 3 ? new Rgb(m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, (m & 15) << 4 | m & 15, 1) : l === 8 ? rgba(m >> 24 & 255, m >> 16 & 255, m >> 8 & 255, (m & 255) / 255) : l === 4 ? rgba(m >> 12 & 15 | m >> 8 & 240, m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, ((m & 15) << 4 | m & 15) / 255) : null) : (m = reRgbInteger.exec(format3)) ? new Rgb(m[1], m[2], m[3], 1) : (m = reRgbPercent.exec(format3)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) : (m = reRgbaInteger.exec(format3)) ? rgba(m[1], m[2], m[3], m[4]) : (m = reRgbaPercent.exec(format3)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) : (m = reHslPercent.exec(format3)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) : (m = reHslaPercent.exec(format3)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) : named.hasOwnProperty(format3) ? rgbn(named[format3]) : format3 === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null;
+}
+function rgbn(n) {
+ return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1);
+}
+function rgba(r, g, b, a2) {
+ if (a2 <= 0)
+ r = g = b = NaN;
+ return new Rgb(r, g, b, a2);
+}
+function rgbConvert(o) {
+ if (!(o instanceof Color))
+ o = color(o);
+ if (!o)
+ return new Rgb();
+ o = o.rgb();
+ return new Rgb(o.r, o.g, o.b, o.opacity);
+}
+function rgb(r, g, b, opacity) {
+ return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
+}
+function Rgb(r, g, b, opacity) {
+ this.r = +r;
+ this.g = +g;
+ this.b = +b;
+ this.opacity = +opacity;
+}
+define_default(Rgb, rgb, extend(Color, {
+ brighter(k2) {
+ k2 = k2 == null ? brighter : Math.pow(brighter, k2);
+ return new Rgb(this.r * k2, this.g * k2, this.b * k2, this.opacity);
+ },
+ darker(k2) {
+ k2 = k2 == null ? darker : Math.pow(darker, k2);
+ return new Rgb(this.r * k2, this.g * k2, this.b * k2, this.opacity);
+ },
+ rgb() {
+ return this;
+ },
+ clamp() {
+ return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
+ },
+ displayable() {
+ return -0.5 <= this.r && this.r < 255.5 && (-0.5 <= this.g && this.g < 255.5) && (-0.5 <= this.b && this.b < 255.5) && (0 <= this.opacity && this.opacity <= 1);
+ },
+ hex: rgb_formatHex,
+ // Deprecated! Use color.formatHex.
+ formatHex: rgb_formatHex,
+ formatHex8: rgb_formatHex8,
+ formatRgb: rgb_formatRgb,
+ toString: rgb_formatRgb
+}));
+function rgb_formatHex() {
+ return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
+}
+function rgb_formatHex8() {
+ return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
+}
+function rgb_formatRgb() {
+ const a2 = clampa(this.opacity);
+ return `${a2 === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a2 === 1 ? ")" : `, ${a2})`}`;
+}
+function clampa(opacity) {
+ return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
+}
+function clampi(value) {
+ return Math.max(0, Math.min(255, Math.round(value) || 0));
+}
+function hex(value) {
+ value = clampi(value);
+ return (value < 16 ? "0" : "") + value.toString(16);
+}
+function hsla(h, s2, l, a2) {
+ if (a2 <= 0)
+ h = s2 = l = NaN;
+ else if (l <= 0 || l >= 1)
+ h = s2 = NaN;
+ else if (s2 <= 0)
+ h = NaN;
+ return new Hsl(h, s2, l, a2);
+}
+function hslConvert(o) {
+ if (o instanceof Hsl)
+ return new Hsl(o.h, o.s, o.l, o.opacity);
+ if (!(o instanceof Color))
+ o = color(o);
+ if (!o)
+ return new Hsl();
+ if (o instanceof Hsl)
+ return o;
+ o = o.rgb();
+ var r = o.r / 255, g = o.g / 255, b = o.b / 255, min4 = Math.min(r, g, b), max5 = Math.max(r, g, b), h = NaN, s2 = max5 - min4, l = (max5 + min4) / 2;
+ if (s2) {
+ if (r === max5)
+ h = (g - b) / s2 + (g < b) * 6;
+ else if (g === max5)
+ h = (b - r) / s2 + 2;
+ else
+ h = (r - g) / s2 + 4;
+ s2 /= l < 0.5 ? max5 + min4 : 2 - max5 - min4;
+ h *= 60;
+ } else {
+ s2 = l > 0 && l < 1 ? 0 : h;
+ }
+ return new Hsl(h, s2, l, o.opacity);
+}
+function hsl(h, s2, l, opacity) {
+ return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s2, l, opacity == null ? 1 : opacity);
+}
+function Hsl(h, s2, l, opacity) {
+ this.h = +h;
+ this.s = +s2;
+ this.l = +l;
+ this.opacity = +opacity;
+}
+define_default(Hsl, hsl, extend(Color, {
+ brighter(k2) {
+ k2 = k2 == null ? brighter : Math.pow(brighter, k2);
+ return new Hsl(this.h, this.s, this.l * k2, this.opacity);
+ },
+ darker(k2) {
+ k2 = k2 == null ? darker : Math.pow(darker, k2);
+ return new Hsl(this.h, this.s, this.l * k2, this.opacity);
+ },
+ rgb() {
+ var h = this.h % 360 + (this.h < 0) * 360, s2 = isNaN(h) || isNaN(this.s) ? 0 : this.s, l = this.l, m2 = l + (l < 0.5 ? l : 1 - l) * s2, m1 = 2 * l - m2;
+ return new Rgb(
+ hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
+ hsl2rgb(h, m1, m2),
+ hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
+ this.opacity
+ );
+ },
+ clamp() {
+ return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
+ },
+ displayable() {
+ return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && (0 <= this.l && this.l <= 1) && (0 <= this.opacity && this.opacity <= 1);
+ },
+ formatHsl() {
+ const a2 = clampa(this.opacity);
+ return `${a2 === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a2 === 1 ? ")" : `, ${a2})`}`;
+ }
+}));
+function clamph(value) {
+ value = (value || 0) % 360;
+ return value < 0 ? value + 360 : value;
+}
+function clampt(value) {
+ return Math.max(0, Math.min(1, value || 0));
+}
+function hsl2rgb(h, m1, m2) {
+ return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
+}
+
+// node_modules/d3-color/src/math.js
+var radians = Math.PI / 180;
+var degrees = 180 / Math.PI;
+
+// node_modules/d3-color/src/lab.js
+var K = 18;
+var Xn = 0.96422;
+var Yn = 1;
+var Zn = 0.82521;
+var t0 = 4 / 29;
+var t1 = 6 / 29;
+var t2 = 3 * t1 * t1;
+var t3 = t1 * t1 * t1;
+function labConvert(o) {
+ if (o instanceof Lab)
+ return new Lab(o.l, o.a, o.b, o.opacity);
+ if (o instanceof Hcl)
+ return hcl2lab(o);
+ if (!(o instanceof Rgb))
+ o = rgbConvert(o);
+ var r = rgb2lrgb(o.r), g = rgb2lrgb(o.g), b = rgb2lrgb(o.b), y3 = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x3, z;
+ if (r === g && g === b)
+ x3 = z = y3;
+ else {
+ x3 = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);
+ z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);
+ }
+ return new Lab(116 * y3 - 16, 500 * (x3 - y3), 200 * (y3 - z), o.opacity);
+}
+function lab(l, a2, b, opacity) {
+ return arguments.length === 1 ? labConvert(l) : new Lab(l, a2, b, opacity == null ? 1 : opacity);
+}
+function Lab(l, a2, b, opacity) {
+ this.l = +l;
+ this.a = +a2;
+ this.b = +b;
+ this.opacity = +opacity;
+}
+define_default(Lab, lab, extend(Color, {
+ brighter(k2) {
+ return new Lab(this.l + K * (k2 == null ? 1 : k2), this.a, this.b, this.opacity);
+ },
+ darker(k2) {
+ return new Lab(this.l - K * (k2 == null ? 1 : k2), this.a, this.b, this.opacity);
+ },
+ rgb() {
+ var y3 = (this.l + 16) / 116, x3 = isNaN(this.a) ? y3 : y3 + this.a / 500, z = isNaN(this.b) ? y3 : y3 - this.b / 200;
+ x3 = Xn * lab2xyz(x3);
+ y3 = Yn * lab2xyz(y3);
+ z = Zn * lab2xyz(z);
+ return new Rgb(
+ lrgb2rgb(3.1338561 * x3 - 1.6168667 * y3 - 0.4906146 * z),
+ lrgb2rgb(-0.9787684 * x3 + 1.9161415 * y3 + 0.033454 * z),
+ lrgb2rgb(0.0719453 * x3 - 0.2289914 * y3 + 1.4052427 * z),
+ this.opacity
+ );
+ }
+}));
+function xyz2lab(t) {
+ return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;
+}
+function lab2xyz(t) {
+ return t > t1 ? t * t * t : t2 * (t - t0);
+}
+function lrgb2rgb(x3) {
+ return 255 * (x3 <= 31308e-7 ? 12.92 * x3 : 1.055 * Math.pow(x3, 1 / 2.4) - 0.055);
+}
+function rgb2lrgb(x3) {
+ return (x3 /= 255) <= 0.04045 ? x3 / 12.92 : Math.pow((x3 + 0.055) / 1.055, 2.4);
+}
+function hclConvert(o) {
+ if (o instanceof Hcl)
+ return new Hcl(o.h, o.c, o.l, o.opacity);
+ if (!(o instanceof Lab))
+ o = labConvert(o);
+ if (o.a === 0 && o.b === 0)
+ return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);
+ var h = Math.atan2(o.b, o.a) * degrees;
+ return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
+}
+function hcl(h, c3, l, opacity) {
+ return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c3, l, opacity == null ? 1 : opacity);
+}
+function Hcl(h, c3, l, opacity) {
+ this.h = +h;
+ this.c = +c3;
+ this.l = +l;
+ this.opacity = +opacity;
+}
+function hcl2lab(o) {
+ if (isNaN(o.h))
+ return new Lab(o.l, 0, 0, o.opacity);
+ var h = o.h * radians;
+ return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);
+}
+define_default(Hcl, hcl, extend(Color, {
+ brighter(k2) {
+ return new Hcl(this.h, this.c, this.l + K * (k2 == null ? 1 : k2), this.opacity);
+ },
+ darker(k2) {
+ return new Hcl(this.h, this.c, this.l - K * (k2 == null ? 1 : k2), this.opacity);
+ },
+ rgb() {
+ return hcl2lab(this).rgb();
+ }
+}));
+
+// node_modules/d3-color/src/cubehelix.js
+var A = -0.14861;
+var B = 1.78277;
+var C = -0.29227;
+var D = -0.90649;
+var E = 1.97294;
+var ED = E * D;
+var EB = E * B;
+var BC_DA = B * C - D * A;
+function cubehelixConvert(o) {
+ if (o instanceof Cubehelix)
+ return new Cubehelix(o.h, o.s, o.l, o.opacity);
+ if (!(o instanceof Rgb))
+ o = rgbConvert(o);
+ var r = o.r / 255, g = o.g / 255, b = o.b / 255, l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB), bl = b - l, k2 = (E * (g - l) - C * bl) / D, s2 = Math.sqrt(k2 * k2 + bl * bl) / (E * l * (1 - l)), h = s2 ? Math.atan2(k2, bl) * degrees - 120 : NaN;
+ return new Cubehelix(h < 0 ? h + 360 : h, s2, l, o.opacity);
+}
+function cubehelix(h, s2, l, opacity) {
+ return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s2, l, opacity == null ? 1 : opacity);
+}
+function Cubehelix(h, s2, l, opacity) {
+ this.h = +h;
+ this.s = +s2;
+ this.l = +l;
+ this.opacity = +opacity;
+}
+define_default(Cubehelix, cubehelix, extend(Color, {
+ brighter(k2) {
+ k2 = k2 == null ? brighter : Math.pow(brighter, k2);
+ return new Cubehelix(this.h, this.s, this.l * k2, this.opacity);
+ },
+ darker(k2) {
+ k2 = k2 == null ? darker : Math.pow(darker, k2);
+ return new Cubehelix(this.h, this.s, this.l * k2, this.opacity);
+ },
+ rgb() {
+ var h = isNaN(this.h) ? 0 : (this.h + 120) * radians, l = +this.l, a2 = isNaN(this.s) ? 0 : this.s * l * (1 - l), cosh2 = Math.cos(h), sinh2 = Math.sin(h);
+ return new Rgb(
+ 255 * (l + a2 * (A * cosh2 + B * sinh2)),
+ 255 * (l + a2 * (C * cosh2 + D * sinh2)),
+ 255 * (l + a2 * (E * cosh2)),
+ this.opacity
+ );
+ }
+}));
+
+// node_modules/d3-interpolate/src/constant.js
+var constant_default2 = (x3) => () => x3;
+
+// node_modules/d3-interpolate/src/color.js
+function linear(a2, d) {
+ return function(t) {
+ return a2 + t * d;
+ };
+}
+function exponential(a2, b, y3) {
+ return a2 = Math.pow(a2, y3), b = Math.pow(b, y3) - a2, y3 = 1 / y3, function(t) {
+ return Math.pow(a2 + t * b, y3);
+ };
+}
+function hue(a2, b) {
+ var d = b - a2;
+ return d ? linear(a2, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant_default2(isNaN(a2) ? b : a2);
+}
+function gamma(y3) {
+ return (y3 = +y3) === 1 ? nogamma : function(a2, b) {
+ return b - a2 ? exponential(a2, b, y3) : constant_default2(isNaN(a2) ? b : a2);
+ };
+}
+function nogamma(a2, b) {
+ var d = b - a2;
+ return d ? linear(a2, d) : constant_default2(isNaN(a2) ? b : a2);
+}
+
+// node_modules/d3-interpolate/src/hcl.js
+function hcl2(hue2) {
+ return function(start2, end) {
+ var h = hue2((start2 = hcl(start2)).h, (end = hcl(end)).h), c3 = nogamma(start2.c, end.c), l = nogamma(start2.l, end.l), opacity = nogamma(start2.opacity, end.opacity);
+ return function(t) {
+ start2.h = h(t);
+ start2.c = c3(t);
+ start2.l = l(t);
+ start2.opacity = opacity(t);
+ return start2 + "";
+ };
+ };
+}
+var hcl_default = hcl2(hue);
+var hclLong = hcl2(nogamma);
+
+// node_modules/d3-interpolate/src/basis.js
+function basis(t13, v0, v1, v2, v3) {
+ var t22 = t13 * t13, t32 = t22 * t13;
+ return ((1 - 3 * t13 + 3 * t22 - t32) * v0 + (4 - 6 * t22 + 3 * t32) * v1 + (1 + 3 * t13 + 3 * t22 - 3 * t32) * v2 + t32 * v3) / 6;
+}
+function basis_default(values) {
+ var n = values.length - 1;
+ return function(t) {
+ var i = t <= 0 ? t = 0 : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), v1 = values[i], v2 = values[i + 1], v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;
+ return basis((t - i / n) * n, v0, v1, v2, v3);
+ };
+}
+
+// node_modules/d3-interpolate/src/basisClosed.js
+function basisClosed_default(values) {
+ var n = values.length;
+ return function(t) {
+ var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), v0 = values[(i + n - 1) % n], v1 = values[i % n], v2 = values[(i + 1) % n], v3 = values[(i + 2) % n];
+ return basis((t - i / n) * n, v0, v1, v2, v3);
+ };
+}
+
+// node_modules/d3-interpolate/src/rgb.js
+var rgb_default = function rgbGamma(y3) {
+ var color2 = gamma(y3);
+ function rgb2(start2, end) {
+ var r = color2((start2 = rgb(start2)).r, (end = rgb(end)).r), g = color2(start2.g, end.g), b = color2(start2.b, end.b), opacity = nogamma(start2.opacity, end.opacity);
+ return function(t) {
+ start2.r = r(t);
+ start2.g = g(t);
+ start2.b = b(t);
+ start2.opacity = opacity(t);
+ return start2 + "";
+ };
+ }
+ rgb2.gamma = rgbGamma;
+ return rgb2;
+}(1);
+function rgbSpline(spline) {
+ return function(colors) {
+ var n = colors.length, r = new Array(n), g = new Array(n), b = new Array(n), i, color2;
+ for (i = 0; i < n; ++i) {
+ color2 = rgb(colors[i]);
+ r[i] = color2.r || 0;
+ g[i] = color2.g || 0;
+ b[i] = color2.b || 0;
+ }
+ r = spline(r);
+ g = spline(g);
+ b = spline(b);
+ color2.opacity = 1;
+ return function(t) {
+ color2.r = r(t);
+ color2.g = g(t);
+ color2.b = b(t);
+ return color2 + "";
+ };
+ };
+}
+var rgbBasis = rgbSpline(basis_default);
+var rgbBasisClosed = rgbSpline(basisClosed_default);
+
+// node_modules/d3-interpolate/src/numberArray.js
+function numberArray_default(a2, b) {
+ if (!b)
+ b = [];
+ var n = a2 ? Math.min(b.length, a2.length) : 0, c3 = b.slice(), i;
+ return function(t) {
+ for (i = 0; i < n; ++i)
+ c3[i] = a2[i] * (1 - t) + b[i] * t;
+ return c3;
+ };
+}
+function isNumberArray(x3) {
+ return ArrayBuffer.isView(x3) && !(x3 instanceof DataView);
+}
+
+// node_modules/d3-interpolate/src/array.js
+function genericArray(a2, b) {
+ var nb = b ? b.length : 0, na = a2 ? Math.min(nb, a2.length) : 0, x3 = new Array(na), c3 = new Array(nb), i;
+ for (i = 0; i < na; ++i)
+ x3[i] = value_default(a2[i], b[i]);
+ for (; i < nb; ++i)
+ c3[i] = b[i];
+ return function(t) {
+ for (i = 0; i < na; ++i)
+ c3[i] = x3[i](t);
+ return c3;
+ };
+}
+
+// node_modules/d3-interpolate/src/date.js
+function date_default(a2, b) {
+ var d = /* @__PURE__ */ new Date();
+ return a2 = +a2, b = +b, function(t) {
+ return d.setTime(a2 * (1 - t) + b * t), d;
+ };
+}
+
+// node_modules/d3-interpolate/src/number.js
+function number_default(a2, b) {
+ return a2 = +a2, b = +b, function(t) {
+ return a2 * (1 - t) + b * t;
+ };
+}
+
+// node_modules/d3-interpolate/src/object.js
+function object_default(a2, b) {
+ var i = {}, c3 = {}, k2;
+ if (a2 === null || typeof a2 !== "object")
+ a2 = {};
+ if (b === null || typeof b !== "object")
+ b = {};
+ for (k2 in b) {
+ if (k2 in a2) {
+ i[k2] = value_default(a2[k2], b[k2]);
+ } else {
+ c3[k2] = b[k2];
+ }
+ }
+ return function(t) {
+ for (k2 in i)
+ c3[k2] = i[k2](t);
+ return c3;
+ };
+}
+
+// node_modules/d3-interpolate/src/string.js
+var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;
+var reB = new RegExp(reA.source, "g");
+function zero2(b) {
+ return function() {
+ return b;
+ };
+}
+function one(b) {
+ return function(t) {
+ return b(t) + "";
+ };
+}
+function string_default(a2, b) {
+ var bi = reA.lastIndex = reB.lastIndex = 0, am, bm, bs, i = -1, s2 = [], q = [];
+ a2 = a2 + "", b = b + "";
+ while ((am = reA.exec(a2)) && (bm = reB.exec(b))) {
+ if ((bs = bm.index) > bi) {
+ bs = b.slice(bi, bs);
+ if (s2[i])
+ s2[i] += bs;
+ else
+ s2[++i] = bs;
+ }
+ if ((am = am[0]) === (bm = bm[0])) {
+ if (s2[i])
+ s2[i] += bm;
+ else
+ s2[++i] = bm;
+ } else {
+ s2[++i] = null;
+ q.push({ i, x: number_default(am, bm) });
+ }
+ bi = reB.lastIndex;
+ }
+ if (bi < b.length) {
+ bs = b.slice(bi);
+ if (s2[i])
+ s2[i] += bs;
+ else
+ s2[++i] = bs;
+ }
+ return s2.length < 2 ? q[0] ? one(q[0].x) : zero2(b) : (b = q.length, function(t) {
+ for (var i2 = 0, o; i2 < b; ++i2)
+ s2[(o = q[i2]).i] = o.x(t);
+ return s2.join("");
+ });
+}
+
+// node_modules/d3-interpolate/src/value.js
+function value_default(a2, b) {
+ var t = typeof b, c3;
+ return b == null || t === "boolean" ? constant_default2(b) : (t === "number" ? number_default : t === "string" ? (c3 = color(b)) ? (b = c3, rgb_default) : string_default : b instanceof color ? rgb_default : b instanceof Date ? date_default : isNumberArray(b) ? numberArray_default : Array.isArray(b) ? genericArray : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object_default : number_default)(a2, b);
+}
+
+// node_modules/d3-interpolate/src/round.js
+function round_default(a2, b) {
+ return a2 = +a2, b = +b, function(t) {
+ return Math.round(a2 * (1 - t) + b * t);
+ };
+}
+
+// node_modules/d3-interpolate/src/transform/decompose.js
+var degrees2 = 180 / Math.PI;
+var identity2 = {
+ translateX: 0,
+ translateY: 0,
+ rotate: 0,
+ skewX: 0,
+ scaleX: 1,
+ scaleY: 1
+};
+function decompose_default(a2, b, c3, d, e, f) {
+ var scaleX, scaleY, skewX;
+ if (scaleX = Math.sqrt(a2 * a2 + b * b))
+ a2 /= scaleX, b /= scaleX;
+ if (skewX = a2 * c3 + b * d)
+ c3 -= a2 * skewX, d -= b * skewX;
+ if (scaleY = Math.sqrt(c3 * c3 + d * d))
+ c3 /= scaleY, d /= scaleY, skewX /= scaleY;
+ if (a2 * d < b * c3)
+ a2 = -a2, b = -b, skewX = -skewX, scaleX = -scaleX;
+ return {
+ translateX: e,
+ translateY: f,
+ rotate: Math.atan2(b, a2) * degrees2,
+ skewX: Math.atan(skewX) * degrees2,
+ scaleX,
+ scaleY
+ };
+}
+
+// node_modules/d3-interpolate/src/transform/parse.js
+var svgNode;
+function parseCss(value) {
+ const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
+ return m.isIdentity ? identity2 : decompose_default(m.a, m.b, m.c, m.d, m.e, m.f);
+}
+function parseSvg(value) {
+ if (value == null)
+ return identity2;
+ if (!svgNode)
+ svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
+ svgNode.setAttribute("transform", value);
+ if (!(value = svgNode.transform.baseVal.consolidate()))
+ return identity2;
+ value = value.matrix;
+ return decompose_default(value.a, value.b, value.c, value.d, value.e, value.f);
+}
+
+// node_modules/d3-interpolate/src/transform/index.js
+function interpolateTransform(parse3, pxComma, pxParen, degParen) {
+ function pop(s2) {
+ return s2.length ? s2.pop() + " " : "";
+ }
+ function translate(xa, ya, xb, yb, s2, q) {
+ if (xa !== xb || ya !== yb) {
+ var i = s2.push("translate(", null, pxComma, null, pxParen);
+ q.push({ i: i - 4, x: number_default(xa, xb) }, { i: i - 2, x: number_default(ya, yb) });
+ } else if (xb || yb) {
+ s2.push("translate(" + xb + pxComma + yb + pxParen);
+ }
+ }
+ function rotate(a2, b, s2, q) {
+ if (a2 !== b) {
+ if (a2 - b > 180)
+ b += 360;
+ else if (b - a2 > 180)
+ a2 += 360;
+ q.push({ i: s2.push(pop(s2) + "rotate(", null, degParen) - 2, x: number_default(a2, b) });
+ } else if (b) {
+ s2.push(pop(s2) + "rotate(" + b + degParen);
+ }
+ }
+ function skewX(a2, b, s2, q) {
+ if (a2 !== b) {
+ q.push({ i: s2.push(pop(s2) + "skewX(", null, degParen) - 2, x: number_default(a2, b) });
+ } else if (b) {
+ s2.push(pop(s2) + "skewX(" + b + degParen);
+ }
+ }
+ function scale2(xa, ya, xb, yb, s2, q) {
+ if (xa !== xb || ya !== yb) {
+ var i = s2.push(pop(s2) + "scale(", null, ",", null, ")");
+ q.push({ i: i - 4, x: number_default(xa, xb) }, { i: i - 2, x: number_default(ya, yb) });
+ } else if (xb !== 1 || yb !== 1) {
+ s2.push(pop(s2) + "scale(" + xb + "," + yb + ")");
+ }
+ }
+ return function(a2, b) {
+ var s2 = [], q = [];
+ a2 = parse3(a2), b = parse3(b);
+ translate(a2.translateX, a2.translateY, b.translateX, b.translateY, s2, q);
+ rotate(a2.rotate, b.rotate, s2, q);
+ skewX(a2.skewX, b.skewX, s2, q);
+ scale2(a2.scaleX, a2.scaleY, b.scaleX, b.scaleY, s2, q);
+ a2 = b = null;
+ return function(t) {
+ var i = -1, n = q.length, o;
+ while (++i < n)
+ s2[(o = q[i]).i] = o.x(t);
+ return s2.join("");
+ };
+ };
+}
+var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)");
+var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")");
+
+// node_modules/d3-interpolate/src/zoom.js
+var epsilon2 = 1e-12;
+function cosh(x3) {
+ return ((x3 = Math.exp(x3)) + 1 / x3) / 2;
+}
+function sinh(x3) {
+ return ((x3 = Math.exp(x3)) - 1 / x3) / 2;
+}
+function tanh(x3) {
+ return ((x3 = Math.exp(2 * x3)) - 1) / (x3 + 1);
+}
+var zoom_default = function zoomRho(rho, rho2, rho4) {
+ function zoom(p0, p1) {
+ var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2], dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, i, S;
+ if (d2 < epsilon2) {
+ S = Math.log(w1 / w0) / rho;
+ i = function(t) {
+ return [
+ ux0 + t * dx,
+ uy0 + t * dy,
+ w0 * Math.exp(rho * t * S)
+ ];
+ };
+ } else {
+ var d1 = Math.sqrt(d2), b02 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), b12 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), r0 = Math.log(Math.sqrt(b02 * b02 + 1) - b02), r1 = Math.log(Math.sqrt(b12 * b12 + 1) - b12);
+ S = (r1 - r0) / rho;
+ i = function(t) {
+ var s2 = t * S, coshr0 = cosh(r0), u4 = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s2 + r0) - sinh(r0));
+ return [
+ ux0 + u4 * dx,
+ uy0 + u4 * dy,
+ w0 * coshr0 / cosh(rho * s2 + r0)
+ ];
+ };
+ }
+ i.duration = S * 1e3 * rho / Math.SQRT2;
+ return i;
+ }
+ zoom.rho = function(_) {
+ var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;
+ return zoomRho(_1, _2, _4);
+ };
+ return zoom;
+}(Math.SQRT2, 2, 4);
+
+// node_modules/d3-interpolate/src/hsl.js
+function hsl2(hue2) {
+ return function(start2, end) {
+ var h = hue2((start2 = hsl(start2)).h, (end = hsl(end)).h), s2 = nogamma(start2.s, end.s), l = nogamma(start2.l, end.l), opacity = nogamma(start2.opacity, end.opacity);
+ return function(t) {
+ start2.h = h(t);
+ start2.s = s2(t);
+ start2.l = l(t);
+ start2.opacity = opacity(t);
+ return start2 + "";
+ };
+ };
+}
+var hsl_default = hsl2(hue);
+var hslLong = hsl2(nogamma);
+
+// node_modules/d3-interpolate/src/cubehelix.js
+function cubehelix2(hue2) {
+ return function cubehelixGamma(y3) {
+ y3 = +y3;
+ function cubehelix3(start2, end) {
+ var h = hue2((start2 = cubehelix(start2)).h, (end = cubehelix(end)).h), s2 = nogamma(start2.s, end.s), l = nogamma(start2.l, end.l), opacity = nogamma(start2.opacity, end.opacity);
+ return function(t) {
+ start2.h = h(t);
+ start2.s = s2(t);
+ start2.l = l(Math.pow(t, y3));
+ start2.opacity = opacity(t);
+ return start2 + "";
+ };
+ }
+ cubehelix3.gamma = cubehelixGamma;
+ return cubehelix3;
+ }(1);
+}
+var cubehelix_default = cubehelix2(hue);
+var cubehelixLong = cubehelix2(nogamma);
+
+// node_modules/d3-scale/src/init.js
+function initRange(domain, range2) {
+ switch (arguments.length) {
+ case 0:
+ break;
+ case 1:
+ this.range(domain);
+ break;
+ default:
+ this.range(range2).domain(domain);
+ break;
+ }
+ return this;
+}
+
+// node_modules/d3-scale/src/ordinal.js
+var implicit = Symbol("implicit");
+function ordinal() {
+ var index2 = new InternMap(), domain = [], range2 = [], unknown = implicit;
+ function scale2(d) {
+ let i = index2.get(d);
+ if (i === void 0) {
+ if (unknown !== implicit)
+ return unknown;
+ index2.set(d, i = domain.push(d) - 1);
+ }
+ return range2[i % range2.length];
+ }
+ scale2.domain = function(_) {
+ if (!arguments.length)
+ return domain.slice();
+ domain = [], index2 = new InternMap();
+ for (const value of _) {
+ if (index2.has(value))
+ continue;
+ index2.set(value, domain.push(value) - 1);
+ }
+ return scale2;
+ };
+ scale2.range = function(_) {
+ return arguments.length ? (range2 = Array.from(_), scale2) : range2.slice();
+ };
+ scale2.unknown = function(_) {
+ return arguments.length ? (unknown = _, scale2) : unknown;
+ };
+ scale2.copy = function() {
+ return ordinal(domain, range2).unknown(unknown);
+ };
+ initRange.apply(scale2, arguments);
+ return scale2;
+}
+
+// node_modules/d3-scale/src/constant.js
+function constants(x3) {
+ return function() {
+ return x3;
+ };
+}
+
+// node_modules/d3-scale/src/number.js
+function number3(x3) {
+ return +x3;
+}
+
+// node_modules/d3-scale/src/continuous.js
+var unit = [0, 1];
+function identity3(x3) {
+ return x3;
+}
+function normalize(a2, b) {
+ return (b -= a2 = +a2) ? function(x3) {
+ return (x3 - a2) / b;
+ } : constants(isNaN(b) ? NaN : 0.5);
+}
+function clamper(a2, b) {
+ var t;
+ if (a2 > b)
+ t = a2, a2 = b, b = t;
+ return function(x3) {
+ return Math.max(a2, Math.min(b, x3));
+ };
+}
+function bimap(domain, range2, interpolate) {
+ var d0 = domain[0], d1 = domain[1], r0 = range2[0], r1 = range2[1];
+ if (d1 < d0)
+ d0 = normalize(d1, d0), r0 = interpolate(r1, r0);
+ else
+ d0 = normalize(d0, d1), r0 = interpolate(r0, r1);
+ return function(x3) {
+ return r0(d0(x3));
+ };
+}
+function polymap(domain, range2, interpolate) {
+ var j = Math.min(domain.length, range2.length) - 1, d = new Array(j), r = new Array(j), i = -1;
+ if (domain[j] < domain[0]) {
+ domain = domain.slice().reverse();
+ range2 = range2.slice().reverse();
+ }
+ while (++i < j) {
+ d[i] = normalize(domain[i], domain[i + 1]);
+ r[i] = interpolate(range2[i], range2[i + 1]);
+ }
+ return function(x3) {
+ var i2 = bisect_default(domain, x3, 1, j) - 1;
+ return r[i2](d[i2](x3));
+ };
+}
+function copy(source, target) {
+ return target.domain(source.domain()).range(source.range()).interpolate(source.interpolate()).clamp(source.clamp()).unknown(source.unknown());
+}
+function transformer() {
+ var domain = unit, range2 = unit, interpolate = value_default, transform2, untransform, unknown, clamp = identity3, piecewise2, output, input;
+ function rescale() {
+ var n = Math.min(domain.length, range2.length);
+ if (clamp !== identity3)
+ clamp = clamper(domain[0], domain[n - 1]);
+ piecewise2 = n > 2 ? polymap : bimap;
+ output = input = null;
+ return scale2;
+ }
+ function scale2(x3) {
+ return x3 == null || isNaN(x3 = +x3) ? unknown : (output || (output = piecewise2(domain.map(transform2), range2, interpolate)))(transform2(clamp(x3)));
+ }
+ scale2.invert = function(y3) {
+ return clamp(untransform((input || (input = piecewise2(range2, domain.map(transform2), number_default)))(y3)));
+ };
+ scale2.domain = function(_) {
+ return arguments.length ? (domain = Array.from(_, number3), rescale()) : domain.slice();
+ };
+ scale2.range = function(_) {
+ return arguments.length ? (range2 = Array.from(_), rescale()) : range2.slice();
+ };
+ scale2.rangeRound = function(_) {
+ return range2 = Array.from(_), interpolate = round_default, rescale();
+ };
+ scale2.clamp = function(_) {
+ return arguments.length ? (clamp = _ ? true : identity3, rescale()) : clamp !== identity3;
+ };
+ scale2.interpolate = function(_) {
+ return arguments.length ? (interpolate = _, rescale()) : interpolate;
+ };
+ scale2.unknown = function(_) {
+ return arguments.length ? (unknown = _, scale2) : unknown;
+ };
+ return function(t, u4) {
+ transform2 = t, untransform = u4;
+ return rescale();
+ };
+}
+function continuous() {
+ return transformer()(identity3, identity3);
+}
+
+// node_modules/d3-format/src/formatDecimal.js
+function formatDecimal_default(x3) {
+ return Math.abs(x3 = Math.round(x3)) >= 1e21 ? x3.toLocaleString("en").replace(/,/g, "") : x3.toString(10);
+}
+function formatDecimalParts(x3, p) {
+ if ((i = (x3 = p ? x3.toExponential(p - 1) : x3.toExponential()).indexOf("e")) < 0)
+ return null;
+ var i, coefficient = x3.slice(0, i);
+ return [
+ coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
+ +x3.slice(i + 1)
+ ];
+}
+
+// node_modules/d3-format/src/exponent.js
+function exponent_default(x3) {
+ return x3 = formatDecimalParts(Math.abs(x3)), x3 ? x3[1] : NaN;
+}
+
+// node_modules/d3-format/src/formatGroup.js
+function formatGroup_default(grouping, thousands) {
+ return function(value, width) {
+ var i = value.length, t = [], j = 0, g = grouping[0], length2 = 0;
+ while (i > 0 && g > 0) {
+ if (length2 + g + 1 > width)
+ g = Math.max(1, width - length2);
+ t.push(value.substring(i -= g, i + g));
+ if ((length2 += g + 1) > width)
+ break;
+ g = grouping[j = (j + 1) % grouping.length];
+ }
+ return t.reverse().join(thousands);
+ };
+}
+
+// node_modules/d3-format/src/formatNumerals.js
+function formatNumerals_default(numerals) {
+ return function(value) {
+ return value.replace(/[0-9]/g, function(i) {
+ return numerals[+i];
+ });
+ };
+}
+
+// node_modules/d3-format/src/formatSpecifier.js
+var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
+function formatSpecifier(specifier) {
+ if (!(match2 = re.exec(specifier)))
+ throw new Error("invalid format: " + specifier);
+ var match2;
+ return new FormatSpecifier({
+ fill: match2[1],
+ align: match2[2],
+ sign: match2[3],
+ symbol: match2[4],
+ zero: match2[5],
+ width: match2[6],
+ comma: match2[7],
+ precision: match2[8] && match2[8].slice(1),
+ trim: match2[9],
+ type: match2[10]
+ });
+}
+formatSpecifier.prototype = FormatSpecifier.prototype;
+function FormatSpecifier(specifier) {
+ this.fill = specifier.fill === void 0 ? " " : specifier.fill + "";
+ this.align = specifier.align === void 0 ? ">" : specifier.align + "";
+ this.sign = specifier.sign === void 0 ? "-" : specifier.sign + "";
+ this.symbol = specifier.symbol === void 0 ? "" : specifier.symbol + "";
+ this.zero = !!specifier.zero;
+ this.width = specifier.width === void 0 ? void 0 : +specifier.width;
+ this.comma = !!specifier.comma;
+ this.precision = specifier.precision === void 0 ? void 0 : +specifier.precision;
+ this.trim = !!specifier.trim;
+ this.type = specifier.type === void 0 ? "" : specifier.type + "";
+}
+FormatSpecifier.prototype.toString = function() {
+ return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
+};
+
+// node_modules/d3-format/src/formatTrim.js
+function formatTrim_default(s2) {
+ out:
+ for (var n = s2.length, i = 1, i0 = -1, i1; i < n; ++i) {
+ switch (s2[i]) {
+ case ".":
+ i0 = i1 = i;
+ break;
+ case "0":
+ if (i0 === 0)
+ i0 = i;
+ i1 = i;
+ break;
+ default:
+ if (!+s2[i])
+ break out;
+ if (i0 > 0)
+ i0 = 0;
+ break;
+ }
+ }
+ return i0 > 0 ? s2.slice(0, i0) + s2.slice(i1 + 1) : s2;
+}
+
+// node_modules/d3-format/src/formatPrefixAuto.js
+var prefixExponent;
+function formatPrefixAuto_default(x3, p) {
+ var d = formatDecimalParts(x3, p);
+ if (!d)
+ return x3 + "";
+ var coefficient = d[0], exponent2 = d[1], i = exponent2 - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent2 / 3))) * 3) + 1, n = coefficient.length;
+ return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join("0") : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) : "0." + new Array(1 - i).join("0") + formatDecimalParts(x3, Math.max(0, p + i - 1))[0];
+}
+
+// node_modules/d3-format/src/formatRounded.js
+function formatRounded_default(x3, p) {
+ var d = formatDecimalParts(x3, p);
+ if (!d)
+ return x3 + "";
+ var coefficient = d[0], exponent2 = d[1];
+ return exponent2 < 0 ? "0." + new Array(-exponent2).join("0") + coefficient : coefficient.length > exponent2 + 1 ? coefficient.slice(0, exponent2 + 1) + "." + coefficient.slice(exponent2 + 1) : coefficient + new Array(exponent2 - coefficient.length + 2).join("0");
+}
+
+// node_modules/d3-format/src/formatTypes.js
+var formatTypes_default = {
+ "%": (x3, p) => (x3 * 100).toFixed(p),
+ "b": (x3) => Math.round(x3).toString(2),
+ "c": (x3) => x3 + "",
+ "d": formatDecimal_default,
+ "e": (x3, p) => x3.toExponential(p),
+ "f": (x3, p) => x3.toFixed(p),
+ "g": (x3, p) => x3.toPrecision(p),
+ "o": (x3) => Math.round(x3).toString(8),
+ "p": (x3, p) => formatRounded_default(x3 * 100, p),
+ "r": formatRounded_default,
+ "s": formatPrefixAuto_default,
+ "X": (x3) => Math.round(x3).toString(16).toUpperCase(),
+ "x": (x3) => Math.round(x3).toString(16)
+};
+
+// node_modules/d3-format/src/identity.js
+function identity_default2(x3) {
+ return x3;
+}
+
+// node_modules/d3-format/src/locale.js
+var map3 = Array.prototype.map;
+var prefixes = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
+function locale_default(locale3) {
+ var group2 = locale3.grouping === void 0 || locale3.thousands === void 0 ? identity_default2 : formatGroup_default(map3.call(locale3.grouping, Number), locale3.thousands + ""), currencyPrefix = locale3.currency === void 0 ? "" : locale3.currency[0] + "", currencySuffix = locale3.currency === void 0 ? "" : locale3.currency[1] + "", decimal = locale3.decimal === void 0 ? "." : locale3.decimal + "", numerals = locale3.numerals === void 0 ? identity_default2 : formatNumerals_default(map3.call(locale3.numerals, String)), percent = locale3.percent === void 0 ? "%" : locale3.percent + "", minus = locale3.minus === void 0 ? "−" : locale3.minus + "", nan = locale3.nan === void 0 ? "NaN" : locale3.nan + "";
+ function newFormat(specifier) {
+ specifier = formatSpecifier(specifier);
+ var fill = specifier.fill, align = specifier.align, sign3 = specifier.sign, symbol = specifier.symbol, zero3 = specifier.zero, width = specifier.width, comma = specifier.comma, precision = specifier.precision, trim2 = specifier.trim, type3 = specifier.type;
+ if (type3 === "n")
+ comma = true, type3 = "g";
+ else if (!formatTypes_default[type3])
+ precision === void 0 && (precision = 12), trim2 = true, type3 = "g";
+ if (zero3 || fill === "0" && align === "=")
+ zero3 = true, fill = "0", align = "=";
+ var prefix2 = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type3) ? "0" + type3.toLowerCase() : "", suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type3) ? percent : "";
+ var formatType = formatTypes_default[type3], maybeSuffix = /[defgprs%]/.test(type3);
+ precision = precision === void 0 ? 6 : /[gprs]/.test(type3) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));
+ function format3(value) {
+ var valuePrefix = prefix2, valueSuffix = suffix, i, n, c3;
+ if (type3 === "c") {
+ valueSuffix = formatType(value) + valueSuffix;
+ value = "";
+ } else {
+ value = +value;
+ var valueNegative = value < 0 || 1 / value < 0;
+ value = isNaN(value) ? nan : formatType(Math.abs(value), precision);
+ if (trim2)
+ value = formatTrim_default(value);
+ if (valueNegative && +value === 0 && sign3 !== "+")
+ valueNegative = false;
+ valuePrefix = (valueNegative ? sign3 === "(" ? sign3 : minus : sign3 === "-" || sign3 === "(" ? "" : sign3) + valuePrefix;
+ valueSuffix = (type3 === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign3 === "(" ? ")" : "");
+ if (maybeSuffix) {
+ i = -1, n = value.length;
+ while (++i < n) {
+ if (c3 = value.charCodeAt(i), 48 > c3 || c3 > 57) {
+ valueSuffix = (c3 === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
+ value = value.slice(0, i);
+ break;
+ }
+ }
+ }
+ }
+ if (comma && !zero3)
+ value = group2(value, Infinity);
+ var length2 = valuePrefix.length + value.length + valueSuffix.length, padding = length2 < width ? new Array(width - length2 + 1).join(fill) : "";
+ if (comma && zero3)
+ value = group2(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
+ switch (align) {
+ case "<":
+ value = valuePrefix + value + valueSuffix + padding;
+ break;
+ case "=":
+ value = valuePrefix + padding + value + valueSuffix;
+ break;
+ case "^":
+ value = padding.slice(0, length2 = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length2);
+ break;
+ default:
+ value = padding + valuePrefix + value + valueSuffix;
+ break;
+ }
+ return numerals(value);
+ }
+ format3.toString = function() {
+ return specifier + "";
+ };
+ return format3;
+ }
+ function formatPrefix2(specifier, value) {
+ var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)), e = Math.max(-8, Math.min(8, Math.floor(exponent_default(value) / 3))) * 3, k2 = Math.pow(10, -e), prefix2 = prefixes[8 + e / 3];
+ return function(value2) {
+ return f(k2 * value2) + prefix2;
+ };
+ }
+ return {
+ format: newFormat,
+ formatPrefix: formatPrefix2
+ };
+}
+
+// node_modules/d3-format/src/defaultLocale.js
+var locale;
+var format;
+var formatPrefix;
+defaultLocale({
+ thousands: ",",
+ grouping: [3],
+ currency: ["$", ""]
+});
+function defaultLocale(definition) {
+ locale = locale_default(definition);
+ format = locale.format;
+ formatPrefix = locale.formatPrefix;
+ return locale;
+}
+
+// node_modules/d3-format/src/precisionFixed.js
+function precisionFixed_default(step) {
+ return Math.max(0, -exponent_default(Math.abs(step)));
+}
+
+// node_modules/d3-format/src/precisionPrefix.js
+function precisionPrefix_default(step, value) {
+ return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent_default(value) / 3))) * 3 - exponent_default(Math.abs(step)));
+}
+
+// node_modules/d3-format/src/precisionRound.js
+function precisionRound_default(step, max5) {
+ step = Math.abs(step), max5 = Math.abs(max5) - step;
+ return Math.max(0, exponent_default(max5) - exponent_default(step)) + 1;
+}
+
+// node_modules/d3-scale/src/tickFormat.js
+function tickFormat(start2, stop, count3, specifier) {
+ var step = tickStep(start2, stop, count3), precision;
+ specifier = formatSpecifier(specifier == null ? ",f" : specifier);
+ switch (specifier.type) {
+ case "s": {
+ var value = Math.max(Math.abs(start2), Math.abs(stop));
+ if (specifier.precision == null && !isNaN(precision = precisionPrefix_default(step, value)))
+ specifier.precision = precision;
+ return formatPrefix(specifier, value);
+ }
+ case "":
+ case "e":
+ case "g":
+ case "p":
+ case "r": {
+ if (specifier.precision == null && !isNaN(precision = precisionRound_default(step, Math.max(Math.abs(start2), Math.abs(stop)))))
+ specifier.precision = precision - (specifier.type === "e");
+ break;
+ }
+ case "f":
+ case "%": {
+ if (specifier.precision == null && !isNaN(precision = precisionFixed_default(step)))
+ specifier.precision = precision - (specifier.type === "%") * 2;
+ break;
+ }
+ }
+ return format(specifier);
+}
+
+// node_modules/d3-scale/src/linear.js
+function linearish(scale2) {
+ var domain = scale2.domain;
+ scale2.ticks = function(count3) {
+ var d = domain();
+ return ticks(d[0], d[d.length - 1], count3 == null ? 10 : count3);
+ };
+ scale2.tickFormat = function(count3, specifier) {
+ var d = domain();
+ return tickFormat(d[0], d[d.length - 1], count3 == null ? 10 : count3, specifier);
+ };
+ scale2.nice = function(count3) {
+ if (count3 == null)
+ count3 = 10;
+ var d = domain();
+ var i0 = 0;
+ var i1 = d.length - 1;
+ var start2 = d[i0];
+ var stop = d[i1];
+ var prestep;
+ var step;
+ var maxIter = 10;
+ if (stop < start2) {
+ step = start2, start2 = stop, stop = step;
+ step = i0, i0 = i1, i1 = step;
+ }
+ while (maxIter-- > 0) {
+ step = tickIncrement(start2, stop, count3);
+ if (step === prestep) {
+ d[i0] = start2;
+ d[i1] = stop;
+ return domain(d);
+ } else if (step > 0) {
+ start2 = Math.floor(start2 / step) * step;
+ stop = Math.ceil(stop / step) * step;
+ } else if (step < 0) {
+ start2 = Math.ceil(start2 * step) / step;
+ stop = Math.floor(stop * step) / step;
+ } else {
+ break;
+ }
+ prestep = step;
+ }
+ return scale2;
+ };
+ return scale2;
+}
+function linear2() {
+ var scale2 = continuous();
+ scale2.copy = function() {
+ return copy(scale2, linear2());
+ };
+ initRange.apply(scale2, arguments);
+ return linearish(scale2);
+}
+
+// node_modules/d3-time/src/interval.js
+var t02 = /* @__PURE__ */ new Date();
+var t12 = /* @__PURE__ */ new Date();
+function timeInterval(floori, offseti, count3, field) {
+ function interval2(date2) {
+ return floori(date2 = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+date2)), date2;
+ }
+ interval2.floor = (date2) => {
+ return floori(date2 = /* @__PURE__ */ new Date(+date2)), date2;
+ };
+ interval2.ceil = (date2) => {
+ return floori(date2 = new Date(date2 - 1)), offseti(date2, 1), floori(date2), date2;
+ };
+ interval2.round = (date2) => {
+ const d0 = interval2(date2), d1 = interval2.ceil(date2);
+ return date2 - d0 < d1 - date2 ? d0 : d1;
+ };
+ interval2.offset = (date2, step) => {
+ return offseti(date2 = /* @__PURE__ */ new Date(+date2), step == null ? 1 : Math.floor(step)), date2;
+ };
+ interval2.range = (start2, stop, step) => {
+ const range2 = [];
+ start2 = interval2.ceil(start2);
+ step = step == null ? 1 : Math.floor(step);
+ if (!(start2 < stop) || !(step > 0))
+ return range2;
+ let previous;
+ do
+ range2.push(previous = /* @__PURE__ */ new Date(+start2)), offseti(start2, step), floori(start2);
+ while (previous < start2 && start2 < stop);
+ return range2;
+ };
+ interval2.filter = (test) => {
+ return timeInterval((date2) => {
+ if (date2 >= date2)
+ while (floori(date2), !test(date2))
+ date2.setTime(date2 - 1);
+ }, (date2, step) => {
+ if (date2 >= date2) {
+ if (step < 0)
+ while (++step <= 0) {
+ while (offseti(date2, -1), !test(date2)) {
+ }
+ }
+ else
+ while (--step >= 0) {
+ while (offseti(date2, 1), !test(date2)) {
+ }
+ }
+ }
+ });
+ };
+ if (count3) {
+ interval2.count = (start2, end) => {
+ t02.setTime(+start2), t12.setTime(+end);
+ floori(t02), floori(t12);
+ return Math.floor(count3(t02, t12));
+ };
+ interval2.every = (step) => {
+ step = Math.floor(step);
+ return !isFinite(step) || !(step > 0) ? null : !(step > 1) ? interval2 : interval2.filter(field ? (d) => field(d) % step === 0 : (d) => interval2.count(0, d) % step === 0);
+ };
+ }
+ return interval2;
+}
+
+// node_modules/d3-time/src/duration.js
+var durationSecond = 1e3;
+var durationMinute = durationSecond * 60;
+var durationHour = durationMinute * 60;
+var durationDay = durationHour * 24;
+var durationWeek = durationDay * 7;
+var durationMonth = durationDay * 30;
+var durationYear = durationDay * 365;
+
+// node_modules/d3-time/src/minute.js
+var timeMinute = timeInterval((date2) => {
+ date2.setTime(date2 - date2.getMilliseconds() - date2.getSeconds() * durationSecond);
+}, (date2, step) => {
+ date2.setTime(+date2 + step * durationMinute);
+}, (start2, end) => {
+ return (end - start2) / durationMinute;
+}, (date2) => {
+ return date2.getMinutes();
+});
+var timeMinutes = timeMinute.range;
+var utcMinute = timeInterval((date2) => {
+ date2.setUTCSeconds(0, 0);
+}, (date2, step) => {
+ date2.setTime(+date2 + step * durationMinute);
+}, (start2, end) => {
+ return (end - start2) / durationMinute;
+}, (date2) => {
+ return date2.getUTCMinutes();
+});
+var utcMinutes = utcMinute.range;
+
+// node_modules/d3-time/src/hour.js
+var timeHour = timeInterval((date2) => {
+ date2.setTime(date2 - date2.getMilliseconds() - date2.getSeconds() * durationSecond - date2.getMinutes() * durationMinute);
+}, (date2, step) => {
+ date2.setTime(+date2 + step * durationHour);
+}, (start2, end) => {
+ return (end - start2) / durationHour;
+}, (date2) => {
+ return date2.getHours();
+});
+var timeHours = timeHour.range;
+var utcHour = timeInterval((date2) => {
+ date2.setUTCMinutes(0, 0, 0);
+}, (date2, step) => {
+ date2.setTime(+date2 + step * durationHour);
+}, (start2, end) => {
+ return (end - start2) / durationHour;
+}, (date2) => {
+ return date2.getUTCHours();
+});
+var utcHours = utcHour.range;
+
+// node_modules/d3-time/src/day.js
+var timeDay = timeInterval(
+ (date2) => date2.setHours(0, 0, 0, 0),
+ (date2, step) => date2.setDate(date2.getDate() + step),
+ (start2, end) => (end - start2 - (end.getTimezoneOffset() - start2.getTimezoneOffset()) * durationMinute) / durationDay,
+ (date2) => date2.getDate() - 1
+);
+var timeDays = timeDay.range;
+var utcDay = timeInterval((date2) => {
+ date2.setUTCHours(0, 0, 0, 0);
+}, (date2, step) => {
+ date2.setUTCDate(date2.getUTCDate() + step);
+}, (start2, end) => {
+ return (end - start2) / durationDay;
+}, (date2) => {
+ return date2.getUTCDate() - 1;
+});
+var utcDays = utcDay.range;
+var unixDay = timeInterval((date2) => {
+ date2.setUTCHours(0, 0, 0, 0);
+}, (date2, step) => {
+ date2.setUTCDate(date2.getUTCDate() + step);
+}, (start2, end) => {
+ return (end - start2) / durationDay;
+}, (date2) => {
+ return Math.floor(date2 / durationDay);
+});
+var unixDays = unixDay.range;
+
+// node_modules/d3-time/src/week.js
+function timeWeekday(i) {
+ return timeInterval((date2) => {
+ date2.setDate(date2.getDate() - (date2.getDay() + 7 - i) % 7);
+ date2.setHours(0, 0, 0, 0);
+ }, (date2, step) => {
+ date2.setDate(date2.getDate() + step * 7);
+ }, (start2, end) => {
+ return (end - start2 - (end.getTimezoneOffset() - start2.getTimezoneOffset()) * durationMinute) / durationWeek;
+ });
+}
+var timeSunday = timeWeekday(0);
+var timeMonday = timeWeekday(1);
+var timeTuesday = timeWeekday(2);
+var timeWednesday = timeWeekday(3);
+var timeThursday = timeWeekday(4);
+var timeFriday = timeWeekday(5);
+var timeSaturday = timeWeekday(6);
+var timeSundays = timeSunday.range;
+var timeMondays = timeMonday.range;
+var timeTuesdays = timeTuesday.range;
+var timeWednesdays = timeWednesday.range;
+var timeThursdays = timeThursday.range;
+var timeFridays = timeFriday.range;
+var timeSaturdays = timeSaturday.range;
+function utcWeekday(i) {
+ return timeInterval((date2) => {
+ date2.setUTCDate(date2.getUTCDate() - (date2.getUTCDay() + 7 - i) % 7);
+ date2.setUTCHours(0, 0, 0, 0);
+ }, (date2, step) => {
+ date2.setUTCDate(date2.getUTCDate() + step * 7);
+ }, (start2, end) => {
+ return (end - start2) / durationWeek;
+ });
+}
+var utcSunday = utcWeekday(0);
+var utcMonday = utcWeekday(1);
+var utcTuesday = utcWeekday(2);
+var utcWednesday = utcWeekday(3);
+var utcThursday = utcWeekday(4);
+var utcFriday = utcWeekday(5);
+var utcSaturday = utcWeekday(6);
+var utcSundays = utcSunday.range;
+var utcMondays = utcMonday.range;
+var utcTuesdays = utcTuesday.range;
+var utcWednesdays = utcWednesday.range;
+var utcThursdays = utcThursday.range;
+var utcFridays = utcFriday.range;
+var utcSaturdays = utcSaturday.range;
+
+// node_modules/d3-time/src/month.js
+var timeMonth = timeInterval((date2) => {
+ date2.setDate(1);
+ date2.setHours(0, 0, 0, 0);
+}, (date2, step) => {
+ date2.setMonth(date2.getMonth() + step);
+}, (start2, end) => {
+ return end.getMonth() - start2.getMonth() + (end.getFullYear() - start2.getFullYear()) * 12;
+}, (date2) => {
+ return date2.getMonth();
+});
+var timeMonths = timeMonth.range;
+var utcMonth = timeInterval((date2) => {
+ date2.setUTCDate(1);
+ date2.setUTCHours(0, 0, 0, 0);
+}, (date2, step) => {
+ date2.setUTCMonth(date2.getUTCMonth() + step);
+}, (start2, end) => {
+ return end.getUTCMonth() - start2.getUTCMonth() + (end.getUTCFullYear() - start2.getUTCFullYear()) * 12;
+}, (date2) => {
+ return date2.getUTCMonth();
+});
+var utcMonths = utcMonth.range;
+
+// node_modules/d3-time/src/millisecond.js
+var millisecond = timeInterval(() => {
+}, (date2, step) => {
+ date2.setTime(+date2 + step);
+}, (start2, end) => {
+ return end - start2;
+});
+millisecond.every = (k2) => {
+ k2 = Math.floor(k2);
+ if (!isFinite(k2) || !(k2 > 0))
+ return null;
+ if (!(k2 > 1))
+ return millisecond;
+ return timeInterval((date2) => {
+ date2.setTime(Math.floor(date2 / k2) * k2);
+ }, (date2, step) => {
+ date2.setTime(+date2 + step * k2);
+ }, (start2, end) => {
+ return (end - start2) / k2;
+ });
+};
+var milliseconds = millisecond.range;
+
+// node_modules/d3-time/src/second.js
+var second = timeInterval((date2) => {
+ date2.setTime(date2 - date2.getMilliseconds());
+}, (date2, step) => {
+ date2.setTime(+date2 + step * durationSecond);
+}, (start2, end) => {
+ return (end - start2) / durationSecond;
+}, (date2) => {
+ return date2.getUTCSeconds();
+});
+var seconds = second.range;
+
+// node_modules/d3-time/src/year.js
+var timeYear = timeInterval((date2) => {
+ date2.setMonth(0, 1);
+ date2.setHours(0, 0, 0, 0);
+}, (date2, step) => {
+ date2.setFullYear(date2.getFullYear() + step);
+}, (start2, end) => {
+ return end.getFullYear() - start2.getFullYear();
+}, (date2) => {
+ return date2.getFullYear();
+});
+timeYear.every = (k2) => {
+ return !isFinite(k2 = Math.floor(k2)) || !(k2 > 0) ? null : timeInterval((date2) => {
+ date2.setFullYear(Math.floor(date2.getFullYear() / k2) * k2);
+ date2.setMonth(0, 1);
+ date2.setHours(0, 0, 0, 0);
+ }, (date2, step) => {
+ date2.setFullYear(date2.getFullYear() + step * k2);
+ });
+};
+var timeYears = timeYear.range;
+var utcYear = timeInterval((date2) => {
+ date2.setUTCMonth(0, 1);
+ date2.setUTCHours(0, 0, 0, 0);
+}, (date2, step) => {
+ date2.setUTCFullYear(date2.getUTCFullYear() + step);
+}, (start2, end) => {
+ return end.getUTCFullYear() - start2.getUTCFullYear();
+}, (date2) => {
+ return date2.getUTCFullYear();
+});
+utcYear.every = (k2) => {
+ return !isFinite(k2 = Math.floor(k2)) || !(k2 > 0) ? null : timeInterval((date2) => {
+ date2.setUTCFullYear(Math.floor(date2.getUTCFullYear() / k2) * k2);
+ date2.setUTCMonth(0, 1);
+ date2.setUTCHours(0, 0, 0, 0);
+ }, (date2, step) => {
+ date2.setUTCFullYear(date2.getUTCFullYear() + step * k2);
+ });
+};
+var utcYears = utcYear.range;
+
+// node_modules/d3-time/src/ticks.js
+function ticker(year, month, week, day, hour, minute) {
+ const tickIntervals = [
+ [second, 1, durationSecond],
+ [second, 5, 5 * durationSecond],
+ [second, 15, 15 * durationSecond],
+ [second, 30, 30 * durationSecond],
+ [minute, 1, durationMinute],
+ [minute, 5, 5 * durationMinute],
+ [minute, 15, 15 * durationMinute],
+ [minute, 30, 30 * durationMinute],
+ [hour, 1, durationHour],
+ [hour, 3, 3 * durationHour],
+ [hour, 6, 6 * durationHour],
+ [hour, 12, 12 * durationHour],
+ [day, 1, durationDay],
+ [day, 2, 2 * durationDay],
+ [week, 1, durationWeek],
+ [month, 1, durationMonth],
+ [month, 3, 3 * durationMonth],
+ [year, 1, durationYear]
+ ];
+ function ticks2(start2, stop, count3) {
+ const reverse2 = stop < start2;
+ if (reverse2)
+ [start2, stop] = [stop, start2];
+ const interval2 = count3 && typeof count3.range === "function" ? count3 : tickInterval(start2, stop, count3);
+ const ticks3 = interval2 ? interval2.range(start2, +stop + 1) : [];
+ return reverse2 ? ticks3.reverse() : ticks3;
+ }
+ function tickInterval(start2, stop, count3) {
+ const target = Math.abs(stop - start2) / count3;
+ const i = bisector(([, , step2]) => step2).right(tickIntervals, target);
+ if (i === tickIntervals.length)
+ return year.every(tickStep(start2 / durationYear, stop / durationYear, count3));
+ if (i === 0)
+ return millisecond.every(Math.max(tickStep(start2, stop, count3), 1));
+ const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];
+ return t.every(step);
+ }
+ return [ticks2, tickInterval];
+}
+var [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcSunday, unixDay, utcHour, utcMinute);
+var [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute);
+
+// node_modules/d3-time-format/src/locale.js
+function localDate(d) {
+ if (0 <= d.y && d.y < 100) {
+ var date2 = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);
+ date2.setFullYear(d.y);
+ return date2;
+ }
+ return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);
+}
+function utcDate(d) {
+ if (0 <= d.y && d.y < 100) {
+ var date2 = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));
+ date2.setUTCFullYear(d.y);
+ return date2;
+ }
+ return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));
+}
+function newDate(y3, m, d) {
+ return { y: y3, m, d, H: 0, M: 0, S: 0, L: 0 };
+}
+function formatLocale(locale3) {
+ var locale_dateTime = locale3.dateTime, locale_date = locale3.date, locale_time = locale3.time, locale_periods = locale3.periods, locale_weekdays = locale3.days, locale_shortWeekdays = locale3.shortDays, locale_months = locale3.months, locale_shortMonths = locale3.shortMonths;
+ var periodRe = formatRe(locale_periods), periodLookup = formatLookup(locale_periods), weekdayRe = formatRe(locale_weekdays), weekdayLookup = formatLookup(locale_weekdays), shortWeekdayRe = formatRe(locale_shortWeekdays), shortWeekdayLookup = formatLookup(locale_shortWeekdays), monthRe = formatRe(locale_months), monthLookup = formatLookup(locale_months), shortMonthRe = formatRe(locale_shortMonths), shortMonthLookup = formatLookup(locale_shortMonths);
+ var formats = {
+ "a": formatShortWeekday,
+ "A": formatWeekday,
+ "b": formatShortMonth,
+ "B": formatMonth,
+ "c": null,
+ "d": formatDayOfMonth,
+ "e": formatDayOfMonth,
+ "f": formatMicroseconds,
+ "g": formatYearISO,
+ "G": formatFullYearISO,
+ "H": formatHour24,
+ "I": formatHour12,
+ "j": formatDayOfYear,
+ "L": formatMilliseconds,
+ "m": formatMonthNumber,
+ "M": formatMinutes,
+ "p": formatPeriod,
+ "q": formatQuarter,
+ "Q": formatUnixTimestamp,
+ "s": formatUnixTimestampSeconds,
+ "S": formatSeconds,
+ "u": formatWeekdayNumberMonday,
+ "U": formatWeekNumberSunday,
+ "V": formatWeekNumberISO,
+ "w": formatWeekdayNumberSunday,
+ "W": formatWeekNumberMonday,
+ "x": null,
+ "X": null,
+ "y": formatYear,
+ "Y": formatFullYear,
+ "Z": formatZone,
+ "%": formatLiteralPercent
+ };
+ var utcFormats = {
+ "a": formatUTCShortWeekday,
+ "A": formatUTCWeekday,
+ "b": formatUTCShortMonth,
+ "B": formatUTCMonth,
+ "c": null,
+ "d": formatUTCDayOfMonth,
+ "e": formatUTCDayOfMonth,
+ "f": formatUTCMicroseconds,
+ "g": formatUTCYearISO,
+ "G": formatUTCFullYearISO,
+ "H": formatUTCHour24,
+ "I": formatUTCHour12,
+ "j": formatUTCDayOfYear,
+ "L": formatUTCMilliseconds,
+ "m": formatUTCMonthNumber,
+ "M": formatUTCMinutes,
+ "p": formatUTCPeriod,
+ "q": formatUTCQuarter,
+ "Q": formatUnixTimestamp,
+ "s": formatUnixTimestampSeconds,
+ "S": formatUTCSeconds,
+ "u": formatUTCWeekdayNumberMonday,
+ "U": formatUTCWeekNumberSunday,
+ "V": formatUTCWeekNumberISO,
+ "w": formatUTCWeekdayNumberSunday,
+ "W": formatUTCWeekNumberMonday,
+ "x": null,
+ "X": null,
+ "y": formatUTCYear,
+ "Y": formatUTCFullYear,
+ "Z": formatUTCZone,
+ "%": formatLiteralPercent
+ };
+ var parses = {
+ "a": parseShortWeekday,
+ "A": parseWeekday,
+ "b": parseShortMonth,
+ "B": parseMonth,
+ "c": parseLocaleDateTime,
+ "d": parseDayOfMonth,
+ "e": parseDayOfMonth,
+ "f": parseMicroseconds,
+ "g": parseYear,
+ "G": parseFullYear,
+ "H": parseHour24,
+ "I": parseHour24,
+ "j": parseDayOfYear,
+ "L": parseMilliseconds,
+ "m": parseMonthNumber,
+ "M": parseMinutes,
+ "p": parsePeriod,
+ "q": parseQuarter,
+ "Q": parseUnixTimestamp,
+ "s": parseUnixTimestampSeconds,
+ "S": parseSeconds,
+ "u": parseWeekdayNumberMonday,
+ "U": parseWeekNumberSunday,
+ "V": parseWeekNumberISO,
+ "w": parseWeekdayNumberSunday,
+ "W": parseWeekNumberMonday,
+ "x": parseLocaleDate,
+ "X": parseLocaleTime,
+ "y": parseYear,
+ "Y": parseFullYear,
+ "Z": parseZone,
+ "%": parseLiteralPercent
+ };
+ formats.x = newFormat(locale_date, formats);
+ formats.X = newFormat(locale_time, formats);
+ formats.c = newFormat(locale_dateTime, formats);
+ utcFormats.x = newFormat(locale_date, utcFormats);
+ utcFormats.X = newFormat(locale_time, utcFormats);
+ utcFormats.c = newFormat(locale_dateTime, utcFormats);
+ function newFormat(specifier, formats2) {
+ return function(date2) {
+ var string = [], i = -1, j = 0, n = specifier.length, c3, pad3, format3;
+ if (!(date2 instanceof Date))
+ date2 = /* @__PURE__ */ new Date(+date2);
+ while (++i < n) {
+ if (specifier.charCodeAt(i) === 37) {
+ string.push(specifier.slice(j, i));
+ if ((pad3 = pads[c3 = specifier.charAt(++i)]) != null)
+ c3 = specifier.charAt(++i);
+ else
+ pad3 = c3 === "e" ? " " : "0";
+ if (format3 = formats2[c3])
+ c3 = format3(date2, pad3);
+ string.push(c3);
+ j = i + 1;
+ }
+ }
+ string.push(specifier.slice(j, i));
+ return string.join("");
+ };
+ }
+ function newParse(specifier, Z) {
+ return function(string) {
+ var d = newDate(1900, void 0, 1), i = parseSpecifier(d, specifier, string += "", 0), week, day;
+ if (i != string.length)
+ return null;
+ if ("Q" in d)
+ return new Date(d.Q);
+ if ("s" in d)
+ return new Date(d.s * 1e3 + ("L" in d ? d.L : 0));
+ if (Z && !("Z" in d))
+ d.Z = 0;
+ if ("p" in d)
+ d.H = d.H % 12 + d.p * 12;
+ if (d.m === void 0)
+ d.m = "q" in d ? d.q : 0;
+ if ("V" in d) {
+ if (d.V < 1 || d.V > 53)
+ return null;
+ if (!("w" in d))
+ d.w = 1;
+ if ("Z" in d) {
+ week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();
+ week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);
+ week = utcDay.offset(week, (d.V - 1) * 7);
+ d.y = week.getUTCFullYear();
+ d.m = week.getUTCMonth();
+ d.d = week.getUTCDate() + (d.w + 6) % 7;
+ } else {
+ week = localDate(newDate(d.y, 0, 1)), day = week.getDay();
+ week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);
+ week = timeDay.offset(week, (d.V - 1) * 7);
+ d.y = week.getFullYear();
+ d.m = week.getMonth();
+ d.d = week.getDate() + (d.w + 6) % 7;
+ }
+ } else if ("W" in d || "U" in d) {
+ if (!("w" in d))
+ d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0;
+ day = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();
+ d.m = 0;
+ d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;
+ }
+ if ("Z" in d) {
+ d.H += d.Z / 100 | 0;
+ d.M += d.Z % 100;
+ return utcDate(d);
+ }
+ return localDate(d);
+ };
+ }
+ function parseSpecifier(d, specifier, string, j) {
+ var i = 0, n = specifier.length, m = string.length, c3, parse3;
+ while (i < n) {
+ if (j >= m)
+ return -1;
+ c3 = specifier.charCodeAt(i++);
+ if (c3 === 37) {
+ c3 = specifier.charAt(i++);
+ parse3 = parses[c3 in pads ? specifier.charAt(i++) : c3];
+ if (!parse3 || (j = parse3(d, string, j)) < 0)
+ return -1;
+ } else if (c3 != string.charCodeAt(j++)) {
+ return -1;
+ }
+ }
+ return j;
+ }
+ function parsePeriod(d, string, i) {
+ var n = periodRe.exec(string.slice(i));
+ return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
+ }
+ function parseShortWeekday(d, string, i) {
+ var n = shortWeekdayRe.exec(string.slice(i));
+ return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
+ }
+ function parseWeekday(d, string, i) {
+ var n = weekdayRe.exec(string.slice(i));
+ return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
+ }
+ function parseShortMonth(d, string, i) {
+ var n = shortMonthRe.exec(string.slice(i));
+ return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
+ }
+ function parseMonth(d, string, i) {
+ var n = monthRe.exec(string.slice(i));
+ return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
+ }
+ function parseLocaleDateTime(d, string, i) {
+ return parseSpecifier(d, locale_dateTime, string, i);
+ }
+ function parseLocaleDate(d, string, i) {
+ return parseSpecifier(d, locale_date, string, i);
+ }
+ function parseLocaleTime(d, string, i) {
+ return parseSpecifier(d, locale_time, string, i);
+ }
+ function formatShortWeekday(d) {
+ return locale_shortWeekdays[d.getDay()];
+ }
+ function formatWeekday(d) {
+ return locale_weekdays[d.getDay()];
+ }
+ function formatShortMonth(d) {
+ return locale_shortMonths[d.getMonth()];
+ }
+ function formatMonth(d) {
+ return locale_months[d.getMonth()];
+ }
+ function formatPeriod(d) {
+ return locale_periods[+(d.getHours() >= 12)];
+ }
+ function formatQuarter(d) {
+ return 1 + ~~(d.getMonth() / 3);
+ }
+ function formatUTCShortWeekday(d) {
+ return locale_shortWeekdays[d.getUTCDay()];
+ }
+ function formatUTCWeekday(d) {
+ return locale_weekdays[d.getUTCDay()];
+ }
+ function formatUTCShortMonth(d) {
+ return locale_shortMonths[d.getUTCMonth()];
+ }
+ function formatUTCMonth(d) {
+ return locale_months[d.getUTCMonth()];
+ }
+ function formatUTCPeriod(d) {
+ return locale_periods[+(d.getUTCHours() >= 12)];
+ }
+ function formatUTCQuarter(d) {
+ return 1 + ~~(d.getUTCMonth() / 3);
+ }
+ return {
+ format: function(specifier) {
+ var f = newFormat(specifier += "", formats);
+ f.toString = function() {
+ return specifier;
+ };
+ return f;
+ },
+ parse: function(specifier) {
+ var p = newParse(specifier += "", false);
+ p.toString = function() {
+ return specifier;
+ };
+ return p;
+ },
+ utcFormat: function(specifier) {
+ var f = newFormat(specifier += "", utcFormats);
+ f.toString = function() {
+ return specifier;
+ };
+ return f;
+ },
+ utcParse: function(specifier) {
+ var p = newParse(specifier += "", true);
+ p.toString = function() {
+ return specifier;
+ };
+ return p;
+ }
+ };
+}
+var pads = { "-": "", "_": " ", "0": "0" };
+var numberRe = /^\s*\d+/;
+var percentRe = /^%/;
+var requoteRe = /[\\^$*+?|[\]().{}]/g;
+function pad(value, fill, width) {
+ var sign3 = value < 0 ? "-" : "", string = (sign3 ? -value : value) + "", length2 = string.length;
+ return sign3 + (length2 < width ? new Array(width - length2 + 1).join(fill) + string : string);
+}
+function requote(s2) {
+ return s2.replace(requoteRe, "\\$&");
+}
+function formatRe(names) {
+ return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i");
+}
+function formatLookup(names) {
+ return new Map(names.map((name, i) => [name.toLowerCase(), i]));
+}
+function parseWeekdayNumberSunday(d, string, i) {
+ var n = numberRe.exec(string.slice(i, i + 1));
+ return n ? (d.w = +n[0], i + n[0].length) : -1;
+}
+function parseWeekdayNumberMonday(d, string, i) {
+ var n = numberRe.exec(string.slice(i, i + 1));
+ return n ? (d.u = +n[0], i + n[0].length) : -1;
+}
+function parseWeekNumberSunday(d, string, i) {
+ var n = numberRe.exec(string.slice(i, i + 2));
+ return n ? (d.U = +n[0], i + n[0].length) : -1;
+}
+function parseWeekNumberISO(d, string, i) {
+ var n = numberRe.exec(string.slice(i, i + 2));
+ return n ? (d.V = +n[0], i + n[0].length) : -1;
+}
+function parseWeekNumberMonday(d, string, i) {
+ var n = numberRe.exec(string.slice(i, i + 2));
+ return n ? (d.W = +n[0], i + n[0].length) : -1;
+}
+function parseFullYear(d, string, i) {
+ var n = numberRe.exec(string.slice(i, i + 4));
+ return n ? (d.y = +n[0], i + n[0].length) : -1;
+}
+function parseYear(d, string, i) {
+ var n = numberRe.exec(string.slice(i, i + 2));
+ return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2e3), i + n[0].length) : -1;
+}
+function parseZone(d, string, i) {
+ var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6));
+ return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1;
+}
+function parseQuarter(d, string, i) {
+ var n = numberRe.exec(string.slice(i, i + 1));
+ return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;
+}
+function parseMonthNumber(d, string, i) {
+ var n = numberRe.exec(string.slice(i, i + 2));
+ return n ? (d.m = n[0] - 1, i + n[0].length) : -1;
+}
+function parseDayOfMonth(d, string, i) {
+ var n = numberRe.exec(string.slice(i, i + 2));
+ return n ? (d.d = +n[0], i + n[0].length) : -1;
+}
+function parseDayOfYear(d, string, i) {
+ var n = numberRe.exec(string.slice(i, i + 3));
+ return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;
+}
+function parseHour24(d, string, i) {
+ var n = numberRe.exec(string.slice(i, i + 2));
+ return n ? (d.H = +n[0], i + n[0].length) : -1;
+}
+function parseMinutes(d, string, i) {
+ var n = numberRe.exec(string.slice(i, i + 2));
+ return n ? (d.M = +n[0], i + n[0].length) : -1;
+}
+function parseSeconds(d, string, i) {
+ var n = numberRe.exec(string.slice(i, i + 2));
+ return n ? (d.S = +n[0], i + n[0].length) : -1;
+}
+function parseMilliseconds(d, string, i) {
+ var n = numberRe.exec(string.slice(i, i + 3));
+ return n ? (d.L = +n[0], i + n[0].length) : -1;
+}
+function parseMicroseconds(d, string, i) {
+ var n = numberRe.exec(string.slice(i, i + 6));
+ return n ? (d.L = Math.floor(n[0] / 1e3), i + n[0].length) : -1;
+}
+function parseLiteralPercent(d, string, i) {
+ var n = percentRe.exec(string.slice(i, i + 1));
+ return n ? i + n[0].length : -1;
+}
+function parseUnixTimestamp(d, string, i) {
+ var n = numberRe.exec(string.slice(i));
+ return n ? (d.Q = +n[0], i + n[0].length) : -1;
+}
+function parseUnixTimestampSeconds(d, string, i) {
+ var n = numberRe.exec(string.slice(i));
+ return n ? (d.s = +n[0], i + n[0].length) : -1;
+}
+function formatDayOfMonth(d, p) {
+ return pad(d.getDate(), p, 2);
+}
+function formatHour24(d, p) {
+ return pad(d.getHours(), p, 2);
+}
+function formatHour12(d, p) {
+ return pad(d.getHours() % 12 || 12, p, 2);
+}
+function formatDayOfYear(d, p) {
+ return pad(1 + timeDay.count(timeYear(d), d), p, 3);
+}
+function formatMilliseconds(d, p) {
+ return pad(d.getMilliseconds(), p, 3);
+}
+function formatMicroseconds(d, p) {
+ return formatMilliseconds(d, p) + "000";
+}
+function formatMonthNumber(d, p) {
+ return pad(d.getMonth() + 1, p, 2);
+}
+function formatMinutes(d, p) {
+ return pad(d.getMinutes(), p, 2);
+}
+function formatSeconds(d, p) {
+ return pad(d.getSeconds(), p, 2);
+}
+function formatWeekdayNumberMonday(d) {
+ var day = d.getDay();
+ return day === 0 ? 7 : day;
+}
+function formatWeekNumberSunday(d, p) {
+ return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);
+}
+function dISO(d) {
+ var day = d.getDay();
+ return day >= 4 || day === 0 ? timeThursday(d) : timeThursday.ceil(d);
+}
+function formatWeekNumberISO(d, p) {
+ d = dISO(d);
+ return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);
+}
+function formatWeekdayNumberSunday(d) {
+ return d.getDay();
+}
+function formatWeekNumberMonday(d, p) {
+ return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);
+}
+function formatYear(d, p) {
+ return pad(d.getFullYear() % 100, p, 2);
+}
+function formatYearISO(d, p) {
+ d = dISO(d);
+ return pad(d.getFullYear() % 100, p, 2);
+}
+function formatFullYear(d, p) {
+ return pad(d.getFullYear() % 1e4, p, 4);
+}
+function formatFullYearISO(d, p) {
+ var day = d.getDay();
+ d = day >= 4 || day === 0 ? timeThursday(d) : timeThursday.ceil(d);
+ return pad(d.getFullYear() % 1e4, p, 4);
+}
+function formatZone(d) {
+ var z = d.getTimezoneOffset();
+ return (z > 0 ? "-" : (z *= -1, "+")) + pad(z / 60 | 0, "0", 2) + pad(z % 60, "0", 2);
+}
+function formatUTCDayOfMonth(d, p) {
+ return pad(d.getUTCDate(), p, 2);
+}
+function formatUTCHour24(d, p) {
+ return pad(d.getUTCHours(), p, 2);
+}
+function formatUTCHour12(d, p) {
+ return pad(d.getUTCHours() % 12 || 12, p, 2);
+}
+function formatUTCDayOfYear(d, p) {
+ return pad(1 + utcDay.count(utcYear(d), d), p, 3);
+}
+function formatUTCMilliseconds(d, p) {
+ return pad(d.getUTCMilliseconds(), p, 3);
+}
+function formatUTCMicroseconds(d, p) {
+ return formatUTCMilliseconds(d, p) + "000";
+}
+function formatUTCMonthNumber(d, p) {
+ return pad(d.getUTCMonth() + 1, p, 2);
+}
+function formatUTCMinutes(d, p) {
+ return pad(d.getUTCMinutes(), p, 2);
+}
+function formatUTCSeconds(d, p) {
+ return pad(d.getUTCSeconds(), p, 2);
+}
+function formatUTCWeekdayNumberMonday(d) {
+ var dow = d.getUTCDay();
+ return dow === 0 ? 7 : dow;
+}
+function formatUTCWeekNumberSunday(d, p) {
+ return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);
+}
+function UTCdISO(d) {
+ var day = d.getUTCDay();
+ return day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d);
+}
+function formatUTCWeekNumberISO(d, p) {
+ d = UTCdISO(d);
+ return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);
+}
+function formatUTCWeekdayNumberSunday(d) {
+ return d.getUTCDay();
+}
+function formatUTCWeekNumberMonday(d, p) {
+ return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);
+}
+function formatUTCYear(d, p) {
+ return pad(d.getUTCFullYear() % 100, p, 2);
+}
+function formatUTCYearISO(d, p) {
+ d = UTCdISO(d);
+ return pad(d.getUTCFullYear() % 100, p, 2);
+}
+function formatUTCFullYear(d, p) {
+ return pad(d.getUTCFullYear() % 1e4, p, 4);
+}
+function formatUTCFullYearISO(d, p) {
+ var day = d.getUTCDay();
+ d = day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d);
+ return pad(d.getUTCFullYear() % 1e4, p, 4);
+}
+function formatUTCZone() {
+ return "+0000";
+}
+function formatLiteralPercent() {
+ return "%";
+}
+function formatUnixTimestamp(d) {
+ return +d;
+}
+function formatUnixTimestampSeconds(d) {
+ return Math.floor(+d / 1e3);
+}
+
+// node_modules/d3-time-format/src/defaultLocale.js
+var locale2;
+var timeFormat;
+var timeParse;
+var utcFormat;
+var utcParse;
+defaultLocale2({
+ dateTime: "%x, %X",
+ date: "%-m/%-d/%Y",
+ time: "%-I:%M:%S %p",
+ periods: ["AM", "PM"],
+ days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
+ shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
+ months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
+ shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
+});
+function defaultLocale2(definition) {
+ locale2 = formatLocale(definition);
+ timeFormat = locale2.format;
+ timeParse = locale2.parse;
+ utcFormat = locale2.utcFormat;
+ utcParse = locale2.utcParse;
+ return locale2;
+}
+
+// node_modules/d3-time-format/src/isoFormat.js
+var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ";
+function formatIsoNative(date2) {
+ return date2.toISOString();
+}
+var formatIso = Date.prototype.toISOString ? formatIsoNative : utcFormat(isoSpecifier);
+
+// node_modules/d3-time-format/src/isoParse.js
+function parseIsoNative(string) {
+ var date2 = new Date(string);
+ return isNaN(date2) ? null : date2;
+}
+var parseIso = +/* @__PURE__ */ new Date("2000-01-01T00:00:00.000Z") ? parseIsoNative : utcParse(isoSpecifier);
+
+// node_modules/d3-scale/src/nice.js
+function nice2(domain, interval2) {
+ domain = domain.slice();
+ var i0 = 0, i1 = domain.length - 1, x02 = domain[i0], x12 = domain[i1], t;
+ if (x12 < x02) {
+ t = i0, i0 = i1, i1 = t;
+ t = x02, x02 = x12, x12 = t;
+ }
+ domain[i0] = interval2.floor(x02);
+ domain[i1] = interval2.ceil(x12);
+ return domain;
+}
+
+// node_modules/d3-scale/src/time.js
+function date(t) {
+ return new Date(t);
+}
+function number4(t) {
+ return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t);
+}
+function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format3) {
+ var scale2 = continuous(), invert2 = scale2.invert, domain = scale2.domain;
+ var formatMillisecond = format3(".%L"), formatSecond = format3(":%S"), formatMinute = format3("%I:%M"), formatHour = format3("%I %p"), formatDay = format3("%a %d"), formatWeek = format3("%b %d"), formatMonth = format3("%B"), formatYear3 = format3("%Y");
+ function tickFormat2(date2) {
+ return (second2(date2) < date2 ? formatMillisecond : minute(date2) < date2 ? formatSecond : hour(date2) < date2 ? formatMinute : day(date2) < date2 ? formatHour : month(date2) < date2 ? week(date2) < date2 ? formatDay : formatWeek : year(date2) < date2 ? formatMonth : formatYear3)(date2);
+ }
+ scale2.invert = function(y3) {
+ return new Date(invert2(y3));
+ };
+ scale2.domain = function(_) {
+ return arguments.length ? domain(Array.from(_, number4)) : domain().map(date);
+ };
+ scale2.ticks = function(interval2) {
+ var d = domain();
+ return ticks2(d[0], d[d.length - 1], interval2 == null ? 10 : interval2);
+ };
+ scale2.tickFormat = function(count3, specifier) {
+ return specifier == null ? tickFormat2 : format3(specifier);
+ };
+ scale2.nice = function(interval2) {
+ var d = domain();
+ if (!interval2 || typeof interval2.range !== "function")
+ interval2 = tickInterval(d[0], d[d.length - 1], interval2 == null ? 10 : interval2);
+ return interval2 ? domain(nice2(d, interval2)) : scale2;
+ };
+ scale2.copy = function() {
+ return copy(scale2, calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format3));
+ };
+ return scale2;
+}
+function time() {
+ return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute, second, timeFormat).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
+}
+
+// node_modules/d3-scale-chromatic/src/colors.js
+function colors_default(specifier) {
+ var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;
+ while (i < n)
+ colors[i] = "#" + specifier.slice(i * 6, ++i * 6);
+ return colors;
+}
+
+// node_modules/d3-scale-chromatic/src/categorical/Tableau10.js
+var Tableau10_default = colors_default("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
+
+// node_modules/d3-scale-chromatic/src/categorical/category10.js
+var category10_default = colors_default("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");
+
+// node_modules/d3-scale-chromatic/src/categorical/Accent.js
+var Accent_default = colors_default("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666");
+
+// node_modules/d3-scale-chromatic/src/categorical/Dark2.js
+var Dark2_default = colors_default("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666");
+
+// node_modules/d3-scale-chromatic/src/categorical/Paired.js
+var Paired_default = colors_default("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");
+
+// node_modules/d3-scale-chromatic/src/categorical/Pastel1.js
+var Pastel1_default = colors_default("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2");
+
+// node_modules/d3-scale-chromatic/src/categorical/Pastel2.js
+var Pastel2_default = colors_default("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc");
+
+// node_modules/d3-scale-chromatic/src/categorical/Set1.js
+var Set1_default = colors_default("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999");
+
+// node_modules/d3-scale-chromatic/src/categorical/Set2.js
+var Set2_default = colors_default("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3");
+
+// node_modules/d3-scale-chromatic/src/categorical/Set3.js
+var Set3_default = colors_default("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");
+
+// node_modules/d3-scale-chromatic/src/ramp.js
+var ramp_default = (scheme28) => rgbBasis(scheme28[scheme28.length - 1]);
+
+// node_modules/d3-scale-chromatic/src/diverging/BrBG.js
+var scheme = new Array(3).concat(
+ "d8b365f5f5f55ab4ac",
+ "a6611adfc27d80cdc1018571",
+ "a6611adfc27df5f5f580cdc1018571",
+ "8c510ad8b365f6e8c3c7eae55ab4ac01665e",
+ "8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e",
+ "8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e",
+ "8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e",
+ "5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30",
+ "5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30"
+).map(colors_default);
+var BrBG_default = ramp_default(scheme);
+
+// node_modules/d3-scale-chromatic/src/diverging/PRGn.js
+var scheme2 = new Array(3).concat(
+ "af8dc3f7f7f77fbf7b",
+ "7b3294c2a5cfa6dba0008837",
+ "7b3294c2a5cff7f7f7a6dba0008837",
+ "762a83af8dc3e7d4e8d9f0d37fbf7b1b7837",
+ "762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837",
+ "762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837",
+ "762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837",
+ "40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b",
+ "40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b"
+).map(colors_default);
+var PRGn_default = ramp_default(scheme2);
+
+// node_modules/d3-scale-chromatic/src/diverging/PiYG.js
+var scheme3 = new Array(3).concat(
+ "e9a3c9f7f7f7a1d76a",
+ "d01c8bf1b6dab8e1864dac26",
+ "d01c8bf1b6daf7f7f7b8e1864dac26",
+ "c51b7de9a3c9fde0efe6f5d0a1d76a4d9221",
+ "c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221",
+ "c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221",
+ "c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221",
+ "8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419",
+ "8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419"
+).map(colors_default);
+var PiYG_default = ramp_default(scheme3);
+
+// node_modules/d3-scale-chromatic/src/diverging/PuOr.js
+var scheme4 = new Array(3).concat(
+ "998ec3f7f7f7f1a340",
+ "5e3c99b2abd2fdb863e66101",
+ "5e3c99b2abd2f7f7f7fdb863e66101",
+ "542788998ec3d8daebfee0b6f1a340b35806",
+ "542788998ec3d8daebf7f7f7fee0b6f1a340b35806",
+ "5427888073acb2abd2d8daebfee0b6fdb863e08214b35806",
+ "5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806",
+ "2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08",
+ "2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08"
+).map(colors_default);
+var PuOr_default = ramp_default(scheme4);
+
+// node_modules/d3-scale-chromatic/src/diverging/RdBu.js
+var scheme5 = new Array(3).concat(
+ "ef8a62f7f7f767a9cf",
+ "ca0020f4a58292c5de0571b0",
+ "ca0020f4a582f7f7f792c5de0571b0",
+ "b2182bef8a62fddbc7d1e5f067a9cf2166ac",
+ "b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac",
+ "b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac",
+ "b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac",
+ "67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061",
+ "67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061"
+).map(colors_default);
+var RdBu_default = ramp_default(scheme5);
+
+// node_modules/d3-scale-chromatic/src/diverging/RdGy.js
+var scheme6 = new Array(3).concat(
+ "ef8a62ffffff999999",
+ "ca0020f4a582bababa404040",
+ "ca0020f4a582ffffffbababa404040",
+ "b2182bef8a62fddbc7e0e0e09999994d4d4d",
+ "b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d",
+ "b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d",
+ "b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d",
+ "67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a",
+ "67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a"
+).map(colors_default);
+var RdGy_default = ramp_default(scheme6);
+
+// node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js
+var scheme7 = new Array(3).concat(
+ "fc8d59ffffbf91bfdb",
+ "d7191cfdae61abd9e92c7bb6",
+ "d7191cfdae61ffffbfabd9e92c7bb6",
+ "d73027fc8d59fee090e0f3f891bfdb4575b4",
+ "d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4",
+ "d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4",
+ "d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4",
+ "a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695",
+ "a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695"
+).map(colors_default);
+var RdYlBu_default = ramp_default(scheme7);
+
+// node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js
+var scheme8 = new Array(3).concat(
+ "fc8d59ffffbf91cf60",
+ "d7191cfdae61a6d96a1a9641",
+ "d7191cfdae61ffffbfa6d96a1a9641",
+ "d73027fc8d59fee08bd9ef8b91cf601a9850",
+ "d73027fc8d59fee08bffffbfd9ef8b91cf601a9850",
+ "d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850",
+ "d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850",
+ "a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837",
+ "a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837"
+).map(colors_default);
+var RdYlGn_default = ramp_default(scheme8);
+
+// node_modules/d3-scale-chromatic/src/diverging/Spectral.js
+var scheme9 = new Array(3).concat(
+ "fc8d59ffffbf99d594",
+ "d7191cfdae61abdda42b83ba",
+ "d7191cfdae61ffffbfabdda42b83ba",
+ "d53e4ffc8d59fee08be6f59899d5943288bd",
+ "d53e4ffc8d59fee08bffffbfe6f59899d5943288bd",
+ "d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd",
+ "d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd",
+ "9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2",
+ "9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2"
+).map(colors_default);
+var Spectral_default = ramp_default(scheme9);
+
+// node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js
+var scheme10 = new Array(3).concat(
+ "e5f5f999d8c92ca25f",
+ "edf8fbb2e2e266c2a4238b45",
+ "edf8fbb2e2e266c2a42ca25f006d2c",
+ "edf8fbccece699d8c966c2a42ca25f006d2c",
+ "edf8fbccece699d8c966c2a441ae76238b45005824",
+ "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824",
+ "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b"
+).map(colors_default);
+var BuGn_default = ramp_default(scheme10);
+
+// node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js
+var scheme11 = new Array(3).concat(
+ "e0ecf49ebcda8856a7",
+ "edf8fbb3cde38c96c688419d",
+ "edf8fbb3cde38c96c68856a7810f7c",
+ "edf8fbbfd3e69ebcda8c96c68856a7810f7c",
+ "edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b",
+ "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b",
+ "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b"
+).map(colors_default);
+var BuPu_default = ramp_default(scheme11);
+
+// node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js
+var scheme12 = new Array(3).concat(
+ "e0f3dba8ddb543a2ca",
+ "f0f9e8bae4bc7bccc42b8cbe",
+ "f0f9e8bae4bc7bccc443a2ca0868ac",
+ "f0f9e8ccebc5a8ddb57bccc443a2ca0868ac",
+ "f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e",
+ "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e",
+ "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081"
+).map(colors_default);
+var GnBu_default = ramp_default(scheme12);
+
+// node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js
+var scheme13 = new Array(3).concat(
+ "fee8c8fdbb84e34a33",
+ "fef0d9fdcc8afc8d59d7301f",
+ "fef0d9fdcc8afc8d59e34a33b30000",
+ "fef0d9fdd49efdbb84fc8d59e34a33b30000",
+ "fef0d9fdd49efdbb84fc8d59ef6548d7301f990000",
+ "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000",
+ "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000"
+).map(colors_default);
+var OrRd_default = ramp_default(scheme13);
+
+// node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js
+var scheme14 = new Array(3).concat(
+ "ece2f0a6bddb1c9099",
+ "f6eff7bdc9e167a9cf02818a",
+ "f6eff7bdc9e167a9cf1c9099016c59",
+ "f6eff7d0d1e6a6bddb67a9cf1c9099016c59",
+ "f6eff7d0d1e6a6bddb67a9cf3690c002818a016450",
+ "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450",
+ "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636"
+).map(colors_default);
+var PuBuGn_default = ramp_default(scheme14);
+
+// node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js
+var scheme15 = new Array(3).concat(
+ "ece7f2a6bddb2b8cbe",
+ "f1eef6bdc9e174a9cf0570b0",
+ "f1eef6bdc9e174a9cf2b8cbe045a8d",
+ "f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d",
+ "f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b",
+ "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b",
+ "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858"
+).map(colors_default);
+var PuBu_default = ramp_default(scheme15);
+
+// node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js
+var scheme16 = new Array(3).concat(
+ "e7e1efc994c7dd1c77",
+ "f1eef6d7b5d8df65b0ce1256",
+ "f1eef6d7b5d8df65b0dd1c77980043",
+ "f1eef6d4b9dac994c7df65b0dd1c77980043",
+ "f1eef6d4b9dac994c7df65b0e7298ace125691003f",
+ "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f",
+ "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f"
+).map(colors_default);
+var PuRd_default = ramp_default(scheme16);
+
+// node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js
+var scheme17 = new Array(3).concat(
+ "fde0ddfa9fb5c51b8a",
+ "feebe2fbb4b9f768a1ae017e",
+ "feebe2fbb4b9f768a1c51b8a7a0177",
+ "feebe2fcc5c0fa9fb5f768a1c51b8a7a0177",
+ "feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177",
+ "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177",
+ "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a"
+).map(colors_default);
+var RdPu_default = ramp_default(scheme17);
+
+// node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js
+var scheme18 = new Array(3).concat(
+ "edf8b17fcdbb2c7fb8",
+ "ffffcca1dab441b6c4225ea8",
+ "ffffcca1dab441b6c42c7fb8253494",
+ "ffffccc7e9b47fcdbb41b6c42c7fb8253494",
+ "ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84",
+ "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84",
+ "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58"
+).map(colors_default);
+var YlGnBu_default = ramp_default(scheme18);
+
+// node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js
+var scheme19 = new Array(3).concat(
+ "f7fcb9addd8e31a354",
+ "ffffccc2e69978c679238443",
+ "ffffccc2e69978c67931a354006837",
+ "ffffccd9f0a3addd8e78c67931a354006837",
+ "ffffccd9f0a3addd8e78c67941ab5d238443005a32",
+ "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32",
+ "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529"
+).map(colors_default);
+var YlGn_default = ramp_default(scheme19);
+
+// node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js
+var scheme20 = new Array(3).concat(
+ "fff7bcfec44fd95f0e",
+ "ffffd4fed98efe9929cc4c02",
+ "ffffd4fed98efe9929d95f0e993404",
+ "ffffd4fee391fec44ffe9929d95f0e993404",
+ "ffffd4fee391fec44ffe9929ec7014cc4c028c2d04",
+ "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04",
+ "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506"
+).map(colors_default);
+var YlOrBr_default = ramp_default(scheme20);
+
+// node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js
+var scheme21 = new Array(3).concat(
+ "ffeda0feb24cf03b20",
+ "ffffb2fecc5cfd8d3ce31a1c",
+ "ffffb2fecc5cfd8d3cf03b20bd0026",
+ "ffffb2fed976feb24cfd8d3cf03b20bd0026",
+ "ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026",
+ "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026",
+ "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026"
+).map(colors_default);
+var YlOrRd_default = ramp_default(scheme21);
+
+// node_modules/d3-scale-chromatic/src/sequential-single/Blues.js
+var scheme22 = new Array(3).concat(
+ "deebf79ecae13182bd",
+ "eff3ffbdd7e76baed62171b5",
+ "eff3ffbdd7e76baed63182bd08519c",
+ "eff3ffc6dbef9ecae16baed63182bd08519c",
+ "eff3ffc6dbef9ecae16baed64292c62171b5084594",
+ "f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594",
+ "f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b"
+).map(colors_default);
+var Blues_default = ramp_default(scheme22);
+
+// node_modules/d3-scale-chromatic/src/sequential-single/Greens.js
+var scheme23 = new Array(3).concat(
+ "e5f5e0a1d99b31a354",
+ "edf8e9bae4b374c476238b45",
+ "edf8e9bae4b374c47631a354006d2c",
+ "edf8e9c7e9c0a1d99b74c47631a354006d2c",
+ "edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32",
+ "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32",
+ "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b"
+).map(colors_default);
+var Greens_default = ramp_default(scheme23);
+
+// node_modules/d3-scale-chromatic/src/sequential-single/Greys.js
+var scheme24 = new Array(3).concat(
+ "f0f0f0bdbdbd636363",
+ "f7f7f7cccccc969696525252",
+ "f7f7f7cccccc969696636363252525",
+ "f7f7f7d9d9d9bdbdbd969696636363252525",
+ "f7f7f7d9d9d9bdbdbd969696737373525252252525",
+ "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525",
+ "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000"
+).map(colors_default);
+var Greys_default = ramp_default(scheme24);
+
+// node_modules/d3-scale-chromatic/src/sequential-single/Purples.js
+var scheme25 = new Array(3).concat(
+ "efedf5bcbddc756bb1",
+ "f2f0f7cbc9e29e9ac86a51a3",
+ "f2f0f7cbc9e29e9ac8756bb154278f",
+ "f2f0f7dadaebbcbddc9e9ac8756bb154278f",
+ "f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486",
+ "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486",
+ "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d"
+).map(colors_default);
+var Purples_default = ramp_default(scheme25);
+
+// node_modules/d3-scale-chromatic/src/sequential-single/Reds.js
+var scheme26 = new Array(3).concat(
+ "fee0d2fc9272de2d26",
+ "fee5d9fcae91fb6a4acb181d",
+ "fee5d9fcae91fb6a4ade2d26a50f15",
+ "fee5d9fcbba1fc9272fb6a4ade2d26a50f15",
+ "fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d",
+ "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d",
+ "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d"
+).map(colors_default);
+var Reds_default = ramp_default(scheme26);
+
+// node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js
+var scheme27 = new Array(3).concat(
+ "fee6cefdae6be6550d",
+ "feeddefdbe85fd8d3cd94701",
+ "feeddefdbe85fd8d3ce6550da63603",
+ "feeddefdd0a2fdae6bfd8d3ce6550da63603",
+ "feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04",
+ "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04",
+ "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704"
+).map(colors_default);
+var Oranges_default = ramp_default(scheme27);
+
+// node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js
+var cubehelix_default2 = cubehelixLong(cubehelix(300, 0.5, 0), cubehelix(-240, 0.5, 1));
+
+// node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js
+var warm = cubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.5, 0.8));
+var cool = cubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.5, 0.8));
+var c = cubehelix();
+
+// node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js
+var c2 = rgb();
+var pi_1_3 = Math.PI / 3;
+var pi_2_3 = Math.PI * 2 / 3;
+
+// node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js
+function ramp(range2) {
+ var n = range2.length;
+ return function(t) {
+ return range2[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];
+ };
+}
+var viridis_default = ramp(colors_default("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));
+var magma = ramp(colors_default("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf"));
+var inferno = ramp(colors_default("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4"));
+var plasma = ramp(colors_default("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));
+
+// node_modules/d3-shape/src/constant.js
+function constant_default3(x3) {
+ return function constant2() {
+ return x3;
+ };
+}
+
+// node_modules/d3-shape/src/math.js
+var abs = Math.abs;
+var atan2 = Math.atan2;
+var cos = Math.cos;
+var max2 = Math.max;
+var min2 = Math.min;
+var sin = Math.sin;
+var sqrt2 = Math.sqrt;
+var epsilon3 = 1e-12;
+var pi = Math.PI;
+var halfPi = pi / 2;
+var tau = 2 * pi;
+function acos(x3) {
+ return x3 > 1 ? 0 : x3 < -1 ? pi : Math.acos(x3);
+}
+function asin(x3) {
+ return x3 >= 1 ? halfPi : x3 <= -1 ? -halfPi : Math.asin(x3);
+}
+
+// node_modules/d3-path/src/path.js
+var pi2 = Math.PI;
+var tau2 = 2 * pi2;
+var epsilon4 = 1e-6;
+var tauEpsilon = tau2 - epsilon4;
+function append(strings) {
+ this._ += strings[0];
+ for (let i = 1, n = strings.length; i < n; ++i) {
+ this._ += arguments[i] + strings[i];
+ }
+}
+function appendRound(digits) {
+ let d = Math.floor(digits);
+ if (!(d >= 0))
+ throw new Error(`invalid digits: ${digits}`);
+ if (d > 15)
+ return append;
+ const k2 = 10 ** d;
+ return function(strings) {
+ this._ += strings[0];
+ for (let i = 1, n = strings.length; i < n; ++i) {
+ this._ += Math.round(arguments[i] * k2) / k2 + strings[i];
+ }
+ };
+}
+var Path = class {
+ constructor(digits) {
+ this._x0 = this._y0 = // start of current subpath
+ this._x1 = this._y1 = null;
+ this._ = "";
+ this._append = digits == null ? append : appendRound(digits);
+ }
+ moveTo(x3, y3) {
+ this._append`M${this._x0 = this._x1 = +x3},${this._y0 = this._y1 = +y3}`;
+ }
+ closePath() {
+ if (this._x1 !== null) {
+ this._x1 = this._x0, this._y1 = this._y0;
+ this._append`Z`;
+ }
+ }
+ lineTo(x3, y3) {
+ this._append`L${this._x1 = +x3},${this._y1 = +y3}`;
+ }
+ quadraticCurveTo(x12, y1, x3, y3) {
+ this._append`Q${+x12},${+y1},${this._x1 = +x3},${this._y1 = +y3}`;
+ }
+ bezierCurveTo(x12, y1, x22, y22, x3, y3) {
+ this._append`C${+x12},${+y1},${+x22},${+y22},${this._x1 = +x3},${this._y1 = +y3}`;
+ }
+ arcTo(x12, y1, x22, y22, r) {
+ x12 = +x12, y1 = +y1, x22 = +x22, y22 = +y22, r = +r;
+ if (r < 0)
+ throw new Error(`negative radius: ${r}`);
+ let x02 = this._x1, y0 = this._y1, x21 = x22 - x12, y21 = y22 - y1, x01 = x02 - x12, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01;
+ if (this._x1 === null) {
+ this._append`M${this._x1 = x12},${this._y1 = y1}`;
+ } else if (!(l01_2 > epsilon4))
+ ;
+ else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon4) || !r) {
+ this._append`L${this._x1 = x12},${this._y1 = y1}`;
+ } else {
+ let x20 = x22 - x02, y20 = y22 - y0, l21_2 = x21 * x21 + y21 * y21, l20_2 = x20 * x20 + y20 * y20, l21 = Math.sqrt(l21_2), l01 = Math.sqrt(l01_2), l = r * Math.tan((pi2 - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), t01 = l / l01, t21 = l / l21;
+ if (Math.abs(t01 - 1) > epsilon4) {
+ this._append`L${x12 + t01 * x01},${y1 + t01 * y01}`;
+ }
+ this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x12 + t21 * x21},${this._y1 = y1 + t21 * y21}`;
+ }
+ }
+ arc(x3, y3, r, a0, a1, ccw) {
+ x3 = +x3, y3 = +y3, r = +r, ccw = !!ccw;
+ if (r < 0)
+ throw new Error(`negative radius: ${r}`);
+ let dx = r * Math.cos(a0), dy = r * Math.sin(a0), x02 = x3 + dx, y0 = y3 + dy, cw = 1 ^ ccw, da2 = ccw ? a0 - a1 : a1 - a0;
+ if (this._x1 === null) {
+ this._append`M${x02},${y0}`;
+ } else if (Math.abs(this._x1 - x02) > epsilon4 || Math.abs(this._y1 - y0) > epsilon4) {
+ this._append`L${x02},${y0}`;
+ }
+ if (!r)
+ return;
+ if (da2 < 0)
+ da2 = da2 % tau2 + tau2;
+ if (da2 > tauEpsilon) {
+ this._append`A${r},${r},0,1,${cw},${x3 - dx},${y3 - dy}A${r},${r},0,1,${cw},${this._x1 = x02},${this._y1 = y0}`;
+ } else if (da2 > epsilon4) {
+ this._append`A${r},${r},0,${+(da2 >= pi2)},${cw},${this._x1 = x3 + r * Math.cos(a1)},${this._y1 = y3 + r * Math.sin(a1)}`;
+ }
+ }
+ rect(x3, y3, w, h) {
+ this._append`M${this._x0 = this._x1 = +x3},${this._y0 = this._y1 = +y3}h${w = +w}v${+h}h${-w}Z`;
+ }
+ toString() {
+ return this._;
+ }
+};
+function path() {
+ return new Path();
+}
+path.prototype = Path.prototype;
+
+// node_modules/d3-shape/src/path.js
+function withPath(shape) {
+ let digits = 3;
+ shape.digits = function(_) {
+ if (!arguments.length)
+ return digits;
+ if (_ == null) {
+ digits = null;
+ } else {
+ const d = Math.floor(_);
+ if (!(d >= 0))
+ throw new RangeError(`invalid digits: ${_}`);
+ digits = d;
+ }
+ return shape;
+ };
+ return () => new Path(digits);
+}
+
+// node_modules/d3-shape/src/arc.js
+function arcInnerRadius(d) {
+ return d.innerRadius;
+}
+function arcOuterRadius(d) {
+ return d.outerRadius;
+}
+function arcStartAngle(d) {
+ return d.startAngle;
+}
+function arcEndAngle(d) {
+ return d.endAngle;
+}
+function arcPadAngle(d) {
+ return d && d.padAngle;
+}
+function intersect(x02, y0, x12, y1, x22, y22, x3, y3) {
+ var x10 = x12 - x02, y10 = y1 - y0, x32 = x3 - x22, y32 = y3 - y22, t = y32 * x10 - x32 * y10;
+ if (t * t < epsilon3)
+ return;
+ t = (x32 * (y0 - y22) - y32 * (x02 - x22)) / t;
+ return [x02 + t * x10, y0 + t * y10];
+}
+function cornerTangents(x02, y0, x12, y1, r1, rc, cw) {
+ var x01 = x02 - x12, y01 = y0 - y1, lo = (cw ? rc : -rc) / sqrt2(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x11 = x02 + ox, y11 = y0 + oy, x10 = x12 + ox, y10 = y1 + oy, x00 = (x11 + x10) / 2, y00 = (y11 + y10) / 2, dx = x10 - x11, dy = y10 - y11, d2 = dx * dx + dy * dy, r = r1 - rc, D3 = x11 * y10 - x10 * y11, d = (dy < 0 ? -1 : 1) * sqrt2(max2(0, r * r * d2 - D3 * D3)), cx0 = (D3 * dy - dx * d) / d2, cy0 = (-D3 * dx - dy * d) / d2, cx1 = (D3 * dy + dx * d) / d2, cy1 = (-D3 * dx + dy * d) / d2, dx0 = cx0 - x00, dy0 = cy0 - y00, dx1 = cx1 - x00, dy1 = cy1 - y00;
+ if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1)
+ cx0 = cx1, cy0 = cy1;
+ return {
+ cx: cx0,
+ cy: cy0,
+ x01: -ox,
+ y01: -oy,
+ x11: cx0 * (r1 / r - 1),
+ y11: cy0 * (r1 / r - 1)
+ };
+}
+function arc_default() {
+ var innerRadius = arcInnerRadius, outerRadius = arcOuterRadius, cornerRadius = constant_default3(0), padRadius = null, startAngle = arcStartAngle, endAngle = arcEndAngle, padAngle = arcPadAngle, context = null, path2 = withPath(arc);
+ function arc() {
+ var buffer, r, r0 = +innerRadius.apply(this, arguments), r1 = +outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) - halfPi, a1 = endAngle.apply(this, arguments) - halfPi, da2 = abs(a1 - a0), cw = a1 > a0;
+ if (!context)
+ context = buffer = path2();
+ if (r1 < r0)
+ r = r1, r1 = r0, r0 = r;
+ if (!(r1 > epsilon3))
+ context.moveTo(0, 0);
+ else if (da2 > tau - epsilon3) {
+ context.moveTo(r1 * cos(a0), r1 * sin(a0));
+ context.arc(0, 0, r1, a0, a1, !cw);
+ if (r0 > epsilon3) {
+ context.moveTo(r0 * cos(a1), r0 * sin(a1));
+ context.arc(0, 0, r0, a1, a0, cw);
+ }
+ } else {
+ var a01 = a0, a11 = a1, a00 = a0, a10 = a1, da0 = da2, da1 = da2, ap = padAngle.apply(this, arguments) / 2, rp = ap > epsilon3 && (padRadius ? +padRadius.apply(this, arguments) : sqrt2(r0 * r0 + r1 * r1)), rc = min2(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), rc0 = rc, rc1 = rc, t03, t13;
+ if (rp > epsilon3) {
+ var p0 = asin(rp / r0 * sin(ap)), p1 = asin(rp / r1 * sin(ap));
+ if ((da0 -= p0 * 2) > epsilon3)
+ p0 *= cw ? 1 : -1, a00 += p0, a10 -= p0;
+ else
+ da0 = 0, a00 = a10 = (a0 + a1) / 2;
+ if ((da1 -= p1 * 2) > epsilon3)
+ p1 *= cw ? 1 : -1, a01 += p1, a11 -= p1;
+ else
+ da1 = 0, a01 = a11 = (a0 + a1) / 2;
+ }
+ var x01 = r1 * cos(a01), y01 = r1 * sin(a01), x10 = r0 * cos(a10), y10 = r0 * sin(a10);
+ if (rc > epsilon3) {
+ var x11 = r1 * cos(a11), y11 = r1 * sin(a11), x00 = r0 * cos(a00), y00 = r0 * sin(a00), oc;
+ if (da2 < pi) {
+ if (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10)) {
+ var ax = x01 - oc[0], ay = y01 - oc[1], bx = x11 - oc[0], by = y11 - oc[1], kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt2(ax * ax + ay * ay) * sqrt2(bx * bx + by * by))) / 2), lc = sqrt2(oc[0] * oc[0] + oc[1] * oc[1]);
+ rc0 = min2(rc, (r0 - lc) / (kc - 1));
+ rc1 = min2(rc, (r1 - lc) / (kc + 1));
+ } else {
+ rc0 = rc1 = 0;
+ }
+ }
+ }
+ if (!(da1 > epsilon3))
+ context.moveTo(x01, y01);
+ else if (rc1 > epsilon3) {
+ t03 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);
+ t13 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);
+ context.moveTo(t03.cx + t03.x01, t03.cy + t03.y01);
+ if (rc1 < rc)
+ context.arc(t03.cx, t03.cy, rc1, atan2(t03.y01, t03.x01), atan2(t13.y01, t13.x01), !cw);
+ else {
+ context.arc(t03.cx, t03.cy, rc1, atan2(t03.y01, t03.x01), atan2(t03.y11, t03.x11), !cw);
+ context.arc(0, 0, r1, atan2(t03.cy + t03.y11, t03.cx + t03.x11), atan2(t13.cy + t13.y11, t13.cx + t13.x11), !cw);
+ context.arc(t13.cx, t13.cy, rc1, atan2(t13.y11, t13.x11), atan2(t13.y01, t13.x01), !cw);
+ }
+ } else
+ context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);
+ if (!(r0 > epsilon3) || !(da0 > epsilon3))
+ context.lineTo(x10, y10);
+ else if (rc0 > epsilon3) {
+ t03 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);
+ t13 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);
+ context.lineTo(t03.cx + t03.x01, t03.cy + t03.y01);
+ if (rc0 < rc)
+ context.arc(t03.cx, t03.cy, rc0, atan2(t03.y01, t03.x01), atan2(t13.y01, t13.x01), !cw);
+ else {
+ context.arc(t03.cx, t03.cy, rc0, atan2(t03.y01, t03.x01), atan2(t03.y11, t03.x11), !cw);
+ context.arc(0, 0, r0, atan2(t03.cy + t03.y11, t03.cx + t03.x11), atan2(t13.cy + t13.y11, t13.cx + t13.x11), cw);
+ context.arc(t13.cx, t13.cy, rc0, atan2(t13.y11, t13.x11), atan2(t13.y01, t13.x01), !cw);
+ }
+ } else
+ context.arc(0, 0, r0, a10, a00, cw);
+ }
+ context.closePath();
+ if (buffer)
+ return context = null, buffer + "" || null;
+ }
+ arc.centroid = function() {
+ var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, a2 = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;
+ return [cos(a2) * r, sin(a2) * r];
+ };
+ arc.innerRadius = function(_) {
+ return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant_default3(+_), arc) : innerRadius;
+ };
+ arc.outerRadius = function(_) {
+ return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant_default3(+_), arc) : outerRadius;
+ };
+ arc.cornerRadius = function(_) {
+ return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant_default3(+_), arc) : cornerRadius;
+ };
+ arc.padRadius = function(_) {
+ return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant_default3(+_), arc) : padRadius;
+ };
+ arc.startAngle = function(_) {
+ return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant_default3(+_), arc) : startAngle;
+ };
+ arc.endAngle = function(_) {
+ return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant_default3(+_), arc) : endAngle;
+ };
+ arc.padAngle = function(_) {
+ return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant_default3(+_), arc) : padAngle;
+ };
+ arc.context = function(_) {
+ return arguments.length ? (context = _ == null ? null : _, arc) : context;
+ };
+ return arc;
+}
+
+// node_modules/d3-shape/src/curve/linear.js
+function Linear(context) {
+ this._context = context;
+}
+Linear.prototype = {
+ areaStart: function() {
+ this._line = 0;
+ },
+ areaEnd: function() {
+ this._line = NaN;
+ },
+ lineStart: function() {
+ this._point = 0;
+ },
+ lineEnd: function() {
+ if (this._line || this._line !== 0 && this._point === 1)
+ this._context.closePath();
+ this._line = 1 - this._line;
+ },
+ point: function(x3, y3) {
+ x3 = +x3, y3 = +y3;
+ switch (this._point) {
+ case 0:
+ this._point = 1;
+ this._line ? this._context.lineTo(x3, y3) : this._context.moveTo(x3, y3);
+ break;
+ case 1:
+ this._point = 2;
+ default:
+ this._context.lineTo(x3, y3);
+ break;
+ }
+ }
+};
+function linear_default(context) {
+ return new Linear(context);
+}
+
+// node_modules/d3-shape/src/array.js
+var slice2 = Array.prototype.slice;
+function array_default2(x3) {
+ return typeof x3 === "object" && "length" in x3 ? x3 : Array.from(x3);
+}
+
+// node_modules/d3-shape/src/point.js
+function x(p) {
+ return p[0];
+}
+function y(p) {
+ return p[1];
+}
+
+// node_modules/d3-shape/src/line.js
+function line_default(x3, y3) {
+ var defined = constant_default3(true), context = null, curve = linear_default, output = null, path2 = withPath(line2);
+ x3 = typeof x3 === "function" ? x3 : x3 === void 0 ? x : constant_default3(x3);
+ y3 = typeof y3 === "function" ? y3 : y3 === void 0 ? y : constant_default3(y3);
+ function line2(data) {
+ var i, n = (data = array_default2(data)).length, d, defined0 = false, buffer;
+ if (context == null)
+ output = curve(buffer = path2());
+ for (i = 0; i <= n; ++i) {
+ if (!(i < n && defined(d = data[i], i, data)) === defined0) {
+ if (defined0 = !defined0)
+ output.lineStart();
+ else
+ output.lineEnd();
+ }
+ if (defined0)
+ output.point(+x3(d, i, data), +y3(d, i, data));
+ }
+ if (buffer)
+ return output = null, buffer + "" || null;
+ }
+ line2.x = function(_) {
+ return arguments.length ? (x3 = typeof _ === "function" ? _ : constant_default3(+_), line2) : x3;
+ };
+ line2.y = function(_) {
+ return arguments.length ? (y3 = typeof _ === "function" ? _ : constant_default3(+_), line2) : y3;
+ };
+ line2.defined = function(_) {
+ return arguments.length ? (defined = typeof _ === "function" ? _ : constant_default3(!!_), line2) : defined;
+ };
+ line2.curve = function(_) {
+ return arguments.length ? (curve = _, context != null && (output = curve(context)), line2) : curve;
+ };
+ line2.context = function(_) {
+ return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line2) : context;
+ };
+ return line2;
+}
+
+// node_modules/d3-shape/src/descending.js
+function descending_default(a2, b) {
+ return b < a2 ? -1 : b > a2 ? 1 : b >= a2 ? 0 : NaN;
+}
+
+// node_modules/d3-shape/src/identity.js
+function identity_default3(d) {
+ return d;
+}
+
+// node_modules/d3-shape/src/pie.js
+function pie_default() {
+ var value = identity_default3, sortValues = descending_default, sort2 = null, startAngle = constant_default3(0), endAngle = constant_default3(tau), padAngle = constant_default3(0);
+ function pie2(data) {
+ var i, n = (data = array_default2(data)).length, j, k2, sum4 = 0, index2 = new Array(n), arcs = new Array(n), a0 = +startAngle.apply(this, arguments), da2 = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)), a1, p = Math.min(Math.abs(da2) / n, padAngle.apply(this, arguments)), pa = p * (da2 < 0 ? -1 : 1), v2;
+ for (i = 0; i < n; ++i) {
+ if ((v2 = arcs[index2[i] = i] = +value(data[i], i, data)) > 0) {
+ sum4 += v2;
+ }
+ }
+ if (sortValues != null)
+ index2.sort(function(i2, j2) {
+ return sortValues(arcs[i2], arcs[j2]);
+ });
+ else if (sort2 != null)
+ index2.sort(function(i2, j2) {
+ return sort2(data[i2], data[j2]);
+ });
+ for (i = 0, k2 = sum4 ? (da2 - n * pa) / sum4 : 0; i < n; ++i, a0 = a1) {
+ j = index2[i], v2 = arcs[j], a1 = a0 + (v2 > 0 ? v2 * k2 : 0) + pa, arcs[j] = {
+ data: data[j],
+ index: i,
+ value: v2,
+ startAngle: a0,
+ endAngle: a1,
+ padAngle: p
+ };
+ }
+ return arcs;
+ }
+ pie2.value = function(_) {
+ return arguments.length ? (value = typeof _ === "function" ? _ : constant_default3(+_), pie2) : value;
+ };
+ pie2.sortValues = function(_) {
+ return arguments.length ? (sortValues = _, sort2 = null, pie2) : sortValues;
+ };
+ pie2.sort = function(_) {
+ return arguments.length ? (sort2 = _, sortValues = null, pie2) : sort2;
+ };
+ pie2.startAngle = function(_) {
+ return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant_default3(+_), pie2) : startAngle;
+ };
+ pie2.endAngle = function(_) {
+ return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant_default3(+_), pie2) : endAngle;
+ };
+ pie2.padAngle = function(_) {
+ return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant_default3(+_), pie2) : padAngle;
+ };
+ return pie2;
+}
+
+// node_modules/d3-shape/src/curve/basis.js
+function point2(that, x3, y3) {
+ that._context.bezierCurveTo(
+ (2 * that._x0 + that._x1) / 3,
+ (2 * that._y0 + that._y1) / 3,
+ (that._x0 + 2 * that._x1) / 3,
+ (that._y0 + 2 * that._y1) / 3,
+ (that._x0 + 4 * that._x1 + x3) / 6,
+ (that._y0 + 4 * that._y1 + y3) / 6
+ );
+}
+function Basis(context) {
+ this._context = context;
+}
+Basis.prototype = {
+ areaStart: function() {
+ this._line = 0;
+ },
+ areaEnd: function() {
+ this._line = NaN;
+ },
+ lineStart: function() {
+ this._x0 = this._x1 = this._y0 = this._y1 = NaN;
+ this._point = 0;
+ },
+ lineEnd: function() {
+ switch (this._point) {
+ case 3:
+ point2(this, this._x1, this._y1);
+ case 2:
+ this._context.lineTo(this._x1, this._y1);
+ break;
+ }
+ if (this._line || this._line !== 0 && this._point === 1)
+ this._context.closePath();
+ this._line = 1 - this._line;
+ },
+ point: function(x3, y3) {
+ x3 = +x3, y3 = +y3;
+ switch (this._point) {
+ case 0:
+ this._point = 1;
+ this._line ? this._context.lineTo(x3, y3) : this._context.moveTo(x3, y3);
+ break;
+ case 1:
+ this._point = 2;
+ break;
+ case 2:
+ this._point = 3;
+ this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
+ default:
+ point2(this, x3, y3);
+ break;
+ }
+ this._x0 = this._x1, this._x1 = x3;
+ this._y0 = this._y1, this._y1 = y3;
+ }
+};
+function basis_default2(context) {
+ return new Basis(context);
+}
+
+// node_modules/d3-shape/src/curve/radial.js
+var curveRadialLinear = curveRadial(linear_default);
+function Radial(curve) {
+ this._curve = curve;
+}
+Radial.prototype = {
+ areaStart: function() {
+ this._curve.areaStart();
+ },
+ areaEnd: function() {
+ this._curve.areaEnd();
+ },
+ lineStart: function() {
+ this._curve.lineStart();
+ },
+ lineEnd: function() {
+ this._curve.lineEnd();
+ },
+ point: function(a2, r) {
+ this._curve.point(r * Math.sin(a2), r * -Math.cos(a2));
+ }
+};
+function curveRadial(curve) {
+ function radial2(context) {
+ return new Radial(curve(context));
+ }
+ radial2._curve = curve;
+ return radial2;
+}
+
+// node_modules/d3-shape/src/curve/bump.js
+var Bump = class {
+ constructor(context, x3) {
+ this._context = context;
+ this._x = x3;
+ }
+ areaStart() {
+ this._line = 0;
+ }
+ areaEnd() {
+ this._line = NaN;
+ }
+ lineStart() {
+ this._point = 0;
+ }
+ lineEnd() {
+ if (this._line || this._line !== 0 && this._point === 1)
+ this._context.closePath();
+ this._line = 1 - this._line;
+ }
+ point(x3, y3) {
+ x3 = +x3, y3 = +y3;
+ switch (this._point) {
+ case 0: {
+ this._point = 1;
+ if (this._line)
+ this._context.lineTo(x3, y3);
+ else
+ this._context.moveTo(x3, y3);
+ break;
+ }
+ case 1:
+ this._point = 2;
+ default: {
+ if (this._x)
+ this._context.bezierCurveTo(this._x0 = (this._x0 + x3) / 2, this._y0, this._x0, y3, x3, y3);
+ else
+ this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y3) / 2, x3, this._y0, x3, y3);
+ break;
+ }
+ }
+ this._x0 = x3, this._y0 = y3;
+ }
+};
+function bumpX(context) {
+ return new Bump(context, true);
+}
+function bumpY(context) {
+ return new Bump(context, false);
+}
+
+// node_modules/d3-shape/src/symbol/asterisk.js
+var sqrt3 = sqrt2(3);
+
+// node_modules/d3-shape/src/symbol/diamond.js
+var tan30 = sqrt2(1 / 3);
+var tan30_2 = tan30 * 2;
+
+// node_modules/d3-shape/src/symbol/star.js
+var kr = sin(pi / 10) / sin(7 * pi / 10);
+var kx = sin(tau / 10) * kr;
+var ky = -cos(tau / 10) * kr;
+
+// node_modules/d3-shape/src/symbol/triangle.js
+var sqrt32 = sqrt2(3);
+
+// node_modules/d3-shape/src/symbol/triangle2.js
+var sqrt33 = sqrt2(3);
+
+// node_modules/d3-shape/src/symbol/wye.js
+var s = sqrt2(3) / 2;
+var k = 1 / sqrt2(12);
+var a = (k / 2 + 1) * 3;
+
+// node_modules/d3-shape/src/noop.js
+function noop_default() {
+}
+
+// node_modules/d3-shape/src/curve/basisClosed.js
+function BasisClosed(context) {
+ this._context = context;
+}
+BasisClosed.prototype = {
+ areaStart: noop_default,
+ areaEnd: noop_default,
+ lineStart: function() {
+ this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;
+ this._point = 0;
+ },
+ lineEnd: function() {
+ switch (this._point) {
+ case 1: {
+ this._context.moveTo(this._x2, this._y2);
+ this._context.closePath();
+ break;
+ }
+ case 2: {
+ this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);
+ this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);
+ this._context.closePath();
+ break;
+ }
+ case 3: {
+ this.point(this._x2, this._y2);
+ this.point(this._x3, this._y3);
+ this.point(this._x4, this._y4);
+ break;
+ }
+ }
+ },
+ point: function(x3, y3) {
+ x3 = +x3, y3 = +y3;
+ switch (this._point) {
+ case 0:
+ this._point = 1;
+ this._x2 = x3, this._y2 = y3;
+ break;
+ case 1:
+ this._point = 2;
+ this._x3 = x3, this._y3 = y3;
+ break;
+ case 2:
+ this._point = 3;
+ this._x4 = x3, this._y4 = y3;
+ this._context.moveTo((this._x0 + 4 * this._x1 + x3) / 6, (this._y0 + 4 * this._y1 + y3) / 6);
+ break;
+ default:
+ point2(this, x3, y3);
+ break;
+ }
+ this._x0 = this._x1, this._x1 = x3;
+ this._y0 = this._y1, this._y1 = y3;
+ }
+};
+function basisClosed_default2(context) {
+ return new BasisClosed(context);
+}
+
+// node_modules/d3-shape/src/curve/basisOpen.js
+function BasisOpen(context) {
+ this._context = context;
+}
+BasisOpen.prototype = {
+ areaStart: function() {
+ this._line = 0;
+ },
+ areaEnd: function() {
+ this._line = NaN;
+ },
+ lineStart: function() {
+ this._x0 = this._x1 = this._y0 = this._y1 = NaN;
+ this._point = 0;
+ },
+ lineEnd: function() {
+ if (this._line || this._line !== 0 && this._point === 3)
+ this._context.closePath();
+ this._line = 1 - this._line;
+ },
+ point: function(x3, y3) {
+ x3 = +x3, y3 = +y3;
+ switch (this._point) {
+ case 0:
+ this._point = 1;
+ break;
+ case 1:
+ this._point = 2;
+ break;
+ case 2:
+ this._point = 3;
+ var x02 = (this._x0 + 4 * this._x1 + x3) / 6, y0 = (this._y0 + 4 * this._y1 + y3) / 6;
+ this._line ? this._context.lineTo(x02, y0) : this._context.moveTo(x02, y0);
+ break;
+ case 3:
+ this._point = 4;
+ default:
+ point2(this, x3, y3);
+ break;
+ }
+ this._x0 = this._x1, this._x1 = x3;
+ this._y0 = this._y1, this._y1 = y3;
+ }
+};
+function basisOpen_default(context) {
+ return new BasisOpen(context);
+}
+
+// node_modules/d3-shape/src/curve/bundle.js
+function Bundle(context, beta) {
+ this._basis = new Basis(context);
+ this._beta = beta;
+}
+Bundle.prototype = {
+ lineStart: function() {
+ this._x = [];
+ this._y = [];
+ this._basis.lineStart();
+ },
+ lineEnd: function() {
+ var x3 = this._x, y3 = this._y, j = x3.length - 1;
+ if (j > 0) {
+ var x02 = x3[0], y0 = y3[0], dx = x3[j] - x02, dy = y3[j] - y0, i = -1, t;
+ while (++i <= j) {
+ t = i / j;
+ this._basis.point(
+ this._beta * x3[i] + (1 - this._beta) * (x02 + t * dx),
+ this._beta * y3[i] + (1 - this._beta) * (y0 + t * dy)
+ );
+ }
+ }
+ this._x = this._y = null;
+ this._basis.lineEnd();
+ },
+ point: function(x3, y3) {
+ this._x.push(+x3);
+ this._y.push(+y3);
+ }
+};
+var bundle_default = function custom(beta) {
+ function bundle(context) {
+ return beta === 1 ? new Basis(context) : new Bundle(context, beta);
+ }
+ bundle.beta = function(beta2) {
+ return custom(+beta2);
+ };
+ return bundle;
+}(0.85);
+
+// node_modules/d3-shape/src/curve/cardinal.js
+function point3(that, x3, y3) {
+ that._context.bezierCurveTo(
+ that._x1 + that._k * (that._x2 - that._x0),
+ that._y1 + that._k * (that._y2 - that._y0),
+ that._x2 + that._k * (that._x1 - x3),
+ that._y2 + that._k * (that._y1 - y3),
+ that._x2,
+ that._y2
+ );
+}
+function Cardinal(context, tension) {
+ this._context = context;
+ this._k = (1 - tension) / 6;
+}
+Cardinal.prototype = {
+ areaStart: function() {
+ this._line = 0;
+ },
+ areaEnd: function() {
+ this._line = NaN;
+ },
+ lineStart: function() {
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
+ this._point = 0;
+ },
+ lineEnd: function() {
+ switch (this._point) {
+ case 2:
+ this._context.lineTo(this._x2, this._y2);
+ break;
+ case 3:
+ point3(this, this._x1, this._y1);
+ break;
+ }
+ if (this._line || this._line !== 0 && this._point === 1)
+ this._context.closePath();
+ this._line = 1 - this._line;
+ },
+ point: function(x3, y3) {
+ x3 = +x3, y3 = +y3;
+ switch (this._point) {
+ case 0:
+ this._point = 1;
+ this._line ? this._context.lineTo(x3, y3) : this._context.moveTo(x3, y3);
+ break;
+ case 1:
+ this._point = 2;
+ this._x1 = x3, this._y1 = y3;
+ break;
+ case 2:
+ this._point = 3;
+ default:
+ point3(this, x3, y3);
+ break;
+ }
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x3;
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y3;
+ }
+};
+var cardinal_default = function custom2(tension) {
+ function cardinal(context) {
+ return new Cardinal(context, tension);
+ }
+ cardinal.tension = function(tension2) {
+ return custom2(+tension2);
+ };
+ return cardinal;
+}(0);
+
+// node_modules/d3-shape/src/curve/cardinalClosed.js
+function CardinalClosed(context, tension) {
+ this._context = context;
+ this._k = (1 - tension) / 6;
+}
+CardinalClosed.prototype = {
+ areaStart: noop_default,
+ areaEnd: noop_default,
+ lineStart: function() {
+ this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
+ this._point = 0;
+ },
+ lineEnd: function() {
+ switch (this._point) {
+ case 1: {
+ this._context.moveTo(this._x3, this._y3);
+ this._context.closePath();
+ break;
+ }
+ case 2: {
+ this._context.lineTo(this._x3, this._y3);
+ this._context.closePath();
+ break;
+ }
+ case 3: {
+ this.point(this._x3, this._y3);
+ this.point(this._x4, this._y4);
+ this.point(this._x5, this._y5);
+ break;
+ }
+ }
+ },
+ point: function(x3, y3) {
+ x3 = +x3, y3 = +y3;
+ switch (this._point) {
+ case 0:
+ this._point = 1;
+ this._x3 = x3, this._y3 = y3;
+ break;
+ case 1:
+ this._point = 2;
+ this._context.moveTo(this._x4 = x3, this._y4 = y3);
+ break;
+ case 2:
+ this._point = 3;
+ this._x5 = x3, this._y5 = y3;
+ break;
+ default:
+ point3(this, x3, y3);
+ break;
+ }
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x3;
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y3;
+ }
+};
+var cardinalClosed_default = function custom3(tension) {
+ function cardinal(context) {
+ return new CardinalClosed(context, tension);
+ }
+ cardinal.tension = function(tension2) {
+ return custom3(+tension2);
+ };
+ return cardinal;
+}(0);
+
+// node_modules/d3-shape/src/curve/cardinalOpen.js
+function CardinalOpen(context, tension) {
+ this._context = context;
+ this._k = (1 - tension) / 6;
+}
+CardinalOpen.prototype = {
+ areaStart: function() {
+ this._line = 0;
+ },
+ areaEnd: function() {
+ this._line = NaN;
+ },
+ lineStart: function() {
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
+ this._point = 0;
+ },
+ lineEnd: function() {
+ if (this._line || this._line !== 0 && this._point === 3)
+ this._context.closePath();
+ this._line = 1 - this._line;
+ },
+ point: function(x3, y3) {
+ x3 = +x3, y3 = +y3;
+ switch (this._point) {
+ case 0:
+ this._point = 1;
+ break;
+ case 1:
+ this._point = 2;
+ break;
+ case 2:
+ this._point = 3;
+ this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
+ break;
+ case 3:
+ this._point = 4;
+ default:
+ point3(this, x3, y3);
+ break;
+ }
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x3;
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y3;
+ }
+};
+var cardinalOpen_default = function custom4(tension) {
+ function cardinal(context) {
+ return new CardinalOpen(context, tension);
+ }
+ cardinal.tension = function(tension2) {
+ return custom4(+tension2);
+ };
+ return cardinal;
+}(0);
+
+// node_modules/d3-shape/src/curve/catmullRom.js
+function point4(that, x3, y3) {
+ var x12 = that._x1, y1 = that._y1, x22 = that._x2, y22 = that._y2;
+ if (that._l01_a > epsilon3) {
+ var a2 = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a, n = 3 * that._l01_a * (that._l01_a + that._l12_a);
+ x12 = (x12 * a2 - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;
+ y1 = (y1 * a2 - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;
+ }
+ if (that._l23_a > epsilon3) {
+ var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a, m = 3 * that._l23_a * (that._l23_a + that._l12_a);
+ x22 = (x22 * b + that._x1 * that._l23_2a - x3 * that._l12_2a) / m;
+ y22 = (y22 * b + that._y1 * that._l23_2a - y3 * that._l12_2a) / m;
+ }
+ that._context.bezierCurveTo(x12, y1, x22, y22, that._x2, that._y2);
+}
+function CatmullRom(context, alpha) {
+ this._context = context;
+ this._alpha = alpha;
+}
+CatmullRom.prototype = {
+ areaStart: function() {
+ this._line = 0;
+ },
+ areaEnd: function() {
+ this._line = NaN;
+ },
+ lineStart: function() {
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
+ this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
+ },
+ lineEnd: function() {
+ switch (this._point) {
+ case 2:
+ this._context.lineTo(this._x2, this._y2);
+ break;
+ case 3:
+ this.point(this._x2, this._y2);
+ break;
+ }
+ if (this._line || this._line !== 0 && this._point === 1)
+ this._context.closePath();
+ this._line = 1 - this._line;
+ },
+ point: function(x3, y3) {
+ x3 = +x3, y3 = +y3;
+ if (this._point) {
+ var x23 = this._x2 - x3, y23 = this._y2 - y3;
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
+ }
+ switch (this._point) {
+ case 0:
+ this._point = 1;
+ this._line ? this._context.lineTo(x3, y3) : this._context.moveTo(x3, y3);
+ break;
+ case 1:
+ this._point = 2;
+ break;
+ case 2:
+ this._point = 3;
+ default:
+ point4(this, x3, y3);
+ break;
+ }
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a;
+ this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x3;
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y3;
+ }
+};
+var catmullRom_default = function custom5(alpha) {
+ function catmullRom(context) {
+ return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);
+ }
+ catmullRom.alpha = function(alpha2) {
+ return custom5(+alpha2);
+ };
+ return catmullRom;
+}(0.5);
+
+// node_modules/d3-shape/src/curve/catmullRomClosed.js
+function CatmullRomClosed(context, alpha) {
+ this._context = context;
+ this._alpha = alpha;
+}
+CatmullRomClosed.prototype = {
+ areaStart: noop_default,
+ areaEnd: noop_default,
+ lineStart: function() {
+ this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
+ this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
+ },
+ lineEnd: function() {
+ switch (this._point) {
+ case 1: {
+ this._context.moveTo(this._x3, this._y3);
+ this._context.closePath();
+ break;
+ }
+ case 2: {
+ this._context.lineTo(this._x3, this._y3);
+ this._context.closePath();
+ break;
+ }
+ case 3: {
+ this.point(this._x3, this._y3);
+ this.point(this._x4, this._y4);
+ this.point(this._x5, this._y5);
+ break;
+ }
+ }
+ },
+ point: function(x3, y3) {
+ x3 = +x3, y3 = +y3;
+ if (this._point) {
+ var x23 = this._x2 - x3, y23 = this._y2 - y3;
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
+ }
+ switch (this._point) {
+ case 0:
+ this._point = 1;
+ this._x3 = x3, this._y3 = y3;
+ break;
+ case 1:
+ this._point = 2;
+ this._context.moveTo(this._x4 = x3, this._y4 = y3);
+ break;
+ case 2:
+ this._point = 3;
+ this._x5 = x3, this._y5 = y3;
+ break;
+ default:
+ point4(this, x3, y3);
+ break;
+ }
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a;
+ this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x3;
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y3;
+ }
+};
+var catmullRomClosed_default = function custom6(alpha) {
+ function catmullRom(context) {
+ return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);
+ }
+ catmullRom.alpha = function(alpha2) {
+ return custom6(+alpha2);
+ };
+ return catmullRom;
+}(0.5);
+
+// node_modules/d3-shape/src/curve/catmullRomOpen.js
+function CatmullRomOpen(context, alpha) {
+ this._context = context;
+ this._alpha = alpha;
+}
+CatmullRomOpen.prototype = {
+ areaStart: function() {
+ this._line = 0;
+ },
+ areaEnd: function() {
+ this._line = NaN;
+ },
+ lineStart: function() {
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
+ this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
+ },
+ lineEnd: function() {
+ if (this._line || this._line !== 0 && this._point === 3)
+ this._context.closePath();
+ this._line = 1 - this._line;
+ },
+ point: function(x3, y3) {
+ x3 = +x3, y3 = +y3;
+ if (this._point) {
+ var x23 = this._x2 - x3, y23 = this._y2 - y3;
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
+ }
+ switch (this._point) {
+ case 0:
+ this._point = 1;
+ break;
+ case 1:
+ this._point = 2;
+ break;
+ case 2:
+ this._point = 3;
+ this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
+ break;
+ case 3:
+ this._point = 4;
+ default:
+ point4(this, x3, y3);
+ break;
+ }
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a;
+ this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x3;
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y3;
+ }
+};
+var catmullRomOpen_default = function custom7(alpha) {
+ function catmullRom(context) {
+ return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);
+ }
+ catmullRom.alpha = function(alpha2) {
+ return custom7(+alpha2);
+ };
+ return catmullRom;
+}(0.5);
+
+// node_modules/d3-shape/src/curve/linearClosed.js
+function LinearClosed(context) {
+ this._context = context;
+}
+LinearClosed.prototype = {
+ areaStart: noop_default,
+ areaEnd: noop_default,
+ lineStart: function() {
+ this._point = 0;
+ },
+ lineEnd: function() {
+ if (this._point)
+ this._context.closePath();
+ },
+ point: function(x3, y3) {
+ x3 = +x3, y3 = +y3;
+ if (this._point)
+ this._context.lineTo(x3, y3);
+ else
+ this._point = 1, this._context.moveTo(x3, y3);
+ }
+};
+function linearClosed_default(context) {
+ return new LinearClosed(context);
+}
+
+// node_modules/d3-shape/src/curve/monotone.js
+function sign(x3) {
+ return x3 < 0 ? -1 : 1;
+}
+function slope3(that, x22, y22) {
+ var h0 = that._x1 - that._x0, h1 = x22 - that._x1, s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), s1 = (y22 - that._y1) / (h1 || h0 < 0 && -0), p = (s0 * h1 + s1 * h0) / (h0 + h1);
+ return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;
+}
+function slope2(that, t) {
+ var h = that._x1 - that._x0;
+ return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;
+}
+function point5(that, t03, t13) {
+ var x02 = that._x0, y0 = that._y0, x12 = that._x1, y1 = that._y1, dx = (x12 - x02) / 3;
+ that._context.bezierCurveTo(x02 + dx, y0 + dx * t03, x12 - dx, y1 - dx * t13, x12, y1);
+}
+function MonotoneX(context) {
+ this._context = context;
+}
+MonotoneX.prototype = {
+ areaStart: function() {
+ this._line = 0;
+ },
+ areaEnd: function() {
+ this._line = NaN;
+ },
+ lineStart: function() {
+ this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN;
+ this._point = 0;
+ },
+ lineEnd: function() {
+ switch (this._point) {
+ case 2:
+ this._context.lineTo(this._x1, this._y1);
+ break;
+ case 3:
+ point5(this, this._t0, slope2(this, this._t0));
+ break;
+ }
+ if (this._line || this._line !== 0 && this._point === 1)
+ this._context.closePath();
+ this._line = 1 - this._line;
+ },
+ point: function(x3, y3) {
+ var t13 = NaN;
+ x3 = +x3, y3 = +y3;
+ if (x3 === this._x1 && y3 === this._y1)
+ return;
+ switch (this._point) {
+ case 0:
+ this._point = 1;
+ this._line ? this._context.lineTo(x3, y3) : this._context.moveTo(x3, y3);
+ break;
+ case 1:
+ this._point = 2;
+ break;
+ case 2:
+ this._point = 3;
+ point5(this, slope2(this, t13 = slope3(this, x3, y3)), t13);
+ break;
+ default:
+ point5(this, this._t0, t13 = slope3(this, x3, y3));
+ break;
+ }
+ this._x0 = this._x1, this._x1 = x3;
+ this._y0 = this._y1, this._y1 = y3;
+ this._t0 = t13;
+ }
+};
+function MonotoneY(context) {
+ this._context = new ReflectContext(context);
+}
+(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x3, y3) {
+ MonotoneX.prototype.point.call(this, y3, x3);
+};
+function ReflectContext(context) {
+ this._context = context;
+}
+ReflectContext.prototype = {
+ moveTo: function(x3, y3) {
+ this._context.moveTo(y3, x3);
+ },
+ closePath: function() {
+ this._context.closePath();
+ },
+ lineTo: function(x3, y3) {
+ this._context.lineTo(y3, x3);
+ },
+ bezierCurveTo: function(x12, y1, x22, y22, x3, y3) {
+ this._context.bezierCurveTo(y1, x12, y22, x22, y3, x3);
+ }
+};
+function monotoneX(context) {
+ return new MonotoneX(context);
+}
+function monotoneY(context) {
+ return new MonotoneY(context);
+}
+
+// node_modules/d3-shape/src/curve/natural.js
+function Natural(context) {
+ this._context = context;
+}
+Natural.prototype = {
+ areaStart: function() {
+ this._line = 0;
+ },
+ areaEnd: function() {
+ this._line = NaN;
+ },
+ lineStart: function() {
+ this._x = [];
+ this._y = [];
+ },
+ lineEnd: function() {
+ var x3 = this._x, y3 = this._y, n = x3.length;
+ if (n) {
+ this._line ? this._context.lineTo(x3[0], y3[0]) : this._context.moveTo(x3[0], y3[0]);
+ if (n === 2) {
+ this._context.lineTo(x3[1], y3[1]);
+ } else {
+ var px = controlPoints(x3), py = controlPoints(y3);
+ for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {
+ this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x3[i1], y3[i1]);
+ }
+ }
+ }
+ if (this._line || this._line !== 0 && n === 1)
+ this._context.closePath();
+ this._line = 1 - this._line;
+ this._x = this._y = null;
+ },
+ point: function(x3, y3) {
+ this._x.push(+x3);
+ this._y.push(+y3);
+ }
+};
+function controlPoints(x3) {
+ var i, n = x3.length - 1, m, a2 = new Array(n), b = new Array(n), r = new Array(n);
+ a2[0] = 0, b[0] = 2, r[0] = x3[0] + 2 * x3[1];
+ for (i = 1; i < n - 1; ++i)
+ a2[i] = 1, b[i] = 4, r[i] = 4 * x3[i] + 2 * x3[i + 1];
+ a2[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x3[n - 1] + x3[n];
+ for (i = 1; i < n; ++i)
+ m = a2[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];
+ a2[n - 1] = r[n - 1] / b[n - 1];
+ for (i = n - 2; i >= 0; --i)
+ a2[i] = (r[i] - a2[i + 1]) / b[i];
+ b[n - 1] = (x3[n] + a2[n - 1]) / 2;
+ for (i = 0; i < n - 1; ++i)
+ b[i] = 2 * x3[i + 1] - a2[i + 1];
+ return [a2, b];
+}
+function natural_default(context) {
+ return new Natural(context);
+}
+
+// node_modules/d3-shape/src/curve/step.js
+function Step(context, t) {
+ this._context = context;
+ this._t = t;
+}
+Step.prototype = {
+ areaStart: function() {
+ this._line = 0;
+ },
+ areaEnd: function() {
+ this._line = NaN;
+ },
+ lineStart: function() {
+ this._x = this._y = NaN;
+ this._point = 0;
+ },
+ lineEnd: function() {
+ if (0 < this._t && this._t < 1 && this._point === 2)
+ this._context.lineTo(this._x, this._y);
+ if (this._line || this._line !== 0 && this._point === 1)
+ this._context.closePath();
+ if (this._line >= 0)
+ this._t = 1 - this._t, this._line = 1 - this._line;
+ },
+ point: function(x3, y3) {
+ x3 = +x3, y3 = +y3;
+ switch (this._point) {
+ case 0:
+ this._point = 1;
+ this._line ? this._context.lineTo(x3, y3) : this._context.moveTo(x3, y3);
+ break;
+ case 1:
+ this._point = 2;
+ default: {
+ if (this._t <= 0) {
+ this._context.lineTo(this._x, y3);
+ this._context.lineTo(x3, y3);
+ } else {
+ var x12 = this._x * (1 - this._t) + x3 * this._t;
+ this._context.lineTo(x12, this._y);
+ this._context.lineTo(x12, y3);
+ }
+ break;
+ }
+ }
+ this._x = x3, this._y = y3;
+ }
+};
+function step_default(context) {
+ return new Step(context, 0.5);
+}
+function stepBefore(context) {
+ return new Step(context, 0);
+}
+function stepAfter(context) {
+ return new Step(context, 1);
+}
+
+// node_modules/d3-dispatch/src/dispatch.js
+var noop = { value: () => {
+} };
+function dispatch() {
+ for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
+ if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t))
+ throw new Error("illegal type: " + t);
+ _[t] = [];
+ }
+ return new Dispatch(_);
+}
+function Dispatch(_) {
+ this._ = _;
+}
+function parseTypenames2(typenames, types) {
+ return typenames.trim().split(/^|\s+/).map(function(t) {
+ var name = "", i = t.indexOf(".");
+ if (i >= 0)
+ name = t.slice(i + 1), t = t.slice(0, i);
+ if (t && !types.hasOwnProperty(t))
+ throw new Error("unknown type: " + t);
+ return { type: t, name };
+ });
+}
+Dispatch.prototype = dispatch.prototype = {
+ constructor: Dispatch,
+ on: function(typename, callback) {
+ var _ = this._, T = parseTypenames2(typename + "", _), t, i = -1, n = T.length;
+ if (arguments.length < 2) {
+ while (++i < n)
+ if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name)))
+ return t;
+ return;
+ }
+ if (callback != null && typeof callback !== "function")
+ throw new Error("invalid callback: " + callback);
+ while (++i < n) {
+ if (t = (typename = T[i]).type)
+ _[t] = set(_[t], typename.name, callback);
+ else if (callback == null)
+ for (t in _)
+ _[t] = set(_[t], typename.name, null);
+ }
+ return this;
+ },
+ copy: function() {
+ var copy4 = {}, _ = this._;
+ for (var t in _)
+ copy4[t] = _[t].slice();
+ return new Dispatch(copy4);
+ },
+ call: function(type3, that) {
+ if ((n = arguments.length - 2) > 0)
+ for (var args = new Array(n), i = 0, n, t; i < n; ++i)
+ args[i] = arguments[i + 2];
+ if (!this._.hasOwnProperty(type3))
+ throw new Error("unknown type: " + type3);
+ for (t = this._[type3], i = 0, n = t.length; i < n; ++i)
+ t[i].value.apply(that, args);
+ },
+ apply: function(type3, that, args) {
+ if (!this._.hasOwnProperty(type3))
+ throw new Error("unknown type: " + type3);
+ for (var t = this._[type3], i = 0, n = t.length; i < n; ++i)
+ t[i].value.apply(that, args);
+ }
+};
+function get(type3, name) {
+ for (var i = 0, n = type3.length, c3; i < n; ++i) {
+ if ((c3 = type3[i]).name === name) {
+ return c3.value;
+ }
+ }
+}
+function set(type3, name, callback) {
+ for (var i = 0, n = type3.length; i < n; ++i) {
+ if (type3[i].name === name) {
+ type3[i] = noop, type3 = type3.slice(0, i).concat(type3.slice(i + 1));
+ break;
+ }
+ }
+ if (callback != null)
+ type3.push({ name, value: callback });
+ return type3;
+}
+var dispatch_default2 = dispatch;
+
+// node_modules/d3-drag/src/event.js
+function DragEvent(type3, {
+ sourceEvent,
+ subject,
+ target,
+ identifier: identifier2,
+ active,
+ x: x3,
+ y: y3,
+ dx,
+ dy,
+ dispatch: dispatch2
+}) {
+ Object.defineProperties(this, {
+ type: { value: type3, enumerable: true, configurable: true },
+ sourceEvent: { value: sourceEvent, enumerable: true, configurable: true },
+ subject: { value: subject, enumerable: true, configurable: true },
+ target: { value: target, enumerable: true, configurable: true },
+ identifier: { value: identifier2, enumerable: true, configurable: true },
+ active: { value: active, enumerable: true, configurable: true },
+ x: { value: x3, enumerable: true, configurable: true },
+ y: { value: y3, enumerable: true, configurable: true },
+ dx: { value: dx, enumerable: true, configurable: true },
+ dy: { value: dy, enumerable: true, configurable: true },
+ _: { value: dispatch2 }
+ });
+}
+DragEvent.prototype.on = function() {
+ var value = this._.on.apply(this._, arguments);
+ return value === this._ ? this : value;
+};
+
+// node_modules/d3-timer/src/timer.js
+var frame = 0;
+var timeout = 0;
+var interval = 0;
+var pokeDelay = 1e3;
+var taskHead;
+var taskTail;
+var clockLast = 0;
+var clockNow = 0;
+var clockSkew = 0;
+var clock = typeof performance === "object" && performance.now ? performance : Date;
+var setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) {
+ setTimeout(f, 17);
+};
+function now() {
+ return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);
+}
+function clearNow() {
+ clockNow = 0;
+}
+function Timer() {
+ this._call = this._time = this._next = null;
+}
+Timer.prototype = timer.prototype = {
+ constructor: Timer,
+ restart: function(callback, delay, time2) {
+ if (typeof callback !== "function")
+ throw new TypeError("callback is not a function");
+ time2 = (time2 == null ? now() : +time2) + (delay == null ? 0 : +delay);
+ if (!this._next && taskTail !== this) {
+ if (taskTail)
+ taskTail._next = this;
+ else
+ taskHead = this;
+ taskTail = this;
+ }
+ this._call = callback;
+ this._time = time2;
+ sleep();
+ },
+ stop: function() {
+ if (this._call) {
+ this._call = null;
+ this._time = Infinity;
+ sleep();
+ }
+ }
+};
+function timer(callback, delay, time2) {
+ var t = new Timer();
+ t.restart(callback, delay, time2);
+ return t;
+}
+function timerFlush() {
+ now();
+ ++frame;
+ var t = taskHead, e;
+ while (t) {
+ if ((e = clockNow - t._time) >= 0)
+ t._call.call(void 0, e);
+ t = t._next;
+ }
+ --frame;
+}
+function wake() {
+ clockNow = (clockLast = clock.now()) + clockSkew;
+ frame = timeout = 0;
+ try {
+ timerFlush();
+ } finally {
+ frame = 0;
+ nap();
+ clockNow = 0;
+ }
+}
+function poke() {
+ var now2 = clock.now(), delay = now2 - clockLast;
+ if (delay > pokeDelay)
+ clockSkew -= delay, clockLast = now2;
+}
+function nap() {
+ var t03, t13 = taskHead, t22, time2 = Infinity;
+ while (t13) {
+ if (t13._call) {
+ if (time2 > t13._time)
+ time2 = t13._time;
+ t03 = t13, t13 = t13._next;
+ } else {
+ t22 = t13._next, t13._next = null;
+ t13 = t03 ? t03._next = t22 : taskHead = t22;
+ }
+ }
+ taskTail = t03;
+ sleep(time2);
+}
+function sleep(time2) {
+ if (frame)
+ return;
+ if (timeout)
+ timeout = clearTimeout(timeout);
+ var delay = time2 - clockNow;
+ if (delay > 24) {
+ if (time2 < Infinity)
+ timeout = setTimeout(wake, time2 - clock.now() - clockSkew);
+ if (interval)
+ interval = clearInterval(interval);
+ } else {
+ if (!interval)
+ clockLast = clock.now(), interval = setInterval(poke, pokeDelay);
+ frame = 1, setFrame(wake);
+ }
+}
+
+// node_modules/d3-timer/src/timeout.js
+function timeout_default(callback, delay, time2) {
+ var t = new Timer();
+ delay = delay == null ? 0 : +delay;
+ t.restart((elapsed) => {
+ t.stop();
+ callback(elapsed + delay);
+ }, delay, time2);
+ return t;
+}
+
+// node_modules/d3-transition/src/transition/schedule.js
+var emptyOn = dispatch_default2("start", "end", "cancel", "interrupt");
+var emptyTween = [];
+var CREATED = 0;
+var SCHEDULED = 1;
+var STARTING = 2;
+var STARTED = 3;
+var RUNNING = 4;
+var ENDING = 5;
+var ENDED = 6;
+function schedule_default(node2, name, id3, index2, group2, timing) {
+ var schedules = node2.__transition;
+ if (!schedules)
+ node2.__transition = {};
+ else if (id3 in schedules)
+ return;
+ create(node2, id3, {
+ name,
+ index: index2,
+ // For context during callback.
+ group: group2,
+ // For context during callback.
+ on: emptyOn,
+ tween: emptyTween,
+ time: timing.time,
+ delay: timing.delay,
+ duration: timing.duration,
+ ease: timing.ease,
+ timer: null,
+ state: CREATED
+ });
+}
+function init(node2, id3) {
+ var schedule = get2(node2, id3);
+ if (schedule.state > CREATED)
+ throw new Error("too late; already scheduled");
+ return schedule;
+}
+function set2(node2, id3) {
+ var schedule = get2(node2, id3);
+ if (schedule.state > STARTED)
+ throw new Error("too late; already running");
+ return schedule;
+}
+function get2(node2, id3) {
+ var schedule = node2.__transition;
+ if (!schedule || !(schedule = schedule[id3]))
+ throw new Error("transition not found");
+ return schedule;
+}
+function create(node2, id3, self2) {
+ var schedules = node2.__transition, tween;
+ schedules[id3] = self2;
+ self2.timer = timer(schedule, 0, self2.time);
+ function schedule(elapsed) {
+ self2.state = SCHEDULED;
+ self2.timer.restart(start2, self2.delay, self2.time);
+ if (self2.delay <= elapsed)
+ start2(elapsed - self2.delay);
+ }
+ function start2(elapsed) {
+ var i, j, n, o;
+ if (self2.state !== SCHEDULED)
+ return stop();
+ for (i in schedules) {
+ o = schedules[i];
+ if (o.name !== self2.name)
+ continue;
+ if (o.state === STARTED)
+ return timeout_default(start2);
+ if (o.state === RUNNING) {
+ o.state = ENDED;
+ o.timer.stop();
+ o.on.call("interrupt", node2, node2.__data__, o.index, o.group);
+ delete schedules[i];
+ } else if (+i < id3) {
+ o.state = ENDED;
+ o.timer.stop();
+ o.on.call("cancel", node2, node2.__data__, o.index, o.group);
+ delete schedules[i];
+ }
+ }
+ timeout_default(function() {
+ if (self2.state === STARTED) {
+ self2.state = RUNNING;
+ self2.timer.restart(tick, self2.delay, self2.time);
+ tick(elapsed);
+ }
+ });
+ self2.state = STARTING;
+ self2.on.call("start", node2, node2.__data__, self2.index, self2.group);
+ if (self2.state !== STARTING)
+ return;
+ self2.state = STARTED;
+ tween = new Array(n = self2.tween.length);
+ for (i = 0, j = -1; i < n; ++i) {
+ if (o = self2.tween[i].value.call(node2, node2.__data__, self2.index, self2.group)) {
+ tween[++j] = o;
+ }
+ }
+ tween.length = j + 1;
+ }
+ function tick(elapsed) {
+ var t = elapsed < self2.duration ? self2.ease.call(null, elapsed / self2.duration) : (self2.timer.restart(stop), self2.state = ENDING, 1), i = -1, n = tween.length;
+ while (++i < n) {
+ tween[i].call(node2, t);
+ }
+ if (self2.state === ENDING) {
+ self2.on.call("end", node2, node2.__data__, self2.index, self2.group);
+ stop();
+ }
+ }
+ function stop() {
+ self2.state = ENDED;
+ self2.timer.stop();
+ delete schedules[id3];
+ for (var i in schedules)
+ return;
+ delete node2.__transition;
+ }
+}
+
+// node_modules/d3-transition/src/interrupt.js
+function interrupt_default(node2, name) {
+ var schedules = node2.__transition, schedule, active, empty2 = true, i;
+ if (!schedules)
+ return;
+ name = name == null ? null : name + "";
+ for (i in schedules) {
+ if ((schedule = schedules[i]).name !== name) {
+ empty2 = false;
+ continue;
+ }
+ active = schedule.state > STARTING && schedule.state < ENDING;
+ schedule.state = ENDED;
+ schedule.timer.stop();
+ schedule.on.call(active ? "interrupt" : "cancel", node2, node2.__data__, schedule.index, schedule.group);
+ delete schedules[i];
+ }
+ if (empty2)
+ delete node2.__transition;
+}
+
+// node_modules/d3-transition/src/selection/interrupt.js
+function interrupt_default2(name) {
+ return this.each(function() {
+ interrupt_default(this, name);
+ });
+}
+
+// node_modules/d3-transition/src/transition/tween.js
+function tweenRemove(id3, name) {
+ var tween0, tween1;
+ return function() {
+ var schedule = set2(this, id3), tween = schedule.tween;
+ if (tween !== tween0) {
+ tween1 = tween0 = tween;
+ for (var i = 0, n = tween1.length; i < n; ++i) {
+ if (tween1[i].name === name) {
+ tween1 = tween1.slice();
+ tween1.splice(i, 1);
+ break;
+ }
+ }
+ }
+ schedule.tween = tween1;
+ };
+}
+function tweenFunction(id3, name, value) {
+ var tween0, tween1;
+ if (typeof value !== "function")
+ throw new Error();
+ return function() {
+ var schedule = set2(this, id3), tween = schedule.tween;
+ if (tween !== tween0) {
+ tween1 = (tween0 = tween).slice();
+ for (var t = { name, value }, i = 0, n = tween1.length; i < n; ++i) {
+ if (tween1[i].name === name) {
+ tween1[i] = t;
+ break;
+ }
+ }
+ if (i === n)
+ tween1.push(t);
+ }
+ schedule.tween = tween1;
+ };
+}
+function tween_default(name, value) {
+ var id3 = this._id;
+ name += "";
+ if (arguments.length < 2) {
+ var tween = get2(this.node(), id3).tween;
+ for (var i = 0, n = tween.length, t; i < n; ++i) {
+ if ((t = tween[i]).name === name) {
+ return t.value;
+ }
+ }
+ return null;
+ }
+ return this.each((value == null ? tweenRemove : tweenFunction)(id3, name, value));
+}
+function tweenValue(transition2, name, value) {
+ var id3 = transition2._id;
+ transition2.each(function() {
+ var schedule = set2(this, id3);
+ (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);
+ });
+ return function(node2) {
+ return get2(node2, id3).value[name];
+ };
+}
+
+// node_modules/d3-transition/src/transition/interpolate.js
+function interpolate_default(a2, b) {
+ var c3;
+ return (typeof b === "number" ? number_default : b instanceof color ? rgb_default : (c3 = color(b)) ? (b = c3, rgb_default) : string_default)(a2, b);
+}
+
+// node_modules/d3-transition/src/transition/attr.js
+function attrRemove2(name) {
+ return function() {
+ this.removeAttribute(name);
+ };
+}
+function attrRemoveNS2(fullname) {
+ return function() {
+ this.removeAttributeNS(fullname.space, fullname.local);
+ };
+}
+function attrConstant2(name, interpolate, value1) {
+ var string00, string1 = value1 + "", interpolate0;
+ return function() {
+ var string0 = this.getAttribute(name);
+ return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
+ };
+}
+function attrConstantNS2(fullname, interpolate, value1) {
+ var string00, string1 = value1 + "", interpolate0;
+ return function() {
+ var string0 = this.getAttributeNS(fullname.space, fullname.local);
+ return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
+ };
+}
+function attrFunction2(name, interpolate, value) {
+ var string00, string10, interpolate0;
+ return function() {
+ var string0, value1 = value(this), string1;
+ if (value1 == null)
+ return void this.removeAttribute(name);
+ string0 = this.getAttribute(name);
+ string1 = value1 + "";
+ return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
+ };
+}
+function attrFunctionNS2(fullname, interpolate, value) {
+ var string00, string10, interpolate0;
+ return function() {
+ var string0, value1 = value(this), string1;
+ if (value1 == null)
+ return void this.removeAttributeNS(fullname.space, fullname.local);
+ string0 = this.getAttributeNS(fullname.space, fullname.local);
+ string1 = value1 + "";
+ return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
+ };
+}
+function attr_default2(name, value) {
+ var fullname = namespace_default(name), i = fullname === "transform" ? interpolateTransformSvg : interpolate_default;
+ return this.attrTween(name, typeof value === "function" ? (fullname.local ? attrFunctionNS2 : attrFunction2)(fullname, i, tweenValue(this, "attr." + name, value)) : value == null ? (fullname.local ? attrRemoveNS2 : attrRemove2)(fullname) : (fullname.local ? attrConstantNS2 : attrConstant2)(fullname, i, value));
+}
+
+// node_modules/d3-transition/src/transition/attrTween.js
+function attrInterpolate(name, i) {
+ return function(t) {
+ this.setAttribute(name, i.call(this, t));
+ };
+}
+function attrInterpolateNS(fullname, i) {
+ return function(t) {
+ this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));
+ };
+}
+function attrTweenNS(fullname, value) {
+ var t03, i0;
+ function tween() {
+ var i = value.apply(this, arguments);
+ if (i !== i0)
+ t03 = (i0 = i) && attrInterpolateNS(fullname, i);
+ return t03;
+ }
+ tween._value = value;
+ return tween;
+}
+function attrTween(name, value) {
+ var t03, i0;
+ function tween() {
+ var i = value.apply(this, arguments);
+ if (i !== i0)
+ t03 = (i0 = i) && attrInterpolate(name, i);
+ return t03;
+ }
+ tween._value = value;
+ return tween;
+}
+function attrTween_default(name, value) {
+ var key = "attr." + name;
+ if (arguments.length < 2)
+ return (key = this.tween(key)) && key._value;
+ if (value == null)
+ return this.tween(key, null);
+ if (typeof value !== "function")
+ throw new Error();
+ var fullname = namespace_default(name);
+ return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));
+}
+
+// node_modules/d3-transition/src/transition/delay.js
+function delayFunction(id3, value) {
+ return function() {
+ init(this, id3).delay = +value.apply(this, arguments);
+ };
+}
+function delayConstant(id3, value) {
+ return value = +value, function() {
+ init(this, id3).delay = value;
+ };
+}
+function delay_default(value) {
+ var id3 = this._id;
+ return arguments.length ? this.each((typeof value === "function" ? delayFunction : delayConstant)(id3, value)) : get2(this.node(), id3).delay;
+}
+
+// node_modules/d3-transition/src/transition/duration.js
+function durationFunction(id3, value) {
+ return function() {
+ set2(this, id3).duration = +value.apply(this, arguments);
+ };
+}
+function durationConstant(id3, value) {
+ return value = +value, function() {
+ set2(this, id3).duration = value;
+ };
+}
+function duration_default(value) {
+ var id3 = this._id;
+ return arguments.length ? this.each((typeof value === "function" ? durationFunction : durationConstant)(id3, value)) : get2(this.node(), id3).duration;
+}
+
+// node_modules/d3-transition/src/transition/ease.js
+function easeConstant(id3, value) {
+ if (typeof value !== "function")
+ throw new Error();
+ return function() {
+ set2(this, id3).ease = value;
+ };
+}
+function ease_default(value) {
+ var id3 = this._id;
+ return arguments.length ? this.each(easeConstant(id3, value)) : get2(this.node(), id3).ease;
+}
+
+// node_modules/d3-transition/src/transition/easeVarying.js
+function easeVarying(id3, value) {
+ return function() {
+ var v2 = value.apply(this, arguments);
+ if (typeof v2 !== "function")
+ throw new Error();
+ set2(this, id3).ease = v2;
+ };
+}
+function easeVarying_default(value) {
+ if (typeof value !== "function")
+ throw new Error();
+ return this.each(easeVarying(this._id, value));
+}
+
+// node_modules/d3-transition/src/transition/filter.js
+function filter_default2(match2) {
+ if (typeof match2 !== "function")
+ match2 = matcher_default(match2);
+ for (var groups2 = this._groups, m = groups2.length, subgroups = new Array(m), j = 0; j < m; ++j) {
+ for (var group2 = groups2[j], n = group2.length, subgroup = subgroups[j] = [], node2, i = 0; i < n; ++i) {
+ if ((node2 = group2[i]) && match2.call(node2, node2.__data__, i, group2)) {
+ subgroup.push(node2);
+ }
+ }
+ }
+ return new Transition(subgroups, this._parents, this._name, this._id);
+}
+
+// node_modules/d3-transition/src/transition/merge.js
+function merge_default2(transition2) {
+ if (transition2._id !== this._id)
+ throw new Error();
+ for (var groups0 = this._groups, groups1 = transition2._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
+ for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge3 = merges[j] = new Array(n), node2, i = 0; i < n; ++i) {
+ if (node2 = group0[i] || group1[i]) {
+ merge3[i] = node2;
+ }
+ }
+ }
+ for (; j < m0; ++j) {
+ merges[j] = groups0[j];
+ }
+ return new Transition(merges, this._parents, this._name, this._id);
+}
+
+// node_modules/d3-transition/src/transition/on.js
+function start(name) {
+ return (name + "").trim().split(/^|\s+/).every(function(t) {
+ var i = t.indexOf(".");
+ if (i >= 0)
+ t = t.slice(0, i);
+ return !t || t === "start";
+ });
+}
+function onFunction(id3, name, listener) {
+ var on0, on1, sit = start(name) ? init : set2;
+ return function() {
+ var schedule = sit(this, id3), on = schedule.on;
+ if (on !== on0)
+ (on1 = (on0 = on).copy()).on(name, listener);
+ schedule.on = on1;
+ };
+}
+function on_default2(name, listener) {
+ var id3 = this._id;
+ return arguments.length < 2 ? get2(this.node(), id3).on.on(name) : this.each(onFunction(id3, name, listener));
+}
+
+// node_modules/d3-transition/src/transition/remove.js
+function removeFunction(id3) {
+ return function() {
+ var parent = this.parentNode;
+ for (var i in this.__transition)
+ if (+i !== id3)
+ return;
+ if (parent)
+ parent.removeChild(this);
+ };
+}
+function remove_default2() {
+ return this.on("end.remove", removeFunction(this._id));
+}
+
+// node_modules/d3-transition/src/transition/select.js
+function select_default3(select) {
+ var name = this._name, id3 = this._id;
+ if (typeof select !== "function")
+ select = selector_default(select);
+ for (var groups2 = this._groups, m = groups2.length, subgroups = new Array(m), j = 0; j < m; ++j) {
+ for (var group2 = groups2[j], n = group2.length, subgroup = subgroups[j] = new Array(n), node2, subnode, i = 0; i < n; ++i) {
+ if ((node2 = group2[i]) && (subnode = select.call(node2, node2.__data__, i, group2))) {
+ if ("__data__" in node2)
+ subnode.__data__ = node2.__data__;
+ subgroup[i] = subnode;
+ schedule_default(subgroup[i], name, id3, i, subgroup, get2(node2, id3));
+ }
+ }
+ }
+ return new Transition(subgroups, this._parents, name, id3);
+}
+
+// node_modules/d3-transition/src/transition/selectAll.js
+function selectAll_default3(select) {
+ var name = this._name, id3 = this._id;
+ if (typeof select !== "function")
+ select = selectorAll_default(select);
+ for (var groups2 = this._groups, m = groups2.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
+ for (var group2 = groups2[j], n = group2.length, node2, i = 0; i < n; ++i) {
+ if (node2 = group2[i]) {
+ for (var children2 = select.call(node2, node2.__data__, i, group2), child, inherit2 = get2(node2, id3), k2 = 0, l = children2.length; k2 < l; ++k2) {
+ if (child = children2[k2]) {
+ schedule_default(child, name, id3, k2, children2, inherit2);
+ }
+ }
+ subgroups.push(children2);
+ parents.push(node2);
+ }
+ }
+ }
+ return new Transition(subgroups, parents, name, id3);
+}
+
+// node_modules/d3-transition/src/transition/selection.js
+var Selection2 = selection_default.prototype.constructor;
+function selection_default2() {
+ return new Selection2(this._groups, this._parents);
+}
+
+// node_modules/d3-transition/src/transition/style.js
+function styleNull(name, interpolate) {
+ var string00, string10, interpolate0;
+ return function() {
+ var string0 = styleValue(this, name), string1 = (this.style.removeProperty(name), styleValue(this, name));
+ return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate(string00 = string0, string10 = string1);
+ };
+}
+function styleRemove2(name) {
+ return function() {
+ this.style.removeProperty(name);
+ };
+}
+function styleConstant2(name, interpolate, value1) {
+ var string00, string1 = value1 + "", interpolate0;
+ return function() {
+ var string0 = styleValue(this, name);
+ return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
+ };
+}
+function styleFunction2(name, interpolate, value) {
+ var string00, string10, interpolate0;
+ return function() {
+ var string0 = styleValue(this, name), value1 = value(this), string1 = value1 + "";
+ if (value1 == null)
+ string1 = value1 = (this.style.removeProperty(name), styleValue(this, name));
+ return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
+ };
+}
+function styleMaybeRemove(id3, name) {
+ var on0, on1, listener0, key = "style." + name, event = "end." + key, remove2;
+ return function() {
+ var schedule = set2(this, id3), on = schedule.on, listener = schedule.value[key] == null ? remove2 || (remove2 = styleRemove2(name)) : void 0;
+ if (on !== on0 || listener0 !== listener)
+ (on1 = (on0 = on).copy()).on(event, listener0 = listener);
+ schedule.on = on1;
+ };
+}
+function style_default2(name, value, priority) {
+ var i = (name += "") === "transform" ? interpolateTransformCss : interpolate_default;
+ return value == null ? this.styleTween(name, styleNull(name, i)).on("end.style." + name, styleRemove2(name)) : typeof value === "function" ? this.styleTween(name, styleFunction2(name, i, tweenValue(this, "style." + name, value))).each(styleMaybeRemove(this._id, name)) : this.styleTween(name, styleConstant2(name, i, value), priority).on("end.style." + name, null);
+}
+
+// node_modules/d3-transition/src/transition/styleTween.js
+function styleInterpolate(name, i, priority) {
+ return function(t) {
+ this.style.setProperty(name, i.call(this, t), priority);
+ };
+}
+function styleTween(name, value, priority) {
+ var t, i0;
+ function tween() {
+ var i = value.apply(this, arguments);
+ if (i !== i0)
+ t = (i0 = i) && styleInterpolate(name, i, priority);
+ return t;
+ }
+ tween._value = value;
+ return tween;
+}
+function styleTween_default(name, value, priority) {
+ var key = "style." + (name += "");
+ if (arguments.length < 2)
+ return (key = this.tween(key)) && key._value;
+ if (value == null)
+ return this.tween(key, null);
+ if (typeof value !== "function")
+ throw new Error();
+ return this.tween(key, styleTween(name, value, priority == null ? "" : priority));
+}
+
+// node_modules/d3-transition/src/transition/text.js
+function textConstant2(value) {
+ return function() {
+ this.textContent = value;
+ };
+}
+function textFunction2(value) {
+ return function() {
+ var value1 = value(this);
+ this.textContent = value1 == null ? "" : value1;
+ };
+}
+function text_default2(value) {
+ return this.tween("text", typeof value === "function" ? textFunction2(tweenValue(this, "text", value)) : textConstant2(value == null ? "" : value + ""));
+}
+
+// node_modules/d3-transition/src/transition/textTween.js
+function textInterpolate(i) {
+ return function(t) {
+ this.textContent = i.call(this, t);
+ };
+}
+function textTween(value) {
+ var t03, i0;
+ function tween() {
+ var i = value.apply(this, arguments);
+ if (i !== i0)
+ t03 = (i0 = i) && textInterpolate(i);
+ return t03;
+ }
+ tween._value = value;
+ return tween;
+}
+function textTween_default(value) {
+ var key = "text";
+ if (arguments.length < 1)
+ return (key = this.tween(key)) && key._value;
+ if (value == null)
+ return this.tween(key, null);
+ if (typeof value !== "function")
+ throw new Error();
+ return this.tween(key, textTween(value));
+}
+
+// node_modules/d3-transition/src/transition/transition.js
+function transition_default() {
+ var name = this._name, id0 = this._id, id1 = newId();
+ for (var groups2 = this._groups, m = groups2.length, j = 0; j < m; ++j) {
+ for (var group2 = groups2[j], n = group2.length, node2, i = 0; i < n; ++i) {
+ if (node2 = group2[i]) {
+ var inherit2 = get2(node2, id0);
+ schedule_default(node2, name, id1, i, group2, {
+ time: inherit2.time + inherit2.delay + inherit2.duration,
+ delay: 0,
+ duration: inherit2.duration,
+ ease: inherit2.ease
+ });
+ }
+ }
+ }
+ return new Transition(groups2, this._parents, name, id1);
+}
+
+// node_modules/d3-transition/src/transition/end.js
+function end_default() {
+ var on0, on1, that = this, id3 = that._id, size = that.size();
+ return new Promise(function(resolve, reject) {
+ var cancel = { value: reject }, end = { value: function() {
+ if (--size === 0)
+ resolve();
+ } };
+ that.each(function() {
+ var schedule = set2(this, id3), on = schedule.on;
+ if (on !== on0) {
+ on1 = (on0 = on).copy();
+ on1._.cancel.push(cancel);
+ on1._.interrupt.push(cancel);
+ on1._.end.push(end);
+ }
+ schedule.on = on1;
+ });
+ if (size === 0)
+ resolve();
+ });
+}
+
+// node_modules/d3-transition/src/transition/index.js
+var id = 0;
+function Transition(groups2, parents, name, id3) {
+ this._groups = groups2;
+ this._parents = parents;
+ this._name = name;
+ this._id = id3;
+}
+function transition(name) {
+ return selection_default().transition(name);
+}
+function newId() {
+ return ++id;
+}
+var selection_prototype = selection_default.prototype;
+Transition.prototype = transition.prototype = {
+ constructor: Transition,
+ select: select_default3,
+ selectAll: selectAll_default3,
+ selectChild: selection_prototype.selectChild,
+ selectChildren: selection_prototype.selectChildren,
+ filter: filter_default2,
+ merge: merge_default2,
+ selection: selection_default2,
+ transition: transition_default,
+ call: selection_prototype.call,
+ nodes: selection_prototype.nodes,
+ node: selection_prototype.node,
+ size: selection_prototype.size,
+ empty: selection_prototype.empty,
+ each: selection_prototype.each,
+ on: on_default2,
+ attr: attr_default2,
+ attrTween: attrTween_default,
+ style: style_default2,
+ styleTween: styleTween_default,
+ text: text_default2,
+ textTween: textTween_default,
+ remove: remove_default2,
+ tween: tween_default,
+ delay: delay_default,
+ duration: duration_default,
+ ease: ease_default,
+ easeVarying: easeVarying_default,
+ end: end_default,
+ [Symbol.iterator]: selection_prototype[Symbol.iterator]
+};
+
+// node_modules/d3-ease/src/cubic.js
+function cubicInOut(t) {
+ return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
+}
+
+// node_modules/d3-ease/src/poly.js
+var exponent = 3;
+var polyIn = function custom8(e) {
+ e = +e;
+ function polyIn2(t) {
+ return Math.pow(t, e);
+ }
+ polyIn2.exponent = custom8;
+ return polyIn2;
+}(exponent);
+var polyOut = function custom9(e) {
+ e = +e;
+ function polyOut2(t) {
+ return 1 - Math.pow(1 - t, e);
+ }
+ polyOut2.exponent = custom9;
+ return polyOut2;
+}(exponent);
+var polyInOut = function custom10(e) {
+ e = +e;
+ function polyInOut2(t) {
+ return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;
+ }
+ polyInOut2.exponent = custom10;
+ return polyInOut2;
+}(exponent);
+
+// node_modules/d3-ease/src/sin.js
+var pi3 = Math.PI;
+var halfPi2 = pi3 / 2;
+
+// node_modules/d3-ease/src/math.js
+function tpmt(x3) {
+ return (Math.pow(2, -10 * x3) - 9765625e-10) * 1.0009775171065494;
+}
+
+// node_modules/d3-ease/src/bounce.js
+var b1 = 4 / 11;
+var b2 = 6 / 11;
+var b3 = 8 / 11;
+var b4 = 3 / 4;
+var b5 = 9 / 11;
+var b6 = 10 / 11;
+var b7 = 15 / 16;
+var b8 = 21 / 22;
+var b9 = 63 / 64;
+var b0 = 1 / b1 / b1;
+
+// node_modules/d3-ease/src/back.js
+var overshoot = 1.70158;
+var backIn = function custom11(s2) {
+ s2 = +s2;
+ function backIn2(t) {
+ return (t = +t) * t * (s2 * (t - 1) + t);
+ }
+ backIn2.overshoot = custom11;
+ return backIn2;
+}(overshoot);
+var backOut = function custom12(s2) {
+ s2 = +s2;
+ function backOut2(t) {
+ return --t * t * ((t + 1) * s2 + t) + 1;
+ }
+ backOut2.overshoot = custom12;
+ return backOut2;
+}(overshoot);
+var backInOut = function custom13(s2) {
+ s2 = +s2;
+ function backInOut2(t) {
+ return ((t *= 2) < 1 ? t * t * ((s2 + 1) * t - s2) : (t -= 2) * t * ((s2 + 1) * t + s2) + 2) / 2;
+ }
+ backInOut2.overshoot = custom13;
+ return backInOut2;
+}(overshoot);
+
+// node_modules/d3-ease/src/elastic.js
+var tau3 = 2 * Math.PI;
+var amplitude = 1;
+var period = 0.3;
+var elasticIn = function custom14(a2, p) {
+ var s2 = Math.asin(1 / (a2 = Math.max(1, a2))) * (p /= tau3);
+ function elasticIn2(t) {
+ return a2 * tpmt(- --t) * Math.sin((s2 - t) / p);
+ }
+ elasticIn2.amplitude = function(a3) {
+ return custom14(a3, p * tau3);
+ };
+ elasticIn2.period = function(p2) {
+ return custom14(a2, p2);
+ };
+ return elasticIn2;
+}(amplitude, period);
+var elasticOut = function custom15(a2, p) {
+ var s2 = Math.asin(1 / (a2 = Math.max(1, a2))) * (p /= tau3);
+ function elasticOut2(t) {
+ return 1 - a2 * tpmt(t = +t) * Math.sin((t + s2) / p);
+ }
+ elasticOut2.amplitude = function(a3) {
+ return custom15(a3, p * tau3);
+ };
+ elasticOut2.period = function(p2) {
+ return custom15(a2, p2);
+ };
+ return elasticOut2;
+}(amplitude, period);
+var elasticInOut = function custom16(a2, p) {
+ var s2 = Math.asin(1 / (a2 = Math.max(1, a2))) * (p /= tau3);
+ function elasticInOut2(t) {
+ return ((t = t * 2 - 1) < 0 ? a2 * tpmt(-t) * Math.sin((s2 - t) / p) : 2 - a2 * tpmt(t) * Math.sin((s2 + t) / p)) / 2;
+ }
+ elasticInOut2.amplitude = function(a3) {
+ return custom16(a3, p * tau3);
+ };
+ elasticInOut2.period = function(p2) {
+ return custom16(a2, p2);
+ };
+ return elasticInOut2;
+}(amplitude, period);
+
+// node_modules/d3-transition/src/selection/transition.js
+var defaultTiming = {
+ time: null,
+ // Set on use.
+ delay: 0,
+ duration: 250,
+ ease: cubicInOut
+};
+function inherit(node2, id3) {
+ var timing;
+ while (!(timing = node2.__transition) || !(timing = timing[id3])) {
+ if (!(node2 = node2.parentNode)) {
+ throw new Error(`transition ${id3} not found`);
+ }
+ }
+ return timing;
+}
+function transition_default2(name) {
+ var id3, timing;
+ if (name instanceof Transition) {
+ id3 = name._id, name = name._name;
+ } else {
+ id3 = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + "";
+ }
+ for (var groups2 = this._groups, m = groups2.length, j = 0; j < m; ++j) {
+ for (var group2 = groups2[j], n = group2.length, node2, i = 0; i < n; ++i) {
+ if (node2 = group2[i]) {
+ schedule_default(node2, name, id3, i, group2, timing || inherit(node2, id3));
+ }
+ }
+ }
+ return new Transition(groups2, this._parents, name, id3);
+}
+
+// node_modules/d3-transition/src/selection/index.js
+selection_default.prototype.interrupt = interrupt_default2;
+selection_default.prototype.transition = transition_default2;
+
+// node_modules/d3-brush/src/brush.js
+var { abs: abs2, max: max3, min: min3 } = Math;
+function number1(e) {
+ return [+e[0], +e[1]];
+}
+function number22(e) {
+ return [number1(e[0]), number1(e[1])];
+}
+var X = {
+ name: "x",
+ handles: ["w", "e"].map(type),
+ input: function(x3, e) {
+ return x3 == null ? null : [[+x3[0], e[0][1]], [+x3[1], e[1][1]]];
+ },
+ output: function(xy) {
+ return xy && [xy[0][0], xy[1][0]];
+ }
+};
+var Y = {
+ name: "y",
+ handles: ["n", "s"].map(type),
+ input: function(y3, e) {
+ return y3 == null ? null : [[e[0][0], +y3[0]], [e[1][0], +y3[1]]];
+ },
+ output: function(xy) {
+ return xy && [xy[0][1], xy[1][1]];
+ }
+};
+var XY = {
+ name: "xy",
+ handles: ["n", "w", "e", "s", "nw", "ne", "sw", "se"].map(type),
+ input: function(xy) {
+ return xy == null ? null : number22(xy);
+ },
+ output: function(xy) {
+ return xy;
+ }
+};
+function type(t) {
+ return { type: t };
+}
+
+// node_modules/d3-chord/src/math.js
+var pi4 = Math.PI;
+var halfPi3 = pi4 / 2;
+var tau4 = pi4 * 2;
+
+// node_modules/d3-chord/src/array.js
+var slice3 = Array.prototype.slice;
+
+// node_modules/d3-contour/src/array.js
+var array3 = Array.prototype;
+var slice4 = array3.slice;
+
+// node_modules/robust-predicates/esm/util.js
+var epsilon6 = 11102230246251565e-32;
+var resulterrbound = (3 + 8 * epsilon6) * epsilon6;
+function vec(n) {
+ return new Float64Array(n);
+}
+
+// node_modules/robust-predicates/esm/orient2d.js
+var ccwerrboundA = (3 + 16 * epsilon6) * epsilon6;
+var ccwerrboundB = (2 + 12 * epsilon6) * epsilon6;
+var ccwerrboundC = (9 + 64 * epsilon6) * epsilon6 * epsilon6;
+var B2 = vec(4);
+var C1 = vec(8);
+var C2 = vec(12);
+var D2 = vec(16);
+var u = vec(4);
+
+// node_modules/robust-predicates/esm/orient3d.js
+var o3derrboundA = (7 + 56 * epsilon6) * epsilon6;
+var o3derrboundB = (3 + 28 * epsilon6) * epsilon6;
+var o3derrboundC = (26 + 288 * epsilon6) * epsilon6 * epsilon6;
+var bc = vec(4);
+var ca = vec(4);
+var ab = vec(4);
+var at_b = vec(4);
+var at_c = vec(4);
+var bt_c = vec(4);
+var bt_a = vec(4);
+var ct_a = vec(4);
+var ct_b = vec(4);
+var bct = vec(8);
+var cat = vec(8);
+var abt = vec(8);
+var u2 = vec(4);
+var _8 = vec(8);
+var _8b = vec(8);
+var _16 = vec(8);
+var _12 = vec(12);
+var fin = vec(192);
+var fin2 = vec(192);
+
+// node_modules/robust-predicates/esm/incircle.js
+var iccerrboundA = (10 + 96 * epsilon6) * epsilon6;
+var iccerrboundB = (4 + 48 * epsilon6) * epsilon6;
+var iccerrboundC = (44 + 576 * epsilon6) * epsilon6 * epsilon6;
+var bc2 = vec(4);
+var ca2 = vec(4);
+var ab2 = vec(4);
+var aa = vec(4);
+var bb = vec(4);
+var cc = vec(4);
+var u3 = vec(4);
+var v = vec(4);
+var axtbc = vec(8);
+var aytbc = vec(8);
+var bxtca = vec(8);
+var bytca = vec(8);
+var cxtab = vec(8);
+var cytab = vec(8);
+var abt2 = vec(8);
+var bct2 = vec(8);
+var cat2 = vec(8);
+var abtt = vec(4);
+var bctt = vec(4);
+var catt = vec(4);
+var _82 = vec(8);
+var _162 = vec(16);
+var _16b = vec(16);
+var _16c = vec(16);
+var _32 = vec(32);
+var _32b = vec(32);
+var _48 = vec(48);
+var _64 = vec(64);
+var fin3 = vec(1152);
+var fin22 = vec(1152);
+
+// node_modules/robust-predicates/esm/insphere.js
+var isperrboundA = (16 + 224 * epsilon6) * epsilon6;
+var isperrboundB = (5 + 72 * epsilon6) * epsilon6;
+var isperrboundC = (71 + 1408 * epsilon6) * epsilon6 * epsilon6;
+var ab3 = vec(4);
+var bc3 = vec(4);
+var cd = vec(4);
+var de = vec(4);
+var ea = vec(4);
+var ac = vec(4);
+var bd = vec(4);
+var ce = vec(4);
+var da = vec(4);
+var eb = vec(4);
+var abc = vec(24);
+var bcd = vec(24);
+var cde = vec(24);
+var dea = vec(24);
+var eab = vec(24);
+var abd = vec(24);
+var bce = vec(24);
+var cda = vec(24);
+var deb = vec(24);
+var eac = vec(24);
+var adet = vec(1152);
+var bdet = vec(1152);
+var cdet = vec(1152);
+var ddet = vec(1152);
+var edet = vec(1152);
+var abdet = vec(2304);
+var cddet = vec(2304);
+var cdedet = vec(3456);
+var deter = vec(5760);
+var _83 = vec(8);
+var _8b2 = vec(8);
+var _8c = vec(8);
+var _163 = vec(16);
+var _24 = vec(24);
+var _482 = vec(48);
+var _48b = vec(48);
+var _96 = vec(96);
+var _192 = vec(192);
+var _384x = vec(384);
+var _384y = vec(384);
+var _384z = vec(384);
+var _768 = vec(768);
+var xdet = vec(96);
+var ydet = vec(96);
+var zdet = vec(96);
+var fin4 = vec(1152);
+
+// node_modules/delaunator/index.js
+var EPSILON = Math.pow(2, -52);
+var EDGE_STACK = new Uint32Array(512);
+
+// node_modules/d3-delaunay/src/delaunay.js
+var tau5 = 2 * Math.PI;
+
+// node_modules/d3-dsv/src/dsv.js
+var EOL = {};
+var EOF = {};
+var QUOTE = 34;
+var NEWLINE = 10;
+var RETURN = 13;
+function objectConverter(columns) {
+ return new Function("d", "return {" + columns.map(function(name, i) {
+ return JSON.stringify(name) + ": d[" + i + '] || ""';
+ }).join(",") + "}");
+}
+function customConverter(columns, f) {
+ var object = objectConverter(columns);
+ return function(row, i) {
+ return f(object(row), i, columns);
+ };
+}
+function inferColumns(rows) {
+ var columnSet = /* @__PURE__ */ Object.create(null), columns = [];
+ rows.forEach(function(row) {
+ for (var column2 in row) {
+ if (!(column2 in columnSet)) {
+ columns.push(columnSet[column2] = column2);
+ }
+ }
+ });
+ return columns;
+}
+function pad2(value, width) {
+ var s2 = value + "", length2 = s2.length;
+ return length2 < width ? new Array(width - length2 + 1).join(0) + s2 : s2;
+}
+function formatYear2(year) {
+ return year < 0 ? "-" + pad2(-year, 6) : year > 9999 ? "+" + pad2(year, 6) : pad2(year, 4);
+}
+function formatDate(date2) {
+ var hours = date2.getUTCHours(), minutes = date2.getUTCMinutes(), seconds2 = date2.getUTCSeconds(), milliseconds2 = date2.getUTCMilliseconds();
+ return isNaN(date2) ? "Invalid Date" : formatYear2(date2.getUTCFullYear(), 4) + "-" + pad2(date2.getUTCMonth() + 1, 2) + "-" + pad2(date2.getUTCDate(), 2) + (milliseconds2 ? "T" + pad2(hours, 2) + ":" + pad2(minutes, 2) + ":" + pad2(seconds2, 2) + "." + pad2(milliseconds2, 3) + "Z" : seconds2 ? "T" + pad2(hours, 2) + ":" + pad2(minutes, 2) + ":" + pad2(seconds2, 2) + "Z" : minutes || hours ? "T" + pad2(hours, 2) + ":" + pad2(minutes, 2) + "Z" : "");
+}
+function dsv_default(delimiter2) {
+ var reFormat = new RegExp('["' + delimiter2 + "\n\r]"), DELIMITER = delimiter2.charCodeAt(0);
+ function parse3(text2, f) {
+ var convert, columns, rows = parseRows(text2, function(row, i) {
+ if (convert)
+ return convert(row, i - 1);
+ columns = row, convert = f ? customConverter(row, f) : objectConverter(row);
+ });
+ rows.columns = columns || [];
+ return rows;
+ }
+ function parseRows(text2, f) {
+ var rows = [], N = text2.length, I = 0, n = 0, t, eof = N <= 0, eol = false;
+ if (text2.charCodeAt(N - 1) === NEWLINE)
+ --N;
+ if (text2.charCodeAt(N - 1) === RETURN)
+ --N;
+ function token2() {
+ if (eof)
+ return EOF;
+ if (eol)
+ return eol = false, EOL;
+ var i, j = I, c3;
+ if (text2.charCodeAt(j) === QUOTE) {
+ while (I++ < N && text2.charCodeAt(I) !== QUOTE || text2.charCodeAt(++I) === QUOTE)
+ ;
+ if ((i = I) >= N)
+ eof = true;
+ else if ((c3 = text2.charCodeAt(I++)) === NEWLINE)
+ eol = true;
+ else if (c3 === RETURN) {
+ eol = true;
+ if (text2.charCodeAt(I) === NEWLINE)
+ ++I;
+ }
+ return text2.slice(j + 1, i - 1).replace(/""/g, '"');
+ }
+ while (I < N) {
+ if ((c3 = text2.charCodeAt(i = I++)) === NEWLINE)
+ eol = true;
+ else if (c3 === RETURN) {
+ eol = true;
+ if (text2.charCodeAt(I) === NEWLINE)
+ ++I;
+ } else if (c3 !== DELIMITER)
+ continue;
+ return text2.slice(j, i);
+ }
+ return eof = true, text2.slice(j, N);
+ }
+ while ((t = token2()) !== EOF) {
+ var row = [];
+ while (t !== EOL && t !== EOF)
+ row.push(t), t = token2();
+ if (f && (row = f(row, n++)) == null)
+ continue;
+ rows.push(row);
+ }
+ return rows;
+ }
+ function preformatBody(rows, columns) {
+ return rows.map(function(row) {
+ return columns.map(function(column2) {
+ return formatValue(row[column2]);
+ }).join(delimiter2);
+ });
+ }
+ function format3(rows, columns) {
+ if (columns == null)
+ columns = inferColumns(rows);
+ return [columns.map(formatValue).join(delimiter2)].concat(preformatBody(rows, columns)).join("\n");
+ }
+ function formatBody(rows, columns) {
+ if (columns == null)
+ columns = inferColumns(rows);
+ return preformatBody(rows, columns).join("\n");
+ }
+ function formatRows(rows) {
+ return rows.map(formatRow).join("\n");
+ }
+ function formatRow(row) {
+ return row.map(formatValue).join(delimiter2);
+ }
+ function formatValue(value) {
+ return value == null ? "" : value instanceof Date ? formatDate(value) : reFormat.test(value += "") ? '"' + value.replace(/"/g, '""') + '"' : value;
+ }
+ return {
+ parse: parse3,
+ parseRows,
+ format: format3,
+ formatBody,
+ formatRows,
+ formatRow,
+ formatValue
+ };
+}
+
+// node_modules/d3-dsv/src/csv.js
+var csv = dsv_default(",");
+var csvParse = csv.parse;
+var csvParseRows = csv.parseRows;
+var csvFormat = csv.format;
+var csvFormatBody = csv.formatBody;
+var csvFormatRows = csv.formatRows;
+var csvFormatRow = csv.formatRow;
+var csvFormatValue = csv.formatValue;
+
+// node_modules/d3-dsv/src/tsv.js
+var tsv = dsv_default(" ");
+var tsvParse = tsv.parse;
+var tsvParseRows = tsv.parseRows;
+var tsvFormat = tsv.format;
+var tsvFormatBody = tsv.formatBody;
+var tsvFormatRows = tsv.formatRows;
+var tsvFormatRow = tsv.formatRow;
+var tsvFormatValue = tsv.formatValue;
+
+// node_modules/d3-dsv/src/autoType.js
+var fixtz = (/* @__PURE__ */ new Date("2019-01-01T00:00")).getHours() || (/* @__PURE__ */ new Date("2019-07-01T00:00")).getHours();
+
+// node_modules/d3-fetch/src/text.js
+function responseText(response) {
+ if (!response.ok)
+ throw new Error(response.status + " " + response.statusText);
+ return response.text();
+}
+function text_default3(input, init3) {
+ return fetch(input, init3).then(responseText);
+}
+
+// node_modules/d3-fetch/src/dsv.js
+function dsvParse(parse3) {
+ return function(input, init3, row) {
+ if (arguments.length === 2 && typeof init3 === "function")
+ row = init3, init3 = void 0;
+ return text_default3(input, init3).then(function(response) {
+ return parse3(response, row);
+ });
+ };
+}
+var csv2 = dsvParse(csvParse);
+var tsv2 = dsvParse(tsvParse);
+
+// node_modules/d3-fetch/src/xml.js
+function parser(type3) {
+ return (input, init3) => text_default3(input, init3).then((text2) => new DOMParser().parseFromString(text2, type3));
+}
+var xml_default = parser("application/xml");
+var html = parser("text/html");
+var svg = parser("image/svg+xml");
+
+// node_modules/d3-quadtree/src/add.js
+function add_default(d) {
+ const x3 = +this._x.call(null, d), y3 = +this._y.call(null, d);
+ return add(this.cover(x3, y3), x3, y3, d);
+}
+function add(tree, x3, y3, d) {
+ if (isNaN(x3) || isNaN(y3))
+ return tree;
+ var parent, node2 = tree._root, leaf = { data: d }, x02 = tree._x0, y0 = tree._y0, x12 = tree._x1, y1 = tree._y1, xm, ym, xp, yp, right2, bottom2, i, j;
+ if (!node2)
+ return tree._root = leaf, tree;
+ while (node2.length) {
+ if (right2 = x3 >= (xm = (x02 + x12) / 2))
+ x02 = xm;
+ else
+ x12 = xm;
+ if (bottom2 = y3 >= (ym = (y0 + y1) / 2))
+ y0 = ym;
+ else
+ y1 = ym;
+ if (parent = node2, !(node2 = node2[i = bottom2 << 1 | right2]))
+ return parent[i] = leaf, tree;
+ }
+ xp = +tree._x.call(null, node2.data);
+ yp = +tree._y.call(null, node2.data);
+ if (x3 === xp && y3 === yp)
+ return leaf.next = node2, parent ? parent[i] = leaf : tree._root = leaf, tree;
+ do {
+ parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);
+ if (right2 = x3 >= (xm = (x02 + x12) / 2))
+ x02 = xm;
+ else
+ x12 = xm;
+ if (bottom2 = y3 >= (ym = (y0 + y1) / 2))
+ y0 = ym;
+ else
+ y1 = ym;
+ } while ((i = bottom2 << 1 | right2) === (j = (yp >= ym) << 1 | xp >= xm));
+ return parent[j] = node2, parent[i] = leaf, tree;
+}
+function addAll(data) {
+ var d, i, n = data.length, x3, y3, xz = new Array(n), yz = new Array(n), x02 = Infinity, y0 = Infinity, x12 = -Infinity, y1 = -Infinity;
+ for (i = 0; i < n; ++i) {
+ if (isNaN(x3 = +this._x.call(null, d = data[i])) || isNaN(y3 = +this._y.call(null, d)))
+ continue;
+ xz[i] = x3;
+ yz[i] = y3;
+ if (x3 < x02)
+ x02 = x3;
+ if (x3 > x12)
+ x12 = x3;
+ if (y3 < y0)
+ y0 = y3;
+ if (y3 > y1)
+ y1 = y3;
+ }
+ if (x02 > x12 || y0 > y1)
+ return this;
+ this.cover(x02, y0).cover(x12, y1);
+ for (i = 0; i < n; ++i) {
+ add(this, xz[i], yz[i], data[i]);
+ }
+ return this;
+}
+
+// node_modules/d3-quadtree/src/cover.js
+function cover_default(x3, y3) {
+ if (isNaN(x3 = +x3) || isNaN(y3 = +y3))
+ return this;
+ var x02 = this._x0, y0 = this._y0, x12 = this._x1, y1 = this._y1;
+ if (isNaN(x02)) {
+ x12 = (x02 = Math.floor(x3)) + 1;
+ y1 = (y0 = Math.floor(y3)) + 1;
+ } else {
+ var z = x12 - x02 || 1, node2 = this._root, parent, i;
+ while (x02 > x3 || x3 >= x12 || y0 > y3 || y3 >= y1) {
+ i = (y3 < y0) << 1 | x3 < x02;
+ parent = new Array(4), parent[i] = node2, node2 = parent, z *= 2;
+ switch (i) {
+ case 0:
+ x12 = x02 + z, y1 = y0 + z;
+ break;
+ case 1:
+ x02 = x12 - z, y1 = y0 + z;
+ break;
+ case 2:
+ x12 = x02 + z, y0 = y1 - z;
+ break;
+ case 3:
+ x02 = x12 - z, y0 = y1 - z;
+ break;
+ }
+ }
+ if (this._root && this._root.length)
+ this._root = node2;
+ }
+ this._x0 = x02;
+ this._y0 = y0;
+ this._x1 = x12;
+ this._y1 = y1;
+ return this;
+}
+
+// node_modules/d3-quadtree/src/data.js
+function data_default2() {
+ var data = [];
+ this.visit(function(node2) {
+ if (!node2.length)
+ do
+ data.push(node2.data);
+ while (node2 = node2.next);
+ });
+ return data;
+}
+
+// node_modules/d3-quadtree/src/extent.js
+function extent_default(_) {
+ return arguments.length ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) : isNaN(this._x0) ? void 0 : [[this._x0, this._y0], [this._x1, this._y1]];
+}
+
+// node_modules/d3-quadtree/src/quad.js
+function quad_default(node2, x02, y0, x12, y1) {
+ this.node = node2;
+ this.x0 = x02;
+ this.y0 = y0;
+ this.x1 = x12;
+ this.y1 = y1;
+}
+
+// node_modules/d3-quadtree/src/find.js
+function find_default(x3, y3, radius) {
+ var data, x02 = this._x0, y0 = this._y0, x12, y1, x22, y22, x32 = this._x1, y32 = this._y1, quads = [], node2 = this._root, q, i;
+ if (node2)
+ quads.push(new quad_default(node2, x02, y0, x32, y32));
+ if (radius == null)
+ radius = Infinity;
+ else {
+ x02 = x3 - radius, y0 = y3 - radius;
+ x32 = x3 + radius, y32 = y3 + radius;
+ radius *= radius;
+ }
+ while (q = quads.pop()) {
+ if (!(node2 = q.node) || (x12 = q.x0) > x32 || (y1 = q.y0) > y32 || (x22 = q.x1) < x02 || (y22 = q.y1) < y0)
+ continue;
+ if (node2.length) {
+ var xm = (x12 + x22) / 2, ym = (y1 + y22) / 2;
+ quads.push(
+ new quad_default(node2[3], xm, ym, x22, y22),
+ new quad_default(node2[2], x12, ym, xm, y22),
+ new quad_default(node2[1], xm, y1, x22, ym),
+ new quad_default(node2[0], x12, y1, xm, ym)
+ );
+ if (i = (y3 >= ym) << 1 | x3 >= xm) {
+ q = quads[quads.length - 1];
+ quads[quads.length - 1] = quads[quads.length - 1 - i];
+ quads[quads.length - 1 - i] = q;
+ }
+ } else {
+ var dx = x3 - +this._x.call(null, node2.data), dy = y3 - +this._y.call(null, node2.data), d2 = dx * dx + dy * dy;
+ if (d2 < radius) {
+ var d = Math.sqrt(radius = d2);
+ x02 = x3 - d, y0 = y3 - d;
+ x32 = x3 + d, y32 = y3 + d;
+ data = node2.data;
+ }
+ }
+ }
+ return data;
+}
+
+// node_modules/d3-quadtree/src/remove.js
+function remove_default3(d) {
+ if (isNaN(x3 = +this._x.call(null, d)) || isNaN(y3 = +this._y.call(null, d)))
+ return this;
+ var parent, node2 = this._root, retainer, previous, next2, x02 = this._x0, y0 = this._y0, x12 = this._x1, y1 = this._y1, x3, y3, xm, ym, right2, bottom2, i, j;
+ if (!node2)
+ return this;
+ if (node2.length)
+ while (true) {
+ if (right2 = x3 >= (xm = (x02 + x12) / 2))
+ x02 = xm;
+ else
+ x12 = xm;
+ if (bottom2 = y3 >= (ym = (y0 + y1) / 2))
+ y0 = ym;
+ else
+ y1 = ym;
+ if (!(parent = node2, node2 = node2[i = bottom2 << 1 | right2]))
+ return this;
+ if (!node2.length)
+ break;
+ if (parent[i + 1 & 3] || parent[i + 2 & 3] || parent[i + 3 & 3])
+ retainer = parent, j = i;
+ }
+ while (node2.data !== d)
+ if (!(previous = node2, node2 = node2.next))
+ return this;
+ if (next2 = node2.next)
+ delete node2.next;
+ if (previous)
+ return next2 ? previous.next = next2 : delete previous.next, this;
+ if (!parent)
+ return this._root = next2, this;
+ next2 ? parent[i] = next2 : delete parent[i];
+ if ((node2 = parent[0] || parent[1] || parent[2] || parent[3]) && node2 === (parent[3] || parent[2] || parent[1] || parent[0]) && !node2.length) {
+ if (retainer)
+ retainer[j] = node2;
+ else
+ this._root = node2;
+ }
+ return this;
+}
+function removeAll(data) {
+ for (var i = 0, n = data.length; i < n; ++i)
+ this.remove(data[i]);
+ return this;
+}
+
+// node_modules/d3-quadtree/src/root.js
+function root_default() {
+ return this._root;
+}
+
+// node_modules/d3-quadtree/src/size.js
+function size_default2() {
+ var size = 0;
+ this.visit(function(node2) {
+ if (!node2.length)
+ do
+ ++size;
+ while (node2 = node2.next);
+ });
+ return size;
+}
+
+// node_modules/d3-quadtree/src/visit.js
+function visit_default(callback) {
+ var quads = [], q, node2 = this._root, child, x02, y0, x12, y1;
+ if (node2)
+ quads.push(new quad_default(node2, this._x0, this._y0, this._x1, this._y1));
+ while (q = quads.pop()) {
+ if (!callback(node2 = q.node, x02 = q.x0, y0 = q.y0, x12 = q.x1, y1 = q.y1) && node2.length) {
+ var xm = (x02 + x12) / 2, ym = (y0 + y1) / 2;
+ if (child = node2[3])
+ quads.push(new quad_default(child, xm, ym, x12, y1));
+ if (child = node2[2])
+ quads.push(new quad_default(child, x02, ym, xm, y1));
+ if (child = node2[1])
+ quads.push(new quad_default(child, xm, y0, x12, ym));
+ if (child = node2[0])
+ quads.push(new quad_default(child, x02, y0, xm, ym));
+ }
+ }
+ return this;
+}
+
+// node_modules/d3-quadtree/src/visitAfter.js
+function visitAfter_default(callback) {
+ var quads = [], next2 = [], q;
+ if (this._root)
+ quads.push(new quad_default(this._root, this._x0, this._y0, this._x1, this._y1));
+ while (q = quads.pop()) {
+ var node2 = q.node;
+ if (node2.length) {
+ var child, x02 = q.x0, y0 = q.y0, x12 = q.x1, y1 = q.y1, xm = (x02 + x12) / 2, ym = (y0 + y1) / 2;
+ if (child = node2[0])
+ quads.push(new quad_default(child, x02, y0, xm, ym));
+ if (child = node2[1])
+ quads.push(new quad_default(child, xm, y0, x12, ym));
+ if (child = node2[2])
+ quads.push(new quad_default(child, x02, ym, xm, y1));
+ if (child = node2[3])
+ quads.push(new quad_default(child, xm, ym, x12, y1));
+ }
+ next2.push(q);
+ }
+ while (q = next2.pop()) {
+ callback(q.node, q.x0, q.y0, q.x1, q.y1);
+ }
+ return this;
+}
+
+// node_modules/d3-quadtree/src/x.js
+function defaultX(d) {
+ return d[0];
+}
+function x_default(_) {
+ return arguments.length ? (this._x = _, this) : this._x;
+}
+
+// node_modules/d3-quadtree/src/y.js
+function defaultY(d) {
+ return d[1];
+}
+function y_default(_) {
+ return arguments.length ? (this._y = _, this) : this._y;
+}
+
+// node_modules/d3-quadtree/src/quadtree.js
+function quadtree(nodes, x3, y3) {
+ var tree = new Quadtree(x3 == null ? defaultX : x3, y3 == null ? defaultY : y3, NaN, NaN, NaN, NaN);
+ return nodes == null ? tree : tree.addAll(nodes);
+}
+function Quadtree(x3, y3, x02, y0, x12, y1) {
+ this._x = x3;
+ this._y = y3;
+ this._x0 = x02;
+ this._y0 = y0;
+ this._x1 = x12;
+ this._y1 = y1;
+ this._root = void 0;
+}
+function leaf_copy(leaf) {
+ var copy4 = { data: leaf.data }, next2 = copy4;
+ while (leaf = leaf.next)
+ next2 = next2.next = { data: leaf.data };
+ return copy4;
+}
+var treeProto = quadtree.prototype = Quadtree.prototype;
+treeProto.copy = function() {
+ var copy4 = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1), node2 = this._root, nodes, child;
+ if (!node2)
+ return copy4;
+ if (!node2.length)
+ return copy4._root = leaf_copy(node2), copy4;
+ nodes = [{ source: node2, target: copy4._root = new Array(4) }];
+ while (node2 = nodes.pop()) {
+ for (var i = 0; i < 4; ++i) {
+ if (child = node2.source[i]) {
+ if (child.length)
+ nodes.push({ source: child, target: node2.target[i] = new Array(4) });
+ else
+ node2.target[i] = leaf_copy(child);
+ }
+ }
+ }
+ return copy4;
+};
+treeProto.add = add_default;
+treeProto.addAll = addAll;
+treeProto.cover = cover_default;
+treeProto.data = data_default2;
+treeProto.extent = extent_default;
+treeProto.find = find_default;
+treeProto.remove = remove_default3;
+treeProto.removeAll = removeAll;
+treeProto.root = root_default;
+treeProto.size = size_default2;
+treeProto.visit = visit_default;
+treeProto.visitAfter = visitAfter_default;
+treeProto.x = x_default;
+treeProto.y = y_default;
+
+// node_modules/d3-force/src/simulation.js
+var initialAngle = Math.PI * (3 - Math.sqrt(5));
+
+// node_modules/d3-geo/src/math.js
+var epsilon7 = 1e-6;
+var epsilon22 = 1e-12;
+var pi5 = Math.PI;
+var halfPi4 = pi5 / 2;
+var quarterPi = pi5 / 4;
+var tau6 = pi5 * 2;
+var degrees3 = 180 / pi5;
+var radians2 = pi5 / 180;
+var abs4 = Math.abs;
+var atan = Math.atan;
+var atan22 = Math.atan2;
+var cos3 = Math.cos;
+var exp = Math.exp;
+var log2 = Math.log;
+var sin3 = Math.sin;
+var sign2 = Math.sign || function(x3) {
+ return x3 > 0 ? 1 : x3 < 0 ? -1 : 0;
+};
+var sqrt4 = Math.sqrt;
+var tan = Math.tan;
+function acos2(x3) {
+ return x3 > 1 ? 0 : x3 < -1 ? pi5 : Math.acos(x3);
+}
+function asin2(x3) {
+ return x3 > 1 ? halfPi4 : x3 < -1 ? -halfPi4 : Math.asin(x3);
+}
+
+// node_modules/d3-geo/src/noop.js
+function noop2() {
+}
+
+// node_modules/d3-geo/src/area.js
+var areaRingSum = new Adder();
+var areaSum = new Adder();
+
+// node_modules/d3-geo/src/cartesian.js
+function cartesian(spherical2) {
+ var lambda = spherical2[0], phi2 = spherical2[1], cosPhi = cos3(phi2);
+ return [cosPhi * cos3(lambda), cosPhi * sin3(lambda), sin3(phi2)];
+}
+function cartesianCross(a2, b) {
+ return [a2[1] * b[2] - a2[2] * b[1], a2[2] * b[0] - a2[0] * b[2], a2[0] * b[1] - a2[1] * b[0]];
+}
+function cartesianNormalizeInPlace(d) {
+ var l = sqrt4(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);
+ d[0] /= l, d[1] /= l, d[2] /= l;
+}
+
+// node_modules/d3-geo/src/rotation.js
+function rotationIdentity(lambda, phi2) {
+ if (abs4(lambda) > pi5)
+ lambda -= Math.round(lambda / tau6) * tau6;
+ return [lambda, phi2];
+}
+rotationIdentity.invert = rotationIdentity;
+
+// node_modules/d3-geo/src/clip/buffer.js
+function buffer_default2() {
+ var lines = [], line2;
+ return {
+ point: function(x3, y3, m) {
+ line2.push([x3, y3, m]);
+ },
+ lineStart: function() {
+ lines.push(line2 = []);
+ },
+ lineEnd: noop2,
+ rejoin: function() {
+ if (lines.length > 1)
+ lines.push(lines.pop().concat(lines.shift()));
+ },
+ result: function() {
+ var result = lines;
+ lines = [];
+ line2 = null;
+ return result;
+ }
+ };
+}
+
+// node_modules/d3-geo/src/pointEqual.js
+function pointEqual_default(a2, b) {
+ return abs4(a2[0] - b[0]) < epsilon7 && abs4(a2[1] - b[1]) < epsilon7;
+}
+
+// node_modules/d3-geo/src/clip/rejoin.js
+function Intersection(point6, points, other, entry) {
+ this.x = point6;
+ this.z = points;
+ this.o = other;
+ this.e = entry;
+ this.v = false;
+ this.n = this.p = null;
+}
+function rejoin_default(segments, compareIntersection2, startInside, interpolate, stream) {
+ var subject = [], clip = [], i, n;
+ segments.forEach(function(segment) {
+ if ((n2 = segment.length - 1) <= 0)
+ return;
+ var n2, p0 = segment[0], p1 = segment[n2], x3;
+ if (pointEqual_default(p0, p1)) {
+ if (!p0[2] && !p1[2]) {
+ stream.lineStart();
+ for (i = 0; i < n2; ++i)
+ stream.point((p0 = segment[i])[0], p0[1]);
+ stream.lineEnd();
+ return;
+ }
+ p1[0] += 2 * epsilon7;
+ }
+ subject.push(x3 = new Intersection(p0, segment, null, true));
+ clip.push(x3.o = new Intersection(p0, null, x3, false));
+ subject.push(x3 = new Intersection(p1, segment, null, false));
+ clip.push(x3.o = new Intersection(p1, null, x3, true));
+ });
+ if (!subject.length)
+ return;
+ clip.sort(compareIntersection2);
+ link2(subject);
+ link2(clip);
+ for (i = 0, n = clip.length; i < n; ++i) {
+ clip[i].e = startInside = !startInside;
+ }
+ var start2 = subject[0], points, point6;
+ while (1) {
+ var current = start2, isSubject = true;
+ while (current.v)
+ if ((current = current.n) === start2)
+ return;
+ points = current.z;
+ stream.lineStart();
+ do {
+ current.v = current.o.v = true;
+ if (current.e) {
+ if (isSubject) {
+ for (i = 0, n = points.length; i < n; ++i)
+ stream.point((point6 = points[i])[0], point6[1]);
+ } else {
+ interpolate(current.x, current.n.x, 1, stream);
+ }
+ current = current.n;
+ } else {
+ if (isSubject) {
+ points = current.p.z;
+ for (i = points.length - 1; i >= 0; --i)
+ stream.point((point6 = points[i])[0], point6[1]);
+ } else {
+ interpolate(current.x, current.p.x, -1, stream);
+ }
+ current = current.p;
+ }
+ current = current.o;
+ points = current.z;
+ isSubject = !isSubject;
+ } while (!current.v);
+ stream.lineEnd();
+ }
+}
+function link2(array4) {
+ if (!(n = array4.length))
+ return;
+ var n, i = 0, a2 = array4[0], b;
+ while (++i < n) {
+ a2.n = b = array4[i];
+ b.p = a2;
+ a2 = b;
+ }
+ a2.n = b = array4[0];
+ b.p = a2;
+}
+
+// node_modules/d3-geo/src/polygonContains.js
+function longitude(point6) {
+ return abs4(point6[0]) <= pi5 ? point6[0] : sign2(point6[0]) * ((abs4(point6[0]) + pi5) % tau6 - pi5);
+}
+function polygonContains_default(polygon, point6) {
+ var lambda = longitude(point6), phi2 = point6[1], sinPhi = sin3(phi2), normal = [sin3(lambda), -cos3(lambda), 0], angle = 0, winding = 0;
+ var sum4 = new Adder();
+ if (sinPhi === 1)
+ phi2 = halfPi4 + epsilon7;
+ else if (sinPhi === -1)
+ phi2 = -halfPi4 - epsilon7;
+ for (var i = 0, n = polygon.length; i < n; ++i) {
+ if (!(m = (ring = polygon[i]).length))
+ continue;
+ var ring, m, point0 = ring[m - 1], lambda0 = longitude(point0), phi0 = point0[1] / 2 + quarterPi, sinPhi0 = sin3(phi0), cosPhi0 = cos3(phi0);
+ for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {
+ var point1 = ring[j], lambda1 = longitude(point1), phi1 = point1[1] / 2 + quarterPi, sinPhi1 = sin3(phi1), cosPhi1 = cos3(phi1), delta = lambda1 - lambda0, sign3 = delta >= 0 ? 1 : -1, absDelta = sign3 * delta, antimeridian = absDelta > pi5, k2 = sinPhi0 * sinPhi1;
+ sum4.add(atan22(k2 * sign3 * sin3(absDelta), cosPhi0 * cosPhi1 + k2 * cos3(absDelta)));
+ angle += antimeridian ? delta + sign3 * tau6 : delta;
+ if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {
+ var arc = cartesianCross(cartesian(point0), cartesian(point1));
+ cartesianNormalizeInPlace(arc);
+ var intersection2 = cartesianCross(normal, arc);
+ cartesianNormalizeInPlace(intersection2);
+ var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin2(intersection2[2]);
+ if (phi2 > phiArc || phi2 === phiArc && (arc[0] || arc[1])) {
+ winding += antimeridian ^ delta >= 0 ? 1 : -1;
+ }
+ }
+ }
+ }
+ return (angle < -epsilon7 || angle < epsilon7 && sum4 < -epsilon22) ^ winding & 1;
+}
+
+// node_modules/d3-geo/src/clip/index.js
+function clip_default(pointVisible, clipLine, interpolate, start2) {
+ return function(sink) {
+ var line2 = clipLine(sink), ringBuffer = buffer_default2(), ringSink = clipLine(ringBuffer), polygonStarted = false, polygon, segments, ring;
+ var clip = {
+ point: point6,
+ lineStart,
+ lineEnd,
+ polygonStart: function() {
+ clip.point = pointRing;
+ clip.lineStart = ringStart;
+ clip.lineEnd = ringEnd;
+ segments = [];
+ polygon = [];
+ },
+ polygonEnd: function() {
+ clip.point = point6;
+ clip.lineStart = lineStart;
+ clip.lineEnd = lineEnd;
+ segments = merge(segments);
+ var startInside = polygonContains_default(polygon, start2);
+ if (segments.length) {
+ if (!polygonStarted)
+ sink.polygonStart(), polygonStarted = true;
+ rejoin_default(segments, compareIntersection, startInside, interpolate, sink);
+ } else if (startInside) {
+ if (!polygonStarted)
+ sink.polygonStart(), polygonStarted = true;
+ sink.lineStart();
+ interpolate(null, null, 1, sink);
+ sink.lineEnd();
+ }
+ if (polygonStarted)
+ sink.polygonEnd(), polygonStarted = false;
+ segments = polygon = null;
+ },
+ sphere: function() {
+ sink.polygonStart();
+ sink.lineStart();
+ interpolate(null, null, 1, sink);
+ sink.lineEnd();
+ sink.polygonEnd();
+ }
+ };
+ function point6(lambda, phi2) {
+ if (pointVisible(lambda, phi2))
+ sink.point(lambda, phi2);
+ }
+ function pointLine(lambda, phi2) {
+ line2.point(lambda, phi2);
+ }
+ function lineStart() {
+ clip.point = pointLine;
+ line2.lineStart();
+ }
+ function lineEnd() {
+ clip.point = point6;
+ line2.lineEnd();
+ }
+ function pointRing(lambda, phi2) {
+ ring.push([lambda, phi2]);
+ ringSink.point(lambda, phi2);
+ }
+ function ringStart() {
+ ringSink.lineStart();
+ ring = [];
+ }
+ function ringEnd() {
+ pointRing(ring[0][0], ring[0][1]);
+ ringSink.lineEnd();
+ var clean = ringSink.clean(), ringSegments = ringBuffer.result(), i, n = ringSegments.length, m, segment, point7;
+ ring.pop();
+ polygon.push(ring);
+ ring = null;
+ if (!n)
+ return;
+ if (clean & 1) {
+ segment = ringSegments[0];
+ if ((m = segment.length - 1) > 0) {
+ if (!polygonStarted)
+ sink.polygonStart(), polygonStarted = true;
+ sink.lineStart();
+ for (i = 0; i < m; ++i)
+ sink.point((point7 = segment[i])[0], point7[1]);
+ sink.lineEnd();
+ }
+ return;
+ }
+ if (n > 1 && clean & 2)
+ ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));
+ segments.push(ringSegments.filter(validSegment));
+ }
+ return clip;
+ };
+}
+function validSegment(segment) {
+ return segment.length > 1;
+}
+function compareIntersection(a2, b) {
+ return ((a2 = a2.x)[0] < 0 ? a2[1] - halfPi4 - epsilon7 : halfPi4 - a2[1]) - ((b = b.x)[0] < 0 ? b[1] - halfPi4 - epsilon7 : halfPi4 - b[1]);
+}
+
+// node_modules/d3-geo/src/clip/antimeridian.js
+var antimeridian_default = clip_default(
+ function() {
+ return true;
+ },
+ clipAntimeridianLine,
+ clipAntimeridianInterpolate,
+ [-pi5, -halfPi4]
+);
+function clipAntimeridianLine(stream) {
+ var lambda0 = NaN, phi0 = NaN, sign0 = NaN, clean;
+ return {
+ lineStart: function() {
+ stream.lineStart();
+ clean = 1;
+ },
+ point: function(lambda1, phi1) {
+ var sign1 = lambda1 > 0 ? pi5 : -pi5, delta = abs4(lambda1 - lambda0);
+ if (abs4(delta - pi5) < epsilon7) {
+ stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi4 : -halfPi4);
+ stream.point(sign0, phi0);
+ stream.lineEnd();
+ stream.lineStart();
+ stream.point(sign1, phi0);
+ stream.point(lambda1, phi0);
+ clean = 0;
+ } else if (sign0 !== sign1 && delta >= pi5) {
+ if (abs4(lambda0 - sign0) < epsilon7)
+ lambda0 -= sign0 * epsilon7;
+ if (abs4(lambda1 - sign1) < epsilon7)
+ lambda1 -= sign1 * epsilon7;
+ phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);
+ stream.point(sign0, phi0);
+ stream.lineEnd();
+ stream.lineStart();
+ stream.point(sign1, phi0);
+ clean = 0;
+ }
+ stream.point(lambda0 = lambda1, phi0 = phi1);
+ sign0 = sign1;
+ },
+ lineEnd: function() {
+ stream.lineEnd();
+ lambda0 = phi0 = NaN;
+ },
+ clean: function() {
+ return 2 - clean;
+ }
+ };
+}
+function clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {
+ var cosPhi0, cosPhi1, sinLambda0Lambda1 = sin3(lambda0 - lambda1);
+ return abs4(sinLambda0Lambda1) > epsilon7 ? atan((sin3(phi0) * (cosPhi1 = cos3(phi1)) * sin3(lambda1) - sin3(phi1) * (cosPhi0 = cos3(phi0)) * sin3(lambda0)) / (cosPhi0 * cosPhi1 * sinLambda0Lambda1)) : (phi0 + phi1) / 2;
+}
+function clipAntimeridianInterpolate(from2, to, direction, stream) {
+ var phi2;
+ if (from2 == null) {
+ phi2 = direction * halfPi4;
+ stream.point(-pi5, phi2);
+ stream.point(0, phi2);
+ stream.point(pi5, phi2);
+ stream.point(pi5, 0);
+ stream.point(pi5, -phi2);
+ stream.point(0, -phi2);
+ stream.point(-pi5, -phi2);
+ stream.point(-pi5, 0);
+ stream.point(-pi5, phi2);
+ } else if (abs4(from2[0] - to[0]) > epsilon7) {
+ var lambda = from2[0] < to[0] ? pi5 : -pi5;
+ phi2 = direction * lambda / 2;
+ stream.point(-lambda, phi2);
+ stream.point(0, phi2);
+ stream.point(lambda, phi2);
+ } else {
+ stream.point(to[0], to[1]);
+ }
+}
+
+// node_modules/d3-geo/src/clip/rectangle.js
+var clipMax = 1e9;
+var clipMin = -clipMax;
+
+// node_modules/d3-geo/src/path/area.js
+var areaSum2 = new Adder();
+var areaRingSum2 = new Adder();
+
+// node_modules/d3-geo/src/path/bounds.js
+var x0 = Infinity;
+var x1 = -x0;
+
+// node_modules/d3-geo/src/path/context.js
+function PathContext(context) {
+ this._context = context;
+}
+PathContext.prototype = {
+ _radius: 4.5,
+ pointRadius: function(_) {
+ return this._radius = _, this;
+ },
+ polygonStart: function() {
+ this._line = 0;
+ },
+ polygonEnd: function() {
+ this._line = NaN;
+ },
+ lineStart: function() {
+ this._point = 0;
+ },
+ lineEnd: function() {
+ if (this._line === 0)
+ this._context.closePath();
+ this._point = NaN;
+ },
+ point: function(x3, y3) {
+ switch (this._point) {
+ case 0: {
+ this._context.moveTo(x3, y3);
+ this._point = 1;
+ break;
+ }
+ case 1: {
+ this._context.lineTo(x3, y3);
+ break;
+ }
+ default: {
+ this._context.moveTo(x3 + this._radius, y3);
+ this._context.arc(x3, y3, this._radius, 0, tau6);
+ break;
+ }
+ }
+ },
+ result: noop2
+};
+
+// node_modules/d3-geo/src/path/measure.js
+var lengthSum = new Adder();
+
+// node_modules/d3-geo/src/transform.js
+function transformer2(methods) {
+ return function(stream) {
+ var s2 = new TransformStream();
+ for (var key in methods)
+ s2[key] = methods[key];
+ s2.stream = stream;
+ return s2;
+ };
+}
+function TransformStream() {
+}
+TransformStream.prototype = {
+ constructor: TransformStream,
+ point: function(x3, y3) {
+ this.stream.point(x3, y3);
+ },
+ sphere: function() {
+ this.stream.sphere();
+ },
+ lineStart: function() {
+ this.stream.lineStart();
+ },
+ lineEnd: function() {
+ this.stream.lineEnd();
+ },
+ polygonStart: function() {
+ this.stream.polygonStart();
+ },
+ polygonEnd: function() {
+ this.stream.polygonEnd();
+ }
+};
+
+// node_modules/d3-geo/src/projection/resample.js
+var cosMinDistance = cos3(30 * radians2);
+
+// node_modules/d3-geo/src/projection/index.js
+var transformRadians = transformer2({
+ point: function(x3, y3) {
+ this.stream.point(x3 * radians2, y3 * radians2);
+ }
+});
+
+// node_modules/d3-geo/src/projection/azimuthal.js
+function azimuthalRaw(scale2) {
+ return function(x3, y3) {
+ var cx = cos3(x3), cy = cos3(y3), k2 = scale2(cx * cy);
+ if (k2 === Infinity)
+ return [2, 0];
+ return [
+ k2 * cy * sin3(x3),
+ k2 * sin3(y3)
+ ];
+ };
+}
+function azimuthalInvert(angle) {
+ return function(x3, y3) {
+ var z = sqrt4(x3 * x3 + y3 * y3), c3 = angle(z), sc = sin3(c3), cc2 = cos3(c3);
+ return [
+ atan22(x3 * sc, z * cc2),
+ asin2(z && y3 * sc / z)
+ ];
+ };
+}
+
+// node_modules/d3-geo/src/projection/azimuthalEqualArea.js
+var azimuthalEqualAreaRaw = azimuthalRaw(function(cxcy) {
+ return sqrt4(2 / (1 + cxcy));
+});
+azimuthalEqualAreaRaw.invert = azimuthalInvert(function(z) {
+ return 2 * asin2(z / 2);
+});
+
+// node_modules/d3-geo/src/projection/azimuthalEquidistant.js
+var azimuthalEquidistantRaw = azimuthalRaw(function(c3) {
+ return (c3 = acos2(c3)) && c3 / sin3(c3);
+});
+azimuthalEquidistantRaw.invert = azimuthalInvert(function(z) {
+ return z;
+});
+
+// node_modules/d3-geo/src/projection/mercator.js
+function mercatorRaw(lambda, phi2) {
+ return [lambda, log2(tan((halfPi4 + phi2) / 2))];
+}
+mercatorRaw.invert = function(x3, y3) {
+ return [x3, 2 * atan(exp(y3)) - halfPi4];
+};
+
+// node_modules/d3-geo/src/projection/equirectangular.js
+function equirectangularRaw(lambda, phi2) {
+ return [lambda, phi2];
+}
+equirectangularRaw.invert = equirectangularRaw;
+
+// node_modules/d3-geo/src/projection/equalEarth.js
+var A1 = 1.340264;
+var A2 = -0.081106;
+var A3 = 893e-6;
+var A4 = 3796e-6;
+var M = sqrt4(3) / 2;
+var iterations = 12;
+function equalEarthRaw(lambda, phi2) {
+ var l = asin2(M * sin3(phi2)), l2 = l * l, l6 = l2 * l2 * l2;
+ return [
+ lambda * cos3(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))),
+ l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2))
+ ];
+}
+equalEarthRaw.invert = function(x3, y3) {
+ var l = y3, l2 = l * l, l6 = l2 * l2 * l2;
+ for (var i = 0, delta, fy, fpy; i < iterations; ++i) {
+ fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y3;
+ fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2);
+ l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2;
+ if (abs4(delta) < epsilon22)
+ break;
+ }
+ return [
+ M * x3 * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / cos3(l),
+ asin2(sin3(l) / M)
+ ];
+};
+
+// node_modules/d3-geo/src/projection/gnomonic.js
+function gnomonicRaw(x3, y3) {
+ var cy = cos3(y3), k2 = cos3(x3) * cy;
+ return [cy * sin3(x3) / k2, sin3(y3) / k2];
+}
+gnomonicRaw.invert = azimuthalInvert(atan);
+
+// node_modules/d3-geo/src/projection/naturalEarth1.js
+function naturalEarth1Raw(lambda, phi2) {
+ var phi22 = phi2 * phi2, phi4 = phi22 * phi22;
+ return [
+ lambda * (0.8707 - 0.131979 * phi22 + phi4 * (-0.013791 + phi4 * (3971e-6 * phi22 - 1529e-6 * phi4))),
+ phi2 * (1.007226 + phi22 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi22 - 5916e-6 * phi4)))
+ ];
+}
+naturalEarth1Raw.invert = function(x3, y3) {
+ var phi2 = y3, i = 25, delta;
+ do {
+ var phi22 = phi2 * phi2, phi4 = phi22 * phi22;
+ phi2 -= delta = (phi2 * (1.007226 + phi22 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi22 - 5916e-6 * phi4))) - y3) / (1.007226 + phi22 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi22 - 5916e-6 * 11 * phi4)));
+ } while (abs4(delta) > epsilon7 && --i > 0);
+ return [
+ x3 / (0.8707 + (phi22 = phi2 * phi2) * (-0.131979 + phi22 * (-0.013791 + phi22 * phi22 * phi22 * (3971e-6 - 1529e-6 * phi22)))),
+ phi2
+ ];
+};
+
+// node_modules/d3-geo/src/projection/orthographic.js
+function orthographicRaw(x3, y3) {
+ return [cos3(y3) * sin3(x3), sin3(y3)];
+}
+orthographicRaw.invert = azimuthalInvert(asin2);
+
+// node_modules/d3-geo/src/projection/stereographic.js
+function stereographicRaw(x3, y3) {
+ var cy = cos3(y3), k2 = 1 + cos3(x3) * cy;
+ return [cy * sin3(x3) / k2, sin3(y3) / k2];
+}
+stereographicRaw.invert = azimuthalInvert(function(z) {
+ return 2 * atan(z);
+});
+
+// node_modules/d3-geo/src/projection/transverseMercator.js
+function transverseMercatorRaw(lambda, phi2) {
+ return [log2(tan((halfPi4 + phi2) / 2)), -lambda];
+}
+transverseMercatorRaw.invert = function(x3, y3) {
+ return [-y3, 2 * atan(exp(x3)) - halfPi4];
+};
+
+// node_modules/d3-hierarchy/src/hierarchy/count.js
+function count2(node2) {
+ var sum4 = 0, children2 = node2.children, i = children2 && children2.length;
+ if (!i)
+ sum4 = 1;
+ else
+ while (--i >= 0)
+ sum4 += children2[i].value;
+ node2.value = sum4;
+}
+function count_default() {
+ return this.eachAfter(count2);
+}
+
+// node_modules/d3-hierarchy/src/hierarchy/each.js
+function each_default2(callback, that) {
+ let index2 = -1;
+ for (const node2 of this) {
+ callback.call(that, node2, ++index2, this);
+ }
+ return this;
+}
+
+// node_modules/d3-hierarchy/src/hierarchy/eachBefore.js
+function eachBefore_default(callback, that) {
+ var node2 = this, nodes = [node2], children2, i, index2 = -1;
+ while (node2 = nodes.pop()) {
+ callback.call(that, node2, ++index2, this);
+ if (children2 = node2.children) {
+ for (i = children2.length - 1; i >= 0; --i) {
+ nodes.push(children2[i]);
+ }
+ }
+ }
+ return this;
+}
+
+// node_modules/d3-hierarchy/src/hierarchy/eachAfter.js
+function eachAfter_default(callback, that) {
+ var node2 = this, nodes = [node2], next2 = [], children2, i, n, index2 = -1;
+ while (node2 = nodes.pop()) {
+ next2.push(node2);
+ if (children2 = node2.children) {
+ for (i = 0, n = children2.length; i < n; ++i) {
+ nodes.push(children2[i]);
+ }
+ }
+ }
+ while (node2 = next2.pop()) {
+ callback.call(that, node2, ++index2, this);
+ }
+ return this;
+}
+
+// node_modules/d3-hierarchy/src/hierarchy/find.js
+function find_default2(callback, that) {
+ let index2 = -1;
+ for (const node2 of this) {
+ if (callback.call(that, node2, ++index2, this)) {
+ return node2;
+ }
+ }
+}
+
+// node_modules/d3-hierarchy/src/hierarchy/sum.js
+function sum_default(value) {
+ return this.eachAfter(function(node2) {
+ var sum4 = +value(node2.data) || 0, children2 = node2.children, i = children2 && children2.length;
+ while (--i >= 0)
+ sum4 += children2[i].value;
+ node2.value = sum4;
+ });
+}
+
+// node_modules/d3-hierarchy/src/hierarchy/sort.js
+function sort_default2(compare) {
+ return this.eachBefore(function(node2) {
+ if (node2.children) {
+ node2.children.sort(compare);
+ }
+ });
+}
+
+// node_modules/d3-hierarchy/src/hierarchy/path.js
+function path_default2(end) {
+ var start2 = this, ancestor = leastCommonAncestor(start2, end), nodes = [start2];
+ while (start2 !== ancestor) {
+ start2 = start2.parent;
+ nodes.push(start2);
+ }
+ var k2 = nodes.length;
+ while (end !== ancestor) {
+ nodes.splice(k2, 0, end);
+ end = end.parent;
+ }
+ return nodes;
+}
+function leastCommonAncestor(a2, b) {
+ if (a2 === b)
+ return a2;
+ var aNodes = a2.ancestors(), bNodes = b.ancestors(), c3 = null;
+ a2 = aNodes.pop();
+ b = bNodes.pop();
+ while (a2 === b) {
+ c3 = a2;
+ a2 = aNodes.pop();
+ b = bNodes.pop();
+ }
+ return c3;
+}
+
+// node_modules/d3-hierarchy/src/hierarchy/ancestors.js
+function ancestors_default() {
+ var node2 = this, nodes = [node2];
+ while (node2 = node2.parent) {
+ nodes.push(node2);
+ }
+ return nodes;
+}
+
+// node_modules/d3-hierarchy/src/hierarchy/descendants.js
+function descendants_default() {
+ return Array.from(this);
+}
+
+// node_modules/d3-hierarchy/src/hierarchy/leaves.js
+function leaves_default() {
+ var leaves = [];
+ this.eachBefore(function(node2) {
+ if (!node2.children) {
+ leaves.push(node2);
+ }
+ });
+ return leaves;
+}
+
+// node_modules/d3-hierarchy/src/hierarchy/links.js
+function links_default() {
+ var root3 = this, links = [];
+ root3.each(function(node2) {
+ if (node2 !== root3) {
+ links.push({ source: node2.parent, target: node2 });
+ }
+ });
+ return links;
+}
+
+// node_modules/d3-hierarchy/src/hierarchy/iterator.js
+function* iterator_default2() {
+ var node2 = this, current, next2 = [node2], children2, i, n;
+ do {
+ current = next2.reverse(), next2 = [];
+ while (node2 = current.pop()) {
+ yield node2;
+ if (children2 = node2.children) {
+ for (i = 0, n = children2.length; i < n; ++i) {
+ next2.push(children2[i]);
+ }
+ }
+ }
+ } while (next2.length);
+}
+
+// node_modules/d3-hierarchy/src/hierarchy/index.js
+function hierarchy(data, children2) {
+ if (data instanceof Map) {
+ data = [void 0, data];
+ if (children2 === void 0)
+ children2 = mapChildren;
+ } else if (children2 === void 0) {
+ children2 = objectChildren;
+ }
+ var root3 = new Node(data), node2, nodes = [root3], child, childs, i, n;
+ while (node2 = nodes.pop()) {
+ if ((childs = children2(node2.data)) && (n = (childs = Array.from(childs)).length)) {
+ node2.children = childs;
+ for (i = n - 1; i >= 0; --i) {
+ nodes.push(child = childs[i] = new Node(childs[i]));
+ child.parent = node2;
+ child.depth = node2.depth + 1;
+ }
+ }
+ }
+ return root3.eachBefore(computeHeight);
+}
+function node_copy() {
+ return hierarchy(this).eachBefore(copyData);
+}
+function objectChildren(d) {
+ return d.children;
+}
+function mapChildren(d) {
+ return Array.isArray(d) ? d[1] : null;
+}
+function copyData(node2) {
+ if (node2.data.value !== void 0)
+ node2.value = node2.data.value;
+ node2.data = node2.data.data;
+}
+function computeHeight(node2) {
+ var height = 0;
+ do
+ node2.height = height;
+ while ((node2 = node2.parent) && node2.height < ++height);
+}
+function Node(data) {
+ this.data = data;
+ this.depth = this.height = 0;
+ this.parent = null;
+}
+Node.prototype = hierarchy.prototype = {
+ constructor: Node,
+ count: count_default,
+ each: each_default2,
+ eachAfter: eachAfter_default,
+ eachBefore: eachBefore_default,
+ find: find_default2,
+ sum: sum_default,
+ sort: sort_default2,
+ path: path_default2,
+ ancestors: ancestors_default,
+ descendants: descendants_default,
+ leaves: leaves_default,
+ links: links_default,
+ copy: node_copy,
+ [Symbol.iterator]: iterator_default2
+};
+
+// node_modules/d3-hierarchy/src/treemap/dice.js
+function dice_default(parent, x02, y0, x12, y1) {
+ var nodes = parent.children, node2, i = -1, n = nodes.length, k2 = parent.value && (x12 - x02) / parent.value;
+ while (++i < n) {
+ node2 = nodes[i], node2.y0 = y0, node2.y1 = y1;
+ node2.x0 = x02, node2.x1 = x02 += node2.value * k2;
+ }
+}
+
+// node_modules/d3-hierarchy/src/tree.js
+function TreeNode(node2, i) {
+ this._ = node2;
+ this.parent = null;
+ this.children = null;
+ this.A = null;
+ this.a = this;
+ this.z = 0;
+ this.m = 0;
+ this.c = 0;
+ this.s = 0;
+ this.t = null;
+ this.i = i;
+}
+TreeNode.prototype = Object.create(Node.prototype);
+
+// node_modules/d3-hierarchy/src/treemap/slice.js
+function slice_default(parent, x02, y0, x12, y1) {
+ var nodes = parent.children, node2, i = -1, n = nodes.length, k2 = parent.value && (y1 - y0) / parent.value;
+ while (++i < n) {
+ node2 = nodes[i], node2.x0 = x02, node2.x1 = x12;
+ node2.y0 = y0, node2.y1 = y0 += node2.value * k2;
+ }
+}
+
+// node_modules/d3-hierarchy/src/treemap/squarify.js
+var phi = (1 + Math.sqrt(5)) / 2;
+function squarifyRatio(ratio, parent, x02, y0, x12, y1) {
+ var rows = [], nodes = parent.children, row, nodeValue, i0 = 0, i1 = 0, n = nodes.length, dx, dy, value = parent.value, sumValue, minValue, maxValue, newRatio, minRatio, alpha, beta;
+ while (i0 < n) {
+ dx = x12 - x02, dy = y1 - y0;
+ do
+ sumValue = nodes[i1++].value;
+ while (!sumValue && i1 < n);
+ minValue = maxValue = sumValue;
+ alpha = Math.max(dy / dx, dx / dy) / (value * ratio);
+ beta = sumValue * sumValue * alpha;
+ minRatio = Math.max(maxValue / beta, beta / minValue);
+ for (; i1 < n; ++i1) {
+ sumValue += nodeValue = nodes[i1].value;
+ if (nodeValue < minValue)
+ minValue = nodeValue;
+ if (nodeValue > maxValue)
+ maxValue = nodeValue;
+ beta = sumValue * sumValue * alpha;
+ newRatio = Math.max(maxValue / beta, beta / minValue);
+ if (newRatio > minRatio) {
+ sumValue -= nodeValue;
+ break;
+ }
+ minRatio = newRatio;
+ }
+ rows.push(row = { value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1) });
+ if (row.dice)
+ dice_default(row, x02, y0, x12, value ? y0 += dy * sumValue / value : y1);
+ else
+ slice_default(row, x02, y0, value ? x02 += dx * sumValue / value : x12, y1);
+ value -= sumValue, i0 = i1;
+ }
+ return rows;
+}
+var squarify_default = function custom17(ratio) {
+ function squarify(parent, x02, y0, x12, y1) {
+ squarifyRatio(ratio, parent, x02, y0, x12, y1);
+ }
+ squarify.ratio = function(x3) {
+ return custom17((x3 = +x3) > 1 ? x3 : 1);
+ };
+ return squarify;
+}(phi);
+
+// node_modules/d3-hierarchy/src/treemap/resquarify.js
+var resquarify_default = function custom18(ratio) {
+ function resquarify(parent, x02, y0, x12, y1) {
+ if ((rows = parent._squarify) && rows.ratio === ratio) {
+ var rows, row, nodes, i, j = -1, n, m = rows.length, value = parent.value;
+ while (++j < m) {
+ row = rows[j], nodes = row.children;
+ for (i = row.value = 0, n = nodes.length; i < n; ++i)
+ row.value += nodes[i].value;
+ if (row.dice)
+ dice_default(row, x02, y0, x12, value ? y0 += (y1 - y0) * row.value / value : y1);
+ else
+ slice_default(row, x02, y0, value ? x02 += (x12 - x02) * row.value / value : x12, y1);
+ value -= row.value;
+ }
+ } else {
+ parent._squarify = rows = squarifyRatio(ratio, parent, x02, y0, x12, y1);
+ rows.ratio = ratio;
+ }
+ }
+ resquarify.ratio = function(x3) {
+ return custom18((x3 = +x3) > 1 ? x3 : 1);
+ };
+ return resquarify;
+}(phi);
+
+// node_modules/d3-random/src/defaultSource.js
+var defaultSource_default = Math.random;
+
+// node_modules/d3-random/src/uniform.js
+var uniform_default = function sourceRandomUniform(source) {
+ function randomUniform(min4, max5) {
+ min4 = min4 == null ? 0 : +min4;
+ max5 = max5 == null ? 1 : +max5;
+ if (arguments.length === 1)
+ max5 = min4, min4 = 0;
+ else
+ max5 -= min4;
+ return function() {
+ return source() * max5 + min4;
+ };
+ }
+ randomUniform.source = sourceRandomUniform;
+ return randomUniform;
+}(defaultSource_default);
+
+// node_modules/d3-random/src/int.js
+var int_default = function sourceRandomInt(source) {
+ function randomInt(min4, max5) {
+ if (arguments.length < 2)
+ max5 = min4, min4 = 0;
+ min4 = Math.floor(min4);
+ max5 = Math.floor(max5) - min4;
+ return function() {
+ return Math.floor(source() * max5 + min4);
+ };
+ }
+ randomInt.source = sourceRandomInt;
+ return randomInt;
+}(defaultSource_default);
+
+// node_modules/d3-random/src/normal.js
+var normal_default = function sourceRandomNormal(source) {
+ function randomNormal(mu, sigma) {
+ var x3, r;
+ mu = mu == null ? 0 : +mu;
+ sigma = sigma == null ? 1 : +sigma;
+ return function() {
+ var y3;
+ if (x3 != null)
+ y3 = x3, x3 = null;
+ else
+ do {
+ x3 = source() * 2 - 1;
+ y3 = source() * 2 - 1;
+ r = x3 * x3 + y3 * y3;
+ } while (!r || r > 1);
+ return mu + sigma * y3 * Math.sqrt(-2 * Math.log(r) / r);
+ };
+ }
+ randomNormal.source = sourceRandomNormal;
+ return randomNormal;
+}(defaultSource_default);
+
+// node_modules/d3-random/src/logNormal.js
+var logNormal_default = function sourceRandomLogNormal(source) {
+ var N = normal_default.source(source);
+ function randomLogNormal() {
+ var randomNormal = N.apply(this, arguments);
+ return function() {
+ return Math.exp(randomNormal());
+ };
+ }
+ randomLogNormal.source = sourceRandomLogNormal;
+ return randomLogNormal;
+}(defaultSource_default);
+
+// node_modules/d3-random/src/irwinHall.js
+var irwinHall_default = function sourceRandomIrwinHall(source) {
+ function randomIrwinHall(n) {
+ if ((n = +n) <= 0)
+ return () => 0;
+ return function() {
+ for (var sum4 = 0, i = n; i > 1; --i)
+ sum4 += source();
+ return sum4 + i * source();
+ };
+ }
+ randomIrwinHall.source = sourceRandomIrwinHall;
+ return randomIrwinHall;
+}(defaultSource_default);
+
+// node_modules/d3-random/src/bates.js
+var bates_default = function sourceRandomBates(source) {
+ var I = irwinHall_default.source(source);
+ function randomBates(n) {
+ if ((n = +n) === 0)
+ return source;
+ var randomIrwinHall = I(n);
+ return function() {
+ return randomIrwinHall() / n;
+ };
+ }
+ randomBates.source = sourceRandomBates;
+ return randomBates;
+}(defaultSource_default);
+
+// node_modules/d3-random/src/exponential.js
+var exponential_default = function sourceRandomExponential(source) {
+ function randomExponential(lambda) {
+ return function() {
+ return -Math.log1p(-source()) / lambda;
+ };
+ }
+ randomExponential.source = sourceRandomExponential;
+ return randomExponential;
+}(defaultSource_default);
+
+// node_modules/d3-random/src/pareto.js
+var pareto_default = function sourceRandomPareto(source) {
+ function randomPareto(alpha) {
+ if ((alpha = +alpha) < 0)
+ throw new RangeError("invalid alpha");
+ alpha = 1 / -alpha;
+ return function() {
+ return Math.pow(1 - source(), alpha);
+ };
+ }
+ randomPareto.source = sourceRandomPareto;
+ return randomPareto;
+}(defaultSource_default);
+
+// node_modules/d3-random/src/bernoulli.js
+var bernoulli_default = function sourceRandomBernoulli(source) {
+ function randomBernoulli(p) {
+ if ((p = +p) < 0 || p > 1)
+ throw new RangeError("invalid p");
+ return function() {
+ return Math.floor(source() + p);
+ };
+ }
+ randomBernoulli.source = sourceRandomBernoulli;
+ return randomBernoulli;
+}(defaultSource_default);
+
+// node_modules/d3-random/src/geometric.js
+var geometric_default = function sourceRandomGeometric(source) {
+ function randomGeometric(p) {
+ if ((p = +p) < 0 || p > 1)
+ throw new RangeError("invalid p");
+ if (p === 0)
+ return () => Infinity;
+ if (p === 1)
+ return () => 1;
+ p = Math.log1p(-p);
+ return function() {
+ return 1 + Math.floor(Math.log1p(-source()) / p);
+ };
+ }
+ randomGeometric.source = sourceRandomGeometric;
+ return randomGeometric;
+}(defaultSource_default);
+
+// node_modules/d3-random/src/gamma.js
+var gamma_default = function sourceRandomGamma(source) {
+ var randomNormal = normal_default.source(source)();
+ function randomGamma(k2, theta) {
+ if ((k2 = +k2) < 0)
+ throw new RangeError("invalid k");
+ if (k2 === 0)
+ return () => 0;
+ theta = theta == null ? 1 : +theta;
+ if (k2 === 1)
+ return () => -Math.log1p(-source()) * theta;
+ var d = (k2 < 1 ? k2 + 1 : k2) - 1 / 3, c3 = 1 / (3 * Math.sqrt(d)), multiplier = k2 < 1 ? () => Math.pow(source(), 1 / k2) : () => 1;
+ return function() {
+ do {
+ do {
+ var x3 = randomNormal(), v2 = 1 + c3 * x3;
+ } while (v2 <= 0);
+ v2 *= v2 * v2;
+ var u4 = 1 - source();
+ } while (u4 >= 1 - 0.0331 * x3 * x3 * x3 * x3 && Math.log(u4) >= 0.5 * x3 * x3 + d * (1 - v2 + Math.log(v2)));
+ return d * v2 * multiplier() * theta;
+ };
+ }
+ randomGamma.source = sourceRandomGamma;
+ return randomGamma;
+}(defaultSource_default);
+
+// node_modules/d3-random/src/beta.js
+var beta_default = function sourceRandomBeta(source) {
+ var G = gamma_default.source(source);
+ function randomBeta(alpha, beta) {
+ var X2 = G(alpha), Y2 = G(beta);
+ return function() {
+ var x3 = X2();
+ return x3 === 0 ? 0 : x3 / (x3 + Y2());
+ };
+ }
+ randomBeta.source = sourceRandomBeta;
+ return randomBeta;
+}(defaultSource_default);
+
+// node_modules/d3-random/src/binomial.js
+var binomial_default = function sourceRandomBinomial(source) {
+ var G = geometric_default.source(source), B3 = beta_default.source(source);
+ function randomBinomial(n, p) {
+ n = +n;
+ if ((p = +p) >= 1)
+ return () => n;
+ if (p <= 0)
+ return () => 0;
+ return function() {
+ var acc = 0, nn = n, pp = p;
+ while (nn * pp > 16 && nn * (1 - pp) > 16) {
+ var i = Math.floor((nn + 1) * pp), y3 = B3(i, nn - i + 1)();
+ if (y3 <= pp) {
+ acc += i;
+ nn -= i;
+ pp = (pp - y3) / (1 - y3);
+ } else {
+ nn = i - 1;
+ pp /= y3;
+ }
+ }
+ var sign3 = pp < 0.5, pFinal = sign3 ? pp : 1 - pp, g = G(pFinal);
+ for (var s2 = g(), k2 = 0; s2 <= nn; ++k2)
+ s2 += g();
+ return acc + (sign3 ? k2 : nn - k2);
+ };
+ }
+ randomBinomial.source = sourceRandomBinomial;
+ return randomBinomial;
+}(defaultSource_default);
+
+// node_modules/d3-random/src/weibull.js
+var weibull_default = function sourceRandomWeibull(source) {
+ function randomWeibull(k2, a2, b) {
+ var outerFunc;
+ if ((k2 = +k2) === 0) {
+ outerFunc = (x3) => -Math.log(x3);
+ } else {
+ k2 = 1 / k2;
+ outerFunc = (x3) => Math.pow(x3, k2);
+ }
+ a2 = a2 == null ? 0 : +a2;
+ b = b == null ? 1 : +b;
+ return function() {
+ return a2 + b * outerFunc(-Math.log1p(-source()));
+ };
+ }
+ randomWeibull.source = sourceRandomWeibull;
+ return randomWeibull;
+}(defaultSource_default);
+
+// node_modules/d3-random/src/cauchy.js
+var cauchy_default = function sourceRandomCauchy(source) {
+ function randomCauchy(a2, b) {
+ a2 = a2 == null ? 0 : +a2;
+ b = b == null ? 1 : +b;
+ return function() {
+ return a2 + b * Math.tan(Math.PI * source());
+ };
+ }
+ randomCauchy.source = sourceRandomCauchy;
+ return randomCauchy;
+}(defaultSource_default);
+
+// node_modules/d3-random/src/logistic.js
+var logistic_default = function sourceRandomLogistic(source) {
+ function randomLogistic(a2, b) {
+ a2 = a2 == null ? 0 : +a2;
+ b = b == null ? 1 : +b;
+ return function() {
+ var u4 = source();
+ return a2 + b * Math.log(u4 / (1 - u4));
+ };
+ }
+ randomLogistic.source = sourceRandomLogistic;
+ return randomLogistic;
+}(defaultSource_default);
+
+// node_modules/d3-random/src/poisson.js
+var poisson_default = function sourceRandomPoisson(source) {
+ var G = gamma_default.source(source), B3 = binomial_default.source(source);
+ function randomPoisson(lambda) {
+ return function() {
+ var acc = 0, l = lambda;
+ while (l > 16) {
+ var n = Math.floor(0.875 * l), t = G(n)();
+ if (t > l)
+ return acc + B3(n - 1, l / t)();
+ acc += n;
+ l -= t;
+ }
+ for (var s2 = -Math.log1p(-source()), k2 = 0; s2 <= l; ++k2)
+ s2 -= Math.log1p(-source());
+ return acc + k2;
+ };
+ }
+ randomPoisson.source = sourceRandomPoisson;
+ return randomPoisson;
+}(defaultSource_default);
+
+// node_modules/d3-random/src/lcg.js
+var eps = 1 / 4294967296;
+
+// node_modules/d3-zoom/src/transform.js
+function Transform(k2, x3, y3) {
+ this.k = k2;
+ this.x = x3;
+ this.y = y3;
+}
+Transform.prototype = {
+ constructor: Transform,
+ scale: function(k2) {
+ return k2 === 1 ? this : new Transform(this.k * k2, this.x, this.y);
+ },
+ translate: function(x3, y3) {
+ return x3 === 0 & y3 === 0 ? this : new Transform(this.k, this.x + this.k * x3, this.y + this.k * y3);
+ },
+ apply: function(point6) {
+ return [point6[0] * this.k + this.x, point6[1] * this.k + this.y];
+ },
+ applyX: function(x3) {
+ return x3 * this.k + this.x;
+ },
+ applyY: function(y3) {
+ return y3 * this.k + this.y;
+ },
+ invert: function(location) {
+ return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];
+ },
+ invertX: function(x3) {
+ return (x3 - this.x) / this.k;
+ },
+ invertY: function(y3) {
+ return (y3 - this.y) / this.k;
+ },
+ rescaleX: function(x3) {
+ return x3.copy().domain(x3.range().map(this.invertX, this).map(x3.invert, x3));
+ },
+ rescaleY: function(y3) {
+ return y3.copy().domain(y3.range().map(this.invertY, this).map(y3.invert, y3));
+ },
+ toString: function() {
+ return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
+ }
+};
+var identity5 = new Transform(1, 0, 0);
+transform.prototype = Transform.prototype;
+function transform(node2) {
+ while (!node2.__zoom)
+ if (!(node2 = node2.parentNode))
+ return identity5;
+ return node2.__zoom;
+}
+
+// node_modules/dompurify/dist/purify.es.js
+var {
+ entries,
+ setPrototypeOf,
+ isFrozen,
+ getPrototypeOf,
+ getOwnPropertyDescriptor
+} = Object;
+var {
+ freeze,
+ seal,
+ create: create2
+} = Object;
+var {
+ apply,
+ construct
+} = typeof Reflect !== "undefined" && Reflect;
+if (!apply) {
+ apply = function apply2(fun, thisValue, args) {
+ return fun.apply(thisValue, args);
+ };
+}
+if (!freeze) {
+ freeze = function freeze2(x3) {
+ return x3;
+ };
+}
+if (!seal) {
+ seal = function seal2(x3) {
+ return x3;
+ };
+}
+if (!construct) {
+ construct = function construct2(Func, args) {
+ return new Func(...args);
+ };
+}
+var arrayForEach = unapply(Array.prototype.forEach);
+var arrayPop = unapply(Array.prototype.pop);
+var arrayPush = unapply(Array.prototype.push);
+var stringToLowerCase = unapply(String.prototype.toLowerCase);
+var stringToString = unapply(String.prototype.toString);
+var stringMatch = unapply(String.prototype.match);
+var stringReplace = unapply(String.prototype.replace);
+var stringIndexOf = unapply(String.prototype.indexOf);
+var stringTrim = unapply(String.prototype.trim);
+var regExpTest = unapply(RegExp.prototype.test);
+var typeErrorCreate = unconstruct(TypeError);
+function unapply(func) {
+ return function(thisArg) {
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+ return apply(func, thisArg, args);
+ };
+}
+function unconstruct(func) {
+ return function() {
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+ args[_key2] = arguments[_key2];
+ }
+ return construct(func, args);
+ };
+}
+function addToSet(set4, array4, transformCaseFunc) {
+ var _transformCaseFunc;
+ transformCaseFunc = (_transformCaseFunc = transformCaseFunc) !== null && _transformCaseFunc !== void 0 ? _transformCaseFunc : stringToLowerCase;
+ if (setPrototypeOf) {
+ setPrototypeOf(set4, null);
+ }
+ let l = array4.length;
+ while (l--) {
+ let element = array4[l];
+ if (typeof element === "string") {
+ const lcElement = transformCaseFunc(element);
+ if (lcElement !== element) {
+ if (!isFrozen(array4)) {
+ array4[l] = lcElement;
+ }
+ element = lcElement;
+ }
+ }
+ set4[element] = true;
+ }
+ return set4;
+}
+function clone(object) {
+ const newObject = create2(null);
+ for (const [property, value] of entries(object)) {
+ newObject[property] = value;
+ }
+ return newObject;
+}
+function lookupGetter(object, prop) {
+ while (object !== null) {
+ const desc = getOwnPropertyDescriptor(object, prop);
+ if (desc) {
+ if (desc.get) {
+ return unapply(desc.get);
+ }
+ if (typeof desc.value === "function") {
+ return unapply(desc.value);
+ }
+ }
+ object = getPrototypeOf(object);
+ }
+ function fallbackValue(element) {
+ console.warn("fallback value for", element);
+ return null;
+ }
+ return fallbackValue;
+}
+var html$1 = freeze(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]);
+var svg$1 = freeze(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]);
+var svgFilters = freeze(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]);
+var svgDisallowed = freeze(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]);
+var mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]);
+var mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
+var text = freeze(["#text"]);
+var html2 = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]);
+var svg2 = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
+var mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
+var xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
+var MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
+var ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
+var TMPLIT_EXPR = seal(/\${[\w\W]*}/gm);
+var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/);
+var ARIA_ATTR = seal(/^aria-[\-\w]+$/);
+var IS_ALLOWED_URI = seal(
+ /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
+ // eslint-disable-line no-useless-escape
+);
+var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
+var ATTR_WHITESPACE = seal(
+ /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
+ // eslint-disable-line no-control-regex
+);
+var DOCTYPE_NAME = seal(/^html$/i);
+var EXPRESSIONS = Object.freeze({
+ __proto__: null,
+ MUSTACHE_EXPR,
+ ERB_EXPR,
+ TMPLIT_EXPR,
+ DATA_ATTR,
+ ARIA_ATTR,
+ IS_ALLOWED_URI,
+ IS_SCRIPT_OR_DATA,
+ ATTR_WHITESPACE,
+ DOCTYPE_NAME
+});
+var getGlobal = () => typeof window === "undefined" ? null : window;
+var _createTrustedTypesPolicy = function _createTrustedTypesPolicy2(trustedTypes, purifyHostElement) {
+ if (typeof trustedTypes !== "object" || typeof trustedTypes.createPolicy !== "function") {
+ return null;
+ }
+ let suffix = null;
+ const ATTR_NAME = "data-tt-policy-suffix";
+ if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
+ suffix = purifyHostElement.getAttribute(ATTR_NAME);
+ }
+ const policyName = "dompurify" + (suffix ? "#" + suffix : "");
+ try {
+ return trustedTypes.createPolicy(policyName, {
+ createHTML(html3) {
+ return html3;
+ },
+ createScriptURL(scriptUrl) {
+ return scriptUrl;
+ }
+ });
+ } catch (_) {
+ console.warn("TrustedTypes policy " + policyName + " could not be created.");
+ return null;
+ }
+};
+function createDOMPurify() {
+ let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
+ const DOMPurify = (root3) => createDOMPurify(root3);
+ DOMPurify.version = "3.0.5";
+ DOMPurify.removed = [];
+ if (!window2 || !window2.document || window2.document.nodeType !== 9) {
+ DOMPurify.isSupported = false;
+ return DOMPurify;
+ }
+ const originalDocument = window2.document;
+ const currentScript = originalDocument.currentScript;
+ let {
+ document: document2
+ } = window2;
+ const {
+ DocumentFragment,
+ HTMLTemplateElement,
+ Node: Node2,
+ Element,
+ NodeFilter,
+ NamedNodeMap = window2.NamedNodeMap || window2.MozNamedAttrMap,
+ HTMLFormElement,
+ DOMParser: DOMParser2,
+ trustedTypes
+ } = window2;
+ const ElementPrototype = Element.prototype;
+ const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
+ const getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
+ const getChildNodes = lookupGetter(ElementPrototype, "childNodes");
+ const getParentNode = lookupGetter(ElementPrototype, "parentNode");
+ if (typeof HTMLTemplateElement === "function") {
+ const template = document2.createElement("template");
+ if (template.content && template.content.ownerDocument) {
+ document2 = template.content.ownerDocument;
+ }
+ }
+ let trustedTypesPolicy;
+ let emptyHTML = "";
+ const {
+ implementation,
+ createNodeIterator,
+ createDocumentFragment,
+ getElementsByTagName
+ } = document2;
+ const {
+ importNode
+ } = originalDocument;
+ let hooks = {};
+ DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode === "function" && implementation && implementation.createHTMLDocument !== void 0;
+ const {
+ MUSTACHE_EXPR: MUSTACHE_EXPR2,
+ ERB_EXPR: ERB_EXPR2,
+ TMPLIT_EXPR: TMPLIT_EXPR2,
+ DATA_ATTR: DATA_ATTR2,
+ ARIA_ATTR: ARIA_ATTR2,
+ IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA2,
+ ATTR_WHITESPACE: ATTR_WHITESPACE2
+ } = EXPRESSIONS;
+ let {
+ IS_ALLOWED_URI: IS_ALLOWED_URI$1
+ } = EXPRESSIONS;
+ let ALLOWED_TAGS = null;
+ const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
+ let ALLOWED_ATTR = null;
+ const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html2, ...svg2, ...mathMl, ...xml]);
+ let CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, {
+ tagNameCheck: {
+ writable: true,
+ configurable: false,
+ enumerable: true,
+ value: null
+ },
+ attributeNameCheck: {
+ writable: true,
+ configurable: false,
+ enumerable: true,
+ value: null
+ },
+ allowCustomizedBuiltInElements: {
+ writable: true,
+ configurable: false,
+ enumerable: true,
+ value: false
+ }
+ }));
+ let FORBID_TAGS = null;
+ let FORBID_ATTR = null;
+ let ALLOW_ARIA_ATTR = true;
+ let ALLOW_DATA_ATTR = true;
+ let ALLOW_UNKNOWN_PROTOCOLS = false;
+ let ALLOW_SELF_CLOSE_IN_ATTR = true;
+ let SAFE_FOR_TEMPLATES = false;
+ let WHOLE_DOCUMENT = false;
+ let SET_CONFIG = false;
+ let FORCE_BODY = false;
+ let RETURN_DOM = false;
+ let RETURN_DOM_FRAGMENT = false;
+ let RETURN_TRUSTED_TYPE = false;
+ let SANITIZE_DOM = true;
+ let SANITIZE_NAMED_PROPS = false;
+ const SANITIZE_NAMED_PROPS_PREFIX = "user-content-";
+ let KEEP_CONTENT = true;
+ let IN_PLACE = false;
+ let USE_PROFILES = {};
+ let FORBID_CONTENTS = null;
+ const DEFAULT_FORBID_CONTENTS = addToSet({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
+ let DATA_URI_TAGS = null;
+ const DEFAULT_DATA_URI_TAGS = addToSet({}, ["audio", "video", "img", "source", "image", "track"]);
+ let URI_SAFE_ATTRIBUTES = null;
+ const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]);
+ const MATHML_NAMESPACE = "http://www.w3.org/1998/Math/MathML";
+ const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
+ const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
+ let NAMESPACE = HTML_NAMESPACE;
+ let IS_EMPTY_INPUT = false;
+ let ALLOWED_NAMESPACES = null;
+ const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
+ let PARSER_MEDIA_TYPE;
+ const SUPPORTED_PARSER_MEDIA_TYPES = ["application/xhtml+xml", "text/html"];
+ const DEFAULT_PARSER_MEDIA_TYPE = "text/html";
+ let transformCaseFunc;
+ let CONFIG = null;
+ const formElement = document2.createElement("form");
+ const isRegexOrFunction = function isRegexOrFunction2(testValue) {
+ return testValue instanceof RegExp || testValue instanceof Function;
+ };
+ const _parseConfig = function _parseConfig2(cfg) {
+ if (CONFIG && CONFIG === cfg) {
+ return;
+ }
+ if (!cfg || typeof cfg !== "object") {
+ cfg = {};
+ }
+ cfg = clone(cfg);
+ PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
+ SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE;
+ transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
+ ALLOWED_TAGS = "ALLOWED_TAGS" in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
+ ALLOWED_ATTR = "ALLOWED_ATTR" in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
+ ALLOWED_NAMESPACES = "ALLOWED_NAMESPACES" in cfg ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
+ URI_SAFE_ATTRIBUTES = "ADD_URI_SAFE_ATTR" in cfg ? addToSet(
+ clone(DEFAULT_URI_SAFE_ATTRIBUTES),
+ // eslint-disable-line indent
+ cfg.ADD_URI_SAFE_ATTR,
+ // eslint-disable-line indent
+ transformCaseFunc
+ // eslint-disable-line indent
+ ) : DEFAULT_URI_SAFE_ATTRIBUTES;
+ DATA_URI_TAGS = "ADD_DATA_URI_TAGS" in cfg ? addToSet(
+ clone(DEFAULT_DATA_URI_TAGS),
+ // eslint-disable-line indent
+ cfg.ADD_DATA_URI_TAGS,
+ // eslint-disable-line indent
+ transformCaseFunc
+ // eslint-disable-line indent
+ ) : DEFAULT_DATA_URI_TAGS;
+ FORBID_CONTENTS = "FORBID_CONTENTS" in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
+ FORBID_TAGS = "FORBID_TAGS" in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};
+ FORBID_ATTR = "FORBID_ATTR" in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};
+ USE_PROFILES = "USE_PROFILES" in cfg ? cfg.USE_PROFILES : false;
+ ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
+ ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
+ ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;
+ ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false;
+ SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false;
+ WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false;
+ RETURN_DOM = cfg.RETURN_DOM || false;
+ RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false;
+ RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false;
+ FORCE_BODY = cfg.FORCE_BODY || false;
+ SANITIZE_DOM = cfg.SANITIZE_DOM !== false;
+ SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;
+ KEEP_CONTENT = cfg.KEEP_CONTENT !== false;
+ IN_PLACE = cfg.IN_PLACE || false;
+ IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
+ NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
+ CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
+ CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
+ }
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
+ CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
+ }
+ if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === "boolean") {
+ CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
+ }
+ if (SAFE_FOR_TEMPLATES) {
+ ALLOW_DATA_ATTR = false;
+ }
+ if (RETURN_DOM_FRAGMENT) {
+ RETURN_DOM = true;
+ }
+ if (USE_PROFILES) {
+ ALLOWED_TAGS = addToSet({}, [...text]);
+ ALLOWED_ATTR = [];
+ if (USE_PROFILES.html === true) {
+ addToSet(ALLOWED_TAGS, html$1);
+ addToSet(ALLOWED_ATTR, html2);
+ }
+ if (USE_PROFILES.svg === true) {
+ addToSet(ALLOWED_TAGS, svg$1);
+ addToSet(ALLOWED_ATTR, svg2);
+ addToSet(ALLOWED_ATTR, xml);
+ }
+ if (USE_PROFILES.svgFilters === true) {
+ addToSet(ALLOWED_TAGS, svgFilters);
+ addToSet(ALLOWED_ATTR, svg2);
+ addToSet(ALLOWED_ATTR, xml);
+ }
+ if (USE_PROFILES.mathMl === true) {
+ addToSet(ALLOWED_TAGS, mathMl$1);
+ addToSet(ALLOWED_ATTR, mathMl);
+ addToSet(ALLOWED_ATTR, xml);
+ }
+ }
+ if (cfg.ADD_TAGS) {
+ if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
+ ALLOWED_TAGS = clone(ALLOWED_TAGS);
+ }
+ addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
+ }
+ if (cfg.ADD_ATTR) {
+ if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
+ ALLOWED_ATTR = clone(ALLOWED_ATTR);
+ }
+ addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
+ }
+ if (cfg.ADD_URI_SAFE_ATTR) {
+ addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
+ }
+ if (cfg.FORBID_CONTENTS) {
+ if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
+ FORBID_CONTENTS = clone(FORBID_CONTENTS);
+ }
+ addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
+ }
+ if (KEEP_CONTENT) {
+ ALLOWED_TAGS["#text"] = true;
+ }
+ if (WHOLE_DOCUMENT) {
+ addToSet(ALLOWED_TAGS, ["html", "head", "body"]);
+ }
+ if (ALLOWED_TAGS.table) {
+ addToSet(ALLOWED_TAGS, ["tbody"]);
+ delete FORBID_TAGS.tbody;
+ }
+ if (cfg.TRUSTED_TYPES_POLICY) {
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== "function") {
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
+ }
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== "function") {
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
+ }
+ trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
+ emptyHTML = trustedTypesPolicy.createHTML("");
+ } else {
+ if (trustedTypesPolicy === void 0) {
+ trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
+ }
+ if (trustedTypesPolicy !== null && typeof emptyHTML === "string") {
+ emptyHTML = trustedTypesPolicy.createHTML("");
+ }
+ }
+ if (freeze) {
+ freeze(cfg);
+ }
+ CONFIG = cfg;
+ };
+ const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]);
+ const HTML_INTEGRATION_POINTS = addToSet({}, ["foreignobject", "desc", "title", "annotation-xml"]);
+ const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ["title", "style", "font", "a", "script"]);
+ const ALL_SVG_TAGS = addToSet({}, svg$1);
+ addToSet(ALL_SVG_TAGS, svgFilters);
+ addToSet(ALL_SVG_TAGS, svgDisallowed);
+ const ALL_MATHML_TAGS = addToSet({}, mathMl$1);
+ addToSet(ALL_MATHML_TAGS, mathMlDisallowed);
+ const _checkValidNamespace = function _checkValidNamespace2(element) {
+ let parent = getParentNode(element);
+ if (!parent || !parent.tagName) {
+ parent = {
+ namespaceURI: NAMESPACE,
+ tagName: "template"
+ };
+ }
+ const tagName = stringToLowerCase(element.tagName);
+ const parentTagName = stringToLowerCase(parent.tagName);
+ if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
+ return false;
+ }
+ if (element.namespaceURI === SVG_NAMESPACE) {
+ if (parent.namespaceURI === HTML_NAMESPACE) {
+ return tagName === "svg";
+ }
+ if (parent.namespaceURI === MATHML_NAMESPACE) {
+ return tagName === "svg" && (parentTagName === "annotation-xml" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
+ }
+ return Boolean(ALL_SVG_TAGS[tagName]);
+ }
+ if (element.namespaceURI === MATHML_NAMESPACE) {
+ if (parent.namespaceURI === HTML_NAMESPACE) {
+ return tagName === "math";
+ }
+ if (parent.namespaceURI === SVG_NAMESPACE) {
+ return tagName === "math" && HTML_INTEGRATION_POINTS[parentTagName];
+ }
+ return Boolean(ALL_MATHML_TAGS[tagName]);
+ }
+ if (element.namespaceURI === HTML_NAMESPACE) {
+ if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
+ return false;
+ }
+ if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
+ return false;
+ }
+ return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
+ }
+ if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && ALLOWED_NAMESPACES[element.namespaceURI]) {
+ return true;
+ }
+ return false;
+ };
+ const _forceRemove = function _forceRemove2(node2) {
+ arrayPush(DOMPurify.removed, {
+ element: node2
+ });
+ try {
+ node2.parentNode.removeChild(node2);
+ } catch (_) {
+ node2.remove();
+ }
+ };
+ const _removeAttribute = function _removeAttribute2(name, node2) {
+ try {
+ arrayPush(DOMPurify.removed, {
+ attribute: node2.getAttributeNode(name),
+ from: node2
+ });
+ } catch (_) {
+ arrayPush(DOMPurify.removed, {
+ attribute: null,
+ from: node2
+ });
+ }
+ node2.removeAttribute(name);
+ if (name === "is" && !ALLOWED_ATTR[name]) {
+ if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
+ try {
+ _forceRemove(node2);
+ } catch (_) {
+ }
+ } else {
+ try {
+ node2.setAttribute(name, "");
+ } catch (_) {
+ }
+ }
+ }
+ };
+ const _initDocument = function _initDocument2(dirty) {
+ let doc;
+ let leadingWhitespace;
+ if (FORCE_BODY) {
+ dirty = "" + dirty;
+ } else {
+ const matches = stringMatch(dirty, /^[\r\n\t ]+/);
+ leadingWhitespace = matches && matches[0];
+ }
+ if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && NAMESPACE === HTML_NAMESPACE) {
+ dirty = '
' + dirty + "";
+ }
+ const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
+ if (NAMESPACE === HTML_NAMESPACE) {
+ try {
+ doc = new DOMParser2().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
+ } catch (_) {
+ }
+ }
+ if (!doc || !doc.documentElement) {
+ doc = implementation.createDocument(NAMESPACE, "template", null);
+ try {
+ doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
+ } catch (_) {
+ }
+ }
+ const body = doc.body || doc.documentElement;
+ if (dirty && leadingWhitespace) {
+ body.insertBefore(document2.createTextNode(leadingWhitespace), body.childNodes[0] || null);
+ }
+ if (NAMESPACE === HTML_NAMESPACE) {
+ return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? "html" : "body")[0];
+ }
+ return WHOLE_DOCUMENT ? doc.documentElement : body;
+ };
+ const _createIterator = function _createIterator2(root3) {
+ return createNodeIterator.call(
+ root3.ownerDocument || root3,
+ root3,
+ // eslint-disable-next-line no-bitwise
+ NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT,
+ null,
+ false
+ );
+ };
+ const _isClobbered = function _isClobbered2(elm) {
+ return elm instanceof HTMLFormElement && (typeof elm.nodeName !== "string" || typeof elm.textContent !== "string" || typeof elm.removeChild !== "function" || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== "function" || typeof elm.setAttribute !== "function" || typeof elm.namespaceURI !== "string" || typeof elm.insertBefore !== "function" || typeof elm.hasChildNodes !== "function");
+ };
+ const _isNode = function _isNode2(object) {
+ return typeof Node2 === "object" ? object instanceof Node2 : object && typeof object === "object" && typeof object.nodeType === "number" && typeof object.nodeName === "string";
+ };
+ const _executeHook = function _executeHook2(entryPoint, currentNode, data) {
+ if (!hooks[entryPoint]) {
+ return;
+ }
+ arrayForEach(hooks[entryPoint], (hook) => {
+ hook.call(DOMPurify, currentNode, data, CONFIG);
+ });
+ };
+ const _sanitizeElements = function _sanitizeElements2(currentNode) {
+ let content;
+ _executeHook("beforeSanitizeElements", currentNode, null);
+ if (_isClobbered(currentNode)) {
+ _forceRemove(currentNode);
+ return true;
+ }
+ const tagName = transformCaseFunc(currentNode.nodeName);
+ _executeHook("uponSanitizeElement", currentNode, {
+ tagName,
+ allowedTags: ALLOWED_TAGS
+ });
+ if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
+ _forceRemove(currentNode);
+ return true;
+ }
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
+ if (!FORBID_TAGS[tagName] && _basicCustomElementTest(tagName)) {
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName))
+ return false;
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName))
+ return false;
+ }
+ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
+ const parentNode = getParentNode(currentNode) || currentNode.parentNode;
+ const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
+ if (childNodes && parentNode) {
+ const childCount = childNodes.length;
+ for (let i = childCount - 1; i >= 0; --i) {
+ parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));
+ }
+ }
+ }
+ _forceRemove(currentNode);
+ return true;
+ }
+ if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
+ _forceRemove(currentNode);
+ return true;
+ }
+ if ((tagName === "noscript" || tagName === "noembed" || tagName === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
+ _forceRemove(currentNode);
+ return true;
+ }
+ if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {
+ content = currentNode.textContent;
+ content = stringReplace(content, MUSTACHE_EXPR2, " ");
+ content = stringReplace(content, ERB_EXPR2, " ");
+ content = stringReplace(content, TMPLIT_EXPR2, " ");
+ if (currentNode.textContent !== content) {
+ arrayPush(DOMPurify.removed, {
+ element: currentNode.cloneNode()
+ });
+ currentNode.textContent = content;
+ }
+ }
+ _executeHook("afterSanitizeElements", currentNode, null);
+ return false;
+ };
+ const _isValidAttribute = function _isValidAttribute2(lcTag, lcName, value) {
+ if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document2 || value in formElement)) {
+ return false;
+ }
+ if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR2, lcName))
+ ;
+ else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR2, lcName))
+ ;
+ else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
+ if (
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
+ _basicCustomElementTest(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
+ lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))
+ )
+ ;
+ else {
+ return false;
+ }
+ } else if (URI_SAFE_ATTRIBUTES[lcName])
+ ;
+ else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE2, "")))
+ ;
+ else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag])
+ ;
+ else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA2, stringReplace(value, ATTR_WHITESPACE2, "")))
+ ;
+ else if (value) {
+ return false;
+ } else
+ ;
+ return true;
+ };
+ const _basicCustomElementTest = function _basicCustomElementTest2(tagName) {
+ return tagName.indexOf("-") > 0;
+ };
+ const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
+ let attr;
+ let value;
+ let lcName;
+ let l;
+ _executeHook("beforeSanitizeAttributes", currentNode, null);
+ const {
+ attributes
+ } = currentNode;
+ if (!attributes) {
+ return;
+ }
+ const hookEvent = {
+ attrName: "",
+ attrValue: "",
+ keepAttr: true,
+ allowedAttributes: ALLOWED_ATTR
+ };
+ l = attributes.length;
+ while (l--) {
+ attr = attributes[l];
+ const {
+ name,
+ namespaceURI
+ } = attr;
+ value = name === "value" ? attr.value : stringTrim(attr.value);
+ lcName = transformCaseFunc(name);
+ hookEvent.attrName = lcName;
+ hookEvent.attrValue = value;
+ hookEvent.keepAttr = true;
+ hookEvent.forceKeepAttr = void 0;
+ _executeHook("uponSanitizeAttribute", currentNode, hookEvent);
+ value = hookEvent.attrValue;
+ if (hookEvent.forceKeepAttr) {
+ continue;
+ }
+ _removeAttribute(name, currentNode);
+ if (!hookEvent.keepAttr) {
+ continue;
+ }
+ if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
+ _removeAttribute(name, currentNode);
+ continue;
+ }
+ if (SAFE_FOR_TEMPLATES) {
+ value = stringReplace(value, MUSTACHE_EXPR2, " ");
+ value = stringReplace(value, ERB_EXPR2, " ");
+ value = stringReplace(value, TMPLIT_EXPR2, " ");
+ }
+ const lcTag = transformCaseFunc(currentNode.nodeName);
+ if (!_isValidAttribute(lcTag, lcName, value)) {
+ continue;
+ }
+ if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name")) {
+ _removeAttribute(name, currentNode);
+ value = SANITIZE_NAMED_PROPS_PREFIX + value;
+ }
+ if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function") {
+ if (namespaceURI)
+ ;
+ else {
+ switch (trustedTypes.getAttributeType(lcTag, lcName)) {
+ case "TrustedHTML": {
+ value = trustedTypesPolicy.createHTML(value);
+ break;
+ }
+ case "TrustedScriptURL": {
+ value = trustedTypesPolicy.createScriptURL(value);
+ break;
+ }
+ }
+ }
+ }
+ try {
+ if (namespaceURI) {
+ currentNode.setAttributeNS(namespaceURI, name, value);
+ } else {
+ currentNode.setAttribute(name, value);
+ }
+ arrayPop(DOMPurify.removed);
+ } catch (_) {
+ }
+ }
+ _executeHook("afterSanitizeAttributes", currentNode, null);
+ };
+ const _sanitizeShadowDOM = function _sanitizeShadowDOM2(fragment) {
+ let shadowNode;
+ const shadowIterator = _createIterator(fragment);
+ _executeHook("beforeSanitizeShadowDOM", fragment, null);
+ while (shadowNode = shadowIterator.nextNode()) {
+ _executeHook("uponSanitizeShadowNode", shadowNode, null);
+ if (_sanitizeElements(shadowNode)) {
+ continue;
+ }
+ if (shadowNode.content instanceof DocumentFragment) {
+ _sanitizeShadowDOM2(shadowNode.content);
+ }
+ _sanitizeAttributes(shadowNode);
+ }
+ _executeHook("afterSanitizeShadowDOM", fragment, null);
+ };
+ DOMPurify.sanitize = function(dirty) {
+ let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
+ let body;
+ let importedNode;
+ let currentNode;
+ let returnNode;
+ IS_EMPTY_INPUT = !dirty;
+ if (IS_EMPTY_INPUT) {
+ dirty = "";
+ }
+ if (typeof dirty !== "string" && !_isNode(dirty)) {
+ if (typeof dirty.toString === "function") {
+ dirty = dirty.toString();
+ if (typeof dirty !== "string") {
+ throw typeErrorCreate("dirty is not a string, aborting");
+ }
+ } else {
+ throw typeErrorCreate("toString is not a function");
+ }
+ }
+ if (!DOMPurify.isSupported) {
+ return dirty;
+ }
+ if (!SET_CONFIG) {
+ _parseConfig(cfg);
+ }
+ DOMPurify.removed = [];
+ if (typeof dirty === "string") {
+ IN_PLACE = false;
+ }
+ if (IN_PLACE) {
+ if (dirty.nodeName) {
+ const tagName = transformCaseFunc(dirty.nodeName);
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
+ throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
+ }
+ }
+ } else if (dirty instanceof Node2) {
+ body = _initDocument("");
+ importedNode = body.ownerDocument.importNode(dirty, true);
+ if (importedNode.nodeType === 1 && importedNode.nodeName === "BODY") {
+ body = importedNode;
+ } else if (importedNode.nodeName === "HTML") {
+ body = importedNode;
+ } else {
+ body.appendChild(importedNode);
+ }
+ } else {
+ if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
+ dirty.indexOf("<") === -1) {
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
+ }
+ body = _initDocument(dirty);
+ if (!body) {
+ return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
+ }
+ }
+ if (body && FORCE_BODY) {
+ _forceRemove(body.firstChild);
+ }
+ const nodeIterator = _createIterator(IN_PLACE ? dirty : body);
+ while (currentNode = nodeIterator.nextNode()) {
+ if (_sanitizeElements(currentNode)) {
+ continue;
+ }
+ if (currentNode.content instanceof DocumentFragment) {
+ _sanitizeShadowDOM(currentNode.content);
+ }
+ _sanitizeAttributes(currentNode);
+ }
+ if (IN_PLACE) {
+ return dirty;
+ }
+ if (RETURN_DOM) {
+ if (RETURN_DOM_FRAGMENT) {
+ returnNode = createDocumentFragment.call(body.ownerDocument);
+ while (body.firstChild) {
+ returnNode.appendChild(body.firstChild);
+ }
+ } else {
+ returnNode = body;
+ }
+ if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {
+ returnNode = importNode.call(originalDocument, returnNode, true);
+ }
+ return returnNode;
+ }
+ let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
+ if (WHOLE_DOCUMENT && ALLOWED_TAGS["!doctype"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
+ serializedHTML = "\n" + serializedHTML;
+ }
+ if (SAFE_FOR_TEMPLATES) {
+ serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR2, " ");
+ serializedHTML = stringReplace(serializedHTML, ERB_EXPR2, " ");
+ serializedHTML = stringReplace(serializedHTML, TMPLIT_EXPR2, " ");
+ }
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
+ };
+ DOMPurify.setConfig = function(cfg) {
+ _parseConfig(cfg);
+ SET_CONFIG = true;
+ };
+ DOMPurify.clearConfig = function() {
+ CONFIG = null;
+ SET_CONFIG = false;
+ };
+ DOMPurify.isValidAttribute = function(tag, attr, value) {
+ if (!CONFIG) {
+ _parseConfig({});
+ }
+ const lcTag = transformCaseFunc(tag);
+ const lcName = transformCaseFunc(attr);
+ return _isValidAttribute(lcTag, lcName, value);
+ };
+ DOMPurify.addHook = function(entryPoint, hookFunction) {
+ if (typeof hookFunction !== "function") {
+ return;
+ }
+ hooks[entryPoint] = hooks[entryPoint] || [];
+ arrayPush(hooks[entryPoint], hookFunction);
+ };
+ DOMPurify.removeHook = function(entryPoint) {
+ if (hooks[entryPoint]) {
+ return arrayPop(hooks[entryPoint]);
+ }
+ };
+ DOMPurify.removeHooks = function(entryPoint) {
+ if (hooks[entryPoint]) {
+ hooks[entryPoint] = [];
+ }
+ };
+ DOMPurify.removeAllHooks = function() {
+ hooks = {};
+ };
+ return DOMPurify;
+}
+var purify = createDOMPurify();
+
+// node_modules/khroma/dist/utils/channel.js
+var Channel = {
+ /* CLAMP */
+ min: {
+ r: 0,
+ g: 0,
+ b: 0,
+ s: 0,
+ l: 0,
+ a: 0
+ },
+ max: {
+ r: 255,
+ g: 255,
+ b: 255,
+ h: 360,
+ s: 100,
+ l: 100,
+ a: 1
+ },
+ clamp: {
+ r: (r) => r >= 255 ? 255 : r < 0 ? 0 : r,
+ g: (g) => g >= 255 ? 255 : g < 0 ? 0 : g,
+ b: (b) => b >= 255 ? 255 : b < 0 ? 0 : b,
+ h: (h) => h % 360,
+ s: (s2) => s2 >= 100 ? 100 : s2 < 0 ? 0 : s2,
+ l: (l) => l >= 100 ? 100 : l < 0 ? 0 : l,
+ a: (a2) => a2 >= 1 ? 1 : a2 < 0 ? 0 : a2
+ },
+ /* CONVERSION */
+ //SOURCE: https://planetcalc.com/7779
+ toLinear: (c3) => {
+ const n = c3 / 255;
+ return c3 > 0.03928 ? Math.pow((n + 0.055) / 1.055, 2.4) : n / 12.92;
+ },
+ //SOURCE: https://gist.github.com/mjackson/5311256
+ hue2rgb: (p, q, t) => {
+ if (t < 0)
+ t += 1;
+ if (t > 1)
+ t -= 1;
+ if (t < 1 / 6)
+ return p + (q - p) * 6 * t;
+ if (t < 1 / 2)
+ return q;
+ if (t < 2 / 3)
+ return p + (q - p) * (2 / 3 - t) * 6;
+ return p;
+ },
+ hsl2rgb: ({ h, s: s2, l }, channel2) => {
+ if (!s2)
+ return l * 2.55;
+ h /= 360;
+ s2 /= 100;
+ l /= 100;
+ const q = l < 0.5 ? l * (1 + s2) : l + s2 - l * s2;
+ const p = 2 * l - q;
+ switch (channel2) {
+ case "r":
+ return Channel.hue2rgb(p, q, h + 1 / 3) * 255;
+ case "g":
+ return Channel.hue2rgb(p, q, h) * 255;
+ case "b":
+ return Channel.hue2rgb(p, q, h - 1 / 3) * 255;
+ }
+ },
+ rgb2hsl: ({ r, g, b }, channel2) => {
+ r /= 255;
+ g /= 255;
+ b /= 255;
+ const max5 = Math.max(r, g, b);
+ const min4 = Math.min(r, g, b);
+ const l = (max5 + min4) / 2;
+ if (channel2 === "l")
+ return l * 100;
+ if (max5 === min4)
+ return 0;
+ const d = max5 - min4;
+ const s2 = l > 0.5 ? d / (2 - max5 - min4) : d / (max5 + min4);
+ if (channel2 === "s")
+ return s2 * 100;
+ switch (max5) {
+ case r:
+ return ((g - b) / d + (g < b ? 6 : 0)) * 60;
+ case g:
+ return ((b - r) / d + 2) * 60;
+ case b:
+ return ((r - g) / d + 4) * 60;
+ default:
+ return -1;
+ }
+ }
+};
+var channel_default = Channel;
+
+// node_modules/khroma/dist/utils/lang.js
+var Lang = {
+ /* API */
+ clamp: (number5, lower2, upper) => {
+ if (lower2 > upper)
+ return Math.min(lower2, Math.max(upper, number5));
+ return Math.min(upper, Math.max(lower2, number5));
+ },
+ round: (number5) => {
+ return Math.round(number5 * 1e10) / 1e10;
+ }
+};
+var lang_default = Lang;
+
+// node_modules/khroma/dist/utils/unit.js
+var Unit = {
+ /* API */
+ dec2hex: (dec) => {
+ const hex2 = Math.round(dec).toString(16);
+ return hex2.length > 1 ? hex2 : `0${hex2}`;
+ }
+};
+var unit_default = Unit;
+
+// node_modules/khroma/dist/utils/index.js
+var Utils = {
+ channel: channel_default,
+ lang: lang_default,
+ unit: unit_default
+};
+var utils_default = Utils;
+
+// node_modules/khroma/dist/constants.js
+var DEC2HEX = {};
+for (let i = 0; i <= 255; i++)
+ DEC2HEX[i] = utils_default.unit.dec2hex(i);
+var TYPE = {
+ ALL: 0,
+ RGB: 1,
+ HSL: 2
+};
+
+// node_modules/khroma/dist/channels/type.js
+var Type = class {
+ constructor() {
+ this.type = TYPE.ALL;
+ }
+ /* API */
+ get() {
+ return this.type;
+ }
+ set(type3) {
+ if (this.type && this.type !== type3)
+ throw new Error("Cannot change both RGB and HSL channels at the same time");
+ this.type = type3;
+ }
+ reset() {
+ this.type = TYPE.ALL;
+ }
+ is(type3) {
+ return this.type === type3;
+ }
+};
+var type_default = Type;
+
+// node_modules/khroma/dist/channels/index.js
+var Channels = class {
+ /* CONSTRUCTOR */
+ constructor(data, color2) {
+ this.color = color2;
+ this.changed = false;
+ this.data = data;
+ this.type = new type_default();
+ }
+ /* API */
+ set(data, color2) {
+ this.color = color2;
+ this.changed = false;
+ this.data = data;
+ this.type.type = TYPE.ALL;
+ return this;
+ }
+ /* HELPERS */
+ _ensureHSL() {
+ const data = this.data;
+ const { h, s: s2, l } = data;
+ if (h === void 0)
+ data.h = utils_default.channel.rgb2hsl(data, "h");
+ if (s2 === void 0)
+ data.s = utils_default.channel.rgb2hsl(data, "s");
+ if (l === void 0)
+ data.l = utils_default.channel.rgb2hsl(data, "l");
+ }
+ _ensureRGB() {
+ const data = this.data;
+ const { r, g, b } = data;
+ if (r === void 0)
+ data.r = utils_default.channel.hsl2rgb(data, "r");
+ if (g === void 0)
+ data.g = utils_default.channel.hsl2rgb(data, "g");
+ if (b === void 0)
+ data.b = utils_default.channel.hsl2rgb(data, "b");
+ }
+ /* GETTERS */
+ get r() {
+ const data = this.data;
+ const r = data.r;
+ if (!this.type.is(TYPE.HSL) && r !== void 0)
+ return r;
+ this._ensureHSL();
+ return utils_default.channel.hsl2rgb(data, "r");
+ }
+ get g() {
+ const data = this.data;
+ const g = data.g;
+ if (!this.type.is(TYPE.HSL) && g !== void 0)
+ return g;
+ this._ensureHSL();
+ return utils_default.channel.hsl2rgb(data, "g");
+ }
+ get b() {
+ const data = this.data;
+ const b = data.b;
+ if (!this.type.is(TYPE.HSL) && b !== void 0)
+ return b;
+ this._ensureHSL();
+ return utils_default.channel.hsl2rgb(data, "b");
+ }
+ get h() {
+ const data = this.data;
+ const h = data.h;
+ if (!this.type.is(TYPE.RGB) && h !== void 0)
+ return h;
+ this._ensureRGB();
+ return utils_default.channel.rgb2hsl(data, "h");
+ }
+ get s() {
+ const data = this.data;
+ const s2 = data.s;
+ if (!this.type.is(TYPE.RGB) && s2 !== void 0)
+ return s2;
+ this._ensureRGB();
+ return utils_default.channel.rgb2hsl(data, "s");
+ }
+ get l() {
+ const data = this.data;
+ const l = data.l;
+ if (!this.type.is(TYPE.RGB) && l !== void 0)
+ return l;
+ this._ensureRGB();
+ return utils_default.channel.rgb2hsl(data, "l");
+ }
+ get a() {
+ return this.data.a;
+ }
+ /* SETTERS */
+ set r(r) {
+ this.type.set(TYPE.RGB);
+ this.changed = true;
+ this.data.r = r;
+ }
+ set g(g) {
+ this.type.set(TYPE.RGB);
+ this.changed = true;
+ this.data.g = g;
+ }
+ set b(b) {
+ this.type.set(TYPE.RGB);
+ this.changed = true;
+ this.data.b = b;
+ }
+ set h(h) {
+ this.type.set(TYPE.HSL);
+ this.changed = true;
+ this.data.h = h;
+ }
+ set s(s2) {
+ this.type.set(TYPE.HSL);
+ this.changed = true;
+ this.data.s = s2;
+ }
+ set l(l) {
+ this.type.set(TYPE.HSL);
+ this.changed = true;
+ this.data.l = l;
+ }
+ set a(a2) {
+ this.changed = true;
+ this.data.a = a2;
+ }
+};
+var channels_default = Channels;
+
+// node_modules/khroma/dist/channels/reusable.js
+var channels = new channels_default({ r: 0, g: 0, b: 0, a: 0 }, "transparent");
+var reusable_default = channels;
+
+// node_modules/khroma/dist/color/hex.js
+var Hex = {
+ /* VARIABLES */
+ re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,
+ /* API */
+ parse: (color2) => {
+ if (color2.charCodeAt(0) !== 35)
+ return;
+ const match2 = color2.match(Hex.re);
+ if (!match2)
+ return;
+ const hex2 = match2[1];
+ const dec = parseInt(hex2, 16);
+ const length2 = hex2.length;
+ const hasAlpha = length2 % 4 === 0;
+ const isFullLength = length2 > 4;
+ const multiplier = isFullLength ? 1 : 17;
+ const bits = isFullLength ? 8 : 4;
+ const bitsOffset = hasAlpha ? 0 : -1;
+ const mask = isFullLength ? 255 : 15;
+ return reusable_default.set({
+ r: (dec >> bits * (bitsOffset + 3) & mask) * multiplier,
+ g: (dec >> bits * (bitsOffset + 2) & mask) * multiplier,
+ b: (dec >> bits * (bitsOffset + 1) & mask) * multiplier,
+ a: hasAlpha ? (dec & mask) * multiplier / 255 : 1
+ }, color2);
+ },
+ stringify: (channels2) => {
+ const { r, g, b, a: a2 } = channels2;
+ if (a2 < 1) {
+ return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}${DEC2HEX[Math.round(a2 * 255)]}`;
+ } else {
+ return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}`;
+ }
+ }
+};
+var hex_default = Hex;
+
+// node_modules/khroma/dist/color/hsl.js
+var HSL = {
+ /* VARIABLES */
+ re: /^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,
+ hueRe: /^(.+?)(deg|grad|rad|turn)$/i,
+ /* HELPERS */
+ _hue2deg: (hue2) => {
+ const match2 = hue2.match(HSL.hueRe);
+ if (match2) {
+ const [, number5, unit2] = match2;
+ switch (unit2) {
+ case "grad":
+ return utils_default.channel.clamp.h(parseFloat(number5) * 0.9);
+ case "rad":
+ return utils_default.channel.clamp.h(parseFloat(number5) * 180 / Math.PI);
+ case "turn":
+ return utils_default.channel.clamp.h(parseFloat(number5) * 360);
+ }
+ }
+ return utils_default.channel.clamp.h(parseFloat(hue2));
+ },
+ /* API */
+ parse: (color2) => {
+ const charCode = color2.charCodeAt(0);
+ if (charCode !== 104 && charCode !== 72)
+ return;
+ const match2 = color2.match(HSL.re);
+ if (!match2)
+ return;
+ const [, h, s2, l, a2, isAlphaPercentage] = match2;
+ return reusable_default.set({
+ h: HSL._hue2deg(h),
+ s: utils_default.channel.clamp.s(parseFloat(s2)),
+ l: utils_default.channel.clamp.l(parseFloat(l)),
+ a: a2 ? utils_default.channel.clamp.a(isAlphaPercentage ? parseFloat(a2) / 100 : parseFloat(a2)) : 1
+ }, color2);
+ },
+ stringify: (channels2) => {
+ const { h, s: s2, l, a: a2 } = channels2;
+ if (a2 < 1) {
+ return `hsla(${utils_default.lang.round(h)}, ${utils_default.lang.round(s2)}%, ${utils_default.lang.round(l)}%, ${a2})`;
+ } else {
+ return `hsl(${utils_default.lang.round(h)}, ${utils_default.lang.round(s2)}%, ${utils_default.lang.round(l)}%)`;
+ }
+ }
+};
+var hsl_default2 = HSL;
+
+// node_modules/khroma/dist/color/keyword.js
+var Keyword = {
+ /* VARIABLES */
+ colors: {
+ aliceblue: "#f0f8ff",
+ antiquewhite: "#faebd7",
+ aqua: "#00ffff",
+ aquamarine: "#7fffd4",
+ azure: "#f0ffff",
+ beige: "#f5f5dc",
+ bisque: "#ffe4c4",
+ black: "#000000",
+ blanchedalmond: "#ffebcd",
+ blue: "#0000ff",
+ blueviolet: "#8a2be2",
+ brown: "#a52a2a",
+ burlywood: "#deb887",
+ cadetblue: "#5f9ea0",
+ chartreuse: "#7fff00",
+ chocolate: "#d2691e",
+ coral: "#ff7f50",
+ cornflowerblue: "#6495ed",
+ cornsilk: "#fff8dc",
+ crimson: "#dc143c",
+ cyanaqua: "#00ffff",
+ darkblue: "#00008b",
+ darkcyan: "#008b8b",
+ darkgoldenrod: "#b8860b",
+ darkgray: "#a9a9a9",
+ darkgreen: "#006400",
+ darkgrey: "#a9a9a9",
+ darkkhaki: "#bdb76b",
+ darkmagenta: "#8b008b",
+ darkolivegreen: "#556b2f",
+ darkorange: "#ff8c00",
+ darkorchid: "#9932cc",
+ darkred: "#8b0000",
+ darksalmon: "#e9967a",
+ darkseagreen: "#8fbc8f",
+ darkslateblue: "#483d8b",
+ darkslategray: "#2f4f4f",
+ darkslategrey: "#2f4f4f",
+ darkturquoise: "#00ced1",
+ darkviolet: "#9400d3",
+ deeppink: "#ff1493",
+ deepskyblue: "#00bfff",
+ dimgray: "#696969",
+ dimgrey: "#696969",
+ dodgerblue: "#1e90ff",
+ firebrick: "#b22222",
+ floralwhite: "#fffaf0",
+ forestgreen: "#228b22",
+ fuchsia: "#ff00ff",
+ gainsboro: "#dcdcdc",
+ ghostwhite: "#f8f8ff",
+ gold: "#ffd700",
+ goldenrod: "#daa520",
+ gray: "#808080",
+ green: "#008000",
+ greenyellow: "#adff2f",
+ grey: "#808080",
+ honeydew: "#f0fff0",
+ hotpink: "#ff69b4",
+ indianred: "#cd5c5c",
+ indigo: "#4b0082",
+ ivory: "#fffff0",
+ khaki: "#f0e68c",
+ lavender: "#e6e6fa",
+ lavenderblush: "#fff0f5",
+ lawngreen: "#7cfc00",
+ lemonchiffon: "#fffacd",
+ lightblue: "#add8e6",
+ lightcoral: "#f08080",
+ lightcyan: "#e0ffff",
+ lightgoldenrodyellow: "#fafad2",
+ lightgray: "#d3d3d3",
+ lightgreen: "#90ee90",
+ lightgrey: "#d3d3d3",
+ lightpink: "#ffb6c1",
+ lightsalmon: "#ffa07a",
+ lightseagreen: "#20b2aa",
+ lightskyblue: "#87cefa",
+ lightslategray: "#778899",
+ lightslategrey: "#778899",
+ lightsteelblue: "#b0c4de",
+ lightyellow: "#ffffe0",
+ lime: "#00ff00",
+ limegreen: "#32cd32",
+ linen: "#faf0e6",
+ magenta: "#ff00ff",
+ maroon: "#800000",
+ mediumaquamarine: "#66cdaa",
+ mediumblue: "#0000cd",
+ mediumorchid: "#ba55d3",
+ mediumpurple: "#9370db",
+ mediumseagreen: "#3cb371",
+ mediumslateblue: "#7b68ee",
+ mediumspringgreen: "#00fa9a",
+ mediumturquoise: "#48d1cc",
+ mediumvioletred: "#c71585",
+ midnightblue: "#191970",
+ mintcream: "#f5fffa",
+ mistyrose: "#ffe4e1",
+ moccasin: "#ffe4b5",
+ navajowhite: "#ffdead",
+ navy: "#000080",
+ oldlace: "#fdf5e6",
+ olive: "#808000",
+ olivedrab: "#6b8e23",
+ orange: "#ffa500",
+ orangered: "#ff4500",
+ orchid: "#da70d6",
+ palegoldenrod: "#eee8aa",
+ palegreen: "#98fb98",
+ paleturquoise: "#afeeee",
+ palevioletred: "#db7093",
+ papayawhip: "#ffefd5",
+ peachpuff: "#ffdab9",
+ peru: "#cd853f",
+ pink: "#ffc0cb",
+ plum: "#dda0dd",
+ powderblue: "#b0e0e6",
+ purple: "#800080",
+ rebeccapurple: "#663399",
+ red: "#ff0000",
+ rosybrown: "#bc8f8f",
+ royalblue: "#4169e1",
+ saddlebrown: "#8b4513",
+ salmon: "#fa8072",
+ sandybrown: "#f4a460",
+ seagreen: "#2e8b57",
+ seashell: "#fff5ee",
+ sienna: "#a0522d",
+ silver: "#c0c0c0",
+ skyblue: "#87ceeb",
+ slateblue: "#6a5acd",
+ slategray: "#708090",
+ slategrey: "#708090",
+ snow: "#fffafa",
+ springgreen: "#00ff7f",
+ tan: "#d2b48c",
+ teal: "#008080",
+ thistle: "#d8bfd8",
+ transparent: "#00000000",
+ turquoise: "#40e0d0",
+ violet: "#ee82ee",
+ wheat: "#f5deb3",
+ white: "#ffffff",
+ whitesmoke: "#f5f5f5",
+ yellow: "#ffff00",
+ yellowgreen: "#9acd32"
+ },
+ /* API */
+ parse: (color2) => {
+ color2 = color2.toLowerCase();
+ const hex2 = Keyword.colors[color2];
+ if (!hex2)
+ return;
+ return hex_default.parse(hex2);
+ },
+ stringify: (channels2) => {
+ const hex2 = hex_default.stringify(channels2);
+ for (const name in Keyword.colors) {
+ if (Keyword.colors[name] === hex2)
+ return name;
+ }
+ return;
+ }
+};
+var keyword_default = Keyword;
+
+// node_modules/khroma/dist/color/rgb.js
+var RGB = {
+ /* VARIABLES */
+ re: /^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,
+ /* API */
+ parse: (color2) => {
+ const charCode = color2.charCodeAt(0);
+ if (charCode !== 114 && charCode !== 82)
+ return;
+ const match2 = color2.match(RGB.re);
+ if (!match2)
+ return;
+ const [, r, isRedPercentage, g, isGreenPercentage, b, isBluePercentage, a2, isAlphaPercentage] = match2;
+ return reusable_default.set({
+ r: utils_default.channel.clamp.r(isRedPercentage ? parseFloat(r) * 2.55 : parseFloat(r)),
+ g: utils_default.channel.clamp.g(isGreenPercentage ? parseFloat(g) * 2.55 : parseFloat(g)),
+ b: utils_default.channel.clamp.b(isBluePercentage ? parseFloat(b) * 2.55 : parseFloat(b)),
+ a: a2 ? utils_default.channel.clamp.a(isAlphaPercentage ? parseFloat(a2) / 100 : parseFloat(a2)) : 1
+ }, color2);
+ },
+ stringify: (channels2) => {
+ const { r, g, b, a: a2 } = channels2;
+ if (a2 < 1) {
+ return `rgba(${utils_default.lang.round(r)}, ${utils_default.lang.round(g)}, ${utils_default.lang.round(b)}, ${utils_default.lang.round(a2)})`;
+ } else {
+ return `rgb(${utils_default.lang.round(r)}, ${utils_default.lang.round(g)}, ${utils_default.lang.round(b)})`;
+ }
+ }
+};
+var rgb_default2 = RGB;
+
+// node_modules/khroma/dist/color/index.js
+var Color2 = {
+ /* VARIABLES */
+ format: {
+ keyword: keyword_default,
+ hex: hex_default,
+ rgb: rgb_default2,
+ rgba: rgb_default2,
+ hsl: hsl_default2,
+ hsla: hsl_default2
+ },
+ /* API */
+ parse: (color2) => {
+ if (typeof color2 !== "string")
+ return color2;
+ const channels2 = hex_default.parse(color2) || rgb_default2.parse(color2) || hsl_default2.parse(color2) || keyword_default.parse(color2);
+ if (channels2)
+ return channels2;
+ throw new Error(`Unsupported color format: "${color2}"`);
+ },
+ stringify: (channels2) => {
+ if (!channels2.changed && channels2.color)
+ return channels2.color;
+ if (channels2.type.is(TYPE.HSL) || channels2.data.r === void 0) {
+ return hsl_default2.stringify(channels2);
+ } else if (channels2.a < 1 || !Number.isInteger(channels2.r) || !Number.isInteger(channels2.g) || !Number.isInteger(channels2.b)) {
+ return rgb_default2.stringify(channels2);
+ } else {
+ return hex_default.stringify(channels2);
+ }
+ }
+};
+var color_default = Color2;
+
+// node_modules/khroma/dist/methods/luminance.js
+var luminance = (color2) => {
+ const { r, g, b } = color_default.parse(color2);
+ const luminance2 = 0.2126 * utils_default.channel.toLinear(r) + 0.7152 * utils_default.channel.toLinear(g) + 0.0722 * utils_default.channel.toLinear(b);
+ return utils_default.lang.round(luminance2);
+};
+var luminance_default = luminance;
+
+// node_modules/khroma/dist/methods/is_light.js
+var isLight = (color2) => {
+ return luminance_default(color2) >= 0.5;
+};
+var is_light_default = isLight;
+
+// node_modules/khroma/dist/methods/is_dark.js
+var isDark = (color2) => {
+ return !is_light_default(color2);
+};
+var is_dark_default = isDark;
+
+// node_modules/khroma/dist/methods/adjust_channel.js
+var adjustChannel = (color2, channel2, amount) => {
+ const channels2 = color_default.parse(color2);
+ const amountCurrent = channels2[channel2];
+ const amountNext = utils_default.channel.clamp[channel2](amountCurrent + amount);
+ if (amountCurrent !== amountNext)
+ channels2[channel2] = amountNext;
+ return color_default.stringify(channels2);
+};
+var adjust_channel_default = adjustChannel;
+
+// node_modules/khroma/dist/methods/lighten.js
+var lighten = (color2, amount) => {
+ return adjust_channel_default(color2, "l", amount);
+};
+var lighten_default = lighten;
+
+// node_modules/khroma/dist/methods/darken.js
+var darken = (color2, amount) => {
+ return adjust_channel_default(color2, "l", -amount);
+};
+var darken_default = darken;
+
+// node_modules/khroma/dist/methods/change.js
+var change = (color2, channels2) => {
+ const ch = color_default.parse(color2);
+ for (const c3 in channels2) {
+ ch[c3] = utils_default.channel.clamp[c3](channels2[c3]);
+ }
+ return color_default.stringify(ch);
+};
+var change_default = change;
+
+// node_modules/khroma/dist/methods/rgba.js
+var rgba2 = (r, g, b = 0, a2 = 1) => {
+ if (typeof r !== "number")
+ return change_default(r, { a: g });
+ const channels2 = reusable_default.set({
+ r: utils_default.channel.clamp.r(r),
+ g: utils_default.channel.clamp.g(g),
+ b: utils_default.channel.clamp.b(b),
+ a: utils_default.channel.clamp.a(a2)
+ });
+ return color_default.stringify(channels2);
+};
+var rgba_default = rgba2;
+
+// node_modules/khroma/dist/methods/channel.js
+var channel = (color2, channel2) => {
+ return utils_default.lang.round(color_default.parse(color2)[channel2]);
+};
+var channel_default2 = channel;
+
+// node_modules/khroma/dist/methods/adjust.js
+var adjust = (color2, channels2) => {
+ const ch = color_default.parse(color2);
+ const changes = {};
+ for (const c3 in channels2) {
+ if (!channels2[c3])
+ continue;
+ changes[c3] = ch[c3] + channels2[c3];
+ }
+ return change_default(color2, changes);
+};
+var adjust_default = adjust;
+
+// node_modules/khroma/dist/methods/mix.js
+var mix = (color1, color2, weight = 50) => {
+ const { r: r1, g: g1, b: b12, a: a1 } = color_default.parse(color1);
+ const { r: r2, g: g2, b: b22, a: a2 } = color_default.parse(color2);
+ const weightScale = weight / 100;
+ const weightNormalized = weightScale * 2 - 1;
+ const alphaDelta = a1 - a2;
+ const weight1combined = weightNormalized * alphaDelta === -1 ? weightNormalized : (weightNormalized + alphaDelta) / (1 + weightNormalized * alphaDelta);
+ const weight1 = (weight1combined + 1) / 2;
+ const weight2 = 1 - weight1;
+ const r = r1 * weight1 + r2 * weight2;
+ const g = g1 * weight1 + g2 * weight2;
+ const b = b12 * weight1 + b22 * weight2;
+ const a3 = a1 * weightScale + a2 * (1 - weightScale);
+ return rgba_default(r, g, b, a3);
+};
+var mix_default = mix;
+
+// node_modules/khroma/dist/methods/invert.js
+var invert = (color2, weight = 100) => {
+ const inverse = color_default.parse(color2);
+ inverse.r = 255 - inverse.r;
+ inverse.g = 255 - inverse.g;
+ inverse.b = 255 - inverse.b;
+ return mix_default(inverse, color2, weight);
+};
+var invert_default = invert;
+
+// node_modules/lodash-es/_freeGlobal.js
+var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
+var freeGlobal_default = freeGlobal;
+
+// node_modules/lodash-es/_root.js
+var freeSelf = typeof self == "object" && self && self.Object === Object && self;
+var root2 = freeGlobal_default || freeSelf || Function("return this")();
+var root_default2 = root2;
+
+// node_modules/lodash-es/_Symbol.js
+var Symbol3 = root_default2.Symbol;
+var Symbol_default = Symbol3;
+
+// node_modules/lodash-es/_getRawTag.js
+var objectProto = Object.prototype;
+var hasOwnProperty = objectProto.hasOwnProperty;
+var nativeObjectToString = objectProto.toString;
+var symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0;
+function getRawTag(value) {
+ var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
+ try {
+ value[symToStringTag] = void 0;
+ var unmasked = true;
+ } catch (e) {
+ }
+ var result = nativeObjectToString.call(value);
+ if (unmasked) {
+ if (isOwn) {
+ value[symToStringTag] = tag;
+ } else {
+ delete value[symToStringTag];
+ }
+ }
+ return result;
+}
+var getRawTag_default = getRawTag;
+
+// node_modules/lodash-es/_objectToString.js
+var objectProto2 = Object.prototype;
+var nativeObjectToString2 = objectProto2.toString;
+function objectToString(value) {
+ return nativeObjectToString2.call(value);
+}
+var objectToString_default = objectToString;
+
+// node_modules/lodash-es/_baseGetTag.js
+var nullTag = "[object Null]";
+var undefinedTag = "[object Undefined]";
+var symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0;
+function baseGetTag(value) {
+ if (value == null) {
+ return value === void 0 ? undefinedTag : nullTag;
+ }
+ return symToStringTag2 && symToStringTag2 in Object(value) ? getRawTag_default(value) : objectToString_default(value);
+}
+var baseGetTag_default = baseGetTag;
+
+// node_modules/lodash-es/isObject.js
+function isObject(value) {
+ var type3 = typeof value;
+ return value != null && (type3 == "object" || type3 == "function");
+}
+var isObject_default = isObject;
+
+// node_modules/lodash-es/isFunction.js
+var asyncTag = "[object AsyncFunction]";
+var funcTag = "[object Function]";
+var genTag = "[object GeneratorFunction]";
+var proxyTag = "[object Proxy]";
+function isFunction(value) {
+ if (!isObject_default(value)) {
+ return false;
+ }
+ var tag = baseGetTag_default(value);
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
+}
+var isFunction_default = isFunction;
+
+// node_modules/lodash-es/_coreJsData.js
+var coreJsData = root_default2["__core-js_shared__"];
+var coreJsData_default = coreJsData;
+
+// node_modules/lodash-es/_isMasked.js
+var maskSrcKey = function() {
+ var uid = /[^.]+$/.exec(coreJsData_default && coreJsData_default.keys && coreJsData_default.keys.IE_PROTO || "");
+ return uid ? "Symbol(src)_1." + uid : "";
+}();
+function isMasked(func) {
+ return !!maskSrcKey && maskSrcKey in func;
+}
+var isMasked_default = isMasked;
+
+// node_modules/lodash-es/_toSource.js
+var funcProto = Function.prototype;
+var funcToString = funcProto.toString;
+function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {
+ }
+ try {
+ return func + "";
+ } catch (e) {
+ }
+ }
+ return "";
+}
+var toSource_default = toSource;
+
+// node_modules/lodash-es/_baseIsNative.js
+var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+var reIsHostCtor = /^\[object .+?Constructor\]$/;
+var funcProto2 = Function.prototype;
+var objectProto3 = Object.prototype;
+var funcToString2 = funcProto2.toString;
+var hasOwnProperty2 = objectProto3.hasOwnProperty;
+var reIsNative = RegExp(
+ "^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
+);
+function baseIsNative(value) {
+ if (!isObject_default(value) || isMasked_default(value)) {
+ return false;
+ }
+ var pattern = isFunction_default(value) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource_default(value));
+}
+var baseIsNative_default = baseIsNative;
+
+// node_modules/lodash-es/_getValue.js
+function getValue(object, key) {
+ return object == null ? void 0 : object[key];
+}
+var getValue_default = getValue;
+
+// node_modules/lodash-es/_getNative.js
+function getNative(object, key) {
+ var value = getValue_default(object, key);
+ return baseIsNative_default(value) ? value : void 0;
+}
+var getNative_default = getNative;
+
+// node_modules/lodash-es/_nativeCreate.js
+var nativeCreate = getNative_default(Object, "create");
+var nativeCreate_default = nativeCreate;
+
+// node_modules/lodash-es/_hashClear.js
+function hashClear() {
+ this.__data__ = nativeCreate_default ? nativeCreate_default(null) : {};
+ this.size = 0;
+}
+var hashClear_default = hashClear;
+
+// node_modules/lodash-es/_hashDelete.js
+function hashDelete(key) {
+ var result = this.has(key) && delete this.__data__[key];
+ this.size -= result ? 1 : 0;
+ return result;
+}
+var hashDelete_default = hashDelete;
+
+// node_modules/lodash-es/_hashGet.js
+var HASH_UNDEFINED = "__lodash_hash_undefined__";
+var objectProto4 = Object.prototype;
+var hasOwnProperty3 = objectProto4.hasOwnProperty;
+function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate_default) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? void 0 : result;
+ }
+ return hasOwnProperty3.call(data, key) ? data[key] : void 0;
+}
+var hashGet_default = hashGet;
+
+// node_modules/lodash-es/_hashHas.js
+var objectProto5 = Object.prototype;
+var hasOwnProperty4 = objectProto5.hasOwnProperty;
+function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate_default ? data[key] !== void 0 : hasOwnProperty4.call(data, key);
+}
+var hashHas_default = hashHas;
+
+// node_modules/lodash-es/_hashSet.js
+var HASH_UNDEFINED2 = "__lodash_hash_undefined__";
+function hashSet(key, value) {
+ var data = this.__data__;
+ this.size += this.has(key) ? 0 : 1;
+ data[key] = nativeCreate_default && value === void 0 ? HASH_UNDEFINED2 : value;
+ return this;
+}
+var hashSet_default = hashSet;
+
+// node_modules/lodash-es/_Hash.js
+function Hash(entries2) {
+ var index2 = -1, length2 = entries2 == null ? 0 : entries2.length;
+ this.clear();
+ while (++index2 < length2) {
+ var entry = entries2[index2];
+ this.set(entry[0], entry[1]);
+ }
+}
+Hash.prototype.clear = hashClear_default;
+Hash.prototype["delete"] = hashDelete_default;
+Hash.prototype.get = hashGet_default;
+Hash.prototype.has = hashHas_default;
+Hash.prototype.set = hashSet_default;
+var Hash_default = Hash;
+
+// node_modules/lodash-es/_listCacheClear.js
+function listCacheClear() {
+ this.__data__ = [];
+ this.size = 0;
+}
+var listCacheClear_default = listCacheClear;
+
+// node_modules/lodash-es/eq.js
+function eq(value, other) {
+ return value === other || value !== value && other !== other;
+}
+var eq_default = eq;
+
+// node_modules/lodash-es/_assocIndexOf.js
+function assocIndexOf(array4, key) {
+ var length2 = array4.length;
+ while (length2--) {
+ if (eq_default(array4[length2][0], key)) {
+ return length2;
+ }
+ }
+ return -1;
+}
+var assocIndexOf_default = assocIndexOf;
+
+// node_modules/lodash-es/_listCacheDelete.js
+var arrayProto = Array.prototype;
+var splice = arrayProto.splice;
+function listCacheDelete(key) {
+ var data = this.__data__, index2 = assocIndexOf_default(data, key);
+ if (index2 < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index2 == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index2, 1);
+ }
+ --this.size;
+ return true;
+}
+var listCacheDelete_default = listCacheDelete;
+
+// node_modules/lodash-es/_listCacheGet.js
+function listCacheGet(key) {
+ var data = this.__data__, index2 = assocIndexOf_default(data, key);
+ return index2 < 0 ? void 0 : data[index2][1];
+}
+var listCacheGet_default = listCacheGet;
+
+// node_modules/lodash-es/_listCacheHas.js
+function listCacheHas(key) {
+ return assocIndexOf_default(this.__data__, key) > -1;
+}
+var listCacheHas_default = listCacheHas;
+
+// node_modules/lodash-es/_listCacheSet.js
+function listCacheSet(key, value) {
+ var data = this.__data__, index2 = assocIndexOf_default(data, key);
+ if (index2 < 0) {
+ ++this.size;
+ data.push([key, value]);
+ } else {
+ data[index2][1] = value;
+ }
+ return this;
+}
+var listCacheSet_default = listCacheSet;
+
+// node_modules/lodash-es/_ListCache.js
+function ListCache(entries2) {
+ var index2 = -1, length2 = entries2 == null ? 0 : entries2.length;
+ this.clear();
+ while (++index2 < length2) {
+ var entry = entries2[index2];
+ this.set(entry[0], entry[1]);
+ }
+}
+ListCache.prototype.clear = listCacheClear_default;
+ListCache.prototype["delete"] = listCacheDelete_default;
+ListCache.prototype.get = listCacheGet_default;
+ListCache.prototype.has = listCacheHas_default;
+ListCache.prototype.set = listCacheSet_default;
+var ListCache_default = ListCache;
+
+// node_modules/lodash-es/_Map.js
+var Map2 = getNative_default(root_default2, "Map");
+var Map_default = Map2;
+
+// node_modules/lodash-es/_mapCacheClear.js
+function mapCacheClear() {
+ this.size = 0;
+ this.__data__ = {
+ "hash": new Hash_default(),
+ "map": new (Map_default || ListCache_default)(),
+ "string": new Hash_default()
+ };
+}
+var mapCacheClear_default = mapCacheClear;
+
+// node_modules/lodash-es/_isKeyable.js
+function isKeyable(value) {
+ var type3 = typeof value;
+ return type3 == "string" || type3 == "number" || type3 == "symbol" || type3 == "boolean" ? value !== "__proto__" : value === null;
+}
+var isKeyable_default = isKeyable;
+
+// node_modules/lodash-es/_getMapData.js
+function getMapData(map5, key) {
+ var data = map5.__data__;
+ return isKeyable_default(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
+}
+var getMapData_default = getMapData;
+
+// node_modules/lodash-es/_mapCacheDelete.js
+function mapCacheDelete(key) {
+ var result = getMapData_default(this, key)["delete"](key);
+ this.size -= result ? 1 : 0;
+ return result;
+}
+var mapCacheDelete_default = mapCacheDelete;
+
+// node_modules/lodash-es/_mapCacheGet.js
+function mapCacheGet(key) {
+ return getMapData_default(this, key).get(key);
+}
+var mapCacheGet_default = mapCacheGet;
+
+// node_modules/lodash-es/_mapCacheHas.js
+function mapCacheHas(key) {
+ return getMapData_default(this, key).has(key);
+}
+var mapCacheHas_default = mapCacheHas;
+
+// node_modules/lodash-es/_mapCacheSet.js
+function mapCacheSet(key, value) {
+ var data = getMapData_default(this, key), size = data.size;
+ data.set(key, value);
+ this.size += data.size == size ? 0 : 1;
+ return this;
+}
+var mapCacheSet_default = mapCacheSet;
+
+// node_modules/lodash-es/_MapCache.js
+function MapCache(entries2) {
+ var index2 = -1, length2 = entries2 == null ? 0 : entries2.length;
+ this.clear();
+ while (++index2 < length2) {
+ var entry = entries2[index2];
+ this.set(entry[0], entry[1]);
+ }
+}
+MapCache.prototype.clear = mapCacheClear_default;
+MapCache.prototype["delete"] = mapCacheDelete_default;
+MapCache.prototype.get = mapCacheGet_default;
+MapCache.prototype.has = mapCacheHas_default;
+MapCache.prototype.set = mapCacheSet_default;
+var MapCache_default = MapCache;
+
+// node_modules/lodash-es/memoize.js
+var FUNC_ERROR_TEXT = "Expected a function";
+function memoize(func, resolver) {
+ if (typeof func != "function" || resolver != null && typeof resolver != "function") {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result) || cache;
+ return result;
+ };
+ memoized.cache = new (memoize.Cache || MapCache_default)();
+ return memoized;
+}
+memoize.Cache = MapCache_default;
+var memoize_default = memoize;
+
+// node_modules/stylis/src/Enum.js
+var COMMENT = "comm";
+var RULESET = "rule";
+var DECLARATION = "decl";
+var IMPORT = "@import";
+var KEYFRAMES = "@keyframes";
+var LAYER = "@layer";
+
+// node_modules/stylis/src/Utility.js
+var abs5 = Math.abs;
+var from = String.fromCharCode;
+function trim(value) {
+ return value.trim();
+}
+function replace(value, pattern, replacement) {
+ return value.replace(pattern, replacement);
+}
+function indexof(value, search) {
+ return value.indexOf(search);
+}
+function charat(value, index2) {
+ return value.charCodeAt(index2) | 0;
+}
+function substr(value, begin, end) {
+ return value.slice(begin, end);
+}
+function strlen(value) {
+ return value.length;
+}
+function sizeof(value) {
+ return value.length;
+}
+function append2(value, array4) {
+ return array4.push(value), value;
+}
+
+// node_modules/stylis/src/Tokenizer.js
+var line = 1;
+var column = 1;
+var length = 0;
+var position = 0;
+var character = 0;
+var characters = "";
+function node(value, root3, parent, type3, props, children2, length2, siblings) {
+ return { value, root: root3, parent, type: type3, props, children: children2, line, column, length: length2, return: "", siblings };
+}
+function char() {
+ return character;
+}
+function prev() {
+ character = position > 0 ? charat(characters, --position) : 0;
+ if (column--, character === 10)
+ column = 1, line--;
+ return character;
+}
+function next() {
+ character = position < length ? charat(characters, position++) : 0;
+ if (column++, character === 10)
+ column = 1, line++;
+ return character;
+}
+function peek() {
+ return charat(characters, position);
+}
+function caret() {
+ return position;
+}
+function slice5(begin, end) {
+ return substr(characters, begin, end);
+}
+function token(type3) {
+ switch (type3) {
+ case 0:
+ case 9:
+ case 10:
+ case 13:
+ case 32:
+ return 5;
+ case 33:
+ case 43:
+ case 44:
+ case 47:
+ case 62:
+ case 64:
+ case 126:
+ case 59:
+ case 123:
+ case 125:
+ return 4;
+ case 58:
+ return 3;
+ case 34:
+ case 39:
+ case 40:
+ case 91:
+ return 2;
+ case 41:
+ case 93:
+ return 1;
+ }
+ return 0;
+}
+function alloc(value) {
+ return line = column = 1, length = strlen(characters = value), position = 0, [];
+}
+function dealloc(value) {
+ return characters = "", value;
+}
+function delimit(type3) {
+ return trim(slice5(position - 1, delimiter(type3 === 91 ? type3 + 2 : type3 === 40 ? type3 + 1 : type3)));
+}
+function whitespace(type3) {
+ while (character = peek())
+ if (character < 33)
+ next();
+ else
+ break;
+ return token(type3) > 2 || token(character) > 3 ? "" : " ";
+}
+function escaping(index2, count3) {
+ while (--count3 && next())
+ if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
+ break;
+ return slice5(index2, caret() + (count3 < 6 && peek() == 32 && next() == 32));
+}
+function delimiter(type3) {
+ while (next())
+ switch (character) {
+ case type3:
+ return position;
+ case 34:
+ case 39:
+ if (type3 !== 34 && type3 !== 39)
+ delimiter(character);
+ break;
+ case 40:
+ if (type3 === 41)
+ delimiter(type3);
+ break;
+ case 92:
+ next();
+ break;
+ }
+ return position;
+}
+function commenter(type3, index2) {
+ while (next())
+ if (type3 + character === 47 + 10)
+ break;
+ else if (type3 + character === 42 + 42 && peek() === 47)
+ break;
+ return "/*" + slice5(index2, position - 1) + "*" + from(type3 === 47 ? type3 : next());
+}
+function identifier(index2) {
+ while (!token(peek()))
+ next();
+ return slice5(index2, position);
+}
+
+// node_modules/stylis/src/Parser.js
+function compile(value) {
+ return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
+}
+function parse(value, root3, parent, rule, rules, rulesets, pseudo, points, declarations) {
+ var index2 = 0;
+ var offset = 0;
+ var length2 = pseudo;
+ var atrule = 0;
+ var property = 0;
+ var previous = 0;
+ var variable = 1;
+ var scanning = 1;
+ var ampersand = 1;
+ var character2 = 0;
+ var type3 = "";
+ var props = rules;
+ var children2 = rulesets;
+ var reference = rule;
+ var characters2 = type3;
+ while (scanning)
+ switch (previous = character2, character2 = next()) {
+ case 40:
+ if (previous != 108 && charat(characters2, length2 - 1) == 58) {
+ if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f") != -1)
+ ampersand = -1;
+ break;
+ }
+ case 34:
+ case 39:
+ case 91:
+ characters2 += delimit(character2);
+ break;
+ case 9:
+ case 10:
+ case 13:
+ case 32:
+ characters2 += whitespace(previous);
+ break;
+ case 92:
+ characters2 += escaping(caret() - 1, 7);
+ continue;
+ case 47:
+ switch (peek()) {
+ case 42:
+ case 47:
+ append2(comment(commenter(next(), caret()), root3, parent, declarations), declarations);
+ break;
+ default:
+ characters2 += "/";
+ }
+ break;
+ case 123 * variable:
+ points[index2++] = strlen(characters2) * ampersand;
+ case 125 * variable:
+ case 59:
+ case 0:
+ switch (character2) {
+ case 0:
+ case 125:
+ scanning = 0;
+ case 59 + offset:
+ if (ampersand == -1)
+ characters2 = replace(characters2, /\f/g, "");
+ if (property > 0 && strlen(characters2) - length2)
+ append2(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1, declarations) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2, declarations), declarations);
+ break;
+ case 59:
+ characters2 += ";";
+ default:
+ append2(reference = ruleset(characters2, root3, parent, index2, offset, rules, points, type3, props = [], children2 = [], length2, rulesets), rulesets);
+ if (character2 === 123)
+ if (offset === 0)
+ parse(characters2, root3, reference, reference, props, rulesets, length2, points, children2);
+ else
+ switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
+ case 100:
+ case 108:
+ case 109:
+ case 115:
+ parse(value, reference, reference, rule && append2(ruleset(value, reference, reference, 0, 0, rules, points, type3, rules, props = [], length2, children2), children2), rules, children2, length2, points, rule ? props : children2);
+ break;
+ default:
+ parse(characters2, reference, reference, reference, [""], children2, 0, points, children2);
+ }
+ }
+ index2 = offset = property = 0, variable = ampersand = 1, type3 = characters2 = "", length2 = pseudo;
+ break;
+ case 58:
+ length2 = 1 + strlen(characters2), property = previous;
+ default:
+ if (variable < 1) {
+ if (character2 == 123)
+ --variable;
+ else if (character2 == 125 && variable++ == 0 && prev() == 125)
+ continue;
+ }
+ switch (characters2 += from(character2), character2 * variable) {
+ case 38:
+ ampersand = offset > 0 ? 1 : (characters2 += "\f", -1);
+ break;
+ case 44:
+ points[index2++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
+ break;
+ case 64:
+ if (peek() === 45)
+ characters2 += delimit(next());
+ atrule = peek(), offset = length2 = strlen(type3 = characters2 += identifier(caret())), character2++;
+ break;
+ case 45:
+ if (previous === 45 && strlen(characters2) == 2)
+ variable = 0;
+ }
+ }
+ return rulesets;
+}
+function ruleset(value, root3, parent, index2, offset, rules, points, type3, props, children2, length2, siblings) {
+ var post = offset - 1;
+ var rule = offset === 0 ? rules : [""];
+ var size = sizeof(rule);
+ for (var i = 0, j = 0, k2 = 0; i < index2; ++i)
+ for (var x3 = 0, y3 = substr(value, post + 1, post = abs5(j = points[i])), z = value; x3 < size; ++x3)
+ if (z = trim(j > 0 ? rule[x3] + " " + y3 : replace(y3, /&\f/g, rule[x3])))
+ props[k2++] = z;
+ return node(value, root3, parent, offset === 0 ? RULESET : type3, props, children2, length2, siblings);
+}
+function comment(value, root3, parent, siblings) {
+ return node(value, root3, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings);
+}
+function declaration(value, root3, parent, length2, siblings) {
+ return node(value, root3, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2, siblings);
+}
+
+// node_modules/stylis/src/Serializer.js
+function serialize(children2, callback) {
+ var output = "";
+ for (var i = 0; i < children2.length; i++)
+ output += callback(children2[i], i, children2, callback) || "";
+ return output;
+}
+function stringify(element, index2, children2, callback) {
+ switch (element.type) {
+ case LAYER:
+ if (element.children.length)
+ break;
+ case IMPORT:
+ case DECLARATION:
+ return element.return = element.return || element.value;
+ case COMMENT:
+ return "";
+ case KEYFRAMES:
+ return element.return = element.value + "{" + serialize(element.children, callback) + "}";
+ case RULESET:
+ if (!strlen(element.value = element.props.join(",")))
+ return "";
+ }
+ return strlen(children2 = serialize(element.children, callback)) ? element.return = element.value + "{" + children2 + "}" : "";
+}
+
+// node_modules/lodash-es/_isPrototype.js
+var objectProto6 = Object.prototype;
+function isPrototype(value) {
+ var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto6;
+ return value === proto;
+}
+var isPrototype_default = isPrototype;
+
+// node_modules/lodash-es/_overArg.js
+function overArg(func, transform2) {
+ return function(arg) {
+ return func(transform2(arg));
+ };
+}
+var overArg_default = overArg;
+
+// node_modules/lodash-es/_nativeKeys.js
+var nativeKeys = overArg_default(Object.keys, Object);
+var nativeKeys_default = nativeKeys;
+
+// node_modules/lodash-es/_baseKeys.js
+var objectProto7 = Object.prototype;
+var hasOwnProperty5 = objectProto7.hasOwnProperty;
+function baseKeys(object) {
+ if (!isPrototype_default(object)) {
+ return nativeKeys_default(object);
+ }
+ var result = [];
+ for (var key in Object(object)) {
+ if (hasOwnProperty5.call(object, key) && key != "constructor") {
+ result.push(key);
+ }
+ }
+ return result;
+}
+var baseKeys_default = baseKeys;
+
+// node_modules/lodash-es/_DataView.js
+var DataView2 = getNative_default(root_default2, "DataView");
+var DataView_default = DataView2;
+
+// node_modules/lodash-es/_Promise.js
+var Promise2 = getNative_default(root_default2, "Promise");
+var Promise_default = Promise2;
+
+// node_modules/lodash-es/_Set.js
+var Set2 = getNative_default(root_default2, "Set");
+var Set_default = Set2;
+
+// node_modules/lodash-es/_WeakMap.js
+var WeakMap = getNative_default(root_default2, "WeakMap");
+var WeakMap_default = WeakMap;
+
+// node_modules/lodash-es/_getTag.js
+var mapTag = "[object Map]";
+var objectTag = "[object Object]";
+var promiseTag = "[object Promise]";
+var setTag = "[object Set]";
+var weakMapTag = "[object WeakMap]";
+var dataViewTag = "[object DataView]";
+var dataViewCtorString = toSource_default(DataView_default);
+var mapCtorString = toSource_default(Map_default);
+var promiseCtorString = toSource_default(Promise_default);
+var setCtorString = toSource_default(Set_default);
+var weakMapCtorString = toSource_default(WeakMap_default);
+var getTag = baseGetTag_default;
+if (DataView_default && getTag(new DataView_default(new ArrayBuffer(1))) != dataViewTag || Map_default && getTag(new Map_default()) != mapTag || Promise_default && getTag(Promise_default.resolve()) != promiseTag || Set_default && getTag(new Set_default()) != setTag || WeakMap_default && getTag(new WeakMap_default()) != weakMapTag) {
+ getTag = function(value) {
+ var result = baseGetTag_default(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource_default(Ctor) : "";
+ if (ctorString) {
+ switch (ctorString) {
+ case dataViewCtorString:
+ return dataViewTag;
+ case mapCtorString:
+ return mapTag;
+ case promiseCtorString:
+ return promiseTag;
+ case setCtorString:
+ return setTag;
+ case weakMapCtorString:
+ return weakMapTag;
+ }
+ }
+ return result;
+ };
+}
+var getTag_default = getTag;
+
+// node_modules/lodash-es/isObjectLike.js
+function isObjectLike(value) {
+ return value != null && typeof value == "object";
+}
+var isObjectLike_default = isObjectLike;
+
+// node_modules/lodash-es/_baseIsArguments.js
+var argsTag = "[object Arguments]";
+function baseIsArguments(value) {
+ return isObjectLike_default(value) && baseGetTag_default(value) == argsTag;
+}
+var baseIsArguments_default = baseIsArguments;
+
+// node_modules/lodash-es/isArguments.js
+var objectProto8 = Object.prototype;
+var hasOwnProperty6 = objectProto8.hasOwnProperty;
+var propertyIsEnumerable = objectProto8.propertyIsEnumerable;
+var isArguments = baseIsArguments_default(function() {
+ return arguments;
+}()) ? baseIsArguments_default : function(value) {
+ return isObjectLike_default(value) && hasOwnProperty6.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
+};
+var isArguments_default = isArguments;
+
+// node_modules/lodash-es/isArray.js
+var isArray = Array.isArray;
+var isArray_default = isArray;
+
+// node_modules/lodash-es/isLength.js
+var MAX_SAFE_INTEGER = 9007199254740991;
+function isLength(value) {
+ return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+var isLength_default = isLength;
+
+// node_modules/lodash-es/isArrayLike.js
+function isArrayLike(value) {
+ return value != null && isLength_default(value.length) && !isFunction_default(value);
+}
+var isArrayLike_default = isArrayLike;
+
+// node_modules/lodash-es/stubFalse.js
+function stubFalse() {
+ return false;
+}
+var stubFalse_default = stubFalse;
+
+// node_modules/lodash-es/isBuffer.js
+var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
+var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
+var moduleExports = freeModule && freeModule.exports === freeExports;
+var Buffer = moduleExports ? root_default2.Buffer : void 0;
+var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0;
+var isBuffer = nativeIsBuffer || stubFalse_default;
+var isBuffer_default = isBuffer;
+
+// node_modules/lodash-es/_baseIsTypedArray.js
+var argsTag2 = "[object Arguments]";
+var arrayTag = "[object Array]";
+var boolTag = "[object Boolean]";
+var dateTag = "[object Date]";
+var errorTag = "[object Error]";
+var funcTag2 = "[object Function]";
+var mapTag2 = "[object Map]";
+var numberTag = "[object Number]";
+var objectTag2 = "[object Object]";
+var regexpTag = "[object RegExp]";
+var setTag2 = "[object Set]";
+var stringTag = "[object String]";
+var weakMapTag2 = "[object WeakMap]";
+var arrayBufferTag = "[object ArrayBuffer]";
+var dataViewTag2 = "[object DataView]";
+var float32Tag = "[object Float32Array]";
+var float64Tag = "[object Float64Array]";
+var int8Tag = "[object Int8Array]";
+var int16Tag = "[object Int16Array]";
+var int32Tag = "[object Int32Array]";
+var uint8Tag = "[object Uint8Array]";
+var uint8ClampedTag = "[object Uint8ClampedArray]";
+var uint16Tag = "[object Uint16Array]";
+var uint32Tag = "[object Uint32Array]";
+var typedArrayTags = {};
+typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
+typedArrayTags[argsTag2] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag2] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag2] = typedArrayTags[mapTag2] = typedArrayTags[numberTag] = typedArrayTags[objectTag2] = typedArrayTags[regexpTag] = typedArrayTags[setTag2] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag2] = false;
+function baseIsTypedArray(value) {
+ return isObjectLike_default(value) && isLength_default(value.length) && !!typedArrayTags[baseGetTag_default(value)];
+}
+var baseIsTypedArray_default = baseIsTypedArray;
+
+// node_modules/lodash-es/_baseUnary.js
+function baseUnary(func) {
+ return function(value) {
+ return func(value);
+ };
+}
+var baseUnary_default = baseUnary;
+
+// node_modules/lodash-es/_nodeUtil.js
+var freeExports2 = typeof exports == "object" && exports && !exports.nodeType && exports;
+var freeModule2 = freeExports2 && typeof module == "object" && module && !module.nodeType && module;
+var moduleExports2 = freeModule2 && freeModule2.exports === freeExports2;
+var freeProcess = moduleExports2 && freeGlobal_default.process;
+var nodeUtil = function() {
+ try {
+ var types = freeModule2 && freeModule2.require && freeModule2.require("util").types;
+ if (types) {
+ return types;
+ }
+ return freeProcess && freeProcess.binding && freeProcess.binding("util");
+ } catch (e) {
+ }
+}();
+var nodeUtil_default = nodeUtil;
+
+// node_modules/lodash-es/isTypedArray.js
+var nodeIsTypedArray = nodeUtil_default && nodeUtil_default.isTypedArray;
+var isTypedArray = nodeIsTypedArray ? baseUnary_default(nodeIsTypedArray) : baseIsTypedArray_default;
+var isTypedArray_default = isTypedArray;
+
+// node_modules/lodash-es/isEmpty.js
+var mapTag3 = "[object Map]";
+var setTag3 = "[object Set]";
+var objectProto9 = Object.prototype;
+var hasOwnProperty7 = objectProto9.hasOwnProperty;
+function isEmpty(value) {
+ if (value == null) {
+ return true;
+ }
+ if (isArrayLike_default(value) && (isArray_default(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer_default(value) || isTypedArray_default(value) || isArguments_default(value))) {
+ return !value.length;
+ }
+ var tag = getTag_default(value);
+ if (tag == mapTag3 || tag == setTag3) {
+ return !value.size;
+ }
+ if (isPrototype_default(value)) {
+ return !baseKeys_default(value).length;
+ }
+ for (var key in value) {
+ if (hasOwnProperty7.call(value, key)) {
+ return false;
+ }
+ }
+ return true;
+}
+var isEmpty_default = isEmpty;
+
+// node_modules/mermaid/dist/mermaid-306576ad.js
+var import_dayjs = __toESM(require_dayjs_min(), 1);
+var import_sanitize_url = __toESM(require_dist(), 1);
+var LEVELS = {
+ trace: 0,
+ debug: 1,
+ info: 2,
+ warn: 3,
+ error: 4,
+ fatal: 5
+};
+var log$1 = {
+ trace: (..._args) => {
+ },
+ debug: (..._args) => {
+ },
+ info: (..._args) => {
+ },
+ warn: (..._args) => {
+ },
+ error: (..._args) => {
+ },
+ fatal: (..._args) => {
+ }
+};
+var setLogLevel$1 = function(level = "fatal") {
+ let numericLevel = LEVELS.fatal;
+ if (typeof level === "string") {
+ level = level.toLowerCase();
+ if (level in LEVELS) {
+ numericLevel = LEVELS[level];
+ }
+ } else if (typeof level === "number") {
+ numericLevel = level;
+ }
+ log$1.trace = () => {
+ };
+ log$1.debug = () => {
+ };
+ log$1.info = () => {
+ };
+ log$1.warn = () => {
+ };
+ log$1.error = () => {
+ };
+ log$1.fatal = () => {
+ };
+ if (numericLevel <= LEVELS.fatal) {
+ log$1.fatal = console.error ? console.error.bind(console, format2("FATAL"), "color: orange") : console.log.bind(console, "\x1B[35m", format2("FATAL"));
+ }
+ if (numericLevel <= LEVELS.error) {
+ log$1.error = console.error ? console.error.bind(console, format2("ERROR"), "color: orange") : console.log.bind(console, "\x1B[31m", format2("ERROR"));
+ }
+ if (numericLevel <= LEVELS.warn) {
+ log$1.warn = console.warn ? console.warn.bind(console, format2("WARN"), "color: orange") : console.log.bind(console, `\x1B[33m`, format2("WARN"));
+ }
+ if (numericLevel <= LEVELS.info) {
+ log$1.info = console.info ? console.info.bind(console, format2("INFO"), "color: lightblue") : console.log.bind(console, "\x1B[34m", format2("INFO"));
+ }
+ if (numericLevel <= LEVELS.debug) {
+ log$1.debug = console.debug ? console.debug.bind(console, format2("DEBUG"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", format2("DEBUG"));
+ }
+ if (numericLevel <= LEVELS.trace) {
+ log$1.trace = console.debug ? console.debug.bind(console, format2("TRACE"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", format2("TRACE"));
+ }
+};
+var format2 = (level) => {
+ const time2 = (0, import_dayjs.default)().format("ss.SSS");
+ return `%c${time2} : ${level} : `;
+};
+var lineBreakRegex = /
/gi;
+var getRows = (s2) => {
+ if (!s2) {
+ return [""];
+ }
+ const str2 = breakToPlaceholder(s2).replace(/\\n/g, "#br#");
+ return str2.split("#br#");
+};
+var removeScript = (txt) => {
+ return purify.sanitize(txt);
+};
+var sanitizeMore = (text2, config2) => {
+ var _a;
+ if (((_a = config2.flowchart) == null ? void 0 : _a.htmlLabels) !== false) {
+ const level = config2.securityLevel;
+ if (level === "antiscript" || level === "strict") {
+ text2 = removeScript(text2);
+ } else if (level !== "loose") {
+ text2 = breakToPlaceholder(text2);
+ text2 = text2.replace(//g, ">");
+ text2 = text2.replace(/=/g, "=");
+ text2 = placeholderToBreak(text2);
+ }
+ }
+ return text2;
+};
+var sanitizeText$2 = (text2, config2) => {
+ if (!text2) {
+ return text2;
+ }
+ if (config2.dompurifyConfig) {
+ text2 = purify.sanitize(sanitizeMore(text2, config2), config2.dompurifyConfig).toString();
+ } else {
+ text2 = purify.sanitize(sanitizeMore(text2, config2), {
+ FORBID_TAGS: ["style"]
+ }).toString();
+ }
+ return text2;
+};
+var sanitizeTextOrArray = (a2, config2) => {
+ if (typeof a2 === "string") {
+ return sanitizeText$2(a2, config2);
+ }
+ return a2.flat().map((x3) => sanitizeText$2(x3, config2));
+};
+var hasBreaks = (text2) => {
+ return lineBreakRegex.test(text2);
+};
+var splitBreaks = (text2) => {
+ return text2.split(lineBreakRegex);
+};
+var placeholderToBreak = (s2) => {
+ return s2.replace(/#br#/g, "
");
+};
+var breakToPlaceholder = (s2) => {
+ return s2.replace(lineBreakRegex, "#br#");
+};
+var getUrl = (useAbsolute) => {
+ let url = "";
+ if (useAbsolute) {
+ url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search;
+ url = url.replaceAll(/\(/g, "\\(");
+ url = url.replaceAll(/\)/g, "\\)");
+ }
+ return url;
+};
+var evaluate = (val) => val === false || ["false", "null", "0"].includes(String(val).trim().toLowerCase()) ? false : true;
+var getMax = function(...values) {
+ const newValues = values.filter((value) => {
+ return !isNaN(value);
+ });
+ return Math.max(...newValues);
+};
+var getMin = function(...values) {
+ const newValues = values.filter((value) => {
+ return !isNaN(value);
+ });
+ return Math.min(...newValues);
+};
+var parseGenericTypes = function(text2) {
+ let cleanedText = text2;
+ if (text2.split("~").length - 1 >= 2) {
+ let newCleanedText = cleanedText;
+ do {
+ cleanedText = newCleanedText;
+ newCleanedText = cleanedText.replace(/~([^\s,:;]+)~/, "<$1>");
+ } while (newCleanedText != cleanedText);
+ return parseGenericTypes(newCleanedText);
+ } else {
+ return cleanedText;
+ }
+};
+var common$1 = {
+ getRows,
+ sanitizeText: sanitizeText$2,
+ sanitizeTextOrArray,
+ hasBreaks,
+ splitBreaks,
+ lineBreakRegex,
+ removeScript,
+ getUrl,
+ evaluate,
+ getMax,
+ getMin
+};
+var mkBorder = (col, darkMode) => darkMode ? adjust_default(col, { s: -40, l: 10 }) : adjust_default(col, { s: -40, l: -10 });
+var oldAttributeBackgroundColorOdd = "#ffffff";
+var oldAttributeBackgroundColorEven = "#f2f2f2";
+var Theme$4 = class Theme {
+ constructor() {
+ this.background = "#f4f4f4";
+ this.primaryColor = "#fff4dd";
+ this.noteBkgColor = "#fff5ad";
+ this.noteTextColor = "#333";
+ this.THEME_COLOR_LIMIT = 12;
+ this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif';
+ this.fontSize = "16px";
+ }
+ updateColors() {
+ this.primaryTextColor = this.primaryTextColor || (this.darkMode ? "#eee" : "#333");
+ this.secondaryColor = this.secondaryColor || adjust_default(this.primaryColor, { h: -120 });
+ this.tertiaryColor = this.tertiaryColor || adjust_default(this.primaryColor, { h: 180, l: 5 });
+ this.primaryBorderColor = this.primaryBorderColor || mkBorder(this.primaryColor, this.darkMode);
+ this.secondaryBorderColor = this.secondaryBorderColor || mkBorder(this.secondaryColor, this.darkMode);
+ this.tertiaryBorderColor = this.tertiaryBorderColor || mkBorder(this.tertiaryColor, this.darkMode);
+ this.noteBorderColor = this.noteBorderColor || mkBorder(this.noteBkgColor, this.darkMode);
+ this.noteBkgColor = this.noteBkgColor || "#fff5ad";
+ this.noteTextColor = this.noteTextColor || "#333";
+ this.secondaryTextColor = this.secondaryTextColor || invert_default(this.secondaryColor);
+ this.tertiaryTextColor = this.tertiaryTextColor || invert_default(this.tertiaryColor);
+ this.lineColor = this.lineColor || invert_default(this.background);
+ this.arrowheadColor = this.arrowheadColor || invert_default(this.background);
+ this.textColor = this.textColor || this.primaryTextColor;
+ this.border2 = this.border2 || this.tertiaryBorderColor;
+ this.nodeBkg = this.nodeBkg || this.primaryColor;
+ this.mainBkg = this.mainBkg || this.primaryColor;
+ this.nodeBorder = this.nodeBorder || this.primaryBorderColor;
+ this.clusterBkg = this.clusterBkg || this.tertiaryColor;
+ this.clusterBorder = this.clusterBorder || this.tertiaryBorderColor;
+ this.defaultLinkColor = this.defaultLinkColor || this.lineColor;
+ this.titleColor = this.titleColor || this.tertiaryTextColor;
+ this.edgeLabelBackground = this.edgeLabelBackground || (this.darkMode ? darken_default(this.secondaryColor, 30) : this.secondaryColor);
+ this.nodeTextColor = this.nodeTextColor || this.primaryTextColor;
+ this.actorBorder = this.actorBorder || this.primaryBorderColor;
+ this.actorBkg = this.actorBkg || this.mainBkg;
+ this.actorTextColor = this.actorTextColor || this.primaryTextColor;
+ this.actorLineColor = this.actorLineColor || "grey";
+ this.labelBoxBkgColor = this.labelBoxBkgColor || this.actorBkg;
+ this.signalColor = this.signalColor || this.textColor;
+ this.signalTextColor = this.signalTextColor || this.textColor;
+ this.labelBoxBorderColor = this.labelBoxBorderColor || this.actorBorder;
+ this.labelTextColor = this.labelTextColor || this.actorTextColor;
+ this.loopTextColor = this.loopTextColor || this.actorTextColor;
+ this.activationBorderColor = this.activationBorderColor || darken_default(this.secondaryColor, 10);
+ this.activationBkgColor = this.activationBkgColor || this.secondaryColor;
+ this.sequenceNumberColor = this.sequenceNumberColor || invert_default(this.lineColor);
+ this.sectionBkgColor = this.sectionBkgColor || this.tertiaryColor;
+ this.altSectionBkgColor = this.altSectionBkgColor || "white";
+ this.sectionBkgColor = this.sectionBkgColor || this.secondaryColor;
+ this.sectionBkgColor2 = this.sectionBkgColor2 || this.primaryColor;
+ this.excludeBkgColor = this.excludeBkgColor || "#eeeeee";
+ this.taskBorderColor = this.taskBorderColor || this.primaryBorderColor;
+ this.taskBkgColor = this.taskBkgColor || this.primaryColor;
+ this.activeTaskBorderColor = this.activeTaskBorderColor || this.primaryColor;
+ this.activeTaskBkgColor = this.activeTaskBkgColor || lighten_default(this.primaryColor, 23);
+ this.gridColor = this.gridColor || "lightgrey";
+ this.doneTaskBkgColor = this.doneTaskBkgColor || "lightgrey";
+ this.doneTaskBorderColor = this.doneTaskBorderColor || "grey";
+ this.critBorderColor = this.critBorderColor || "#ff8888";
+ this.critBkgColor = this.critBkgColor || "red";
+ this.todayLineColor = this.todayLineColor || "red";
+ this.taskTextColor = this.taskTextColor || this.textColor;
+ this.taskTextOutsideColor = this.taskTextOutsideColor || this.textColor;
+ this.taskTextLightColor = this.taskTextLightColor || this.textColor;
+ this.taskTextColor = this.taskTextColor || this.primaryTextColor;
+ this.taskTextDarkColor = this.taskTextDarkColor || this.textColor;
+ this.taskTextClickableColor = this.taskTextClickableColor || "#003163";
+ this.personBorder = this.personBorder || this.primaryBorderColor;
+ this.personBkg = this.personBkg || this.mainBkg;
+ this.transitionColor = this.transitionColor || this.lineColor;
+ this.transitionLabelColor = this.transitionLabelColor || this.textColor;
+ this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;
+ this.stateBkg = this.stateBkg || this.mainBkg;
+ this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;
+ this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;
+ this.altBackground = this.altBackground || this.tertiaryColor;
+ this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;
+ this.compositeBorder = this.compositeBorder || this.nodeBorder;
+ this.innerEndBackground = this.nodeBorder;
+ this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;
+ this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;
+ this.transitionColor = this.transitionColor || this.lineColor;
+ this.specialStateColor = this.lineColor;
+ this.cScale0 = this.cScale0 || this.primaryColor;
+ this.cScale1 = this.cScale1 || this.secondaryColor;
+ this.cScale2 = this.cScale2 || this.tertiaryColor;
+ this.cScale3 = this.cScale3 || adjust_default(this.primaryColor, { h: 30 });
+ this.cScale4 = this.cScale4 || adjust_default(this.primaryColor, { h: 60 });
+ this.cScale5 = this.cScale5 || adjust_default(this.primaryColor, { h: 90 });
+ this.cScale6 = this.cScale6 || adjust_default(this.primaryColor, { h: 120 });
+ this.cScale7 = this.cScale7 || adjust_default(this.primaryColor, { h: 150 });
+ this.cScale8 = this.cScale8 || adjust_default(this.primaryColor, { h: 210, l: 150 });
+ this.cScale9 = this.cScale9 || adjust_default(this.primaryColor, { h: 270 });
+ this.cScale10 = this.cScale10 || adjust_default(this.primaryColor, { h: 300 });
+ this.cScale11 = this.cScale11 || adjust_default(this.primaryColor, { h: 330 });
+ if (this.darkMode) {
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
+ this["cScale" + i] = darken_default(this["cScale" + i], 75);
+ }
+ } else {
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
+ this["cScale" + i] = darken_default(this["cScale" + i], 25);
+ }
+ }
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
+ this["cScaleInv" + i] = this["cScaleInv" + i] || invert_default(this["cScale" + i]);
+ }
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
+ if (this.darkMode) {
+ this["cScalePeer" + i] = this["cScalePeer" + i] || lighten_default(this["cScale" + i], 10);
+ } else {
+ this["cScalePeer" + i] = this["cScalePeer" + i] || darken_default(this["cScale" + i], 10);
+ }
+ }
+ this.scaleLabelColor = this.scaleLabelColor || this.labelTextColor;
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
+ this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor;
+ }
+ const multiplier = this.darkMode ? -4 : -1;
+ for (let i = 0; i < 5; i++) {
+ this["surface" + i] = this["surface" + i] || adjust_default(this.mainBkg, { h: 180, s: -15, l: multiplier * (5 + i * 3) });
+ this["surfacePeer" + i] = this["surfacePeer" + i] || adjust_default(this.mainBkg, { h: 180, s: -15, l: multiplier * (8 + i * 3) });
+ }
+ this.classText = this.classText || this.textColor;
+ this.fillType0 = this.fillType0 || this.primaryColor;
+ this.fillType1 = this.fillType1 || this.secondaryColor;
+ this.fillType2 = this.fillType2 || adjust_default(this.primaryColor, { h: 64 });
+ this.fillType3 = this.fillType3 || adjust_default(this.secondaryColor, { h: 64 });
+ this.fillType4 = this.fillType4 || adjust_default(this.primaryColor, { h: -64 });
+ this.fillType5 = this.fillType5 || adjust_default(this.secondaryColor, { h: -64 });
+ this.fillType6 = this.fillType6 || adjust_default(this.primaryColor, { h: 128 });
+ this.fillType7 = this.fillType7 || adjust_default(this.secondaryColor, { h: 128 });
+ this.pie1 = this.pie1 || this.primaryColor;
+ this.pie2 = this.pie2 || this.secondaryColor;
+ this.pie3 = this.pie3 || this.tertiaryColor;
+ this.pie4 = this.pie4 || adjust_default(this.primaryColor, { l: -10 });
+ this.pie5 = this.pie5 || adjust_default(this.secondaryColor, { l: -10 });
+ this.pie6 = this.pie6 || adjust_default(this.tertiaryColor, { l: -10 });
+ this.pie7 = this.pie7 || adjust_default(this.primaryColor, { h: 60, l: -10 });
+ this.pie8 = this.pie8 || adjust_default(this.primaryColor, { h: -60, l: -10 });
+ this.pie9 = this.pie9 || adjust_default(this.primaryColor, { h: 120, l: 0 });
+ this.pie10 = this.pie10 || adjust_default(this.primaryColor, { h: 60, l: -20 });
+ this.pie11 = this.pie11 || adjust_default(this.primaryColor, { h: -60, l: -20 });
+ this.pie12 = this.pie12 || adjust_default(this.primaryColor, { h: 120, l: -10 });
+ this.pieTitleTextSize = this.pieTitleTextSize || "25px";
+ this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;
+ this.pieSectionTextSize = this.pieSectionTextSize || "17px";
+ this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;
+ this.pieLegendTextSize = this.pieLegendTextSize || "17px";
+ this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;
+ this.pieStrokeColor = this.pieStrokeColor || "black";
+ this.pieStrokeWidth = this.pieStrokeWidth || "2px";
+ this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px";
+ this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black";
+ this.pieOpacity = this.pieOpacity || "0.7";
+ this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;
+ this.quadrant2Fill = this.quadrant2Fill || adjust_default(this.primaryColor, { r: 5, g: 5, b: 5 });
+ this.quadrant3Fill = this.quadrant3Fill || adjust_default(this.primaryColor, { r: 10, g: 10, b: 10 });
+ this.quadrant4Fill = this.quadrant4Fill || adjust_default(this.primaryColor, { r: 15, g: 15, b: 15 });
+ this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;
+ this.quadrant2TextFill = this.quadrant2TextFill || adjust_default(this.primaryTextColor, { r: -5, g: -5, b: -5 });
+ this.quadrant3TextFill = this.quadrant3TextFill || adjust_default(this.primaryTextColor, { r: -10, g: -10, b: -10 });
+ this.quadrant4TextFill = this.quadrant4TextFill || adjust_default(this.primaryTextColor, { r: -15, g: -15, b: -15 });
+ this.quadrantPointFill = this.quadrantPointFill || is_dark_default(this.quadrant1Fill) ? lighten_default(this.quadrant1Fill) : darken_default(this.quadrant1Fill);
+ this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;
+ this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;
+ this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;
+ this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;
+ this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;
+ this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;
+ this.requirementBackground = this.requirementBackground || this.primaryColor;
+ this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;
+ this.requirementBorderSize = this.requirementBorderSize || "1";
+ this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;
+ this.relationColor = this.relationColor || this.lineColor;
+ this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? darken_default(this.secondaryColor, 30) : this.secondaryColor);
+ this.relationLabelColor = this.relationLabelColor || this.actorTextColor;
+ this.git0 = this.git0 || this.primaryColor;
+ this.git1 = this.git1 || this.secondaryColor;
+ this.git2 = this.git2 || this.tertiaryColor;
+ this.git3 = this.git3 || adjust_default(this.primaryColor, { h: -30 });
+ this.git4 = this.git4 || adjust_default(this.primaryColor, { h: -60 });
+ this.git5 = this.git5 || adjust_default(this.primaryColor, { h: -90 });
+ this.git6 = this.git6 || adjust_default(this.primaryColor, { h: 60 });
+ this.git7 = this.git7 || adjust_default(this.primaryColor, { h: 120 });
+ if (this.darkMode) {
+ this.git0 = lighten_default(this.git0, 25);
+ this.git1 = lighten_default(this.git1, 25);
+ this.git2 = lighten_default(this.git2, 25);
+ this.git3 = lighten_default(this.git3, 25);
+ this.git4 = lighten_default(this.git4, 25);
+ this.git5 = lighten_default(this.git5, 25);
+ this.git6 = lighten_default(this.git6, 25);
+ this.git7 = lighten_default(this.git7, 25);
+ } else {
+ this.git0 = darken_default(this.git0, 25);
+ this.git1 = darken_default(this.git1, 25);
+ this.git2 = darken_default(this.git2, 25);
+ this.git3 = darken_default(this.git3, 25);
+ this.git4 = darken_default(this.git4, 25);
+ this.git5 = darken_default(this.git5, 25);
+ this.git6 = darken_default(this.git6, 25);
+ this.git7 = darken_default(this.git7, 25);
+ }
+ this.gitInv0 = this.gitInv0 || invert_default(this.git0);
+ this.gitInv1 = this.gitInv1 || invert_default(this.git1);
+ this.gitInv2 = this.gitInv2 || invert_default(this.git2);
+ this.gitInv3 = this.gitInv3 || invert_default(this.git3);
+ this.gitInv4 = this.gitInv4 || invert_default(this.git4);
+ this.gitInv5 = this.gitInv5 || invert_default(this.git5);
+ this.gitInv6 = this.gitInv6 || invert_default(this.git6);
+ this.gitInv7 = this.gitInv7 || invert_default(this.git7);
+ this.branchLabelColor = this.branchLabelColor || (this.darkMode ? "black" : this.labelTextColor);
+ this.gitBranchLabel0 = this.gitBranchLabel0 || this.branchLabelColor;
+ this.gitBranchLabel1 = this.gitBranchLabel1 || this.branchLabelColor;
+ this.gitBranchLabel2 = this.gitBranchLabel2 || this.branchLabelColor;
+ this.gitBranchLabel3 = this.gitBranchLabel3 || this.branchLabelColor;
+ this.gitBranchLabel4 = this.gitBranchLabel4 || this.branchLabelColor;
+ this.gitBranchLabel5 = this.gitBranchLabel5 || this.branchLabelColor;
+ this.gitBranchLabel6 = this.gitBranchLabel6 || this.branchLabelColor;
+ this.gitBranchLabel7 = this.gitBranchLabel7 || this.branchLabelColor;
+ this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;
+ this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;
+ this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;
+ this.tagLabelFontSize = this.tagLabelFontSize || "10px";
+ this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;
+ this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;
+ this.commitLabelFontSize = this.commitLabelFontSize || "10px";
+ this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;
+ this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;
+ }
+ calculate(overrides) {
+ if (typeof overrides !== "object") {
+ this.updateColors();
+ return;
+ }
+ const keys = Object.keys(overrides);
+ keys.forEach((k2) => {
+ this[k2] = overrides[k2];
+ });
+ this.updateColors();
+ keys.forEach((k2) => {
+ this[k2] = overrides[k2];
+ });
+ }
+};
+var getThemeVariables$4 = (userOverrides) => {
+ const theme2 = new Theme$4();
+ theme2.calculate(userOverrides);
+ return theme2;
+};
+var Theme$3 = class Theme2 {
+ constructor() {
+ this.background = "#333";
+ this.primaryColor = "#1f2020";
+ this.secondaryColor = lighten_default(this.primaryColor, 16);
+ this.tertiaryColor = adjust_default(this.primaryColor, { h: -160 });
+ this.primaryBorderColor = invert_default(this.background);
+ this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);
+ this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);
+ this.primaryTextColor = invert_default(this.primaryColor);
+ this.secondaryTextColor = invert_default(this.secondaryColor);
+ this.tertiaryTextColor = invert_default(this.tertiaryColor);
+ this.lineColor = invert_default(this.background);
+ this.textColor = invert_default(this.background);
+ this.mainBkg = "#1f2020";
+ this.secondBkg = "calculated";
+ this.mainContrastColor = "lightgrey";
+ this.darkTextColor = lighten_default(invert_default("#323D47"), 10);
+ this.lineColor = "calculated";
+ this.border1 = "#81B1DB";
+ this.border2 = rgba_default(255, 255, 255, 0.25);
+ this.arrowheadColor = "calculated";
+ this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif';
+ this.fontSize = "16px";
+ this.labelBackground = "#181818";
+ this.textColor = "#ccc";
+ this.THEME_COLOR_LIMIT = 12;
+ this.nodeBkg = "calculated";
+ this.nodeBorder = "calculated";
+ this.clusterBkg = "calculated";
+ this.clusterBorder = "calculated";
+ this.defaultLinkColor = "calculated";
+ this.titleColor = "#F9FFFE";
+ this.edgeLabelBackground = "calculated";
+ this.actorBorder = "calculated";
+ this.actorBkg = "calculated";
+ this.actorTextColor = "calculated";
+ this.actorLineColor = "calculated";
+ this.signalColor = "calculated";
+ this.signalTextColor = "calculated";
+ this.labelBoxBkgColor = "calculated";
+ this.labelBoxBorderColor = "calculated";
+ this.labelTextColor = "calculated";
+ this.loopTextColor = "calculated";
+ this.noteBorderColor = "calculated";
+ this.noteBkgColor = "#fff5ad";
+ this.noteTextColor = "calculated";
+ this.activationBorderColor = "calculated";
+ this.activationBkgColor = "calculated";
+ this.sequenceNumberColor = "black";
+ this.sectionBkgColor = darken_default("#EAE8D9", 30);
+ this.altSectionBkgColor = "calculated";
+ this.sectionBkgColor2 = "#EAE8D9";
+ this.excludeBkgColor = darken_default(this.sectionBkgColor, 10);
+ this.taskBorderColor = rgba_default(255, 255, 255, 70);
+ this.taskBkgColor = "calculated";
+ this.taskTextColor = "calculated";
+ this.taskTextLightColor = "calculated";
+ this.taskTextOutsideColor = "calculated";
+ this.taskTextClickableColor = "#003163";
+ this.activeTaskBorderColor = rgba_default(255, 255, 255, 50);
+ this.activeTaskBkgColor = "#81B1DB";
+ this.gridColor = "calculated";
+ this.doneTaskBkgColor = "calculated";
+ this.doneTaskBorderColor = "grey";
+ this.critBorderColor = "#E83737";
+ this.critBkgColor = "#E83737";
+ this.taskTextDarkColor = "calculated";
+ this.todayLineColor = "#DB5757";
+ this.personBorder = this.primaryBorderColor;
+ this.personBkg = this.mainBkg;
+ this.labelColor = "calculated";
+ this.errorBkgColor = "#a44141";
+ this.errorTextColor = "#ddd";
+ }
+ updateColors() {
+ this.secondBkg = lighten_default(this.mainBkg, 16);
+ this.lineColor = this.mainContrastColor;
+ this.arrowheadColor = this.mainContrastColor;
+ this.nodeBkg = this.mainBkg;
+ this.nodeBorder = this.border1;
+ this.clusterBkg = this.secondBkg;
+ this.clusterBorder = this.border2;
+ this.defaultLinkColor = this.lineColor;
+ this.edgeLabelBackground = lighten_default(this.labelBackground, 25);
+ this.actorBorder = this.border1;
+ this.actorBkg = this.mainBkg;
+ this.actorTextColor = this.mainContrastColor;
+ this.actorLineColor = this.mainContrastColor;
+ this.signalColor = this.mainContrastColor;
+ this.signalTextColor = this.mainContrastColor;
+ this.labelBoxBkgColor = this.actorBkg;
+ this.labelBoxBorderColor = this.actorBorder;
+ this.labelTextColor = this.mainContrastColor;
+ this.loopTextColor = this.mainContrastColor;
+ this.noteBorderColor = this.secondaryBorderColor;
+ this.noteBkgColor = this.secondBkg;
+ this.noteTextColor = this.secondaryTextColor;
+ this.activationBorderColor = this.border1;
+ this.activationBkgColor = this.secondBkg;
+ this.altSectionBkgColor = this.background;
+ this.taskBkgColor = lighten_default(this.mainBkg, 23);
+ this.taskTextColor = this.darkTextColor;
+ this.taskTextLightColor = this.mainContrastColor;
+ this.taskTextOutsideColor = this.taskTextLightColor;
+ this.gridColor = this.mainContrastColor;
+ this.doneTaskBkgColor = this.mainContrastColor;
+ this.taskTextDarkColor = this.darkTextColor;
+ this.transitionColor = this.transitionColor || this.lineColor;
+ this.transitionLabelColor = this.transitionLabelColor || this.textColor;
+ this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;
+ this.stateBkg = this.stateBkg || this.mainBkg;
+ this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;
+ this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;
+ this.altBackground = this.altBackground || "#555";
+ this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;
+ this.compositeBorder = this.compositeBorder || this.nodeBorder;
+ this.innerEndBackground = this.primaryBorderColor;
+ this.specialStateColor = "#f4f4f4";
+ this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;
+ this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;
+ this.fillType0 = this.primaryColor;
+ this.fillType1 = this.secondaryColor;
+ this.fillType2 = adjust_default(this.primaryColor, { h: 64 });
+ this.fillType3 = adjust_default(this.secondaryColor, { h: 64 });
+ this.fillType4 = adjust_default(this.primaryColor, { h: -64 });
+ this.fillType5 = adjust_default(this.secondaryColor, { h: -64 });
+ this.fillType6 = adjust_default(this.primaryColor, { h: 128 });
+ this.fillType7 = adjust_default(this.secondaryColor, { h: 128 });
+ this.cScale1 = this.cScale1 || "#0b0000";
+ this.cScale2 = this.cScale2 || "#4d1037";
+ this.cScale3 = this.cScale3 || "#3f5258";
+ this.cScale4 = this.cScale4 || "#4f2f1b";
+ this.cScale5 = this.cScale5 || "#6e0a0a";
+ this.cScale6 = this.cScale6 || "#3b0048";
+ this.cScale7 = this.cScale7 || "#995a01";
+ this.cScale8 = this.cScale8 || "#154706";
+ this.cScale9 = this.cScale9 || "#161722";
+ this.cScale10 = this.cScale10 || "#00296f";
+ this.cScale11 = this.cScale11 || "#01629c";
+ this.cScale12 = this.cScale12 || "#010029";
+ this.cScale0 = this.cScale0 || this.primaryColor;
+ this.cScale1 = this.cScale1 || this.secondaryColor;
+ this.cScale2 = this.cScale2 || this.tertiaryColor;
+ this.cScale3 = this.cScale3 || adjust_default(this.primaryColor, { h: 30 });
+ this.cScale4 = this.cScale4 || adjust_default(this.primaryColor, { h: 60 });
+ this.cScale5 = this.cScale5 || adjust_default(this.primaryColor, { h: 90 });
+ this.cScale6 = this.cScale6 || adjust_default(this.primaryColor, { h: 120 });
+ this.cScale7 = this.cScale7 || adjust_default(this.primaryColor, { h: 150 });
+ this.cScale8 = this.cScale8 || adjust_default(this.primaryColor, { h: 210 });
+ this.cScale9 = this.cScale9 || adjust_default(this.primaryColor, { h: 270 });
+ this.cScale10 = this.cScale10 || adjust_default(this.primaryColor, { h: 300 });
+ this.cScale11 = this.cScale11 || adjust_default(this.primaryColor, { h: 330 });
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
+ this["cScaleInv" + i] = this["cScaleInv" + i] || invert_default(this["cScale" + i]);
+ }
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
+ this["cScalePeer" + i] = this["cScalePeer" + i] || lighten_default(this["cScale" + i], 10);
+ }
+ for (let i = 0; i < 5; i++) {
+ this["surface" + i] = this["surface" + i] || adjust_default(this.mainBkg, { h: 30, s: -30, l: -(-10 + i * 4) });
+ this["surfacePeer" + i] = this["surfacePeer" + i] || adjust_default(this.mainBkg, { h: 30, s: -30, l: -(-7 + i * 4) });
+ }
+ this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor);
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
+ this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor;
+ }
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
+ this["pie" + i] = this["cScale" + i];
+ }
+ this.pieTitleTextSize = this.pieTitleTextSize || "25px";
+ this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;
+ this.pieSectionTextSize = this.pieSectionTextSize || "17px";
+ this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;
+ this.pieLegendTextSize = this.pieLegendTextSize || "17px";
+ this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;
+ this.pieStrokeColor = this.pieStrokeColor || "black";
+ this.pieStrokeWidth = this.pieStrokeWidth || "2px";
+ this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px";
+ this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black";
+ this.pieOpacity = this.pieOpacity || "0.7";
+ this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;
+ this.quadrant2Fill = this.quadrant2Fill || adjust_default(this.primaryColor, { r: 5, g: 5, b: 5 });
+ this.quadrant3Fill = this.quadrant3Fill || adjust_default(this.primaryColor, { r: 10, g: 10, b: 10 });
+ this.quadrant4Fill = this.quadrant4Fill || adjust_default(this.primaryColor, { r: 15, g: 15, b: 15 });
+ this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;
+ this.quadrant2TextFill = this.quadrant2TextFill || adjust_default(this.primaryTextColor, { r: -5, g: -5, b: -5 });
+ this.quadrant3TextFill = this.quadrant3TextFill || adjust_default(this.primaryTextColor, { r: -10, g: -10, b: -10 });
+ this.quadrant4TextFill = this.quadrant4TextFill || adjust_default(this.primaryTextColor, { r: -15, g: -15, b: -15 });
+ this.quadrantPointFill = this.quadrantPointFill || is_dark_default(this.quadrant1Fill) ? lighten_default(this.quadrant1Fill) : darken_default(this.quadrant1Fill);
+ this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;
+ this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;
+ this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;
+ this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;
+ this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;
+ this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;
+ this.classText = this.primaryTextColor;
+ this.requirementBackground = this.requirementBackground || this.primaryColor;
+ this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;
+ this.requirementBorderSize = this.requirementBorderSize || "1";
+ this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;
+ this.relationColor = this.relationColor || this.lineColor;
+ this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? darken_default(this.secondaryColor, 30) : this.secondaryColor);
+ this.relationLabelColor = this.relationLabelColor || this.actorTextColor;
+ this.git0 = lighten_default(this.secondaryColor, 20);
+ this.git1 = lighten_default(this.pie2 || this.secondaryColor, 20);
+ this.git2 = lighten_default(this.pie3 || this.tertiaryColor, 20);
+ this.git3 = lighten_default(this.pie4 || adjust_default(this.primaryColor, { h: -30 }), 20);
+ this.git4 = lighten_default(this.pie5 || adjust_default(this.primaryColor, { h: -60 }), 20);
+ this.git5 = lighten_default(this.pie6 || adjust_default(this.primaryColor, { h: -90 }), 10);
+ this.git6 = lighten_default(this.pie7 || adjust_default(this.primaryColor, { h: 60 }), 10);
+ this.git7 = lighten_default(this.pie8 || adjust_default(this.primaryColor, { h: 120 }), 20);
+ this.gitInv0 = this.gitInv0 || invert_default(this.git0);
+ this.gitInv1 = this.gitInv1 || invert_default(this.git1);
+ this.gitInv2 = this.gitInv2 || invert_default(this.git2);
+ this.gitInv3 = this.gitInv3 || invert_default(this.git3);
+ this.gitInv4 = this.gitInv4 || invert_default(this.git4);
+ this.gitInv5 = this.gitInv5 || invert_default(this.git5);
+ this.gitInv6 = this.gitInv6 || invert_default(this.git6);
+ this.gitInv7 = this.gitInv7 || invert_default(this.git7);
+ this.gitBranchLabel0 = this.gitBranchLabel0 || invert_default(this.labelTextColor);
+ this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor;
+ this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor;
+ this.gitBranchLabel3 = this.gitBranchLabel3 || invert_default(this.labelTextColor);
+ this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor;
+ this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor;
+ this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor;
+ this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor;
+ this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;
+ this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;
+ this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;
+ this.tagLabelFontSize = this.tagLabelFontSize || "10px";
+ this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;
+ this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;
+ this.commitLabelFontSize = this.commitLabelFontSize || "10px";
+ this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || lighten_default(this.background, 12);
+ this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || lighten_default(this.background, 2);
+ }
+ calculate(overrides) {
+ if (typeof overrides !== "object") {
+ this.updateColors();
+ return;
+ }
+ const keys = Object.keys(overrides);
+ keys.forEach((k2) => {
+ this[k2] = overrides[k2];
+ });
+ this.updateColors();
+ keys.forEach((k2) => {
+ this[k2] = overrides[k2];
+ });
+ }
+};
+var getThemeVariables$3 = (userOverrides) => {
+ const theme2 = new Theme$3();
+ theme2.calculate(userOverrides);
+ return theme2;
+};
+var Theme$2 = class Theme3 {
+ constructor() {
+ this.background = "#f4f4f4";
+ this.primaryColor = "#ECECFF";
+ this.secondaryColor = adjust_default(this.primaryColor, { h: 120 });
+ this.secondaryColor = "#ffffde";
+ this.tertiaryColor = adjust_default(this.primaryColor, { h: -160 });
+ this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode);
+ this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);
+ this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);
+ this.primaryTextColor = invert_default(this.primaryColor);
+ this.secondaryTextColor = invert_default(this.secondaryColor);
+ this.tertiaryTextColor = invert_default(this.tertiaryColor);
+ this.lineColor = invert_default(this.background);
+ this.textColor = invert_default(this.background);
+ this.background = "white";
+ this.mainBkg = "#ECECFF";
+ this.secondBkg = "#ffffde";
+ this.lineColor = "#333333";
+ this.border1 = "#9370DB";
+ this.border2 = "#aaaa33";
+ this.arrowheadColor = "#333333";
+ this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif';
+ this.fontSize = "16px";
+ this.labelBackground = "#e8e8e8";
+ this.textColor = "#333";
+ this.THEME_COLOR_LIMIT = 12;
+ this.nodeBkg = "calculated";
+ this.nodeBorder = "calculated";
+ this.clusterBkg = "calculated";
+ this.clusterBorder = "calculated";
+ this.defaultLinkColor = "calculated";
+ this.titleColor = "calculated";
+ this.edgeLabelBackground = "calculated";
+ this.actorBorder = "calculated";
+ this.actorBkg = "calculated";
+ this.actorTextColor = "black";
+ this.actorLineColor = "grey";
+ this.signalColor = "calculated";
+ this.signalTextColor = "calculated";
+ this.labelBoxBkgColor = "calculated";
+ this.labelBoxBorderColor = "calculated";
+ this.labelTextColor = "calculated";
+ this.loopTextColor = "calculated";
+ this.noteBorderColor = "calculated";
+ this.noteBkgColor = "#fff5ad";
+ this.noteTextColor = "calculated";
+ this.activationBorderColor = "#666";
+ this.activationBkgColor = "#f4f4f4";
+ this.sequenceNumberColor = "white";
+ this.sectionBkgColor = "calculated";
+ this.altSectionBkgColor = "calculated";
+ this.sectionBkgColor2 = "calculated";
+ this.excludeBkgColor = "#eeeeee";
+ this.taskBorderColor = "calculated";
+ this.taskBkgColor = "calculated";
+ this.taskTextLightColor = "calculated";
+ this.taskTextColor = this.taskTextLightColor;
+ this.taskTextDarkColor = "calculated";
+ this.taskTextOutsideColor = this.taskTextDarkColor;
+ this.taskTextClickableColor = "calculated";
+ this.activeTaskBorderColor = "calculated";
+ this.activeTaskBkgColor = "calculated";
+ this.gridColor = "calculated";
+ this.doneTaskBkgColor = "calculated";
+ this.doneTaskBorderColor = "calculated";
+ this.critBorderColor = "calculated";
+ this.critBkgColor = "calculated";
+ this.todayLineColor = "calculated";
+ this.sectionBkgColor = rgba_default(102, 102, 255, 0.49);
+ this.altSectionBkgColor = "white";
+ this.sectionBkgColor2 = "#fff400";
+ this.taskBorderColor = "#534fbc";
+ this.taskBkgColor = "#8a90dd";
+ this.taskTextLightColor = "white";
+ this.taskTextColor = "calculated";
+ this.taskTextDarkColor = "black";
+ this.taskTextOutsideColor = "calculated";
+ this.taskTextClickableColor = "#003163";
+ this.activeTaskBorderColor = "#534fbc";
+ this.activeTaskBkgColor = "#bfc7ff";
+ this.gridColor = "lightgrey";
+ this.doneTaskBkgColor = "lightgrey";
+ this.doneTaskBorderColor = "grey";
+ this.critBorderColor = "#ff8888";
+ this.critBkgColor = "red";
+ this.todayLineColor = "red";
+ this.personBorder = this.primaryBorderColor;
+ this.personBkg = this.mainBkg;
+ this.labelColor = "black";
+ this.errorBkgColor = "#552222";
+ this.errorTextColor = "#552222";
+ this.updateColors();
+ }
+ updateColors() {
+ this.cScale0 = this.cScale0 || this.primaryColor;
+ this.cScale1 = this.cScale1 || this.secondaryColor;
+ this.cScale2 = this.cScale2 || this.tertiaryColor;
+ this.cScale3 = this.cScale3 || adjust_default(this.primaryColor, { h: 30 });
+ this.cScale4 = this.cScale4 || adjust_default(this.primaryColor, { h: 60 });
+ this.cScale5 = this.cScale5 || adjust_default(this.primaryColor, { h: 90 });
+ this.cScale6 = this.cScale6 || adjust_default(this.primaryColor, { h: 120 });
+ this.cScale7 = this.cScale7 || adjust_default(this.primaryColor, { h: 150 });
+ this.cScale8 = this.cScale8 || adjust_default(this.primaryColor, { h: 210 });
+ this.cScale9 = this.cScale9 || adjust_default(this.primaryColor, { h: 270 });
+ this.cScale10 = this.cScale10 || adjust_default(this.primaryColor, { h: 300 });
+ this.cScale11 = this.cScale11 || adjust_default(this.primaryColor, { h: 330 });
+ this["cScalePeer1"] = this["cScalePeer1"] || darken_default(this.secondaryColor, 45);
+ this["cScalePeer2"] = this["cScalePeer2"] || darken_default(this.tertiaryColor, 40);
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
+ this["cScale" + i] = darken_default(this["cScale" + i], 10);
+ this["cScalePeer" + i] = this["cScalePeer" + i] || darken_default(this["cScale" + i], 25);
+ }
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
+ this["cScaleInv" + i] = this["cScaleInv" + i] || adjust_default(this["cScale" + i], { h: 180 });
+ }
+ for (let i = 0; i < 5; i++) {
+ this["surface" + i] = this["surface" + i] || adjust_default(this.mainBkg, { h: 30, l: -(5 + i * 5) });
+ this["surfacePeer" + i] = this["surfacePeer" + i] || adjust_default(this.mainBkg, { h: 30, l: -(7 + i * 5) });
+ }
+ this.scaleLabelColor = this.scaleLabelColor !== "calculated" && this.scaleLabelColor ? this.scaleLabelColor : this.labelTextColor;
+ if (this.labelTextColor !== "calculated") {
+ this.cScaleLabel0 = this.cScaleLabel0 || invert_default(this.labelTextColor);
+ this.cScaleLabel3 = this.cScaleLabel3 || invert_default(this.labelTextColor);
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
+ this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.labelTextColor;
+ }
+ }
+ this.nodeBkg = this.mainBkg;
+ this.nodeBorder = this.border1;
+ this.clusterBkg = this.secondBkg;
+ this.clusterBorder = this.border2;
+ this.defaultLinkColor = this.lineColor;
+ this.titleColor = this.textColor;
+ this.edgeLabelBackground = this.labelBackground;
+ this.actorBorder = lighten_default(this.border1, 23);
+ this.actorBkg = this.mainBkg;
+ this.labelBoxBkgColor = this.actorBkg;
+ this.signalColor = this.textColor;
+ this.signalTextColor = this.textColor;
+ this.labelBoxBorderColor = this.actorBorder;
+ this.labelTextColor = this.actorTextColor;
+ this.loopTextColor = this.actorTextColor;
+ this.noteBorderColor = this.border2;
+ this.noteTextColor = this.actorTextColor;
+ this.taskTextColor = this.taskTextLightColor;
+ this.taskTextOutsideColor = this.taskTextDarkColor;
+ this.transitionColor = this.transitionColor || this.lineColor;
+ this.transitionLabelColor = this.transitionLabelColor || this.textColor;
+ this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;
+ this.stateBkg = this.stateBkg || this.mainBkg;
+ this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;
+ this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;
+ this.altBackground = this.altBackground || "#f0f0f0";
+ this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;
+ this.compositeBorder = this.compositeBorder || this.nodeBorder;
+ this.innerEndBackground = this.nodeBorder;
+ this.specialStateColor = this.lineColor;
+ this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;
+ this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;
+ this.transitionColor = this.transitionColor || this.lineColor;
+ this.classText = this.primaryTextColor;
+ this.fillType0 = this.primaryColor;
+ this.fillType1 = this.secondaryColor;
+ this.fillType2 = adjust_default(this.primaryColor, { h: 64 });
+ this.fillType3 = adjust_default(this.secondaryColor, { h: 64 });
+ this.fillType4 = adjust_default(this.primaryColor, { h: -64 });
+ this.fillType5 = adjust_default(this.secondaryColor, { h: -64 });
+ this.fillType6 = adjust_default(this.primaryColor, { h: 128 });
+ this.fillType7 = adjust_default(this.secondaryColor, { h: 128 });
+ this.pie1 = this.pie1 || this.primaryColor;
+ this.pie2 = this.pie2 || this.secondaryColor;
+ this.pie3 = this.pie3 || adjust_default(this.tertiaryColor, { l: -40 });
+ this.pie4 = this.pie4 || adjust_default(this.primaryColor, { l: -10 });
+ this.pie5 = this.pie5 || adjust_default(this.secondaryColor, { l: -30 });
+ this.pie6 = this.pie6 || adjust_default(this.tertiaryColor, { l: -20 });
+ this.pie7 = this.pie7 || adjust_default(this.primaryColor, { h: 60, l: -20 });
+ this.pie8 = this.pie8 || adjust_default(this.primaryColor, { h: -60, l: -40 });
+ this.pie9 = this.pie9 || adjust_default(this.primaryColor, { h: 120, l: -40 });
+ this.pie10 = this.pie10 || adjust_default(this.primaryColor, { h: 60, l: -40 });
+ this.pie11 = this.pie11 || adjust_default(this.primaryColor, { h: -90, l: -40 });
+ this.pie12 = this.pie12 || adjust_default(this.primaryColor, { h: 120, l: -30 });
+ this.pieTitleTextSize = this.pieTitleTextSize || "25px";
+ this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;
+ this.pieSectionTextSize = this.pieSectionTextSize || "17px";
+ this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;
+ this.pieLegendTextSize = this.pieLegendTextSize || "17px";
+ this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;
+ this.pieStrokeColor = this.pieStrokeColor || "black";
+ this.pieStrokeWidth = this.pieStrokeWidth || "2px";
+ this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px";
+ this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black";
+ this.pieOpacity = this.pieOpacity || "0.7";
+ this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;
+ this.quadrant2Fill = this.quadrant2Fill || adjust_default(this.primaryColor, { r: 5, g: 5, b: 5 });
+ this.quadrant3Fill = this.quadrant3Fill || adjust_default(this.primaryColor, { r: 10, g: 10, b: 10 });
+ this.quadrant4Fill = this.quadrant4Fill || adjust_default(this.primaryColor, { r: 15, g: 15, b: 15 });
+ this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;
+ this.quadrant2TextFill = this.quadrant2TextFill || adjust_default(this.primaryTextColor, { r: -5, g: -5, b: -5 });
+ this.quadrant3TextFill = this.quadrant3TextFill || adjust_default(this.primaryTextColor, { r: -10, g: -10, b: -10 });
+ this.quadrant4TextFill = this.quadrant4TextFill || adjust_default(this.primaryTextColor, { r: -15, g: -15, b: -15 });
+ this.quadrantPointFill = this.quadrantPointFill || is_dark_default(this.quadrant1Fill) ? lighten_default(this.quadrant1Fill) : darken_default(this.quadrant1Fill);
+ this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;
+ this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;
+ this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;
+ this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;
+ this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;
+ this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;
+ this.requirementBackground = this.requirementBackground || this.primaryColor;
+ this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;
+ this.requirementBorderSize = this.requirementBorderSize || "1";
+ this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;
+ this.relationColor = this.relationColor || this.lineColor;
+ this.relationLabelBackground = this.relationLabelBackground || this.labelBackground;
+ this.relationLabelColor = this.relationLabelColor || this.actorTextColor;
+ this.git0 = this.git0 || this.primaryColor;
+ this.git1 = this.git1 || this.secondaryColor;
+ this.git2 = this.git2 || this.tertiaryColor;
+ this.git3 = this.git3 || adjust_default(this.primaryColor, { h: -30 });
+ this.git4 = this.git4 || adjust_default(this.primaryColor, { h: -60 });
+ this.git5 = this.git5 || adjust_default(this.primaryColor, { h: -90 });
+ this.git6 = this.git6 || adjust_default(this.primaryColor, { h: 60 });
+ this.git7 = this.git7 || adjust_default(this.primaryColor, { h: 120 });
+ if (this.darkMode) {
+ this.git0 = lighten_default(this.git0, 25);
+ this.git1 = lighten_default(this.git1, 25);
+ this.git2 = lighten_default(this.git2, 25);
+ this.git3 = lighten_default(this.git3, 25);
+ this.git4 = lighten_default(this.git4, 25);
+ this.git5 = lighten_default(this.git5, 25);
+ this.git6 = lighten_default(this.git6, 25);
+ this.git7 = lighten_default(this.git7, 25);
+ } else {
+ this.git0 = darken_default(this.git0, 25);
+ this.git1 = darken_default(this.git1, 25);
+ this.git2 = darken_default(this.git2, 25);
+ this.git3 = darken_default(this.git3, 25);
+ this.git4 = darken_default(this.git4, 25);
+ this.git5 = darken_default(this.git5, 25);
+ this.git6 = darken_default(this.git6, 25);
+ this.git7 = darken_default(this.git7, 25);
+ }
+ this.gitInv0 = this.gitInv0 || darken_default(invert_default(this.git0), 25);
+ this.gitInv1 = this.gitInv1 || invert_default(this.git1);
+ this.gitInv2 = this.gitInv2 || invert_default(this.git2);
+ this.gitInv3 = this.gitInv3 || invert_default(this.git3);
+ this.gitInv4 = this.gitInv4 || invert_default(this.git4);
+ this.gitInv5 = this.gitInv5 || invert_default(this.git5);
+ this.gitInv6 = this.gitInv6 || invert_default(this.git6);
+ this.gitInv7 = this.gitInv7 || invert_default(this.git7);
+ this.gitBranchLabel0 = this.gitBranchLabel0 || invert_default(this.labelTextColor);
+ this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor;
+ this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor;
+ this.gitBranchLabel3 = this.gitBranchLabel3 || invert_default(this.labelTextColor);
+ this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor;
+ this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor;
+ this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor;
+ this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor;
+ this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;
+ this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;
+ this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;
+ this.tagLabelFontSize = this.tagLabelFontSize || "10px";
+ this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;
+ this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;
+ this.commitLabelFontSize = this.commitLabelFontSize || "10px";
+ this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;
+ this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;
+ }
+ calculate(overrides) {
+ if (typeof overrides !== "object") {
+ this.updateColors();
+ return;
+ }
+ const keys = Object.keys(overrides);
+ keys.forEach((k2) => {
+ this[k2] = overrides[k2];
+ });
+ this.updateColors();
+ keys.forEach((k2) => {
+ this[k2] = overrides[k2];
+ });
+ }
+};
+var getThemeVariables$2 = (userOverrides) => {
+ const theme2 = new Theme$2();
+ theme2.calculate(userOverrides);
+ return theme2;
+};
+var Theme$1 = class Theme4 {
+ constructor() {
+ this.background = "#f4f4f4";
+ this.primaryColor = "#cde498";
+ this.secondaryColor = "#cdffb2";
+ this.background = "white";
+ this.mainBkg = "#cde498";
+ this.secondBkg = "#cdffb2";
+ this.lineColor = "green";
+ this.border1 = "#13540c";
+ this.border2 = "#6eaa49";
+ this.arrowheadColor = "green";
+ this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif';
+ this.fontSize = "16px";
+ this.tertiaryColor = lighten_default("#cde498", 10);
+ this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode);
+ this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);
+ this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);
+ this.primaryTextColor = invert_default(this.primaryColor);
+ this.secondaryTextColor = invert_default(this.secondaryColor);
+ this.tertiaryTextColor = invert_default(this.primaryColor);
+ this.lineColor = invert_default(this.background);
+ this.textColor = invert_default(this.background);
+ this.THEME_COLOR_LIMIT = 12;
+ this.nodeBkg = "calculated";
+ this.nodeBorder = "calculated";
+ this.clusterBkg = "calculated";
+ this.clusterBorder = "calculated";
+ this.defaultLinkColor = "calculated";
+ this.titleColor = "#333";
+ this.edgeLabelBackground = "#e8e8e8";
+ this.actorBorder = "calculated";
+ this.actorBkg = "calculated";
+ this.actorTextColor = "black";
+ this.actorLineColor = "grey";
+ this.signalColor = "#333";
+ this.signalTextColor = "#333";
+ this.labelBoxBkgColor = "calculated";
+ this.labelBoxBorderColor = "#326932";
+ this.labelTextColor = "calculated";
+ this.loopTextColor = "calculated";
+ this.noteBorderColor = "calculated";
+ this.noteBkgColor = "#fff5ad";
+ this.noteTextColor = "calculated";
+ this.activationBorderColor = "#666";
+ this.activationBkgColor = "#f4f4f4";
+ this.sequenceNumberColor = "white";
+ this.sectionBkgColor = "#6eaa49";
+ this.altSectionBkgColor = "white";
+ this.sectionBkgColor2 = "#6eaa49";
+ this.excludeBkgColor = "#eeeeee";
+ this.taskBorderColor = "calculated";
+ this.taskBkgColor = "#487e3a";
+ this.taskTextLightColor = "white";
+ this.taskTextColor = "calculated";
+ this.taskTextDarkColor = "black";
+ this.taskTextOutsideColor = "calculated";
+ this.taskTextClickableColor = "#003163";
+ this.activeTaskBorderColor = "calculated";
+ this.activeTaskBkgColor = "calculated";
+ this.gridColor = "lightgrey";
+ this.doneTaskBkgColor = "lightgrey";
+ this.doneTaskBorderColor = "grey";
+ this.critBorderColor = "#ff8888";
+ this.critBkgColor = "red";
+ this.todayLineColor = "red";
+ this.personBorder = this.primaryBorderColor;
+ this.personBkg = this.mainBkg;
+ this.labelColor = "black";
+ this.errorBkgColor = "#552222";
+ this.errorTextColor = "#552222";
+ }
+ updateColors() {
+ this.actorBorder = darken_default(this.mainBkg, 20);
+ this.actorBkg = this.mainBkg;
+ this.labelBoxBkgColor = this.actorBkg;
+ this.labelTextColor = this.actorTextColor;
+ this.loopTextColor = this.actorTextColor;
+ this.noteBorderColor = this.border2;
+ this.noteTextColor = this.actorTextColor;
+ this.cScale0 = this.cScale0 || this.primaryColor;
+ this.cScale1 = this.cScale1 || this.secondaryColor;
+ this.cScale2 = this.cScale2 || this.tertiaryColor;
+ this.cScale3 = this.cScale3 || adjust_default(this.primaryColor, { h: 30 });
+ this.cScale4 = this.cScale4 || adjust_default(this.primaryColor, { h: 60 });
+ this.cScale5 = this.cScale5 || adjust_default(this.primaryColor, { h: 90 });
+ this.cScale6 = this.cScale6 || adjust_default(this.primaryColor, { h: 120 });
+ this.cScale7 = this.cScale7 || adjust_default(this.primaryColor, { h: 150 });
+ this.cScale8 = this.cScale8 || adjust_default(this.primaryColor, { h: 210 });
+ this.cScale9 = this.cScale9 || adjust_default(this.primaryColor, { h: 270 });
+ this.cScale10 = this.cScale10 || adjust_default(this.primaryColor, { h: 300 });
+ this.cScale11 = this.cScale11 || adjust_default(this.primaryColor, { h: 330 });
+ this["cScalePeer1"] = this["cScalePeer1"] || darken_default(this.secondaryColor, 45);
+ this["cScalePeer2"] = this["cScalePeer2"] || darken_default(this.tertiaryColor, 40);
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
+ this["cScale" + i] = darken_default(this["cScale" + i], 10);
+ this["cScalePeer" + i] = this["cScalePeer" + i] || darken_default(this["cScale" + i], 25);
+ }
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
+ this["cScaleInv" + i] = this["cScaleInv" + i] || adjust_default(this["cScale" + i], { h: 180 });
+ }
+ this.scaleLabelColor = this.scaleLabelColor !== "calculated" && this.scaleLabelColor ? this.scaleLabelColor : this.labelTextColor;
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
+ this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor;
+ }
+ for (let i = 0; i < 5; i++) {
+ this["surface" + i] = this["surface" + i] || adjust_default(this.mainBkg, { h: 30, s: -30, l: -(5 + i * 5) });
+ this["surfacePeer" + i] = this["surfacePeer" + i] || adjust_default(this.mainBkg, { h: 30, s: -30, l: -(8 + i * 5) });
+ }
+ this.nodeBkg = this.mainBkg;
+ this.nodeBorder = this.border1;
+ this.clusterBkg = this.secondBkg;
+ this.clusterBorder = this.border2;
+ this.defaultLinkColor = this.lineColor;
+ this.taskBorderColor = this.border1;
+ this.taskTextColor = this.taskTextLightColor;
+ this.taskTextOutsideColor = this.taskTextDarkColor;
+ this.activeTaskBorderColor = this.taskBorderColor;
+ this.activeTaskBkgColor = this.mainBkg;
+ this.transitionColor = this.transitionColor || this.lineColor;
+ this.transitionLabelColor = this.transitionLabelColor || this.textColor;
+ this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;
+ this.stateBkg = this.stateBkg || this.mainBkg;
+ this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;
+ this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;
+ this.altBackground = this.altBackground || "#f0f0f0";
+ this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;
+ this.compositeBorder = this.compositeBorder || this.nodeBorder;
+ this.innerEndBackground = this.primaryBorderColor;
+ this.specialStateColor = this.lineColor;
+ this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;
+ this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;
+ this.transitionColor = this.transitionColor || this.lineColor;
+ this.classText = this.primaryTextColor;
+ this.fillType0 = this.primaryColor;
+ this.fillType1 = this.secondaryColor;
+ this.fillType2 = adjust_default(this.primaryColor, { h: 64 });
+ this.fillType3 = adjust_default(this.secondaryColor, { h: 64 });
+ this.fillType4 = adjust_default(this.primaryColor, { h: -64 });
+ this.fillType5 = adjust_default(this.secondaryColor, { h: -64 });
+ this.fillType6 = adjust_default(this.primaryColor, { h: 128 });
+ this.fillType7 = adjust_default(this.secondaryColor, { h: 128 });
+ this.pie1 = this.pie1 || this.primaryColor;
+ this.pie2 = this.pie2 || this.secondaryColor;
+ this.pie3 = this.pie3 || this.tertiaryColor;
+ this.pie4 = this.pie4 || adjust_default(this.primaryColor, { l: -30 });
+ this.pie5 = this.pie5 || adjust_default(this.secondaryColor, { l: -30 });
+ this.pie6 = this.pie6 || adjust_default(this.tertiaryColor, { h: 40, l: -40 });
+ this.pie7 = this.pie7 || adjust_default(this.primaryColor, { h: 60, l: -10 });
+ this.pie8 = this.pie8 || adjust_default(this.primaryColor, { h: -60, l: -10 });
+ this.pie9 = this.pie9 || adjust_default(this.primaryColor, { h: 120, l: 0 });
+ this.pie10 = this.pie10 || adjust_default(this.primaryColor, { h: 60, l: -50 });
+ this.pie11 = this.pie11 || adjust_default(this.primaryColor, { h: -60, l: -50 });
+ this.pie12 = this.pie12 || adjust_default(this.primaryColor, { h: 120, l: -50 });
+ this.pieTitleTextSize = this.pieTitleTextSize || "25px";
+ this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;
+ this.pieSectionTextSize = this.pieSectionTextSize || "17px";
+ this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;
+ this.pieLegendTextSize = this.pieLegendTextSize || "17px";
+ this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;
+ this.pieStrokeColor = this.pieStrokeColor || "black";
+ this.pieStrokeWidth = this.pieStrokeWidth || "2px";
+ this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px";
+ this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black";
+ this.pieOpacity = this.pieOpacity || "0.7";
+ this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;
+ this.quadrant2Fill = this.quadrant2Fill || adjust_default(this.primaryColor, { r: 5, g: 5, b: 5 });
+ this.quadrant3Fill = this.quadrant3Fill || adjust_default(this.primaryColor, { r: 10, g: 10, b: 10 });
+ this.quadrant4Fill = this.quadrant4Fill || adjust_default(this.primaryColor, { r: 15, g: 15, b: 15 });
+ this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;
+ this.quadrant2TextFill = this.quadrant2TextFill || adjust_default(this.primaryTextColor, { r: -5, g: -5, b: -5 });
+ this.quadrant3TextFill = this.quadrant3TextFill || adjust_default(this.primaryTextColor, { r: -10, g: -10, b: -10 });
+ this.quadrant4TextFill = this.quadrant4TextFill || adjust_default(this.primaryTextColor, { r: -15, g: -15, b: -15 });
+ this.quadrantPointFill = this.quadrantPointFill || is_dark_default(this.quadrant1Fill) ? lighten_default(this.quadrant1Fill) : darken_default(this.quadrant1Fill);
+ this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;
+ this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;
+ this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;
+ this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;
+ this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;
+ this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;
+ this.requirementBackground = this.requirementBackground || this.primaryColor;
+ this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;
+ this.requirementBorderSize = this.requirementBorderSize || "1";
+ this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;
+ this.relationColor = this.relationColor || this.lineColor;
+ this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground;
+ this.relationLabelColor = this.relationLabelColor || this.actorTextColor;
+ this.git0 = this.git0 || this.primaryColor;
+ this.git1 = this.git1 || this.secondaryColor;
+ this.git2 = this.git2 || this.tertiaryColor;
+ this.git3 = this.git3 || adjust_default(this.primaryColor, { h: -30 });
+ this.git4 = this.git4 || adjust_default(this.primaryColor, { h: -60 });
+ this.git5 = this.git5 || adjust_default(this.primaryColor, { h: -90 });
+ this.git6 = this.git6 || adjust_default(this.primaryColor, { h: 60 });
+ this.git7 = this.git7 || adjust_default(this.primaryColor, { h: 120 });
+ if (this.darkMode) {
+ this.git0 = lighten_default(this.git0, 25);
+ this.git1 = lighten_default(this.git1, 25);
+ this.git2 = lighten_default(this.git2, 25);
+ this.git3 = lighten_default(this.git3, 25);
+ this.git4 = lighten_default(this.git4, 25);
+ this.git5 = lighten_default(this.git5, 25);
+ this.git6 = lighten_default(this.git6, 25);
+ this.git7 = lighten_default(this.git7, 25);
+ } else {
+ this.git0 = darken_default(this.git0, 25);
+ this.git1 = darken_default(this.git1, 25);
+ this.git2 = darken_default(this.git2, 25);
+ this.git3 = darken_default(this.git3, 25);
+ this.git4 = darken_default(this.git4, 25);
+ this.git5 = darken_default(this.git5, 25);
+ this.git6 = darken_default(this.git6, 25);
+ this.git7 = darken_default(this.git7, 25);
+ }
+ this.gitInv0 = this.gitInv0 || invert_default(this.git0);
+ this.gitInv1 = this.gitInv1 || invert_default(this.git1);
+ this.gitInv2 = this.gitInv2 || invert_default(this.git2);
+ this.gitInv3 = this.gitInv3 || invert_default(this.git3);
+ this.gitInv4 = this.gitInv4 || invert_default(this.git4);
+ this.gitInv5 = this.gitInv5 || invert_default(this.git5);
+ this.gitInv6 = this.gitInv6 || invert_default(this.git6);
+ this.gitInv7 = this.gitInv7 || invert_default(this.git7);
+ this.gitBranchLabel0 = this.gitBranchLabel0 || invert_default(this.labelTextColor);
+ this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor;
+ this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor;
+ this.gitBranchLabel3 = this.gitBranchLabel3 || invert_default(this.labelTextColor);
+ this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor;
+ this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor;
+ this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor;
+ this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor;
+ this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;
+ this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;
+ this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;
+ this.tagLabelFontSize = this.tagLabelFontSize || "10px";
+ this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;
+ this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;
+ this.commitLabelFontSize = this.commitLabelFontSize || "10px";
+ this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;
+ this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;
+ }
+ calculate(overrides) {
+ if (typeof overrides !== "object") {
+ this.updateColors();
+ return;
+ }
+ const keys = Object.keys(overrides);
+ keys.forEach((k2) => {
+ this[k2] = overrides[k2];
+ });
+ this.updateColors();
+ keys.forEach((k2) => {
+ this[k2] = overrides[k2];
+ });
+ }
+};
+var getThemeVariables$1 = (userOverrides) => {
+ const theme2 = new Theme$1();
+ theme2.calculate(userOverrides);
+ return theme2;
+};
+var Theme5 = class {
+ constructor() {
+ this.primaryColor = "#eee";
+ this.contrast = "#707070";
+ this.secondaryColor = lighten_default(this.contrast, 55);
+ this.background = "#ffffff";
+ this.tertiaryColor = adjust_default(this.primaryColor, { h: -160 });
+ this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode);
+ this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);
+ this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);
+ this.primaryTextColor = invert_default(this.primaryColor);
+ this.secondaryTextColor = invert_default(this.secondaryColor);
+ this.tertiaryTextColor = invert_default(this.tertiaryColor);
+ this.lineColor = invert_default(this.background);
+ this.textColor = invert_default(this.background);
+ this.mainBkg = "#eee";
+ this.secondBkg = "calculated";
+ this.lineColor = "#666";
+ this.border1 = "#999";
+ this.border2 = "calculated";
+ this.note = "#ffa";
+ this.text = "#333";
+ this.critical = "#d42";
+ this.done = "#bbb";
+ this.arrowheadColor = "#333333";
+ this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif';
+ this.fontSize = "16px";
+ this.THEME_COLOR_LIMIT = 12;
+ this.nodeBkg = "calculated";
+ this.nodeBorder = "calculated";
+ this.clusterBkg = "calculated";
+ this.clusterBorder = "calculated";
+ this.defaultLinkColor = "calculated";
+ this.titleColor = "calculated";
+ this.edgeLabelBackground = "white";
+ this.actorBorder = "calculated";
+ this.actorBkg = "calculated";
+ this.actorTextColor = "calculated";
+ this.actorLineColor = "calculated";
+ this.signalColor = "calculated";
+ this.signalTextColor = "calculated";
+ this.labelBoxBkgColor = "calculated";
+ this.labelBoxBorderColor = "calculated";
+ this.labelTextColor = "calculated";
+ this.loopTextColor = "calculated";
+ this.noteBorderColor = "calculated";
+ this.noteBkgColor = "calculated";
+ this.noteTextColor = "calculated";
+ this.activationBorderColor = "#666";
+ this.activationBkgColor = "#f4f4f4";
+ this.sequenceNumberColor = "white";
+ this.sectionBkgColor = "calculated";
+ this.altSectionBkgColor = "white";
+ this.sectionBkgColor2 = "calculated";
+ this.excludeBkgColor = "#eeeeee";
+ this.taskBorderColor = "calculated";
+ this.taskBkgColor = "calculated";
+ this.taskTextLightColor = "white";
+ this.taskTextColor = "calculated";
+ this.taskTextDarkColor = "calculated";
+ this.taskTextOutsideColor = "calculated";
+ this.taskTextClickableColor = "#003163";
+ this.activeTaskBorderColor = "calculated";
+ this.activeTaskBkgColor = "calculated";
+ this.gridColor = "calculated";
+ this.doneTaskBkgColor = "calculated";
+ this.doneTaskBorderColor = "calculated";
+ this.critBkgColor = "calculated";
+ this.critBorderColor = "calculated";
+ this.todayLineColor = "calculated";
+ this.personBorder = this.primaryBorderColor;
+ this.personBkg = this.mainBkg;
+ this.labelColor = "black";
+ this.errorBkgColor = "#552222";
+ this.errorTextColor = "#552222";
+ }
+ updateColors() {
+ this.secondBkg = lighten_default(this.contrast, 55);
+ this.border2 = this.contrast;
+ this.actorBorder = lighten_default(this.border1, 23);
+ this.actorBkg = this.mainBkg;
+ this.actorTextColor = this.text;
+ this.actorLineColor = this.lineColor;
+ this.signalColor = this.text;
+ this.signalTextColor = this.text;
+ this.labelBoxBkgColor = this.actorBkg;
+ this.labelBoxBorderColor = this.actorBorder;
+ this.labelTextColor = this.text;
+ this.loopTextColor = this.text;
+ this.noteBorderColor = "#999";
+ this.noteBkgColor = "#666";
+ this.noteTextColor = "#fff";
+ this.cScale0 = this.cScale0 || "#555";
+ this.cScale1 = this.cScale1 || "#F4F4F4";
+ this.cScale2 = this.cScale2 || "#555";
+ this.cScale3 = this.cScale3 || "#BBB";
+ this.cScale4 = this.cScale4 || "#777";
+ this.cScale5 = this.cScale5 || "#999";
+ this.cScale6 = this.cScale6 || "#DDD";
+ this.cScale7 = this.cScale7 || "#FFF";
+ this.cScale8 = this.cScale8 || "#DDD";
+ this.cScale9 = this.cScale9 || "#BBB";
+ this.cScale10 = this.cScale10 || "#999";
+ this.cScale11 = this.cScale11 || "#777";
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
+ this["cScaleInv" + i] = this["cScaleInv" + i] || invert_default(this["cScale" + i]);
+ }
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
+ if (this.darkMode) {
+ this["cScalePeer" + i] = this["cScalePeer" + i] || lighten_default(this["cScale" + i], 10);
+ } else {
+ this["cScalePeer" + i] = this["cScalePeer" + i] || darken_default(this["cScale" + i], 10);
+ }
+ }
+ this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor);
+ this["cScaleLabel0"] = this["cScaleLabel0"] || this.cScale1;
+ this["cScaleLabel2"] = this["cScaleLabel2"] || this.cScale1;
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
+ this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor;
+ }
+ for (let i = 0; i < 5; i++) {
+ this["surface" + i] = this["surface" + i] || adjust_default(this.mainBkg, { l: -(5 + i * 5) });
+ this["surfacePeer" + i] = this["surfacePeer" + i] || adjust_default(this.mainBkg, { l: -(8 + i * 5) });
+ }
+ this.nodeBkg = this.mainBkg;
+ this.nodeBorder = this.border1;
+ this.clusterBkg = this.secondBkg;
+ this.clusterBorder = this.border2;
+ this.defaultLinkColor = this.lineColor;
+ this.titleColor = this.text;
+ this.sectionBkgColor = lighten_default(this.contrast, 30);
+ this.sectionBkgColor2 = lighten_default(this.contrast, 30);
+ this.taskBorderColor = darken_default(this.contrast, 10);
+ this.taskBkgColor = this.contrast;
+ this.taskTextColor = this.taskTextLightColor;
+ this.taskTextDarkColor = this.text;
+ this.taskTextOutsideColor = this.taskTextDarkColor;
+ this.activeTaskBorderColor = this.taskBorderColor;
+ this.activeTaskBkgColor = this.mainBkg;
+ this.gridColor = lighten_default(this.border1, 30);
+ this.doneTaskBkgColor = this.done;
+ this.doneTaskBorderColor = this.lineColor;
+ this.critBkgColor = this.critical;
+ this.critBorderColor = darken_default(this.critBkgColor, 10);
+ this.todayLineColor = this.critBkgColor;
+ this.transitionColor = this.transitionColor || "#000";
+ this.transitionLabelColor = this.transitionLabelColor || this.textColor;
+ this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;
+ this.stateBkg = this.stateBkg || this.mainBkg;
+ this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;
+ this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;
+ this.altBackground = this.altBackground || "#f4f4f4";
+ this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;
+ this.stateBorder = this.stateBorder || "#000";
+ this.innerEndBackground = this.primaryBorderColor;
+ this.specialStateColor = "#222";
+ this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;
+ this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;
+ this.classText = this.primaryTextColor;
+ this.fillType0 = this.primaryColor;
+ this.fillType1 = this.secondaryColor;
+ this.fillType2 = adjust_default(this.primaryColor, { h: 64 });
+ this.fillType3 = adjust_default(this.secondaryColor, { h: 64 });
+ this.fillType4 = adjust_default(this.primaryColor, { h: -64 });
+ this.fillType5 = adjust_default(this.secondaryColor, { h: -64 });
+ this.fillType6 = adjust_default(this.primaryColor, { h: 128 });
+ this.fillType7 = adjust_default(this.secondaryColor, { h: 128 });
+ for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
+ this["pie" + i] = this["cScale" + i];
+ }
+ this.pie12 = this.pie0;
+ this.pieTitleTextSize = this.pieTitleTextSize || "25px";
+ this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;
+ this.pieSectionTextSize = this.pieSectionTextSize || "17px";
+ this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;
+ this.pieLegendTextSize = this.pieLegendTextSize || "17px";
+ this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;
+ this.pieStrokeColor = this.pieStrokeColor || "black";
+ this.pieStrokeWidth = this.pieStrokeWidth || "2px";
+ this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px";
+ this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black";
+ this.pieOpacity = this.pieOpacity || "0.7";
+ this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;
+ this.quadrant2Fill = this.quadrant2Fill || adjust_default(this.primaryColor, { r: 5, g: 5, b: 5 });
+ this.quadrant3Fill = this.quadrant3Fill || adjust_default(this.primaryColor, { r: 10, g: 10, b: 10 });
+ this.quadrant4Fill = this.quadrant4Fill || adjust_default(this.primaryColor, { r: 15, g: 15, b: 15 });
+ this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;
+ this.quadrant2TextFill = this.quadrant2TextFill || adjust_default(this.primaryTextColor, { r: -5, g: -5, b: -5 });
+ this.quadrant3TextFill = this.quadrant3TextFill || adjust_default(this.primaryTextColor, { r: -10, g: -10, b: -10 });
+ this.quadrant4TextFill = this.quadrant4TextFill || adjust_default(this.primaryTextColor, { r: -15, g: -15, b: -15 });
+ this.quadrantPointFill = this.quadrantPointFill || is_dark_default(this.quadrant1Fill) ? lighten_default(this.quadrant1Fill) : darken_default(this.quadrant1Fill);
+ this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;
+ this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;
+ this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;
+ this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;
+ this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;
+ this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;
+ this.requirementBackground = this.requirementBackground || this.primaryColor;
+ this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;
+ this.requirementBorderSize = this.requirementBorderSize || "1";
+ this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;
+ this.relationColor = this.relationColor || this.lineColor;
+ this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground;
+ this.relationLabelColor = this.relationLabelColor || this.actorTextColor;
+ this.git0 = darken_default(this.pie1, 25) || this.primaryColor;
+ this.git1 = this.pie2 || this.secondaryColor;
+ this.git2 = this.pie3 || this.tertiaryColor;
+ this.git3 = this.pie4 || adjust_default(this.primaryColor, { h: -30 });
+ this.git4 = this.pie5 || adjust_default(this.primaryColor, { h: -60 });
+ this.git5 = this.pie6 || adjust_default(this.primaryColor, { h: -90 });
+ this.git6 = this.pie7 || adjust_default(this.primaryColor, { h: 60 });
+ this.git7 = this.pie8 || adjust_default(this.primaryColor, { h: 120 });
+ this.gitInv0 = this.gitInv0 || invert_default(this.git0);
+ this.gitInv1 = this.gitInv1 || invert_default(this.git1);
+ this.gitInv2 = this.gitInv2 || invert_default(this.git2);
+ this.gitInv3 = this.gitInv3 || invert_default(this.git3);
+ this.gitInv4 = this.gitInv4 || invert_default(this.git4);
+ this.gitInv5 = this.gitInv5 || invert_default(this.git5);
+ this.gitInv6 = this.gitInv6 || invert_default(this.git6);
+ this.gitInv7 = this.gitInv7 || invert_default(this.git7);
+ this.branchLabelColor = this.branchLabelColor || this.labelTextColor;
+ this.gitBranchLabel0 = this.branchLabelColor;
+ this.gitBranchLabel1 = "white";
+ this.gitBranchLabel2 = this.branchLabelColor;
+ this.gitBranchLabel3 = "white";
+ this.gitBranchLabel4 = this.branchLabelColor;
+ this.gitBranchLabel5 = this.branchLabelColor;
+ this.gitBranchLabel6 = this.branchLabelColor;
+ this.gitBranchLabel7 = this.branchLabelColor;
+ this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;
+ this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;
+ this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;
+ this.tagLabelFontSize = this.tagLabelFontSize || "10px";
+ this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;
+ this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;
+ this.commitLabelFontSize = this.commitLabelFontSize || "10px";
+ this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;
+ this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;
+ }
+ calculate(overrides) {
+ if (typeof overrides !== "object") {
+ this.updateColors();
+ return;
+ }
+ const keys = Object.keys(overrides);
+ keys.forEach((k2) => {
+ this[k2] = overrides[k2];
+ });
+ this.updateColors();
+ keys.forEach((k2) => {
+ this[k2] = overrides[k2];
+ });
+ }
+};
+var getThemeVariables = (userOverrides) => {
+ const theme2 = new Theme5();
+ theme2.calculate(userOverrides);
+ return theme2;
+};
+var theme = {
+ base: {
+ getThemeVariables: getThemeVariables$4
+ },
+ dark: {
+ getThemeVariables: getThemeVariables$3
+ },
+ default: {
+ getThemeVariables: getThemeVariables$2
+ },
+ forest: {
+ getThemeVariables: getThemeVariables$1
+ },
+ neutral: {
+ getThemeVariables
+ }
+};
+var defaultConfigJson = {
+ "flowchart": {
+ "useMaxWidth": true,
+ "titleTopMargin": 25,
+ "diagramPadding": 8,
+ "htmlLabels": true,
+ "nodeSpacing": 50,
+ "rankSpacing": 50,
+ "curve": "basis",
+ "padding": 15,
+ "defaultRenderer": "dagre-wrapper",
+ "wrappingWidth": 200
+ },
+ "sequence": {
+ "useMaxWidth": true,
+ "hideUnusedParticipants": false,
+ "activationWidth": 10,
+ "diagramMarginX": 50,
+ "diagramMarginY": 10,
+ "actorMargin": 50,
+ "width": 150,
+ "height": 65,
+ "boxMargin": 10,
+ "boxTextMargin": 5,
+ "noteMargin": 10,
+ "messageMargin": 35,
+ "messageAlign": "center",
+ "mirrorActors": true,
+ "forceMenus": false,
+ "bottomMarginAdj": 1,
+ "rightAngles": false,
+ "showSequenceNumbers": false,
+ "actorFontSize": 14,
+ "actorFontFamily": '"Open Sans", sans-serif',
+ "actorFontWeight": 400,
+ "noteFontSize": 14,
+ "noteFontFamily": '"trebuchet ms", verdana, arial, sans-serif',
+ "noteFontWeight": 400,
+ "noteAlign": "center",
+ "messageFontSize": 16,
+ "messageFontFamily": '"trebuchet ms", verdana, arial, sans-serif',
+ "messageFontWeight": 400,
+ "wrap": false,
+ "wrapPadding": 10,
+ "labelBoxWidth": 50,
+ "labelBoxHeight": 20
+ },
+ "gantt": {
+ "useMaxWidth": true,
+ "titleTopMargin": 25,
+ "barHeight": 20,
+ "barGap": 4,
+ "topPadding": 50,
+ "rightPadding": 75,
+ "leftPadding": 75,
+ "gridLineStartPadding": 35,
+ "fontSize": 11,
+ "sectionFontSize": 11,
+ "numberSectionStyles": 4,
+ "axisFormat": "%Y-%m-%d",
+ "topAxis": false,
+ "displayMode": "",
+ "weekday": "sunday"
+ },
+ "journey": {
+ "useMaxWidth": true,
+ "diagramMarginX": 50,
+ "diagramMarginY": 10,
+ "leftMargin": 150,
+ "width": 150,
+ "height": 50,
+ "boxMargin": 10,
+ "boxTextMargin": 5,
+ "noteMargin": 10,
+ "messageMargin": 35,
+ "messageAlign": "center",
+ "bottomMarginAdj": 1,
+ "rightAngles": false,
+ "taskFontSize": 14,
+ "taskFontFamily": '"Open Sans", sans-serif',
+ "taskMargin": 50,
+ "activationWidth": 10,
+ "textPlacement": "fo",
+ "actorColours": [
+ "#8FBC8F",
+ "#7CFC00",
+ "#00FFFF",
+ "#20B2AA",
+ "#B0E0E6",
+ "#FFFFE0"
+ ],
+ "sectionFills": [
+ "#191970",
+ "#8B008B",
+ "#4B0082",
+ "#2F4F4F",
+ "#800000",
+ "#8B4513",
+ "#00008B"
+ ],
+ "sectionColours": [
+ "#fff"
+ ]
+ },
+ "class": {
+ "useMaxWidth": true,
+ "titleTopMargin": 25,
+ "arrowMarkerAbsolute": false,
+ "dividerMargin": 10,
+ "padding": 5,
+ "textHeight": 10,
+ "defaultRenderer": "dagre-wrapper",
+ "htmlLabels": false
+ },
+ "state": {
+ "useMaxWidth": true,
+ "titleTopMargin": 25,
+ "dividerMargin": 10,
+ "sizeUnit": 5,
+ "padding": 8,
+ "textHeight": 10,
+ "titleShift": -15,
+ "noteMargin": 10,
+ "forkWidth": 70,
+ "forkHeight": 7,
+ "miniPadding": 2,
+ "fontSizeFactor": 5.02,
+ "fontSize": 24,
+ "labelHeight": 16,
+ "edgeLengthFactor": "20",
+ "compositTitleSize": 35,
+ "radius": 5,
+ "defaultRenderer": "dagre-wrapper"
+ },
+ "er": {
+ "useMaxWidth": true,
+ "titleTopMargin": 25,
+ "diagramPadding": 20,
+ "layoutDirection": "TB",
+ "minEntityWidth": 100,
+ "minEntityHeight": 75,
+ "entityPadding": 15,
+ "stroke": "gray",
+ "fill": "honeydew",
+ "fontSize": 12
+ },
+ "pie": {
+ "useMaxWidth": true,
+ "textPosition": 0.75
+ },
+ "quadrantChart": {
+ "useMaxWidth": true,
+ "chartWidth": 500,
+ "chartHeight": 500,
+ "titleFontSize": 20,
+ "titlePadding": 10,
+ "quadrantPadding": 5,
+ "xAxisLabelPadding": 5,
+ "yAxisLabelPadding": 5,
+ "xAxisLabelFontSize": 16,
+ "yAxisLabelFontSize": 16,
+ "quadrantLabelFontSize": 16,
+ "quadrantTextTopPadding": 5,
+ "pointTextPadding": 5,
+ "pointLabelFontSize": 12,
+ "pointRadius": 5,
+ "xAxisPosition": "top",
+ "yAxisPosition": "left",
+ "quadrantInternalBorderStrokeWidth": 1,
+ "quadrantExternalBorderStrokeWidth": 2
+ },
+ "requirement": {
+ "useMaxWidth": true,
+ "rect_fill": "#f9f9f9",
+ "text_color": "#333",
+ "rect_border_size": "0.5px",
+ "rect_border_color": "#bbb",
+ "rect_min_width": 200,
+ "rect_min_height": 200,
+ "fontSize": 14,
+ "rect_padding": 10,
+ "line_height": 20
+ },
+ "mindmap": {
+ "useMaxWidth": true,
+ "padding": 10,
+ "maxNodeWidth": 200
+ },
+ "timeline": {
+ "useMaxWidth": true,
+ "diagramMarginX": 50,
+ "diagramMarginY": 10,
+ "leftMargin": 150,
+ "width": 150,
+ "height": 50,
+ "boxMargin": 10,
+ "boxTextMargin": 5,
+ "noteMargin": 10,
+ "messageMargin": 35,
+ "messageAlign": "center",
+ "bottomMarginAdj": 1,
+ "rightAngles": false,
+ "taskFontSize": 14,
+ "taskFontFamily": '"Open Sans", sans-serif',
+ "taskMargin": 50,
+ "activationWidth": 10,
+ "textPlacement": "fo",
+ "actorColours": [
+ "#8FBC8F",
+ "#7CFC00",
+ "#00FFFF",
+ "#20B2AA",
+ "#B0E0E6",
+ "#FFFFE0"
+ ],
+ "sectionFills": [
+ "#191970",
+ "#8B008B",
+ "#4B0082",
+ "#2F4F4F",
+ "#800000",
+ "#8B4513",
+ "#00008B"
+ ],
+ "sectionColours": [
+ "#fff"
+ ],
+ "disableMulticolor": false
+ },
+ "gitGraph": {
+ "useMaxWidth": true,
+ "titleTopMargin": 25,
+ "diagramPadding": 8,
+ "nodeLabel": {
+ "width": 75,
+ "height": 100,
+ "x": -25,
+ "y": 0
+ },
+ "mainBranchName": "main",
+ "mainBranchOrder": 0,
+ "showCommitLabel": true,
+ "showBranches": true,
+ "rotateCommitLabel": true,
+ "arrowMarkerAbsolute": false
+ },
+ "c4": {
+ "useMaxWidth": true,
+ "diagramMarginX": 50,
+ "diagramMarginY": 10,
+ "c4ShapeMargin": 50,
+ "c4ShapePadding": 20,
+ "width": 216,
+ "height": 60,
+ "boxMargin": 10,
+ "c4ShapeInRow": 4,
+ "nextLinePaddingX": 0,
+ "c4BoundaryInRow": 2,
+ "personFontSize": 14,
+ "personFontFamily": '"Open Sans", sans-serif',
+ "personFontWeight": "normal",
+ "external_personFontSize": 14,
+ "external_personFontFamily": '"Open Sans", sans-serif',
+ "external_personFontWeight": "normal",
+ "systemFontSize": 14,
+ "systemFontFamily": '"Open Sans", sans-serif',
+ "systemFontWeight": "normal",
+ "external_systemFontSize": 14,
+ "external_systemFontFamily": '"Open Sans", sans-serif',
+ "external_systemFontWeight": "normal",
+ "system_dbFontSize": 14,
+ "system_dbFontFamily": '"Open Sans", sans-serif',
+ "system_dbFontWeight": "normal",
+ "external_system_dbFontSize": 14,
+ "external_system_dbFontFamily": '"Open Sans", sans-serif',
+ "external_system_dbFontWeight": "normal",
+ "system_queueFontSize": 14,
+ "system_queueFontFamily": '"Open Sans", sans-serif',
+ "system_queueFontWeight": "normal",
+ "external_system_queueFontSize": 14,
+ "external_system_queueFontFamily": '"Open Sans", sans-serif',
+ "external_system_queueFontWeight": "normal",
+ "boundaryFontSize": 14,
+ "boundaryFontFamily": '"Open Sans", sans-serif',
+ "boundaryFontWeight": "normal",
+ "messageFontSize": 12,
+ "messageFontFamily": '"Open Sans", sans-serif',
+ "messageFontWeight": "normal",
+ "containerFontSize": 14,
+ "containerFontFamily": '"Open Sans", sans-serif',
+ "containerFontWeight": "normal",
+ "external_containerFontSize": 14,
+ "external_containerFontFamily": '"Open Sans", sans-serif',
+ "external_containerFontWeight": "normal",
+ "container_dbFontSize": 14,
+ "container_dbFontFamily": '"Open Sans", sans-serif',
+ "container_dbFontWeight": "normal",
+ "external_container_dbFontSize": 14,
+ "external_container_dbFontFamily": '"Open Sans", sans-serif',
+ "external_container_dbFontWeight": "normal",
+ "container_queueFontSize": 14,
+ "container_queueFontFamily": '"Open Sans", sans-serif',
+ "container_queueFontWeight": "normal",
+ "external_container_queueFontSize": 14,
+ "external_container_queueFontFamily": '"Open Sans", sans-serif',
+ "external_container_queueFontWeight": "normal",
+ "componentFontSize": 14,
+ "componentFontFamily": '"Open Sans", sans-serif',
+ "componentFontWeight": "normal",
+ "external_componentFontSize": 14,
+ "external_componentFontFamily": '"Open Sans", sans-serif',
+ "external_componentFontWeight": "normal",
+ "component_dbFontSize": 14,
+ "component_dbFontFamily": '"Open Sans", sans-serif',
+ "component_dbFontWeight": "normal",
+ "external_component_dbFontSize": 14,
+ "external_component_dbFontFamily": '"Open Sans", sans-serif',
+ "external_component_dbFontWeight": "normal",
+ "component_queueFontSize": 14,
+ "component_queueFontFamily": '"Open Sans", sans-serif',
+ "component_queueFontWeight": "normal",
+ "external_component_queueFontSize": 14,
+ "external_component_queueFontFamily": '"Open Sans", sans-serif',
+ "external_component_queueFontWeight": "normal",
+ "wrap": true,
+ "wrapPadding": 10,
+ "person_bg_color": "#08427B",
+ "person_border_color": "#073B6F",
+ "external_person_bg_color": "#686868",
+ "external_person_border_color": "#8A8A8A",
+ "system_bg_color": "#1168BD",
+ "system_border_color": "#3C7FC0",
+ "system_db_bg_color": "#1168BD",
+ "system_db_border_color": "#3C7FC0",
+ "system_queue_bg_color": "#1168BD",
+ "system_queue_border_color": "#3C7FC0",
+ "external_system_bg_color": "#999999",
+ "external_system_border_color": "#8A8A8A",
+ "external_system_db_bg_color": "#999999",
+ "external_system_db_border_color": "#8A8A8A",
+ "external_system_queue_bg_color": "#999999",
+ "external_system_queue_border_color": "#8A8A8A",
+ "container_bg_color": "#438DD5",
+ "container_border_color": "#3C7FC0",
+ "container_db_bg_color": "#438DD5",
+ "container_db_border_color": "#3C7FC0",
+ "container_queue_bg_color": "#438DD5",
+ "container_queue_border_color": "#3C7FC0",
+ "external_container_bg_color": "#B3B3B3",
+ "external_container_border_color": "#A6A6A6",
+ "external_container_db_bg_color": "#B3B3B3",
+ "external_container_db_border_color": "#A6A6A6",
+ "external_container_queue_bg_color": "#B3B3B3",
+ "external_container_queue_border_color": "#A6A6A6",
+ "component_bg_color": "#85BBF0",
+ "component_border_color": "#78A8D8",
+ "component_db_bg_color": "#85BBF0",
+ "component_db_border_color": "#78A8D8",
+ "component_queue_bg_color": "#85BBF0",
+ "component_queue_border_color": "#78A8D8",
+ "external_component_bg_color": "#CCCCCC",
+ "external_component_border_color": "#BFBFBF",
+ "external_component_db_bg_color": "#CCCCCC",
+ "external_component_db_border_color": "#BFBFBF",
+ "external_component_queue_bg_color": "#CCCCCC",
+ "external_component_queue_border_color": "#BFBFBF"
+ },
+ "sankey": {
+ "useMaxWidth": true,
+ "width": 600,
+ "height": 400,
+ "linkColor": "gradient",
+ "nodeAlignment": "justify"
+ },
+ "theme": "default",
+ "maxTextSize": 5e4,
+ "darkMode": false,
+ "fontFamily": '"trebuchet ms", verdana, arial, sans-serif;',
+ "logLevel": 5,
+ "securityLevel": "strict",
+ "startOnLoad": true,
+ "arrowMarkerAbsolute": false,
+ "secure": [
+ "secure",
+ "securityLevel",
+ "startOnLoad",
+ "maxTextSize"
+ ],
+ "deterministicIds": false,
+ "fontSize": 16
+};
+var config = {
+ ...defaultConfigJson,
+ // Set, even though they're `undefined` so that `configKeys` finds these keys
+ // TODO: Should we replace these with `null` so that they can go in the JSON Schema?
+ deterministicIDSeed: void 0,
+ themeCSS: void 0,
+ // add non-JSON default config values
+ themeVariables: theme["default"].getThemeVariables(),
+ sequence: {
+ ...defaultConfigJson.sequence,
+ messageFont: function() {
+ return {
+ fontFamily: this.messageFontFamily,
+ fontSize: this.messageFontSize,
+ fontWeight: this.messageFontWeight
+ };
+ },
+ noteFont: function() {
+ return {
+ fontFamily: this.noteFontFamily,
+ fontSize: this.noteFontSize,
+ fontWeight: this.noteFontWeight
+ };
+ },
+ actorFont: function() {
+ return {
+ fontFamily: this.actorFontFamily,
+ fontSize: this.actorFontSize,
+ fontWeight: this.actorFontWeight
+ };
+ }
+ },
+ gantt: {
+ ...defaultConfigJson.gantt,
+ tickInterval: void 0,
+ useWidth: void 0
+ // can probably be removed since `configKeys` already includes this
+ },
+ c4: {
+ ...defaultConfigJson.c4,
+ useWidth: void 0,
+ personFont: function() {
+ return {
+ fontFamily: this.personFontFamily,
+ fontSize: this.personFontSize,
+ fontWeight: this.personFontWeight
+ };
+ },
+ external_personFont: function() {
+ return {
+ fontFamily: this.external_personFontFamily,
+ fontSize: this.external_personFontSize,
+ fontWeight: this.external_personFontWeight
+ };
+ },
+ systemFont: function() {
+ return {
+ fontFamily: this.systemFontFamily,
+ fontSize: this.systemFontSize,
+ fontWeight: this.systemFontWeight
+ };
+ },
+ external_systemFont: function() {
+ return {
+ fontFamily: this.external_systemFontFamily,
+ fontSize: this.external_systemFontSize,
+ fontWeight: this.external_systemFontWeight
+ };
+ },
+ system_dbFont: function() {
+ return {
+ fontFamily: this.system_dbFontFamily,
+ fontSize: this.system_dbFontSize,
+ fontWeight: this.system_dbFontWeight
+ };
+ },
+ external_system_dbFont: function() {
+ return {
+ fontFamily: this.external_system_dbFontFamily,
+ fontSize: this.external_system_dbFontSize,
+ fontWeight: this.external_system_dbFontWeight
+ };
+ },
+ system_queueFont: function() {
+ return {
+ fontFamily: this.system_queueFontFamily,
+ fontSize: this.system_queueFontSize,
+ fontWeight: this.system_queueFontWeight
+ };
+ },
+ external_system_queueFont: function() {
+ return {
+ fontFamily: this.external_system_queueFontFamily,
+ fontSize: this.external_system_queueFontSize,
+ fontWeight: this.external_system_queueFontWeight
+ };
+ },
+ containerFont: function() {
+ return {
+ fontFamily: this.containerFontFamily,
+ fontSize: this.containerFontSize,
+ fontWeight: this.containerFontWeight
+ };
+ },
+ external_containerFont: function() {
+ return {
+ fontFamily: this.external_containerFontFamily,
+ fontSize: this.external_containerFontSize,
+ fontWeight: this.external_containerFontWeight
+ };
+ },
+ container_dbFont: function() {
+ return {
+ fontFamily: this.container_dbFontFamily,
+ fontSize: this.container_dbFontSize,
+ fontWeight: this.container_dbFontWeight
+ };
+ },
+ external_container_dbFont: function() {
+ return {
+ fontFamily: this.external_container_dbFontFamily,
+ fontSize: this.external_container_dbFontSize,
+ fontWeight: this.external_container_dbFontWeight
+ };
+ },
+ container_queueFont: function() {
+ return {
+ fontFamily: this.container_queueFontFamily,
+ fontSize: this.container_queueFontSize,
+ fontWeight: this.container_queueFontWeight
+ };
+ },
+ external_container_queueFont: function() {
+ return {
+ fontFamily: this.external_container_queueFontFamily,
+ fontSize: this.external_container_queueFontSize,
+ fontWeight: this.external_container_queueFontWeight
+ };
+ },
+ componentFont: function() {
+ return {
+ fontFamily: this.componentFontFamily,
+ fontSize: this.componentFontSize,
+ fontWeight: this.componentFontWeight
+ };
+ },
+ external_componentFont: function() {
+ return {
+ fontFamily: this.external_componentFontFamily,
+ fontSize: this.external_componentFontSize,
+ fontWeight: this.external_componentFontWeight
+ };
+ },
+ component_dbFont: function() {
+ return {
+ fontFamily: this.component_dbFontFamily,
+ fontSize: this.component_dbFontSize,
+ fontWeight: this.component_dbFontWeight
+ };
+ },
+ external_component_dbFont: function() {
+ return {
+ fontFamily: this.external_component_dbFontFamily,
+ fontSize: this.external_component_dbFontSize,
+ fontWeight: this.external_component_dbFontWeight
+ };
+ },
+ component_queueFont: function() {
+ return {
+ fontFamily: this.component_queueFontFamily,
+ fontSize: this.component_queueFontSize,
+ fontWeight: this.component_queueFontWeight
+ };
+ },
+ external_component_queueFont: function() {
+ return {
+ fontFamily: this.external_component_queueFontFamily,
+ fontSize: this.external_component_queueFontSize,
+ fontWeight: this.external_component_queueFontWeight
+ };
+ },
+ boundaryFont: function() {
+ return {
+ fontFamily: this.boundaryFontFamily,
+ fontSize: this.boundaryFontSize,
+ fontWeight: this.boundaryFontWeight
+ };
+ },
+ messageFont: function() {
+ return {
+ fontFamily: this.messageFontFamily,
+ fontSize: this.messageFontSize,
+ fontWeight: this.messageFontWeight
+ };
+ }
+ },
+ pie: {
+ ...defaultConfigJson.pie,
+ useWidth: void 0
+ },
+ requirement: {
+ ...defaultConfigJson.requirement,
+ useWidth: void 0
+ },
+ gitGraph: {
+ ...defaultConfigJson.gitGraph,
+ // TODO: This is a temporary override for `gitGraph`, since every other
+ // diagram does have `useMaxWidth`, but instead sets it to `true`.
+ // Should we set this to `true` instead?
+ useMaxWidth: false
+ },
+ sankey: {
+ ...defaultConfigJson.sankey,
+ // this is false, unlike every other diagram (other than gitGraph)
+ // TODO: can we make this default to `true` instead?
+ useMaxWidth: false
+ }
+};
+var keyify = (obj, prefix2 = "") => Object.keys(obj).reduce((res, el) => {
+ if (Array.isArray(obj[el])) {
+ return res;
+ } else if (typeof obj[el] === "object" && obj[el] !== null) {
+ return [...res, prefix2 + el, ...keyify(obj[el], "")];
+ }
+ return [...res, prefix2 + el];
+}, []);
+var configKeys = keyify(config, "");
+var defaultConfig$1 = config;
+function isNothing(subject) {
+ return typeof subject === "undefined" || subject === null;
+}
+function isObject2(subject) {
+ return typeof subject === "object" && subject !== null;
+}
+function toArray(sequence2) {
+ if (Array.isArray(sequence2))
+ return sequence2;
+ else if (isNothing(sequence2))
+ return [];
+ return [sequence2];
+}
+function extend2(target, source) {
+ var index2, length2, key, sourceKeys;
+ if (source) {
+ sourceKeys = Object.keys(source);
+ for (index2 = 0, length2 = sourceKeys.length; index2 < length2; index2 += 1) {
+ key = sourceKeys[index2];
+ target[key] = source[key];
+ }
+ }
+ return target;
+}
+function repeat(string, count3) {
+ var result = "", cycle;
+ for (cycle = 0; cycle < count3; cycle += 1) {
+ result += string;
+ }
+ return result;
+}
+function isNegativeZero(number5) {
+ return number5 === 0 && Number.NEGATIVE_INFINITY === 1 / number5;
+}
+var isNothing_1 = isNothing;
+var isObject_1 = isObject2;
+var toArray_1 = toArray;
+var repeat_1 = repeat;
+var isNegativeZero_1 = isNegativeZero;
+var extend_1 = extend2;
+var common = {
+ isNothing: isNothing_1,
+ isObject: isObject_1,
+ toArray: toArray_1,
+ repeat: repeat_1,
+ isNegativeZero: isNegativeZero_1,
+ extend: extend_1
+};
+function formatError(exception2, compact) {
+ var where = "", message = exception2.reason || "(unknown reason)";
+ if (!exception2.mark)
+ return message;
+ if (exception2.mark.name) {
+ where += 'in "' + exception2.mark.name + '" ';
+ }
+ where += "(" + (exception2.mark.line + 1) + ":" + (exception2.mark.column + 1) + ")";
+ if (!compact && exception2.mark.snippet) {
+ where += "\n\n" + exception2.mark.snippet;
+ }
+ return message + " " + where;
+}
+function YAMLException$1(reason, mark) {
+ Error.call(this);
+ this.name = "YAMLException";
+ this.reason = reason;
+ this.mark = mark;
+ this.message = formatError(this, false);
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ this.stack = new Error().stack || "";
+ }
+}
+YAMLException$1.prototype = Object.create(Error.prototype);
+YAMLException$1.prototype.constructor = YAMLException$1;
+YAMLException$1.prototype.toString = function toString(compact) {
+ return this.name + ": " + formatError(this, compact);
+};
+var exception = YAMLException$1;
+function getLine(buffer, lineStart, lineEnd, position2, maxLineLength) {
+ var head = "";
+ var tail = "";
+ var maxHalfLength = Math.floor(maxLineLength / 2) - 1;
+ if (position2 - lineStart > maxHalfLength) {
+ head = " ... ";
+ lineStart = position2 - maxHalfLength + head.length;
+ }
+ if (lineEnd - position2 > maxHalfLength) {
+ tail = " ...";
+ lineEnd = position2 + maxHalfLength - tail.length;
+ }
+ return {
+ str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "→") + tail,
+ pos: position2 - lineStart + head.length
+ // relative position
+ };
+}
+function padStart(string, max5) {
+ return common.repeat(" ", max5 - string.length) + string;
+}
+function makeSnippet(mark, options) {
+ options = Object.create(options || null);
+ if (!mark.buffer)
+ return null;
+ if (!options.maxLength)
+ options.maxLength = 79;
+ if (typeof options.indent !== "number")
+ options.indent = 1;
+ if (typeof options.linesBefore !== "number")
+ options.linesBefore = 3;
+ if (typeof options.linesAfter !== "number")
+ options.linesAfter = 2;
+ var re2 = /\r?\n|\r|\0/g;
+ var lineStarts = [0];
+ var lineEnds = [];
+ var match2;
+ var foundLineNo = -1;
+ while (match2 = re2.exec(mark.buffer)) {
+ lineEnds.push(match2.index);
+ lineStarts.push(match2.index + match2[0].length);
+ if (mark.position <= match2.index && foundLineNo < 0) {
+ foundLineNo = lineStarts.length - 2;
+ }
+ }
+ if (foundLineNo < 0)
+ foundLineNo = lineStarts.length - 1;
+ var result = "", i, line2;
+ var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;
+ var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);
+ for (i = 1; i <= options.linesBefore; i++) {
+ if (foundLineNo - i < 0)
+ break;
+ line2 = getLine(
+ mark.buffer,
+ lineStarts[foundLineNo - i],
+ lineEnds[foundLineNo - i],
+ mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),
+ maxLineLength
+ );
+ result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line2.str + "\n" + result;
+ }
+ line2 = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
+ result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line2.str + "\n";
+ result += common.repeat("-", options.indent + lineNoLength + 3 + line2.pos) + "^\n";
+ for (i = 1; i <= options.linesAfter; i++) {
+ if (foundLineNo + i >= lineEnds.length)
+ break;
+ line2 = getLine(
+ mark.buffer,
+ lineStarts[foundLineNo + i],
+ lineEnds[foundLineNo + i],
+ mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),
+ maxLineLength
+ );
+ result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line2.str + "\n";
+ }
+ return result.replace(/\n$/, "");
+}
+var snippet = makeSnippet;
+var TYPE_CONSTRUCTOR_OPTIONS = [
+ "kind",
+ "multi",
+ "resolve",
+ "construct",
+ "instanceOf",
+ "predicate",
+ "represent",
+ "representName",
+ "defaultStyle",
+ "styleAliases"
+];
+var YAML_NODE_KINDS = [
+ "scalar",
+ "sequence",
+ "mapping"
+];
+function compileStyleAliases(map22) {
+ var result = {};
+ if (map22 !== null) {
+ Object.keys(map22).forEach(function(style) {
+ map22[style].forEach(function(alias) {
+ result[String(alias)] = style;
+ });
+ });
+ }
+ return result;
+}
+function Type$1(tag, options) {
+ options = options || {};
+ Object.keys(options).forEach(function(name) {
+ if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
+ throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
+ }
+ });
+ this.options = options;
+ this.tag = tag;
+ this.kind = options["kind"] || null;
+ this.resolve = options["resolve"] || function() {
+ return true;
+ };
+ this.construct = options["construct"] || function(data) {
+ return data;
+ };
+ this.instanceOf = options["instanceOf"] || null;
+ this.predicate = options["predicate"] || null;
+ this.represent = options["represent"] || null;
+ this.representName = options["representName"] || null;
+ this.defaultStyle = options["defaultStyle"] || null;
+ this.multi = options["multi"] || false;
+ this.styleAliases = compileStyleAliases(options["styleAliases"] || null);
+ if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
+ throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
+ }
+}
+var type2 = Type$1;
+function compileList(schema2, name) {
+ var result = [];
+ schema2[name].forEach(function(currentType) {
+ var newIndex = result.length;
+ result.forEach(function(previousType, previousIndex) {
+ if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) {
+ newIndex = previousIndex;
+ }
+ });
+ result[newIndex] = currentType;
+ });
+ return result;
+}
+function compileMap() {
+ var result = {
+ scalar: {},
+ sequence: {},
+ mapping: {},
+ fallback: {},
+ multi: {
+ scalar: [],
+ sequence: [],
+ mapping: [],
+ fallback: []
+ }
+ }, index2, length2;
+ function collectType(type22) {
+ if (type22.multi) {
+ result.multi[type22.kind].push(type22);
+ result.multi["fallback"].push(type22);
+ } else {
+ result[type22.kind][type22.tag] = result["fallback"][type22.tag] = type22;
+ }
+ }
+ for (index2 = 0, length2 = arguments.length; index2 < length2; index2 += 1) {
+ arguments[index2].forEach(collectType);
+ }
+ return result;
+}
+function Schema$1(definition) {
+ return this.extend(definition);
+}
+Schema$1.prototype.extend = function extend22(definition) {
+ var implicit2 = [];
+ var explicit = [];
+ if (definition instanceof type2) {
+ explicit.push(definition);
+ } else if (Array.isArray(definition)) {
+ explicit = explicit.concat(definition);
+ } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
+ if (definition.implicit)
+ implicit2 = implicit2.concat(definition.implicit);
+ if (definition.explicit)
+ explicit = explicit.concat(definition.explicit);
+ } else {
+ throw new exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
+ }
+ implicit2.forEach(function(type$1) {
+ if (!(type$1 instanceof type2)) {
+ throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.");
+ }
+ if (type$1.loadKind && type$1.loadKind !== "scalar") {
+ throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
+ }
+ if (type$1.multi) {
+ throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
+ }
+ });
+ explicit.forEach(function(type$1) {
+ if (!(type$1 instanceof type2)) {
+ throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.");
+ }
+ });
+ var result = Object.create(Schema$1.prototype);
+ result.implicit = (this.implicit || []).concat(implicit2);
+ result.explicit = (this.explicit || []).concat(explicit);
+ result.compiledImplicit = compileList(result, "implicit");
+ result.compiledExplicit = compileList(result, "explicit");
+ result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);
+ return result;
+};
+var schema = Schema$1;
+var str = new type2("tag:yaml.org,2002:str", {
+ kind: "scalar",
+ construct: function(data) {
+ return data !== null ? data : "";
+ }
+});
+var seq = new type2("tag:yaml.org,2002:seq", {
+ kind: "sequence",
+ construct: function(data) {
+ return data !== null ? data : [];
+ }
+});
+var map4 = new type2("tag:yaml.org,2002:map", {
+ kind: "mapping",
+ construct: function(data) {
+ return data !== null ? data : {};
+ }
+});
+var failsafe = new schema({
+ explicit: [
+ str,
+ seq,
+ map4
+ ]
+});
+function resolveYamlNull(data) {
+ if (data === null)
+ return true;
+ var max5 = data.length;
+ return max5 === 1 && data === "~" || max5 === 4 && (data === "null" || data === "Null" || data === "NULL");
+}
+function constructYamlNull() {
+ return null;
+}
+function isNull(object) {
+ return object === null;
+}
+var _null = new type2("tag:yaml.org,2002:null", {
+ kind: "scalar",
+ resolve: resolveYamlNull,
+ construct: constructYamlNull,
+ predicate: isNull,
+ represent: {
+ canonical: function() {
+ return "~";
+ },
+ lowercase: function() {
+ return "null";
+ },
+ uppercase: function() {
+ return "NULL";
+ },
+ camelcase: function() {
+ return "Null";
+ },
+ empty: function() {
+ return "";
+ }
+ },
+ defaultStyle: "lowercase"
+});
+function resolveYamlBoolean(data) {
+ if (data === null)
+ return false;
+ var max5 = data.length;
+ return max5 === 4 && (data === "true" || data === "True" || data === "TRUE") || max5 === 5 && (data === "false" || data === "False" || data === "FALSE");
+}
+function constructYamlBoolean(data) {
+ return data === "true" || data === "True" || data === "TRUE";
+}
+function isBoolean(object) {
+ return Object.prototype.toString.call(object) === "[object Boolean]";
+}
+var bool = new type2("tag:yaml.org,2002:bool", {
+ kind: "scalar",
+ resolve: resolveYamlBoolean,
+ construct: constructYamlBoolean,
+ predicate: isBoolean,
+ represent: {
+ lowercase: function(object) {
+ return object ? "true" : "false";
+ },
+ uppercase: function(object) {
+ return object ? "TRUE" : "FALSE";
+ },
+ camelcase: function(object) {
+ return object ? "True" : "False";
+ }
+ },
+ defaultStyle: "lowercase"
+});
+function isHexCode(c3) {
+ return 48 <= c3 && c3 <= 57 || 65 <= c3 && c3 <= 70 || 97 <= c3 && c3 <= 102;
+}
+function isOctCode(c3) {
+ return 48 <= c3 && c3 <= 55;
+}
+function isDecCode(c3) {
+ return 48 <= c3 && c3 <= 57;
+}
+function resolveYamlInteger(data) {
+ if (data === null)
+ return false;
+ var max5 = data.length, index2 = 0, hasDigits = false, ch;
+ if (!max5)
+ return false;
+ ch = data[index2];
+ if (ch === "-" || ch === "+") {
+ ch = data[++index2];
+ }
+ if (ch === "0") {
+ if (index2 + 1 === max5)
+ return true;
+ ch = data[++index2];
+ if (ch === "b") {
+ index2++;
+ for (; index2 < max5; index2++) {
+ ch = data[index2];
+ if (ch === "_")
+ continue;
+ if (ch !== "0" && ch !== "1")
+ return false;
+ hasDigits = true;
+ }
+ return hasDigits && ch !== "_";
+ }
+ if (ch === "x") {
+ index2++;
+ for (; index2 < max5; index2++) {
+ ch = data[index2];
+ if (ch === "_")
+ continue;
+ if (!isHexCode(data.charCodeAt(index2)))
+ return false;
+ hasDigits = true;
+ }
+ return hasDigits && ch !== "_";
+ }
+ if (ch === "o") {
+ index2++;
+ for (; index2 < max5; index2++) {
+ ch = data[index2];
+ if (ch === "_")
+ continue;
+ if (!isOctCode(data.charCodeAt(index2)))
+ return false;
+ hasDigits = true;
+ }
+ return hasDigits && ch !== "_";
+ }
+ }
+ if (ch === "_")
+ return false;
+ for (; index2 < max5; index2++) {
+ ch = data[index2];
+ if (ch === "_")
+ continue;
+ if (!isDecCode(data.charCodeAt(index2))) {
+ return false;
+ }
+ hasDigits = true;
+ }
+ if (!hasDigits || ch === "_")
+ return false;
+ return true;
+}
+function constructYamlInteger(data) {
+ var value = data, sign3 = 1, ch;
+ if (value.indexOf("_") !== -1) {
+ value = value.replace(/_/g, "");
+ }
+ ch = value[0];
+ if (ch === "-" || ch === "+") {
+ if (ch === "-")
+ sign3 = -1;
+ value = value.slice(1);
+ ch = value[0];
+ }
+ if (value === "0")
+ return 0;
+ if (ch === "0") {
+ if (value[1] === "b")
+ return sign3 * parseInt(value.slice(2), 2);
+ if (value[1] === "x")
+ return sign3 * parseInt(value.slice(2), 16);
+ if (value[1] === "o")
+ return sign3 * parseInt(value.slice(2), 8);
+ }
+ return sign3 * parseInt(value, 10);
+}
+function isInteger(object) {
+ return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object));
+}
+var int = new type2("tag:yaml.org,2002:int", {
+ kind: "scalar",
+ resolve: resolveYamlInteger,
+ construct: constructYamlInteger,
+ predicate: isInteger,
+ represent: {
+ binary: function(obj) {
+ return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1);
+ },
+ octal: function(obj) {
+ return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1);
+ },
+ decimal: function(obj) {
+ return obj.toString(10);
+ },
+ /* eslint-disable max-len */
+ hexadecimal: function(obj) {
+ return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1);
+ }
+ },
+ defaultStyle: "decimal",
+ styleAliases: {
+ binary: [2, "bin"],
+ octal: [8, "oct"],
+ decimal: [10, "dec"],
+ hexadecimal: [16, "hex"]
+ }
+});
+var YAML_FLOAT_PATTERN = new RegExp(
+ // 2.5e4, 2.5 and integers
+ "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
+);
+function resolveYamlFloat(data) {
+ if (data === null)
+ return false;
+ if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_`
+ // Probably should update regexp & check speed
+ data[data.length - 1] === "_") {
+ return false;
+ }
+ return true;
+}
+function constructYamlFloat(data) {
+ var value, sign3;
+ value = data.replace(/_/g, "").toLowerCase();
+ sign3 = value[0] === "-" ? -1 : 1;
+ if ("+-".indexOf(value[0]) >= 0) {
+ value = value.slice(1);
+ }
+ if (value === ".inf") {
+ return sign3 === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
+ } else if (value === ".nan") {
+ return NaN;
+ }
+ return sign3 * parseFloat(value, 10);
+}
+var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
+function representYamlFloat(object, style) {
+ var res;
+ if (isNaN(object)) {
+ switch (style) {
+ case "lowercase":
+ return ".nan";
+ case "uppercase":
+ return ".NAN";
+ case "camelcase":
+ return ".NaN";
+ }
+ } else if (Number.POSITIVE_INFINITY === object) {
+ switch (style) {
+ case "lowercase":
+ return ".inf";
+ case "uppercase":
+ return ".INF";
+ case "camelcase":
+ return ".Inf";
+ }
+ } else if (Number.NEGATIVE_INFINITY === object) {
+ switch (style) {
+ case "lowercase":
+ return "-.inf";
+ case "uppercase":
+ return "-.INF";
+ case "camelcase":
+ return "-.Inf";
+ }
+ } else if (common.isNegativeZero(object)) {
+ return "-0.0";
+ }
+ res = object.toString(10);
+ return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res;
+}
+function isFloat(object) {
+ return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object));
+}
+var float = new type2("tag:yaml.org,2002:float", {
+ kind: "scalar",
+ resolve: resolveYamlFloat,
+ construct: constructYamlFloat,
+ predicate: isFloat,
+ represent: representYamlFloat,
+ defaultStyle: "lowercase"
+});
+var json = failsafe.extend({
+ implicit: [
+ _null,
+ bool,
+ int,
+ float
+ ]
+});
+var core = json;
+var YAML_DATE_REGEXP = new RegExp(
+ "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
+);
+var YAML_TIMESTAMP_REGEXP = new RegExp(
+ "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
+);
+function resolveYamlTimestamp(data) {
+ if (data === null)
+ return false;
+ if (YAML_DATE_REGEXP.exec(data) !== null)
+ return true;
+ if (YAML_TIMESTAMP_REGEXP.exec(data) !== null)
+ return true;
+ return false;
+}
+function constructYamlTimestamp(data) {
+ var match2, year, month, day, hour, minute, second2, fraction = 0, delta = null, tz_hour, tz_minute, date2;
+ match2 = YAML_DATE_REGEXP.exec(data);
+ if (match2 === null)
+ match2 = YAML_TIMESTAMP_REGEXP.exec(data);
+ if (match2 === null)
+ throw new Error("Date resolve error");
+ year = +match2[1];
+ month = +match2[2] - 1;
+ day = +match2[3];
+ if (!match2[4]) {
+ return new Date(Date.UTC(year, month, day));
+ }
+ hour = +match2[4];
+ minute = +match2[5];
+ second2 = +match2[6];
+ if (match2[7]) {
+ fraction = match2[7].slice(0, 3);
+ while (fraction.length < 3) {
+ fraction += "0";
+ }
+ fraction = +fraction;
+ }
+ if (match2[9]) {
+ tz_hour = +match2[10];
+ tz_minute = +(match2[11] || 0);
+ delta = (tz_hour * 60 + tz_minute) * 6e4;
+ if (match2[9] === "-")
+ delta = -delta;
+ }
+ date2 = new Date(Date.UTC(year, month, day, hour, minute, second2, fraction));
+ if (delta)
+ date2.setTime(date2.getTime() - delta);
+ return date2;
+}
+function representYamlTimestamp(object) {
+ return object.toISOString();
+}
+var timestamp = new type2("tag:yaml.org,2002:timestamp", {
+ kind: "scalar",
+ resolve: resolveYamlTimestamp,
+ construct: constructYamlTimestamp,
+ instanceOf: Date,
+ represent: representYamlTimestamp
+});
+function resolveYamlMerge(data) {
+ return data === "<<" || data === null;
+}
+var merge2 = new type2("tag:yaml.org,2002:merge", {
+ kind: "scalar",
+ resolve: resolveYamlMerge
+});
+var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
+function resolveYamlBinary(data) {
+ if (data === null)
+ return false;
+ var code, idx, bitlen = 0, max5 = data.length, map22 = BASE64_MAP;
+ for (idx = 0; idx < max5; idx++) {
+ code = map22.indexOf(data.charAt(idx));
+ if (code > 64)
+ continue;
+ if (code < 0)
+ return false;
+ bitlen += 6;
+ }
+ return bitlen % 8 === 0;
+}
+function constructYamlBinary(data) {
+ var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max5 = input.length, map22 = BASE64_MAP, bits = 0, result = [];
+ for (idx = 0; idx < max5; idx++) {
+ if (idx % 4 === 0 && idx) {
+ result.push(bits >> 16 & 255);
+ result.push(bits >> 8 & 255);
+ result.push(bits & 255);
+ }
+ bits = bits << 6 | map22.indexOf(input.charAt(idx));
+ }
+ tailbits = max5 % 4 * 6;
+ if (tailbits === 0) {
+ result.push(bits >> 16 & 255);
+ result.push(bits >> 8 & 255);
+ result.push(bits & 255);
+ } else if (tailbits === 18) {
+ result.push(bits >> 10 & 255);
+ result.push(bits >> 2 & 255);
+ } else if (tailbits === 12) {
+ result.push(bits >> 4 & 255);
+ }
+ return new Uint8Array(result);
+}
+function representYamlBinary(object) {
+ var result = "", bits = 0, idx, tail, max5 = object.length, map22 = BASE64_MAP;
+ for (idx = 0; idx < max5; idx++) {
+ if (idx % 3 === 0 && idx) {
+ result += map22[bits >> 18 & 63];
+ result += map22[bits >> 12 & 63];
+ result += map22[bits >> 6 & 63];
+ result += map22[bits & 63];
+ }
+ bits = (bits << 8) + object[idx];
+ }
+ tail = max5 % 3;
+ if (tail === 0) {
+ result += map22[bits >> 18 & 63];
+ result += map22[bits >> 12 & 63];
+ result += map22[bits >> 6 & 63];
+ result += map22[bits & 63];
+ } else if (tail === 2) {
+ result += map22[bits >> 10 & 63];
+ result += map22[bits >> 4 & 63];
+ result += map22[bits << 2 & 63];
+ result += map22[64];
+ } else if (tail === 1) {
+ result += map22[bits >> 2 & 63];
+ result += map22[bits << 4 & 63];
+ result += map22[64];
+ result += map22[64];
+ }
+ return result;
+}
+function isBinary(obj) {
+ return Object.prototype.toString.call(obj) === "[object Uint8Array]";
+}
+var binary = new type2("tag:yaml.org,2002:binary", {
+ kind: "scalar",
+ resolve: resolveYamlBinary,
+ construct: constructYamlBinary,
+ predicate: isBinary,
+ represent: representYamlBinary
+});
+var _hasOwnProperty$3 = Object.prototype.hasOwnProperty;
+var _toString$2 = Object.prototype.toString;
+function resolveYamlOmap(data) {
+ if (data === null)
+ return true;
+ var objectKeys = [], index2, length2, pair, pairKey, pairHasKey, object = data;
+ for (index2 = 0, length2 = object.length; index2 < length2; index2 += 1) {
+ pair = object[index2];
+ pairHasKey = false;
+ if (_toString$2.call(pair) !== "[object Object]")
+ return false;
+ for (pairKey in pair) {
+ if (_hasOwnProperty$3.call(pair, pairKey)) {
+ if (!pairHasKey)
+ pairHasKey = true;
+ else
+ return false;
+ }
+ }
+ if (!pairHasKey)
+ return false;
+ if (objectKeys.indexOf(pairKey) === -1)
+ objectKeys.push(pairKey);
+ else
+ return false;
+ }
+ return true;
+}
+function constructYamlOmap(data) {
+ return data !== null ? data : [];
+}
+var omap = new type2("tag:yaml.org,2002:omap", {
+ kind: "sequence",
+ resolve: resolveYamlOmap,
+ construct: constructYamlOmap
+});
+var _toString$1 = Object.prototype.toString;
+function resolveYamlPairs(data) {
+ if (data === null)
+ return true;
+ var index2, length2, pair, keys, result, object = data;
+ result = new Array(object.length);
+ for (index2 = 0, length2 = object.length; index2 < length2; index2 += 1) {
+ pair = object[index2];
+ if (_toString$1.call(pair) !== "[object Object]")
+ return false;
+ keys = Object.keys(pair);
+ if (keys.length !== 1)
+ return false;
+ result[index2] = [keys[0], pair[keys[0]]];
+ }
+ return true;
+}
+function constructYamlPairs(data) {
+ if (data === null)
+ return [];
+ var index2, length2, pair, keys, result, object = data;
+ result = new Array(object.length);
+ for (index2 = 0, length2 = object.length; index2 < length2; index2 += 1) {
+ pair = object[index2];
+ keys = Object.keys(pair);
+ result[index2] = [keys[0], pair[keys[0]]];
+ }
+ return result;
+}
+var pairs2 = new type2("tag:yaml.org,2002:pairs", {
+ kind: "sequence",
+ resolve: resolveYamlPairs,
+ construct: constructYamlPairs
+});
+var _hasOwnProperty$2 = Object.prototype.hasOwnProperty;
+function resolveYamlSet(data) {
+ if (data === null)
+ return true;
+ var key, object = data;
+ for (key in object) {
+ if (_hasOwnProperty$2.call(object, key)) {
+ if (object[key] !== null)
+ return false;
+ }
+ }
+ return true;
+}
+function constructYamlSet(data) {
+ return data !== null ? data : {};
+}
+var set3 = new type2("tag:yaml.org,2002:set", {
+ kind: "mapping",
+ resolve: resolveYamlSet,
+ construct: constructYamlSet
+});
+var _default = core.extend({
+ implicit: [
+ timestamp,
+ merge2
+ ],
+ explicit: [
+ binary,
+ omap,
+ pairs2,
+ set3
+ ]
+});
+var _hasOwnProperty$1 = Object.prototype.hasOwnProperty;
+var CONTEXT_FLOW_IN = 1;
+var CONTEXT_FLOW_OUT = 2;
+var CONTEXT_BLOCK_IN = 3;
+var CONTEXT_BLOCK_OUT = 4;
+var CHOMPING_CLIP = 1;
+var CHOMPING_STRIP = 2;
+var CHOMPING_KEEP = 3;
+var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
+var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
+var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/;
+var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i;
+var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
+function _class(obj) {
+ return Object.prototype.toString.call(obj);
+}
+function is_EOL(c3) {
+ return c3 === 10 || c3 === 13;
+}
+function is_WHITE_SPACE(c3) {
+ return c3 === 9 || c3 === 32;
+}
+function is_WS_OR_EOL(c3) {
+ return c3 === 9 || c3 === 32 || c3 === 10 || c3 === 13;
+}
+function is_FLOW_INDICATOR(c3) {
+ return c3 === 44 || c3 === 91 || c3 === 93 || c3 === 123 || c3 === 125;
+}
+function fromHexCode(c3) {
+ var lc;
+ if (48 <= c3 && c3 <= 57) {
+ return c3 - 48;
+ }
+ lc = c3 | 32;
+ if (97 <= lc && lc <= 102) {
+ return lc - 97 + 10;
+ }
+ return -1;
+}
+function escapedHexLen(c3) {
+ if (c3 === 120) {
+ return 2;
+ }
+ if (c3 === 117) {
+ return 4;
+ }
+ if (c3 === 85) {
+ return 8;
+ }
+ return 0;
+}
+function fromDecimalCode(c3) {
+ if (48 <= c3 && c3 <= 57) {
+ return c3 - 48;
+ }
+ return -1;
+}
+function simpleEscapeSequence(c3) {
+ return c3 === 48 ? "\0" : c3 === 97 ? "\x07" : c3 === 98 ? "\b" : c3 === 116 ? " " : c3 === 9 ? " " : c3 === 110 ? "\n" : c3 === 118 ? "\v" : c3 === 102 ? "\f" : c3 === 114 ? "\r" : c3 === 101 ? "\x1B" : c3 === 32 ? " " : c3 === 34 ? '"' : c3 === 47 ? "/" : c3 === 92 ? "\\" : c3 === 78 ? "
" : c3 === 95 ? " " : c3 === 76 ? "\u2028" : c3 === 80 ? "\u2029" : "";
+}
+function charFromCodepoint(c3) {
+ if (c3 <= 65535) {
+ return String.fromCharCode(c3);
+ }
+ return String.fromCharCode(
+ (c3 - 65536 >> 10) + 55296,
+ (c3 - 65536 & 1023) + 56320
+ );
+}
+var simpleEscapeCheck = new Array(256);
+var simpleEscapeMap = new Array(256);
+for (i = 0; i < 256; i++) {
+ simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;
+ simpleEscapeMap[i] = simpleEscapeSequence(i);
+}
+var i;
+function State$1(input, options) {
+ this.input = input;
+ this.filename = options["filename"] || null;
+ this.schema = options["schema"] || _default;
+ this.onWarning = options["onWarning"] || null;
+ this.legacy = options["legacy"] || false;
+ this.json = options["json"] || false;
+ this.listener = options["listener"] || null;
+ this.implicitTypes = this.schema.compiledImplicit;
+ this.typeMap = this.schema.compiledTypeMap;
+ this.length = input.length;
+ this.position = 0;
+ this.line = 0;
+ this.lineStart = 0;
+ this.lineIndent = 0;
+ this.firstTabInLine = -1;
+ this.documents = [];
+}
+function generateError(state2, message) {
+ var mark = {
+ name: state2.filename,
+ buffer: state2.input.slice(0, -1),
+ // omit trailing \0
+ position: state2.position,
+ line: state2.line,
+ column: state2.position - state2.lineStart
+ };
+ mark.snippet = snippet(mark);
+ return new exception(message, mark);
+}
+function throwError(state2, message) {
+ throw generateError(state2, message);
+}
+function throwWarning(state2, message) {
+ if (state2.onWarning) {
+ state2.onWarning.call(null, generateError(state2, message));
+ }
+}
+var directiveHandlers = {
+ YAML: function handleYamlDirective(state2, name, args) {
+ var match2, major, minor;
+ if (state2.version !== null) {
+ throwError(state2, "duplication of %YAML directive");
+ }
+ if (args.length !== 1) {
+ throwError(state2, "YAML directive accepts exactly one argument");
+ }
+ match2 = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
+ if (match2 === null) {
+ throwError(state2, "ill-formed argument of the YAML directive");
+ }
+ major = parseInt(match2[1], 10);
+ minor = parseInt(match2[2], 10);
+ if (major !== 1) {
+ throwError(state2, "unacceptable YAML version of the document");
+ }
+ state2.version = args[0];
+ state2.checkLineBreaks = minor < 2;
+ if (minor !== 1 && minor !== 2) {
+ throwWarning(state2, "unsupported YAML version of the document");
+ }
+ },
+ TAG: function handleTagDirective(state2, name, args) {
+ var handle, prefix2;
+ if (args.length !== 2) {
+ throwError(state2, "TAG directive accepts exactly two arguments");
+ }
+ handle = args[0];
+ prefix2 = args[1];
+ if (!PATTERN_TAG_HANDLE.test(handle)) {
+ throwError(state2, "ill-formed tag handle (first argument) of the TAG directive");
+ }
+ if (_hasOwnProperty$1.call(state2.tagMap, handle)) {
+ throwError(state2, 'there is a previously declared suffix for "' + handle + '" tag handle');
+ }
+ if (!PATTERN_TAG_URI.test(prefix2)) {
+ throwError(state2, "ill-formed tag prefix (second argument) of the TAG directive");
+ }
+ try {
+ prefix2 = decodeURIComponent(prefix2);
+ } catch (err) {
+ throwError(state2, "tag prefix is malformed: " + prefix2);
+ }
+ state2.tagMap[handle] = prefix2;
+ }
+};
+function captureSegment(state2, start2, end, checkJson) {
+ var _position, _length, _character, _result;
+ if (start2 < end) {
+ _result = state2.input.slice(start2, end);
+ if (checkJson) {
+ for (_position = 0, _length = _result.length; _position < _length; _position += 1) {
+ _character = _result.charCodeAt(_position);
+ if (!(_character === 9 || 32 <= _character && _character <= 1114111)) {
+ throwError(state2, "expected valid JSON character");
+ }
+ }
+ } else if (PATTERN_NON_PRINTABLE.test(_result)) {
+ throwError(state2, "the stream contains non-printable characters");
+ }
+ state2.result += _result;
+ }
+}
+function mergeMappings(state2, destination, source, overridableKeys) {
+ var sourceKeys, key, index2, quantity;
+ if (!common.isObject(source)) {
+ throwError(state2, "cannot merge mappings; the provided source object is unacceptable");
+ }
+ sourceKeys = Object.keys(source);
+ for (index2 = 0, quantity = sourceKeys.length; index2 < quantity; index2 += 1) {
+ key = sourceKeys[index2];
+ if (!_hasOwnProperty$1.call(destination, key)) {
+ destination[key] = source[key];
+ overridableKeys[key] = true;
+ }
+ }
+}
+function storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) {
+ var index2, quantity;
+ if (Array.isArray(keyNode)) {
+ keyNode = Array.prototype.slice.call(keyNode);
+ for (index2 = 0, quantity = keyNode.length; index2 < quantity; index2 += 1) {
+ if (Array.isArray(keyNode[index2])) {
+ throwError(state2, "nested arrays are not supported inside keys");
+ }
+ if (typeof keyNode === "object" && _class(keyNode[index2]) === "[object Object]") {
+ keyNode[index2] = "[object Object]";
+ }
+ }
+ }
+ if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") {
+ keyNode = "[object Object]";
+ }
+ keyNode = String(keyNode);
+ if (_result === null) {
+ _result = {};
+ }
+ if (keyTag === "tag:yaml.org,2002:merge") {
+ if (Array.isArray(valueNode)) {
+ for (index2 = 0, quantity = valueNode.length; index2 < quantity; index2 += 1) {
+ mergeMappings(state2, _result, valueNode[index2], overridableKeys);
+ }
+ } else {
+ mergeMappings(state2, _result, valueNode, overridableKeys);
+ }
+ } else {
+ if (!state2.json && !_hasOwnProperty$1.call(overridableKeys, keyNode) && _hasOwnProperty$1.call(_result, keyNode)) {
+ state2.line = startLine || state2.line;
+ state2.lineStart = startLineStart || state2.lineStart;
+ state2.position = startPos || state2.position;
+ throwError(state2, "duplicated mapping key");
+ }
+ if (keyNode === "__proto__") {
+ Object.defineProperty(_result, keyNode, {
+ configurable: true,
+ enumerable: true,
+ writable: true,
+ value: valueNode
+ });
+ } else {
+ _result[keyNode] = valueNode;
+ }
+ delete overridableKeys[keyNode];
+ }
+ return _result;
+}
+function readLineBreak(state2) {
+ var ch;
+ ch = state2.input.charCodeAt(state2.position);
+ if (ch === 10) {
+ state2.position++;
+ } else if (ch === 13) {
+ state2.position++;
+ if (state2.input.charCodeAt(state2.position) === 10) {
+ state2.position++;
+ }
+ } else {
+ throwError(state2, "a line break is expected");
+ }
+ state2.line += 1;
+ state2.lineStart = state2.position;
+ state2.firstTabInLine = -1;
+}
+function skipSeparationSpace(state2, allowComments, checkIndent) {
+ var lineBreaks = 0, ch = state2.input.charCodeAt(state2.position);
+ while (ch !== 0) {
+ while (is_WHITE_SPACE(ch)) {
+ if (ch === 9 && state2.firstTabInLine === -1) {
+ state2.firstTabInLine = state2.position;
+ }
+ ch = state2.input.charCodeAt(++state2.position);
+ }
+ if (allowComments && ch === 35) {
+ do {
+ ch = state2.input.charCodeAt(++state2.position);
+ } while (ch !== 10 && ch !== 13 && ch !== 0);
+ }
+ if (is_EOL(ch)) {
+ readLineBreak(state2);
+ ch = state2.input.charCodeAt(state2.position);
+ lineBreaks++;
+ state2.lineIndent = 0;
+ while (ch === 32) {
+ state2.lineIndent++;
+ ch = state2.input.charCodeAt(++state2.position);
+ }
+ } else {
+ break;
+ }
+ }
+ if (checkIndent !== -1 && lineBreaks !== 0 && state2.lineIndent < checkIndent) {
+ throwWarning(state2, "deficient indentation");
+ }
+ return lineBreaks;
+}
+function testDocumentSeparator(state2) {
+ var _position = state2.position, ch;
+ ch = state2.input.charCodeAt(_position);
+ if ((ch === 45 || ch === 46) && ch === state2.input.charCodeAt(_position + 1) && ch === state2.input.charCodeAt(_position + 2)) {
+ _position += 3;
+ ch = state2.input.charCodeAt(_position);
+ if (ch === 0 || is_WS_OR_EOL(ch)) {
+ return true;
+ }
+ }
+ return false;
+}
+function writeFoldedLines(state2, count3) {
+ if (count3 === 1) {
+ state2.result += " ";
+ } else if (count3 > 1) {
+ state2.result += common.repeat("\n", count3 - 1);
+ }
+}
+function readPlainScalar(state2, nodeIndent, withinFlowCollection) {
+ var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state2.kind, _result = state2.result, ch;
+ ch = state2.input.charCodeAt(state2.position);
+ if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) {
+ return false;
+ }
+ if (ch === 63 || ch === 45) {
+ following = state2.input.charCodeAt(state2.position + 1);
+ if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {
+ return false;
+ }
+ }
+ state2.kind = "scalar";
+ state2.result = "";
+ captureStart = captureEnd = state2.position;
+ hasPendingContent = false;
+ while (ch !== 0) {
+ if (ch === 58) {
+ following = state2.input.charCodeAt(state2.position + 1);
+ if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {
+ break;
+ }
+ } else if (ch === 35) {
+ preceding = state2.input.charCodeAt(state2.position - 1);
+ if (is_WS_OR_EOL(preceding)) {
+ break;
+ }
+ } else if (state2.position === state2.lineStart && testDocumentSeparator(state2) || withinFlowCollection && is_FLOW_INDICATOR(ch)) {
+ break;
+ } else if (is_EOL(ch)) {
+ _line = state2.line;
+ _lineStart = state2.lineStart;
+ _lineIndent = state2.lineIndent;
+ skipSeparationSpace(state2, false, -1);
+ if (state2.lineIndent >= nodeIndent) {
+ hasPendingContent = true;
+ ch = state2.input.charCodeAt(state2.position);
+ continue;
+ } else {
+ state2.position = captureEnd;
+ state2.line = _line;
+ state2.lineStart = _lineStart;
+ state2.lineIndent = _lineIndent;
+ break;
+ }
+ }
+ if (hasPendingContent) {
+ captureSegment(state2, captureStart, captureEnd, false);
+ writeFoldedLines(state2, state2.line - _line);
+ captureStart = captureEnd = state2.position;
+ hasPendingContent = false;
+ }
+ if (!is_WHITE_SPACE(ch)) {
+ captureEnd = state2.position + 1;
+ }
+ ch = state2.input.charCodeAt(++state2.position);
+ }
+ captureSegment(state2, captureStart, captureEnd, false);
+ if (state2.result) {
+ return true;
+ }
+ state2.kind = _kind;
+ state2.result = _result;
+ return false;
+}
+function readSingleQuotedScalar(state2, nodeIndent) {
+ var ch, captureStart, captureEnd;
+ ch = state2.input.charCodeAt(state2.position);
+ if (ch !== 39) {
+ return false;
+ }
+ state2.kind = "scalar";
+ state2.result = "";
+ state2.position++;
+ captureStart = captureEnd = state2.position;
+ while ((ch = state2.input.charCodeAt(state2.position)) !== 0) {
+ if (ch === 39) {
+ captureSegment(state2, captureStart, state2.position, true);
+ ch = state2.input.charCodeAt(++state2.position);
+ if (ch === 39) {
+ captureStart = state2.position;
+ state2.position++;
+ captureEnd = state2.position;
+ } else {
+ return true;
+ }
+ } else if (is_EOL(ch)) {
+ captureSegment(state2, captureStart, captureEnd, true);
+ writeFoldedLines(state2, skipSeparationSpace(state2, false, nodeIndent));
+ captureStart = captureEnd = state2.position;
+ } else if (state2.position === state2.lineStart && testDocumentSeparator(state2)) {
+ throwError(state2, "unexpected end of the document within a single quoted scalar");
+ } else {
+ state2.position++;
+ captureEnd = state2.position;
+ }
+ }
+ throwError(state2, "unexpected end of the stream within a single quoted scalar");
+}
+function readDoubleQuotedScalar(state2, nodeIndent) {
+ var captureStart, captureEnd, hexLength, hexResult, tmp, ch;
+ ch = state2.input.charCodeAt(state2.position);
+ if (ch !== 34) {
+ return false;
+ }
+ state2.kind = "scalar";
+ state2.result = "";
+ state2.position++;
+ captureStart = captureEnd = state2.position;
+ while ((ch = state2.input.charCodeAt(state2.position)) !== 0) {
+ if (ch === 34) {
+ captureSegment(state2, captureStart, state2.position, true);
+ state2.position++;
+ return true;
+ } else if (ch === 92) {
+ captureSegment(state2, captureStart, state2.position, true);
+ ch = state2.input.charCodeAt(++state2.position);
+ if (is_EOL(ch)) {
+ skipSeparationSpace(state2, false, nodeIndent);
+ } else if (ch < 256 && simpleEscapeCheck[ch]) {
+ state2.result += simpleEscapeMap[ch];
+ state2.position++;
+ } else if ((tmp = escapedHexLen(ch)) > 0) {
+ hexLength = tmp;
+ hexResult = 0;
+ for (; hexLength > 0; hexLength--) {
+ ch = state2.input.charCodeAt(++state2.position);
+ if ((tmp = fromHexCode(ch)) >= 0) {
+ hexResult = (hexResult << 4) + tmp;
+ } else {
+ throwError(state2, "expected hexadecimal character");
+ }
+ }
+ state2.result += charFromCodepoint(hexResult);
+ state2.position++;
+ } else {
+ throwError(state2, "unknown escape sequence");
+ }
+ captureStart = captureEnd = state2.position;
+ } else if (is_EOL(ch)) {
+ captureSegment(state2, captureStart, captureEnd, true);
+ writeFoldedLines(state2, skipSeparationSpace(state2, false, nodeIndent));
+ captureStart = captureEnd = state2.position;
+ } else if (state2.position === state2.lineStart && testDocumentSeparator(state2)) {
+ throwError(state2, "unexpected end of the document within a double quoted scalar");
+ } else {
+ state2.position++;
+ captureEnd = state2.position;
+ }
+ }
+ throwError(state2, "unexpected end of the stream within a double quoted scalar");
+}
+function readFlowCollection(state2, nodeIndent) {
+ var readNext = true, _line, _lineStart, _pos, _tag = state2.tag, _result, _anchor = state2.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = /* @__PURE__ */ Object.create(null), keyNode, keyTag, valueNode, ch;
+ ch = state2.input.charCodeAt(state2.position);
+ if (ch === 91) {
+ terminator = 93;
+ isMapping = false;
+ _result = [];
+ } else if (ch === 123) {
+ terminator = 125;
+ isMapping = true;
+ _result = {};
+ } else {
+ return false;
+ }
+ if (state2.anchor !== null) {
+ state2.anchorMap[state2.anchor] = _result;
+ }
+ ch = state2.input.charCodeAt(++state2.position);
+ while (ch !== 0) {
+ skipSeparationSpace(state2, true, nodeIndent);
+ ch = state2.input.charCodeAt(state2.position);
+ if (ch === terminator) {
+ state2.position++;
+ state2.tag = _tag;
+ state2.anchor = _anchor;
+ state2.kind = isMapping ? "mapping" : "sequence";
+ state2.result = _result;
+ return true;
+ } else if (!readNext) {
+ throwError(state2, "missed comma between flow collection entries");
+ } else if (ch === 44) {
+ throwError(state2, "expected the node content, but found ','");
+ }
+ keyTag = keyNode = valueNode = null;
+ isPair = isExplicitPair = false;
+ if (ch === 63) {
+ following = state2.input.charCodeAt(state2.position + 1);
+ if (is_WS_OR_EOL(following)) {
+ isPair = isExplicitPair = true;
+ state2.position++;
+ skipSeparationSpace(state2, true, nodeIndent);
+ }
+ }
+ _line = state2.line;
+ _lineStart = state2.lineStart;
+ _pos = state2.position;
+ composeNode(state2, nodeIndent, CONTEXT_FLOW_IN, false, true);
+ keyTag = state2.tag;
+ keyNode = state2.result;
+ skipSeparationSpace(state2, true, nodeIndent);
+ ch = state2.input.charCodeAt(state2.position);
+ if ((isExplicitPair || state2.line === _line) && ch === 58) {
+ isPair = true;
+ ch = state2.input.charCodeAt(++state2.position);
+ skipSeparationSpace(state2, true, nodeIndent);
+ composeNode(state2, nodeIndent, CONTEXT_FLOW_IN, false, true);
+ valueNode = state2.result;
+ }
+ if (isMapping) {
+ storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);
+ } else if (isPair) {
+ _result.push(storeMappingPair(state2, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));
+ } else {
+ _result.push(keyNode);
+ }
+ skipSeparationSpace(state2, true, nodeIndent);
+ ch = state2.input.charCodeAt(state2.position);
+ if (ch === 44) {
+ readNext = true;
+ ch = state2.input.charCodeAt(++state2.position);
+ } else {
+ readNext = false;
+ }
+ }
+ throwError(state2, "unexpected end of the stream within a flow collection");
+}
+function readBlockScalar(state2, nodeIndent) {
+ var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch;
+ ch = state2.input.charCodeAt(state2.position);
+ if (ch === 124) {
+ folding = false;
+ } else if (ch === 62) {
+ folding = true;
+ } else {
+ return false;
+ }
+ state2.kind = "scalar";
+ state2.result = "";
+ while (ch !== 0) {
+ ch = state2.input.charCodeAt(++state2.position);
+ if (ch === 43 || ch === 45) {
+ if (CHOMPING_CLIP === chomping) {
+ chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP;
+ } else {
+ throwError(state2, "repeat of a chomping mode identifier");
+ }
+ } else if ((tmp = fromDecimalCode(ch)) >= 0) {
+ if (tmp === 0) {
+ throwError(state2, "bad explicit indentation width of a block scalar; it cannot be less than one");
+ } else if (!detectedIndent) {
+ textIndent = nodeIndent + tmp - 1;
+ detectedIndent = true;
+ } else {
+ throwError(state2, "repeat of an indentation width identifier");
+ }
+ } else {
+ break;
+ }
+ }
+ if (is_WHITE_SPACE(ch)) {
+ do {
+ ch = state2.input.charCodeAt(++state2.position);
+ } while (is_WHITE_SPACE(ch));
+ if (ch === 35) {
+ do {
+ ch = state2.input.charCodeAt(++state2.position);
+ } while (!is_EOL(ch) && ch !== 0);
+ }
+ }
+ while (ch !== 0) {
+ readLineBreak(state2);
+ state2.lineIndent = 0;
+ ch = state2.input.charCodeAt(state2.position);
+ while ((!detectedIndent || state2.lineIndent < textIndent) && ch === 32) {
+ state2.lineIndent++;
+ ch = state2.input.charCodeAt(++state2.position);
+ }
+ if (!detectedIndent && state2.lineIndent > textIndent) {
+ textIndent = state2.lineIndent;
+ }
+ if (is_EOL(ch)) {
+ emptyLines++;
+ continue;
+ }
+ if (state2.lineIndent < textIndent) {
+ if (chomping === CHOMPING_KEEP) {
+ state2.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
+ } else if (chomping === CHOMPING_CLIP) {
+ if (didReadContent) {
+ state2.result += "\n";
+ }
+ }
+ break;
+ }
+ if (folding) {
+ if (is_WHITE_SPACE(ch)) {
+ atMoreIndented = true;
+ state2.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
+ } else if (atMoreIndented) {
+ atMoreIndented = false;
+ state2.result += common.repeat("\n", emptyLines + 1);
+ } else if (emptyLines === 0) {
+ if (didReadContent) {
+ state2.result += " ";
+ }
+ } else {
+ state2.result += common.repeat("\n", emptyLines);
+ }
+ } else {
+ state2.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
+ }
+ didReadContent = true;
+ detectedIndent = true;
+ emptyLines = 0;
+ captureStart = state2.position;
+ while (!is_EOL(ch) && ch !== 0) {
+ ch = state2.input.charCodeAt(++state2.position);
+ }
+ captureSegment(state2, captureStart, state2.position, false);
+ }
+ return true;
+}
+function readBlockSequence(state2, nodeIndent) {
+ var _line, _tag = state2.tag, _anchor = state2.anchor, _result = [], following, detected = false, ch;
+ if (state2.firstTabInLine !== -1)
+ return false;
+ if (state2.anchor !== null) {
+ state2.anchorMap[state2.anchor] = _result;
+ }
+ ch = state2.input.charCodeAt(state2.position);
+ while (ch !== 0) {
+ if (state2.firstTabInLine !== -1) {
+ state2.position = state2.firstTabInLine;
+ throwError(state2, "tab characters must not be used in indentation");
+ }
+ if (ch !== 45) {
+ break;
+ }
+ following = state2.input.charCodeAt(state2.position + 1);
+ if (!is_WS_OR_EOL(following)) {
+ break;
+ }
+ detected = true;
+ state2.position++;
+ if (skipSeparationSpace(state2, true, -1)) {
+ if (state2.lineIndent <= nodeIndent) {
+ _result.push(null);
+ ch = state2.input.charCodeAt(state2.position);
+ continue;
+ }
+ }
+ _line = state2.line;
+ composeNode(state2, nodeIndent, CONTEXT_BLOCK_IN, false, true);
+ _result.push(state2.result);
+ skipSeparationSpace(state2, true, -1);
+ ch = state2.input.charCodeAt(state2.position);
+ if ((state2.line === _line || state2.lineIndent > nodeIndent) && ch !== 0) {
+ throwError(state2, "bad indentation of a sequence entry");
+ } else if (state2.lineIndent < nodeIndent) {
+ break;
+ }
+ }
+ if (detected) {
+ state2.tag = _tag;
+ state2.anchor = _anchor;
+ state2.kind = "sequence";
+ state2.result = _result;
+ return true;
+ }
+ return false;
+}
+function readBlockMapping(state2, nodeIndent, flowIndent) {
+ var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state2.tag, _anchor = state2.anchor, _result = {}, overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch;
+ if (state2.firstTabInLine !== -1)
+ return false;
+ if (state2.anchor !== null) {
+ state2.anchorMap[state2.anchor] = _result;
+ }
+ ch = state2.input.charCodeAt(state2.position);
+ while (ch !== 0) {
+ if (!atExplicitKey && state2.firstTabInLine !== -1) {
+ state2.position = state2.firstTabInLine;
+ throwError(state2, "tab characters must not be used in indentation");
+ }
+ following = state2.input.charCodeAt(state2.position + 1);
+ _line = state2.line;
+ if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) {
+ if (ch === 63) {
+ if (atExplicitKey) {
+ storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
+ keyTag = keyNode = valueNode = null;
+ }
+ detected = true;
+ atExplicitKey = true;
+ allowCompact = true;
+ } else if (atExplicitKey) {
+ atExplicitKey = false;
+ allowCompact = true;
+ } else {
+ throwError(state2, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");
+ }
+ state2.position += 1;
+ ch = following;
+ } else {
+ _keyLine = state2.line;
+ _keyLineStart = state2.lineStart;
+ _keyPos = state2.position;
+ if (!composeNode(state2, flowIndent, CONTEXT_FLOW_OUT, false, true)) {
+ break;
+ }
+ if (state2.line === _line) {
+ ch = state2.input.charCodeAt(state2.position);
+ while (is_WHITE_SPACE(ch)) {
+ ch = state2.input.charCodeAt(++state2.position);
+ }
+ if (ch === 58) {
+ ch = state2.input.charCodeAt(++state2.position);
+ if (!is_WS_OR_EOL(ch)) {
+ throwError(state2, "a whitespace character is expected after the key-value separator within a block mapping");
+ }
+ if (atExplicitKey) {
+ storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
+ keyTag = keyNode = valueNode = null;
+ }
+ detected = true;
+ atExplicitKey = false;
+ allowCompact = false;
+ keyTag = state2.tag;
+ keyNode = state2.result;
+ } else if (detected) {
+ throwError(state2, "can not read an implicit mapping pair; a colon is missed");
+ } else {
+ state2.tag = _tag;
+ state2.anchor = _anchor;
+ return true;
+ }
+ } else if (detected) {
+ throwError(state2, "can not read a block mapping entry; a multiline key may not be an implicit key");
+ } else {
+ state2.tag = _tag;
+ state2.anchor = _anchor;
+ return true;
+ }
+ }
+ if (state2.line === _line || state2.lineIndent > nodeIndent) {
+ if (atExplicitKey) {
+ _keyLine = state2.line;
+ _keyLineStart = state2.lineStart;
+ _keyPos = state2.position;
+ }
+ if (composeNode(state2, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {
+ if (atExplicitKey) {
+ keyNode = state2.result;
+ } else {
+ valueNode = state2.result;
+ }
+ }
+ if (!atExplicitKey) {
+ storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);
+ keyTag = keyNode = valueNode = null;
+ }
+ skipSeparationSpace(state2, true, -1);
+ ch = state2.input.charCodeAt(state2.position);
+ }
+ if ((state2.line === _line || state2.lineIndent > nodeIndent) && ch !== 0) {
+ throwError(state2, "bad indentation of a mapping entry");
+ } else if (state2.lineIndent < nodeIndent) {
+ break;
+ }
+ }
+ if (atExplicitKey) {
+ storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
+ }
+ if (detected) {
+ state2.tag = _tag;
+ state2.anchor = _anchor;
+ state2.kind = "mapping";
+ state2.result = _result;
+ }
+ return detected;
+}
+function readTagProperty(state2) {
+ var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch;
+ ch = state2.input.charCodeAt(state2.position);
+ if (ch !== 33)
+ return false;
+ if (state2.tag !== null) {
+ throwError(state2, "duplication of a tag property");
+ }
+ ch = state2.input.charCodeAt(++state2.position);
+ if (ch === 60) {
+ isVerbatim = true;
+ ch = state2.input.charCodeAt(++state2.position);
+ } else if (ch === 33) {
+ isNamed = true;
+ tagHandle = "!!";
+ ch = state2.input.charCodeAt(++state2.position);
+ } else {
+ tagHandle = "!";
+ }
+ _position = state2.position;
+ if (isVerbatim) {
+ do {
+ ch = state2.input.charCodeAt(++state2.position);
+ } while (ch !== 0 && ch !== 62);
+ if (state2.position < state2.length) {
+ tagName = state2.input.slice(_position, state2.position);
+ ch = state2.input.charCodeAt(++state2.position);
+ } else {
+ throwError(state2, "unexpected end of the stream within a verbatim tag");
+ }
+ } else {
+ while (ch !== 0 && !is_WS_OR_EOL(ch)) {
+ if (ch === 33) {
+ if (!isNamed) {
+ tagHandle = state2.input.slice(_position - 1, state2.position + 1);
+ if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
+ throwError(state2, "named tag handle cannot contain such characters");
+ }
+ isNamed = true;
+ _position = state2.position + 1;
+ } else {
+ throwError(state2, "tag suffix cannot contain exclamation marks");
+ }
+ }
+ ch = state2.input.charCodeAt(++state2.position);
+ }
+ tagName = state2.input.slice(_position, state2.position);
+ if (PATTERN_FLOW_INDICATORS.test(tagName)) {
+ throwError(state2, "tag suffix cannot contain flow indicator characters");
+ }
+ }
+ if (tagName && !PATTERN_TAG_URI.test(tagName)) {
+ throwError(state2, "tag name cannot contain such characters: " + tagName);
+ }
+ try {
+ tagName = decodeURIComponent(tagName);
+ } catch (err) {
+ throwError(state2, "tag name is malformed: " + tagName);
+ }
+ if (isVerbatim) {
+ state2.tag = tagName;
+ } else if (_hasOwnProperty$1.call(state2.tagMap, tagHandle)) {
+ state2.tag = state2.tagMap[tagHandle] + tagName;
+ } else if (tagHandle === "!") {
+ state2.tag = "!" + tagName;
+ } else if (tagHandle === "!!") {
+ state2.tag = "tag:yaml.org,2002:" + tagName;
+ } else {
+ throwError(state2, 'undeclared tag handle "' + tagHandle + '"');
+ }
+ return true;
+}
+function readAnchorProperty(state2) {
+ var _position, ch;
+ ch = state2.input.charCodeAt(state2.position);
+ if (ch !== 38)
+ return false;
+ if (state2.anchor !== null) {
+ throwError(state2, "duplication of an anchor property");
+ }
+ ch = state2.input.charCodeAt(++state2.position);
+ _position = state2.position;
+ while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
+ ch = state2.input.charCodeAt(++state2.position);
+ }
+ if (state2.position === _position) {
+ throwError(state2, "name of an anchor node must contain at least one character");
+ }
+ state2.anchor = state2.input.slice(_position, state2.position);
+ return true;
+}
+function readAlias(state2) {
+ var _position, alias, ch;
+ ch = state2.input.charCodeAt(state2.position);
+ if (ch !== 42)
+ return false;
+ ch = state2.input.charCodeAt(++state2.position);
+ _position = state2.position;
+ while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
+ ch = state2.input.charCodeAt(++state2.position);
+ }
+ if (state2.position === _position) {
+ throwError(state2, "name of an alias node must contain at least one character");
+ }
+ alias = state2.input.slice(_position, state2.position);
+ if (!_hasOwnProperty$1.call(state2.anchorMap, alias)) {
+ throwError(state2, 'unidentified alias "' + alias + '"');
+ }
+ state2.result = state2.anchorMap[alias];
+ skipSeparationSpace(state2, true, -1);
+ return true;
+}
+function composeNode(state2, parentIndent, nodeContext, allowToSeek, allowCompact) {
+ var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type22, flowIndent, blockIndent;
+ if (state2.listener !== null) {
+ state2.listener("open", state2);
+ }
+ state2.tag = null;
+ state2.anchor = null;
+ state2.kind = null;
+ state2.result = null;
+ allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext;
+ if (allowToSeek) {
+ if (skipSeparationSpace(state2, true, -1)) {
+ atNewLine = true;
+ if (state2.lineIndent > parentIndent) {
+ indentStatus = 1;
+ } else if (state2.lineIndent === parentIndent) {
+ indentStatus = 0;
+ } else if (state2.lineIndent < parentIndent) {
+ indentStatus = -1;
+ }
+ }
+ }
+ if (indentStatus === 1) {
+ while (readTagProperty(state2) || readAnchorProperty(state2)) {
+ if (skipSeparationSpace(state2, true, -1)) {
+ atNewLine = true;
+ allowBlockCollections = allowBlockStyles;
+ if (state2.lineIndent > parentIndent) {
+ indentStatus = 1;
+ } else if (state2.lineIndent === parentIndent) {
+ indentStatus = 0;
+ } else if (state2.lineIndent < parentIndent) {
+ indentStatus = -1;
+ }
+ } else {
+ allowBlockCollections = false;
+ }
+ }
+ }
+ if (allowBlockCollections) {
+ allowBlockCollections = atNewLine || allowCompact;
+ }
+ if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
+ if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
+ flowIndent = parentIndent;
+ } else {
+ flowIndent = parentIndent + 1;
+ }
+ blockIndent = state2.position - state2.lineStart;
+ if (indentStatus === 1) {
+ if (allowBlockCollections && (readBlockSequence(state2, blockIndent) || readBlockMapping(state2, blockIndent, flowIndent)) || readFlowCollection(state2, flowIndent)) {
+ hasContent = true;
+ } else {
+ if (allowBlockScalars && readBlockScalar(state2, flowIndent) || readSingleQuotedScalar(state2, flowIndent) || readDoubleQuotedScalar(state2, flowIndent)) {
+ hasContent = true;
+ } else if (readAlias(state2)) {
+ hasContent = true;
+ if (state2.tag !== null || state2.anchor !== null) {
+ throwError(state2, "alias node should not have any properties");
+ }
+ } else if (readPlainScalar(state2, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
+ hasContent = true;
+ if (state2.tag === null) {
+ state2.tag = "?";
+ }
+ }
+ if (state2.anchor !== null) {
+ state2.anchorMap[state2.anchor] = state2.result;
+ }
+ }
+ } else if (indentStatus === 0) {
+ hasContent = allowBlockCollections && readBlockSequence(state2, blockIndent);
+ }
+ }
+ if (state2.tag === null) {
+ if (state2.anchor !== null) {
+ state2.anchorMap[state2.anchor] = state2.result;
+ }
+ } else if (state2.tag === "?") {
+ if (state2.result !== null && state2.kind !== "scalar") {
+ throwError(state2, 'unacceptable node kind for !> tag; it should be "scalar", not "' + state2.kind + '"');
+ }
+ for (typeIndex = 0, typeQuantity = state2.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
+ type22 = state2.implicitTypes[typeIndex];
+ if (type22.resolve(state2.result)) {
+ state2.result = type22.construct(state2.result);
+ state2.tag = type22.tag;
+ if (state2.anchor !== null) {
+ state2.anchorMap[state2.anchor] = state2.result;
+ }
+ break;
+ }
+ }
+ } else if (state2.tag !== "!") {
+ if (_hasOwnProperty$1.call(state2.typeMap[state2.kind || "fallback"], state2.tag)) {
+ type22 = state2.typeMap[state2.kind || "fallback"][state2.tag];
+ } else {
+ type22 = null;
+ typeList = state2.typeMap.multi[state2.kind || "fallback"];
+ for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {
+ if (state2.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {
+ type22 = typeList[typeIndex];
+ break;
+ }
+ }
+ }
+ if (!type22) {
+ throwError(state2, "unknown tag !<" + state2.tag + ">");
+ }
+ if (state2.result !== null && type22.kind !== state2.kind) {
+ throwError(state2, "unacceptable node kind for !<" + state2.tag + '> tag; it should be "' + type22.kind + '", not "' + state2.kind + '"');
+ }
+ if (!type22.resolve(state2.result, state2.tag)) {
+ throwError(state2, "cannot resolve a node with !<" + state2.tag + "> explicit tag");
+ } else {
+ state2.result = type22.construct(state2.result, state2.tag);
+ if (state2.anchor !== null) {
+ state2.anchorMap[state2.anchor] = state2.result;
+ }
+ }
+ }
+ if (state2.listener !== null) {
+ state2.listener("close", state2);
+ }
+ return state2.tag !== null || state2.anchor !== null || hasContent;
+}
+function readDocument(state2) {
+ var documentStart = state2.position, _position, directiveName, directiveArgs, hasDirectives = false, ch;
+ state2.version = null;
+ state2.checkLineBreaks = state2.legacy;
+ state2.tagMap = /* @__PURE__ */ Object.create(null);
+ state2.anchorMap = /* @__PURE__ */ Object.create(null);
+ while ((ch = state2.input.charCodeAt(state2.position)) !== 0) {
+ skipSeparationSpace(state2, true, -1);
+ ch = state2.input.charCodeAt(state2.position);
+ if (state2.lineIndent > 0 || ch !== 37) {
+ break;
+ }
+ hasDirectives = true;
+ ch = state2.input.charCodeAt(++state2.position);
+ _position = state2.position;
+ while (ch !== 0 && !is_WS_OR_EOL(ch)) {
+ ch = state2.input.charCodeAt(++state2.position);
+ }
+ directiveName = state2.input.slice(_position, state2.position);
+ directiveArgs = [];
+ if (directiveName.length < 1) {
+ throwError(state2, "directive name must not be less than one character in length");
+ }
+ while (ch !== 0) {
+ while (is_WHITE_SPACE(ch)) {
+ ch = state2.input.charCodeAt(++state2.position);
+ }
+ if (ch === 35) {
+ do {
+ ch = state2.input.charCodeAt(++state2.position);
+ } while (ch !== 0 && !is_EOL(ch));
+ break;
+ }
+ if (is_EOL(ch))
+ break;
+ _position = state2.position;
+ while (ch !== 0 && !is_WS_OR_EOL(ch)) {
+ ch = state2.input.charCodeAt(++state2.position);
+ }
+ directiveArgs.push(state2.input.slice(_position, state2.position));
+ }
+ if (ch !== 0)
+ readLineBreak(state2);
+ if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) {
+ directiveHandlers[directiveName](state2, directiveName, directiveArgs);
+ } else {
+ throwWarning(state2, 'unknown document directive "' + directiveName + '"');
+ }
+ }
+ skipSeparationSpace(state2, true, -1);
+ if (state2.lineIndent === 0 && state2.input.charCodeAt(state2.position) === 45 && state2.input.charCodeAt(state2.position + 1) === 45 && state2.input.charCodeAt(state2.position + 2) === 45) {
+ state2.position += 3;
+ skipSeparationSpace(state2, true, -1);
+ } else if (hasDirectives) {
+ throwError(state2, "directives end mark is expected");
+ }
+ composeNode(state2, state2.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
+ skipSeparationSpace(state2, true, -1);
+ if (state2.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state2.input.slice(documentStart, state2.position))) {
+ throwWarning(state2, "non-ASCII line breaks are interpreted as content");
+ }
+ state2.documents.push(state2.result);
+ if (state2.position === state2.lineStart && testDocumentSeparator(state2)) {
+ if (state2.input.charCodeAt(state2.position) === 46) {
+ state2.position += 3;
+ skipSeparationSpace(state2, true, -1);
+ }
+ return;
+ }
+ if (state2.position < state2.length - 1) {
+ throwError(state2, "end of the stream or a document separator is expected");
+ } else {
+ return;
+ }
+}
+function loadDocuments(input, options) {
+ input = String(input);
+ options = options || {};
+ if (input.length !== 0) {
+ if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) {
+ input += "\n";
+ }
+ if (input.charCodeAt(0) === 65279) {
+ input = input.slice(1);
+ }
+ }
+ var state2 = new State$1(input, options);
+ var nullpos = input.indexOf("\0");
+ if (nullpos !== -1) {
+ state2.position = nullpos;
+ throwError(state2, "null byte is not allowed in input");
+ }
+ state2.input += "\0";
+ while (state2.input.charCodeAt(state2.position) === 32) {
+ state2.lineIndent += 1;
+ state2.position += 1;
+ }
+ while (state2.position < state2.length - 1) {
+ readDocument(state2);
+ }
+ return state2.documents;
+}
+function loadAll$1(input, iterator2, options) {
+ if (iterator2 !== null && typeof iterator2 === "object" && typeof options === "undefined") {
+ options = iterator2;
+ iterator2 = null;
+ }
+ var documents = loadDocuments(input, options);
+ if (typeof iterator2 !== "function") {
+ return documents;
+ }
+ for (var index2 = 0, length2 = documents.length; index2 < length2; index2 += 1) {
+ iterator2(documents[index2]);
+ }
+}
+function load$1(input, options) {
+ var documents = loadDocuments(input, options);
+ if (documents.length === 0) {
+ return void 0;
+ } else if (documents.length === 1) {
+ return documents[0];
+ }
+ throw new exception("expected a single document in the stream, but found more");
+}
+var loadAll_1 = loadAll$1;
+var load_1 = load$1;
+var loader$k = {
+ loadAll: loadAll_1,
+ load: load_1
+};
+var FAILSAFE_SCHEMA = failsafe;
+var load = loader$k.load;
+var frontMatterRegex = /^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s;
+function extractFrontMatter(text2, db) {
+ var _a, _b;
+ const matches = text2.match(frontMatterRegex);
+ if (matches) {
+ const parsed = load(matches[1], {
+ // To keep things simple, only allow strings, arrays, and plain objects.
+ // https://www.yaml.org/spec/1.2/spec.html#id2802346
+ schema: FAILSAFE_SCHEMA
+ });
+ if (parsed == null ? void 0 : parsed.title) {
+ (_a = db.setDiagramTitle) == null ? void 0 : _a.call(db, parsed.title);
+ }
+ if (parsed == null ? void 0 : parsed.displayMode) {
+ (_b = db.setDisplayMode) == null ? void 0 : _b.call(db, parsed.displayMode);
+ }
+ return text2.slice(matches[0].length);
+ } else {
+ return text2;
+ }
+}
+var assignWithDepth = function(dst, src, config2) {
+ const { depth, clobber } = Object.assign({ depth: 2, clobber: false }, config2);
+ if (Array.isArray(src) && !Array.isArray(dst)) {
+ src.forEach((s2) => assignWithDepth(dst, s2, config2));
+ return dst;
+ } else if (Array.isArray(src) && Array.isArray(dst)) {
+ src.forEach((s2) => {
+ if (!dst.includes(s2)) {
+ dst.push(s2);
+ }
+ });
+ return dst;
+ }
+ if (dst === void 0 || depth <= 0) {
+ if (dst !== void 0 && dst !== null && typeof dst === "object" && typeof src === "object") {
+ return Object.assign(dst, src);
+ } else {
+ return src;
+ }
+ }
+ if (src !== void 0 && typeof dst === "object" && typeof src === "object") {
+ Object.keys(src).forEach((key) => {
+ if (typeof src[key] === "object" && (dst[key] === void 0 || typeof dst[key] === "object")) {
+ if (dst[key] === void 0) {
+ dst[key] = Array.isArray(src[key]) ? [] : {};
+ }
+ dst[key] = assignWithDepth(dst[key], src[key], { depth: depth - 1, clobber });
+ } else if (clobber || typeof dst[key] !== "object" && typeof src[key] !== "object") {
+ dst[key] = src[key];
+ }
+ });
+ }
+ return dst;
+};
+var assignWithDepth$1 = assignWithDepth;
+var defaultConfig = Object.freeze(defaultConfig$1);
+var siteConfig = assignWithDepth$1({}, defaultConfig);
+var configFromInitialize;
+var directives = [];
+var currentConfig = assignWithDepth$1({}, defaultConfig);
+var updateCurrentConfig = (siteCfg, _directives) => {
+ let cfg = assignWithDepth$1({}, siteCfg);
+ let sumOfDirectives = {};
+ for (const d of _directives) {
+ sanitize(d);
+ sumOfDirectives = assignWithDepth$1(sumOfDirectives, d);
+ }
+ cfg = assignWithDepth$1(cfg, sumOfDirectives);
+ if (sumOfDirectives.theme && sumOfDirectives.theme in theme) {
+ const tmpConfigFromInitialize = assignWithDepth$1({}, configFromInitialize);
+ const themeVariables = assignWithDepth$1(
+ tmpConfigFromInitialize.themeVariables || {},
+ sumOfDirectives.themeVariables
+ );
+ if (cfg.theme && cfg.theme in theme) {
+ cfg.themeVariables = theme[cfg.theme].getThemeVariables(themeVariables);
+ }
+ }
+ currentConfig = cfg;
+ checkConfig(currentConfig);
+ return currentConfig;
+};
+var setSiteConfig = (conf) => {
+ siteConfig = assignWithDepth$1({}, defaultConfig);
+ siteConfig = assignWithDepth$1(siteConfig, conf);
+ if (conf.theme && theme[conf.theme]) {
+ siteConfig.themeVariables = theme[conf.theme].getThemeVariables(conf.themeVariables);
+ }
+ updateCurrentConfig(siteConfig, directives);
+ return siteConfig;
+};
+var saveConfigFromInitialize = (conf) => {
+ configFromInitialize = assignWithDepth$1({}, conf);
+};
+var updateSiteConfig = (conf) => {
+ siteConfig = assignWithDepth$1(siteConfig, conf);
+ updateCurrentConfig(siteConfig, directives);
+ return siteConfig;
+};
+var getSiteConfig = () => {
+ return assignWithDepth$1({}, siteConfig);
+};
+var setConfig = (conf) => {
+ checkConfig(conf);
+ assignWithDepth$1(currentConfig, conf);
+ return getConfig$1();
+};
+var getConfig$1 = () => {
+ return assignWithDepth$1({}, currentConfig);
+};
+var sanitize = (options) => {
+ ["secure", ...siteConfig.secure ?? []].forEach((key) => {
+ if (options[key] !== void 0) {
+ log$1.debug(`Denied attempt to modify a secure key ${key}`, options[key]);
+ delete options[key];
+ }
+ });
+ Object.keys(options).forEach((key) => {
+ if (key.indexOf("__") === 0) {
+ delete options[key];
+ }
+ });
+ Object.keys(options).forEach((key) => {
+ if (typeof options[key] === "string" && (options[key].includes("<") || options[key].includes(">") || options[key].includes("url(data:"))) {
+ delete options[key];
+ }
+ if (typeof options[key] === "object") {
+ sanitize(options[key]);
+ }
+ });
+};
+var addDirective = (directive2) => {
+ if (directive2.fontFamily) {
+ if (!directive2.themeVariables) {
+ directive2.themeVariables = { fontFamily: directive2.fontFamily };
+ } else {
+ if (!directive2.themeVariables.fontFamily) {
+ directive2.themeVariables = { fontFamily: directive2.fontFamily };
+ }
+ }
+ }
+ directives.push(directive2);
+ updateCurrentConfig(siteConfig, directives);
+};
+var reset = (config2 = siteConfig) => {
+ directives = [];
+ updateCurrentConfig(config2, directives);
+};
+var ConfigWarning = {
+ LAZY_LOAD_DEPRECATED: "The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."
+};
+var issuedWarnings = {};
+var issueWarning = (warning) => {
+ if (issuedWarnings[warning]) {
+ return;
+ }
+ log$1.warn(ConfigWarning[warning]);
+ issuedWarnings[warning] = true;
+};
+var checkConfig = (config2) => {
+ if (!config2) {
+ return;
+ }
+ if (config2.lazyLoadedDiagrams || config2.loadExternalDiagramsAtStartup) {
+ issueWarning("LAZY_LOAD_DEPRECATED");
+ }
+};
+var d3Attrs = function(d3Elem, attrs) {
+ for (let attr of attrs) {
+ d3Elem.attr(attr[0], attr[1]);
+ }
+};
+var calculateSvgSizeAttrs = function(height, width, useMaxWidth) {
+ let attrs = /* @__PURE__ */ new Map();
+ if (useMaxWidth) {
+ attrs.set("width", "100%");
+ attrs.set("style", `max-width: ${width}px;`);
+ } else {
+ attrs.set("height", height);
+ attrs.set("width", width);
+ }
+ return attrs;
+};
+var configureSvgSize = function(svgElem, height, width, useMaxWidth) {
+ const attrs = calculateSvgSizeAttrs(height, width, useMaxWidth);
+ d3Attrs(svgElem, attrs);
+};
+var setupGraphViewbox$1 = function(graph, svgElem, padding, useMaxWidth) {
+ const svgBounds = svgElem.node().getBBox();
+ const sWidth = svgBounds.width;
+ const sHeight = svgBounds.height;
+ log$1.info(`SVG bounds: ${sWidth}x${sHeight}`, svgBounds);
+ let width = 0;
+ let height = 0;
+ log$1.info(`Graph bounds: ${width}x${height}`, graph);
+ width = sWidth + padding * 2;
+ height = sHeight + padding * 2;
+ log$1.info(`Calculated bounds: ${width}x${height}`);
+ configureSvgSize(svgElem, height, width, useMaxWidth);
+ const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${svgBounds.width + 2 * padding} ${svgBounds.height + 2 * padding}`;
+ svgElem.attr("viewBox", vBox);
+};
+var themes = {};
+var getStyles = (type22, userStyles, options) => {
+ let diagramStyles = "";
+ if (type22 in themes && themes[type22]) {
+ diagramStyles = themes[type22](options);
+ } else {
+ log$1.warn(`No theme found for ${type22}`);
+ }
+ return ` & {
+ font-family: ${options.fontFamily};
+ font-size: ${options.fontSize};
+ fill: ${options.textColor}
+ }
+
+ /* Classes common for multiple diagrams */
+
+ & .error-icon {
+ fill: ${options.errorBkgColor};
+ }
+ & .error-text {
+ fill: ${options.errorTextColor};
+ stroke: ${options.errorTextColor};
+ }
+
+ & .edge-thickness-normal {
+ stroke-width: 2px;
+ }
+ & .edge-thickness-thick {
+ stroke-width: 3.5px
+ }
+ & .edge-pattern-solid {
+ stroke-dasharray: 0;
+ }
+
+ & .edge-pattern-dashed{
+ stroke-dasharray: 3;
+ }
+ .edge-pattern-dotted {
+ stroke-dasharray: 2;
+ }
+
+ & .marker {
+ fill: ${options.lineColor};
+ stroke: ${options.lineColor};
+ }
+ & .marker.cross {
+ stroke: ${options.lineColor};
+ }
+
+ & svg {
+ font-family: ${options.fontFamily};
+ font-size: ${options.fontSize};
+ }
+
+ ${diagramStyles}
+
+ ${userStyles}
+`;
+};
+var addStylesForDiagram = (type22, diagramTheme) => {
+ if (diagramTheme !== void 0) {
+ themes[type22] = diagramTheme;
+ }
+};
+var getStyles$1 = getStyles;
+var title = "";
+var diagramTitle = "";
+var description = "";
+var sanitizeText$1 = (txt) => sanitizeText$2(txt, getConfig$1());
+var clear = function() {
+ title = "";
+ description = "";
+ diagramTitle = "";
+};
+var setAccTitle = function(txt) {
+ title = sanitizeText$1(txt).replace(/^\s+/g, "");
+};
+var getAccTitle = function() {
+ return title || diagramTitle;
+};
+var setAccDescription = function(txt) {
+ description = sanitizeText$1(txt).replace(/\n\s+/g, "\n");
+};
+var getAccDescription = function() {
+ return description;
+};
+var setDiagramTitle = function(txt) {
+ diagramTitle = sanitizeText$1(txt);
+};
+var getDiagramTitle = function() {
+ return diagramTitle;
+};
+var commonDb = {
+ getAccTitle,
+ setAccTitle,
+ getDiagramTitle,
+ setDiagramTitle,
+ getAccDescription,
+ setAccDescription,
+ clear
+};
+var commonDb$1 = Object.freeze(Object.defineProperty({
+ __proto__: null,
+ clear,
+ default: commonDb,
+ getAccDescription,
+ getAccTitle,
+ getDiagramTitle,
+ setAccDescription,
+ setAccTitle,
+ setDiagramTitle
+}, Symbol.toStringTag, { value: "Module" }));
+var currentDirective = {};
+var parseDirective$1 = function(p, statement, context, type22) {
+ log$1.debug("parseDirective is being called", statement, context, type22);
+ try {
+ if (statement !== void 0) {
+ statement = statement.trim();
+ switch (context) {
+ case "open_directive":
+ currentDirective = {};
+ break;
+ case "type_directive":
+ if (!currentDirective) {
+ throw new Error("currentDirective is undefined");
+ }
+ currentDirective.type = statement.toLowerCase();
+ break;
+ case "arg_directive":
+ if (!currentDirective) {
+ throw new Error("currentDirective is undefined");
+ }
+ currentDirective.args = JSON.parse(statement);
+ break;
+ case "close_directive":
+ handleDirective(p, currentDirective, type22);
+ currentDirective = void 0;
+ break;
+ }
+ }
+ } catch (error) {
+ log$1.error(
+ `Error while rendering sequenceDiagram directive: ${statement} jison context: ${context}`
+ );
+ log$1.error(error.message);
+ }
+};
+var handleDirective = function(p, directive2, type22) {
+ log$1.info(`Directive type=${directive2.type} with args:`, directive2.args);
+ switch (directive2.type) {
+ case "init":
+ case "initialize": {
+ ["config"].forEach((prop) => {
+ if (directive2.args[prop] !== void 0) {
+ if (type22 === "flowchart-v2") {
+ type22 = "flowchart";
+ }
+ directive2.args[type22] = directive2.args[prop];
+ delete directive2.args[prop];
+ }
+ });
+ log$1.info("sanitize in handleDirective", directive2.args);
+ directiveSanitizer(directive2.args);
+ log$1.info("sanitize in handleDirective (done)", directive2.args);
+ addDirective(directive2.args);
+ break;
+ }
+ case "wrap":
+ case "nowrap":
+ if (p && p["setWrap"]) {
+ p.setWrap(directive2.type === "wrap");
+ }
+ break;
+ case "themeCss":
+ log$1.warn("themeCss encountered");
+ break;
+ default:
+ log$1.warn(
+ `Unhandled directive: source: '%%{${directive2.type}: ${JSON.stringify(
+ directive2.args ? directive2.args : {}
+ )}}%%`,
+ directive2
+ );
+ break;
+ }
+};
+var log3 = log$1;
+var setLogLevel = setLogLevel$1;
+var getConfig = getConfig$1;
+var sanitizeText = (text2) => sanitizeText$2(text2, getConfig());
+var setupGraphViewbox = setupGraphViewbox$1;
+var getCommonDb = () => {
+ return commonDb$1;
+};
+var parseDirective = (p, statement, context, type22) => parseDirective$1(p, statement, context, type22);
+var diagrams = {};
+var registerDiagram = (id22, diagram2, detector2) => {
+ if (diagrams[id22]) {
+ throw new Error(`Diagram ${id22} already registered.`);
+ }
+ diagrams[id22] = diagram2;
+ if (detector2) {
+ addDetector(id22, detector2);
+ }
+ addStylesForDiagram(id22, diagram2.styles);
+ if (diagram2.injectUtils) {
+ diagram2.injectUtils(
+ log3,
+ setLogLevel,
+ getConfig,
+ sanitizeText,
+ setupGraphViewbox,
+ getCommonDb(),
+ parseDirective
+ );
+ }
+};
+var getDiagram = (name) => {
+ if (name in diagrams) {
+ return diagrams[name];
+ }
+ throw new DiagramNotFoundError(name);
+};
+var DiagramNotFoundError = class extends Error {
+ constructor(name) {
+ super(`Diagram ${name} not found.`);
+ }
+};
+var UnknownDiagramError = class extends Error {
+ constructor(message) {
+ super(message);
+ this.name = "UnknownDiagramError";
+ }
+};
+var directive$1 = /%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi;
+var anyComment = /\s*%%.*\n/gm;
+var detectors = {};
+var detectType = function(text2, config2) {
+ text2 = text2.replace(frontMatterRegex, "").replace(directive$1, "").replace(anyComment, "\n");
+ for (const [key, { detector: detector2 }] of Object.entries(detectors)) {
+ const diagram2 = detector2(text2, config2);
+ if (diagram2) {
+ return key;
+ }
+ }
+ throw new UnknownDiagramError(
+ `No diagram type detected matching given configuration for text: ${text2}`
+ );
+};
+var registerLazyLoadedDiagrams = (...diagrams2) => {
+ for (const { id: id22, detector: detector2, loader: loader2 } of diagrams2) {
+ addDetector(id22, detector2, loader2);
+ }
+};
+var loadRegisteredDiagrams = async () => {
+ log$1.debug(`Loading registered diagrams`);
+ const results = await Promise.allSettled(
+ Object.entries(detectors).map(async ([key, { detector: detector2, loader: loader2 }]) => {
+ if (loader2) {
+ try {
+ getDiagram(key);
+ } catch (error) {
+ try {
+ const { diagram: diagram2, id: id22 } = await loader2();
+ registerDiagram(id22, diagram2, detector2);
+ } catch (err) {
+ log$1.error(`Failed to load external diagram with key ${key}. Removing from detectors.`);
+ delete detectors[key];
+ throw err;
+ }
+ }
+ }
+ })
+ );
+ const failed = results.filter((result) => result.status === "rejected");
+ if (failed.length > 0) {
+ log$1.error(`Failed to load ${failed.length} external diagrams`);
+ for (const res of failed) {
+ log$1.error(res);
+ }
+ throw new Error(`Failed to load ${failed.length} external diagrams`);
+ }
+};
+var addDetector = (key, detector2, loader2) => {
+ if (detectors[key]) {
+ log$1.error(`Detector with key ${key} already exists`);
+ } else {
+ detectors[key] = { detector: detector2, loader: loader2 };
+ }
+ log$1.debug(`Detector with key ${key} added${loader2 ? " with loader" : ""}`);
+};
+var getDiagramLoader = (key) => {
+ return detectors[key].loader;
+};
+var ZERO_WIDTH_SPACE = "";
+var d3CurveTypes = {
+ curveBasis: basis_default2,
+ curveBasisClosed: basisClosed_default2,
+ curveBasisOpen: basisOpen_default,
+ curveBumpX: bumpX,
+ curveBumpY: bumpY,
+ curveBundle: bundle_default,
+ curveCardinalClosed: cardinalClosed_default,
+ curveCardinalOpen: cardinalOpen_default,
+ curveCardinal: cardinal_default,
+ curveCatmullRomClosed: catmullRomClosed_default,
+ curveCatmullRomOpen: catmullRomOpen_default,
+ curveCatmullRom: catmullRom_default,
+ curveLinear: linear_default,
+ curveLinearClosed: linearClosed_default,
+ curveMonotoneX: monotoneX,
+ curveMonotoneY: monotoneY,
+ curveNatural: natural_default,
+ curveStep: step_default,
+ curveStepAfter: stepAfter,
+ curveStepBefore: stepBefore
+};
+var directive = /%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi;
+var directiveWithoutOpen = /\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi;
+var detectInit = function(text2, config2) {
+ const inits = detectDirective(text2, /(?:init\b)|(?:initialize\b)/);
+ let results = {};
+ if (Array.isArray(inits)) {
+ const args = inits.map((init22) => init22.args);
+ directiveSanitizer(args);
+ results = assignWithDepth$1(results, [...args]);
+ } else {
+ results = inits.args;
+ }
+ if (results) {
+ let type22 = detectType(text2, config2);
+ ["config"].forEach((prop) => {
+ if (results[prop] !== void 0) {
+ if (type22 === "flowchart-v2") {
+ type22 = "flowchart";
+ }
+ results[type22] = results[prop];
+ delete results[prop];
+ }
+ });
+ }
+ return results;
+};
+var detectDirective = function(text2, type22 = null) {
+ try {
+ const commentWithoutDirectives = new RegExp(
+ `[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).*
+`,
+ "ig"
+ );
+ text2 = text2.trim().replace(commentWithoutDirectives, "").replace(/'/gm, '"');
+ log$1.debug(
+ `Detecting diagram directive${type22 !== null ? " type:" + type22 : ""} based on the text:${text2}`
+ );
+ let match2;
+ const result = [];
+ while ((match2 = directive.exec(text2)) !== null) {
+ if (match2.index === directive.lastIndex) {
+ directive.lastIndex++;
+ }
+ if (match2 && !type22 || type22 && match2[1] && match2[1].match(type22) || type22 && match2[2] && match2[2].match(type22)) {
+ const type222 = match2[1] ? match2[1] : match2[2];
+ const args = match2[3] ? match2[3].trim() : match2[4] ? JSON.parse(match2[4].trim()) : null;
+ result.push({ type: type222, args });
+ }
+ }
+ if (result.length === 0) {
+ result.push({ type: text2, args: null });
+ }
+ return result.length === 1 ? result[0] : result;
+ } catch (error) {
+ log$1.error(
+ `ERROR: ${error.message} - Unable to parse directive
+ ${type22 !== null ? " type:" + type22 : ""} based on the text:${text2}`
+ );
+ return { type: null, args: null };
+ }
+};
+var isSubstringInArray = function(str2, arr) {
+ for (const [i, element] of arr.entries()) {
+ if (element.match(str2)) {
+ return i;
+ }
+ }
+ return -1;
+};
+function interpolateToCurve(interpolate, defaultCurve) {
+ if (!interpolate) {
+ return defaultCurve;
+ }
+ const curveName = `curve${interpolate.charAt(0).toUpperCase() + interpolate.slice(1)}`;
+ return d3CurveTypes[curveName] || defaultCurve;
+}
+function formatUrl(linkStr, config2) {
+ const url = linkStr.trim();
+ if (url) {
+ if (config2.securityLevel !== "loose") {
+ return (0, import_sanitize_url.sanitizeUrl)(url);
+ }
+ return url;
+ }
+}
+var runFunc = (functionName, ...params) => {
+ const arrPaths = functionName.split(".");
+ const len = arrPaths.length - 1;
+ const fnName = arrPaths[len];
+ let obj = window;
+ for (let i = 0; i < len; i++) {
+ obj = obj[arrPaths[i]];
+ if (!obj) {
+ return;
+ }
+ }
+ obj[fnName](...params);
+};
+function distance(p1, p2) {
+ return p1 && p2 ? Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2)) : 0;
+}
+function traverseEdge(points) {
+ let prevPoint;
+ let totalDistance = 0;
+ points.forEach((point6) => {
+ totalDistance += distance(point6, prevPoint);
+ prevPoint = point6;
+ });
+ let remainingDistance = totalDistance / 2;
+ let center2 = void 0;
+ prevPoint = void 0;
+ points.forEach((point6) => {
+ if (prevPoint && !center2) {
+ const vectorDistance = distance(point6, prevPoint);
+ if (vectorDistance < remainingDistance) {
+ remainingDistance -= vectorDistance;
+ } else {
+ const distanceRatio = remainingDistance / vectorDistance;
+ if (distanceRatio <= 0) {
+ center2 = prevPoint;
+ }
+ if (distanceRatio >= 1) {
+ center2 = { x: point6.x, y: point6.y };
+ }
+ if (distanceRatio > 0 && distanceRatio < 1) {
+ center2 = {
+ x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point6.x,
+ y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point6.y
+ };
+ }
+ }
+ }
+ prevPoint = point6;
+ });
+ return center2;
+}
+function calcLabelPosition(points) {
+ if (points.length === 1) {
+ return points[0];
+ }
+ return traverseEdge(points);
+}
+var calcCardinalityPosition = (isRelationTypePresent, points, initialPosition) => {
+ let prevPoint;
+ log$1.info(`our points ${JSON.stringify(points)}`);
+ if (points[0] !== initialPosition) {
+ points = points.reverse();
+ }
+ const distanceToCardinalityPoint = 25;
+ let remainingDistance = distanceToCardinalityPoint;
+ let center2;
+ prevPoint = void 0;
+ points.forEach((point6) => {
+ if (prevPoint && !center2) {
+ const vectorDistance = distance(point6, prevPoint);
+ if (vectorDistance < remainingDistance) {
+ remainingDistance -= vectorDistance;
+ } else {
+ const distanceRatio = remainingDistance / vectorDistance;
+ if (distanceRatio <= 0) {
+ center2 = prevPoint;
+ }
+ if (distanceRatio >= 1) {
+ center2 = { x: point6.x, y: point6.y };
+ }
+ if (distanceRatio > 0 && distanceRatio < 1) {
+ center2 = {
+ x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point6.x,
+ y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point6.y
+ };
+ }
+ }
+ }
+ prevPoint = point6;
+ });
+ const d = isRelationTypePresent ? 10 : 5;
+ const angle = Math.atan2(points[0].y - center2.y, points[0].x - center2.x);
+ const cardinalityPosition = { x: 0, y: 0 };
+ cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center2.x) / 2;
+ cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center2.y) / 2;
+ return cardinalityPosition;
+};
+function calcTerminalLabelPosition(terminalMarkerSize, position2, _points) {
+ let points = JSON.parse(JSON.stringify(_points));
+ let prevPoint;
+ log$1.info("our points", points);
+ if (position2 !== "start_left" && position2 !== "start_right") {
+ points = points.reverse();
+ }
+ points.forEach((point6) => {
+ prevPoint = point6;
+ });
+ const distanceToCardinalityPoint = 25 + terminalMarkerSize;
+ let remainingDistance = distanceToCardinalityPoint;
+ let center2;
+ prevPoint = void 0;
+ points.forEach((point6) => {
+ if (prevPoint && !center2) {
+ const vectorDistance = distance(point6, prevPoint);
+ if (vectorDistance < remainingDistance) {
+ remainingDistance -= vectorDistance;
+ } else {
+ const distanceRatio = remainingDistance / vectorDistance;
+ if (distanceRatio <= 0) {
+ center2 = prevPoint;
+ }
+ if (distanceRatio >= 1) {
+ center2 = { x: point6.x, y: point6.y };
+ }
+ if (distanceRatio > 0 && distanceRatio < 1) {
+ center2 = {
+ x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point6.x,
+ y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point6.y
+ };
+ }
+ }
+ }
+ prevPoint = point6;
+ });
+ const d = 10 + terminalMarkerSize * 0.5;
+ const angle = Math.atan2(points[0].y - center2.y, points[0].x - center2.x);
+ const cardinalityPosition = { x: 0, y: 0 };
+ cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center2.x) / 2;
+ cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center2.y) / 2;
+ if (position2 === "start_left") {
+ cardinalityPosition.x = Math.sin(angle + Math.PI) * d + (points[0].x + center2.x) / 2;
+ cardinalityPosition.y = -Math.cos(angle + Math.PI) * d + (points[0].y + center2.y) / 2;
+ }
+ if (position2 === "end_right") {
+ cardinalityPosition.x = Math.sin(angle - Math.PI) * d + (points[0].x + center2.x) / 2 - 5;
+ cardinalityPosition.y = -Math.cos(angle - Math.PI) * d + (points[0].y + center2.y) / 2 - 5;
+ }
+ if (position2 === "end_left") {
+ cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center2.x) / 2 - 5;
+ cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center2.y) / 2 - 5;
+ }
+ return cardinalityPosition;
+}
+function getStylesFromArray(arr) {
+ let style = "";
+ let labelStyle = "";
+ for (const element of arr) {
+ if (element !== void 0) {
+ if (element.startsWith("color:") || element.startsWith("text-align:")) {
+ labelStyle = labelStyle + element + ";";
+ } else {
+ style = style + element + ";";
+ }
+ }
+ }
+ return { style, labelStyle };
+}
+var cnt = 0;
+var generateId = () => {
+ cnt++;
+ return "id-" + Math.random().toString(36).substr(2, 12) + "-" + cnt;
+};
+function makeid(length2) {
+ let result = "";
+ const characters2 = "0123456789abcdef";
+ const charactersLength = characters2.length;
+ for (let i = 0; i < length2; i++) {
+ result += characters2.charAt(Math.floor(Math.random() * charactersLength));
+ }
+ return result;
+}
+var random = (options) => {
+ return makeid(options.length);
+};
+var getTextObj = function() {
+ return {
+ x: 0,
+ y: 0,
+ fill: void 0,
+ anchor: "start",
+ style: "#666",
+ width: 100,
+ height: 100,
+ textMargin: 0,
+ rx: 0,
+ ry: 0,
+ valign: void 0
+ };
+};
+var drawSimpleText = function(elem, textData) {
+ const nText = textData.text.replace(common$1.lineBreakRegex, " ");
+ const [, _fontSizePx] = parseFontSize(textData.fontSize);
+ const textElem = elem.append("text");
+ textElem.attr("x", textData.x);
+ textElem.attr("y", textData.y);
+ textElem.style("text-anchor", textData.anchor);
+ textElem.style("font-family", textData.fontFamily);
+ textElem.style("font-size", _fontSizePx);
+ textElem.style("font-weight", textData.fontWeight);
+ textElem.attr("fill", textData.fill);
+ if (textData.class !== void 0) {
+ textElem.attr("class", textData.class);
+ }
+ const span = textElem.append("tspan");
+ span.attr("x", textData.x + textData.textMargin * 2);
+ span.attr("fill", textData.fill);
+ span.text(nText);
+ return textElem;
+};
+var wrapLabel = memoize_default(
+ (label, maxWidth, config2) => {
+ if (!label) {
+ return label;
+ }
+ config2 = Object.assign(
+ { fontSize: 12, fontWeight: 400, fontFamily: "Arial", joinWith: "
" },
+ config2
+ );
+ if (common$1.lineBreakRegex.test(label)) {
+ return label;
+ }
+ const words = label.split(" ");
+ const completedLines = [];
+ let nextLine = "";
+ words.forEach((word, index2) => {
+ const wordLength = calculateTextWidth(`${word} `, config2);
+ const nextLineLength = calculateTextWidth(nextLine, config2);
+ if (wordLength > maxWidth) {
+ const { hyphenatedStrings, remainingWord } = breakString(word, maxWidth, "-", config2);
+ completedLines.push(nextLine, ...hyphenatedStrings);
+ nextLine = remainingWord;
+ } else if (nextLineLength + wordLength >= maxWidth) {
+ completedLines.push(nextLine);
+ nextLine = word;
+ } else {
+ nextLine = [nextLine, word].filter(Boolean).join(" ");
+ }
+ const currentWord = index2 + 1;
+ const isLastWord = currentWord === words.length;
+ if (isLastWord) {
+ completedLines.push(nextLine);
+ }
+ });
+ return completedLines.filter((line2) => line2 !== "").join(config2.joinWith);
+ },
+ (label, maxWidth, config2) => `${label}${maxWidth}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}${config2.joinWith}`
+);
+var breakString = memoize_default(
+ (word, maxWidth, hyphenCharacter = "-", config2) => {
+ config2 = Object.assign(
+ { fontSize: 12, fontWeight: 400, fontFamily: "Arial", margin: 0 },
+ config2
+ );
+ const characters2 = [...word];
+ const lines = [];
+ let currentLine = "";
+ characters2.forEach((character2, index2) => {
+ const nextLine = `${currentLine}${character2}`;
+ const lineWidth = calculateTextWidth(nextLine, config2);
+ if (lineWidth >= maxWidth) {
+ const currentCharacter = index2 + 1;
+ const isLastLine = characters2.length === currentCharacter;
+ const hyphenatedNextLine = `${nextLine}${hyphenCharacter}`;
+ lines.push(isLastLine ? nextLine : hyphenatedNextLine);
+ currentLine = "";
+ } else {
+ currentLine = nextLine;
+ }
+ });
+ return { hyphenatedStrings: lines, remainingWord: currentLine };
+ },
+ (word, maxWidth, hyphenCharacter = "-", config2) => `${word}${maxWidth}${hyphenCharacter}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}`
+);
+function calculateTextHeight(text2, config2) {
+ config2 = Object.assign(
+ { fontSize: 12, fontWeight: 400, fontFamily: "Arial", margin: 15 },
+ config2
+ );
+ return calculateTextDimensions(text2, config2).height;
+}
+function calculateTextWidth(text2, config2) {
+ config2 = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: "Arial" }, config2);
+ return calculateTextDimensions(text2, config2).width;
+}
+var calculateTextDimensions = memoize_default(
+ (text2, config2) => {
+ config2 = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: "Arial" }, config2);
+ const { fontSize, fontFamily, fontWeight } = config2;
+ if (!text2) {
+ return { width: 0, height: 0 };
+ }
+ const [, _fontSizePx] = parseFontSize(fontSize);
+ const fontFamilies = ["sans-serif", fontFamily];
+ const lines = text2.split(common$1.lineBreakRegex);
+ const dims = [];
+ const body = select_default2("body");
+ if (!body.remove) {
+ return { width: 0, height: 0, lineHeight: 0 };
+ }
+ const g = body.append("svg");
+ for (const fontFamily2 of fontFamilies) {
+ let cheight = 0;
+ const dim = { width: 0, height: 0, lineHeight: 0 };
+ for (const line2 of lines) {
+ const textObj = getTextObj();
+ textObj.text = line2 || ZERO_WIDTH_SPACE;
+ const textElem = drawSimpleText(g, textObj).style("font-size", _fontSizePx).style("font-weight", fontWeight).style("font-family", fontFamily2);
+ const bBox = (textElem._groups || textElem)[0][0].getBBox();
+ if (bBox.width === 0 && bBox.height === 0) {
+ throw new Error("svg element not in render tree");
+ }
+ dim.width = Math.round(Math.max(dim.width, bBox.width));
+ cheight = Math.round(bBox.height);
+ dim.height += cheight;
+ dim.lineHeight = Math.round(Math.max(dim.lineHeight, cheight));
+ }
+ dims.push(dim);
+ }
+ g.remove();
+ const index2 = isNaN(dims[1].height) || isNaN(dims[1].width) || isNaN(dims[1].lineHeight) || dims[0].height > dims[1].height && dims[0].width > dims[1].width && dims[0].lineHeight > dims[1].lineHeight ? 0 : 1;
+ return dims[index2];
+ },
+ (text2, config2) => `${text2}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}`
+);
+var initIdGenerator = class iterator {
+ constructor(deterministic, seed) {
+ this.deterministic = deterministic;
+ this.seed = seed;
+ this.count = seed ? seed.length : 0;
+ }
+ next() {
+ if (!this.deterministic) {
+ return Date.now();
+ }
+ return this.count++;
+ }
+};
+var decoder;
+var entityDecode = function(html3) {
+ decoder = decoder || document.createElement("div");
+ html3 = escape(html3).replace(/%26/g, "&").replace(/%23/g, "#").replace(/%3B/g, ";");
+ decoder.innerHTML = html3;
+ return unescape(decoder.textContent);
+};
+var directiveSanitizer = (args) => {
+ log$1.debug("directiveSanitizer called with", args);
+ if (typeof args === "object") {
+ if (args.length) {
+ args.forEach((arg) => directiveSanitizer(arg));
+ } else {
+ Object.keys(args).forEach((key) => {
+ log$1.debug("Checking key", key);
+ if (key.startsWith("__")) {
+ log$1.debug("sanitize deleting __ option", key);
+ delete args[key];
+ }
+ if (key.includes("proto")) {
+ log$1.debug("sanitize deleting proto option", key);
+ delete args[key];
+ }
+ if (key.includes("constr")) {
+ log$1.debug("sanitize deleting constr option", key);
+ delete args[key];
+ }
+ if (key.includes("themeCSS")) {
+ log$1.debug("sanitizing themeCss option");
+ args[key] = sanitizeCss(args[key]);
+ }
+ if (key.includes("fontFamily")) {
+ log$1.debug("sanitizing fontFamily option");
+ args[key] = sanitizeCss(args[key]);
+ }
+ if (key.includes("altFontFamily")) {
+ log$1.debug("sanitizing altFontFamily option");
+ args[key] = sanitizeCss(args[key]);
+ }
+ if (!configKeys.includes(key)) {
+ log$1.debug("sanitize deleting option", key);
+ delete args[key];
+ } else {
+ if (typeof args[key] === "object") {
+ log$1.debug("sanitize deleting object", key);
+ directiveSanitizer(args[key]);
+ }
+ }
+ });
+ }
+ }
+ if (args.themeVariables) {
+ const kArr = Object.keys(args.themeVariables);
+ for (const k2 of kArr) {
+ const val = args.themeVariables[k2];
+ if (val && val.match && !val.match(/^[\d "#%(),.;A-Za-z]+$/)) {
+ args.themeVariables[k2] = "";
+ }
+ }
+ }
+ log$1.debug("After sanitization", args);
+};
+var sanitizeCss = (str2) => {
+ let startCnt = 0;
+ let endCnt = 0;
+ for (const element of str2) {
+ if (startCnt < endCnt) {
+ return "{ /* ERROR: Unbalanced CSS */ }";
+ }
+ if (element === "{") {
+ startCnt++;
+ } else if (element === "}") {
+ endCnt++;
+ }
+ }
+ if (startCnt !== endCnt) {
+ return "{ /* ERROR: Unbalanced CSS */ }";
+ }
+ return str2;
+};
+function isDetailedError(error) {
+ return "str" in error;
+}
+var insertTitle = (parent, cssClass, titleTopMargin, title2) => {
+ if (!title2) {
+ return;
+ }
+ const bounds = parent.node().getBBox();
+ parent.append("text").text(title2).attr("x", bounds.x + bounds.width / 2).attr("y", -titleTopMargin).attr("class", cssClass);
+};
+var parseFontSize = (fontSize) => {
+ if (typeof fontSize === "number") {
+ return [fontSize, fontSize + "px"];
+ }
+ const fontSizeNumber = parseInt(fontSize, 10);
+ if (Number.isNaN(fontSizeNumber)) {
+ return [void 0, void 0];
+ } else if (fontSize === String(fontSizeNumber)) {
+ return [fontSizeNumber, fontSize + "px"];
+ } else {
+ return [fontSizeNumber, fontSize];
+ }
+};
+var utils = {
+ assignWithDepth: assignWithDepth$1,
+ wrapLabel,
+ calculateTextHeight,
+ calculateTextWidth,
+ calculateTextDimensions,
+ detectInit,
+ detectDirective,
+ isSubstringInArray,
+ interpolateToCurve,
+ calcLabelPosition,
+ calcCardinalityPosition,
+ calcTerminalLabelPosition,
+ formatUrl,
+ getStylesFromArray,
+ generateId,
+ random,
+ runFunc,
+ entityDecode,
+ initIdGenerator,
+ directiveSanitizer,
+ sanitizeCss,
+ insertTitle,
+ parseFontSize
+};
+var version = "10.3.1";
+var id$j = "c4";
+var detector$j = (txt) => {
+ return /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(txt);
+};
+var loader$j = async () => {
+ const { diagram: diagram2 } = await import("./c4Diagram-4de0d805-OPSDSO4B.js");
+ return { id: id$j, diagram: diagram2 };
+};
+var plugin$i = {
+ id: id$j,
+ detector: detector$j,
+ loader: loader$j
+};
+var c4 = plugin$i;
+var id$i = "flowchart";
+var detector$i = (txt, config2) => {
+ var _a, _b;
+ if (((_a = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper" || ((_b = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _b.defaultRenderer) === "elk") {
+ return false;
+ }
+ return /^\s*graph/.test(txt);
+};
+var loader$i = async () => {
+ const { diagram: diagram2 } = await import("./flowDiagram-42ba8acc-LZC6Z7M6.js");
+ return { id: id$i, diagram: diagram2 };
+};
+var plugin$h = {
+ id: id$i,
+ detector: detector$i,
+ loader: loader$i
+};
+var flowchart = plugin$h;
+var id$h = "flowchart-v2";
+var detector$h = (txt, config2) => {
+ var _a, _b, _c;
+ if (((_a = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _a.defaultRenderer) === "dagre-d3" || ((_b = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _b.defaultRenderer) === "elk") {
+ return false;
+ }
+ if (/^\s*graph/.test(txt) && ((_c = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _c.defaultRenderer) === "dagre-wrapper") {
+ return true;
+ }
+ return /^\s*flowchart/.test(txt);
+};
+var loader$h = async () => {
+ const { diagram: diagram2 } = await import("./flowDiagram-v2-e4ef3cbe-B5HH66FL.js");
+ return { id: id$h, diagram: diagram2 };
+};
+var plugin$g = {
+ id: id$h,
+ detector: detector$h,
+ loader: loader$h
+};
+var flowchartV2 = plugin$g;
+var id$g = "er";
+var detector$g = (txt) => {
+ return /^\s*erDiagram/.test(txt);
+};
+var loader$g = async () => {
+ const { diagram: diagram2 } = await import("./erDiagram-105a1cb2-5A7YWHYM.js");
+ return { id: id$g, diagram: diagram2 };
+};
+var plugin$f = {
+ id: id$g,
+ detector: detector$g,
+ loader: loader$g
+};
+var er = plugin$f;
+var id$f = "gitGraph";
+var detector$f = (txt) => {
+ return /^\s*gitGraph/.test(txt);
+};
+var loader$f = async () => {
+ const { diagram: diagram2 } = await import("./gitGraphDiagram-1dcba3c4-P6QQIOWJ.js");
+ return { id: id$f, diagram: diagram2 };
+};
+var plugin$e = {
+ id: id$f,
+ detector: detector$f,
+ loader: loader$f
+};
+var git = plugin$e;
+var id$e = "gantt";
+var detector$e = (txt) => {
+ return /^\s*gantt/.test(txt);
+};
+var loader$e = async () => {
+ const { diagram: diagram2 } = await import("./ganttDiagram-33119f0c-CZ7CXQQZ.js");
+ return { id: id$e, diagram: diagram2 };
+};
+var plugin$d = {
+ id: id$e,
+ detector: detector$e,
+ loader: loader$e
+};
+var gantt = plugin$d;
+var id$d = "info";
+var detector$d = (txt) => {
+ return /^\s*info/.test(txt);
+};
+var loader$d = async () => {
+ const { diagram: diagram2 } = await import("./infoDiagram-99aec0e9-JM5N24FD.js");
+ return { id: id$d, diagram: diagram2 };
+};
+var info = {
+ id: id$d,
+ detector: detector$d,
+ loader: loader$d
+};
+var id$c = "pie";
+var detector$c = (txt) => {
+ return /^\s*pie/.test(txt);
+};
+var loader$c = async () => {
+ const { diagram: diagram2 } = await import("./pieDiagram-b06a513b-2LECVZIE.js");
+ return { id: id$c, diagram: diagram2 };
+};
+var plugin$c = {
+ id: id$c,
+ detector: detector$c,
+ loader: loader$c
+};
+var pie = plugin$c;
+var id$b = "quadrantChart";
+var detector$b = (txt) => {
+ return /^\s*quadrantChart/.test(txt);
+};
+var loader$b = async () => {
+ const { diagram: diagram2 } = await import("./quadrantDiagram-42727e21-T27IZPVU.js");
+ return { id: id$b, diagram: diagram2 };
+};
+var plugin$b = {
+ id: id$b,
+ detector: detector$b,
+ loader: loader$b
+};
+var quadrantChart = plugin$b;
+var id$a = "requirement";
+var detector$a = (txt) => {
+ return /^\s*requirement(Diagram)?/.test(txt);
+};
+var loader$a = async () => {
+ const { diagram: diagram2 } = await import("./requirementDiagram-96e78f61-4FXMMWHG.js");
+ return { id: id$a, diagram: diagram2 };
+};
+var plugin$a = {
+ id: id$a,
+ detector: detector$a,
+ loader: loader$a
+};
+var requirement = plugin$a;
+var id$9 = "sequence";
+var detector$9 = (txt) => {
+ return /^\s*sequenceDiagram/.test(txt);
+};
+var loader$9 = async () => {
+ const { diagram: diagram2 } = await import("./sequenceDiagram-342ef5c4-LDKGNMQF.js");
+ return { id: id$9, diagram: diagram2 };
+};
+var plugin$9 = {
+ id: id$9,
+ detector: detector$9,
+ loader: loader$9
+};
+var sequence = plugin$9;
+var id$8 = "class";
+var detector$8 = (txt, config2) => {
+ var _a;
+ if (((_a = config2 == null ? void 0 : config2.class) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") {
+ return false;
+ }
+ return /^\s*classDiagram/.test(txt);
+};
+var loader$8 = async () => {
+ const { diagram: diagram2 } = await import("./classDiagram-0da88708-AELEO4CQ.js");
+ return { id: id$8, diagram: diagram2 };
+};
+var plugin$8 = {
+ id: id$8,
+ detector: detector$8,
+ loader: loader$8
+};
+var classDiagram = plugin$8;
+var id$7 = "classDiagram";
+var detector$7 = (txt, config2) => {
+ var _a;
+ if (/^\s*classDiagram/.test(txt) && ((_a = config2 == null ? void 0 : config2.class) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") {
+ return true;
+ }
+ return /^\s*classDiagram-v2/.test(txt);
+};
+var loader$7 = async () => {
+ const { diagram: diagram2 } = await import("./classDiagram-v2-2f4ae322-OMTUXFU6.js");
+ return { id: id$7, diagram: diagram2 };
+};
+var plugin$7 = {
+ id: id$7,
+ detector: detector$7,
+ loader: loader$7
+};
+var classDiagramV2 = plugin$7;
+var id$6 = "state";
+var detector$6 = (txt, config2) => {
+ var _a;
+ if (((_a = config2 == null ? void 0 : config2.state) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") {
+ return false;
+ }
+ return /^\s*stateDiagram/.test(txt);
+};
+var loader$6 = async () => {
+ const { diagram: diagram2 } = await import("./stateDiagram-3ac8af33-THB37VCV.js");
+ return { id: id$6, diagram: diagram2 };
+};
+var plugin$6 = {
+ id: id$6,
+ detector: detector$6,
+ loader: loader$6
+};
+var state = plugin$6;
+var id$5 = "stateDiagram";
+var detector$5 = (txt, config2) => {
+ var _a;
+ if (/^\s*stateDiagram-v2/.test(txt)) {
+ return true;
+ }
+ if (/^\s*stateDiagram/.test(txt) && ((_a = config2 == null ? void 0 : config2.state) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") {
+ return true;
+ }
+ return false;
+};
+var loader$5 = async () => {
+ const { diagram: diagram2 } = await import("./stateDiagram-v2-ca22f0dc-SGLKCTAO.js");
+ return { id: id$5, diagram: diagram2 };
+};
+var plugin$5 = {
+ id: id$5,
+ detector: detector$5,
+ loader: loader$5
+};
+var stateV2 = plugin$5;
+var id$4 = "journey";
+var detector$4 = (txt) => {
+ return /^\s*journey/.test(txt);
+};
+var loader$4 = async () => {
+ const { diagram: diagram2 } = await import("./journeyDiagram-50e783bb-L6HGKQY7.js");
+ return { id: id$4, diagram: diagram2 };
+};
+var plugin$4 = {
+ id: id$4,
+ detector: detector$4,
+ loader: loader$4
+};
+var journey = plugin$4;
+var selectSvgElement = (id22) => {
+ var _a;
+ const { securityLevel } = getConfig$1();
+ let root3 = select_default2("body");
+ if (securityLevel === "sandbox") {
+ const sandboxElement = select_default2(`#i${id22}`);
+ const doc = ((_a = sandboxElement.node()) == null ? void 0 : _a.contentDocument) ?? document;
+ root3 = select_default2(doc.body);
+ }
+ const svg3 = root3.select(`#${id22}`);
+ return svg3;
+};
+var draw = (_text, id22, version2) => {
+ log$1.debug("renering svg for syntax error\n");
+ const svg3 = selectSvgElement(id22);
+ svg3.attr("viewBox", "0 0 2412 512");
+ configureSvgSize(svg3, 100, 512, true);
+ const g = svg3.append("g");
+ g.append("path").attr("class", "error-icon").attr(
+ "d",
+ "m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"
+ );
+ g.append("path").attr("class", "error-icon").attr(
+ "d",
+ "m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"
+ );
+ g.append("path").attr("class", "error-icon").attr(
+ "d",
+ "m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"
+ );
+ g.append("path").attr("class", "error-icon").attr(
+ "d",
+ "m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"
+ );
+ g.append("path").attr("class", "error-icon").attr(
+ "d",
+ "m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"
+ );
+ g.append("path").attr("class", "error-icon").attr(
+ "d",
+ "m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"
+ );
+ g.append("text").attr("class", "error-text").attr("x", 1440).attr("y", 250).attr("font-size", "150px").style("text-anchor", "middle").text("Syntax error in text");
+ g.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text(`mermaid version ${version2}`);
+};
+var renderer = { draw };
+var errorRenderer = renderer;
+var diagram = {
+ db: {},
+ renderer,
+ parser: {
+ parser: { yy: {} },
+ parse: () => {
+ return;
+ }
+ }
+};
+var errorDiagram = diagram;
+var id$3 = "flowchart-elk";
+var detector$3 = (txt, config2) => {
+ var _a;
+ if (
+ // If diagram explicitly states flowchart-elk
+ /^\s*flowchart-elk/.test(txt) || // If a flowchart/graph diagram has their default renderer set to elk
+ /^\s*flowchart|graph/.test(txt) && ((_a = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _a.defaultRenderer) === "elk"
+ ) {
+ return true;
+ }
+ return false;
+};
+var loader$3 = async () => {
+ const { diagram: diagram2 } = await import("./flowchart-elk-definition-8136f426-CD3CR5EG.js");
+ return { id: id$3, diagram: diagram2 };
+};
+var plugin$3 = {
+ id: id$3,
+ detector: detector$3,
+ loader: loader$3
+};
+var flowchartElk = plugin$3;
+var id$2 = "timeline";
+var detector$2 = (txt) => {
+ return /^\s*timeline/.test(txt);
+};
+var loader$2 = async () => {
+ const { diagram: diagram2 } = await import("./timeline-definition-cbf43e70-PH2KIOPP.js");
+ return { id: id$2, diagram: diagram2 };
+};
+var plugin$2 = {
+ id: id$2,
+ detector: detector$2,
+ loader: loader$2
+};
+var timeline = plugin$2;
+var id$1 = "mindmap";
+var detector$1 = (txt) => {
+ return /^\s*mindmap/.test(txt);
+};
+var loader$1 = async () => {
+ const { diagram: diagram2 } = await import("./mindmap-definition-5f036dbb-QGQEIXNJ.js");
+ return { id: id$1, diagram: diagram2 };
+};
+var plugin$1 = {
+ id: id$1,
+ detector: detector$1,
+ loader: loader$1
+};
+var mindmap = plugin$1;
+var id2 = "sankey";
+var detector = (txt) => {
+ return /^\s*sankey-beta/.test(txt);
+};
+var loader = async () => {
+ const { diagram: diagram2 } = await import("./sankeyDiagram-91977475-I3PTT7I6.js");
+ return { id: id2, diagram: diagram2 };
+};
+var plugin = {
+ id: id2,
+ detector,
+ loader
+};
+var sankey = plugin;
+var hasLoadedDiagrams = false;
+var addDiagrams = () => {
+ if (hasLoadedDiagrams) {
+ return;
+ }
+ hasLoadedDiagrams = true;
+ registerDiagram("error", errorDiagram, (text2) => {
+ return text2.toLowerCase().trim() === "error";
+ });
+ registerDiagram(
+ "---",
+ // --- diagram type may appear if YAML front-matter is not parsed correctly
+ {
+ db: {
+ clear: () => {
+ }
+ },
+ styles: {},
+ // should never be used
+ renderer: {},
+ // should never be used
+ parser: {
+ parser: { yy: {} },
+ parse: () => {
+ throw new Error(
+ "Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks"
+ );
+ }
+ },
+ init: () => null
+ // no op
+ },
+ (text2) => {
+ return text2.toLowerCase().trimStart().startsWith("---");
+ }
+ );
+ registerLazyLoadedDiagrams(
+ c4,
+ classDiagramV2,
+ classDiagram,
+ er,
+ gantt,
+ info,
+ pie,
+ requirement,
+ sequence,
+ flowchartElk,
+ flowchartV2,
+ flowchart,
+ mindmap,
+ timeline,
+ git,
+ stateV2,
+ state,
+ journey,
+ quadrantChart,
+ sankey
+ );
+};
+var cleanupComments = (text2) => {
+ return text2.trimStart().replace(/^\s*%%(?!{)[^\n]+\n?/gm, "");
+};
+var Diagram = class {
+ constructor(text2) {
+ this.text = text2;
+ this.type = "graph";
+ this.text += "\n";
+ const cnf = getConfig$1();
+ try {
+ this.type = detectType(text2, cnf);
+ } catch (e) {
+ this.type = "error";
+ this.detectError = e;
+ }
+ const diagram2 = getDiagram(this.type);
+ log$1.debug("Type " + this.type);
+ this.db = diagram2.db;
+ this.renderer = diagram2.renderer;
+ this.parser = diagram2.parser;
+ const originalParse = this.parser.parse.bind(this.parser);
+ this.parser.parse = (text22) => originalParse(cleanupComments(extractFrontMatter(text22, this.db)));
+ this.parser.parser.yy = this.db;
+ this.init = diagram2.init;
+ this.parse();
+ }
+ parse() {
+ var _a, _b, _c;
+ if (this.detectError) {
+ throw this.detectError;
+ }
+ (_b = (_a = this.db).clear) == null ? void 0 : _b.call(_a);
+ (_c = this.init) == null ? void 0 : _c.call(this, getConfig$1());
+ this.parser.parse(this.text);
+ }
+ async render(id22, version2) {
+ await this.renderer.draw(this.text, id22, version2, this);
+ }
+ getParser() {
+ return this.parser;
+ }
+ getType() {
+ return this.type;
+ }
+};
+var getDiagramFromText = async (text2) => {
+ const type22 = detectType(text2, getConfig$1());
+ try {
+ getDiagram(type22);
+ } catch (error) {
+ const loader2 = getDiagramLoader(type22);
+ if (!loader2) {
+ throw new UnknownDiagramError(`Diagram ${type22} not found.`);
+ }
+ const { id: id22, diagram: diagram2 } = await loader2();
+ registerDiagram(id22, diagram2);
+ }
+ return new Diagram(text2);
+};
+var interactionFunctions = [];
+var addFunction = (func) => {
+ interactionFunctions.push(func);
+};
+var attachFunctions = () => {
+ interactionFunctions.forEach((f) => {
+ f();
+ });
+ interactionFunctions = [];
+};
+var SVG_ROLE = "graphics-document document";
+function setA11yDiagramInfo(svg3, diagramType) {
+ svg3.attr("role", SVG_ROLE);
+ if (diagramType !== "") {
+ svg3.attr("aria-roledescription", diagramType);
+ }
+}
+function addSVGa11yTitleDescription(svg3, a11yTitle, a11yDesc, baseId) {
+ if (svg3.insert === void 0) {
+ return;
+ }
+ if (a11yDesc) {
+ const descId = `chart-desc-${baseId}`;
+ svg3.attr("aria-describedby", descId);
+ svg3.insert("desc", ":first-child").attr("id", descId).text(a11yDesc);
+ }
+ if (a11yTitle) {
+ const titleId = `chart-title-${baseId}`;
+ svg3.attr("aria-labelledby", titleId);
+ svg3.insert("title", ":first-child").attr("id", titleId).text(a11yTitle);
+ }
+}
+var CLASSDEF_DIAGRAMS = [
+ "graph",
+ "flowchart",
+ "flowchart-v2",
+ "flowchart-elk",
+ "stateDiagram",
+ "stateDiagram-v2"
+];
+var MAX_TEXTLENGTH = 5e4;
+var MAX_TEXTLENGTH_EXCEEDED_MSG = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa";
+var SECURITY_LVL_SANDBOX = "sandbox";
+var SECURITY_LVL_LOOSE = "loose";
+var XMLNS_SVG_STD = "http://www.w3.org/2000/svg";
+var XMLNS_XLINK_STD = "http://www.w3.org/1999/xlink";
+var XMLNS_XHTML_STD = "http://www.w3.org/1999/xhtml";
+var IFRAME_WIDTH = "100%";
+var IFRAME_HEIGHT = "100%";
+var IFRAME_STYLES = "border:0;margin:0;";
+var IFRAME_BODY_STYLE = "margin:0";
+var IFRAME_SANDBOX_OPTS = "allow-top-navigation-by-user-activation allow-popups";
+var IFRAME_NOT_SUPPORTED_MSG = 'The "iframe" tag is not supported by your browser.';
+var DOMPURIFY_TAGS = ["foreignobject"];
+var DOMPURIFY_ATTR = ["dominant-baseline"];
+async function parse$1(text2, parseOptions) {
+ addDiagrams();
+ try {
+ await getDiagramFromText(text2);
+ } catch (error) {
+ if (parseOptions == null ? void 0 : parseOptions.suppressErrors) {
+ return false;
+ }
+ throw error;
+ }
+ return true;
+}
+var encodeEntities = function(text2) {
+ let txt = text2;
+ txt = txt.replace(/style.*:\S*#.*;/g, function(s2) {
+ return s2.substring(0, s2.length - 1);
+ });
+ txt = txt.replace(/classDef.*:\S*#.*;/g, function(s2) {
+ return s2.substring(0, s2.length - 1);
+ });
+ txt = txt.replace(/#\w+;/g, function(s2) {
+ const innerTxt = s2.substring(1, s2.length - 1);
+ const isInt = /^\+?\d+$/.test(innerTxt);
+ if (isInt) {
+ return "fl°°" + innerTxt + "¶ß";
+ } else {
+ return "fl°" + innerTxt + "¶ß";
+ }
+ });
+ return txt;
+};
+var decodeEntities = function(text2) {
+ return text2.replace(/fl°°/g, "").replace(/fl°/g, "&").replace(/¶ß/g, ";");
+};
+var cssImportantStyles = (cssClass, element, cssClasses = []) => {
+ return `
+.${cssClass} ${element} { ${cssClasses.join(" !important; ")} !important; }`;
+};
+var createCssStyles = (config2, graphType, classDefs = {}) => {
+ var _a;
+ let cssStyles = "";
+ if (config2.themeCSS !== void 0) {
+ cssStyles += `
+${config2.themeCSS}`;
+ }
+ if (config2.fontFamily !== void 0) {
+ cssStyles += `
+:root { --mermaid-font-family: ${config2.fontFamily}}`;
+ }
+ if (config2.altFontFamily !== void 0) {
+ cssStyles += `
+:root { --mermaid-alt-font-family: ${config2.altFontFamily}}`;
+ }
+ if (!isEmpty_default(classDefs) && CLASSDEF_DIAGRAMS.includes(graphType)) {
+ const htmlLabels = config2.htmlLabels || ((_a = config2.flowchart) == null ? void 0 : _a.htmlLabels);
+ const cssHtmlElements = ["> *", "span"];
+ const cssShapeElements = ["rect", "polygon", "ellipse", "circle", "path"];
+ const cssElements = htmlLabels ? cssHtmlElements : cssShapeElements;
+ for (const classId in classDefs) {
+ const styleClassDef = classDefs[classId];
+ if (!isEmpty_default(styleClassDef.styles)) {
+ cssElements.forEach((cssElement) => {
+ cssStyles += cssImportantStyles(styleClassDef.id, cssElement, styleClassDef.styles);
+ });
+ }
+ if (!isEmpty_default(styleClassDef.textStyles)) {
+ cssStyles += cssImportantStyles(styleClassDef.id, "tspan", styleClassDef.textStyles);
+ }
+ }
+ }
+ return cssStyles;
+};
+var createUserStyles = (config2, graphType, classDefs, svgId) => {
+ const userCSSstyles = createCssStyles(config2, graphType, classDefs);
+ const allStyles = getStyles$1(graphType, userCSSstyles, config2.themeVariables);
+ return serialize(compile(`${svgId}{${allStyles}}`), stringify);
+};
+var cleanUpSvgCode = (svgCode = "", inSandboxMode, useArrowMarkerUrls) => {
+ let cleanedUpSvg = svgCode;
+ if (!useArrowMarkerUrls && !inSandboxMode) {
+ cleanedUpSvg = cleanedUpSvg.replace(
+ /marker-end="url\([\d+./:=?A-Za-z-]*?#/g,
+ 'marker-end="url(#'
+ );
+ }
+ cleanedUpSvg = decodeEntities(cleanedUpSvg);
+ cleanedUpSvg = cleanedUpSvg.replace(/
/g, "
");
+ return cleanedUpSvg;
+};
+var putIntoIFrame = (svgCode = "", svgElement) => {
+ var _a, _b;
+ const height = ((_b = (_a = svgElement == null ? void 0 : svgElement.viewBox) == null ? void 0 : _a.baseVal) == null ? void 0 : _b.height) ? svgElement.viewBox.baseVal.height + "px" : IFRAME_HEIGHT;
+ const base64encodedSrc = btoa('' + svgCode + "");
+ return ``;
+};
+var appendDivSvgG = (parentRoot, id22, enclosingDivId, divStyle, svgXlink) => {
+ const enclosingDiv = parentRoot.append("div");
+ enclosingDiv.attr("id", enclosingDivId);
+ if (divStyle) {
+ enclosingDiv.attr("style", divStyle);
+ }
+ const svgNode2 = enclosingDiv.append("svg").attr("id", id22).attr("width", "100%").attr("xmlns", XMLNS_SVG_STD);
+ if (svgXlink) {
+ svgNode2.attr("xmlns:xlink", svgXlink);
+ }
+ svgNode2.append("g");
+ return parentRoot;
+};
+function sandboxedIframe(parentNode, iFrameId) {
+ return parentNode.append("iframe").attr("id", iFrameId).attr("style", "width: 100%; height: 100%;").attr("sandbox", "");
+}
+var removeExistingElements = (doc, id22, divId, iFrameId) => {
+ var _a, _b, _c;
+ (_a = doc.getElementById(id22)) == null ? void 0 : _a.remove();
+ (_b = doc.getElementById(divId)) == null ? void 0 : _b.remove();
+ (_c = doc.getElementById(iFrameId)) == null ? void 0 : _c.remove();
+};
+var render$1 = async function(id22, text2, svgContainingElement) {
+ var _a, _b, _c, _d;
+ addDiagrams();
+ reset();
+ const graphInit = utils.detectInit(text2);
+ if (graphInit) {
+ directiveSanitizer(graphInit);
+ addDirective(graphInit);
+ }
+ const config2 = getConfig$1();
+ log$1.debug(config2);
+ if (text2.length > ((config2 == null ? void 0 : config2.maxTextSize) ?? MAX_TEXTLENGTH)) {
+ text2 = MAX_TEXTLENGTH_EXCEEDED_MSG;
+ }
+ text2 = text2.replace(/\r\n?/g, "\n");
+ text2 = text2.replace(
+ /<(\w+)([^>]*)>/g,
+ (match2, tag, attributes) => "<" + tag + attributes.replace(/="([^"]*)"/g, "='$1'") + ">"
+ );
+ const idSelector = "#" + id22;
+ const iFrameID = "i" + id22;
+ const iFrameID_selector = "#" + iFrameID;
+ const enclosingDivID = "d" + id22;
+ const enclosingDivID_selector = "#" + enclosingDivID;
+ let root3 = select_default2("body");
+ const isSandboxed = config2.securityLevel === SECURITY_LVL_SANDBOX;
+ const isLooseSecurityLevel = config2.securityLevel === SECURITY_LVL_LOOSE;
+ const fontFamily = config2.fontFamily;
+ if (svgContainingElement !== void 0) {
+ if (svgContainingElement) {
+ svgContainingElement.innerHTML = "";
+ }
+ if (isSandboxed) {
+ const iframe = sandboxedIframe(select_default2(svgContainingElement), iFrameID);
+ root3 = select_default2(iframe.nodes()[0].contentDocument.body);
+ root3.node().style.margin = 0;
+ } else {
+ root3 = select_default2(svgContainingElement);
+ }
+ appendDivSvgG(root3, id22, enclosingDivID, `font-family: ${fontFamily}`, XMLNS_XLINK_STD);
+ } else {
+ removeExistingElements(document, id22, enclosingDivID, iFrameID);
+ if (isSandboxed) {
+ const iframe = sandboxedIframe(select_default2("body"), iFrameID);
+ root3 = select_default2(iframe.nodes()[0].contentDocument.body);
+ root3.node().style.margin = 0;
+ } else {
+ root3 = select_default2("body");
+ }
+ appendDivSvgG(root3, id22, enclosingDivID);
+ }
+ text2 = encodeEntities(text2);
+ let diag;
+ let parseEncounteredException;
+ try {
+ diag = await getDiagramFromText(text2);
+ } catch (error) {
+ diag = new Diagram("error");
+ parseEncounteredException = error;
+ }
+ const element = root3.select(enclosingDivID_selector).node();
+ const diagramType = diag.type;
+ const svg3 = element.firstChild;
+ const firstChild = svg3.firstChild;
+ const diagramClassDefs = CLASSDEF_DIAGRAMS.includes(diagramType) ? diag.renderer.getClasses(text2, diag) : {};
+ const rules = createUserStyles(config2, diagramType, diagramClassDefs, idSelector);
+ const style1 = document.createElement("style");
+ style1.innerHTML = rules;
+ svg3.insertBefore(style1, firstChild);
+ try {
+ await diag.renderer.draw(text2, id22, version, diag);
+ } catch (e) {
+ errorRenderer.draw(text2, id22, version);
+ throw e;
+ }
+ const svgNode2 = root3.select(`${enclosingDivID_selector} svg`);
+ const a11yTitle = (_b = (_a = diag.db).getAccTitle) == null ? void 0 : _b.call(_a);
+ const a11yDescr = (_d = (_c = diag.db).getAccDescription) == null ? void 0 : _d.call(_c);
+ addA11yInfo(diagramType, svgNode2, a11yTitle, a11yDescr);
+ root3.select(`[id="${id22}"]`).selectAll("foreignobject > *").attr("xmlns", XMLNS_XHTML_STD);
+ let svgCode = root3.select(enclosingDivID_selector).node().innerHTML;
+ log$1.debug("config.arrowMarkerAbsolute", config2.arrowMarkerAbsolute);
+ svgCode = cleanUpSvgCode(svgCode, isSandboxed, evaluate(config2.arrowMarkerAbsolute));
+ if (isSandboxed) {
+ const svgEl = root3.select(enclosingDivID_selector + " svg").node();
+ svgCode = putIntoIFrame(svgCode, svgEl);
+ } else if (!isLooseSecurityLevel) {
+ svgCode = purify.sanitize(svgCode, {
+ ADD_TAGS: DOMPURIFY_TAGS,
+ ADD_ATTR: DOMPURIFY_ATTR
+ });
+ }
+ attachFunctions();
+ if (parseEncounteredException) {
+ throw parseEncounteredException;
+ }
+ const tmpElementSelector = isSandboxed ? iFrameID_selector : enclosingDivID_selector;
+ const node2 = select_default2(tmpElementSelector).node();
+ if (node2 && "remove" in node2) {
+ node2.remove();
+ }
+ return {
+ svg: svgCode,
+ bindFunctions: diag.db.bindFunctions
+ };
+};
+function initialize$1(options = {}) {
+ var _a;
+ if ((options == null ? void 0 : options.fontFamily) && !((_a = options.themeVariables) == null ? void 0 : _a.fontFamily)) {
+ if (!options.themeVariables) {
+ options.themeVariables = {};
+ }
+ options.themeVariables.fontFamily = options.fontFamily;
+ }
+ saveConfigFromInitialize(options);
+ if ((options == null ? void 0 : options.theme) && options.theme in theme) {
+ options.themeVariables = theme[options.theme].getThemeVariables(
+ options.themeVariables
+ );
+ } else if (options) {
+ options.themeVariables = theme.default.getThemeVariables(options.themeVariables);
+ }
+ const config2 = typeof options === "object" ? setSiteConfig(options) : getSiteConfig();
+ setLogLevel$1(config2.logLevel);
+ addDiagrams();
+}
+function addA11yInfo(diagramType, svgNode2, a11yTitle, a11yDescr) {
+ setA11yDiagramInfo(svgNode2, diagramType);
+ addSVGa11yTitleDescription(svgNode2, a11yTitle, a11yDescr, svgNode2.attr("id"));
+}
+var mermaidAPI = Object.freeze({
+ render: render$1,
+ parse: parse$1,
+ parseDirective: parseDirective$1,
+ getDiagramFromText,
+ initialize: initialize$1,
+ getConfig: getConfig$1,
+ setConfig,
+ getSiteConfig,
+ updateSiteConfig,
+ reset: () => {
+ reset();
+ },
+ globalReset: () => {
+ reset(defaultConfig);
+ },
+ defaultConfig
+});
+setLogLevel$1(getConfig$1().logLevel);
+reset(getConfig$1());
+var handleError = (error, errors, parseError) => {
+ log$1.warn(error);
+ if (isDetailedError(error)) {
+ if (parseError) {
+ parseError(error.str, error.hash);
+ }
+ errors.push({ ...error, message: error.str, error });
+ } else {
+ if (parseError) {
+ parseError(error);
+ }
+ if (error instanceof Error) {
+ errors.push({
+ str: error.message,
+ message: error.message,
+ hash: error.name,
+ error
+ });
+ }
+ }
+};
+var run = async function(options = {
+ querySelector: ".mermaid"
+}) {
+ try {
+ await runThrowsErrors(options);
+ } catch (e) {
+ if (isDetailedError(e)) {
+ log$1.error(e.str);
+ }
+ if (mermaid.parseError) {
+ mermaid.parseError(e);
+ }
+ if (!options.suppressErrors) {
+ log$1.error("Use the suppressErrors option to suppress these errors");
+ throw e;
+ }
+ }
+};
+var runThrowsErrors = async function({ postRenderCallback, querySelector, nodes } = {
+ querySelector: ".mermaid"
+}) {
+ const conf = mermaidAPI.getConfig();
+ log$1.debug(`${!postRenderCallback ? "No " : ""}Callback function found`);
+ let nodesToProcess;
+ if (nodes) {
+ nodesToProcess = nodes;
+ } else if (querySelector) {
+ nodesToProcess = document.querySelectorAll(querySelector);
+ } else {
+ throw new Error("Nodes and querySelector are both undefined");
+ }
+ log$1.debug(`Found ${nodesToProcess.length} diagrams`);
+ if ((conf == null ? void 0 : conf.startOnLoad) !== void 0) {
+ log$1.debug("Start On Load: " + (conf == null ? void 0 : conf.startOnLoad));
+ mermaidAPI.updateSiteConfig({ startOnLoad: conf == null ? void 0 : conf.startOnLoad });
+ }
+ const idGenerator = new utils.initIdGenerator(conf.deterministicIds, conf.deterministicIDSeed);
+ let txt;
+ const errors = [];
+ for (const element of Array.from(nodesToProcess)) {
+ log$1.info("Rendering diagram: " + element.id);
+ if (element.getAttribute("data-processed")) {
+ continue;
+ }
+ element.setAttribute("data-processed", "true");
+ const id22 = `mermaid-${idGenerator.next()}`;
+ txt = element.innerHTML;
+ txt = dedent(utils.entityDecode(txt)).trim().replace(/
/gi, "
");
+ const init22 = utils.detectInit(txt);
+ if (init22) {
+ log$1.debug("Detected early reinit: ", init22);
+ }
+ try {
+ const { svg: svg3, bindFunctions } = await render(id22, txt, element);
+ element.innerHTML = svg3;
+ if (postRenderCallback) {
+ await postRenderCallback(id22);
+ }
+ if (bindFunctions) {
+ bindFunctions(element);
+ }
+ } catch (error) {
+ handleError(error, errors, mermaid.parseError);
+ }
+ }
+ if (errors.length > 0) {
+ throw errors[0];
+ }
+};
+var initialize = function(config2) {
+ mermaidAPI.initialize(config2);
+};
+var init2 = async function(config2, nodes, callback) {
+ log$1.warn("mermaid.init is deprecated. Please use run instead.");
+ if (config2) {
+ initialize(config2);
+ }
+ const runOptions = { postRenderCallback: callback, querySelector: ".mermaid" };
+ if (typeof nodes === "string") {
+ runOptions.querySelector = nodes;
+ } else if (nodes) {
+ if (nodes instanceof HTMLElement) {
+ runOptions.nodes = [nodes];
+ } else {
+ runOptions.nodes = nodes;
+ }
+ }
+ await run(runOptions);
+};
+var registerExternalDiagrams = async (diagrams2, {
+ lazyLoad = true
+} = {}) => {
+ registerLazyLoadedDiagrams(...diagrams2);
+ if (lazyLoad === false) {
+ await loadRegisteredDiagrams();
+ }
+};
+var contentLoaded = function() {
+ if (mermaid.startOnLoad) {
+ const { startOnLoad } = mermaidAPI.getConfig();
+ if (startOnLoad) {
+ mermaid.run().catch((err) => log$1.error("Mermaid failed to initialize", err));
+ }
+ }
+};
+if (typeof document !== "undefined") {
+ window.addEventListener("load", contentLoaded, false);
+}
+var setParseErrorHandler = function(parseErrorHandler) {
+ mermaid.parseError = parseErrorHandler;
+};
+var executionQueue = [];
+var executionQueueRunning = false;
+var executeQueue = async () => {
+ if (executionQueueRunning) {
+ return;
+ }
+ executionQueueRunning = true;
+ while (executionQueue.length > 0) {
+ const f = executionQueue.shift();
+ if (f) {
+ try {
+ await f();
+ } catch (e) {
+ log$1.error("Error executing queue", e);
+ }
+ }
+ }
+ executionQueueRunning = false;
+};
+var parse2 = async (text2, parseOptions) => {
+ return new Promise((resolve, reject) => {
+ const performCall = () => new Promise((res, rej) => {
+ mermaidAPI.parse(text2, parseOptions).then(
+ (r) => {
+ res(r);
+ resolve(r);
+ },
+ (e) => {
+ var _a;
+ log$1.error("Error parsing", e);
+ (_a = mermaid.parseError) == null ? void 0 : _a.call(mermaid, e);
+ rej(e);
+ reject(e);
+ }
+ );
+ });
+ executionQueue.push(performCall);
+ executeQueue().catch(reject);
+ });
+};
+var render = (id22, text2, container) => {
+ return new Promise((resolve, reject) => {
+ const performCall = () => new Promise((res, rej) => {
+ mermaidAPI.render(id22, text2, container).then(
+ (r) => {
+ res(r);
+ resolve(r);
+ },
+ (e) => {
+ var _a;
+ log$1.error("Error parsing", e);
+ (_a = mermaid.parseError) == null ? void 0 : _a.call(mermaid, e);
+ rej(e);
+ reject(e);
+ }
+ );
+ });
+ executionQueue.push(performCall);
+ executeQueue().catch(reject);
+ });
+};
+var mermaid = {
+ startOnLoad: true,
+ mermaidAPI,
+ parse: parse2,
+ render,
+ init: init2,
+ run,
+ registerExternalDiagrams,
+ initialize,
+ parseError: void 0,
+ contentLoaded,
+ setParseErrorHandler,
+ detectType
+};
+
+export {
+ dedent,
+ require_dayjs_min,
+ require_dist,
+ max,
+ min,
+ axisTop,
+ axisBottom,
+ select_default2 as select_default,
+ selectAll_default2 as selectAll_default,
+ hcl_default,
+ svg,
+ ordinal,
+ linear2 as linear,
+ timeMinute,
+ timeHour,
+ timeDay,
+ timeSunday,
+ timeMonday,
+ timeTuesday,
+ timeWednesday,
+ timeThursday,
+ timeFriday,
+ timeSaturday,
+ timeMonth,
+ timeFormat,
+ time,
+ Tableau10_default,
+ arc_default,
+ linear_default,
+ line_default,
+ pie_default,
+ basis_default2 as basis_default,
+ rgba_default,
+ channel_default2 as channel_default,
+ is_dark_default,
+ lighten_default,
+ darken_default,
+ root_default2 as root_default,
+ Symbol_default,
+ baseGetTag_default,
+ isObject_default,
+ isFunction_default,
+ coreJsData_default,
+ baseIsNative_default,
+ getNative_default,
+ eq_default,
+ ListCache_default,
+ Map_default,
+ MapCache_default,
+ memoize_default,
+ isPrototype_default,
+ overArg_default,
+ baseKeys_default,
+ Set_default,
+ WeakMap_default,
+ getTag_default,
+ isObjectLike_default,
+ isArguments_default,
+ isArray_default,
+ isLength_default,
+ isArrayLike_default,
+ stubFalse_default,
+ isBuffer_default,
+ baseUnary_default,
+ nodeUtil_default,
+ isTypedArray_default,
+ isEmpty_default,
+ log$1,
+ sanitizeText$2,
+ evaluate,
+ parseGenericTypes,
+ common$1,
+ getThemeVariables$2,
+ defaultConfig$1,
+ assignWithDepth$1,
+ defaultConfig,
+ setConfig,
+ getConfig$1,
+ configureSvgSize,
+ setupGraphViewbox$1,
+ clear,
+ setAccTitle,
+ getAccTitle,
+ setAccDescription,
+ getAccDescription,
+ setDiagramTitle,
+ getDiagramTitle,
+ commonDb$1,
+ parseDirective$1,
+ getConfig,
+ setupGraphViewbox,
+ ZERO_WIDTH_SPACE,
+ interpolateToCurve,
+ getStylesFromArray,
+ generateId,
+ random,
+ wrapLabel,
+ calculateTextHeight,
+ calculateTextWidth,
+ parseFontSize,
+ utils,
+ selectSvgElement,
+ addFunction,
+ decodeEntities,
+ mermaidAPI,
+ mermaid
+};
+/*! Bundled license information:
+
+dompurify/dist/purify.es.js:
+ (*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE *)
+
+mermaid/dist/mermaid-306576ad.js:
+ (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
+ (*! Check if previously processed *)
+ (*!
+ * Wait for document loaded before starting the execution
+ *)
+*/
+//# sourceMappingURL=chunk-4QTAVOE5.js.map
diff --git a/.vuepress/.cache/deps/chunk-4QTAVOE5.js.map b/.vuepress/.cache/deps/chunk-4QTAVOE5.js.map
new file mode 100644
index 00000000..f58c581d
--- /dev/null
+++ b/.vuepress/.cache/deps/chunk-4QTAVOE5.js.map
@@ -0,0 +1,7 @@
+{
+ "version": 3,
+ "sources": ["../../../node_modules/dayjs/dayjs.min.js", "../../../node_modules/@braintree/sanitize-url/dist/index.js", "../../../node_modules/ts-dedent/src/index.ts", "../../../node_modules/d3-array/src/max.js", "../../../node_modules/d3-array/src/min.js", "../../../node_modules/d3-array/src/ascending.js", "../../../node_modules/d3-array/src/descending.js", "../../../node_modules/d3-array/src/bisector.js", "../../../node_modules/d3-array/src/number.js", "../../../node_modules/d3-array/src/bisect.js", "../../../node_modules/d3-array/src/blur.js", "../../../node_modules/d3-array/src/fsum.js", "../../../node_modules/internmap/src/index.js", "../../../node_modules/d3-array/src/array.js", "../../../node_modules/d3-array/src/ticks.js", "../../../node_modules/d3-array/src/merge.js", "../../../node_modules/d3-array/src/shuffle.js", "../../../node_modules/d3-axis/src/identity.js", "../../../node_modules/d3-axis/src/axis.js", "../../../node_modules/d3-selection/src/selector.js", "../../../node_modules/d3-selection/src/selection/select.js", "../../../node_modules/d3-selection/src/array.js", "../../../node_modules/d3-selection/src/selectorAll.js", "../../../node_modules/d3-selection/src/selection/selectAll.js", "../../../node_modules/d3-selection/src/matcher.js", "../../../node_modules/d3-selection/src/selection/selectChild.js", "../../../node_modules/d3-selection/src/selection/selectChildren.js", "../../../node_modules/d3-selection/src/selection/filter.js", "../../../node_modules/d3-selection/src/selection/sparse.js", "../../../node_modules/d3-selection/src/selection/enter.js", "../../../node_modules/d3-selection/src/constant.js", "../../../node_modules/d3-selection/src/selection/data.js", "../../../node_modules/d3-selection/src/selection/exit.js", "../../../node_modules/d3-selection/src/selection/join.js", "../../../node_modules/d3-selection/src/selection/merge.js", "../../../node_modules/d3-selection/src/selection/order.js", "../../../node_modules/d3-selection/src/selection/sort.js", "../../../node_modules/d3-selection/src/selection/call.js", "../../../node_modules/d3-selection/src/selection/nodes.js", "../../../node_modules/d3-selection/src/selection/node.js", "../../../node_modules/d3-selection/src/selection/size.js", "../../../node_modules/d3-selection/src/selection/empty.js", "../../../node_modules/d3-selection/src/selection/each.js", "../../../node_modules/d3-selection/src/namespaces.js", "../../../node_modules/d3-selection/src/namespace.js", "../../../node_modules/d3-selection/src/selection/attr.js", "../../../node_modules/d3-selection/src/window.js", "../../../node_modules/d3-selection/src/selection/style.js", "../../../node_modules/d3-selection/src/selection/property.js", "../../../node_modules/d3-selection/src/selection/classed.js", "../../../node_modules/d3-selection/src/selection/text.js", "../../../node_modules/d3-selection/src/selection/html.js", "../../../node_modules/d3-selection/src/selection/raise.js", "../../../node_modules/d3-selection/src/selection/lower.js", "../../../node_modules/d3-selection/src/creator.js", "../../../node_modules/d3-selection/src/selection/append.js", "../../../node_modules/d3-selection/src/selection/insert.js", "../../../node_modules/d3-selection/src/selection/remove.js", "../../../node_modules/d3-selection/src/selection/clone.js", "../../../node_modules/d3-selection/src/selection/datum.js", "../../../node_modules/d3-selection/src/selection/on.js", "../../../node_modules/d3-selection/src/selection/dispatch.js", "../../../node_modules/d3-selection/src/selection/iterator.js", "../../../node_modules/d3-selection/src/selection/index.js", "../../../node_modules/d3-selection/src/select.js", "../../../node_modules/d3-selection/src/selectAll.js", "../../../node_modules/d3-selection/src/local.js", "../../../node_modules/d3-color/src/define.js", "../../../node_modules/d3-color/src/color.js", "../../../node_modules/d3-color/src/math.js", "../../../node_modules/d3-color/src/lab.js", "../../../node_modules/d3-color/src/cubehelix.js", "../../../node_modules/d3-interpolate/src/constant.js", "../../../node_modules/d3-interpolate/src/color.js", "../../../node_modules/d3-interpolate/src/hcl.js", "../../../node_modules/d3-interpolate/src/basis.js", "../../../node_modules/d3-interpolate/src/basisClosed.js", "../../../node_modules/d3-interpolate/src/rgb.js", "../../../node_modules/d3-interpolate/src/numberArray.js", "../../../node_modules/d3-interpolate/src/array.js", "../../../node_modules/d3-interpolate/src/date.js", "../../../node_modules/d3-interpolate/src/number.js", "../../../node_modules/d3-interpolate/src/object.js", "../../../node_modules/d3-interpolate/src/string.js", "../../../node_modules/d3-interpolate/src/value.js", "../../../node_modules/d3-interpolate/src/round.js", "../../../node_modules/d3-interpolate/src/transform/decompose.js", "../../../node_modules/d3-interpolate/src/transform/parse.js", "../../../node_modules/d3-interpolate/src/transform/index.js", "../../../node_modules/d3-interpolate/src/zoom.js", "../../../node_modules/d3-interpolate/src/hsl.js", "../../../node_modules/d3-interpolate/src/cubehelix.js", "../../../node_modules/d3-scale/src/init.js", "../../../node_modules/d3-scale/src/ordinal.js", "../../../node_modules/d3-scale/src/constant.js", "../../../node_modules/d3-scale/src/number.js", "../../../node_modules/d3-scale/src/continuous.js", "../../../node_modules/d3-format/src/formatDecimal.js", "../../../node_modules/d3-format/src/exponent.js", "../../../node_modules/d3-format/src/formatGroup.js", "../../../node_modules/d3-format/src/formatNumerals.js", "../../../node_modules/d3-format/src/formatSpecifier.js", "../../../node_modules/d3-format/src/formatTrim.js", "../../../node_modules/d3-format/src/formatPrefixAuto.js", "../../../node_modules/d3-format/src/formatRounded.js", "../../../node_modules/d3-format/src/formatTypes.js", "../../../node_modules/d3-format/src/identity.js", "../../../node_modules/d3-format/src/locale.js", "../../../node_modules/d3-format/src/defaultLocale.js", "../../../node_modules/d3-format/src/precisionFixed.js", "../../../node_modules/d3-format/src/precisionPrefix.js", "../../../node_modules/d3-format/src/precisionRound.js", "../../../node_modules/d3-scale/src/tickFormat.js", "../../../node_modules/d3-scale/src/linear.js", "../../../node_modules/d3-time/src/interval.js", "../../../node_modules/d3-time/src/duration.js", "../../../node_modules/d3-time/src/minute.js", "../../../node_modules/d3-time/src/hour.js", "../../../node_modules/d3-time/src/day.js", "../../../node_modules/d3-time/src/week.js", "../../../node_modules/d3-time/src/month.js", "../../../node_modules/d3-time/src/millisecond.js", "../../../node_modules/d3-time/src/second.js", "../../../node_modules/d3-time/src/year.js", "../../../node_modules/d3-time/src/ticks.js", "../../../node_modules/d3-time-format/src/locale.js", "../../../node_modules/d3-time-format/src/defaultLocale.js", "../../../node_modules/d3-time-format/src/isoFormat.js", "../../../node_modules/d3-time-format/src/isoParse.js", "../../../node_modules/d3-scale/src/nice.js", "../../../node_modules/d3-scale/src/time.js", "../../../node_modules/d3-scale-chromatic/src/colors.js", "../../../node_modules/d3-scale-chromatic/src/categorical/Tableau10.js", "../../../node_modules/d3-scale-chromatic/src/categorical/category10.js", "../../../node_modules/d3-scale-chromatic/src/categorical/Accent.js", "../../../node_modules/d3-scale-chromatic/src/categorical/Dark2.js", "../../../node_modules/d3-scale-chromatic/src/categorical/Paired.js", "../../../node_modules/d3-scale-chromatic/src/categorical/Pastel1.js", "../../../node_modules/d3-scale-chromatic/src/categorical/Pastel2.js", "../../../node_modules/d3-scale-chromatic/src/categorical/Set1.js", "../../../node_modules/d3-scale-chromatic/src/categorical/Set2.js", "../../../node_modules/d3-scale-chromatic/src/categorical/Set3.js", "../../../node_modules/d3-scale-chromatic/src/ramp.js", "../../../node_modules/d3-scale-chromatic/src/diverging/BrBG.js", "../../../node_modules/d3-scale-chromatic/src/diverging/PRGn.js", "../../../node_modules/d3-scale-chromatic/src/diverging/PiYG.js", "../../../node_modules/d3-scale-chromatic/src/diverging/PuOr.js", "../../../node_modules/d3-scale-chromatic/src/diverging/RdBu.js", "../../../node_modules/d3-scale-chromatic/src/diverging/RdGy.js", "../../../node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js", "../../../node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js", "../../../node_modules/d3-scale-chromatic/src/diverging/Spectral.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js", "../../../node_modules/d3-scale-chromatic/src/sequential-single/Blues.js", "../../../node_modules/d3-scale-chromatic/src/sequential-single/Greens.js", "../../../node_modules/d3-scale-chromatic/src/sequential-single/Greys.js", "../../../node_modules/d3-scale-chromatic/src/sequential-single/Purples.js", "../../../node_modules/d3-scale-chromatic/src/sequential-single/Reds.js", "../../../node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js", "../../../node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js", "../../../node_modules/d3-shape/src/constant.js", "../../../node_modules/d3-shape/src/math.js", "../../../node_modules/d3-path/src/path.js", "../../../node_modules/d3-shape/src/path.js", "../../../node_modules/d3-shape/src/arc.js", "../../../node_modules/d3-shape/src/curve/linear.js", "../../../node_modules/d3-shape/src/array.js", "../../../node_modules/d3-shape/src/point.js", "../../../node_modules/d3-shape/src/line.js", "../../../node_modules/d3-shape/src/descending.js", "../../../node_modules/d3-shape/src/identity.js", "../../../node_modules/d3-shape/src/pie.js", "../../../node_modules/d3-shape/src/curve/basis.js", "../../../node_modules/d3-shape/src/curve/radial.js", "../../../node_modules/d3-shape/src/curve/bump.js", "../../../node_modules/d3-shape/src/symbol/asterisk.js", "../../../node_modules/d3-shape/src/symbol/diamond.js", "../../../node_modules/d3-shape/src/symbol/star.js", "../../../node_modules/d3-shape/src/symbol/triangle.js", "../../../node_modules/d3-shape/src/symbol/triangle2.js", "../../../node_modules/d3-shape/src/symbol/wye.js", "../../../node_modules/d3-shape/src/noop.js", "../../../node_modules/d3-shape/src/curve/basisClosed.js", "../../../node_modules/d3-shape/src/curve/basisOpen.js", "../../../node_modules/d3-shape/src/curve/bundle.js", "../../../node_modules/d3-shape/src/curve/cardinal.js", "../../../node_modules/d3-shape/src/curve/cardinalClosed.js", "../../../node_modules/d3-shape/src/curve/cardinalOpen.js", "../../../node_modules/d3-shape/src/curve/catmullRom.js", "../../../node_modules/d3-shape/src/curve/catmullRomClosed.js", "../../../node_modules/d3-shape/src/curve/catmullRomOpen.js", "../../../node_modules/d3-shape/src/curve/linearClosed.js", "../../../node_modules/d3-shape/src/curve/monotone.js", "../../../node_modules/d3-shape/src/curve/natural.js", "../../../node_modules/d3-shape/src/curve/step.js", "../../../node_modules/d3-dispatch/src/dispatch.js", "../../../node_modules/d3-drag/src/event.js", "../../../node_modules/d3-timer/src/timer.js", "../../../node_modules/d3-timer/src/timeout.js", "../../../node_modules/d3-transition/src/transition/schedule.js", "../../../node_modules/d3-transition/src/interrupt.js", "../../../node_modules/d3-transition/src/selection/interrupt.js", "../../../node_modules/d3-transition/src/transition/tween.js", "../../../node_modules/d3-transition/src/transition/interpolate.js", "../../../node_modules/d3-transition/src/transition/attr.js", "../../../node_modules/d3-transition/src/transition/attrTween.js", "../../../node_modules/d3-transition/src/transition/delay.js", "../../../node_modules/d3-transition/src/transition/duration.js", "../../../node_modules/d3-transition/src/transition/ease.js", "../../../node_modules/d3-transition/src/transition/easeVarying.js", "../../../node_modules/d3-transition/src/transition/filter.js", "../../../node_modules/d3-transition/src/transition/merge.js", "../../../node_modules/d3-transition/src/transition/on.js", "../../../node_modules/d3-transition/src/transition/remove.js", "../../../node_modules/d3-transition/src/transition/select.js", "../../../node_modules/d3-transition/src/transition/selectAll.js", "../../../node_modules/d3-transition/src/transition/selection.js", "../../../node_modules/d3-transition/src/transition/style.js", "../../../node_modules/d3-transition/src/transition/styleTween.js", "../../../node_modules/d3-transition/src/transition/text.js", "../../../node_modules/d3-transition/src/transition/textTween.js", "../../../node_modules/d3-transition/src/transition/transition.js", "../../../node_modules/d3-transition/src/transition/end.js", "../../../node_modules/d3-transition/src/transition/index.js", "../../../node_modules/d3-ease/src/cubic.js", "../../../node_modules/d3-ease/src/poly.js", "../../../node_modules/d3-ease/src/sin.js", "../../../node_modules/d3-ease/src/math.js", "../../../node_modules/d3-ease/src/bounce.js", "../../../node_modules/d3-ease/src/back.js", "../../../node_modules/d3-ease/src/elastic.js", "../../../node_modules/d3-transition/src/selection/transition.js", "../../../node_modules/d3-transition/src/selection/index.js", "../../../node_modules/d3-brush/src/brush.js", "../../../node_modules/d3-chord/src/math.js", "../../../node_modules/d3-chord/src/array.js", "../../../node_modules/d3-contour/src/array.js", "../../../node_modules/robust-predicates/esm/util.js", "../../../node_modules/robust-predicates/esm/orient2d.js", "../../../node_modules/robust-predicates/esm/orient3d.js", "../../../node_modules/robust-predicates/esm/incircle.js", "../../../node_modules/robust-predicates/esm/insphere.js", "../../../node_modules/delaunator/index.js", "../../../node_modules/d3-delaunay/src/delaunay.js", "../../../node_modules/d3-dsv/src/dsv.js", "../../../node_modules/d3-dsv/src/csv.js", "../../../node_modules/d3-dsv/src/tsv.js", "../../../node_modules/d3-dsv/src/autoType.js", "../../../node_modules/d3-fetch/src/text.js", "../../../node_modules/d3-fetch/src/dsv.js", "../../../node_modules/d3-fetch/src/xml.js", "../../../node_modules/d3-quadtree/src/add.js", "../../../node_modules/d3-quadtree/src/cover.js", "../../../node_modules/d3-quadtree/src/data.js", "../../../node_modules/d3-quadtree/src/extent.js", "../../../node_modules/d3-quadtree/src/quad.js", "../../../node_modules/d3-quadtree/src/find.js", "../../../node_modules/d3-quadtree/src/remove.js", "../../../node_modules/d3-quadtree/src/root.js", "../../../node_modules/d3-quadtree/src/size.js", "../../../node_modules/d3-quadtree/src/visit.js", "../../../node_modules/d3-quadtree/src/visitAfter.js", "../../../node_modules/d3-quadtree/src/x.js", "../../../node_modules/d3-quadtree/src/y.js", "../../../node_modules/d3-quadtree/src/quadtree.js", "../../../node_modules/d3-force/src/simulation.js", "../../../node_modules/d3-geo/src/math.js", "../../../node_modules/d3-geo/src/noop.js", "../../../node_modules/d3-geo/src/area.js", "../../../node_modules/d3-geo/src/cartesian.js", "../../../node_modules/d3-geo/src/rotation.js", "../../../node_modules/d3-geo/src/clip/buffer.js", "../../../node_modules/d3-geo/src/pointEqual.js", "../../../node_modules/d3-geo/src/clip/rejoin.js", "../../../node_modules/d3-geo/src/polygonContains.js", "../../../node_modules/d3-geo/src/clip/index.js", "../../../node_modules/d3-geo/src/clip/antimeridian.js", "../../../node_modules/d3-geo/src/clip/rectangle.js", "../../../node_modules/d3-geo/src/path/area.js", "../../../node_modules/d3-geo/src/path/bounds.js", "../../../node_modules/d3-geo/src/path/context.js", "../../../node_modules/d3-geo/src/path/measure.js", "../../../node_modules/d3-geo/src/transform.js", "../../../node_modules/d3-geo/src/projection/resample.js", "../../../node_modules/d3-geo/src/projection/index.js", "../../../node_modules/d3-geo/src/projection/azimuthal.js", "../../../node_modules/d3-geo/src/projection/azimuthalEqualArea.js", "../../../node_modules/d3-geo/src/projection/azimuthalEquidistant.js", "../../../node_modules/d3-geo/src/projection/mercator.js", "../../../node_modules/d3-geo/src/projection/equirectangular.js", "../../../node_modules/d3-geo/src/projection/equalEarth.js", "../../../node_modules/d3-geo/src/projection/gnomonic.js", "../../../node_modules/d3-geo/src/projection/naturalEarth1.js", "../../../node_modules/d3-geo/src/projection/orthographic.js", "../../../node_modules/d3-geo/src/projection/stereographic.js", "../../../node_modules/d3-geo/src/projection/transverseMercator.js", "../../../node_modules/d3-hierarchy/src/hierarchy/count.js", "../../../node_modules/d3-hierarchy/src/hierarchy/each.js", "../../../node_modules/d3-hierarchy/src/hierarchy/eachBefore.js", "../../../node_modules/d3-hierarchy/src/hierarchy/eachAfter.js", "../../../node_modules/d3-hierarchy/src/hierarchy/find.js", "../../../node_modules/d3-hierarchy/src/hierarchy/sum.js", "../../../node_modules/d3-hierarchy/src/hierarchy/sort.js", "../../../node_modules/d3-hierarchy/src/hierarchy/path.js", "../../../node_modules/d3-hierarchy/src/hierarchy/ancestors.js", "../../../node_modules/d3-hierarchy/src/hierarchy/descendants.js", "../../../node_modules/d3-hierarchy/src/hierarchy/leaves.js", "../../../node_modules/d3-hierarchy/src/hierarchy/links.js", "../../../node_modules/d3-hierarchy/src/hierarchy/iterator.js", "../../../node_modules/d3-hierarchy/src/hierarchy/index.js", "../../../node_modules/d3-hierarchy/src/treemap/dice.js", "../../../node_modules/d3-hierarchy/src/tree.js", "../../../node_modules/d3-hierarchy/src/treemap/slice.js", "../../../node_modules/d3-hierarchy/src/treemap/squarify.js", "../../../node_modules/d3-hierarchy/src/treemap/resquarify.js", "../../../node_modules/d3-random/src/defaultSource.js", "../../../node_modules/d3-random/src/uniform.js", "../../../node_modules/d3-random/src/int.js", "../../../node_modules/d3-random/src/normal.js", "../../../node_modules/d3-random/src/logNormal.js", "../../../node_modules/d3-random/src/irwinHall.js", "../../../node_modules/d3-random/src/bates.js", "../../../node_modules/d3-random/src/exponential.js", "../../../node_modules/d3-random/src/pareto.js", "../../../node_modules/d3-random/src/bernoulli.js", "../../../node_modules/d3-random/src/geometric.js", "../../../node_modules/d3-random/src/gamma.js", "../../../node_modules/d3-random/src/beta.js", "../../../node_modules/d3-random/src/binomial.js", "../../../node_modules/d3-random/src/weibull.js", "../../../node_modules/d3-random/src/cauchy.js", "../../../node_modules/d3-random/src/logistic.js", "../../../node_modules/d3-random/src/poisson.js", "../../../node_modules/d3-random/src/lcg.js", "../../../node_modules/d3-zoom/src/transform.js", "../../../node_modules/dompurify/src/utils.js", "../../../node_modules/dompurify/src/tags.js", "../../../node_modules/dompurify/src/attrs.js", "../../../node_modules/dompurify/src/regexp.js", "../../../node_modules/dompurify/src/purify.js", "../../../node_modules/khroma/dist/utils/channel.js", "../../../node_modules/khroma/dist/utils/lang.js", "../../../node_modules/khroma/dist/utils/unit.js", "../../../node_modules/khroma/dist/utils/index.js", "../../../node_modules/khroma/dist/constants.js", "../../../node_modules/khroma/dist/channels/type.js", "../../../node_modules/khroma/dist/channels/index.js", "../../../node_modules/khroma/dist/channels/reusable.js", "../../../node_modules/khroma/dist/color/hex.js", "../../../node_modules/khroma/dist/color/hsl.js", "../../../node_modules/khroma/dist/color/keyword.js", "../../../node_modules/khroma/dist/color/rgb.js", "../../../node_modules/khroma/dist/color/index.js", "../../../node_modules/khroma/dist/methods/luminance.js", "../../../node_modules/khroma/dist/methods/is_light.js", "../../../node_modules/khroma/dist/methods/is_dark.js", "../../../node_modules/khroma/dist/methods/adjust_channel.js", "../../../node_modules/khroma/dist/methods/lighten.js", "../../../node_modules/khroma/dist/methods/darken.js", "../../../node_modules/khroma/dist/methods/change.js", "../../../node_modules/khroma/dist/methods/rgba.js", "../../../node_modules/khroma/dist/methods/channel.js", "../../../node_modules/khroma/dist/methods/adjust.js", "../../../node_modules/khroma/dist/methods/mix.js", "../../../node_modules/khroma/dist/methods/invert.js", "../../../node_modules/lodash-es/_freeGlobal.js", "../../../node_modules/lodash-es/_root.js", "../../../node_modules/lodash-es/_Symbol.js", "../../../node_modules/lodash-es/_getRawTag.js", "../../../node_modules/lodash-es/_objectToString.js", "../../../node_modules/lodash-es/_baseGetTag.js", "../../../node_modules/lodash-es/isObject.js", "../../../node_modules/lodash-es/isFunction.js", "../../../node_modules/lodash-es/_coreJsData.js", "../../../node_modules/lodash-es/_isMasked.js", "../../../node_modules/lodash-es/_toSource.js", "../../../node_modules/lodash-es/_baseIsNative.js", "../../../node_modules/lodash-es/_getValue.js", "../../../node_modules/lodash-es/_getNative.js", "../../../node_modules/lodash-es/_nativeCreate.js", "../../../node_modules/lodash-es/_hashClear.js", "../../../node_modules/lodash-es/_hashDelete.js", "../../../node_modules/lodash-es/_hashGet.js", "../../../node_modules/lodash-es/_hashHas.js", "../../../node_modules/lodash-es/_hashSet.js", "../../../node_modules/lodash-es/_Hash.js", "../../../node_modules/lodash-es/_listCacheClear.js", "../../../node_modules/lodash-es/eq.js", "../../../node_modules/lodash-es/_assocIndexOf.js", "../../../node_modules/lodash-es/_listCacheDelete.js", "../../../node_modules/lodash-es/_listCacheGet.js", "../../../node_modules/lodash-es/_listCacheHas.js", "../../../node_modules/lodash-es/_listCacheSet.js", "../../../node_modules/lodash-es/_ListCache.js", "../../../node_modules/lodash-es/_Map.js", "../../../node_modules/lodash-es/_mapCacheClear.js", "../../../node_modules/lodash-es/_isKeyable.js", "../../../node_modules/lodash-es/_getMapData.js", "../../../node_modules/lodash-es/_mapCacheDelete.js", "../../../node_modules/lodash-es/_mapCacheGet.js", "../../../node_modules/lodash-es/_mapCacheHas.js", "../../../node_modules/lodash-es/_mapCacheSet.js", "../../../node_modules/lodash-es/_MapCache.js", "../../../node_modules/lodash-es/memoize.js", "../../../node_modules/stylis/src/Enum.js", "../../../node_modules/stylis/src/Utility.js", "../../../node_modules/stylis/src/Tokenizer.js", "../../../node_modules/stylis/src/Parser.js", "../../../node_modules/stylis/src/Serializer.js", "../../../node_modules/lodash-es/_isPrototype.js", "../../../node_modules/lodash-es/_overArg.js", "../../../node_modules/lodash-es/_nativeKeys.js", "../../../node_modules/lodash-es/_baseKeys.js", "../../../node_modules/lodash-es/_DataView.js", "../../../node_modules/lodash-es/_Promise.js", "../../../node_modules/lodash-es/_Set.js", "../../../node_modules/lodash-es/_WeakMap.js", "../../../node_modules/lodash-es/_getTag.js", "../../../node_modules/lodash-es/isObjectLike.js", "../../../node_modules/lodash-es/_baseIsArguments.js", "../../../node_modules/lodash-es/isArguments.js", "../../../node_modules/lodash-es/isArray.js", "../../../node_modules/lodash-es/isLength.js", "../../../node_modules/lodash-es/isArrayLike.js", "../../../node_modules/lodash-es/stubFalse.js", "../../../node_modules/lodash-es/isBuffer.js", "../../../node_modules/lodash-es/_baseIsTypedArray.js", "../../../node_modules/lodash-es/_baseUnary.js", "../../../node_modules/lodash-es/_nodeUtil.js", "../../../node_modules/lodash-es/isTypedArray.js", "../../../node_modules/lodash-es/isEmpty.js", "../../../node_modules/mermaid/dist/mermaid-306576ad.js"],
+ "sourcesContent": ["!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new b(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var b=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t) -1;\n}\n// adapted from https://stackoverflow.com/a/29824550/2601552\nfunction decodeHtmlCharacters(str) {\n var removedNullByte = str.replace(ctrlCharactersRegex, \"\");\n return removedNullByte.replace(htmlEntitiesRegex, function (match, dec) {\n return String.fromCharCode(dec);\n });\n}\nfunction sanitizeUrl(url) {\n if (!url) {\n return exports.BLANK_URL;\n }\n var sanitizedUrl = decodeHtmlCharacters(url)\n .replace(htmlCtrlEntityRegex, \"\")\n .replace(ctrlCharactersRegex, \"\")\n .trim();\n if (!sanitizedUrl) {\n return exports.BLANK_URL;\n }\n if (isRelativeUrlWithoutProtocol(sanitizedUrl)) {\n return sanitizedUrl;\n }\n var urlSchemeParseResults = sanitizedUrl.match(urlSchemeRegex);\n if (!urlSchemeParseResults) {\n return sanitizedUrl;\n }\n var urlScheme = urlSchemeParseResults[0];\n if (invalidProtocolRegex.test(urlScheme)) {\n return exports.BLANK_URL;\n }\n return sanitizedUrl;\n}\nexports.sanitizeUrl = sanitizeUrl;\n", "export function dedent(\n templ: TemplateStringsArray | string,\n ...values: unknown[]\n): string {\n let strings = Array.from(typeof templ === 'string' ? [templ] : templ);\n\n // 1. Remove trailing whitespace.\n strings[strings.length - 1] = strings[strings.length - 1].replace(\n /\\r?\\n([\\t ]*)$/,\n '',\n );\n\n // 2. Find all line breaks to determine the highest common indentation level.\n const indentLengths = strings.reduce((arr, str) => {\n const matches = str.match(/\\n([\\t ]+|(?!\\s).)/g);\n if (matches) {\n return arr.concat(\n matches.map((match) => match.match(/[\\t ]/g)?.length ?? 0),\n );\n }\n return arr;\n }, []);\n\n // 3. Remove the common indentation from all strings.\n if (indentLengths.length) {\n const pattern = new RegExp(`\\n[\\t ]{${Math.min(...indentLengths)}}`, 'g');\n\n strings = strings.map((str) => str.replace(pattern, '\\n'));\n }\n\n // 4. Remove leading whitespace.\n strings[0] = strings[0].replace(/^\\r?\\n/, '');\n\n // 5. Perform interpolation.\n let string = strings[0];\n\n values.forEach((value, i) => {\n // 5.1 Read current indentation level\n const endentations = string.match(/(?:^|\\n)( *)$/)\n const endentation = endentations ? endentations[1] : ''\n let indentedValue = value\n // 5.2 Add indentation to values with multiline strings\n if (typeof value === 'string' && value.includes('\\n')) {\n indentedValue = String(value)\n .split('\\n')\n .map((str, i) => {\n return i === 0 ? str : `${endentation}${str}`\n })\n .join('\\n');\n }\n\n string += indentedValue + strings[i + 1];\n });\n\n return string;\n}\n\nexport default dedent;\n", "export default function max(values, valueof) {\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n }\n return max;\n}\n", "export default function min(values, valueof) {\n let min;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n }\n return min;\n}\n", "export default function ascending(a, b) {\n return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "export default function descending(a, b) {\n return a == null || b == null ? NaN\n : b < a ? -1\n : b > a ? 1\n : b >= a ? 0\n : NaN;\n}\n", "import ascending from \"./ascending.js\";\nimport descending from \"./descending.js\";\n\nexport default function bisector(f) {\n let compare1, compare2, delta;\n\n // If an accessor is specified, promote it to a comparator. In this case we\n // can test whether the search value is (self-) comparable. We can’t do this\n // for a comparator (except for specific, known comparators) because we can’t\n // tell if the comparator is symmetric, and an asymmetric comparator can’t be\n // used to test whether a single value is comparable.\n if (f.length !== 2) {\n compare1 = ascending;\n compare2 = (d, x) => ascending(f(d), x);\n delta = (d, x) => f(d) - x;\n } else {\n compare1 = f === ascending || f === descending ? f : zero;\n compare2 = f;\n delta = f;\n }\n\n function left(a, x, lo = 0, hi = a.length) {\n if (lo < hi) {\n if (compare1(x, x) !== 0) return hi;\n do {\n const mid = (lo + hi) >>> 1;\n if (compare2(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n } while (lo < hi);\n }\n return lo;\n }\n\n function right(a, x, lo = 0, hi = a.length) {\n if (lo < hi) {\n if (compare1(x, x) !== 0) return hi;\n do {\n const mid = (lo + hi) >>> 1;\n if (compare2(a[mid], x) <= 0) lo = mid + 1;\n else hi = mid;\n } while (lo < hi);\n }\n return lo;\n }\n\n function center(a, x, lo = 0, hi = a.length) {\n const i = left(a, x, lo, hi - 1);\n return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n }\n\n return {left, center, right};\n}\n\nfunction zero() {\n return 0;\n}\n", "export default function number(x) {\n return x === null ? NaN : +x;\n}\n\nexport function* numbers(values, valueof) {\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n yield value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n yield value;\n }\n }\n }\n}\n", "import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\nimport number from \"./number.js\";\n\nconst ascendingBisect = bisector(ascending);\nexport const bisectRight = ascendingBisect.right;\nexport const bisectLeft = ascendingBisect.left;\nexport const bisectCenter = bisector(number).center;\nexport default bisectRight;\n", "export function blur(values, r) {\n if (!((r = +r) >= 0)) throw new RangeError(\"invalid r\");\n let length = values.length;\n if (!((length = Math.floor(length)) >= 0)) throw new RangeError(\"invalid length\");\n if (!length || !r) return values;\n const blur = blurf(r);\n const temp = values.slice();\n blur(values, temp, 0, length, 1);\n blur(temp, values, 0, length, 1);\n blur(values, temp, 0, length, 1);\n return values;\n}\n\nexport const blur2 = Blur2(blurf);\n\nexport const blurImage = Blur2(blurfImage);\n\nfunction Blur2(blur) {\n return function(data, rx, ry = rx) {\n if (!((rx = +rx) >= 0)) throw new RangeError(\"invalid rx\");\n if (!((ry = +ry) >= 0)) throw new RangeError(\"invalid ry\");\n let {data: values, width, height} = data;\n if (!((width = Math.floor(width)) >= 0)) throw new RangeError(\"invalid width\");\n if (!((height = Math.floor(height !== undefined ? height : values.length / width)) >= 0)) throw new RangeError(\"invalid height\");\n if (!width || !height || (!rx && !ry)) return data;\n const blurx = rx && blur(rx);\n const blury = ry && blur(ry);\n const temp = values.slice();\n if (blurx && blury) {\n blurh(blurx, temp, values, width, height);\n blurh(blurx, values, temp, width, height);\n blurh(blurx, temp, values, width, height);\n blurv(blury, values, temp, width, height);\n blurv(blury, temp, values, width, height);\n blurv(blury, values, temp, width, height);\n } else if (blurx) {\n blurh(blurx, values, temp, width, height);\n blurh(blurx, temp, values, width, height);\n blurh(blurx, values, temp, width, height);\n } else if (blury) {\n blurv(blury, values, temp, width, height);\n blurv(blury, temp, values, width, height);\n blurv(blury, values, temp, width, height);\n }\n return data;\n };\n}\n\nfunction blurh(blur, T, S, w, h) {\n for (let y = 0, n = w * h; y < n;) {\n blur(T, S, y, y += w, 1);\n }\n}\n\nfunction blurv(blur, T, S, w, h) {\n for (let x = 0, n = w * h; x < w; ++x) {\n blur(T, S, x, x + n, w);\n }\n}\n\nfunction blurfImage(radius) {\n const blur = blurf(radius);\n return (T, S, start, stop, step) => {\n start <<= 2, stop <<= 2, step <<= 2;\n blur(T, S, start + 0, stop + 0, step);\n blur(T, S, start + 1, stop + 1, step);\n blur(T, S, start + 2, stop + 2, step);\n blur(T, S, start + 3, stop + 3, step);\n };\n}\n\n// Given a target array T, a source array S, sets each value T[i] to the average\n// of {S[i - r], …, S[i], …, S[i + r]}, where r = ⌊radius⌋, start <= i < stop,\n// for each i, i + step, i + 2 * step, etc., and where S[j] is clamped between\n// S[start] (inclusive) and S[stop] (exclusive). If the given radius is not an\n// integer, S[i - r - 1] and S[i + r + 1] are added to the sum, each weighted\n// according to r - ⌊radius⌋.\nfunction blurf(radius) {\n const radius0 = Math.floor(radius);\n if (radius0 === radius) return bluri(radius);\n const t = radius - radius0;\n const w = 2 * radius + 1;\n return (T, S, start, stop, step) => { // stop must be aligned!\n if (!((stop -= step) >= start)) return; // inclusive stop\n let sum = radius0 * S[start];\n const s0 = step * radius0;\n const s1 = s0 + step;\n for (let i = start, j = start + s0; i < j; i += step) {\n sum += S[Math.min(stop, i)];\n }\n for (let i = start, j = stop; i <= j; i += step) {\n sum += S[Math.min(stop, i + s0)];\n T[i] = (sum + t * (S[Math.max(start, i - s1)] + S[Math.min(stop, i + s1)])) / w;\n sum -= S[Math.max(start, i - s0)];\n }\n };\n}\n\n// Like blurf, but optimized for integer radius.\nfunction bluri(radius) {\n const w = 2 * radius + 1;\n return (T, S, start, stop, step) => { // stop must be aligned!\n if (!((stop -= step) >= start)) return; // inclusive stop\n let sum = radius * S[start];\n const s = step * radius;\n for (let i = start, j = start + s; i < j; i += step) {\n sum += S[Math.min(stop, i)];\n }\n for (let i = start, j = stop; i <= j; i += step) {\n sum += S[Math.min(stop, i + s)];\n T[i] = sum / w;\n sum -= S[Math.max(start, i - s)];\n }\n };\n}\n", "// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nexport class Adder {\n constructor() {\n this._partials = new Float64Array(32);\n this._n = 0;\n }\n add(x) {\n const p = this._partials;\n let i = 0;\n for (let j = 0; j < this._n && j < 32; j++) {\n const y = p[j],\n hi = x + y,\n lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n if (lo) p[i++] = lo;\n x = hi;\n }\n p[i] = x;\n this._n = i + 1;\n return this;\n }\n valueOf() {\n const p = this._partials;\n let n = this._n, x, y, lo, hi = 0;\n if (n > 0) {\n hi = p[--n];\n while (n > 0) {\n x = hi;\n y = p[--n];\n hi = x + y;\n lo = y - (hi - x);\n if (lo) break;\n }\n if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n y = lo * 2;\n x = hi + y;\n if (y == x - hi) hi = x;\n }\n }\n return hi;\n }\n}\n\nexport function fsum(values, valueof) {\n const adder = new Adder();\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n adder.add(value);\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n adder.add(value);\n }\n }\n }\n return +adder;\n}\n\nexport function fcumsum(values, valueof) {\n const adder = new Adder();\n let index = -1;\n return Float64Array.from(values, valueof === undefined\n ? v => adder.add(+v || 0)\n : v => adder.add(+valueof(v, ++index, values) || 0)\n );\n}\n", "export class InternMap extends Map {\n constructor(entries, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (entries != null) for (const [key, value] of entries) this.set(key, value);\n }\n get(key) {\n return super.get(intern_get(this, key));\n }\n has(key) {\n return super.has(intern_get(this, key));\n }\n set(key, value) {\n return super.set(intern_set(this, key), value);\n }\n delete(key) {\n return super.delete(intern_delete(this, key));\n }\n}\n\nexport class InternSet extends Set {\n constructor(values, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (values != null) for (const value of values) this.add(value);\n }\n has(value) {\n return super.has(intern_get(this, value));\n }\n add(value) {\n return super.add(intern_set(this, value));\n }\n delete(value) {\n return super.delete(intern_delete(this, value));\n }\n}\n\nfunction intern_get({_intern, _key}, value) {\n const key = _key(value);\n return _intern.has(key) ? _intern.get(key) : value;\n}\n\nfunction intern_set({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) return _intern.get(key);\n _intern.set(key, value);\n return value;\n}\n\nfunction intern_delete({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) {\n value = _intern.get(key);\n _intern.delete(key);\n }\n return value;\n}\n\nfunction keyof(value) {\n return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n", "var array = Array.prototype;\n\nexport var slice = array.slice;\nexport var map = array.map;\n", "const e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\n\nfunction tickSpec(start, stop, count) {\n const step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log10(step)),\n error = step / Math.pow(10, power),\n factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;\n let i1, i2, inc;\n if (power < 0) {\n inc = Math.pow(10, -power) / factor;\n i1 = Math.round(start * inc);\n i2 = Math.round(stop * inc);\n if (i1 / inc < start) ++i1;\n if (i2 / inc > stop) --i2;\n inc = -inc;\n } else {\n inc = Math.pow(10, power) * factor;\n i1 = Math.round(start / inc);\n i2 = Math.round(stop / inc);\n if (i1 * inc < start) ++i1;\n if (i2 * inc > stop) --i2;\n }\n if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);\n return [i1, i2, inc];\n}\n\nexport default function ticks(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n if (!(count > 0)) return [];\n if (start === stop) return [start];\n const reverse = stop < start, [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);\n if (!(i2 >= i1)) return [];\n const n = i2 - i1 + 1, ticks = new Array(n);\n if (reverse) {\n if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;\n else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc;\n } else {\n if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;\n else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc;\n }\n return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n return tickSpec(start, stop, count)[2];\n}\n\nexport function tickStep(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n const reverse = stop < start, inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);\n return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);\n}\n", "function* flatten(arrays) {\n for (const array of arrays) {\n yield* array;\n }\n}\n\nexport default function merge(arrays) {\n return Array.from(flatten(arrays));\n}\n", "export default shuffler(Math.random);\n\nexport function shuffler(random) {\n return function shuffle(array, i0 = 0, i1 = array.length) {\n let m = i1 - (i0 = +i0);\n while (m) {\n const i = random() * m-- | 0, t = array[m + i0];\n array[m + i0] = array[i + i0];\n array[i + i0] = t;\n }\n return array;\n };\n}\n", "export default function(x) {\n return x;\n}\n", "import identity from \"./identity.js\";\n\nvar top = 1,\n right = 2,\n bottom = 3,\n left = 4,\n epsilon = 1e-6;\n\nfunction translateX(x) {\n return \"translate(\" + x + \",0)\";\n}\n\nfunction translateY(y) {\n return \"translate(0,\" + y + \")\";\n}\n\nfunction number(scale) {\n return d => +scale(d);\n}\n\nfunction center(scale, offset) {\n offset = Math.max(0, scale.bandwidth() - offset * 2) / 2;\n if (scale.round()) offset = Math.round(offset);\n return d => +scale(d) + offset;\n}\n\nfunction entering() {\n return !this.__axis;\n}\n\nfunction axis(orient, scale) {\n var tickArguments = [],\n tickValues = null,\n tickFormat = null,\n tickSizeInner = 6,\n tickSizeOuter = 6,\n tickPadding = 3,\n offset = typeof window !== \"undefined\" && window.devicePixelRatio > 1 ? 0 : 0.5,\n k = orient === top || orient === left ? -1 : 1,\n x = orient === left || orient === right ? \"x\" : \"y\",\n transform = orient === top || orient === bottom ? translateX : translateY;\n\n function axis(context) {\n var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues,\n format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity) : tickFormat,\n spacing = Math.max(tickSizeInner, 0) + tickPadding,\n range = scale.range(),\n range0 = +range[0] + offset,\n range1 = +range[range.length - 1] + offset,\n position = (scale.bandwidth ? center : number)(scale.copy(), offset),\n selection = context.selection ? context.selection() : context,\n path = selection.selectAll(\".domain\").data([null]),\n tick = selection.selectAll(\".tick\").data(values, scale).order(),\n tickExit = tick.exit(),\n tickEnter = tick.enter().append(\"g\").attr(\"class\", \"tick\"),\n line = tick.select(\"line\"),\n text = tick.select(\"text\");\n\n path = path.merge(path.enter().insert(\"path\", \".tick\")\n .attr(\"class\", \"domain\")\n .attr(\"stroke\", \"currentColor\"));\n\n tick = tick.merge(tickEnter);\n\n line = line.merge(tickEnter.append(\"line\")\n .attr(\"stroke\", \"currentColor\")\n .attr(x + \"2\", k * tickSizeInner));\n\n text = text.merge(tickEnter.append(\"text\")\n .attr(\"fill\", \"currentColor\")\n .attr(x, k * spacing)\n .attr(\"dy\", orient === top ? \"0em\" : orient === bottom ? \"0.71em\" : \"0.32em\"));\n\n if (context !== selection) {\n path = path.transition(context);\n tick = tick.transition(context);\n line = line.transition(context);\n text = text.transition(context);\n\n tickExit = tickExit.transition(context)\n .attr(\"opacity\", epsilon)\n .attr(\"transform\", function(d) { return isFinite(d = position(d)) ? transform(d + offset) : this.getAttribute(\"transform\"); });\n\n tickEnter\n .attr(\"opacity\", epsilon)\n .attr(\"transform\", function(d) { var p = this.parentNode.__axis; return transform((p && isFinite(p = p(d)) ? p : position(d)) + offset); });\n }\n\n tickExit.remove();\n\n path\n .attr(\"d\", orient === left || orient === right\n ? (tickSizeOuter ? \"M\" + k * tickSizeOuter + \",\" + range0 + \"H\" + offset + \"V\" + range1 + \"H\" + k * tickSizeOuter : \"M\" + offset + \",\" + range0 + \"V\" + range1)\n : (tickSizeOuter ? \"M\" + range0 + \",\" + k * tickSizeOuter + \"V\" + offset + \"H\" + range1 + \"V\" + k * tickSizeOuter : \"M\" + range0 + \",\" + offset + \"H\" + range1));\n\n tick\n .attr(\"opacity\", 1)\n .attr(\"transform\", function(d) { return transform(position(d) + offset); });\n\n line\n .attr(x + \"2\", k * tickSizeInner);\n\n text\n .attr(x, k * spacing)\n .text(format);\n\n selection.filter(entering)\n .attr(\"fill\", \"none\")\n .attr(\"font-size\", 10)\n .attr(\"font-family\", \"sans-serif\")\n .attr(\"text-anchor\", orient === right ? \"start\" : orient === left ? \"end\" : \"middle\");\n\n selection\n .each(function() { this.__axis = position; });\n }\n\n axis.scale = function(_) {\n return arguments.length ? (scale = _, axis) : scale;\n };\n\n axis.ticks = function() {\n return tickArguments = Array.from(arguments), axis;\n };\n\n axis.tickArguments = function(_) {\n return arguments.length ? (tickArguments = _ == null ? [] : Array.from(_), axis) : tickArguments.slice();\n };\n\n axis.tickValues = function(_) {\n return arguments.length ? (tickValues = _ == null ? null : Array.from(_), axis) : tickValues && tickValues.slice();\n };\n\n axis.tickFormat = function(_) {\n return arguments.length ? (tickFormat = _, axis) : tickFormat;\n };\n\n axis.tickSize = function(_) {\n return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;\n };\n\n axis.tickSizeInner = function(_) {\n return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;\n };\n\n axis.tickSizeOuter = function(_) {\n return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;\n };\n\n axis.tickPadding = function(_) {\n return arguments.length ? (tickPadding = +_, axis) : tickPadding;\n };\n\n axis.offset = function(_) {\n return arguments.length ? (offset = +_, axis) : offset;\n };\n\n return axis;\n}\n\nexport function axisTop(scale) {\n return axis(top, scale);\n}\n\nexport function axisRight(scale) {\n return axis(right, scale);\n}\n\nexport function axisBottom(scale) {\n return axis(bottom, scale);\n}\n\nexport function axisLeft(scale) {\n return axis(left, scale);\n}\n", "function none() {}\n\nexport default function(selector) {\n return selector == null ? none : function() {\n return this.querySelector(selector);\n };\n}\n", "import {Selection} from \"./index.js\";\nimport selector from \"../selector.js\";\n\nexport default function(select) {\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n", "// Given something array like (or null), returns something that is strictly an\n// array. This is used to ensure that array-like objects passed to d3.selectAll\n// or selection.selectAll are converted into proper arrays when creating a\n// selection; we don’t ever want to create a selection backed by a live\n// HTMLCollection or NodeList. However, note that selection.selectAll will use a\n// static NodeList as a group, since it safely derived from querySelectorAll.\nexport default function array(x) {\n return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\n}\n", "function empty() {\n return [];\n}\n\nexport default function(selector) {\n return selector == null ? empty : function() {\n return this.querySelectorAll(selector);\n };\n}\n", "import {Selection} from \"./index.js\";\nimport array from \"../array.js\";\nimport selectorAll from \"../selectorAll.js\";\n\nfunction arrayAll(select) {\n return function() {\n return array(select.apply(this, arguments));\n };\n}\n\nexport default function(select) {\n if (typeof select === \"function\") select = arrayAll(select);\n else select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n subgroups.push(select.call(node, node.__data__, i, group));\n parents.push(node);\n }\n }\n }\n\n return new Selection(subgroups, parents);\n}\n", "export default function(selector) {\n return function() {\n return this.matches(selector);\n };\n}\n\nexport function childMatcher(selector) {\n return function(node) {\n return node.matches(selector);\n };\n}\n\n", "import {childMatcher} from \"../matcher.js\";\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n return function() {\n return find.call(this.children, match);\n };\n}\n\nfunction childFirst() {\n return this.firstElementChild;\n}\n\nexport default function(match) {\n return this.select(match == null ? childFirst\n : childFind(typeof match === \"function\" ? match : childMatcher(match)));\n}\n", "import {childMatcher} from \"../matcher.js\";\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n return Array.from(this.children);\n}\n\nfunction childrenFilter(match) {\n return function() {\n return filter.call(this.children, match);\n };\n}\n\nexport default function(match) {\n return this.selectAll(match == null ? children\n : childrenFilter(typeof match === \"function\" ? match : childMatcher(match)));\n}\n", "import {Selection} from \"./index.js\";\nimport matcher from \"../matcher.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n", "export default function(update) {\n return new Array(update.length);\n}\n", "import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n this.ownerDocument = parent.ownerDocument;\n this.namespaceURI = parent.namespaceURI;\n this._next = null;\n this._parent = parent;\n this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n constructor: EnterNode,\n appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n querySelector: function(selector) { return this._parent.querySelector(selector); },\n querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n", "export default function(x) {\n return function() {\n return x;\n };\n}\n", "import {Selection} from \"./index.js\";\nimport {EnterNode} from \"./enter.js\";\nimport constant from \"../constant.js\";\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n var i = 0,\n node,\n groupLength = group.length,\n dataLength = data.length;\n\n // Put any non-null nodes that fit into update.\n // Put any null nodes into enter.\n // Put any remaining data into enter.\n for (; i < dataLength; ++i) {\n if (node = group[i]) {\n node.__data__ = data[i];\n update[i] = node;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Put any non-null nodes that don’t fit into exit.\n for (; i < groupLength; ++i) {\n if (node = group[i]) {\n exit[i] = node;\n }\n }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n var i,\n node,\n nodeByKeyValue = new Map,\n groupLength = group.length,\n dataLength = data.length,\n keyValues = new Array(groupLength),\n keyValue;\n\n // Compute the key for each node.\n // If multiple nodes have the same key, the duplicates are added to exit.\n for (i = 0; i < groupLength; ++i) {\n if (node = group[i]) {\n keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n if (nodeByKeyValue.has(keyValue)) {\n exit[i] = node;\n } else {\n nodeByKeyValue.set(keyValue, node);\n }\n }\n }\n\n // Compute the key for each datum.\n // If there a node associated with this key, join and add it to update.\n // If there is not (or the key is a duplicate), add it to enter.\n for (i = 0; i < dataLength; ++i) {\n keyValue = key.call(parent, data[i], i, data) + \"\";\n if (node = nodeByKeyValue.get(keyValue)) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue.delete(keyValue);\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Add any remaining nodes that were not bound to data to exit.\n for (i = 0; i < groupLength; ++i) {\n if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {\n exit[i] = node;\n }\n }\n}\n\nfunction datum(node) {\n return node.__data__;\n}\n\nexport default function(value, key) {\n if (!arguments.length) return Array.from(this, datum);\n\n var bind = key ? bindKey : bindIndex,\n parents = this._parents,\n groups = this._groups;\n\n if (typeof value !== \"function\") value = constant(value);\n\n for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n var parent = parents[j],\n group = groups[j],\n groupLength = group.length,\n data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),\n dataLength = data.length,\n enterGroup = enter[j] = new Array(dataLength),\n updateGroup = update[j] = new Array(dataLength),\n exitGroup = exit[j] = new Array(groupLength);\n\n bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n // Now connect the enter nodes to their following update node, such that\n // appendChild can insert the materialized enter node before this node,\n // rather than at the end of the parent node.\n for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n if (previous = enterGroup[i0]) {\n if (i0 >= i1) i1 = i0 + 1;\n while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n previous._next = next || null;\n }\n }\n }\n\n update = new Selection(update, parents);\n update._enter = enter;\n update._exit = exit;\n return update;\n}\n\n// Given some data, this returns an array-like view of it: an object that\n// exposes a length property and allows numeric indexing. Note that unlike\n// selectAll, this isn’t worried about “live” collections because the resulting\n// array will only be used briefly while data is being bound. (It is possible to\n// cause the data to change while iterating by using a key function, but please\n// don’t; we’d rather avoid a gratuitous copy.)\nfunction arraylike(data) {\n return typeof data === \"object\" && \"length\" in data\n ? data // Array, TypedArray, NodeList, array-like\n : Array.from(data); // Map, Set, iterable, string, or anything else\n}\n", "import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n", "export default function(onenter, onupdate, onexit) {\n var enter = this.enter(), update = this, exit = this.exit();\n if (typeof onenter === \"function\") {\n enter = onenter(enter);\n if (enter) enter = enter.selection();\n } else {\n enter = enter.append(onenter + \"\");\n }\n if (onupdate != null) {\n update = onupdate(update);\n if (update) update = update.selection();\n }\n if (onexit == null) exit.remove(); else onexit(exit);\n return enter && update ? enter.merge(update).order() : update;\n}\n", "import {Selection} from \"./index.js\";\n\nexport default function(context) {\n var selection = context.selection ? context.selection() : context;\n\n for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Selection(merges, this._parents);\n}\n", "export default function() {\n\n for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n if (node = group[i]) {\n if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n\n return this;\n}\n", "import {Selection} from \"./index.js\";\n\nexport default function(compare) {\n if (!compare) compare = ascending;\n\n function compareNode(a, b) {\n return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n }\n\n for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n sortgroup[i] = node;\n }\n }\n sortgroup.sort(compareNode);\n }\n\n return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "export default function() {\n var callback = arguments[0];\n arguments[0] = this;\n callback.apply(null, arguments);\n return this;\n}\n", "export default function() {\n return Array.from(this);\n}\n", "export default function() {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n var node = group[i];\n if (node) return node;\n }\n }\n\n return null;\n}\n", "export default function() {\n let size = 0;\n for (const node of this) ++size; // eslint-disable-line no-unused-vars\n return size;\n}\n", "export default function() {\n return !this.node();\n}\n", "export default function(callback) {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) callback.call(node, node.__data__, i, group);\n }\n }\n\n return this;\n}\n", "export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: xhtml,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n", "import namespaces from \"./namespaces.js\";\n\nexport default function(name) {\n var prefix = name += \"\", i = prefix.indexOf(\":\");\n if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins\n}\n", "import namespace from \"../namespace.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, value) {\n return function() {\n this.setAttribute(name, value);\n };\n}\n\nfunction attrConstantNS(fullname, value) {\n return function() {\n this.setAttributeNS(fullname.space, fullname.local, value);\n };\n}\n\nfunction attrFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttribute(name);\n else this.setAttribute(name, v);\n };\n}\n\nfunction attrFunctionNS(fullname, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n else this.setAttributeNS(fullname.space, fullname.local, v);\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name);\n\n if (arguments.length < 2) {\n var node = this.node();\n return fullname.local\n ? node.getAttributeNS(fullname.space, fullname.local)\n : node.getAttribute(fullname);\n }\n\n return this.each((value == null\n ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)\n : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n", "export default function(node) {\n return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n || (node.document && node) // node is a Window\n || node.defaultView; // node is a Document\n}\n", "import defaultView from \"../window.js\";\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, value, priority) {\n return function() {\n this.style.setProperty(name, value, priority);\n };\n}\n\nfunction styleFunction(name, value, priority) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.style.removeProperty(name);\n else this.style.setProperty(name, v, priority);\n };\n}\n\nexport default function(name, value, priority) {\n return arguments.length > 1\n ? this.each((value == null\n ? styleRemove : typeof value === \"function\"\n ? styleFunction\n : styleConstant)(name, value, priority == null ? \"\" : priority))\n : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n return node.style.getPropertyValue(name)\n || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n", "function propertyRemove(name) {\n return function() {\n delete this[name];\n };\n}\n\nfunction propertyConstant(name, value) {\n return function() {\n this[name] = value;\n };\n}\n\nfunction propertyFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) delete this[name];\n else this[name] = v;\n };\n}\n\nexport default function(name, value) {\n return arguments.length > 1\n ? this.each((value == null\n ? propertyRemove : typeof value === \"function\"\n ? propertyFunction\n : propertyConstant)(name, value))\n : this.node()[name];\n}\n", "function classArray(string) {\n return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n this._node = node;\n this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n add: function(name) {\n var i = this._names.indexOf(name);\n if (i < 0) {\n this._names.push(name);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n remove: function(name) {\n var i = this._names.indexOf(name);\n if (i >= 0) {\n this._names.splice(i, 1);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n contains: function(name) {\n return this._names.indexOf(name) >= 0;\n }\n};\n\nfunction classedAdd(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n return function() {\n classedAdd(this, names);\n };\n}\n\nfunction classedFalse(names) {\n return function() {\n classedRemove(this, names);\n };\n}\n\nfunction classedFunction(names, value) {\n return function() {\n (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n };\n}\n\nexport default function(name, value) {\n var names = classArray(name + \"\");\n\n if (arguments.length < 2) {\n var list = classList(this.node()), i = -1, n = names.length;\n while (++i < n) if (!list.contains(names[i])) return false;\n return true;\n }\n\n return this.each((typeof value === \"function\"\n ? classedFunction : value\n ? classedTrue\n : classedFalse)(names, value));\n}\n", "function textRemove() {\n this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.textContent = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? textRemove : (typeof value === \"function\"\n ? textFunction\n : textConstant)(value))\n : this.node().textContent;\n}\n", "function htmlRemove() {\n this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n return function() {\n this.innerHTML = value;\n };\n}\n\nfunction htmlFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.innerHTML = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? htmlRemove : (typeof value === \"function\"\n ? htmlFunction\n : htmlConstant)(value))\n : this.node().innerHTML;\n}\n", "function raise() {\n if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n return this.each(raise);\n}\n", "function lower() {\n if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n return this.each(lower);\n}\n", "import namespace from \"./namespace.js\";\nimport {xhtml} from \"./namespaces.js\";\n\nfunction creatorInherit(name) {\n return function() {\n var document = this.ownerDocument,\n uri = this.namespaceURI;\n return uri === xhtml && document.documentElement.namespaceURI === xhtml\n ? document.createElement(name)\n : document.createElementNS(uri, name);\n };\n}\n\nfunction creatorFixed(fullname) {\n return function() {\n return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n };\n}\n\nexport default function(name) {\n var fullname = namespace(name);\n return (fullname.local\n ? creatorFixed\n : creatorInherit)(fullname);\n}\n", "import creator from \"../creator.js\";\n\nexport default function(name) {\n var create = typeof name === \"function\" ? name : creator(name);\n return this.select(function() {\n return this.appendChild(create.apply(this, arguments));\n });\n}\n", "import creator from \"../creator.js\";\nimport selector from \"../selector.js\";\n\nfunction constantNull() {\n return null;\n}\n\nexport default function(name, before) {\n var create = typeof name === \"function\" ? name : creator(name),\n select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n return this.select(function() {\n return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n });\n}\n", "function remove() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n return this.each(remove);\n}\n", "function selection_cloneShallow() {\n var clone = this.cloneNode(false), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n var clone = this.cloneNode(true), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n", "export default function(value) {\n return arguments.length\n ? this.property(\"__data__\", value)\n : this.node().__data__;\n}\n", "function contextListener(listener) {\n return function(event) {\n listener.call(this, event, this.__data__);\n };\n}\n\nfunction parseTypenames(typenames) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n return {type: t, name: name};\n });\n}\n\nfunction onRemove(typename) {\n return function() {\n var on = this.__on;\n if (!on) return;\n for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n } else {\n on[++i] = o;\n }\n }\n if (++i) on.length = i;\n else delete this.__on;\n };\n}\n\nfunction onAdd(typename, value, options) {\n return function() {\n var on = this.__on, o, listener = contextListener(value);\n if (on) for (var j = 0, m = on.length; j < m; ++j) {\n if ((o = on[j]).type === typename.type && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n this.addEventListener(o.type, o.listener = listener, o.options = options);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, options);\n o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n if (!on) this.__on = [o];\n else on.push(o);\n };\n}\n\nexport default function(typename, value, options) {\n var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n if (arguments.length < 2) {\n var on = this.node().__on;\n if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n for (i = 0, o = on[j]; i < n; ++i) {\n if ((t = typenames[i]).type === o.type && t.name === o.name) {\n return o.value;\n }\n }\n }\n return;\n }\n\n on = value ? onAdd : onRemove;\n for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n return this;\n}\n", "import defaultView from \"../window.js\";\n\nfunction dispatchEvent(node, type, params) {\n var window = defaultView(node),\n event = window.CustomEvent;\n\n if (typeof event === \"function\") {\n event = new event(type, params);\n } else {\n event = window.document.createEvent(\"Event\");\n if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n else event.initEvent(type, false, false);\n }\n\n node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n return function() {\n return dispatchEvent(this, type, params);\n };\n}\n\nfunction dispatchFunction(type, params) {\n return function() {\n return dispatchEvent(this, type, params.apply(this, arguments));\n };\n}\n\nexport default function(type, params) {\n return this.each((typeof params === \"function\"\n ? dispatchFunction\n : dispatchConstant)(type, params));\n}\n", "export default function*() {\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) yield node;\n }\n }\n}\n", "import selection_select from \"./select.js\";\nimport selection_selectAll from \"./selectAll.js\";\nimport selection_selectChild from \"./selectChild.js\";\nimport selection_selectChildren from \"./selectChildren.js\";\nimport selection_filter from \"./filter.js\";\nimport selection_data from \"./data.js\";\nimport selection_enter from \"./enter.js\";\nimport selection_exit from \"./exit.js\";\nimport selection_join from \"./join.js\";\nimport selection_merge from \"./merge.js\";\nimport selection_order from \"./order.js\";\nimport selection_sort from \"./sort.js\";\nimport selection_call from \"./call.js\";\nimport selection_nodes from \"./nodes.js\";\nimport selection_node from \"./node.js\";\nimport selection_size from \"./size.js\";\nimport selection_empty from \"./empty.js\";\nimport selection_each from \"./each.js\";\nimport selection_attr from \"./attr.js\";\nimport selection_style from \"./style.js\";\nimport selection_property from \"./property.js\";\nimport selection_classed from \"./classed.js\";\nimport selection_text from \"./text.js\";\nimport selection_html from \"./html.js\";\nimport selection_raise from \"./raise.js\";\nimport selection_lower from \"./lower.js\";\nimport selection_append from \"./append.js\";\nimport selection_insert from \"./insert.js\";\nimport selection_remove from \"./remove.js\";\nimport selection_clone from \"./clone.js\";\nimport selection_datum from \"./datum.js\";\nimport selection_on from \"./on.js\";\nimport selection_dispatch from \"./dispatch.js\";\nimport selection_iterator from \"./iterator.js\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n this._groups = groups;\n this._parents = parents;\n}\n\nfunction selection() {\n return new Selection([[document.documentElement]], root);\n}\n\nfunction selection_selection() {\n return this;\n}\n\nSelection.prototype = selection.prototype = {\n constructor: Selection,\n select: selection_select,\n selectAll: selection_selectAll,\n selectChild: selection_selectChild,\n selectChildren: selection_selectChildren,\n filter: selection_filter,\n data: selection_data,\n enter: selection_enter,\n exit: selection_exit,\n join: selection_join,\n merge: selection_merge,\n selection: selection_selection,\n order: selection_order,\n sort: selection_sort,\n call: selection_call,\n nodes: selection_nodes,\n node: selection_node,\n size: selection_size,\n empty: selection_empty,\n each: selection_each,\n attr: selection_attr,\n style: selection_style,\n property: selection_property,\n classed: selection_classed,\n text: selection_text,\n html: selection_html,\n raise: selection_raise,\n lower: selection_lower,\n append: selection_append,\n insert: selection_insert,\n remove: selection_remove,\n clone: selection_clone,\n datum: selection_datum,\n on: selection_on,\n dispatch: selection_dispatch,\n [Symbol.iterator]: selection_iterator\n};\n\nexport default selection;\n", "import {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n : new Selection([[selector]], root);\n}\n", "import array from \"./array.js\";\nimport {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([document.querySelectorAll(selector)], [document.documentElement])\n : new Selection([array(selector)], root);\n}\n", "var nextId = 0;\n\nexport default function local() {\n return new Local;\n}\n\nfunction Local() {\n this._ = \"@\" + (++nextId).toString(36);\n}\n\nLocal.prototype = local.prototype = {\n constructor: Local,\n get: function(node) {\n var id = this._;\n while (!(id in node)) if (!(node = node.parentNode)) return;\n return node[id];\n },\n set: function(node, value) {\n return node[this._] = value;\n },\n remove: function(node) {\n return this._ in node && delete node[this._];\n },\n toString: function() {\n return this._;\n }\n};\n", "export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n", "import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(`^rgb\\\\(${reI},${reI},${reI}\\\\)$`),\n reRgbPercent = new RegExp(`^rgb\\\\(${reP},${reP},${reP}\\\\)$`),\n reRgbaInteger = new RegExp(`^rgba\\\\(${reI},${reI},${reI},${reN}\\\\)$`),\n reRgbaPercent = new RegExp(`^rgba\\\\(${reP},${reP},${reP},${reN}\\\\)$`),\n reHslPercent = new RegExp(`^hsl\\\\(${reN},${reP},${reP}\\\\)$`),\n reHslaPercent = new RegExp(`^hsla\\\\(${reN},${reP},${reP},${reN}\\\\)$`);\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHex8: color_formatHex8,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHex8() {\n return this.rgb().formatHex8();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb() {\n return this;\n },\n clamp() {\n return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));\n },\n displayable() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatHex8: rgb_formatHex8,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;\n}\n\nfunction rgb_formatHex8() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\n\nfunction rgb_formatRgb() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"rgb(\" : \"rgba(\"}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? \")\" : `, ${a})`}`;\n}\n\nfunction clampa(opacity) {\n return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));\n}\n\nfunction clampi(value) {\n return Math.max(0, Math.min(255, Math.round(value) || 0));\n}\n\nfunction hex(value) {\n value = clampi(value);\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n clamp() {\n return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));\n },\n displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"hsl(\" : \"hsla(\"}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? \")\" : `, ${a})`}`;\n }\n}));\n\nfunction clamph(value) {\n value = (value || 0) % 360;\n return value < 0 ? value + 360 : value;\n}\n\nfunction clampt(value) {\n return Math.max(0, Math.min(1, value || 0));\n}\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n", "export const radians = Math.PI / 180;\nexport const degrees = 180 / Math.PI;\n", "import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nconst K = 18,\n Xn = 0.96422,\n Yn = 1,\n Zn = 0.82521,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n if (o instanceof Hcl) return hcl2lab(o);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = rgb2lrgb(o.r),\n g = rgb2lrgb(o.g),\n b = rgb2lrgb(o.b),\n y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n if (r === g && g === b) x = z = y; else {\n x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n }\n return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nexport function gray(l, opacity) {\n return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nexport default function lab(l, a, b, opacity) {\n return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nexport function Lab(l, a, b, opacity) {\n this.l = +l;\n this.a = +a;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Lab, lab, extend(Color, {\n brighter(k) {\n return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n darker(k) {\n return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n rgb() {\n var y = (this.l + 16) / 116,\n x = isNaN(this.a) ? y : y + this.a / 500,\n z = isNaN(this.b) ? y : y - this.b / 200;\n x = Xn * lab2xyz(x);\n y = Yn * lab2xyz(y);\n z = Zn * lab2xyz(z);\n return new Rgb(\n lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n this.opacity\n );\n }\n}));\n\nfunction xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n if (!(o instanceof Lab)) o = labConvert(o);\n if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n var h = Math.atan2(o.b, o.a) * degrees;\n return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nexport function lch(l, c, h, opacity) {\n return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function hcl(h, c, l, opacity) {\n return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function Hcl(h, c, l, opacity) {\n this.h = +h;\n this.c = +c;\n this.l = +l;\n this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n var h = o.h * radians;\n return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\ndefine(Hcl, hcl, extend(Color, {\n brighter(k) {\n return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n },\n darker(k) {\n return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n },\n rgb() {\n return hcl2lab(this).rgb();\n }\n}));\n", "import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb, darker, brighter} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\n\nvar A = -0.14861,\n B = +1.78277,\n C = -0.29227,\n D = -0.90649,\n E = +1.97294,\n ED = E * D,\n EB = E * B,\n BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n bl = b - l,\n k = (E * (g - l) - C * bl) / D,\n s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n h = s ? Math.atan2(k, bl) * degrees - 120 : NaN;\n return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nexport default function cubehelix(h, s, l, opacity) {\n return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nexport function Cubehelix(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Cubehelix, cubehelix, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n },\n rgb() {\n var h = isNaN(this.h) ? 0 : (this.h + 120) * radians,\n l = +this.l,\n a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n cosh = Math.cos(h),\n sinh = Math.sin(h);\n return new Rgb(\n 255 * (l + a * (A * cosh + B * sinh)),\n 255 * (l + a * (C * cosh + D * sinh)),\n 255 * (l + a * (E * cosh)),\n this.opacity\n );\n }\n}));\n", "export default x => () => x;\n", "import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\n\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n", "import {hcl as colorHcl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hcl(hue) {\n return function(start, end) {\n var h = hue((start = colorHcl(start)).h, (end = colorHcl(end)).h),\n c = color(start.c, end.c),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.c = c(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}\n\nexport default hcl(hue);\nexport var hclLong = hcl(color);\n", "export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1, t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n + (4 - 6 * t2 + 3 * t3) * v1\n + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n + t3 * v3) / 6;\n}\n\nexport default function(values) {\n var n = values.length - 1;\n return function(t) {\n var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n", "import {basis} from \"./basis.js\";\n\nexport default function(values) {\n var n = values.length;\n return function(t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n", "import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n", "export default function(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n}\n\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n", "import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n}\n", "export default function(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}\n", "export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\n", "import value from \"./value.js\";\n\nexport default function(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}\n", "import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\nexport default function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: number(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}\n", "import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant(b)\n : (t === \"number\" ? number\n : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n : b instanceof color ? rgb\n : b instanceof Date ? date\n : isNumberArray(b) ? numberArray\n : Array.isArray(b) ? genericArray\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n : number)(a, b);\n}\n", "export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return Math.round(a * (1 - t) + b * t);\n };\n}\n", "var degrees = 180 / Math.PI;\n\nexport var identity = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\n\nexport default function(a, b, c, d, e, f) {\n var scaleX, scaleY, skewX;\n if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n return {\n translateX: e,\n translateY: f,\n rotate: Math.atan2(b, a) * degrees,\n skewX: Math.atan(skewX) * degrees,\n scaleX: scaleX,\n scaleY: scaleY\n };\n}\n", "import decompose, {identity} from \"./decompose.js\";\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nexport function parseCss(value) {\n const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nexport function parseSvg(value) {\n if (value == null) return identity;\n if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n svgNode.setAttribute(\"transform\", value);\n if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n value = value.matrix;\n return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n", "import number from \"../number.js\";\nimport {parseCss, parseSvg} from \"./parse.js\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n function pop(s) {\n return s.length ? s.pop() + \" \" : \"\";\n }\n\n function translate(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb || yb) {\n s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n }\n }\n\n function rotate(a, b, s, q) {\n if (a !== b) {\n if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"rotate(\" + b + degParen);\n }\n }\n\n function skewX(a, b, s, q) {\n if (a !== b) {\n q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"skewX(\" + b + degParen);\n }\n }\n\n function scale(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb !== 1 || yb !== 1) {\n s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n }\n }\n\n return function(a, b) {\n var s = [], // string constants and placeholders\n q = []; // number interpolators\n a = parse(a), b = parse(b);\n translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n rotate(a.rotate, b.rotate, s, q);\n skewX(a.skewX, b.skewX, s, q);\n scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n a = b = null; // gc\n return function(t) {\n var i = -1, n = q.length, o;\n while (++i < n) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n", "var epsilon2 = 1e-12;\n\nfunction cosh(x) {\n return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\nexport default (function zoomRho(rho, rho2, rho4) {\n\n // p0 = [ux0, uy0, w0]\n // p1 = [ux1, uy1, w1]\n function zoom(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S;\n\n // Special case for u0 ≅ u1.\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n i = function(t) {\n return [\n ux0 + t * dx,\n uy0 + t * dy,\n w0 * Math.exp(rho * t * S)\n ];\n }\n }\n\n // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n i = function(t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [\n ux0 + u * dx,\n uy0 + u * dy,\n w0 * coshr0 / cosh(rho * s + r0)\n ];\n }\n }\n\n i.duration = S * 1000 * rho / Math.SQRT2;\n\n return i;\n }\n\n zoom.rho = function(_) {\n var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;\n return zoomRho(_1, _2, _4);\n };\n\n return zoom;\n})(Math.SQRT2, 2, 4);\n", "import {hsl as colorHsl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hsl(hue) {\n return function(start, end) {\n var h = hue((start = colorHsl(start)).h, (end = colorHsl(end)).h),\n s = color(start.s, end.s),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.s = s(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}\n\nexport default hsl(hue);\nexport var hslLong = hsl(color);\n", "import {cubehelix as colorCubehelix} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction cubehelix(hue) {\n return (function cubehelixGamma(y) {\n y = +y;\n\n function cubehelix(start, end) {\n var h = hue((start = colorCubehelix(start)).h, (end = colorCubehelix(end)).h),\n s = color(start.s, end.s),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.s = s(t);\n start.l = l(Math.pow(t, y));\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n cubehelix.gamma = cubehelixGamma;\n\n return cubehelix;\n })(1);\n}\n\nexport default cubehelix(hue);\nexport var cubehelixLong = cubehelix(color);\n", "export function initRange(domain, range) {\n switch (arguments.length) {\n case 0: break;\n case 1: this.range(domain); break;\n default: this.range(range).domain(domain); break;\n }\n return this;\n}\n\nexport function initInterpolator(domain, interpolator) {\n switch (arguments.length) {\n case 0: break;\n case 1: {\n if (typeof domain === \"function\") this.interpolator(domain);\n else this.range(domain);\n break;\n }\n default: {\n this.domain(domain);\n if (typeof interpolator === \"function\") this.interpolator(interpolator);\n else this.range(interpolator);\n break;\n }\n }\n return this;\n}\n", "import {InternMap} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport const implicit = Symbol(\"implicit\");\n\nexport default function ordinal() {\n var index = new InternMap(),\n domain = [],\n range = [],\n unknown = implicit;\n\n function scale(d) {\n let i = index.get(d);\n if (i === undefined) {\n if (unknown !== implicit) return unknown;\n index.set(d, i = domain.push(d) - 1);\n }\n return range[i % range.length];\n }\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [], index = new InternMap();\n for (const value of _) {\n if (index.has(value)) continue;\n index.set(value, domain.push(value) - 1);\n }\n return scale;\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), scale) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return ordinal(domain, range).unknown(unknown);\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n", "export default function constants(x) {\n return function() {\n return x;\n };\n}\n", "export default function number(x) {\n return +x;\n}\n", "import {bisect} from \"d3-array\";\nimport {interpolate as interpolateValue, interpolateNumber, interpolateRound} from \"d3-interpolate\";\nimport constant from \"./constant.js\";\nimport number from \"./number.js\";\n\nvar unit = [0, 1];\n\nexport function identity(x) {\n return x;\n}\n\nfunction normalize(a, b) {\n return (b -= (a = +a))\n ? function(x) { return (x - a) / b; }\n : constant(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(a, b) {\n var t;\n if (a > b) t = a, a = b, b = t;\n return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n var j = Math.min(domain.length, range.length) - 1,\n d = new Array(j),\n r = new Array(j),\n i = -1;\n\n // Reverse descending domains.\n if (domain[j] < domain[0]) {\n domain = domain.slice().reverse();\n range = range.slice().reverse();\n }\n\n while (++i < j) {\n d[i] = normalize(domain[i], domain[i + 1]);\n r[i] = interpolate(range[i], range[i + 1]);\n }\n\n return function(x) {\n var i = bisect(domain, x, 1, j) - 1;\n return r[i](d[i](x));\n };\n}\n\nexport function copy(source, target) {\n return target\n .domain(source.domain())\n .range(source.range())\n .interpolate(source.interpolate())\n .clamp(source.clamp())\n .unknown(source.unknown());\n}\n\nexport function transformer() {\n var domain = unit,\n range = unit,\n interpolate = interpolateValue,\n transform,\n untransform,\n unknown,\n clamp = identity,\n piecewise,\n output,\n input;\n\n function rescale() {\n var n = Math.min(domain.length, range.length);\n if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n piecewise = n > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n }\n\n scale.invert = function(y) {\n return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = Array.from(_), interpolate = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t, u) {\n transform = t, untransform = u;\n return rescale();\n };\n}\n\nexport default function continuous() {\n return transformer()(identity, identity);\n}\n", "export default function(x) {\n return Math.abs(x = Math.round(x)) >= 1e21\n ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n", "export default function(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n}\n", "export default function(numerals) {\n return function(value) {\n return value.replace(/[0-9]/g, function(i) {\n return numerals[+i];\n });\n };\n}\n", "// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + (this.trim ? \"~\" : \"\")\n + this.type;\n};\n", "// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n", "import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n \"%\": (x, p) => (x * 100).toFixed(p),\n \"b\": (x) => Math.round(x).toString(2),\n \"c\": (x) => x + \"\",\n \"d\": formatDecimal,\n \"e\": (x, p) => x.toExponential(p),\n \"f\": (x, p) => x.toFixed(p),\n \"g\": (x, p) => x.toPrecision(p),\n \"o\": (x) => Math.round(x).toString(8),\n \"p\": (x, p) => formatRounded(x * 100, p),\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n \"x\": (x) => Math.round(x).toString(16)\n};\n", "export default function(x) {\n return x;\n}\n", "import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"−\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type;\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision === undefined ? 6\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i, n, c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = value < 0 || 1 / value < 0;\n\n // Perform the initial formatting.\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n // Trim insignificant zeros.\n if (trim) value = formatTrim(value);\n\n // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n if (maybeSuffix) {\n i = -1, n = value.length;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n default: value = padding + valuePrefix + value + valueSuffix; break;\n }\n\n return numerals(value);\n }\n\n format.toString = function() {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}\n", "import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step, max) {\n step = Math.abs(step), max = Math.abs(max) - step;\n return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\n", "import {tickStep} from \"d3-array\";\nimport {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from \"d3-format\";\n\nexport default function tickFormat(start, stop, count, specifier) {\n var step = tickStep(start, stop, count),\n precision;\n specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n switch (specifier.type) {\n case \"s\": {\n var value = Math.max(Math.abs(start), Math.abs(stop));\n if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n return formatPrefix(specifier, value);\n }\n case \"\":\n case \"e\":\n case \"g\":\n case \"p\":\n case \"r\": {\n if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n break;\n }\n case \"f\":\n case \"%\": {\n if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n break;\n }\n }\n return format(specifier);\n}\n", "import {ticks, tickIncrement} from \"d3-array\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport tickFormat from \"./tickFormat.js\";\n\nexport function linearish(scale) {\n var domain = scale.domain;\n\n scale.ticks = function(count) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n };\n\n scale.tickFormat = function(count, specifier) {\n var d = domain();\n return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n };\n\n scale.nice = function(count) {\n if (count == null) count = 10;\n\n var d = domain();\n var i0 = 0;\n var i1 = d.length - 1;\n var start = d[i0];\n var stop = d[i1];\n var prestep;\n var step;\n var maxIter = 10;\n\n if (stop < start) {\n step = start, start = stop, stop = step;\n step = i0, i0 = i1, i1 = step;\n }\n \n while (maxIter-- > 0) {\n step = tickIncrement(start, stop, count);\n if (step === prestep) {\n d[i0] = start\n d[i1] = stop\n return domain(d);\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n } else {\n break;\n }\n prestep = step;\n }\n\n return scale;\n };\n\n return scale;\n}\n\nexport default function linear() {\n var scale = continuous();\n\n scale.copy = function() {\n return copy(scale, linear());\n };\n\n initRange.apply(scale, arguments);\n\n return linearish(scale);\n}\n", "const t0 = new Date, t1 = new Date;\n\nexport function timeInterval(floori, offseti, count, field) {\n\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n }\n\n interval.floor = (date) => {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = (date) => {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = (date) => {\n const d0 = interval(date), d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = (date, step) => {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = (start, stop, step) => {\n const range = [];\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n let previous;\n do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n while (previous < start && start < stop);\n return range;\n };\n\n interval.filter = (test) => {\n return timeInterval((date) => {\n if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n }, (date, step) => {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n }\n }\n });\n };\n\n if (count) {\n interval.count = (start, end) => {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = (step) => {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null\n : !(step > 1) ? interval\n : interval.filter(field\n ? (d) => field(d) % step === 0\n : (d) => interval.count(0, d) % step === 0);\n };\n }\n\n return interval;\n}\n", "export const durationSecond = 1000;\nexport const durationMinute = durationSecond * 60;\nexport const durationHour = durationMinute * 60;\nexport const durationDay = durationHour * 24;\nexport const durationWeek = durationDay * 7;\nexport const durationMonth = durationDay * 30;\nexport const durationYear = durationDay * 365;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeMinute = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, (date, step) => {\n date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n return (end - start) / durationMinute;\n}, (date) => {\n return date.getMinutes();\n});\n\nexport const timeMinutes = timeMinute.range;\n\nexport const utcMinute = timeInterval((date) => {\n date.setUTCSeconds(0, 0);\n}, (date, step) => {\n date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n return (end - start) / durationMinute;\n}, (date) => {\n return date.getUTCMinutes();\n});\n\nexport const utcMinutes = utcMinute.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationHour, durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeHour = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, (date, step) => {\n date.setTime(+date + step * durationHour);\n}, (start, end) => {\n return (end - start) / durationHour;\n}, (date) => {\n return date.getHours();\n});\n\nexport const timeHours = timeHour.range;\n\nexport const utcHour = timeInterval((date) => {\n date.setUTCMinutes(0, 0, 0);\n}, (date, step) => {\n date.setTime(+date + step * durationHour);\n}, (start, end) => {\n return (end - start) / durationHour;\n}, (date) => {\n return date.getUTCHours();\n});\n\nexport const utcHours = utcHour.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nexport const timeDay = timeInterval(\n date => date.setHours(0, 0, 0, 0),\n (date, step) => date.setDate(date.getDate() + step),\n (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,\n date => date.getDate() - 1\n);\n\nexport const timeDays = timeDay.range;\n\nexport const utcDay = timeInterval((date) => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, (date) => {\n return date.getUTCDate() - 1;\n});\n\nexport const utcDays = utcDay.range;\n\nexport const unixDay = timeInterval((date) => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, (date) => {\n return Math.floor(date / durationDay);\n});\n\nexport const unixDays = unixDay.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\n\nfunction timeWeekday(i) {\n return timeInterval((date) => {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setDate(date.getDate() + step * 7);\n }, (start, end) => {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n}\n\nexport const timeSunday = timeWeekday(0);\nexport const timeMonday = timeWeekday(1);\nexport const timeTuesday = timeWeekday(2);\nexport const timeWednesday = timeWeekday(3);\nexport const timeThursday = timeWeekday(4);\nexport const timeFriday = timeWeekday(5);\nexport const timeSaturday = timeWeekday(6);\n\nexport const timeSundays = timeSunday.range;\nexport const timeMondays = timeMonday.range;\nexport const timeTuesdays = timeTuesday.range;\nexport const timeWednesdays = timeWednesday.range;\nexport const timeThursdays = timeThursday.range;\nexport const timeFridays = timeFriday.range;\nexport const timeSaturdays = timeSaturday.range;\n\nfunction utcWeekday(i) {\n return timeInterval((date) => {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, (start, end) => {\n return (end - start) / durationWeek;\n });\n}\n\nexport const utcSunday = utcWeekday(0);\nexport const utcMonday = utcWeekday(1);\nexport const utcTuesday = utcWeekday(2);\nexport const utcWednesday = utcWeekday(3);\nexport const utcThursday = utcWeekday(4);\nexport const utcFriday = utcWeekday(5);\nexport const utcSaturday = utcWeekday(6);\n\nexport const utcSundays = utcSunday.range;\nexport const utcMondays = utcMonday.range;\nexport const utcTuesdays = utcTuesday.range;\nexport const utcWednesdays = utcWednesday.range;\nexport const utcThursdays = utcThursday.range;\nexport const utcFridays = utcFriday.range;\nexport const utcSaturdays = utcSaturday.range;\n", "import {timeInterval} from \"./interval.js\";\n\nexport const timeMonth = timeInterval((date) => {\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setMonth(date.getMonth() + step);\n}, (start, end) => {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, (date) => {\n return date.getMonth();\n});\n\nexport const timeMonths = timeMonth.range;\n\nexport const utcMonth = timeInterval((date) => {\n date.setUTCDate(1);\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCMonth(date.getUTCMonth() + step);\n}, (start, end) => {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, (date) => {\n return date.getUTCMonth();\n});\n\nexport const utcMonths = utcMonth.range;\n", "import {timeInterval} from \"./interval.js\";\n\nexport const millisecond = timeInterval(() => {\n // noop\n}, (date, step) => {\n date.setTime(+date + step);\n}, (start, end) => {\n return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = (k) => {\n k = Math.floor(k);\n if (!isFinite(k) || !(k > 0)) return null;\n if (!(k > 1)) return millisecond;\n return timeInterval((date) => {\n date.setTime(Math.floor(date / k) * k);\n }, (date, step) => {\n date.setTime(+date + step * k);\n }, (start, end) => {\n return (end - start) / k;\n });\n};\n\nexport const milliseconds = millisecond.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationSecond} from \"./duration.js\";\n\nexport const second = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds());\n}, (date, step) => {\n date.setTime(+date + step * durationSecond);\n}, (start, end) => {\n return (end - start) / durationSecond;\n}, (date) => {\n return date.getUTCSeconds();\n});\n\nexport const seconds = second.range;\n", "import {timeInterval} from \"./interval.js\";\n\nexport const timeYear = timeInterval((date) => {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setFullYear(date.getFullYear() + step);\n}, (start, end) => {\n return end.getFullYear() - start.getFullYear();\n}, (date) => {\n return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\ntimeYear.every = (k) => {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setFullYear(date.getFullYear() + step * k);\n });\n};\n\nexport const timeYears = timeYear.range;\n\nexport const utcYear = timeInterval((date) => {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n}, (start, end) => {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}, (date) => {\n return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = (k) => {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n};\n\nexport const utcYears = utcYear.range;\n", "import {bisector, tickStep} from \"d3-array\";\nimport {durationDay, durationHour, durationMinute, durationMonth, durationSecond, durationWeek, durationYear} from \"./duration.js\";\nimport {millisecond} from \"./millisecond.js\";\nimport {second} from \"./second.js\";\nimport {timeMinute, utcMinute} from \"./minute.js\";\nimport {timeHour, utcHour} from \"./hour.js\";\nimport {timeDay, unixDay} from \"./day.js\";\nimport {timeSunday, utcSunday} from \"./week.js\";\nimport {timeMonth, utcMonth} from \"./month.js\";\nimport {timeYear, utcYear} from \"./year.js\";\n\nfunction ticker(year, month, week, day, hour, minute) {\n\n const tickIntervals = [\n [second, 1, durationSecond],\n [second, 5, 5 * durationSecond],\n [second, 15, 15 * durationSecond],\n [second, 30, 30 * durationSecond],\n [minute, 1, durationMinute],\n [minute, 5, 5 * durationMinute],\n [minute, 15, 15 * durationMinute],\n [minute, 30, 30 * durationMinute],\n [ hour, 1, durationHour ],\n [ hour, 3, 3 * durationHour ],\n [ hour, 6, 6 * durationHour ],\n [ hour, 12, 12 * durationHour ],\n [ day, 1, durationDay ],\n [ day, 2, 2 * durationDay ],\n [ week, 1, durationWeek ],\n [ month, 1, durationMonth ],\n [ month, 3, 3 * durationMonth ],\n [ year, 1, durationYear ]\n ];\n\n function ticks(start, stop, count) {\n const reverse = stop < start;\n if (reverse) [start, stop] = [stop, start];\n const interval = count && typeof count.range === \"function\" ? count : tickInterval(start, stop, count);\n const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop\n return reverse ? ticks.reverse() : ticks;\n }\n\n function tickInterval(start, stop, count) {\n const target = Math.abs(stop - start) / count;\n const i = bisector(([,, step]) => step).right(tickIntervals, target);\n if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));\n if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));\n const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n return t.every(step);\n }\n\n return [ticks, tickInterval];\n}\n\nconst [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcSunday, unixDay, utcHour, utcMinute);\nconst [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute);\n\nexport {utcTicks, utcTickInterval, timeTicks, timeTickInterval};\n", "import {\n timeDay,\n timeSunday,\n timeMonday,\n timeThursday,\n timeYear,\n utcDay,\n utcSunday,\n utcMonday,\n utcThursday,\n utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"g\": formatYearISO,\n \"G\": formatFullYearISO,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"g\": formatUTCYearISO,\n \"G\": formatUTCFullYearISO,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"g\": parseYear,\n \"G\": parseFullYear,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function(date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n\n if (!(date instanceof Date)) date = new Date(+date);\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, Z) {\n return function(string) {\n var d = newDate(1900, undefined, 1),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week, day;\n if (i != string.length) return null;\n\n // If a UNIX timestamp is specified, return it.\n if (\"Q\" in d) return new Date(d.Q);\n if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n // If this is utcParse, never use the local timezone.\n if (Z && !(\"Z\" in d)) d.Z = 0;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // If the month was not specified, inherit from the quarter.\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n // Convert day-of-week and week-of-year to day-of-year.\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n if (\"Z\" in d) {\n week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n week = timeDay.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n }\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n return localDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\n }\n\n return {\n format: function(specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.toString = function() { return specifier; };\n return f;\n },\n parse: function(specifier) {\n var p = newParse(specifier += \"\", false);\n p.toString = function() { return specifier; };\n return p;\n },\n utcFormat: function(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.toString = function() { return specifier; };\n return f;\n },\n utcParse: function(specifier) {\n var p = newParse(specifier += \"\", true);\n p.toString = function() { return specifier; };\n return p;\n }\n };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n numberRe = /^\\s*\\d+/, // note: ignores next directive\n percentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n return new Map(names.map((name, i) => [name.toLowerCase(), i]));\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n var day = d.getDay();\n return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n d = dISO(d);\n return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n d = dISO(d);\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n var day = d.getDay();\n d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n + pad(z / 60 | 0, \"0\", 2)\n + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n var day = d.getUTCDay();\n return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n d = UTCdISO(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n d = UTCdISO(d);\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n var day = d.getUTCDay();\n d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n}\n", "import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n timeFormat = locale.format;\n timeParse = locale.parse;\n utcFormat = locale.utcFormat;\n utcParse = locale.utcParse;\n return locale;\n}\n", "import {utcFormat} from \"./defaultLocale.js\";\n\nexport var isoSpecifier = \"%Y-%m-%dT%H:%M:%S.%LZ\";\n\nfunction formatIsoNative(date) {\n return date.toISOString();\n}\n\nvar formatIso = Date.prototype.toISOString\n ? formatIsoNative\n : utcFormat(isoSpecifier);\n\nexport default formatIso;\n", "import {isoSpecifier} from \"./isoFormat.js\";\nimport {utcParse} from \"./defaultLocale.js\";\n\nfunction parseIsoNative(string) {\n var date = new Date(string);\n return isNaN(date) ? null : date;\n}\n\nvar parseIso = +new Date(\"2000-01-01T00:00:00.000Z\")\n ? parseIsoNative\n : utcParse(isoSpecifier);\n\nexport default parseIso;\n", "export default function nice(domain, interval) {\n domain = domain.slice();\n\n var i0 = 0,\n i1 = domain.length - 1,\n x0 = domain[i0],\n x1 = domain[i1],\n t;\n\n if (x1 < x0) {\n t = i0, i0 = i1, i1 = t;\n t = x0, x0 = x1, x1 = t;\n }\n\n domain[i0] = interval.floor(x0);\n domain[i1] = interval.ceil(x1);\n return domain;\n}\n", "import {timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeTicks, timeTickInterval} from \"d3-time\";\nimport {timeFormat} from \"d3-time-format\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport nice from \"./nice.js\";\n\nfunction date(t) {\n return new Date(t);\n}\n\nfunction number(t) {\n return t instanceof Date ? +t : +new Date(+t);\n}\n\nexport function calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format) {\n var scale = continuous(),\n invert = scale.invert,\n domain = scale.domain;\n\n var formatMillisecond = format(\".%L\"),\n formatSecond = format(\":%S\"),\n formatMinute = format(\"%I:%M\"),\n formatHour = format(\"%I %p\"),\n formatDay = format(\"%a %d\"),\n formatWeek = format(\"%b %d\"),\n formatMonth = format(\"%B\"),\n formatYear = format(\"%Y\");\n\n function tickFormat(date) {\n return (second(date) < date ? formatMillisecond\n : minute(date) < date ? formatSecond\n : hour(date) < date ? formatMinute\n : day(date) < date ? formatHour\n : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n : year(date) < date ? formatMonth\n : formatYear)(date);\n }\n\n scale.invert = function(y) {\n return new Date(invert(y));\n };\n\n scale.domain = function(_) {\n return arguments.length ? domain(Array.from(_, number)) : domain().map(date);\n };\n\n scale.ticks = function(interval) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval);\n };\n\n scale.tickFormat = function(count, specifier) {\n return specifier == null ? tickFormat : format(specifier);\n };\n\n scale.nice = function(interval) {\n var d = domain();\n if (!interval || typeof interval.range !== \"function\") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);\n return interval ? domain(nice(d, interval)) : scale;\n };\n\n scale.copy = function() {\n return copy(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));\n };\n\n return scale;\n}\n\nexport default function time() {\n return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}\n", "export default function(specifier) {\n var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;\n while (i < n) colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n return colors;\n}\n", "import colors from \"../colors.js\";\n\nexport default colors(\"4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f\");\n", "import {interpolateRgbBasis} from \"d3-interpolate\";\n\nexport default scheme => interpolateRgbBasis(scheme[scheme.length - 1]);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"d8b365f5f5f55ab4ac\",\n \"a6611adfc27d80cdc1018571\",\n \"a6611adfc27df5f5f580cdc1018571\",\n \"8c510ad8b365f6e8c3c7eae55ab4ac01665e\",\n \"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e\",\n \"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e\",\n \"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e\",\n \"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30\",\n \"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"af8dc3f7f7f77fbf7b\",\n \"7b3294c2a5cfa6dba0008837\",\n \"7b3294c2a5cff7f7f7a6dba0008837\",\n \"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837\",\n \"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837\",\n \"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837\",\n \"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837\",\n \"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b\",\n \"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e9a3c9f7f7f7a1d76a\",\n \"d01c8bf1b6dab8e1864dac26\",\n \"d01c8bf1b6daf7f7f7b8e1864dac26\",\n \"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221\",\n \"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221\",\n \"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221\",\n \"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221\",\n \"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419\",\n \"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"998ec3f7f7f7f1a340\",\n \"5e3c99b2abd2fdb863e66101\",\n \"5e3c99b2abd2f7f7f7fdb863e66101\",\n \"542788998ec3d8daebfee0b6f1a340b35806\",\n \"542788998ec3d8daebf7f7f7fee0b6f1a340b35806\",\n \"5427888073acb2abd2d8daebfee0b6fdb863e08214b35806\",\n \"5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806\",\n \"2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08\",\n \"2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ef8a62f7f7f767a9cf\",\n \"ca0020f4a58292c5de0571b0\",\n \"ca0020f4a582f7f7f792c5de0571b0\",\n \"b2182bef8a62fddbc7d1e5f067a9cf2166ac\",\n \"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac\",\n \"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac\",\n \"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac\",\n \"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061\",\n \"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ef8a62ffffff999999\",\n \"ca0020f4a582bababa404040\",\n \"ca0020f4a582ffffffbababa404040\",\n \"b2182bef8a62fddbc7e0e0e09999994d4d4d\",\n \"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d\",\n \"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d\",\n \"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d\",\n \"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a\",\n \"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fc8d59ffffbf91bfdb\",\n \"d7191cfdae61abd9e92c7bb6\",\n \"d7191cfdae61ffffbfabd9e92c7bb6\",\n \"d73027fc8d59fee090e0f3f891bfdb4575b4\",\n \"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4\",\n \"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4\",\n \"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4\",\n \"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695\",\n \"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fc8d59ffffbf91cf60\",\n \"d7191cfdae61a6d96a1a9641\",\n \"d7191cfdae61ffffbfa6d96a1a9641\",\n \"d73027fc8d59fee08bd9ef8b91cf601a9850\",\n \"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850\",\n \"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850\",\n \"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850\",\n \"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837\",\n \"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fc8d59ffffbf99d594\",\n \"d7191cfdae61abdda42b83ba\",\n \"d7191cfdae61ffffbfabdda42b83ba\",\n \"d53e4ffc8d59fee08be6f59899d5943288bd\",\n \"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd\",\n \"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd\",\n \"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd\",\n \"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2\",\n \"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e5f5f999d8c92ca25f\",\n \"edf8fbb2e2e266c2a4238b45\",\n \"edf8fbb2e2e266c2a42ca25f006d2c\",\n \"edf8fbccece699d8c966c2a42ca25f006d2c\",\n \"edf8fbccece699d8c966c2a441ae76238b45005824\",\n \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824\",\n \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e0ecf49ebcda8856a7\",\n \"edf8fbb3cde38c96c688419d\",\n \"edf8fbb3cde38c96c68856a7810f7c\",\n \"edf8fbbfd3e69ebcda8c96c68856a7810f7c\",\n \"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b\",\n \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b\",\n \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e0f3dba8ddb543a2ca\",\n \"f0f9e8bae4bc7bccc42b8cbe\",\n \"f0f9e8bae4bc7bccc443a2ca0868ac\",\n \"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac\",\n \"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fee8c8fdbb84e34a33\",\n \"fef0d9fdcc8afc8d59d7301f\",\n \"fef0d9fdcc8afc8d59e34a33b30000\",\n \"fef0d9fdd49efdbb84fc8d59e34a33b30000\",\n \"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000\",\n \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000\",\n \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ece2f0a6bddb1c9099\",\n \"f6eff7bdc9e167a9cf02818a\",\n \"f6eff7bdc9e167a9cf1c9099016c59\",\n \"f6eff7d0d1e6a6bddb67a9cf1c9099016c59\",\n \"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450\",\n \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450\",\n \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ece7f2a6bddb2b8cbe\",\n \"f1eef6bdc9e174a9cf0570b0\",\n \"f1eef6bdc9e174a9cf2b8cbe045a8d\",\n \"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d\",\n \"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e7e1efc994c7dd1c77\",\n \"f1eef6d7b5d8df65b0ce1256\",\n \"f1eef6d7b5d8df65b0dd1c77980043\",\n \"f1eef6d4b9dac994c7df65b0dd1c77980043\",\n \"f1eef6d4b9dac994c7df65b0e7298ace125691003f\",\n \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f\",\n \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fde0ddfa9fb5c51b8a\",\n \"feebe2fbb4b9f768a1ae017e\",\n \"feebe2fbb4b9f768a1c51b8a7a0177\",\n \"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177\",\n \"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"edf8b17fcdbb2c7fb8\",\n \"ffffcca1dab441b6c4225ea8\",\n \"ffffcca1dab441b6c42c7fb8253494\",\n \"ffffccc7e9b47fcdbb41b6c42c7fb8253494\",\n \"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"f7fcb9addd8e31a354\",\n \"ffffccc2e69978c679238443\",\n \"ffffccc2e69978c67931a354006837\",\n \"ffffccd9f0a3addd8e78c67931a354006837\",\n \"ffffccd9f0a3addd8e78c67941ab5d238443005a32\",\n \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32\",\n \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fff7bcfec44fd95f0e\",\n \"ffffd4fed98efe9929cc4c02\",\n \"ffffd4fed98efe9929d95f0e993404\",\n \"ffffd4fee391fec44ffe9929d95f0e993404\",\n \"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04\",\n \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04\",\n \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ffeda0feb24cf03b20\",\n \"ffffb2fecc5cfd8d3ce31a1c\",\n \"ffffb2fecc5cfd8d3cf03b20bd0026\",\n \"ffffb2fed976feb24cfd8d3cf03b20bd0026\",\n \"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"deebf79ecae13182bd\",\n \"eff3ffbdd7e76baed62171b5\",\n \"eff3ffbdd7e76baed63182bd08519c\",\n \"eff3ffc6dbef9ecae16baed63182bd08519c\",\n \"eff3ffc6dbef9ecae16baed64292c62171b5084594\",\n \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\",\n \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e5f5e0a1d99b31a354\",\n \"edf8e9bae4b374c476238b45\",\n \"edf8e9bae4b374c47631a354006d2c\",\n \"edf8e9c7e9c0a1d99b74c47631a354006d2c\",\n \"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\",\n \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\",\n \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"f0f0f0bdbdbd636363\",\n \"f7f7f7cccccc969696525252\",\n \"f7f7f7cccccc969696636363252525\",\n \"f7f7f7d9d9d9bdbdbd969696636363252525\",\n \"f7f7f7d9d9d9bdbdbd969696737373525252252525\",\n \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525\",\n \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"efedf5bcbddc756bb1\",\n \"f2f0f7cbc9e29e9ac86a51a3\",\n \"f2f0f7cbc9e29e9ac8756bb154278f\",\n \"f2f0f7dadaebbcbddc9e9ac8756bb154278f\",\n \"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fee0d2fc9272de2d26\",\n \"fee5d9fcae91fb6a4acb181d\",\n \"fee5d9fcae91fb6a4ade2d26a50f15\",\n \"fee5d9fcbba1fc9272fb6a4ade2d26a50f15\",\n \"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fee6cefdae6be6550d\",\n \"feeddefdbe85fd8d3cd94701\",\n \"feeddefdbe85fd8d3ce6550da63603\",\n \"feeddefdd0a2fdae6bfd8d3ce6550da63603\",\n \"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import {cubehelix} from \"d3-color\";\nimport {interpolateCubehelixLong} from \"d3-interpolate\";\n\nexport default interpolateCubehelixLong(cubehelix(300, 0.5, 0.0), cubehelix(-240, 0.5, 1.0));\n", "import {cubehelix} from \"d3-color\";\nimport {interpolateCubehelixLong} from \"d3-interpolate\";\n\nexport var warm = interpolateCubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\n\nexport var cool = interpolateCubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\n\nvar c = cubehelix();\n\nexport default function(t) {\n if (t < 0 || t > 1) t -= Math.floor(t);\n var ts = Math.abs(t - 0.5);\n c.h = 360 * t - 100;\n c.s = 1.5 - 1.5 * ts;\n c.l = 0.8 - 0.9 * ts;\n return c + \"\";\n}\n", "import {rgb} from \"d3-color\";\n\nvar c = rgb(),\n pi_1_3 = Math.PI / 3,\n pi_2_3 = Math.PI * 2 / 3;\n\nexport default function(t) {\n var x;\n t = (0.5 - t) * Math.PI;\n c.r = 255 * (x = Math.sin(t)) * x;\n c.g = 255 * (x = Math.sin(t + pi_1_3)) * x;\n c.b = 255 * (x = Math.sin(t + pi_2_3)) * x;\n return c + \"\";\n}\n", "import colors from \"../colors.js\";\n\nfunction ramp(range) {\n var n = range.length;\n return function(t) {\n return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n };\n}\n\nexport default ramp(colors(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\"));\n\nexport var magma = ramp(colors(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\"));\n\nexport var inferno = ramp(colors(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\"));\n\nexport var plasma = ramp(colors(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));\n", "export default function(x) {\n return function constant() {\n return x;\n };\n}\n", "export const abs = Math.abs;\nexport const atan2 = Math.atan2;\nexport const cos = Math.cos;\nexport const max = Math.max;\nexport const min = Math.min;\nexport const sin = Math.sin;\nexport const sqrt = Math.sqrt;\n\nexport const epsilon = 1e-12;\nexport const pi = Math.PI;\nexport const halfPi = pi / 2;\nexport const tau = 2 * pi;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n", "const pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction append(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += arguments[i] + strings[i];\n }\n}\n\nfunction appendRound(digits) {\n let d = Math.floor(digits);\n if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);\n if (d > 15) return append;\n const k = 10 ** d;\n return function(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += Math.round(arguments[i] * k) / k + strings[i];\n }\n };\n}\n\nexport class Path {\n constructor(digits) {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n this._append = digits == null ? append : appendRound(digits);\n }\n moveTo(x, y) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n }\n closePath() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._append`Z`;\n }\n }\n lineTo(x, y) {\n this._append`L${this._x1 = +x},${this._y1 = +y}`;\n }\n quadraticCurveTo(x1, y1, x, y) {\n this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;\n }\n bezierCurveTo(x1, y1, x2, y2, x, y) {\n this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;\n }\n arcTo(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._append`M${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._append`L${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Otherwise, draw an arc!\n else {\n let x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;\n }\n\n this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;\n }\n }\n arc(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._append`M${x0},${y0}`;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._append`L${x0},${y0}`;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;\n }\n }\n rect(x, y, w, h) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;\n }\n toString() {\n return this._;\n }\n}\n\nexport function path() {\n return new Path;\n}\n\n// Allow instanceof d3.path\npath.prototype = Path.prototype;\n\nexport function pathRound(digits = 3) {\n return new Path(+digits);\n}\n", "import {Path} from \"d3-path\";\n\nexport function withPath(shape) {\n let digits = 3;\n\n shape.digits = function(_) {\n if (!arguments.length) return digits;\n if (_ == null) {\n digits = null;\n } else {\n const d = Math.floor(_);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n digits = d;\n }\n return shape;\n };\n\n return () => new Path(digits);\n}\n", "import constant from \"./constant.js\";\nimport {abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau} from \"./math.js\";\nimport {withPath} from \"./path.js\";\n\nfunction arcInnerRadius(d) {\n return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n var x10 = x1 - x0, y10 = y1 - y0,\n x32 = x3 - x2, y32 = y3 - y2,\n t = y32 * x10 - x32 * y10;\n if (t * t < epsilon) return;\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n var x01 = x0 - x1,\n y01 = y0 - y1,\n lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n ox = lo * y01,\n oy = -lo * x01,\n x11 = x0 + ox,\n y11 = y0 + oy,\n x10 = x1 + ox,\n y10 = y1 + oy,\n x00 = (x11 + x10) / 2,\n y00 = (y11 + y10) / 2,\n dx = x10 - x11,\n dy = y10 - y11,\n d2 = dx * dx + dy * dy,\n r = r1 - rc,\n D = x11 * y10 - x10 * y11,\n d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n cx0 = (D * dy - dx * d) / d2,\n cy0 = (-D * dx - dy * d) / d2,\n cx1 = (D * dy + dx * d) / d2,\n cy1 = (-D * dx + dy * d) / d2,\n dx0 = cx0 - x00,\n dy0 = cy0 - y00,\n dx1 = cx1 - x00,\n dy1 = cy1 - y00;\n\n // Pick the closer of the two intersection points.\n // TODO Is there a faster way to determine which intersection to use?\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1)\n };\n}\n\nexport default function() {\n var innerRadius = arcInnerRadius,\n outerRadius = arcOuterRadius,\n cornerRadius = constant(0),\n padRadius = null,\n startAngle = arcStartAngle,\n endAngle = arcEndAngle,\n padAngle = arcPadAngle,\n context = null,\n path = withPath(arc);\n\n function arc() {\n var buffer,\n r,\n r0 = +innerRadius.apply(this, arguments),\n r1 = +outerRadius.apply(this, arguments),\n a0 = startAngle.apply(this, arguments) - halfPi,\n a1 = endAngle.apply(this, arguments) - halfPi,\n da = abs(a1 - a0),\n cw = a1 > a0;\n\n if (!context) context = buffer = path();\n\n // Ensure that the outer radius is always larger than the inner radius.\n if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n // Is it a point?\n if (!(r1 > epsilon)) context.moveTo(0, 0);\n\n // Or is it a circle or annulus?\n else if (da > tau - epsilon) {\n context.moveTo(r1 * cos(a0), r1 * sin(a0));\n context.arc(0, 0, r1, a0, a1, !cw);\n if (r0 > epsilon) {\n context.moveTo(r0 * cos(a1), r0 * sin(a1));\n context.arc(0, 0, r0, a1, a0, cw);\n }\n }\n\n // Or is it a circular or annular sector?\n else {\n var a01 = a0,\n a11 = a1,\n a00 = a0,\n a10 = a1,\n da0 = da,\n da1 = da,\n ap = padAngle.apply(this, arguments) / 2,\n rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n rc0 = rc,\n rc1 = rc,\n t0,\n t1;\n\n // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n if (rp > epsilon) {\n var p0 = asin(rp / r0 * sin(ap)),\n p1 = asin(rp / r1 * sin(ap));\n if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n }\n\n var x01 = r1 * cos(a01),\n y01 = r1 * sin(a01),\n x10 = r0 * cos(a10),\n y10 = r0 * sin(a10);\n\n // Apply rounded corners?\n if (rc > epsilon) {\n var x11 = r1 * cos(a11),\n y11 = r1 * sin(a11),\n x00 = r0 * cos(a00),\n y00 = r0 * sin(a00),\n oc;\n\n // Restrict the corner radius according to the sector angle. If this\n // intersection fails, it’s probably because the arc is too small, so\n // disable the corner radius entirely.\n if (da < pi) {\n if (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10)) {\n var ax = x01 - oc[0],\n ay = y01 - oc[1],\n bx = x11 - oc[0],\n by = y11 - oc[1],\n kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),\n lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n rc0 = min(rc, (r0 - lc) / (kc - 1));\n rc1 = min(rc, (r1 - lc) / (kc + 1));\n } else {\n rc0 = rc1 = 0;\n }\n }\n }\n\n // Is the sector collapsed to a line?\n if (!(da1 > epsilon)) context.moveTo(x01, y01);\n\n // Does the sector’s outer ring have rounded corners?\n else if (rc1 > epsilon) {\n t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the outer ring just a circular arc?\n else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n // Is there no inner ring, and it’s a circular sector?\n // Or perhaps it’s an annular sector collapsed due to padding?\n if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);\n\n // Does the sector’s inner ring (or point) have rounded corners?\n else if (rc0 > epsilon) {\n t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the inner ring just a circular arc?\n else context.arc(0, 0, r0, a10, a00, cw);\n }\n\n context.closePath();\n\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n arc.centroid = function() {\n var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;\n return [cos(a) * r, sin(a) * r];\n };\n\n arc.innerRadius = function(_) {\n return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : innerRadius;\n };\n\n arc.outerRadius = function(_) {\n return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : outerRadius;\n };\n\n arc.cornerRadius = function(_) {\n return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : cornerRadius;\n };\n\n arc.padRadius = function(_) {\n return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), arc) : padRadius;\n };\n\n arc.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : startAngle;\n };\n\n arc.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : endAngle;\n };\n\n arc.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : padAngle;\n };\n\n arc.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n };\n\n return arc;\n}\n", "function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: this._context.lineTo(x, y); break;\n }\n }\n};\n\nexport default function(context) {\n return new Linear(context);\n}\n", "export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n", "export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n", "import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x, y) {\n var defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(line);\n\n x = typeof x === \"function\" ? x : (x === undefined) ? pointX : constant(x);\n y = typeof y === \"function\" ? y : (y === undefined) ? pointY : constant(y);\n\n function line(data) {\n var i,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n", "export default function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n", "export default function(d) {\n return d;\n}\n", "import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport {tau} from \"./math.js\";\n\nexport default function() {\n var value = identity,\n sortValues = descending,\n sort = null,\n startAngle = constant(0),\n endAngle = constant(tau),\n padAngle = constant(0);\n\n function pie(data) {\n var i,\n n = (data = array(data)).length,\n j,\n k,\n sum = 0,\n index = new Array(n),\n arcs = new Array(n),\n a0 = +startAngle.apply(this, arguments),\n da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n a1,\n p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n pa = p * (da < 0 ? -1 : 1),\n v;\n\n for (i = 0; i < n; ++i) {\n if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n sum += v;\n }\n }\n\n // Optionally sort the arcs by previously-computed values or by data.\n if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n // Compute the arcs! They are stored in the original data's order.\n for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n data: data[j],\n index: i,\n value: v,\n startAngle: a0,\n endAngle: a1,\n padAngle: p\n };\n }\n\n return arcs;\n }\n\n pie.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n };\n\n pie.sortValues = function(_) {\n return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n };\n\n pie.sort = function(_) {\n return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n };\n\n pie.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n };\n\n pie.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n };\n\n pie.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n };\n\n return pie;\n}\n", "export function point(that, x, y) {\n that._context.bezierCurveTo(\n (2 * that._x0 + that._x1) / 3,\n (2 * that._y0 + that._y1) / 3,\n (that._x0 + 2 * that._x1) / 3,\n (that._y0 + 2 * that._y1) / 3,\n (that._x0 + 4 * that._x1 + x) / 6,\n (that._y0 + 4 * that._y1 + y) / 6\n );\n}\n\nexport function Basis(context) {\n this._context = context;\n}\n\nBasis.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 3: point(this, this._x1, this._y1); // falls through\n case 2: this._context.lineTo(this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new Basis(context);\n}\n", "import curveLinear from \"./linear.js\";\n\nexport var curveRadialLinear = curveRadial(curveLinear);\n\nfunction Radial(curve) {\n this._curve = curve;\n}\n\nRadial.prototype = {\n areaStart: function() {\n this._curve.areaStart();\n },\n areaEnd: function() {\n this._curve.areaEnd();\n },\n lineStart: function() {\n this._curve.lineStart();\n },\n lineEnd: function() {\n this._curve.lineEnd();\n },\n point: function(a, r) {\n this._curve.point(r * Math.sin(a), r * -Math.cos(a));\n }\n};\n\nexport default function curveRadial(curve) {\n\n function radial(context) {\n return new Radial(curve(context));\n }\n\n radial._curve = curve;\n\n return radial;\n}\n", "import pointRadial from \"../pointRadial.js\";\n\nclass Bump {\n constructor(context, x) {\n this._context = context;\n this._x = x;\n }\n areaStart() {\n this._line = 0;\n }\n areaEnd() {\n this._line = NaN;\n }\n lineStart() {\n this._point = 0;\n }\n lineEnd() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n }\n point(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: {\n this._point = 1;\n if (this._line) this._context.lineTo(x, y);\n else this._context.moveTo(x, y);\n break;\n }\n case 1: this._point = 2; // falls through\n default: {\n if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x) / 2, this._y0, this._x0, y, x, y);\n else this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y) / 2, x, this._y0, x, y);\n break;\n }\n }\n this._x0 = x, this._y0 = y;\n }\n}\n\nclass BumpRadial {\n constructor(context) {\n this._context = context;\n }\n lineStart() {\n this._point = 0;\n }\n lineEnd() {}\n point(x, y) {\n x = +x, y = +y;\n if (this._point === 0) {\n this._point = 1;\n } else {\n const p0 = pointRadial(this._x0, this._y0);\n const p1 = pointRadial(this._x0, this._y0 = (this._y0 + y) / 2);\n const p2 = pointRadial(x, this._y0);\n const p3 = pointRadial(x, y);\n this._context.moveTo(...p0);\n this._context.bezierCurveTo(...p1, ...p2, ...p3);\n }\n this._x0 = x, this._y0 = y;\n }\n}\n\nexport function bumpX(context) {\n return new Bump(context, true);\n}\n\nexport function bumpY(context) {\n return new Bump(context, false);\n}\n\nexport function bumpRadial(context) {\n return new BumpRadial(context);\n}\n", "import {min, sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n draw(context, size) {\n const r = sqrt(size + min(size / 28, 0.75)) * 0.59436;\n const t = r / 2;\n const u = t * sqrt3;\n context.moveTo(0, r);\n context.lineTo(0, -r);\n context.moveTo(-u, -t);\n context.lineTo(u, t);\n context.moveTo(-u, t);\n context.lineTo(u, -t);\n }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst tan30 = sqrt(1 / 3);\nconst tan30_2 = tan30 * 2;\n\nexport default {\n draw(context, size) {\n const y = sqrt(size / tan30_2);\n const x = y * tan30;\n context.moveTo(0, -y);\n context.lineTo(x, 0);\n context.lineTo(0, y);\n context.lineTo(-x, 0);\n context.closePath();\n }\n};\n", "import {sin, cos, sqrt, pi, tau} from \"../math.js\";\n\nconst ka = 0.89081309152928522810;\nconst kr = sin(pi / 10) / sin(7 * pi / 10);\nconst kx = sin(tau / 10) * kr;\nconst ky = -cos(tau / 10) * kr;\n\nexport default {\n draw(context, size) {\n const r = sqrt(size * ka);\n const x = kx * r;\n const y = ky * r;\n context.moveTo(0, -r);\n context.lineTo(x, y);\n for (let i = 1; i < 5; ++i) {\n const a = tau * i / 5;\n const c = cos(a);\n const s = sin(a);\n context.lineTo(s * r, -c * r);\n context.lineTo(c * x - s * y, s * x + c * y);\n }\n context.closePath();\n }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n draw(context, size) {\n const y = -sqrt(size / (sqrt3 * 3));\n context.moveTo(0, y * 2);\n context.lineTo(-sqrt3 * y, -y);\n context.lineTo(sqrt3 * y, -y);\n context.closePath();\n }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n draw(context, size) {\n const s = sqrt(size) * 0.6824;\n const t = s / 2;\n const u = (s * sqrt3) / 2; // cos(Math.PI / 6)\n context.moveTo(0, -s);\n context.lineTo(u, t);\n context.lineTo(-u, t);\n context.closePath();\n }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst c = -0.5;\nconst s = sqrt(3) / 2;\nconst k = 1 / sqrt(12);\nconst a = (k / 2 + 1) * 3;\n\nexport default {\n draw(context, size) {\n const r = sqrt(size / a);\n const x0 = r / 2, y0 = r * k;\n const x1 = x0, y1 = r * k + r;\n const x2 = -x1, y2 = y1;\n context.moveTo(x0, y0);\n context.lineTo(x1, y1);\n context.lineTo(x2, y2);\n context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n context.closePath();\n }\n};\n", "export default function() {}\n", "import noop from \"../noop.js\";\nimport {point} from \"./basis.js\";\n\nfunction BasisClosed(context) {\n this._context = context;\n}\n\nBasisClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x2, this._y2);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x2, this._y2);\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x2 = x, this._y2 = y; break;\n case 1: this._point = 2; this._x3 = x, this._y3 = y; break;\n case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisClosed(context);\n}\n", "import {point} from \"./basis.js\";\n\nfunction BasisOpen(context) {\n this._context = context;\n}\n\nBasisOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;\n case 3: this._point = 4; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisOpen(context);\n}\n", "import {Basis} from \"./basis.js\";\n\nfunction Bundle(context, beta) {\n this._basis = new Basis(context);\n this._beta = beta;\n}\n\nBundle.prototype = {\n lineStart: function() {\n this._x = [];\n this._y = [];\n this._basis.lineStart();\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n j = x.length - 1;\n\n if (j > 0) {\n var x0 = x[0],\n y0 = y[0],\n dx = x[j] - x0,\n dy = y[j] - y0,\n i = -1,\n t;\n\n while (++i <= j) {\n t = i / j;\n this._basis.point(\n this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),\n this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)\n );\n }\n }\n\n this._x = this._y = null;\n this._basis.lineEnd();\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\nexport default (function custom(beta) {\n\n function bundle(context) {\n return beta === 1 ? new Basis(context) : new Bundle(context, beta);\n }\n\n bundle.beta = function(beta) {\n return custom(+beta);\n };\n\n return bundle;\n})(0.85);\n", "export function point(that, x, y) {\n that._context.bezierCurveTo(\n that._x1 + that._k * (that._x2 - that._x0),\n that._y1 + that._k * (that._y2 - that._y0),\n that._x2 + that._k * (that._x1 - x),\n that._y2 + that._k * (that._y1 - y),\n that._x2,\n that._y2\n );\n}\n\nexport function Cardinal(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: point(this, this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n case 2: this._point = 3; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new Cardinal(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n", "import noop from \"../noop.js\";\nimport {point} from \"./cardinal.js\";\n\nexport function CardinalClosed(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalClosed(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n", "import {point} from \"./cardinal.js\";\n\nexport function CardinalOpen(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalOpen(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n", "import {epsilon} from \"../math.js\";\nimport {Cardinal} from \"./cardinal.js\";\n\nexport function point(that, x, y) {\n var x1 = that._x1,\n y1 = that._y1,\n x2 = that._x2,\n y2 = that._y2;\n\n if (that._l01_a > epsilon) {\n var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n }\n\n if (that._l23_a > epsilon) {\n var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n }\n\n that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nfunction CatmullRom(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: this.point(this._x2, this._y2); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; // falls through\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n", "import {CardinalClosed} from \"./cardinalClosed.js\";\nimport noop from \"../noop.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomClosed(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n", "import {CardinalOpen} from \"./cardinalOpen.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomOpen(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // falls through\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n", "import noop from \"../noop.js\";\n\nfunction LinearClosed(context) {\n this._context = context;\n}\n\nLinearClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._point) this._context.closePath();\n },\n point: function(x, y) {\n x = +x, y = +y;\n if (this._point) this._context.lineTo(x, y);\n else this._point = 1, this._context.moveTo(x, y);\n }\n};\n\nexport default function(context) {\n return new LinearClosed(context);\n}\n", "function sign(x) {\n return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n var x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 3;\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n this._context = context;\n}\n\nMonotoneX.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 =\n this._t0 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x1, this._y1); break;\n case 3: point(this, this._t0, slope2(this, this._t0)); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n var t1 = NaN;\n\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n}\n\nfunction MonotoneY(context) {\n this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n this._context = context;\n}\n\nReflectContext.prototype = {\n moveTo: function(x, y) { this._context.moveTo(y, x); },\n closePath: function() { this._context.closePath(); },\n lineTo: function(x, y) { this._context.lineTo(y, x); },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nexport function monotoneX(context) {\n return new MonotoneX(context);\n}\n\nexport function monotoneY(context) {\n return new MonotoneY(context);\n}\n", "function Natural(context) {\n this._context = context;\n}\n\nNatural.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = [];\n this._y = [];\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n n = x.length;\n\n if (n) {\n this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n if (n === 2) {\n this._context.lineTo(x[1], y[1]);\n } else {\n var px = controlPoints(x),\n py = controlPoints(y);\n for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n }\n }\n }\n\n if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();\n this._line = 1 - this._line;\n this._x = this._y = null;\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\n// See https://www.particleincell.com/2012/bezier-splines/ for derivation.\nfunction controlPoints(x) {\n var i,\n n = x.length - 1,\n m,\n a = new Array(n),\n b = new Array(n),\n r = new Array(n);\n a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n a[n - 1] = r[n - 1] / b[n - 1];\n for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];\n b[n - 1] = (x[n] + a[n - 1]) / 2;\n for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];\n return [a, b];\n}\n\nexport default function(context) {\n return new Natural(context);\n}\n", "function Step(context, t) {\n this._context = context;\n this._t = t;\n}\n\nStep.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = this._y = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: {\n if (this._t <= 0) {\n this._context.lineTo(this._x, y);\n this._context.lineTo(x, y);\n } else {\n var x1 = this._x * (1 - this._t) + x * this._t;\n this._context.lineTo(x1, this._y);\n this._context.lineTo(x1, y);\n }\n break;\n }\n }\n this._x = x, this._y = y;\n }\n};\n\nexport default function(context) {\n return new Step(context, 0.5);\n}\n\nexport function stepBefore(context) {\n return new Step(context, 0);\n}\n\nexport function stepAfter(context) {\n return new Step(context, 1);\n}\n", "var noop = {value: () => {}};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n}\n\nexport default dispatch;\n", "export default function DragEvent(type, {\n sourceEvent,\n subject,\n target,\n identifier,\n active,\n x, y, dx, dy,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n subject: {value: subject, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n identifier: {value: identifier, enumerable: true, configurable: true},\n active: {value: active, enumerable: true, configurable: true},\n x: {value: x, enumerable: true, configurable: true},\n y: {value: y, enumerable: true, configurable: true},\n dx: {value: dx, enumerable: true, configurable: true},\n dy: {value: dy, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n\nDragEvent.prototype.on = function() {\n var value = this._.on.apply(this._, arguments);\n return value === this._ ? this : value;\n};\n", "var frame = 0, // is an animation frame pending?\n timeout = 0, // is a timeout pending?\n interval = 0, // are any timers active?\n pokeDelay = 1000, // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call =\n this._time =\n this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;\n else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\n\nexport function timer(callback, delay, time) {\n var t = new Timer;\n t.restart(callback, delay, time);\n return t;\n}\n\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);\n t = t._next;\n }\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(), delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n", "import {Timer} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n var t = new Timer;\n delay = delay == null ? 0 : +delay;\n t.restart(elapsed => {\n t.stop();\n callback(elapsed + delay);\n }, delay, time);\n return t;\n}\n", "import {dispatch} from \"d3-dispatch\";\nimport {timer, timeout} from \"d3-timer\";\n\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\n\nexport default function(node, name, id, index, group, timing) {\n var schedules = node.__transition;\n if (!schedules) node.__transition = {};\n else if (id in schedules) return;\n create(node, id, {\n name: name,\n index: index, // For context during callback.\n group: group, // For context during callback.\n on: emptyOn,\n tween: emptyTween,\n time: timing.time,\n delay: timing.delay,\n duration: timing.duration,\n ease: timing.ease,\n timer: null,\n state: CREATED\n });\n}\n\nexport function init(node, id) {\n var schedule = get(node, id);\n if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n return schedule;\n}\n\nexport function set(node, id) {\n var schedule = get(node, id);\n if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n return schedule;\n}\n\nexport function get(node, id) {\n var schedule = node.__transition;\n if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n return schedule;\n}\n\nfunction create(node, id, self) {\n var schedules = node.__transition,\n tween;\n\n // Initialize the self timer when the transition is created.\n // Note the actual delay is not known until the first callback!\n schedules[id] = self;\n self.timer = timer(schedule, 0, self.time);\n\n function schedule(elapsed) {\n self.state = SCHEDULED;\n self.timer.restart(start, self.delay, self.time);\n\n // If the elapsed delay is less than our first sleep, start immediately.\n if (self.delay <= elapsed) start(elapsed - self.delay);\n }\n\n function start(elapsed) {\n var i, j, n, o;\n\n // If the state is not SCHEDULED, then we previously errored on start.\n if (self.state !== SCHEDULED) return stop();\n\n for (i in schedules) {\n o = schedules[i];\n if (o.name !== self.name) continue;\n\n // While this element already has a starting transition during this frame,\n // defer starting an interrupting transition until that transition has a\n // chance to tick (and possibly end); see d3/d3-transition#54!\n if (o.state === STARTED) return timeout(start);\n\n // Interrupt the active transition, if any.\n if (o.state === RUNNING) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n\n // Cancel any pre-empted transitions.\n else if (+i < id) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n }\n\n // Defer the first tick to end of the current frame; see d3/d3#1576.\n // Note the transition may be canceled after start and before the first tick!\n // Note this must be scheduled before the start event; see d3/d3-transition#16!\n // Assuming this is successful, subsequent callbacks go straight to tick.\n timeout(function() {\n if (self.state === STARTED) {\n self.state = RUNNING;\n self.timer.restart(tick, self.delay, self.time);\n tick(elapsed);\n }\n });\n\n // Dispatch the start event.\n // Note this must be done before the tween are initialized.\n self.state = STARTING;\n self.on.call(\"start\", node, node.__data__, self.index, self.group);\n if (self.state !== STARTING) return; // interrupted\n self.state = STARTED;\n\n // Initialize the tween, deleting null tween.\n tween = new Array(n = self.tween.length);\n for (i = 0, j = -1; i < n; ++i) {\n if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n tween[++j] = o;\n }\n }\n tween.length = j + 1;\n }\n\n function tick(elapsed) {\n var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n i = -1,\n n = tween.length;\n\n while (++i < n) {\n tween[i].call(node, t);\n }\n\n // Dispatch the end event.\n if (self.state === ENDING) {\n self.on.call(\"end\", node, node.__data__, self.index, self.group);\n stop();\n }\n }\n\n function stop() {\n self.state = ENDED;\n self.timer.stop();\n delete schedules[id];\n for (var i in schedules) return; // eslint-disable-line no-unused-vars\n delete node.__transition;\n }\n}\n", "import {STARTING, ENDING, ENDED} from \"./transition/schedule.js\";\n\nexport default function(node, name) {\n var schedules = node.__transition,\n schedule,\n active,\n empty = true,\n i;\n\n if (!schedules) return;\n\n name = name == null ? null : name + \"\";\n\n for (i in schedules) {\n if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n active = schedule.state > STARTING && schedule.state < ENDING;\n schedule.state = ENDED;\n schedule.timer.stop();\n schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n delete schedules[i];\n }\n\n if (empty) delete node.__transition;\n}\n", "import interrupt from \"../interrupt.js\";\n\nexport default function(name) {\n return this.each(function() {\n interrupt(this, name);\n });\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction tweenRemove(id, name) {\n var tween0, tween1;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = tween0 = tween;\n for (var i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1 = tween1.slice();\n tween1.splice(i, 1);\n break;\n }\n }\n }\n\n schedule.tween = tween1;\n };\n}\n\nfunction tweenFunction(id, name, value) {\n var tween0, tween1;\n if (typeof value !== \"function\") throw new Error;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = (tween0 = tween).slice();\n for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1[i] = t;\n break;\n }\n }\n if (i === n) tween1.push(t);\n }\n\n schedule.tween = tween1;\n };\n}\n\nexport default function(name, value) {\n var id = this._id;\n\n name += \"\";\n\n if (arguments.length < 2) {\n var tween = get(this.node(), id).tween;\n for (var i = 0, n = tween.length, t; i < n; ++i) {\n if ((t = tween[i]).name === name) {\n return t.value;\n }\n }\n return null;\n }\n\n return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\n\nexport function tweenValue(transition, name, value) {\n var id = transition._id;\n\n transition.each(function() {\n var schedule = set(this, id);\n (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n });\n\n return function(node) {\n return get(node, id).value[name];\n };\n}\n", "import {color} from \"d3-color\";\nimport {interpolateNumber, interpolateRgb, interpolateString} from \"d3-interpolate\";\n\nexport default function(a, b) {\n var c;\n return (typeof b === \"number\" ? interpolateNumber\n : b instanceof color ? interpolateRgb\n : (c = color(b)) ? (b = c, interpolateRgb)\n : interpolateString)(a, b);\n}\n", "import {interpolateTransformSvg as interpolateTransform} from \"d3-interpolate\";\nimport {namespace} from \"d3-selection\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttribute(name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttributeNS(fullname.space, fullname.local);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttribute(name);\n string0 = this.getAttribute(name);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n string0 = this.getAttributeNS(fullname.space, fullname.local);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name), i = fullname === \"transform\" ? interpolateTransform : interpolate;\n return this.attrTween(name, typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value))\n : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}\n", "import {namespace} from \"d3-selection\";\n\nfunction attrInterpolate(name, i) {\n return function(t) {\n this.setAttribute(name, i.call(this, t));\n };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n return function(t) {\n this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n };\n}\n\nfunction attrTweenNS(fullname, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nfunction attrTween(name, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value) {\n var key = \"attr.\" + name;\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n var fullname = namespace(name);\n return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}\n", "import {get, init} from \"./schedule.js\";\n\nfunction delayFunction(id, value) {\n return function() {\n init(this, id).delay = +value.apply(this, arguments);\n };\n}\n\nfunction delayConstant(id, value) {\n return value = +value, function() {\n init(this, id).delay = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? delayFunction\n : delayConstant)(id, value))\n : get(this.node(), id).delay;\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction durationFunction(id, value) {\n return function() {\n set(this, id).duration = +value.apply(this, arguments);\n };\n}\n\nfunction durationConstant(id, value) {\n return value = +value, function() {\n set(this, id).duration = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? durationFunction\n : durationConstant)(id, value))\n : get(this.node(), id).duration;\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction easeConstant(id, value) {\n if (typeof value !== \"function\") throw new Error;\n return function() {\n set(this, id).ease = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each(easeConstant(id, value))\n : get(this.node(), id).ease;\n}\n", "import {set} from \"./schedule.js\";\n\nfunction easeVarying(id, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (typeof v !== \"function\") throw new Error;\n set(this, id).ease = v;\n };\n}\n\nexport default function(value) {\n if (typeof value !== \"function\") throw new Error;\n return this.each(easeVarying(this._id, value));\n}\n", "import {matcher} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Transition(subgroups, this._parents, this._name, this._id);\n}\n", "import {Transition} from \"./index.js\";\n\nexport default function(transition) {\n if (transition._id !== this._id) throw new Error;\n\n for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Transition(merges, this._parents, this._name, this._id);\n}\n", "import {get, set, init} from \"./schedule.js\";\n\nfunction start(name) {\n return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n var i = t.indexOf(\".\");\n if (i >= 0) t = t.slice(0, i);\n return !t || t === \"start\";\n });\n}\n\nfunction onFunction(id, name, listener) {\n var on0, on1, sit = start(name) ? init : set;\n return function() {\n var schedule = sit(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, listener) {\n var id = this._id;\n\n return arguments.length < 2\n ? get(this.node(), id).on.on(name)\n : this.each(onFunction(id, name, listener));\n}\n", "function removeFunction(id) {\n return function() {\n var parent = this.parentNode;\n for (var i in this.__transition) if (+i !== id) return;\n if (parent) parent.removeChild(this);\n };\n}\n\nexport default function() {\n return this.on(\"end.remove\", removeFunction(this._id));\n}\n", "import {selector} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n }\n }\n }\n\n return new Transition(subgroups, this._parents, name, id);\n}\n", "import {selectorAll} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n if (child = children[k]) {\n schedule(child, name, id, k, children, inherit);\n }\n }\n subgroups.push(children);\n parents.push(node);\n }\n }\n }\n\n return new Transition(subgroups, parents, name, id);\n}\n", "import {selection} from \"d3-selection\";\n\nvar Selection = selection.prototype.constructor;\n\nexport default function() {\n return new Selection(this._groups, this._parents);\n}\n", "import {interpolateTransformCss as interpolateTransform} from \"d3-interpolate\";\nimport {style} from \"d3-selection\";\nimport {set} from \"./schedule.js\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction styleNull(name, interpolate) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n string1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, string10 = string1);\n };\n}\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = style(this, name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction styleFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n value1 = value(this),\n string1 = value1 + \"\";\n if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction styleMaybeRemove(id, name) {\n var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n return function() {\n var schedule = set(this, id),\n on = schedule.on,\n listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, value, priority) {\n var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n return value == null ? this\n .styleTween(name, styleNull(name, i))\n .on(\"end.style.\" + name, styleRemove(name))\n : typeof value === \"function\" ? this\n .styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value)))\n .each(styleMaybeRemove(this._id, name))\n : this\n .styleTween(name, styleConstant(name, i, value), priority)\n .on(\"end.style.\" + name, null);\n}\n", "function styleInterpolate(name, i, priority) {\n return function(t) {\n this.style.setProperty(name, i.call(this, t), priority);\n };\n}\n\nfunction styleTween(name, value, priority) {\n var t, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n return t;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value, priority) {\n var key = \"style.\" + (name += \"\");\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}\n", "import {tweenValue} from \"./tween.js\";\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var value1 = value(this);\n this.textContent = value1 == null ? \"\" : value1;\n };\n}\n\nexport default function(value) {\n return this.tween(\"text\", typeof value === \"function\"\n ? textFunction(tweenValue(this, \"text\", value))\n : textConstant(value == null ? \"\" : value + \"\"));\n}\n", "function textInterpolate(i) {\n return function(t) {\n this.textContent = i.call(this, t);\n };\n}\n\nfunction textTween(value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(value) {\n var key = \"text\";\n if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, textTween(value));\n}\n", "import {Transition, newId} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function() {\n var name = this._name,\n id0 = this._id,\n id1 = newId();\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n var inherit = get(node, id0);\n schedule(node, name, id1, i, group, {\n time: inherit.time + inherit.delay + inherit.duration,\n delay: 0,\n duration: inherit.duration,\n ease: inherit.ease\n });\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id1);\n}\n", "import {set} from \"./schedule.js\";\n\nexport default function() {\n var on0, on1, that = this, id = that._id, size = that.size();\n return new Promise(function(resolve, reject) {\n var cancel = {value: reject},\n end = {value: function() { if (--size === 0) resolve(); }};\n\n that.each(function() {\n var schedule = set(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) {\n on1 = (on0 = on).copy();\n on1._.cancel.push(cancel);\n on1._.interrupt.push(cancel);\n on1._.end.push(end);\n }\n\n schedule.on = on1;\n });\n\n // The selection was empty, resolve end immediately\n if (size === 0) resolve();\n });\n}\n", "import {selection} from \"d3-selection\";\nimport transition_attr from \"./attr.js\";\nimport transition_attrTween from \"./attrTween.js\";\nimport transition_delay from \"./delay.js\";\nimport transition_duration from \"./duration.js\";\nimport transition_ease from \"./ease.js\";\nimport transition_easeVarying from \"./easeVarying.js\";\nimport transition_filter from \"./filter.js\";\nimport transition_merge from \"./merge.js\";\nimport transition_on from \"./on.js\";\nimport transition_remove from \"./remove.js\";\nimport transition_select from \"./select.js\";\nimport transition_selectAll from \"./selectAll.js\";\nimport transition_selection from \"./selection.js\";\nimport transition_style from \"./style.js\";\nimport transition_styleTween from \"./styleTween.js\";\nimport transition_text from \"./text.js\";\nimport transition_textTween from \"./textTween.js\";\nimport transition_transition from \"./transition.js\";\nimport transition_tween from \"./tween.js\";\nimport transition_end from \"./end.js\";\n\nvar id = 0;\n\nexport function Transition(groups, parents, name, id) {\n this._groups = groups;\n this._parents = parents;\n this._name = name;\n this._id = id;\n}\n\nexport default function transition(name) {\n return selection().transition(name);\n}\n\nexport function newId() {\n return ++id;\n}\n\nvar selection_prototype = selection.prototype;\n\nTransition.prototype = transition.prototype = {\n constructor: Transition,\n select: transition_select,\n selectAll: transition_selectAll,\n selectChild: selection_prototype.selectChild,\n selectChildren: selection_prototype.selectChildren,\n filter: transition_filter,\n merge: transition_merge,\n selection: transition_selection,\n transition: transition_transition,\n call: selection_prototype.call,\n nodes: selection_prototype.nodes,\n node: selection_prototype.node,\n size: selection_prototype.size,\n empty: selection_prototype.empty,\n each: selection_prototype.each,\n on: transition_on,\n attr: transition_attr,\n attrTween: transition_attrTween,\n style: transition_style,\n styleTween: transition_styleTween,\n text: transition_text,\n textTween: transition_textTween,\n remove: transition_remove,\n tween: transition_tween,\n delay: transition_delay,\n duration: transition_duration,\n ease: transition_ease,\n easeVarying: transition_easeVarying,\n end: transition_end,\n [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};\n", "export function cubicIn(t) {\n return t * t * t;\n}\n\nexport function cubicOut(t) {\n return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n", "var exponent = 3;\n\nexport var polyIn = (function custom(e) {\n e = +e;\n\n function polyIn(t) {\n return Math.pow(t, e);\n }\n\n polyIn.exponent = custom;\n\n return polyIn;\n})(exponent);\n\nexport var polyOut = (function custom(e) {\n e = +e;\n\n function polyOut(t) {\n return 1 - Math.pow(1 - t, e);\n }\n\n polyOut.exponent = custom;\n\n return polyOut;\n})(exponent);\n\nexport var polyInOut = (function custom(e) {\n e = +e;\n\n function polyInOut(t) {\n return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;\n }\n\n polyInOut.exponent = custom;\n\n return polyInOut;\n})(exponent);\n", "var pi = Math.PI,\n halfPi = pi / 2;\n\nexport function sinIn(t) {\n return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi);\n}\n\nexport function sinOut(t) {\n return Math.sin(t * halfPi);\n}\n\nexport function sinInOut(t) {\n return (1 - Math.cos(pi * t)) / 2;\n}\n", "// tpmt is two power minus ten times t scaled to [0,1]\nexport function tpmt(x) {\n return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494;\n}\n", "var b1 = 4 / 11,\n b2 = 6 / 11,\n b3 = 8 / 11,\n b4 = 3 / 4,\n b5 = 9 / 11,\n b6 = 10 / 11,\n b7 = 15 / 16,\n b8 = 21 / 22,\n b9 = 63 / 64,\n b0 = 1 / b1 / b1;\n\nexport function bounceIn(t) {\n return 1 - bounceOut(1 - t);\n}\n\nexport function bounceOut(t) {\n 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;\n}\n\nexport function bounceInOut(t) {\n return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;\n}\n", "var overshoot = 1.70158;\n\nexport var backIn = (function custom(s) {\n s = +s;\n\n function backIn(t) {\n return (t = +t) * t * (s * (t - 1) + t);\n }\n\n backIn.overshoot = custom;\n\n return backIn;\n})(overshoot);\n\nexport var backOut = (function custom(s) {\n s = +s;\n\n function backOut(t) {\n return --t * t * ((t + 1) * s + t) + 1;\n }\n\n backOut.overshoot = custom;\n\n return backOut;\n})(overshoot);\n\nexport var backInOut = (function custom(s) {\n s = +s;\n\n function backInOut(t) {\n return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;\n }\n\n backInOut.overshoot = custom;\n\n return backInOut;\n})(overshoot);\n", "import {tpmt} from \"./math.js\";\n\nvar tau = 2 * Math.PI,\n amplitude = 1,\n period = 0.3;\n\nexport var elasticIn = (function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticIn(t) {\n return a * tpmt(-(--t)) * Math.sin((s - t) / p);\n }\n\n elasticIn.amplitude = function(a) { return custom(a, p * tau); };\n elasticIn.period = function(p) { return custom(a, p); };\n\n return elasticIn;\n})(amplitude, period);\n\nexport var elasticOut = (function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticOut(t) {\n return 1 - a * tpmt(t = +t) * Math.sin((t + s) / p);\n }\n\n elasticOut.amplitude = function(a) { return custom(a, p * tau); };\n elasticOut.period = function(p) { return custom(a, p); };\n\n return elasticOut;\n})(amplitude, period);\n\nexport var elasticInOut = (function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticInOut(t) {\n return ((t = t * 2 - 1) < 0\n ? a * tpmt(-t) * Math.sin((s - t) / p)\n : 2 - a * tpmt(t) * Math.sin((s + t) / p)) / 2;\n }\n\n elasticInOut.amplitude = function(a) { return custom(a, p * tau); };\n elasticInOut.period = function(p) { return custom(a, p); };\n\n return elasticInOut;\n})(amplitude, period);\n", "import {Transition, newId} from \"../transition/index.js\";\nimport schedule from \"../transition/schedule.js\";\nimport {easeCubicInOut} from \"d3-ease\";\nimport {now} from \"d3-timer\";\n\nvar defaultTiming = {\n time: null, // Set on use.\n delay: 0,\n duration: 250,\n ease: easeCubicInOut\n};\n\nfunction inherit(node, id) {\n var timing;\n while (!(timing = node.__transition) || !(timing = timing[id])) {\n if (!(node = node.parentNode)) {\n throw new Error(`transition ${id} not found`);\n }\n }\n return timing;\n}\n\nexport default function(name) {\n var id,\n timing;\n\n if (name instanceof Transition) {\n id = name._id, name = name._name;\n } else {\n id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n }\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n schedule(node, name, id, i, group, timing || inherit(node, id));\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id);\n}\n", "import {selection} from \"d3-selection\";\nimport selection_interrupt from \"./interrupt.js\";\nimport selection_transition from \"./transition.js\";\n\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;\n", "import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolate} from \"d3-interpolate\";\nimport {pointer, select} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport BrushEvent from \"./event.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\nvar MODE_DRAG = {name: \"drag\"},\n MODE_SPACE = {name: \"space\"},\n MODE_HANDLE = {name: \"handle\"},\n MODE_CENTER = {name: \"center\"};\n\nconst {abs, max, min} = Math;\n\nfunction number1(e) {\n return [+e[0], +e[1]];\n}\n\nfunction number2(e) {\n return [number1(e[0]), number1(e[1])];\n}\n\nvar X = {\n name: \"x\",\n handles: [\"w\", \"e\"].map(type),\n input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; },\n output: function(xy) { return xy && [xy[0][0], xy[1][0]]; }\n};\n\nvar Y = {\n name: \"y\",\n handles: [\"n\", \"s\"].map(type),\n input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; },\n output: function(xy) { return xy && [xy[0][1], xy[1][1]]; }\n};\n\nvar XY = {\n name: \"xy\",\n handles: [\"n\", \"w\", \"e\", \"s\", \"nw\", \"ne\", \"sw\", \"se\"].map(type),\n input: function(xy) { return xy == null ? null : number2(xy); },\n output: function(xy) { return xy; }\n};\n\nvar cursors = {\n overlay: \"crosshair\",\n selection: \"move\",\n n: \"ns-resize\",\n e: \"ew-resize\",\n s: \"ns-resize\",\n w: \"ew-resize\",\n nw: \"nwse-resize\",\n ne: \"nesw-resize\",\n se: \"nwse-resize\",\n sw: \"nesw-resize\"\n};\n\nvar flipX = {\n e: \"w\",\n w: \"e\",\n nw: \"ne\",\n ne: \"nw\",\n se: \"sw\",\n sw: \"se\"\n};\n\nvar flipY = {\n n: \"s\",\n s: \"n\",\n nw: \"sw\",\n ne: \"se\",\n se: \"ne\",\n sw: \"nw\"\n};\n\nvar signsX = {\n overlay: +1,\n selection: +1,\n n: null,\n e: +1,\n s: null,\n w: -1,\n nw: -1,\n ne: +1,\n se: +1,\n sw: -1\n};\n\nvar signsY = {\n overlay: +1,\n selection: +1,\n n: -1,\n e: null,\n s: +1,\n w: null,\n nw: -1,\n ne: -1,\n se: +1,\n sw: +1\n};\n\nfunction type(t) {\n return {type: t};\n}\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n return !event.ctrlKey && !event.button;\n}\n\nfunction defaultExtent() {\n var svg = this.ownerSVGElement || this;\n if (svg.hasAttribute(\"viewBox\")) {\n svg = svg.viewBox.baseVal;\n return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]];\n }\n return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\n// Like d3.local, but with the name “__brush” rather than auto-generated.\nfunction local(node) {\n while (!node.__brush) if (!(node = node.parentNode)) return;\n return node.__brush;\n}\n\nfunction empty(extent) {\n return extent[0][0] === extent[1][0]\n || extent[0][1] === extent[1][1];\n}\n\nexport function brushSelection(node) {\n var state = node.__brush;\n return state ? state.dim.output(state.selection) : null;\n}\n\nexport function brushX() {\n return brush(X);\n}\n\nexport function brushY() {\n return brush(Y);\n}\n\nexport default function() {\n return brush(XY);\n}\n\nfunction brush(dim) {\n var extent = defaultExtent,\n filter = defaultFilter,\n touchable = defaultTouchable,\n keys = true,\n listeners = dispatch(\"start\", \"brush\", \"end\"),\n handleSize = 6,\n touchending;\n\n function brush(group) {\n var overlay = group\n .property(\"__brush\", initialize)\n .selectAll(\".overlay\")\n .data([type(\"overlay\")]);\n\n overlay.enter().append(\"rect\")\n .attr(\"class\", \"overlay\")\n .attr(\"pointer-events\", \"all\")\n .attr(\"cursor\", cursors.overlay)\n .merge(overlay)\n .each(function() {\n var extent = local(this).extent;\n select(this)\n .attr(\"x\", extent[0][0])\n .attr(\"y\", extent[0][1])\n .attr(\"width\", extent[1][0] - extent[0][0])\n .attr(\"height\", extent[1][1] - extent[0][1]);\n });\n\n group.selectAll(\".selection\")\n .data([type(\"selection\")])\n .enter().append(\"rect\")\n .attr(\"class\", \"selection\")\n .attr(\"cursor\", cursors.selection)\n .attr(\"fill\", \"#777\")\n .attr(\"fill-opacity\", 0.3)\n .attr(\"stroke\", \"#fff\")\n .attr(\"shape-rendering\", \"crispEdges\");\n\n var handle = group.selectAll(\".handle\")\n .data(dim.handles, function(d) { return d.type; });\n\n handle.exit().remove();\n\n handle.enter().append(\"rect\")\n .attr(\"class\", function(d) { return \"handle handle--\" + d.type; })\n .attr(\"cursor\", function(d) { return cursors[d.type]; });\n\n group\n .each(redraw)\n .attr(\"fill\", \"none\")\n .attr(\"pointer-events\", \"all\")\n .on(\"mousedown.brush\", started)\n .filter(touchable)\n .on(\"touchstart.brush\", started)\n .on(\"touchmove.brush\", touchmoved)\n .on(\"touchend.brush touchcancel.brush\", touchended)\n .style(\"touch-action\", \"none\")\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n brush.move = function(group, selection, event) {\n if (group.tween) {\n group\n .on(\"start.brush\", function(event) { emitter(this, arguments).beforestart().start(event); })\n .on(\"interrupt.brush end.brush\", function(event) { emitter(this, arguments).end(event); })\n .tween(\"brush\", function() {\n var that = this,\n state = that.__brush,\n emit = emitter(that, arguments),\n selection0 = state.selection,\n selection1 = dim.input(typeof selection === \"function\" ? selection.apply(this, arguments) : selection, state.extent),\n i = interpolate(selection0, selection1);\n\n function tween(t) {\n state.selection = t === 1 && selection1 === null ? null : i(t);\n redraw.call(that);\n emit.brush();\n }\n\n return selection0 !== null && selection1 !== null ? tween : tween(1);\n });\n } else {\n group\n .each(function() {\n var that = this,\n args = arguments,\n state = that.__brush,\n selection1 = dim.input(typeof selection === \"function\" ? selection.apply(that, args) : selection, state.extent),\n emit = emitter(that, args).beforestart();\n\n interrupt(that);\n state.selection = selection1 === null ? null : selection1;\n redraw.call(that);\n emit.start(event).brush(event).end(event);\n });\n }\n };\n\n brush.clear = function(group, event) {\n brush.move(group, null, event);\n };\n\n function redraw() {\n var group = select(this),\n selection = local(this).selection;\n\n if (selection) {\n group.selectAll(\".selection\")\n .style(\"display\", null)\n .attr(\"x\", selection[0][0])\n .attr(\"y\", selection[0][1])\n .attr(\"width\", selection[1][0] - selection[0][0])\n .attr(\"height\", selection[1][1] - selection[0][1]);\n\n group.selectAll(\".handle\")\n .style(\"display\", null)\n .attr(\"x\", function(d) { return d.type[d.type.length - 1] === \"e\" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })\n .attr(\"y\", function(d) { return d.type[0] === \"s\" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })\n .attr(\"width\", function(d) { return d.type === \"n\" || d.type === \"s\" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })\n .attr(\"height\", function(d) { return d.type === \"e\" || d.type === \"w\" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });\n }\n\n else {\n group.selectAll(\".selection,.handle\")\n .style(\"display\", \"none\")\n .attr(\"x\", null)\n .attr(\"y\", null)\n .attr(\"width\", null)\n .attr(\"height\", null);\n }\n }\n\n function emitter(that, args, clean) {\n var emit = that.__brush.emitter;\n return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean);\n }\n\n function Emitter(that, args, clean) {\n this.that = that;\n this.args = args;\n this.state = that.__brush;\n this.active = 0;\n this.clean = clean;\n }\n\n Emitter.prototype = {\n beforestart: function() {\n if (++this.active === 1) this.state.emitter = this, this.starting = true;\n return this;\n },\n start: function(event, mode) {\n if (this.starting) this.starting = false, this.emit(\"start\", event, mode);\n else this.emit(\"brush\", event);\n return this;\n },\n brush: function(event, mode) {\n this.emit(\"brush\", event, mode);\n return this;\n },\n end: function(event, mode) {\n if (--this.active === 0) delete this.state.emitter, this.emit(\"end\", event, mode);\n return this;\n },\n emit: function(type, event, mode) {\n var d = select(this.that).datum();\n listeners.call(\n type,\n this.that,\n new BrushEvent(type, {\n sourceEvent: event,\n target: brush,\n selection: dim.output(this.state.selection),\n mode,\n dispatch: listeners\n }),\n d\n );\n }\n };\n\n function started(event) {\n if (touchending && !event.touches) return;\n if (!filter.apply(this, arguments)) return;\n\n var that = this,\n type = event.target.__data__.type,\n mode = (keys && event.metaKey ? type = \"overlay\" : type) === \"selection\" ? MODE_DRAG : (keys && event.altKey ? MODE_CENTER : MODE_HANDLE),\n signX = dim === Y ? null : signsX[type],\n signY = dim === X ? null : signsY[type],\n state = local(that),\n extent = state.extent,\n selection = state.selection,\n W = extent[0][0], w0, w1,\n N = extent[0][1], n0, n1,\n E = extent[1][0], e0, e1,\n S = extent[1][1], s0, s1,\n dx = 0,\n dy = 0,\n moving,\n shifting = signX && signY && keys && event.shiftKey,\n lockX,\n lockY,\n points = Array.from(event.touches || [event], t => {\n const i = t.identifier;\n t = pointer(t, that);\n t.point0 = t.slice();\n t.identifier = i;\n return t;\n });\n\n interrupt(that);\n var emit = emitter(that, arguments, true).beforestart();\n\n if (type === \"overlay\") {\n if (selection) moving = true;\n const pts = [points[0], points[1] || points[0]];\n state.selection = selection = [[\n w0 = dim === Y ? W : min(pts[0][0], pts[1][0]),\n n0 = dim === X ? N : min(pts[0][1], pts[1][1])\n ], [\n e0 = dim === Y ? E : max(pts[0][0], pts[1][0]),\n s0 = dim === X ? S : max(pts[0][1], pts[1][1])\n ]];\n if (points.length > 1) move(event);\n } else {\n w0 = selection[0][0];\n n0 = selection[0][1];\n e0 = selection[1][0];\n s0 = selection[1][1];\n }\n\n w1 = w0;\n n1 = n0;\n e1 = e0;\n s1 = s0;\n\n var group = select(that)\n .attr(\"pointer-events\", \"none\");\n\n var overlay = group.selectAll(\".overlay\")\n .attr(\"cursor\", cursors[type]);\n\n if (event.touches) {\n emit.moved = moved;\n emit.ended = ended;\n } else {\n var view = select(event.view)\n .on(\"mousemove.brush\", moved, true)\n .on(\"mouseup.brush\", ended, true);\n if (keys) view\n .on(\"keydown.brush\", keydowned, true)\n .on(\"keyup.brush\", keyupped, true)\n\n dragDisable(event.view);\n }\n\n redraw.call(that);\n emit.start(event, mode.name);\n\n function moved(event) {\n for (const p of event.changedTouches || [event]) {\n for (const d of points)\n if (d.identifier === p.identifier) d.cur = pointer(p, that);\n }\n if (shifting && !lockX && !lockY && points.length === 1) {\n const point = points[0];\n if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1]))\n lockY = true;\n else\n lockX = true;\n }\n for (const point of points)\n if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1];\n moving = true;\n noevent(event);\n move(event);\n }\n\n function move(event) {\n const point = points[0], point0 = point.point0;\n var t;\n\n dx = point[0] - point0[0];\n dy = point[1] - point0[1];\n\n switch (mode) {\n case MODE_SPACE:\n case MODE_DRAG: {\n if (signX) dx = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;\n if (signY) dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;\n break;\n }\n case MODE_HANDLE: {\n if (points[1]) {\n if (signX) w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1;\n if (signY) n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1;\n } else {\n if (signX < 0) dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0;\n else if (signX > 0) dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx;\n if (signY < 0) dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0;\n else if (signY > 0) dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy;\n }\n break;\n }\n case MODE_CENTER: {\n if (signX) w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX));\n if (signY) n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, min(S, s0 + dy * signY));\n break;\n }\n }\n\n if (e1 < w1) {\n signX *= -1;\n t = w0, w0 = e0, e0 = t;\n t = w1, w1 = e1, e1 = t;\n if (type in flipX) overlay.attr(\"cursor\", cursors[type = flipX[type]]);\n }\n\n if (s1 < n1) {\n signY *= -1;\n t = n0, n0 = s0, s0 = t;\n t = n1, n1 = s1, s1 = t;\n if (type in flipY) overlay.attr(\"cursor\", cursors[type = flipY[type]]);\n }\n\n if (state.selection) selection = state.selection; // May be set by brush.move!\n if (lockX) w1 = selection[0][0], e1 = selection[1][0];\n if (lockY) n1 = selection[0][1], s1 = selection[1][1];\n\n if (selection[0][0] !== w1\n || selection[0][1] !== n1\n || selection[1][0] !== e1\n || selection[1][1] !== s1) {\n state.selection = [[w1, n1], [e1, s1]];\n redraw.call(that);\n emit.brush(event, mode.name);\n }\n }\n\n function ended(event) {\n nopropagation(event);\n if (event.touches) {\n if (event.touches.length) return;\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n } else {\n dragEnable(event.view, moving);\n view.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\", null);\n }\n group.attr(\"pointer-events\", \"all\");\n overlay.attr(\"cursor\", cursors.overlay);\n if (state.selection) selection = state.selection; // May be set by brush.move (on start)!\n if (empty(selection)) state.selection = null, redraw.call(that);\n emit.end(event, mode.name);\n }\n\n function keydowned(event) {\n switch (event.keyCode) {\n case 16: { // SHIFT\n shifting = signX && signY;\n break;\n }\n case 18: { // ALT\n if (mode === MODE_HANDLE) {\n if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n mode = MODE_CENTER;\n move(event);\n }\n break;\n }\n case 32: { // SPACE; takes priority over ALT\n if (mode === MODE_HANDLE || mode === MODE_CENTER) {\n if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx;\n if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy;\n mode = MODE_SPACE;\n overlay.attr(\"cursor\", cursors.selection);\n move(event);\n }\n break;\n }\n default: return;\n }\n noevent(event);\n }\n\n function keyupped(event) {\n switch (event.keyCode) {\n case 16: { // SHIFT\n if (shifting) {\n lockX = lockY = shifting = false;\n move(event);\n }\n break;\n }\n case 18: { // ALT\n if (mode === MODE_CENTER) {\n if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n mode = MODE_HANDLE;\n move(event);\n }\n break;\n }\n case 32: { // SPACE\n if (mode === MODE_SPACE) {\n if (event.altKey) {\n if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n mode = MODE_CENTER;\n } else {\n if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n mode = MODE_HANDLE;\n }\n overlay.attr(\"cursor\", cursors[type]);\n move(event);\n }\n break;\n }\n default: return;\n }\n noevent(event);\n }\n }\n\n function touchmoved(event) {\n emitter(this, arguments).moved(event);\n }\n\n function touchended(event) {\n emitter(this, arguments).ended(event);\n }\n\n function initialize() {\n var state = this.__brush || {selection: null};\n state.extent = number2(extent.apply(this, arguments));\n state.dim = dim;\n return state;\n }\n\n brush.extent = function(_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant(number2(_)), brush) : extent;\n };\n\n brush.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), brush) : filter;\n };\n\n brush.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), brush) : touchable;\n };\n\n brush.handleSize = function(_) {\n return arguments.length ? (handleSize = +_, brush) : handleSize;\n };\n\n brush.keyModifiers = function(_) {\n return arguments.length ? (keys = !!_, brush) : keys;\n };\n\n brush.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? brush : value;\n };\n\n return brush;\n}\n", "export var abs = Math.abs;\nexport var cos = Math.cos;\nexport var sin = Math.sin;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var tau = pi * 2;\nexport var max = Math.max;\nexport var epsilon = 1e-12;\n", "export var slice = Array.prototype.slice;\n", "var array = Array.prototype;\n\nexport var slice = array.slice;\n", "export const epsilon = 1.1102230246251565e-16;\nexport const splitter = 134217729;\nexport const resulterrbound = (3 + 8 * epsilon) * epsilon;\n\n// fast_expansion_sum_zeroelim routine from oritinal code\nexport function sum(elen, e, flen, f, h) {\n let Q, Qnew, hh, bvirt;\n let enow = e[0];\n let fnow = f[0];\n let eindex = 0;\n let findex = 0;\n if ((fnow > enow) === (fnow > -enow)) {\n Q = enow;\n enow = e[++eindex];\n } else {\n Q = fnow;\n fnow = f[++findex];\n }\n let hindex = 0;\n if (eindex < elen && findex < flen) {\n if ((fnow > enow) === (fnow > -enow)) {\n Qnew = enow + Q;\n hh = Q - (Qnew - enow);\n enow = e[++eindex];\n } else {\n Qnew = fnow + Q;\n hh = Q - (Qnew - fnow);\n fnow = f[++findex];\n }\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n while (eindex < elen && findex < flen) {\n if ((fnow > enow) === (fnow > -enow)) {\n Qnew = Q + enow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (enow - bvirt);\n enow = e[++eindex];\n } else {\n Qnew = Q + fnow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (fnow - bvirt);\n fnow = f[++findex];\n }\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n }\n while (eindex < elen) {\n Qnew = Q + enow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (enow - bvirt);\n enow = e[++eindex];\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n while (findex < flen) {\n Qnew = Q + fnow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (fnow - bvirt);\n fnow = f[++findex];\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n if (Q !== 0 || hindex === 0) {\n h[hindex++] = Q;\n }\n return hindex;\n}\n\nexport function sum_three(alen, a, blen, b, clen, c, tmp, out) {\n return sum(sum(alen, a, blen, b, tmp), tmp, clen, c, out);\n}\n\n// scale_expansion_zeroelim routine from oritinal code\nexport function scale(elen, e, b, h) {\n let Q, sum, hh, product1, product0;\n let bvirt, c, ahi, alo, bhi, blo;\n\n c = splitter * b;\n bhi = c - (c - b);\n blo = b - bhi;\n let enow = e[0];\n Q = enow * b;\n c = splitter * enow;\n ahi = c - (c - enow);\n alo = enow - ahi;\n hh = alo * blo - (Q - ahi * bhi - alo * bhi - ahi * blo);\n let hindex = 0;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n for (let i = 1; i < elen; i++) {\n enow = e[i];\n product1 = enow * b;\n c = splitter * enow;\n ahi = c - (c - enow);\n alo = enow - ahi;\n product0 = alo * blo - (product1 - ahi * bhi - alo * bhi - ahi * blo);\n sum = Q + product0;\n bvirt = sum - Q;\n hh = Q - (sum - bvirt) + (product0 - bvirt);\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n Q = product1 + sum;\n hh = sum - (Q - product1);\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n if (Q !== 0 || hindex === 0) {\n h[hindex++] = Q;\n }\n return hindex;\n}\n\nexport function negate(elen, e) {\n for (let i = 0; i < elen; i++) e[i] = -e[i];\n return elen;\n}\n\nexport function estimate(elen, e) {\n let Q = e[0];\n for (let i = 1; i < elen; i++) Q += e[i];\n return Q;\n}\n\nexport function vec(n) {\n return new Float64Array(n);\n}\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum} from './util.js';\n\nconst ccwerrboundA = (3 + 16 * epsilon) * epsilon;\nconst ccwerrboundB = (2 + 12 * epsilon) * epsilon;\nconst ccwerrboundC = (9 + 64 * epsilon) * epsilon * epsilon;\n\nconst B = vec(4);\nconst C1 = vec(8);\nconst C2 = vec(12);\nconst D = vec(16);\nconst u = vec(4);\n\nfunction orient2dadapt(ax, ay, bx, by, cx, cy, detsum) {\n let acxtail, acytail, bcxtail, bcytail;\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n const acx = ax - cx;\n const bcx = bx - cx;\n const acy = ay - cy;\n const bcy = by - cy;\n\n s1 = acx * bcy;\n c = splitter * acx;\n ahi = c - (c - acx);\n alo = acx - ahi;\n c = splitter * bcy;\n bhi = c - (c - bcy);\n blo = bcy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acy * bcx;\n c = splitter * acy;\n ahi = c - (c - acy);\n alo = acy - ahi;\n c = splitter * bcx;\n bhi = c - (c - bcx);\n blo = bcx - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n B[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n B[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n B[2] = _j - (u3 - bvirt) + (_i - bvirt);\n B[3] = u3;\n\n let det = estimate(4, B);\n let errbound = ccwerrboundB * detsum;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - acx;\n acxtail = ax - (acx + bvirt) + (bvirt - cx);\n bvirt = bx - bcx;\n bcxtail = bx - (bcx + bvirt) + (bvirt - cx);\n bvirt = ay - acy;\n acytail = ay - (acy + bvirt) + (bvirt - cy);\n bvirt = by - bcy;\n bcytail = by - (bcy + bvirt) + (bvirt - cy);\n\n if (acxtail === 0 && acytail === 0 && bcxtail === 0 && bcytail === 0) {\n return det;\n }\n\n errbound = ccwerrboundC * detsum + resulterrbound * Math.abs(det);\n det += (acx * bcytail + bcy * acxtail) - (acy * bcxtail + bcx * acytail);\n if (det >= errbound || -det >= errbound) return det;\n\n s1 = acxtail * bcy;\n c = splitter * acxtail;\n ahi = c - (c - acxtail);\n alo = acxtail - ahi;\n c = splitter * bcy;\n bhi = c - (c - bcy);\n blo = bcy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acytail * bcx;\n c = splitter * acytail;\n ahi = c - (c - acytail);\n alo = acytail - ahi;\n c = splitter * bcx;\n bhi = c - (c - bcx);\n blo = bcx - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const C1len = sum(4, B, 4, u, C1);\n\n s1 = acx * bcytail;\n c = splitter * acx;\n ahi = c - (c - acx);\n alo = acx - ahi;\n c = splitter * bcytail;\n bhi = c - (c - bcytail);\n blo = bcytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acy * bcxtail;\n c = splitter * acy;\n ahi = c - (c - acy);\n alo = acy - ahi;\n c = splitter * bcxtail;\n bhi = c - (c - bcxtail);\n blo = bcxtail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const C2len = sum(C1len, C1, 4, u, C2);\n\n s1 = acxtail * bcytail;\n c = splitter * acxtail;\n ahi = c - (c - acxtail);\n alo = acxtail - ahi;\n c = splitter * bcytail;\n bhi = c - (c - bcytail);\n blo = bcytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acytail * bcxtail;\n c = splitter * acytail;\n ahi = c - (c - acytail);\n alo = acytail - ahi;\n c = splitter * bcxtail;\n bhi = c - (c - bcxtail);\n blo = bcxtail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const Dlen = sum(C2len, C2, 4, u, D);\n\n return D[Dlen - 1];\n}\n\nexport function orient2d(ax, ay, bx, by, cx, cy) {\n const detleft = (ay - cy) * (bx - cx);\n const detright = (ax - cx) * (by - cy);\n const det = detleft - detright;\n\n const detsum = Math.abs(detleft + detright);\n if (Math.abs(det) >= ccwerrboundA * detsum) return det;\n\n return -orient2dadapt(ax, ay, bx, by, cx, cy, detsum);\n}\n\nexport function orient2dfast(ax, ay, bx, by, cx, cy) {\n return (ay - cy) * (bx - cx) - (ax - cx) * (by - cy);\n}\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum, scale} from './util.js';\n\nconst o3derrboundA = (7 + 56 * epsilon) * epsilon;\nconst o3derrboundB = (3 + 28 * epsilon) * epsilon;\nconst o3derrboundC = (26 + 288 * epsilon) * epsilon * epsilon;\n\nconst bc = vec(4);\nconst ca = vec(4);\nconst ab = vec(4);\nconst at_b = vec(4);\nconst at_c = vec(4);\nconst bt_c = vec(4);\nconst bt_a = vec(4);\nconst ct_a = vec(4);\nconst ct_b = vec(4);\nconst bct = vec(8);\nconst cat = vec(8);\nconst abt = vec(8);\nconst u = vec(4);\n\nconst _8 = vec(8);\nconst _8b = vec(8);\nconst _16 = vec(8);\nconst _12 = vec(12);\n\nlet fin = vec(192);\nlet fin2 = vec(192);\n\nfunction finadd(finlen, alen, a) {\n finlen = sum(finlen, fin, alen, a, fin2);\n const tmp = fin; fin = fin2; fin2 = tmp;\n return finlen;\n}\n\nfunction tailinit(xtail, ytail, ax, ay, bx, by, a, b) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3, negate;\n if (xtail === 0) {\n if (ytail === 0) {\n a[0] = 0;\n b[0] = 0;\n return 1;\n } else {\n negate = -ytail;\n s1 = negate * ax;\n c = splitter * negate;\n ahi = c - (c - negate);\n alo = negate - ahi;\n c = splitter * ax;\n bhi = c - (c - ax);\n blo = ax - bhi;\n a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n a[1] = s1;\n s1 = ytail * bx;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * bx;\n bhi = c - (c - bx);\n blo = bx - bhi;\n b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n b[1] = s1;\n return 2;\n }\n } else {\n if (ytail === 0) {\n s1 = xtail * ay;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n a[1] = s1;\n negate = -xtail;\n s1 = negate * by;\n c = splitter * negate;\n ahi = c - (c - negate);\n alo = negate - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n b[1] = s1;\n return 2;\n } else {\n s1 = xtail * ay;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ytail * ax;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * ax;\n bhi = c - (c - ax);\n blo = ax - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n a[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n a[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n a[2] = _j - (u3 - bvirt) + (_i - bvirt);\n a[3] = u3;\n s1 = ytail * bx;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * bx;\n bhi = c - (c - bx);\n blo = bx - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = xtail * by;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n b[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n b[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n b[2] = _j - (u3 - bvirt) + (_i - bvirt);\n b[3] = u3;\n return 4;\n }\n }\n}\n\nfunction tailadd(finlen, a, b, k, z) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, u3;\n s1 = a * b;\n c = splitter * a;\n ahi = c - (c - a);\n alo = a - ahi;\n c = splitter * b;\n bhi = c - (c - b);\n blo = b - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n c = splitter * k;\n bhi = c - (c - k);\n blo = k - bhi;\n _i = s0 * k;\n c = splitter * s0;\n ahi = c - (c - s0);\n alo = s0 - ahi;\n u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo);\n _j = s1 * k;\n c = splitter * s1;\n ahi = c - (c - s1);\n alo = s1 - ahi;\n _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo);\n _k = _i + _0;\n bvirt = _k - _i;\n u[1] = _i - (_k - bvirt) + (_0 - bvirt);\n u3 = _j + _k;\n u[2] = _k - (u3 - _j);\n u[3] = u3;\n finlen = finadd(finlen, 4, u);\n if (z !== 0) {\n c = splitter * z;\n bhi = c - (c - z);\n blo = z - bhi;\n _i = s0 * z;\n c = splitter * s0;\n ahi = c - (c - s0);\n alo = s0 - ahi;\n u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo);\n _j = s1 * z;\n c = splitter * s1;\n ahi = c - (c - s1);\n alo = s1 - ahi;\n _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo);\n _k = _i + _0;\n bvirt = _k - _i;\n u[1] = _i - (_k - bvirt) + (_0 - bvirt);\n u3 = _j + _k;\n u[2] = _k - (u3 - _j);\n u[3] = u3;\n finlen = finadd(finlen, 4, u);\n }\n return finlen;\n}\n\nfunction orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent) {\n let finlen;\n let adxtail, bdxtail, cdxtail;\n let adytail, bdytail, cdytail;\n let adztail, bdztail, cdztail;\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3;\n\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n s1 = bdx * cdy;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * bdy;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cdx * ady;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * cdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ca[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ca[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ca[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ca[3] = u3;\n s1 = adx * bdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * ady;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n\n finlen = sum(\n sum(\n scale(4, bc, adz, _8), _8,\n scale(4, ca, bdz, _8b), _8b, _16), _16,\n scale(4, ab, cdz, _8), _8, fin);\n\n let det = estimate(finlen, fin);\n let errbound = o3derrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - adx;\n adxtail = ax - (adx + bvirt) + (bvirt - dx);\n bvirt = bx - bdx;\n bdxtail = bx - (bdx + bvirt) + (bvirt - dx);\n bvirt = cx - cdx;\n cdxtail = cx - (cdx + bvirt) + (bvirt - dx);\n bvirt = ay - ady;\n adytail = ay - (ady + bvirt) + (bvirt - dy);\n bvirt = by - bdy;\n bdytail = by - (bdy + bvirt) + (bvirt - dy);\n bvirt = cy - cdy;\n cdytail = cy - (cdy + bvirt) + (bvirt - dy);\n bvirt = az - adz;\n adztail = az - (adz + bvirt) + (bvirt - dz);\n bvirt = bz - bdz;\n bdztail = bz - (bdz + bvirt) + (bvirt - dz);\n bvirt = cz - cdz;\n cdztail = cz - (cdz + bvirt) + (bvirt - dz);\n\n if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 &&\n adytail === 0 && bdytail === 0 && cdytail === 0 &&\n adztail === 0 && bdztail === 0 && cdztail === 0) {\n return det;\n }\n\n errbound = o3derrboundC * permanent + resulterrbound * Math.abs(det);\n det +=\n adz * (bdx * cdytail + cdy * bdxtail - (bdy * cdxtail + cdx * bdytail)) + adztail * (bdx * cdy - bdy * cdx) +\n bdz * (cdx * adytail + ady * cdxtail - (cdy * adxtail + adx * cdytail)) + bdztail * (cdx * ady - cdy * adx) +\n cdz * (adx * bdytail + bdy * adxtail - (ady * bdxtail + bdx * adytail)) + cdztail * (adx * bdy - ady * bdx);\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n const at_len = tailinit(adxtail, adytail, bdx, bdy, cdx, cdy, at_b, at_c);\n const bt_len = tailinit(bdxtail, bdytail, cdx, cdy, adx, ady, bt_c, bt_a);\n const ct_len = tailinit(cdxtail, cdytail, adx, ady, bdx, bdy, ct_a, ct_b);\n\n const bctlen = sum(bt_len, bt_c, ct_len, ct_b, bct);\n finlen = finadd(finlen, scale(bctlen, bct, adz, _16), _16);\n\n const catlen = sum(ct_len, ct_a, at_len, at_c, cat);\n finlen = finadd(finlen, scale(catlen, cat, bdz, _16), _16);\n\n const abtlen = sum(at_len, at_b, bt_len, bt_a, abt);\n finlen = finadd(finlen, scale(abtlen, abt, cdz, _16), _16);\n\n if (adztail !== 0) {\n finlen = finadd(finlen, scale(4, bc, adztail, _12), _12);\n finlen = finadd(finlen, scale(bctlen, bct, adztail, _16), _16);\n }\n if (bdztail !== 0) {\n finlen = finadd(finlen, scale(4, ca, bdztail, _12), _12);\n finlen = finadd(finlen, scale(catlen, cat, bdztail, _16), _16);\n }\n if (cdztail !== 0) {\n finlen = finadd(finlen, scale(4, ab, cdztail, _12), _12);\n finlen = finadd(finlen, scale(abtlen, abt, cdztail, _16), _16);\n }\n\n if (adxtail !== 0) {\n if (bdytail !== 0) {\n finlen = tailadd(finlen, adxtail, bdytail, cdz, cdztail);\n }\n if (cdytail !== 0) {\n finlen = tailadd(finlen, -adxtail, cdytail, bdz, bdztail);\n }\n }\n if (bdxtail !== 0) {\n if (cdytail !== 0) {\n finlen = tailadd(finlen, bdxtail, cdytail, adz, adztail);\n }\n if (adytail !== 0) {\n finlen = tailadd(finlen, -bdxtail, adytail, cdz, cdztail);\n }\n }\n if (cdxtail !== 0) {\n if (adytail !== 0) {\n finlen = tailadd(finlen, cdxtail, adytail, bdz, bdztail);\n }\n if (bdytail !== 0) {\n finlen = tailadd(finlen, -cdxtail, bdytail, adz, adztail);\n }\n }\n\n return fin[finlen - 1];\n}\n\nexport function orient3d(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n const bdxcdy = bdx * cdy;\n const cdxbdy = cdx * bdy;\n\n const cdxady = cdx * ady;\n const adxcdy = adx * cdy;\n\n const adxbdy = adx * bdy;\n const bdxady = bdx * ady;\n\n const det =\n adz * (bdxcdy - cdxbdy) +\n bdz * (cdxady - adxcdy) +\n cdz * (adxbdy - bdxady);\n\n const permanent =\n (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * Math.abs(adz) +\n (Math.abs(cdxady) + Math.abs(adxcdy)) * Math.abs(bdz) +\n (Math.abs(adxbdy) + Math.abs(bdxady)) * Math.abs(cdz);\n\n const errbound = o3derrboundA * permanent;\n if (det > errbound || -det > errbound) {\n return det;\n }\n\n return orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent);\n}\n\nexport function orient3dfast(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n return adx * (bdy * cdz - bdz * cdy) +\n bdx * (cdy * adz - cdz * ady) +\n cdx * (ady * bdz - adz * bdy);\n}\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum, sum_three, scale} from './util.js';\n\nconst iccerrboundA = (10 + 96 * epsilon) * epsilon;\nconst iccerrboundB = (4 + 48 * epsilon) * epsilon;\nconst iccerrboundC = (44 + 576 * epsilon) * epsilon * epsilon;\n\nconst bc = vec(4);\nconst ca = vec(4);\nconst ab = vec(4);\nconst aa = vec(4);\nconst bb = vec(4);\nconst cc = vec(4);\nconst u = vec(4);\nconst v = vec(4);\nconst axtbc = vec(8);\nconst aytbc = vec(8);\nconst bxtca = vec(8);\nconst bytca = vec(8);\nconst cxtab = vec(8);\nconst cytab = vec(8);\nconst abt = vec(8);\nconst bct = vec(8);\nconst cat = vec(8);\nconst abtt = vec(4);\nconst bctt = vec(4);\nconst catt = vec(4);\n\nconst _8 = vec(8);\nconst _16 = vec(16);\nconst _16b = vec(16);\nconst _16c = vec(16);\nconst _32 = vec(32);\nconst _32b = vec(32);\nconst _48 = vec(48);\nconst _64 = vec(64);\n\nlet fin = vec(1152);\nlet fin2 = vec(1152);\n\nfunction finadd(finlen, a, alen) {\n finlen = sum(finlen, fin, a, alen, fin2);\n const tmp = fin; fin = fin2; fin2 = tmp;\n return finlen;\n}\n\nfunction incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent) {\n let finlen;\n let adxtail, bdxtail, cdxtail, adytail, bdytail, cdytail;\n let axtbclen, aytbclen, bxtcalen, bytcalen, cxtablen, cytablen;\n let abtlen, bctlen, catlen;\n let abttlen, bcttlen, cattlen;\n let n1, n0;\n\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n\n s1 = bdx * cdy;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * bdy;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cdx * ady;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * cdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ca[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ca[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ca[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ca[3] = u3;\n s1 = adx * bdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * ady;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n\n finlen = sum(\n sum(\n sum(\n scale(scale(4, bc, adx, _8), _8, adx, _16), _16,\n scale(scale(4, bc, ady, _8), _8, ady, _16b), _16b, _32), _32,\n sum(\n scale(scale(4, ca, bdx, _8), _8, bdx, _16), _16,\n scale(scale(4, ca, bdy, _8), _8, bdy, _16b), _16b, _32b), _32b, _64), _64,\n sum(\n scale(scale(4, ab, cdx, _8), _8, cdx, _16), _16,\n scale(scale(4, ab, cdy, _8), _8, cdy, _16b), _16b, _32), _32, fin);\n\n let det = estimate(finlen, fin);\n let errbound = iccerrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - adx;\n adxtail = ax - (adx + bvirt) + (bvirt - dx);\n bvirt = ay - ady;\n adytail = ay - (ady + bvirt) + (bvirt - dy);\n bvirt = bx - bdx;\n bdxtail = bx - (bdx + bvirt) + (bvirt - dx);\n bvirt = by - bdy;\n bdytail = by - (bdy + bvirt) + (bvirt - dy);\n bvirt = cx - cdx;\n cdxtail = cx - (cdx + bvirt) + (bvirt - dx);\n bvirt = cy - cdy;\n cdytail = cy - (cdy + bvirt) + (bvirt - dy);\n if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 && adytail === 0 && bdytail === 0 && cdytail === 0) {\n return det;\n }\n\n errbound = iccerrboundC * permanent + resulterrbound * Math.abs(det);\n det += ((adx * adx + ady * ady) * ((bdx * cdytail + cdy * bdxtail) - (bdy * cdxtail + cdx * bdytail)) +\n 2 * (adx * adxtail + ady * adytail) * (bdx * cdy - bdy * cdx)) +\n ((bdx * bdx + bdy * bdy) * ((cdx * adytail + ady * cdxtail) - (cdy * adxtail + adx * cdytail)) +\n 2 * (bdx * bdxtail + bdy * bdytail) * (cdx * ady - cdy * adx)) +\n ((cdx * cdx + cdy * cdy) * ((adx * bdytail + bdy * adxtail) - (ady * bdxtail + bdx * adytail)) +\n 2 * (cdx * cdxtail + cdy * cdytail) * (adx * bdy - ady * bdx));\n\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) {\n s1 = adx * adx;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = ady * ady;\n c = splitter * ady;\n ahi = c - (c - ady);\n alo = ady - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n aa[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n aa[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n aa[2] = _j - (u3 - bvirt) + (_i - bvirt);\n aa[3] = u3;\n }\n if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) {\n s1 = bdx * bdx;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = bdy * bdy;\n c = splitter * bdy;\n ahi = c - (c - bdy);\n alo = bdy - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n bb[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n bb[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bb[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bb[3] = u3;\n }\n if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) {\n s1 = cdx * cdx;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = cdy * cdy;\n c = splitter * cdy;\n ahi = c - (c - cdy);\n alo = cdy - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n cc[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n cc[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n cc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n cc[3] = u3;\n }\n\n if (adxtail !== 0) {\n axtbclen = scale(4, bc, adxtail, axtbc);\n finlen = finadd(finlen, sum_three(\n scale(axtbclen, axtbc, 2 * adx, _16), _16,\n scale(scale(4, cc, adxtail, _8), _8, bdy, _16b), _16b,\n scale(scale(4, bb, adxtail, _8), _8, -cdy, _16c), _16c, _32, _48), _48);\n }\n if (adytail !== 0) {\n aytbclen = scale(4, bc, adytail, aytbc);\n finlen = finadd(finlen, sum_three(\n scale(aytbclen, aytbc, 2 * ady, _16), _16,\n scale(scale(4, bb, adytail, _8), _8, cdx, _16b), _16b,\n scale(scale(4, cc, adytail, _8), _8, -bdx, _16c), _16c, _32, _48), _48);\n }\n if (bdxtail !== 0) {\n bxtcalen = scale(4, ca, bdxtail, bxtca);\n finlen = finadd(finlen, sum_three(\n scale(bxtcalen, bxtca, 2 * bdx, _16), _16,\n scale(scale(4, aa, bdxtail, _8), _8, cdy, _16b), _16b,\n scale(scale(4, cc, bdxtail, _8), _8, -ady, _16c), _16c, _32, _48), _48);\n }\n if (bdytail !== 0) {\n bytcalen = scale(4, ca, bdytail, bytca);\n finlen = finadd(finlen, sum_three(\n scale(bytcalen, bytca, 2 * bdy, _16), _16,\n scale(scale(4, cc, bdytail, _8), _8, adx, _16b), _16b,\n scale(scale(4, aa, bdytail, _8), _8, -cdx, _16c), _16c, _32, _48), _48);\n }\n if (cdxtail !== 0) {\n cxtablen = scale(4, ab, cdxtail, cxtab);\n finlen = finadd(finlen, sum_three(\n scale(cxtablen, cxtab, 2 * cdx, _16), _16,\n scale(scale(4, bb, cdxtail, _8), _8, ady, _16b), _16b,\n scale(scale(4, aa, cdxtail, _8), _8, -bdy, _16c), _16c, _32, _48), _48);\n }\n if (cdytail !== 0) {\n cytablen = scale(4, ab, cdytail, cytab);\n finlen = finadd(finlen, sum_three(\n scale(cytablen, cytab, 2 * cdy, _16), _16,\n scale(scale(4, aa, cdytail, _8), _8, bdx, _16b), _16b,\n scale(scale(4, bb, cdytail, _8), _8, -adx, _16c), _16c, _32, _48), _48);\n }\n\n if (adxtail !== 0 || adytail !== 0) {\n if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) {\n s1 = bdxtail * cdy;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * cdytail;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n s1 = cdxtail * -bdy;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * -bdy;\n bhi = c - (c - -bdy);\n blo = -bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * -bdytail;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * -bdytail;\n bhi = c - (c - -bdytail);\n blo = -bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n bctlen = sum(4, u, 4, v, bct);\n s1 = bdxtail * cdytail;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdxtail * bdytail;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bctt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bctt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bctt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bctt[3] = u3;\n bcttlen = 4;\n } else {\n bct[0] = 0;\n bctlen = 1;\n bctt[0] = 0;\n bcttlen = 1;\n }\n if (adxtail !== 0) {\n const len = scale(bctlen, bct, adxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(axtbclen, axtbc, adxtail, _16), _16,\n scale(len, _16c, 2 * adx, _32), _32, _48), _48);\n\n const len2 = scale(bcttlen, bctt, adxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * adx, _16), _16,\n scale(len2, _8, adxtail, _16b), _16b,\n scale(len, _16c, adxtail, _32), _32, _32b, _64), _64);\n\n if (bdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, cc, adxtail, _8), _8, bdytail, _16), _16);\n }\n if (cdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, bb, -adxtail, _8), _8, cdytail, _16), _16);\n }\n }\n if (adytail !== 0) {\n const len = scale(bctlen, bct, adytail, _16c);\n finlen = finadd(finlen, sum(\n scale(aytbclen, aytbc, adytail, _16), _16,\n scale(len, _16c, 2 * ady, _32), _32, _48), _48);\n\n const len2 = scale(bcttlen, bctt, adytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * ady, _16), _16,\n scale(len2, _8, adytail, _16b), _16b,\n scale(len, _16c, adytail, _32), _32, _32b, _64), _64);\n }\n }\n if (bdxtail !== 0 || bdytail !== 0) {\n if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) {\n s1 = cdxtail * ady;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * adytail;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n n1 = -cdy;\n n0 = -cdytail;\n s1 = adxtail * n1;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * n1;\n bhi = c - (c - n1);\n blo = n1 - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * n0;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * n0;\n bhi = c - (c - n0);\n blo = n0 - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n catlen = sum(4, u, 4, v, cat);\n s1 = cdxtail * adytail;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adxtail * cdytail;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n catt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n catt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n catt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n catt[3] = u3;\n cattlen = 4;\n } else {\n cat[0] = 0;\n catlen = 1;\n catt[0] = 0;\n cattlen = 1;\n }\n if (bdxtail !== 0) {\n const len = scale(catlen, cat, bdxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(bxtcalen, bxtca, bdxtail, _16), _16,\n scale(len, _16c, 2 * bdx, _32), _32, _48), _48);\n\n const len2 = scale(cattlen, catt, bdxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * bdx, _16), _16,\n scale(len2, _8, bdxtail, _16b), _16b,\n scale(len, _16c, bdxtail, _32), _32, _32b, _64), _64);\n\n if (cdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, aa, bdxtail, _8), _8, cdytail, _16), _16);\n }\n if (adytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, cc, -bdxtail, _8), _8, adytail, _16), _16);\n }\n }\n if (bdytail !== 0) {\n const len = scale(catlen, cat, bdytail, _16c);\n finlen = finadd(finlen, sum(\n scale(bytcalen, bytca, bdytail, _16), _16,\n scale(len, _16c, 2 * bdy, _32), _32, _48), _48);\n\n const len2 = scale(cattlen, catt, bdytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * bdy, _16), _16,\n scale(len2, _8, bdytail, _16b), _16b,\n scale(len, _16c, bdytail, _32), _32, _32b, _64), _64);\n }\n }\n if (cdxtail !== 0 || cdytail !== 0) {\n if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) {\n s1 = adxtail * bdy;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * bdytail;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n n1 = -ady;\n n0 = -adytail;\n s1 = bdxtail * n1;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * n1;\n bhi = c - (c - n1);\n blo = n1 - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * n0;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * n0;\n bhi = c - (c - n0);\n blo = n0 - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n abtlen = sum(4, u, 4, v, abt);\n s1 = adxtail * bdytail;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdxtail * adytail;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n abtt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n abtt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n abtt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n abtt[3] = u3;\n abttlen = 4;\n } else {\n abt[0] = 0;\n abtlen = 1;\n abtt[0] = 0;\n abttlen = 1;\n }\n if (cdxtail !== 0) {\n const len = scale(abtlen, abt, cdxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(cxtablen, cxtab, cdxtail, _16), _16,\n scale(len, _16c, 2 * cdx, _32), _32, _48), _48);\n\n const len2 = scale(abttlen, abtt, cdxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * cdx, _16), _16,\n scale(len2, _8, cdxtail, _16b), _16b,\n scale(len, _16c, cdxtail, _32), _32, _32b, _64), _64);\n\n if (adytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, bb, cdxtail, _8), _8, adytail, _16), _16);\n }\n if (bdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, aa, -cdxtail, _8), _8, bdytail, _16), _16);\n }\n }\n if (cdytail !== 0) {\n const len = scale(abtlen, abt, cdytail, _16c);\n finlen = finadd(finlen, sum(\n scale(cytablen, cytab, cdytail, _16), _16,\n scale(len, _16c, 2 * cdy, _32), _32, _48), _48);\n\n const len2 = scale(abttlen, abtt, cdytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * cdy, _16), _16,\n scale(len2, _8, cdytail, _16b), _16b,\n scale(len, _16c, cdytail, _32), _32, _32b, _64), _64);\n }\n }\n\n return fin[finlen - 1];\n}\n\nexport function incircle(ax, ay, bx, by, cx, cy, dx, dy) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n\n const bdxcdy = bdx * cdy;\n const cdxbdy = cdx * bdy;\n const alift = adx * adx + ady * ady;\n\n const cdxady = cdx * ady;\n const adxcdy = adx * cdy;\n const blift = bdx * bdx + bdy * bdy;\n\n const adxbdy = adx * bdy;\n const bdxady = bdx * ady;\n const clift = cdx * cdx + cdy * cdy;\n\n const det =\n alift * (bdxcdy - cdxbdy) +\n blift * (cdxady - adxcdy) +\n clift * (adxbdy - bdxady);\n\n const permanent =\n (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * alift +\n (Math.abs(cdxady) + Math.abs(adxcdy)) * blift +\n (Math.abs(adxbdy) + Math.abs(bdxady)) * clift;\n\n const errbound = iccerrboundA * permanent;\n\n if (det > errbound || -det > errbound) {\n return det;\n }\n return incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent);\n}\n\nexport function incirclefast(ax, ay, bx, by, cx, cy, dx, dy) {\n const adx = ax - dx;\n const ady = ay - dy;\n const bdx = bx - dx;\n const bdy = by - dy;\n const cdx = cx - dx;\n const cdy = cy - dy;\n\n const abdet = adx * bdy - bdx * ady;\n const bcdet = bdx * cdy - cdx * bdy;\n const cadet = cdx * ady - adx * cdy;\n const alift = adx * adx + ady * ady;\n const blift = bdx * bdx + bdy * bdy;\n const clift = cdx * cdx + cdy * cdy;\n\n return alift * bcdet + blift * cadet + clift * abdet;\n}\n", "import {epsilon, splitter, resulterrbound, estimate, vec, sum, sum_three, scale, negate} from './util.js';\n\nconst isperrboundA = (16 + 224 * epsilon) * epsilon;\nconst isperrboundB = (5 + 72 * epsilon) * epsilon;\nconst isperrboundC = (71 + 1408 * epsilon) * epsilon * epsilon;\n\nconst ab = vec(4);\nconst bc = vec(4);\nconst cd = vec(4);\nconst de = vec(4);\nconst ea = vec(4);\nconst ac = vec(4);\nconst bd = vec(4);\nconst ce = vec(4);\nconst da = vec(4);\nconst eb = vec(4);\n\nconst abc = vec(24);\nconst bcd = vec(24);\nconst cde = vec(24);\nconst dea = vec(24);\nconst eab = vec(24);\nconst abd = vec(24);\nconst bce = vec(24);\nconst cda = vec(24);\nconst deb = vec(24);\nconst eac = vec(24);\n\nconst adet = vec(1152);\nconst bdet = vec(1152);\nconst cdet = vec(1152);\nconst ddet = vec(1152);\nconst edet = vec(1152);\nconst abdet = vec(2304);\nconst cddet = vec(2304);\nconst cdedet = vec(3456);\nconst deter = vec(5760);\n\nconst _8 = vec(8);\nconst _8b = vec(8);\nconst _8c = vec(8);\nconst _16 = vec(16);\nconst _24 = vec(24);\nconst _48 = vec(48);\nconst _48b = vec(48);\nconst _96 = vec(96);\nconst _192 = vec(192);\nconst _384x = vec(384);\nconst _384y = vec(384);\nconst _384z = vec(384);\nconst _768 = vec(768);\n\nfunction sum_three_scale(a, b, c, az, bz, cz, out) {\n return sum_three(\n scale(4, a, az, _8), _8,\n scale(4, b, bz, _8b), _8b,\n scale(4, c, cz, _8c), _8c, _16, out);\n}\n\nfunction liftexact(alen, a, blen, b, clen, c, dlen, d, x, y, z, out) {\n const len = sum(\n sum(alen, a, blen, b, _48), _48,\n negate(sum(clen, c, dlen, d, _48b), _48b), _48b, _96);\n\n return sum_three(\n scale(scale(len, _96, x, _192), _192, x, _384x), _384x,\n scale(scale(len, _96, y, _192), _192, y, _384y), _384y,\n scale(scale(len, _96, z, _192), _192, z, _384z), _384z, _768, out);\n}\n\nfunction insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n s1 = ax * by;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bx * ay;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n s1 = bx * cy;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cx * by;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cx * dy;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dx * cy;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n cd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n cd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n cd[2] = _j - (u3 - bvirt) + (_i - bvirt);\n cd[3] = u3;\n s1 = dx * ey;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ex * dy;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n de[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n de[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n de[2] = _j - (u3 - bvirt) + (_i - bvirt);\n de[3] = u3;\n s1 = ex * ay;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ax * ey;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ea[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ea[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ea[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ea[3] = u3;\n s1 = ax * cy;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cx * ay;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ac[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ac[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ac[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ac[3] = u3;\n s1 = bx * dy;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dx * by;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bd[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bd[3] = u3;\n s1 = cx * ey;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ex * cy;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ce[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ce[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ce[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ce[3] = u3;\n s1 = dx * ay;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ax * dy;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n da[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n da[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n da[2] = _j - (u3 - bvirt) + (_i - bvirt);\n da[3] = u3;\n s1 = ex * by;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bx * ey;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n eb[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n eb[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n eb[2] = _j - (u3 - bvirt) + (_i - bvirt);\n eb[3] = u3;\n\n const abclen = sum_three_scale(ab, bc, ac, cz, az, -bz, abc);\n const bcdlen = sum_three_scale(bc, cd, bd, dz, bz, -cz, bcd);\n const cdelen = sum_three_scale(cd, de, ce, ez, cz, -dz, cde);\n const dealen = sum_three_scale(de, ea, da, az, dz, -ez, dea);\n const eablen = sum_three_scale(ea, ab, eb, bz, ez, -az, eab);\n const abdlen = sum_three_scale(ab, bd, da, dz, az, bz, abd);\n const bcelen = sum_three_scale(bc, ce, eb, ez, bz, cz, bce);\n const cdalen = sum_three_scale(cd, da, ac, az, cz, dz, cda);\n const deblen = sum_three_scale(de, eb, bd, bz, dz, ez, deb);\n const eaclen = sum_three_scale(ea, ac, ce, cz, ez, az, eac);\n\n const deterlen = sum_three(\n liftexact(cdelen, cde, bcelen, bce, deblen, deb, bcdlen, bcd, ax, ay, az, adet), adet,\n liftexact(dealen, dea, cdalen, cda, eaclen, eac, cdelen, cde, bx, by, bz, bdet), bdet,\n sum_three(\n liftexact(eablen, eab, deblen, deb, abdlen, abd, dealen, dea, cx, cy, cz, cdet), cdet,\n liftexact(abclen, abc, eaclen, eac, bcelen, bce, eablen, eab, dx, dy, dz, ddet), ddet,\n liftexact(bcdlen, bcd, abdlen, abd, cdalen, cda, abclen, abc, ex, ey, ez, edet), edet, cddet, cdedet), cdedet, abdet, deter);\n\n return deter[deterlen - 1];\n}\n\nconst xdet = vec(96);\nconst ydet = vec(96);\nconst zdet = vec(96);\nconst fin = vec(1152);\n\nfunction liftadapt(a, b, c, az, bz, cz, x, y, z, out) {\n const len = sum_three_scale(a, b, c, az, bz, cz, _24);\n return sum_three(\n scale(scale(len, _24, x, _48), _48, x, xdet), xdet,\n scale(scale(len, _24, y, _48), _48, y, ydet), ydet,\n scale(scale(len, _24, z, _48), _48, z, zdet), zdet, _192, out);\n}\n\nfunction insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent) {\n let ab3, bc3, cd3, da3, ac3, bd3;\n\n let aextail, bextail, cextail, dextail;\n let aeytail, beytail, ceytail, deytail;\n let aeztail, beztail, ceztail, deztail;\n\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0;\n\n const aex = ax - ex;\n const bex = bx - ex;\n const cex = cx - ex;\n const dex = dx - ex;\n const aey = ay - ey;\n const bey = by - ey;\n const cey = cy - ey;\n const dey = dy - ey;\n const aez = az - ez;\n const bez = bz - ez;\n const cez = cz - ez;\n const dez = dz - ez;\n\n s1 = aex * bey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bex * aey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n ab3 = _j + _i;\n bvirt = ab3 - _j;\n ab[2] = _j - (ab3 - bvirt) + (_i - bvirt);\n ab[3] = ab3;\n s1 = bex * cey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cex * bey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n bc3 = _j + _i;\n bvirt = bc3 - _j;\n bc[2] = _j - (bc3 - bvirt) + (_i - bvirt);\n bc[3] = bc3;\n s1 = cex * dey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dex * cey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n cd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n cd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n cd3 = _j + _i;\n bvirt = cd3 - _j;\n cd[2] = _j - (cd3 - bvirt) + (_i - bvirt);\n cd[3] = cd3;\n s1 = dex * aey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = aex * dey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n da[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n da[1] = _0 - (_i + bvirt) + (bvirt - t1);\n da3 = _j + _i;\n bvirt = da3 - _j;\n da[2] = _j - (da3 - bvirt) + (_i - bvirt);\n da[3] = da3;\n s1 = aex * cey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cex * aey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ac[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ac[1] = _0 - (_i + bvirt) + (bvirt - t1);\n ac3 = _j + _i;\n bvirt = ac3 - _j;\n ac[2] = _j - (ac3 - bvirt) + (_i - bvirt);\n ac[3] = ac3;\n s1 = bex * dey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dex * bey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n bd3 = _j + _i;\n bvirt = bd3 - _j;\n bd[2] = _j - (bd3 - bvirt) + (_i - bvirt);\n bd[3] = bd3;\n\n const finlen = sum(\n sum(\n negate(liftadapt(bc, cd, bd, dez, bez, -cez, aex, aey, aez, adet), adet), adet,\n liftadapt(cd, da, ac, aez, cez, dez, bex, bey, bez, bdet), bdet, abdet), abdet,\n sum(\n negate(liftadapt(da, ab, bd, bez, dez, aez, cex, cey, cez, cdet), cdet), cdet,\n liftadapt(ab, bc, ac, cez, aez, -bez, dex, dey, dez, ddet), ddet, cddet), cddet, fin);\n\n let det = estimate(finlen, fin);\n let errbound = isperrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - aex;\n aextail = ax - (aex + bvirt) + (bvirt - ex);\n bvirt = ay - aey;\n aeytail = ay - (aey + bvirt) + (bvirt - ey);\n bvirt = az - aez;\n aeztail = az - (aez + bvirt) + (bvirt - ez);\n bvirt = bx - bex;\n bextail = bx - (bex + bvirt) + (bvirt - ex);\n bvirt = by - bey;\n beytail = by - (bey + bvirt) + (bvirt - ey);\n bvirt = bz - bez;\n beztail = bz - (bez + bvirt) + (bvirt - ez);\n bvirt = cx - cex;\n cextail = cx - (cex + bvirt) + (bvirt - ex);\n bvirt = cy - cey;\n ceytail = cy - (cey + bvirt) + (bvirt - ey);\n bvirt = cz - cez;\n ceztail = cz - (cez + bvirt) + (bvirt - ez);\n bvirt = dx - dex;\n dextail = dx - (dex + bvirt) + (bvirt - ex);\n bvirt = dy - dey;\n deytail = dy - (dey + bvirt) + (bvirt - ey);\n bvirt = dz - dez;\n deztail = dz - (dez + bvirt) + (bvirt - ez);\n if (aextail === 0 && aeytail === 0 && aeztail === 0 &&\n bextail === 0 && beytail === 0 && beztail === 0 &&\n cextail === 0 && ceytail === 0 && ceztail === 0 &&\n dextail === 0 && deytail === 0 && deztail === 0) {\n return det;\n }\n\n errbound = isperrboundC * permanent + resulterrbound * Math.abs(det);\n\n const abeps = (aex * beytail + bey * aextail) - (aey * bextail + bex * aeytail);\n const bceps = (bex * ceytail + cey * bextail) - (bey * cextail + cex * beytail);\n const cdeps = (cex * deytail + dey * cextail) - (cey * dextail + dex * ceytail);\n const daeps = (dex * aeytail + aey * dextail) - (dey * aextail + aex * deytail);\n const aceps = (aex * ceytail + cey * aextail) - (aey * cextail + cex * aeytail);\n const bdeps = (bex * deytail + dey * bextail) - (bey * dextail + dex * beytail);\n det +=\n (((bex * bex + bey * bey + bez * bez) * ((cez * daeps + dez * aceps + aez * cdeps) +\n (ceztail * da3 + deztail * ac3 + aeztail * cd3)) + (dex * dex + dey * dey + dez * dez) *\n ((aez * bceps - bez * aceps + cez * abeps) + (aeztail * bc3 - beztail * ac3 + ceztail * ab3))) -\n ((aex * aex + aey * aey + aez * aez) * ((bez * cdeps - cez * bdeps + dez * bceps) +\n (beztail * cd3 - ceztail * bd3 + deztail * bc3)) + (cex * cex + cey * cey + cez * cez) *\n ((dez * abeps + aez * bdeps + bez * daeps) + (deztail * ab3 + aeztail * bd3 + beztail * da3)))) +\n 2 * (((bex * bextail + bey * beytail + bez * beztail) * (cez * da3 + dez * ac3 + aez * cd3) +\n (dex * dextail + dey * deytail + dez * deztail) * (aez * bc3 - bez * ac3 + cez * ab3)) -\n ((aex * aextail + aey * aeytail + aez * aeztail) * (bez * cd3 - cez * bd3 + dez * bc3) +\n (cex * cextail + cey * ceytail + cez * ceztail) * (dez * ab3 + aez * bd3 + bez * da3)));\n\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n return insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez);\n}\n\nexport function insphere(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) {\n const aex = ax - ex;\n const bex = bx - ex;\n const cex = cx - ex;\n const dex = dx - ex;\n const aey = ay - ey;\n const bey = by - ey;\n const cey = cy - ey;\n const dey = dy - ey;\n const aez = az - ez;\n const bez = bz - ez;\n const cez = cz - ez;\n const dez = dz - ez;\n\n const aexbey = aex * bey;\n const bexaey = bex * aey;\n const ab = aexbey - bexaey;\n const bexcey = bex * cey;\n const cexbey = cex * bey;\n const bc = bexcey - cexbey;\n const cexdey = cex * dey;\n const dexcey = dex * cey;\n const cd = cexdey - dexcey;\n const dexaey = dex * aey;\n const aexdey = aex * dey;\n const da = dexaey - aexdey;\n const aexcey = aex * cey;\n const cexaey = cex * aey;\n const ac = aexcey - cexaey;\n const bexdey = bex * dey;\n const dexbey = dex * bey;\n const bd = bexdey - dexbey;\n\n const alift = aex * aex + aey * aey + aez * aez;\n const blift = bex * bex + bey * bey + bez * bez;\n const clift = cex * cex + cey * cey + cez * cez;\n const dlift = dex * dex + dey * dey + dez * dez;\n\n const det =\n (clift * (dez * ab + aez * bd + bez * da) - dlift * (aez * bc - bez * ac + cez * ab)) +\n (alift * (bez * cd - cez * bd + dez * bc) - blift * (cez * da + dez * ac + aez * cd));\n\n const aezplus = Math.abs(aez);\n const bezplus = Math.abs(bez);\n const cezplus = Math.abs(cez);\n const dezplus = Math.abs(dez);\n const aexbeyplus = Math.abs(aexbey) + Math.abs(bexaey);\n const bexceyplus = Math.abs(bexcey) + Math.abs(cexbey);\n const cexdeyplus = Math.abs(cexdey) + Math.abs(dexcey);\n const dexaeyplus = Math.abs(dexaey) + Math.abs(aexdey);\n const aexceyplus = Math.abs(aexcey) + Math.abs(cexaey);\n const bexdeyplus = Math.abs(bexdey) + Math.abs(dexbey);\n const permanent =\n (cexdeyplus * bezplus + bexdeyplus * cezplus + bexceyplus * dezplus) * alift +\n (dexaeyplus * cezplus + aexceyplus * dezplus + cexdeyplus * aezplus) * blift +\n (aexbeyplus * dezplus + bexdeyplus * aezplus + dexaeyplus * bezplus) * clift +\n (bexceyplus * aezplus + aexceyplus * bezplus + aexbeyplus * cezplus) * dlift;\n\n const errbound = isperrboundA * permanent;\n if (det > errbound || -det > errbound) {\n return det;\n }\n return -insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent);\n}\n\nexport function inspherefast(pax, pay, paz, pbx, pby, pbz, pcx, pcy, pcz, pdx, pdy, pdz, pex, pey, pez) {\n const aex = pax - pex;\n const bex = pbx - pex;\n const cex = pcx - pex;\n const dex = pdx - pex;\n const aey = pay - pey;\n const bey = pby - pey;\n const cey = pcy - pey;\n const dey = pdy - pey;\n const aez = paz - pez;\n const bez = pbz - pez;\n const cez = pcz - pez;\n const dez = pdz - pez;\n\n const ab = aex * bey - bex * aey;\n const bc = bex * cey - cex * bey;\n const cd = cex * dey - dex * cey;\n const da = dex * aey - aex * dey;\n const ac = aex * cey - cex * aey;\n const bd = bex * dey - dex * bey;\n\n const abc = aez * bc - bez * ac + cez * ab;\n const bcd = bez * cd - cez * bd + dez * bc;\n const cda = cez * da + dez * ac + aez * cd;\n const dab = dez * ab + aez * bd + bez * da;\n\n const alift = aex * aex + aey * aey + aez * aez;\n const blift = bex * bex + bey * bey + bez * bez;\n const clift = cex * cex + cey * cey + cez * cez;\n const dlift = dex * dex + dey * dey + dez * dez;\n\n return (clift * dab - dlift * abc) + (alift * bcd - blift * cda);\n}\n", "\nconst EPSILON = Math.pow(2, -52);\nconst EDGE_STACK = new Uint32Array(512);\n\nimport {orient2d} from 'robust-predicates';\n\nexport default class Delaunator {\n\n static from(points, getX = defaultGetX, getY = defaultGetY) {\n const n = points.length;\n const coords = new Float64Array(n * 2);\n\n for (let i = 0; i < n; i++) {\n const p = points[i];\n coords[2 * i] = getX(p);\n coords[2 * i + 1] = getY(p);\n }\n\n return new Delaunator(coords);\n }\n\n constructor(coords) {\n const n = coords.length >> 1;\n if (n > 0 && typeof coords[0] !== 'number') throw new Error('Expected coords to contain numbers.');\n\n this.coords = coords;\n\n // arrays that will store the triangulation graph\n const maxTriangles = Math.max(2 * n - 5, 0);\n this._triangles = new Uint32Array(maxTriangles * 3);\n this._halfedges = new Int32Array(maxTriangles * 3);\n\n // temporary arrays for tracking the edges of the advancing convex hull\n this._hashSize = Math.ceil(Math.sqrt(n));\n this._hullPrev = new Uint32Array(n); // edge to prev edge\n this._hullNext = new Uint32Array(n); // edge to next edge\n this._hullTri = new Uint32Array(n); // edge to adjacent triangle\n this._hullHash = new Int32Array(this._hashSize).fill(-1); // angular edge hash\n\n // temporary arrays for sorting points\n this._ids = new Uint32Array(n);\n this._dists = new Float64Array(n);\n\n this.update();\n }\n\n update() {\n const {coords, _hullPrev: hullPrev, _hullNext: hullNext, _hullTri: hullTri, _hullHash: hullHash} = this;\n const n = coords.length >> 1;\n\n // populate an array of point indices; calculate input data bbox\n let minX = Infinity;\n let minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n\n for (let i = 0; i < n; i++) {\n const x = coords[2 * i];\n const y = coords[2 * i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n this._ids[i] = i;\n }\n const cx = (minX + maxX) / 2;\n const cy = (minY + maxY) / 2;\n\n let minDist = Infinity;\n let i0, i1, i2;\n\n // pick a seed point close to the center\n for (let i = 0; i < n; i++) {\n const d = dist(cx, cy, coords[2 * i], coords[2 * i + 1]);\n if (d < minDist) {\n i0 = i;\n minDist = d;\n }\n }\n const i0x = coords[2 * i0];\n const i0y = coords[2 * i0 + 1];\n\n minDist = Infinity;\n\n // find the point closest to the seed\n for (let i = 0; i < n; i++) {\n if (i === i0) continue;\n const d = dist(i0x, i0y, coords[2 * i], coords[2 * i + 1]);\n if (d < minDist && d > 0) {\n i1 = i;\n minDist = d;\n }\n }\n let i1x = coords[2 * i1];\n let i1y = coords[2 * i1 + 1];\n\n let minRadius = Infinity;\n\n // find the third point which forms the smallest circumcircle with the first two\n for (let i = 0; i < n; i++) {\n if (i === i0 || i === i1) continue;\n const r = circumradius(i0x, i0y, i1x, i1y, coords[2 * i], coords[2 * i + 1]);\n if (r < minRadius) {\n i2 = i;\n minRadius = r;\n }\n }\n let i2x = coords[2 * i2];\n let i2y = coords[2 * i2 + 1];\n\n if (minRadius === Infinity) {\n // order collinear points by dx (or dy if all x are identical)\n // and return the list as a hull\n for (let i = 0; i < n; i++) {\n this._dists[i] = (coords[2 * i] - coords[0]) || (coords[2 * i + 1] - coords[1]);\n }\n quicksort(this._ids, this._dists, 0, n - 1);\n const hull = new Uint32Array(n);\n let j = 0;\n for (let i = 0, d0 = -Infinity; i < n; i++) {\n const id = this._ids[i];\n if (this._dists[id] > d0) {\n hull[j++] = id;\n d0 = this._dists[id];\n }\n }\n this.hull = hull.subarray(0, j);\n this.triangles = new Uint32Array(0);\n this.halfedges = new Uint32Array(0);\n return;\n }\n\n // swap the order of the seed points for counter-clockwise orientation\n if (orient2d(i0x, i0y, i1x, i1y, i2x, i2y) < 0) {\n const i = i1;\n const x = i1x;\n const y = i1y;\n i1 = i2;\n i1x = i2x;\n i1y = i2y;\n i2 = i;\n i2x = x;\n i2y = y;\n }\n\n const center = circumcenter(i0x, i0y, i1x, i1y, i2x, i2y);\n this._cx = center.x;\n this._cy = center.y;\n\n for (let i = 0; i < n; i++) {\n this._dists[i] = dist(coords[2 * i], coords[2 * i + 1], center.x, center.y);\n }\n\n // sort the points by distance from the seed triangle circumcenter\n quicksort(this._ids, this._dists, 0, n - 1);\n\n // set up the seed triangle as the starting hull\n this._hullStart = i0;\n let hullSize = 3;\n\n hullNext[i0] = hullPrev[i2] = i1;\n hullNext[i1] = hullPrev[i0] = i2;\n hullNext[i2] = hullPrev[i1] = i0;\n\n hullTri[i0] = 0;\n hullTri[i1] = 1;\n hullTri[i2] = 2;\n\n hullHash.fill(-1);\n hullHash[this._hashKey(i0x, i0y)] = i0;\n hullHash[this._hashKey(i1x, i1y)] = i1;\n hullHash[this._hashKey(i2x, i2y)] = i2;\n\n this.trianglesLen = 0;\n this._addTriangle(i0, i1, i2, -1, -1, -1);\n\n for (let k = 0, xp, yp; k < this._ids.length; k++) {\n const i = this._ids[k];\n const x = coords[2 * i];\n const y = coords[2 * i + 1];\n\n // skip near-duplicate points\n if (k > 0 && Math.abs(x - xp) <= EPSILON && Math.abs(y - yp) <= EPSILON) continue;\n xp = x;\n yp = y;\n\n // skip seed triangle points\n if (i === i0 || i === i1 || i === i2) continue;\n\n // find a visible edge on the convex hull using edge hash\n let start = 0;\n for (let j = 0, key = this._hashKey(x, y); j < this._hashSize; j++) {\n start = hullHash[(key + j) % this._hashSize];\n if (start !== -1 && start !== hullNext[start]) break;\n }\n\n start = hullPrev[start];\n let e = start, q;\n while (q = hullNext[e], orient2d(x, y, coords[2 * e], coords[2 * e + 1], coords[2 * q], coords[2 * q + 1]) >= 0) {\n e = q;\n if (e === start) {\n e = -1;\n break;\n }\n }\n if (e === -1) continue; // likely a near-duplicate point; skip it\n\n // add the first triangle from the point\n let t = this._addTriangle(e, i, hullNext[e], -1, -1, hullTri[e]);\n\n // recursively flip triangles from the point until they satisfy the Delaunay condition\n hullTri[i] = this._legalize(t + 2);\n hullTri[e] = t; // keep track of boundary triangles on the hull\n hullSize++;\n\n // walk forward through the hull, adding more triangles and flipping recursively\n let n = hullNext[e];\n while (q = hullNext[n], orient2d(x, y, coords[2 * n], coords[2 * n + 1], coords[2 * q], coords[2 * q + 1]) < 0) {\n t = this._addTriangle(n, i, q, hullTri[i], -1, hullTri[n]);\n hullTri[i] = this._legalize(t + 2);\n hullNext[n] = n; // mark as removed\n hullSize--;\n n = q;\n }\n\n // walk backward from the other side, adding more triangles and flipping\n if (e === start) {\n while (q = hullPrev[e], orient2d(x, y, coords[2 * q], coords[2 * q + 1], coords[2 * e], coords[2 * e + 1]) < 0) {\n t = this._addTriangle(q, i, e, -1, hullTri[e], hullTri[q]);\n this._legalize(t + 2);\n hullTri[q] = t;\n hullNext[e] = e; // mark as removed\n hullSize--;\n e = q;\n }\n }\n\n // update the hull indices\n this._hullStart = hullPrev[i] = e;\n hullNext[e] = hullPrev[n] = i;\n hullNext[i] = n;\n\n // save the two new edges in the hash table\n hullHash[this._hashKey(x, y)] = i;\n hullHash[this._hashKey(coords[2 * e], coords[2 * e + 1])] = e;\n }\n\n this.hull = new Uint32Array(hullSize);\n for (let i = 0, e = this._hullStart; i < hullSize; i++) {\n this.hull[i] = e;\n e = hullNext[e];\n }\n\n // trim typed triangle mesh arrays\n this.triangles = this._triangles.subarray(0, this.trianglesLen);\n this.halfedges = this._halfedges.subarray(0, this.trianglesLen);\n }\n\n _hashKey(x, y) {\n return Math.floor(pseudoAngle(x - this._cx, y - this._cy) * this._hashSize) % this._hashSize;\n }\n\n _legalize(a) {\n const {_triangles: triangles, _halfedges: halfedges, coords} = this;\n\n let i = 0;\n let ar = 0;\n\n // recursion eliminated with a fixed-size stack\n while (true) {\n const b = halfedges[a];\n\n /* if the pair of triangles doesn't satisfy the Delaunay condition\n * (p1 is inside the circumcircle of [p0, pl, pr]), flip them,\n * then do the same check/flip recursively for the new pair of triangles\n *\n * pl pl\n * /||\\ / \\\n * al/ || \\bl al/ \\a\n * / || \\ / \\\n * / a||b \\ flip /___ar___\\\n * p0\\ || /p1 => p0\\---bl---/p1\n * \\ || / \\ /\n * ar\\ || /br b\\ /br\n * \\||/ \\ /\n * pr pr\n */\n const a0 = a - a % 3;\n ar = a0 + (a + 2) % 3;\n\n if (b === -1) { // convex hull edge\n if (i === 0) break;\n a = EDGE_STACK[--i];\n continue;\n }\n\n const b0 = b - b % 3;\n const al = a0 + (a + 1) % 3;\n const bl = b0 + (b + 2) % 3;\n\n const p0 = triangles[ar];\n const pr = triangles[a];\n const pl = triangles[al];\n const p1 = triangles[bl];\n\n const illegal = inCircle(\n coords[2 * p0], coords[2 * p0 + 1],\n coords[2 * pr], coords[2 * pr + 1],\n coords[2 * pl], coords[2 * pl + 1],\n coords[2 * p1], coords[2 * p1 + 1]);\n\n if (illegal) {\n triangles[a] = p1;\n triangles[b] = p0;\n\n const hbl = halfedges[bl];\n\n // edge swapped on the other side of the hull (rare); fix the halfedge reference\n if (hbl === -1) {\n let e = this._hullStart;\n do {\n if (this._hullTri[e] === bl) {\n this._hullTri[e] = a;\n break;\n }\n e = this._hullPrev[e];\n } while (e !== this._hullStart);\n }\n this._link(a, hbl);\n this._link(b, halfedges[ar]);\n this._link(ar, bl);\n\n const br = b0 + (b + 1) % 3;\n\n // don't worry about hitting the cap: it can only happen on extremely degenerate input\n if (i < EDGE_STACK.length) {\n EDGE_STACK[i++] = br;\n }\n } else {\n if (i === 0) break;\n a = EDGE_STACK[--i];\n }\n }\n\n return ar;\n }\n\n _link(a, b) {\n this._halfedges[a] = b;\n if (b !== -1) this._halfedges[b] = a;\n }\n\n // add a new triangle given vertex indices and adjacent half-edge ids\n _addTriangle(i0, i1, i2, a, b, c) {\n const t = this.trianglesLen;\n\n this._triangles[t] = i0;\n this._triangles[t + 1] = i1;\n this._triangles[t + 2] = i2;\n\n this._link(t, a);\n this._link(t + 1, b);\n this._link(t + 2, c);\n\n this.trianglesLen += 3;\n\n return t;\n }\n}\n\n// monotonically increases with real angle, but doesn't need expensive trigonometry\nfunction pseudoAngle(dx, dy) {\n const p = dx / (Math.abs(dx) + Math.abs(dy));\n return (dy > 0 ? 3 - p : 1 + p) / 4; // [0..1]\n}\n\nfunction dist(ax, ay, bx, by) {\n const dx = ax - bx;\n const dy = ay - by;\n return dx * dx + dy * dy;\n}\n\nfunction inCircle(ax, ay, bx, by, cx, cy, px, py) {\n const dx = ax - px;\n const dy = ay - py;\n const ex = bx - px;\n const ey = by - py;\n const fx = cx - px;\n const fy = cy - py;\n\n const ap = dx * dx + dy * dy;\n const bp = ex * ex + ey * ey;\n const cp = fx * fx + fy * fy;\n\n return dx * (ey * cp - bp * fy) -\n dy * (ex * cp - bp * fx) +\n ap * (ex * fy - ey * fx) < 0;\n}\n\nfunction circumradius(ax, ay, bx, by, cx, cy) {\n const dx = bx - ax;\n const dy = by - ay;\n const ex = cx - ax;\n const ey = cy - ay;\n\n const bl = dx * dx + dy * dy;\n const cl = ex * ex + ey * ey;\n const d = 0.5 / (dx * ey - dy * ex);\n\n const x = (ey * bl - dy * cl) * d;\n const y = (dx * cl - ex * bl) * d;\n\n return x * x + y * y;\n}\n\nfunction circumcenter(ax, ay, bx, by, cx, cy) {\n const dx = bx - ax;\n const dy = by - ay;\n const ex = cx - ax;\n const ey = cy - ay;\n\n const bl = dx * dx + dy * dy;\n const cl = ex * ex + ey * ey;\n const d = 0.5 / (dx * ey - dy * ex);\n\n const x = ax + (ey * bl - dy * cl) * d;\n const y = ay + (dx * cl - ex * bl) * d;\n\n return {x, y};\n}\n\nfunction quicksort(ids, dists, left, right) {\n if (right - left <= 20) {\n for (let i = left + 1; i <= right; i++) {\n const temp = ids[i];\n const tempDist = dists[temp];\n let j = i - 1;\n while (j >= left && dists[ids[j]] > tempDist) ids[j + 1] = ids[j--];\n ids[j + 1] = temp;\n }\n } else {\n const median = (left + right) >> 1;\n let i = left + 1;\n let j = right;\n swap(ids, median, i);\n if (dists[ids[left]] > dists[ids[right]]) swap(ids, left, right);\n if (dists[ids[i]] > dists[ids[right]]) swap(ids, i, right);\n if (dists[ids[left]] > dists[ids[i]]) swap(ids, left, i);\n\n const temp = ids[i];\n const tempDist = dists[temp];\n while (true) {\n do i++; while (dists[ids[i]] < tempDist);\n do j--; while (dists[ids[j]] > tempDist);\n if (j < i) break;\n swap(ids, i, j);\n }\n ids[left + 1] = ids[j];\n ids[j] = temp;\n\n if (right - i + 1 >= j - left) {\n quicksort(ids, dists, i, right);\n quicksort(ids, dists, left, j - 1);\n } else {\n quicksort(ids, dists, left, j - 1);\n quicksort(ids, dists, i, right);\n }\n }\n}\n\nfunction swap(arr, i, j) {\n const tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\nfunction defaultGetX(p) {\n return p[0];\n}\nfunction defaultGetY(p) {\n return p[1];\n}\n", "import Delaunator from \"delaunator\";\nimport Path from \"./path.js\";\nimport Polygon from \"./polygon.js\";\nimport Voronoi from \"./voronoi.js\";\n\nconst tau = 2 * Math.PI, pow = Math.pow;\n\nfunction pointX(p) {\n return p[0];\n}\n\nfunction pointY(p) {\n return p[1];\n}\n\n// A triangulation is collinear if all its triangles have a non-null area\nfunction collinear(d) {\n const {triangles, coords} = d;\n for (let i = 0; i < triangles.length; i += 3) {\n const a = 2 * triangles[i],\n b = 2 * triangles[i + 1],\n c = 2 * triangles[i + 2],\n cross = (coords[c] - coords[a]) * (coords[b + 1] - coords[a + 1])\n - (coords[b] - coords[a]) * (coords[c + 1] - coords[a + 1]);\n if (cross > 1e-10) return false;\n }\n return true;\n}\n\nfunction jitter(x, y, r) {\n return [x + Math.sin(x + y) * r, y + Math.cos(x - y) * r];\n}\n\nexport default class Delaunay {\n static from(points, fx = pointX, fy = pointY, that) {\n return new Delaunay(\"length\" in points\n ? flatArray(points, fx, fy, that)\n : Float64Array.from(flatIterable(points, fx, fy, that)));\n }\n constructor(points) {\n this._delaunator = new Delaunator(points);\n this.inedges = new Int32Array(points.length / 2);\n this._hullIndex = new Int32Array(points.length / 2);\n this.points = this._delaunator.coords;\n this._init();\n }\n update() {\n this._delaunator.update();\n this._init();\n return this;\n }\n _init() {\n const d = this._delaunator, points = this.points;\n\n // check for collinear\n if (d.hull && d.hull.length > 2 && collinear(d)) {\n this.collinear = Int32Array.from({length: points.length/2}, (_,i) => i)\n .sort((i, j) => points[2 * i] - points[2 * j] || points[2 * i + 1] - points[2 * j + 1]); // for exact neighbors\n const e = this.collinear[0], f = this.collinear[this.collinear.length - 1],\n bounds = [ points[2 * e], points[2 * e + 1], points[2 * f], points[2 * f + 1] ],\n r = 1e-8 * Math.hypot(bounds[3] - bounds[1], bounds[2] - bounds[0]);\n for (let i = 0, n = points.length / 2; i < n; ++i) {\n const p = jitter(points[2 * i], points[2 * i + 1], r);\n points[2 * i] = p[0];\n points[2 * i + 1] = p[1];\n }\n this._delaunator = new Delaunator(points);\n } else {\n delete this.collinear;\n }\n\n const halfedges = this.halfedges = this._delaunator.halfedges;\n const hull = this.hull = this._delaunator.hull;\n const triangles = this.triangles = this._delaunator.triangles;\n const inedges = this.inedges.fill(-1);\n const hullIndex = this._hullIndex.fill(-1);\n\n // Compute an index from each point to an (arbitrary) incoming halfedge\n // Used to give the first neighbor of each point; for this reason,\n // on the hull we give priority to exterior halfedges\n for (let e = 0, n = halfedges.length; e < n; ++e) {\n const p = triangles[e % 3 === 2 ? e - 2 : e + 1];\n if (halfedges[e] === -1 || inedges[p] === -1) inedges[p] = e;\n }\n for (let i = 0, n = hull.length; i < n; ++i) {\n hullIndex[hull[i]] = i;\n }\n\n // degenerate case: 1 or 2 (distinct) points\n if (hull.length <= 2 && hull.length > 0) {\n this.triangles = new Int32Array(3).fill(-1);\n this.halfedges = new Int32Array(3).fill(-1);\n this.triangles[0] = hull[0];\n inedges[hull[0]] = 1;\n if (hull.length === 2) {\n inedges[hull[1]] = 0;\n this.triangles[1] = hull[1];\n this.triangles[2] = hull[1];\n }\n }\n }\n voronoi(bounds) {\n return new Voronoi(this, bounds);\n }\n *neighbors(i) {\n const {inedges, hull, _hullIndex, halfedges, triangles, collinear} = this;\n\n // degenerate case with several collinear points\n if (collinear) {\n const l = collinear.indexOf(i);\n if (l > 0) yield collinear[l - 1];\n if (l < collinear.length - 1) yield collinear[l + 1];\n return;\n }\n\n const e0 = inedges[i];\n if (e0 === -1) return; // coincident point\n let e = e0, p0 = -1;\n do {\n yield p0 = triangles[e];\n e = e % 3 === 2 ? e - 2 : e + 1;\n if (triangles[e] !== i) return; // bad triangulation\n e = halfedges[e];\n if (e === -1) {\n const p = hull[(_hullIndex[i] + 1) % hull.length];\n if (p !== p0) yield p;\n return;\n }\n } while (e !== e0);\n }\n find(x, y, i = 0) {\n if ((x = +x, x !== x) || (y = +y, y !== y)) return -1;\n const i0 = i;\n let c;\n while ((c = this._step(i, x, y)) >= 0 && c !== i && c !== i0) i = c;\n return c;\n }\n _step(i, x, y) {\n const {inedges, hull, _hullIndex, halfedges, triangles, points} = this;\n if (inedges[i] === -1 || !points.length) return (i + 1) % (points.length >> 1);\n let c = i;\n let dc = pow(x - points[i * 2], 2) + pow(y - points[i * 2 + 1], 2);\n const e0 = inedges[i];\n let e = e0;\n do {\n let t = triangles[e];\n const dt = pow(x - points[t * 2], 2) + pow(y - points[t * 2 + 1], 2);\n if (dt < dc) dc = dt, c = t;\n e = e % 3 === 2 ? e - 2 : e + 1;\n if (triangles[e] !== i) break; // bad triangulation\n e = halfedges[e];\n if (e === -1) {\n e = hull[(_hullIndex[i] + 1) % hull.length];\n if (e !== t) {\n if (pow(x - points[e * 2], 2) + pow(y - points[e * 2 + 1], 2) < dc) return e;\n }\n break;\n }\n } while (e !== e0);\n return c;\n }\n render(context) {\n const buffer = context == null ? context = new Path : undefined;\n const {points, halfedges, triangles} = this;\n for (let i = 0, n = halfedges.length; i < n; ++i) {\n const j = halfedges[i];\n if (j < i) continue;\n const ti = triangles[i] * 2;\n const tj = triangles[j] * 2;\n context.moveTo(points[ti], points[ti + 1]);\n context.lineTo(points[tj], points[tj + 1]);\n }\n this.renderHull(context);\n return buffer && buffer.value();\n }\n renderPoints(context, r) {\n if (r === undefined && (!context || typeof context.moveTo !== \"function\")) r = context, context = null;\n r = r == undefined ? 2 : +r;\n const buffer = context == null ? context = new Path : undefined;\n const {points} = this;\n for (let i = 0, n = points.length; i < n; i += 2) {\n const x = points[i], y = points[i + 1];\n context.moveTo(x + r, y);\n context.arc(x, y, r, 0, tau);\n }\n return buffer && buffer.value();\n }\n renderHull(context) {\n const buffer = context == null ? context = new Path : undefined;\n const {hull, points} = this;\n const h = hull[0] * 2, n = hull.length;\n context.moveTo(points[h], points[h + 1]);\n for (let i = 1; i < n; ++i) {\n const h = 2 * hull[i];\n context.lineTo(points[h], points[h + 1]);\n }\n context.closePath();\n return buffer && buffer.value();\n }\n hullPolygon() {\n const polygon = new Polygon;\n this.renderHull(polygon);\n return polygon.value();\n }\n renderTriangle(i, context) {\n const buffer = context == null ? context = new Path : undefined;\n const {points, triangles} = this;\n const t0 = triangles[i *= 3] * 2;\n const t1 = triangles[i + 1] * 2;\n const t2 = triangles[i + 2] * 2;\n context.moveTo(points[t0], points[t0 + 1]);\n context.lineTo(points[t1], points[t1 + 1]);\n context.lineTo(points[t2], points[t2 + 1]);\n context.closePath();\n return buffer && buffer.value();\n }\n *trianglePolygons() {\n const {triangles} = this;\n for (let i = 0, n = triangles.length / 3; i < n; ++i) {\n yield this.trianglePolygon(i);\n }\n }\n trianglePolygon(i) {\n const polygon = new Polygon;\n this.renderTriangle(i, polygon);\n return polygon.value();\n }\n}\n\nfunction flatArray(points, fx, fy, that) {\n const n = points.length;\n const array = new Float64Array(n * 2);\n for (let i = 0; i < n; ++i) {\n const p = points[i];\n array[i * 2] = fx.call(that, p, i, points);\n array[i * 2 + 1] = fy.call(that, p, i, points);\n }\n return array;\n}\n\nfunction* flatIterable(points, fx, fy, that) {\n let i = 0;\n for (const p of points) {\n yield fx.call(that, p, i, points);\n yield fy.call(that, p, i, points);\n ++i;\n }\n}\n", "var EOL = {},\n EOF = {},\n QUOTE = 34,\n NEWLINE = 10,\n RETURN = 13;\n\nfunction objectConverter(columns) {\n return new Function(\"d\", \"return {\" + columns.map(function(name, i) {\n return JSON.stringify(name) + \": d[\" + i + \"] || \\\"\\\"\";\n }).join(\",\") + \"}\");\n}\n\nfunction customConverter(columns, f) {\n var object = objectConverter(columns);\n return function(row, i) {\n return f(object(row), i, columns);\n };\n}\n\n// Compute unique columns in order of discovery.\nfunction inferColumns(rows) {\n var columnSet = Object.create(null),\n columns = [];\n\n rows.forEach(function(row) {\n for (var column in row) {\n if (!(column in columnSet)) {\n columns.push(columnSet[column] = column);\n }\n }\n });\n\n return columns;\n}\n\nfunction pad(value, width) {\n var s = value + \"\", length = s.length;\n return length < width ? new Array(width - length + 1).join(0) + s : s;\n}\n\nfunction formatYear(year) {\n return year < 0 ? \"-\" + pad(-year, 6)\n : year > 9999 ? \"+\" + pad(year, 6)\n : pad(year, 4);\n}\n\nfunction formatDate(date) {\n var hours = date.getUTCHours(),\n minutes = date.getUTCMinutes(),\n seconds = date.getUTCSeconds(),\n milliseconds = date.getUTCMilliseconds();\n return isNaN(date) ? \"Invalid Date\"\n : formatYear(date.getUTCFullYear(), 4) + \"-\" + pad(date.getUTCMonth() + 1, 2) + \"-\" + pad(date.getUTCDate(), 2)\n + (milliseconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \".\" + pad(milliseconds, 3) + \"Z\"\n : seconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \"Z\"\n : minutes || hours ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \"Z\"\n : \"\");\n}\n\nexport default function(delimiter) {\n var reFormat = new RegExp(\"[\\\"\" + delimiter + \"\\n\\r]\"),\n DELIMITER = delimiter.charCodeAt(0);\n\n function parse(text, f) {\n var convert, columns, rows = parseRows(text, function(row, i) {\n if (convert) return convert(row, i - 1);\n columns = row, convert = f ? customConverter(row, f) : objectConverter(row);\n });\n rows.columns = columns || [];\n return rows;\n }\n\n function parseRows(text, f) {\n var rows = [], // output rows\n N = text.length,\n I = 0, // current character index\n n = 0, // current line number\n t, // current token\n eof = N <= 0, // current token followed by EOF?\n eol = false; // current token followed by EOL?\n\n // Strip the trailing newline.\n if (text.charCodeAt(N - 1) === NEWLINE) --N;\n if (text.charCodeAt(N - 1) === RETURN) --N;\n\n function token() {\n if (eof) return EOF;\n if (eol) return eol = false, EOL;\n\n // Unescape quotes.\n var i, j = I, c;\n if (text.charCodeAt(j) === QUOTE) {\n while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE);\n if ((i = I) >= N) eof = true;\n else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n return text.slice(j + 1, i - 1).replace(/\"\"/g, \"\\\"\");\n }\n\n // Find next delimiter or newline.\n while (I < N) {\n if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n else if (c !== DELIMITER) continue;\n return text.slice(j, i);\n }\n\n // Return last token before EOF.\n return eof = true, text.slice(j, N);\n }\n\n while ((t = token()) !== EOF) {\n var row = [];\n while (t !== EOL && t !== EOF) row.push(t), t = token();\n if (f && (row = f(row, n++)) == null) continue;\n rows.push(row);\n }\n\n return rows;\n }\n\n function preformatBody(rows, columns) {\n return rows.map(function(row) {\n return columns.map(function(column) {\n return formatValue(row[column]);\n }).join(delimiter);\n });\n }\n\n function format(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join(\"\\n\");\n }\n\n function formatBody(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return preformatBody(rows, columns).join(\"\\n\");\n }\n\n function formatRows(rows) {\n return rows.map(formatRow).join(\"\\n\");\n }\n\n function formatRow(row) {\n return row.map(formatValue).join(delimiter);\n }\n\n function formatValue(value) {\n return value == null ? \"\"\n : value instanceof Date ? formatDate(value)\n : reFormat.test(value += \"\") ? \"\\\"\" + value.replace(/\"/g, \"\\\"\\\"\") + \"\\\"\"\n : value;\n }\n\n return {\n parse: parse,\n parseRows: parseRows,\n format: format,\n formatBody: formatBody,\n formatRows: formatRows,\n formatRow: formatRow,\n formatValue: formatValue\n };\n}\n", "import dsv from \"./dsv.js\";\n\nvar csv = dsv(\",\");\n\nexport var csvParse = csv.parse;\nexport var csvParseRows = csv.parseRows;\nexport var csvFormat = csv.format;\nexport var csvFormatBody = csv.formatBody;\nexport var csvFormatRows = csv.formatRows;\nexport var csvFormatRow = csv.formatRow;\nexport var csvFormatValue = csv.formatValue;\n", "import dsv from \"./dsv.js\";\n\nvar tsv = dsv(\"\\t\");\n\nexport var tsvParse = tsv.parse;\nexport var tsvParseRows = tsv.parseRows;\nexport var tsvFormat = tsv.format;\nexport var tsvFormatBody = tsv.formatBody;\nexport var tsvFormatRows = tsv.formatRows;\nexport var tsvFormatRow = tsv.formatRow;\nexport var tsvFormatValue = tsv.formatValue;\n", "export default function autoType(object) {\n for (var key in object) {\n var value = object[key].trim(), number, m;\n if (!value) value = null;\n else if (value === \"true\") value = true;\n else if (value === \"false\") value = false;\n else if (value === \"NaN\") value = NaN;\n else if (!isNaN(number = +value)) value = number;\n else if (m = value.match(/^([-+]\\d{2})?\\d{4}(-\\d{2}(-\\d{2})?)?(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{3})?)?(Z|[-+]\\d{2}:\\d{2})?)?$/)) {\n if (fixtz && !!m[4] && !m[7]) value = value.replace(/-/g, \"/\").replace(/T/, \" \");\n value = new Date(value);\n }\n else continue;\n object[key] = value;\n }\n return object;\n}\n\n// https://github.com/d3/d3-dsv/issues/45\nconst fixtz = new Date(\"2019-01-01T00:00\").getHours() || new Date(\"2019-07-01T00:00\").getHours();", "function responseText(response) {\n if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n return response.text();\n}\n\nexport default function(input, init) {\n return fetch(input, init).then(responseText);\n}\n", "import {csvParse, dsvFormat, tsvParse} from \"d3-dsv\";\nimport text from \"./text.js\";\n\nfunction dsvParse(parse) {\n return function(input, init, row) {\n if (arguments.length === 2 && typeof init === \"function\") row = init, init = undefined;\n return text(input, init).then(function(response) {\n return parse(response, row);\n });\n };\n}\n\nexport default function dsv(delimiter, input, init, row) {\n if (arguments.length === 3 && typeof init === \"function\") row = init, init = undefined;\n var format = dsvFormat(delimiter);\n return text(input, init).then(function(response) {\n return format.parse(response, row);\n });\n}\n\nexport var csv = dsvParse(csvParse);\nexport var tsv = dsvParse(tsvParse);\n", "import text from \"./text.js\";\n\nfunction parser(type) {\n return (input, init) => text(input, init)\n .then(text => (new DOMParser).parseFromString(text, type));\n}\n\nexport default parser(\"application/xml\");\n\nexport var html = parser(\"text/html\");\n\nexport var svg = parser(\"image/svg+xml\");\n", "export default function(d) {\n const x = +this._x.call(null, d),\n y = +this._y.call(null, d);\n return add(this.cover(x, y), x, y, d);\n}\n\nfunction add(tree, x, y, d) {\n if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points\n\n var parent,\n node = tree._root,\n leaf = {data: d},\n x0 = tree._x0,\n y0 = tree._y0,\n x1 = tree._x1,\n y1 = tree._y1,\n xm,\n ym,\n xp,\n yp,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return tree._root = leaf, tree;\n\n // Find the existing leaf for the new point, or add it.\n while (node.length) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;\n }\n\n // Is the new point is exactly coincident with the existing point?\n xp = +tree._x.call(null, node.data);\n yp = +tree._y.call(null, node.data);\n if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n // Otherwise, split the leaf node until the old and new point are separated.\n do {\n parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm)));\n return parent[j] = node, parent[i] = leaf, tree;\n}\n\nexport function addAll(data) {\n var d, i, n = data.length,\n x,\n y,\n xz = new Array(n),\n yz = new Array(n),\n x0 = Infinity,\n y0 = Infinity,\n x1 = -Infinity,\n y1 = -Infinity;\n\n // Compute the points and their extent.\n for (i = 0; i < n; ++i) {\n if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;\n xz[i] = x;\n yz[i] = y;\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n }\n\n // If there were no (valid) points, abort.\n if (x0 > x1 || y0 > y1) return this;\n\n // Expand the tree to cover the new points.\n this.cover(x0, y0).cover(x1, y1);\n\n // Add the new points.\n for (i = 0; i < n; ++i) {\n add(this, xz[i], yz[i], data[i]);\n }\n\n return this;\n}\n", "export default function(x, y) {\n if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points\n\n var x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1;\n\n // If the quadtree has no extent, initialize them.\n // Integer extent are necessary so that if we later double the extent,\n // the existing quadrant boundaries don’t change due to floating point error!\n if (isNaN(x0)) {\n x1 = (x0 = Math.floor(x)) + 1;\n y1 = (y0 = Math.floor(y)) + 1;\n }\n\n // Otherwise, double repeatedly to cover.\n else {\n var z = x1 - x0 || 1,\n node = this._root,\n parent,\n i;\n\n while (x0 > x || x >= x1 || y0 > y || y >= y1) {\n i = (y < y0) << 1 | (x < x0);\n parent = new Array(4), parent[i] = node, node = parent, z *= 2;\n switch (i) {\n case 0: x1 = x0 + z, y1 = y0 + z; break;\n case 1: x0 = x1 - z, y1 = y0 + z; break;\n case 2: x1 = x0 + z, y0 = y1 - z; break;\n case 3: x0 = x1 - z, y0 = y1 - z; break;\n }\n }\n\n if (this._root && this._root.length) this._root = node;\n }\n\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n return this;\n}\n", "export default function() {\n var data = [];\n this.visit(function(node) {\n if (!node.length) do data.push(node.data); while (node = node.next)\n });\n return data;\n}\n", "export default function(_) {\n return arguments.length\n ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1])\n : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];\n}\n", "export default function(node, x0, y0, x1, y1) {\n this.node = node;\n this.x0 = x0;\n this.y0 = y0;\n this.x1 = x1;\n this.y1 = y1;\n}\n", "import Quad from \"./quad.js\";\n\nexport default function(x, y, radius) {\n var data,\n x0 = this._x0,\n y0 = this._y0,\n x1,\n y1,\n x2,\n y2,\n x3 = this._x1,\n y3 = this._y1,\n quads = [],\n node = this._root,\n q,\n i;\n\n if (node) quads.push(new Quad(node, x0, y0, x3, y3));\n if (radius == null) radius = Infinity;\n else {\n x0 = x - radius, y0 = y - radius;\n x3 = x + radius, y3 = y + radius;\n radius *= radius;\n }\n\n while (q = quads.pop()) {\n\n // Stop searching if this quadrant can’t contain a closer node.\n if (!(node = q.node)\n || (x1 = q.x0) > x3\n || (y1 = q.y0) > y3\n || (x2 = q.x1) < x0\n || (y2 = q.y1) < y0) continue;\n\n // Bisect the current quadrant.\n if (node.length) {\n var xm = (x1 + x2) / 2,\n ym = (y1 + y2) / 2;\n\n quads.push(\n new Quad(node[3], xm, ym, x2, y2),\n new Quad(node[2], x1, ym, xm, y2),\n new Quad(node[1], xm, y1, x2, ym),\n new Quad(node[0], x1, y1, xm, ym)\n );\n\n // Visit the closest quadrant first.\n if (i = (y >= ym) << 1 | (x >= xm)) {\n q = quads[quads.length - 1];\n quads[quads.length - 1] = quads[quads.length - 1 - i];\n quads[quads.length - 1 - i] = q;\n }\n }\n\n // Visit this point. (Visiting coincident points isn’t necessary!)\n else {\n var dx = x - +this._x.call(null, node.data),\n dy = y - +this._y.call(null, node.data),\n d2 = dx * dx + dy * dy;\n if (d2 < radius) {\n var d = Math.sqrt(radius = d2);\n x0 = x - d, y0 = y - d;\n x3 = x + d, y3 = y + d;\n data = node.data;\n }\n }\n }\n\n return data;\n}\n", "export default function(d) {\n if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points\n\n var parent,\n node = this._root,\n retainer,\n previous,\n next,\n x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1,\n x,\n y,\n xm,\n ym,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return this;\n\n // Find the leaf node for the point.\n // While descending, also retain the deepest parent with a non-removed sibling.\n if (node.length) while (true) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (!(parent = node, node = node[i = bottom << 1 | right])) return this;\n if (!node.length) break;\n if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i;\n }\n\n // Find the point to remove.\n while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n if (next = node.next) delete node.next;\n\n // If there are multiple coincident points, remove just the point.\n if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n // If this is the root point, remove it.\n if (!parent) return this._root = next, this;\n\n // Remove this leaf.\n next ? parent[i] = next : delete parent[i];\n\n // If the parent now contains exactly one leaf, collapse superfluous parents.\n if ((node = parent[0] || parent[1] || parent[2] || parent[3])\n && node === (parent[3] || parent[2] || parent[1] || parent[0])\n && !node.length) {\n if (retainer) retainer[j] = node;\n else this._root = node;\n }\n\n return this;\n}\n\nexport function removeAll(data) {\n for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n return this;\n}\n", "export default function() {\n return this._root;\n}\n", "export default function() {\n var size = 0;\n this.visit(function(node) {\n if (!node.length) do ++size; while (node = node.next)\n });\n return size;\n}\n", "import Quad from \"./quad.js\";\n\nexport default function(callback) {\n var quads = [], q, node = this._root, child, x0, y0, x1, y1;\n if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {\n var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n }\n }\n return this;\n}\n", "import Quad from \"./quad.js\";\n\nexport default function(callback) {\n var quads = [], next = [], q;\n if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n var node = q.node;\n if (node.length) {\n var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n }\n next.push(q);\n }\n while (q = next.pop()) {\n callback(q.node, q.x0, q.y0, q.x1, q.y1);\n }\n return this;\n}\n", "export function defaultX(d) {\n return d[0];\n}\n\nexport default function(_) {\n return arguments.length ? (this._x = _, this) : this._x;\n}\n", "export function defaultY(d) {\n return d[1];\n}\n\nexport default function(_) {\n return arguments.length ? (this._y = _, this) : this._y;\n}\n", "import tree_add, {addAll as tree_addAll} from \"./add.js\";\nimport tree_cover from \"./cover.js\";\nimport tree_data from \"./data.js\";\nimport tree_extent from \"./extent.js\";\nimport tree_find from \"./find.js\";\nimport tree_remove, {removeAll as tree_removeAll} from \"./remove.js\";\nimport tree_root from \"./root.js\";\nimport tree_size from \"./size.js\";\nimport tree_visit from \"./visit.js\";\nimport tree_visitAfter from \"./visitAfter.js\";\nimport tree_x, {defaultX} from \"./x.js\";\nimport tree_y, {defaultY} from \"./y.js\";\n\nexport default function quadtree(nodes, x, y) {\n var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN);\n return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Quadtree(x, y, x0, y0, x1, y1) {\n this._x = x;\n this._y = y;\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n var copy = {data: leaf.data}, next = copy;\n while (leaf = leaf.next) next = next.next = {data: leaf.data};\n return copy;\n}\n\nvar treeProto = quadtree.prototype = Quadtree.prototype;\n\ntreeProto.copy = function() {\n var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),\n node = this._root,\n nodes,\n child;\n\n if (!node) return copy;\n\n if (!node.length) return copy._root = leaf_copy(node), copy;\n\n nodes = [{source: node, target: copy._root = new Array(4)}];\n while (node = nodes.pop()) {\n for (var i = 0; i < 4; ++i) {\n if (child = node.source[i]) {\n if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)});\n else node.target[i] = leaf_copy(child);\n }\n }\n }\n\n return copy;\n};\n\ntreeProto.add = tree_add;\ntreeProto.addAll = tree_addAll;\ntreeProto.cover = tree_cover;\ntreeProto.data = tree_data;\ntreeProto.extent = tree_extent;\ntreeProto.find = tree_find;\ntreeProto.remove = tree_remove;\ntreeProto.removeAll = tree_removeAll;\ntreeProto.root = tree_root;\ntreeProto.size = tree_size;\ntreeProto.visit = tree_visit;\ntreeProto.visitAfter = tree_visitAfter;\ntreeProto.x = tree_x;\ntreeProto.y = tree_y;\n", "import {dispatch} from \"d3-dispatch\";\nimport {timer} from \"d3-timer\";\nimport lcg from \"./lcg.js\";\n\nexport function x(d) {\n return d.x;\n}\n\nexport function y(d) {\n return d.y;\n}\n\nvar initialRadius = 10,\n initialAngle = Math.PI * (3 - Math.sqrt(5));\n\nexport default function(nodes) {\n var simulation,\n alpha = 1,\n alphaMin = 0.001,\n alphaDecay = 1 - Math.pow(alphaMin, 1 / 300),\n alphaTarget = 0,\n velocityDecay = 0.6,\n forces = new Map(),\n stepper = timer(step),\n event = dispatch(\"tick\", \"end\"),\n random = lcg();\n\n if (nodes == null) nodes = [];\n\n function step() {\n tick();\n event.call(\"tick\", simulation);\n if (alpha < alphaMin) {\n stepper.stop();\n event.call(\"end\", simulation);\n }\n }\n\n function tick(iterations) {\n var i, n = nodes.length, node;\n\n if (iterations === undefined) iterations = 1;\n\n for (var k = 0; k < iterations; ++k) {\n alpha += (alphaTarget - alpha) * alphaDecay;\n\n forces.forEach(function(force) {\n force(alpha);\n });\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n if (node.fx == null) node.x += node.vx *= velocityDecay;\n else node.x = node.fx, node.vx = 0;\n if (node.fy == null) node.y += node.vy *= velocityDecay;\n else node.y = node.fy, node.vy = 0;\n }\n }\n\n return simulation;\n }\n\n function initializeNodes() {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.index = i;\n if (node.fx != null) node.x = node.fx;\n if (node.fy != null) node.y = node.fy;\n if (isNaN(node.x) || isNaN(node.y)) {\n var radius = initialRadius * Math.sqrt(0.5 + i), angle = i * initialAngle;\n node.x = radius * Math.cos(angle);\n node.y = radius * Math.sin(angle);\n }\n if (isNaN(node.vx) || isNaN(node.vy)) {\n node.vx = node.vy = 0;\n }\n }\n }\n\n function initializeForce(force) {\n if (force.initialize) force.initialize(nodes, random);\n return force;\n }\n\n initializeNodes();\n\n return simulation = {\n tick: tick,\n\n restart: function() {\n return stepper.restart(step), simulation;\n },\n\n stop: function() {\n return stepper.stop(), simulation;\n },\n\n nodes: function(_) {\n return arguments.length ? (nodes = _, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes;\n },\n\n alpha: function(_) {\n return arguments.length ? (alpha = +_, simulation) : alpha;\n },\n\n alphaMin: function(_) {\n return arguments.length ? (alphaMin = +_, simulation) : alphaMin;\n },\n\n alphaDecay: function(_) {\n return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;\n },\n\n alphaTarget: function(_) {\n return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;\n },\n\n velocityDecay: function(_) {\n return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;\n },\n\n randomSource: function(_) {\n return arguments.length ? (random = _, forces.forEach(initializeForce), simulation) : random;\n },\n\n force: function(name, _) {\n return arguments.length > 1 ? ((_ == null ? forces.delete(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name);\n },\n\n find: function(x, y, radius) {\n var i = 0,\n n = nodes.length,\n dx,\n dy,\n d2,\n node,\n closest;\n\n if (radius == null) radius = Infinity;\n else radius *= radius;\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n dx = x - node.x;\n dy = y - node.y;\n d2 = dx * dx + dy * dy;\n if (d2 < radius) closest = node, radius = d2;\n }\n\n return closest;\n },\n\n on: function(name, _) {\n return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);\n }\n };\n}\n", "export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\n\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var hypot = Math.hypot;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nexport function haversin(x) {\n return (x = sin(x / 2)) * x;\n}\n", "export default function noop() {}\n", "import {Adder} from \"d3-array\";\nimport {atan2, cos, quarterPi, radians, sin, tau} from \"./math.js\";\nimport noop from \"./noop.js\";\nimport stream from \"./stream.js\";\n\nexport var areaRingSum = new Adder();\n\n// hello?\n\nvar areaSum = new Adder(),\n lambda00,\n phi00,\n lambda0,\n cosPhi0,\n sinPhi0;\n\nexport var areaStream = {\n point: noop,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: function() {\n areaRingSum = new Adder();\n areaStream.lineStart = areaRingStart;\n areaStream.lineEnd = areaRingEnd;\n },\n polygonEnd: function() {\n var areaRing = +areaRingSum;\n areaSum.add(areaRing < 0 ? tau + areaRing : areaRing);\n this.lineStart = this.lineEnd = this.point = noop;\n },\n sphere: function() {\n areaSum.add(tau);\n }\n};\n\nfunction areaRingStart() {\n areaStream.point = areaPointFirst;\n}\n\nfunction areaRingEnd() {\n areaPoint(lambda00, phi00);\n}\n\nfunction areaPointFirst(lambda, phi) {\n areaStream.point = areaPoint;\n lambda00 = lambda, phi00 = phi;\n lambda *= radians, phi *= radians;\n lambda0 = lambda, cosPhi0 = cos(phi = phi / 2 + quarterPi), sinPhi0 = sin(phi);\n}\n\nfunction areaPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n phi = phi / 2 + quarterPi; // half the angular distance from south pole\n\n // Spherical excess E for a spherical triangle with vertices: south pole,\n // previous point, current point. Uses a formula derived from Cagnoli’s\n // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).\n var dLambda = lambda - lambda0,\n sdLambda = dLambda >= 0 ? 1 : -1,\n adLambda = sdLambda * dLambda,\n cosPhi = cos(phi),\n sinPhi = sin(phi),\n k = sinPhi0 * sinPhi,\n u = cosPhi0 * cosPhi + k * cos(adLambda),\n v = k * sdLambda * sin(adLambda);\n areaRingSum.add(atan2(v, u));\n\n // Advance the previous points.\n lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi;\n}\n\nexport default function(object) {\n areaSum = new Adder();\n stream(object, areaStream);\n return areaSum * 2;\n}\n", "import {asin, atan2, cos, sin, sqrt} from \"./math.js\";\n\nexport function spherical(cartesian) {\n return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])];\n}\n\nexport function cartesian(spherical) {\n var lambda = spherical[0], phi = spherical[1], cosPhi = cos(phi);\n return [cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)];\n}\n\nexport function cartesianDot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\nexport function cartesianCross(a, b) {\n return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n}\n\n// TODO return a\nexport function cartesianAddInPlace(a, b) {\n a[0] += b[0], a[1] += b[1], a[2] += b[2];\n}\n\nexport function cartesianScale(vector, k) {\n return [vector[0] * k, vector[1] * k, vector[2] * k];\n}\n\n// TODO return d\nexport function cartesianNormalizeInPlace(d) {\n var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n d[0] /= l, d[1] /= l, d[2] /= l;\n}\n", "import compose from \"./compose.js\";\nimport {abs, asin, atan2, cos, degrees, pi, radians, sin, tau} from \"./math.js\";\n\nfunction rotationIdentity(lambda, phi) {\n if (abs(lambda) > pi) lambda -= Math.round(lambda / tau) * tau;\n return [lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\n\nexport function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n return (deltaLambda %= tau) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))\n : rotationLambda(deltaLambda))\n : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)\n : rotationIdentity);\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n return function(lambda, phi) {\n lambda += deltaLambda;\n if (abs(lambda) > pi) lambda -= Math.round(lambda / tau) * tau;\n return [lambda, phi];\n };\n}\n\nfunction rotationLambda(deltaLambda) {\n var rotation = forwardRotationLambda(deltaLambda);\n rotation.invert = forwardRotationLambda(-deltaLambda);\n return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n var cosDeltaPhi = cos(deltaPhi),\n sinDeltaPhi = sin(deltaPhi),\n cosDeltaGamma = cos(deltaGamma),\n sinDeltaGamma = sin(deltaGamma);\n\n function rotation(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaPhi + x * sinDeltaPhi;\n return [\n atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),\n asin(k * cosDeltaGamma + y * sinDeltaGamma)\n ];\n }\n\n rotation.invert = function(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaGamma - y * sinDeltaGamma;\n return [\n atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),\n asin(k * cosDeltaPhi - x * sinDeltaPhi)\n ];\n };\n\n return rotation;\n}\n\nexport default function(rotate) {\n rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0);\n\n function forward(coordinates) {\n coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n }\n\n forward.invert = function(coordinates) {\n coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n };\n\n return forward;\n}\n", "import noop from \"../noop.js\";\n\nexport default function() {\n var lines = [],\n line;\n return {\n point: function(x, y, m) {\n line.push([x, y, m]);\n },\n lineStart: function() {\n lines.push(line = []);\n },\n lineEnd: noop,\n rejoin: function() {\n if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n },\n result: function() {\n var result = lines;\n lines = [];\n line = null;\n return result;\n }\n };\n}\n", "import {abs, epsilon} from \"./math.js\";\n\nexport default function(a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n", "import pointEqual from \"../pointEqual.js\";\nimport {epsilon} from \"../math.js\";\n\nfunction Intersection(point, points, other, entry) {\n this.x = point;\n this.z = points;\n this.o = other; // another intersection\n this.e = entry; // is an entry?\n this.v = false; // visited\n this.n = this.p = null; // next & previous\n}\n\n// A generalized polygon clipping algorithm: given a polygon that has been cut\n// into its visible line segments, and rejoins the segments by interpolating\n// along the clip edge.\nexport default function(segments, compareIntersection, startInside, interpolate, stream) {\n var subject = [],\n clip = [],\n i,\n n;\n\n segments.forEach(function(segment) {\n if ((n = segment.length - 1) <= 0) return;\n var n, p0 = segment[0], p1 = segment[n], x;\n\n if (pointEqual(p0, p1)) {\n if (!p0[2] && !p1[2]) {\n stream.lineStart();\n for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n stream.lineEnd();\n return;\n }\n // handle degenerate cases by moving the point\n p1[0] += 2 * epsilon;\n }\n\n subject.push(x = new Intersection(p0, segment, null, true));\n clip.push(x.o = new Intersection(p0, null, x, false));\n subject.push(x = new Intersection(p1, segment, null, false));\n clip.push(x.o = new Intersection(p1, null, x, true));\n });\n\n if (!subject.length) return;\n\n clip.sort(compareIntersection);\n link(subject);\n link(clip);\n\n for (i = 0, n = clip.length; i < n; ++i) {\n clip[i].e = startInside = !startInside;\n }\n\n var start = subject[0],\n points,\n point;\n\n while (1) {\n // Find first unvisited intersection.\n var current = start,\n isSubject = true;\n while (current.v) if ((current = current.n) === start) return;\n points = current.z;\n stream.lineStart();\n do {\n current.v = current.o.v = true;\n if (current.e) {\n if (isSubject) {\n for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.n.x, 1, stream);\n }\n current = current.n;\n } else {\n if (isSubject) {\n points = current.p.z;\n for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.p.x, -1, stream);\n }\n current = current.p;\n }\n current = current.o;\n points = current.z;\n isSubject = !isSubject;\n } while (!current.v);\n stream.lineEnd();\n }\n}\n\nfunction link(array) {\n if (!(n = array.length)) return;\n var n,\n i = 0,\n a = array[0],\n b;\n while (++i < n) {\n a.n = b = array[i];\n b.p = a;\n a = b;\n }\n a.n = b = array[0];\n b.p = a;\n}\n", "import {Adder} from \"d3-array\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace} from \"./cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, epsilon2, halfPi, pi, quarterPi, sign, sin, tau} from \"./math.js\";\n\nfunction longitude(point) {\n return abs(point[0]) <= pi ? point[0] : sign(point[0]) * ((abs(point[0]) + pi) % tau - pi);\n}\n\nexport default function(polygon, point) {\n var lambda = longitude(point),\n phi = point[1],\n sinPhi = sin(phi),\n normal = [sin(lambda), -cos(lambda), 0],\n angle = 0,\n winding = 0;\n\n var sum = new Adder();\n\n if (sinPhi === 1) phi = halfPi + epsilon;\n else if (sinPhi === -1) phi = -halfPi - epsilon;\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n if (!(m = (ring = polygon[i]).length)) continue;\n var ring,\n m,\n point0 = ring[m - 1],\n lambda0 = longitude(point0),\n phi0 = point0[1] / 2 + quarterPi,\n sinPhi0 = sin(phi0),\n cosPhi0 = cos(phi0);\n\n for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n var point1 = ring[j],\n lambda1 = longitude(point1),\n phi1 = point1[1] / 2 + quarterPi,\n sinPhi1 = sin(phi1),\n cosPhi1 = cos(phi1),\n delta = lambda1 - lambda0,\n sign = delta >= 0 ? 1 : -1,\n absDelta = sign * delta,\n antimeridian = absDelta > pi,\n k = sinPhi0 * sinPhi1;\n\n sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta)));\n angle += antimeridian ? delta + sign * tau : delta;\n\n // Are the longitudes either side of the point’s meridian (lambda),\n // and are the latitudes smaller than the parallel (phi)?\n if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n var arc = cartesianCross(cartesian(point0), cartesian(point1));\n cartesianNormalizeInPlace(arc);\n var intersection = cartesianCross(normal, arc);\n cartesianNormalizeInPlace(intersection);\n var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]);\n if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n winding += antimeridian ^ delta >= 0 ? 1 : -1;\n }\n }\n }\n }\n\n // First, determine whether the South pole is inside or outside:\n //\n // It is inside if:\n // * the polygon winds around it in a clockwise direction.\n // * the polygon does not (cumulatively) wind around it, but has a negative\n // (counter-clockwise) area.\n //\n // Second, count the (signed) number of times a segment crosses a lambda\n // from the point to the South pole. If it is zero, then the point is the\n // same side as the South pole.\n\n return (angle < -epsilon || angle < epsilon && sum < -epsilon2) ^ (winding & 1);\n}\n", "import clipBuffer from \"./buffer.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {epsilon, halfPi} from \"../math.js\";\nimport polygonContains from \"../polygonContains.js\";\nimport {merge} from \"d3-array\";\n\nexport default function(pointVisible, clipLine, interpolate, start) {\n return function(sink) {\n var line = clipLine(sink),\n ringBuffer = clipBuffer(),\n ringSink = clipLine(ringBuffer),\n polygonStarted = false,\n polygon,\n segments,\n ring;\n\n var clip = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() {\n clip.point = pointRing;\n clip.lineStart = ringStart;\n clip.lineEnd = ringEnd;\n segments = [];\n polygon = [];\n },\n polygonEnd: function() {\n clip.point = point;\n clip.lineStart = lineStart;\n clip.lineEnd = lineEnd;\n segments = merge(segments);\n var startInside = polygonContains(polygon, start);\n if (segments.length) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n clipRejoin(segments, compareIntersection, startInside, interpolate, sink);\n } else if (startInside) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n }\n if (polygonStarted) sink.polygonEnd(), polygonStarted = false;\n segments = polygon = null;\n },\n sphere: function() {\n sink.polygonStart();\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n sink.polygonEnd();\n }\n };\n\n function point(lambda, phi) {\n if (pointVisible(lambda, phi)) sink.point(lambda, phi);\n }\n\n function pointLine(lambda, phi) {\n line.point(lambda, phi);\n }\n\n function lineStart() {\n clip.point = pointLine;\n line.lineStart();\n }\n\n function lineEnd() {\n clip.point = point;\n line.lineEnd();\n }\n\n function pointRing(lambda, phi) {\n ring.push([lambda, phi]);\n ringSink.point(lambda, phi);\n }\n\n function ringStart() {\n ringSink.lineStart();\n ring = [];\n }\n\n function ringEnd() {\n pointRing(ring[0][0], ring[0][1]);\n ringSink.lineEnd();\n\n var clean = ringSink.clean(),\n ringSegments = ringBuffer.result(),\n i, n = ringSegments.length, m,\n segment,\n point;\n\n ring.pop();\n polygon.push(ring);\n ring = null;\n\n if (!n) return;\n\n // No intersections.\n if (clean & 1) {\n segment = ringSegments[0];\n if ((m = segment.length - 1) > 0) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);\n sink.lineEnd();\n }\n return;\n }\n\n // Rejoin connected segments.\n // TODO reuse ringBuffer.rejoin()?\n if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n\n segments.push(ringSegments.filter(validSegment));\n }\n\n return clip;\n };\n}\n\nfunction validSegment(segment) {\n return segment.length > 1;\n}\n\n// Intersections are sorted along the clip edge. For both antimeridian cutting\n// and circle clipping, the same comparison is used.\nfunction compareIntersection(a, b) {\n return ((a = a.x)[0] < 0 ? a[1] - halfPi - epsilon : halfPi - a[1])\n - ((b = b.x)[0] < 0 ? b[1] - halfPi - epsilon : halfPi - b[1]);\n}\n", "import clip from \"./index.js\";\nimport {abs, atan, cos, epsilon, halfPi, pi, sin} from \"../math.js\";\n\nexport default clip(\n function() { return true; },\n clipAntimeridianLine,\n clipAntimeridianInterpolate,\n [-pi, -halfPi]\n);\n\n// Takes a line and cuts into visible segments. Return values: 0 - there were\n// intersections or the line was empty; 1 - no intersections; 2 - there were\n// intersections, and the first and last segments should be rejoined.\nfunction clipAntimeridianLine(stream) {\n var lambda0 = NaN,\n phi0 = NaN,\n sign0 = NaN,\n clean; // no intersections\n\n return {\n lineStart: function() {\n stream.lineStart();\n clean = 1;\n },\n point: function(lambda1, phi1) {\n var sign1 = lambda1 > 0 ? pi : -pi,\n delta = abs(lambda1 - lambda0);\n if (abs(delta - pi) < epsilon) { // line crosses a pole\n stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi : -halfPi);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n stream.point(lambda1, phi0);\n clean = 0;\n } else if (sign0 !== sign1 && delta >= pi) { // line crosses antimeridian\n if (abs(lambda0 - sign0) < epsilon) lambda0 -= sign0 * epsilon; // handle degeneracies\n if (abs(lambda1 - sign1) < epsilon) lambda1 -= sign1 * epsilon;\n phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n clean = 0;\n }\n stream.point(lambda0 = lambda1, phi0 = phi1);\n sign0 = sign1;\n },\n lineEnd: function() {\n stream.lineEnd();\n lambda0 = phi0 = NaN;\n },\n clean: function() {\n return 2 - clean; // if intersections, rejoin first and last segments\n }\n };\n}\n\nfunction clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {\n var cosPhi0,\n cosPhi1,\n sinLambda0Lambda1 = sin(lambda0 - lambda1);\n return abs(sinLambda0Lambda1) > epsilon\n ? atan((sin(phi0) * (cosPhi1 = cos(phi1)) * sin(lambda1)\n - sin(phi1) * (cosPhi0 = cos(phi0)) * sin(lambda0))\n / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))\n : (phi0 + phi1) / 2;\n}\n\nfunction clipAntimeridianInterpolate(from, to, direction, stream) {\n var phi;\n if (from == null) {\n phi = direction * halfPi;\n stream.point(-pi, phi);\n stream.point(0, phi);\n stream.point(pi, phi);\n stream.point(pi, 0);\n stream.point(pi, -phi);\n stream.point(0, -phi);\n stream.point(-pi, -phi);\n stream.point(-pi, 0);\n stream.point(-pi, phi);\n } else if (abs(from[0] - to[0]) > epsilon) {\n var lambda = from[0] < to[0] ? pi : -pi;\n phi = direction * lambda / 2;\n stream.point(-lambda, phi);\n stream.point(0, phi);\n stream.point(lambda, phi);\n } else {\n stream.point(to[0], to[1]);\n }\n}\n", "import {abs, epsilon} from \"../math.js\";\nimport clipBuffer from \"./buffer.js\";\nimport clipLine from \"./line.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {merge} from \"d3-array\";\n\nvar clipMax = 1e9, clipMin = -clipMax;\n\n// TODO Use d3-polygon’s polygonContains here for the ring check?\n// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?\n\nexport default function clipRectangle(x0, y0, x1, y1) {\n\n function visible(x, y) {\n return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n }\n\n function interpolate(from, to, direction, stream) {\n var a = 0, a1 = 0;\n if (from == null\n || (a = corner(from, direction)) !== (a1 = corner(to, direction))\n || comparePoint(from, to) < 0 ^ direction > 0) {\n do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n while ((a = (a + direction + 4) % 4) !== a1);\n } else {\n stream.point(to[0], to[1]);\n }\n }\n\n function corner(p, direction) {\n return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3\n : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1\n : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0\n : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon\n }\n\n function compareIntersection(a, b) {\n return comparePoint(a.x, b.x);\n }\n\n function comparePoint(a, b) {\n var ca = corner(a, 1),\n cb = corner(b, 1);\n return ca !== cb ? ca - cb\n : ca === 0 ? b[1] - a[1]\n : ca === 1 ? a[0] - b[0]\n : ca === 2 ? a[1] - b[1]\n : b[0] - a[0];\n }\n\n return function(stream) {\n var activeStream = stream,\n bufferStream = clipBuffer(),\n segments,\n polygon,\n ring,\n x__, y__, v__, // first point\n x_, y_, v_, // previous point\n first,\n clean;\n\n var clipStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: polygonStart,\n polygonEnd: polygonEnd\n };\n\n function point(x, y) {\n if (visible(x, y)) activeStream.point(x, y);\n }\n\n function polygonInside() {\n var winding = 0;\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {\n a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];\n if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }\n else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }\n }\n }\n\n return winding;\n }\n\n // Buffer geometry within a polygon and then clip it en masse.\n function polygonStart() {\n activeStream = bufferStream, segments = [], polygon = [], clean = true;\n }\n\n function polygonEnd() {\n var startInside = polygonInside(),\n cleanInside = clean && startInside,\n visible = (segments = merge(segments)).length;\n if (cleanInside || visible) {\n stream.polygonStart();\n if (cleanInside) {\n stream.lineStart();\n interpolate(null, null, 1, stream);\n stream.lineEnd();\n }\n if (visible) {\n clipRejoin(segments, compareIntersection, startInside, interpolate, stream);\n }\n stream.polygonEnd();\n }\n activeStream = stream, segments = polygon = ring = null;\n }\n\n function lineStart() {\n clipStream.point = linePoint;\n if (polygon) polygon.push(ring = []);\n first = true;\n v_ = false;\n x_ = y_ = NaN;\n }\n\n // TODO rather than special-case polygons, simply handle them separately.\n // Ideally, coincident intersection points should be jittered to avoid\n // clipping issues.\n function lineEnd() {\n if (segments) {\n linePoint(x__, y__);\n if (v__ && v_) bufferStream.rejoin();\n segments.push(bufferStream.result());\n }\n clipStream.point = point;\n if (v_) activeStream.lineEnd();\n }\n\n function linePoint(x, y) {\n var v = visible(x, y);\n if (polygon) ring.push([x, y]);\n if (first) {\n x__ = x, y__ = y, v__ = v;\n first = false;\n if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n }\n } else {\n if (v && v_) activeStream.point(x, y);\n else {\n var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],\n b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];\n if (clipLine(a, b, x0, y0, x1, y1)) {\n if (!v_) {\n activeStream.lineStart();\n activeStream.point(a[0], a[1]);\n }\n activeStream.point(b[0], b[1]);\n if (!v) activeStream.lineEnd();\n clean = false;\n } else if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n clean = false;\n }\n }\n }\n x_ = x, y_ = y, v_ = v;\n }\n\n return clipStream;\n };\n}\n", "import {Adder} from \"d3-array\";\nimport {abs} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar areaSum = new Adder(),\n areaRingSum = new Adder(),\n x00,\n y00,\n x0,\n y0;\n\nvar areaStream = {\n point: noop,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: function() {\n areaStream.lineStart = areaRingStart;\n areaStream.lineEnd = areaRingEnd;\n },\n polygonEnd: function() {\n areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop;\n areaSum.add(abs(areaRingSum));\n areaRingSum = new Adder();\n },\n result: function() {\n var area = areaSum / 2;\n areaSum = new Adder();\n return area;\n }\n};\n\nfunction areaRingStart() {\n areaStream.point = areaPointFirst;\n}\n\nfunction areaPointFirst(x, y) {\n areaStream.point = areaPoint;\n x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction areaPoint(x, y) {\n areaRingSum.add(y0 * x - x0 * y);\n x0 = x, y0 = y;\n}\n\nfunction areaRingEnd() {\n areaPoint(x00, y00);\n}\n\nexport default areaStream;\n", "import noop from \"../noop.js\";\n\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n", "import {tau} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nexport default function PathContext(context) {\n this._context = context;\n}\n\nPathContext.prototype = {\n _radius: 4.5,\n pointRadius: function(_) {\n return this._radius = _, this;\n },\n polygonStart: function() {\n this._line = 0;\n },\n polygonEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line === 0) this._context.closePath();\n this._point = NaN;\n },\n point: function(x, y) {\n switch (this._point) {\n case 0: {\n this._context.moveTo(x, y);\n this._point = 1;\n break;\n }\n case 1: {\n this._context.lineTo(x, y);\n break;\n }\n default: {\n this._context.moveTo(x + this._radius, y);\n this._context.arc(x, y, this._radius, 0, tau);\n break;\n }\n }\n },\n result: noop\n};\n", "import {Adder} from \"d3-array\";\nimport {sqrt} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar lengthSum = new Adder(),\n lengthRing,\n x00,\n y00,\n x0,\n y0;\n\nvar lengthStream = {\n point: noop,\n lineStart: function() {\n lengthStream.point = lengthPointFirst;\n },\n lineEnd: function() {\n if (lengthRing) lengthPoint(x00, y00);\n lengthStream.point = noop;\n },\n polygonStart: function() {\n lengthRing = true;\n },\n polygonEnd: function() {\n lengthRing = null;\n },\n result: function() {\n var length = +lengthSum;\n lengthSum = new Adder();\n return length;\n }\n};\n\nfunction lengthPointFirst(x, y) {\n lengthStream.point = lengthPoint;\n x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n x0 -= x, y0 -= y;\n lengthSum.add(sqrt(x0 * x0 + y0 * y0));\n x0 = x, y0 = y;\n}\n\nexport default lengthStream;\n", "export default function(methods) {\n return {\n stream: transformer(methods)\n };\n}\n\nexport function transformer(methods) {\n return function(stream) {\n var s = new TransformStream;\n for (var key in methods) s[key] = methods[key];\n s.stream = stream;\n return s;\n };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n constructor: TransformStream,\n point: function(x, y) { this.stream.point(x, y); },\n sphere: function() { this.stream.sphere(); },\n lineStart: function() { this.stream.lineStart(); },\n lineEnd: function() { this.stream.lineEnd(); },\n polygonStart: function() { this.stream.polygonStart(); },\n polygonEnd: function() { this.stream.polygonEnd(); }\n};\n", "import {cartesian} from \"../cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, radians, sqrt} from \"../math.js\";\nimport {transformer} from \"../transform.js\";\n\nvar maxDepth = 16, // maximum depth of subdivision\n cosMinDistance = cos(30 * radians); // cos(minimum angular distance)\n\nexport default function(project, delta2) {\n return +delta2 ? resample(project, delta2) : resampleNone(project);\n}\n\nfunction resampleNone(project) {\n return transformer({\n point: function(x, y) {\n x = project(x, y);\n this.stream.point(x[0], x[1]);\n }\n });\n}\n\nfunction resample(project, delta2) {\n\n function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n var dx = x1 - x0,\n dy = y1 - y0,\n d2 = dx * dx + dy * dy;\n if (d2 > 4 * delta2 && depth--) {\n var a = a0 + a1,\n b = b0 + b1,\n c = c0 + c1,\n m = sqrt(a * a + b * b + c * c),\n phi2 = asin(c /= m),\n lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a),\n p = project(lambda2, phi2),\n x2 = p[0],\n y2 = p[1],\n dx2 = x2 - x0,\n dy2 = y2 - y0,\n dz = dy * dx2 - dx * dy2;\n if (dz * dz / d2 > delta2 // perpendicular projected distance\n || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n stream.point(x2, y2);\n resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n }\n }\n }\n return function(stream) {\n var lambda00, x00, y00, a00, b00, c00, // first point\n lambda0, x0, y0, a0, b0, c0; // previous point\n\n var resampleStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },\n polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }\n };\n\n function point(x, y) {\n x = project(x, y);\n stream.point(x[0], x[1]);\n }\n\n function lineStart() {\n x0 = NaN;\n resampleStream.point = linePoint;\n stream.lineStart();\n }\n\n function linePoint(lambda, phi) {\n var c = cartesian([lambda, phi]), p = project(lambda, phi);\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n stream.point(x0, y0);\n }\n\n function lineEnd() {\n resampleStream.point = point;\n stream.lineEnd();\n }\n\n function ringStart() {\n lineStart();\n resampleStream.point = ringPoint;\n resampleStream.lineEnd = ringEnd;\n }\n\n function ringPoint(lambda, phi) {\n linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n resampleStream.point = linePoint;\n }\n\n function ringEnd() {\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n resampleStream.lineEnd = lineEnd;\n lineEnd();\n }\n\n return resampleStream;\n };\n}\n", "import clipAntimeridian from \"../clip/antimeridian.js\";\nimport clipCircle from \"../clip/circle.js\";\nimport clipRectangle from \"../clip/rectangle.js\";\nimport compose from \"../compose.js\";\nimport identity from \"../identity.js\";\nimport {cos, degrees, radians, sin, sqrt} from \"../math.js\";\nimport {rotateRadians} from \"../rotation.js\";\nimport {transformer} from \"../transform.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\nimport resample from \"./resample.js\";\n\nvar transformRadians = transformer({\n point: function(x, y) {\n this.stream.point(x * radians, y * radians);\n }\n});\n\nfunction transformRotate(rotate) {\n return transformer({\n point: function(x, y) {\n var r = rotate(x, y);\n return this.stream.point(r[0], r[1]);\n }\n });\n}\n\nfunction scaleTranslate(k, dx, dy, sx, sy) {\n function transform(x, y) {\n x *= sx; y *= sy;\n return [dx + k * x, dy - k * y];\n }\n transform.invert = function(x, y) {\n return [(x - dx) / k * sx, (dy - y) / k * sy];\n };\n return transform;\n}\n\nfunction scaleTranslateRotate(k, dx, dy, sx, sy, alpha) {\n if (!alpha) return scaleTranslate(k, dx, dy, sx, sy);\n var cosAlpha = cos(alpha),\n sinAlpha = sin(alpha),\n a = cosAlpha * k,\n b = sinAlpha * k,\n ai = cosAlpha / k,\n bi = sinAlpha / k,\n ci = (sinAlpha * dy - cosAlpha * dx) / k,\n fi = (sinAlpha * dx + cosAlpha * dy) / k;\n function transform(x, y) {\n x *= sx; y *= sy;\n return [a * x - b * y + dx, dy - b * x - a * y];\n }\n transform.invert = function(x, y) {\n return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)];\n };\n return transform;\n}\n\nexport default function projection(project) {\n return projectionMutator(function() { return project; })();\n}\n\nexport function projectionMutator(projectAt) {\n var project,\n k = 150, // scale\n x = 480, y = 250, // translate\n lambda = 0, phi = 0, // center\n deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate\n alpha = 0, // post-rotate angle\n sx = 1, // reflectX\n sy = 1, // reflectX\n theta = null, preclip = clipAntimeridian, // pre-clip angle\n x0 = null, y0, x1, y1, postclip = identity, // post-clip extent\n delta2 = 0.5, // precision\n projectResample,\n projectTransform,\n projectRotateTransform,\n cache,\n cacheStream;\n\n function projection(point) {\n return projectRotateTransform(point[0] * radians, point[1] * radians);\n }\n\n function invert(point) {\n point = projectRotateTransform.invert(point[0], point[1]);\n return point && [point[0] * degrees, point[1] * degrees];\n }\n\n projection.stream = function(stream) {\n return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));\n };\n\n projection.preclip = function(_) {\n return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;\n };\n\n projection.postclip = function(_) {\n return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n };\n\n projection.clipAngle = function(_) {\n return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees;\n };\n\n projection.clipExtent = function(_) {\n return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n\n projection.scale = function(_) {\n return arguments.length ? (k = +_, recenter()) : k;\n };\n\n projection.translate = function(_) {\n return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];\n };\n\n projection.center = function(_) {\n return arguments.length ? (lambda = _[0] % 360 * radians, phi = _[1] % 360 * radians, recenter()) : [lambda * degrees, phi * degrees];\n };\n\n projection.rotate = function(_) {\n return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees, deltaPhi * degrees, deltaGamma * degrees];\n };\n\n projection.angle = function(_) {\n return arguments.length ? (alpha = _ % 360 * radians, recenter()) : alpha * degrees;\n };\n\n projection.reflectX = function(_) {\n return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0;\n };\n\n projection.reflectY = function(_) {\n return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0;\n };\n\n projection.precision = function(_) {\n return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2);\n };\n\n projection.fitExtent = function(extent, object) {\n return fitExtent(projection, extent, object);\n };\n\n projection.fitSize = function(size, object) {\n return fitSize(projection, size, object);\n };\n\n projection.fitWidth = function(width, object) {\n return fitWidth(projection, width, object);\n };\n\n projection.fitHeight = function(height, object) {\n return fitHeight(projection, height, object);\n };\n\n function recenter() {\n var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)),\n transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha);\n rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma);\n projectTransform = compose(project, transform);\n projectRotateTransform = compose(rotate, projectTransform);\n projectResample = resample(projectTransform, delta2);\n return reset();\n }\n\n function reset() {\n cache = cacheStream = null;\n return projection;\n }\n\n return function() {\n project = projectAt.apply(this, arguments);\n projection.invert = project.invert && invert;\n return recenter();\n };\n}\n", "import {asin, atan2, cos, sin, sqrt} from \"../math.js\";\n\nexport function azimuthalRaw(scale) {\n return function(x, y) {\n var cx = cos(x),\n cy = cos(y),\n k = scale(cx * cy);\n if (k === Infinity) return [2, 0];\n return [\n k * cy * sin(x),\n k * sin(y)\n ];\n }\n}\n\nexport function azimuthalInvert(angle) {\n return function(x, y) {\n var z = sqrt(x * x + y * y),\n c = angle(z),\n sc = sin(c),\n cc = cos(c);\n return [\n atan2(x * sc, z * cc),\n asin(z && y * sc / z)\n ];\n }\n}\n", "import {asin, sqrt} from \"../math.js\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport var azimuthalEqualAreaRaw = azimuthalRaw(function(cxcy) {\n return sqrt(2 / (1 + cxcy));\n});\n\nazimuthalEqualAreaRaw.invert = azimuthalInvert(function(z) {\n return 2 * asin(z / 2);\n});\n\nexport default function() {\n return projection(azimuthalEqualAreaRaw)\n .scale(124.75)\n .clipAngle(180 - 1e-3);\n}\n", "import {acos, sin} from \"../math.js\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport var azimuthalEquidistantRaw = azimuthalRaw(function(c) {\n return (c = acos(c)) && c / sin(c);\n});\n\nazimuthalEquidistantRaw.invert = azimuthalInvert(function(z) {\n return z;\n});\n\nexport default function() {\n return projection(azimuthalEquidistantRaw)\n .scale(79.4188)\n .clipAngle(180 - 1e-3);\n}\n", "import {atan, exp, halfPi, log, pi, tan, tau} from \"../math.js\";\nimport rotation from \"../rotation.js\";\nimport projection from \"./index.js\";\n\nexport function mercatorRaw(lambda, phi) {\n return [lambda, log(tan((halfPi + phi) / 2))];\n}\n\nmercatorRaw.invert = function(x, y) {\n return [x, 2 * atan(exp(y)) - halfPi];\n};\n\nexport default function() {\n return mercatorProjection(mercatorRaw)\n .scale(961 / tau);\n}\n\nexport function mercatorProjection(project) {\n var m = projection(project),\n center = m.center,\n scale = m.scale,\n translate = m.translate,\n clipExtent = m.clipExtent,\n x0 = null, y0, x1, y1; // clip extent\n\n m.scale = function(_) {\n return arguments.length ? (scale(_), reclip()) : scale();\n };\n\n m.translate = function(_) {\n return arguments.length ? (translate(_), reclip()) : translate();\n };\n\n m.center = function(_) {\n return arguments.length ? (center(_), reclip()) : center();\n };\n\n m.clipExtent = function(_) {\n return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n\n function reclip() {\n var k = pi * scale(),\n t = m(rotation(m.rotate()).invert([0, 0]));\n return clipExtent(x0 == null\n ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw\n ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]]\n : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]);\n }\n\n return reclip();\n}\n", "import projection from \"./index.js\";\n\nexport function equirectangularRaw(lambda, phi) {\n return [lambda, phi];\n}\n\nequirectangularRaw.invert = equirectangularRaw;\n\nexport default function() {\n return projection(equirectangularRaw)\n .scale(152.63);\n}\n", "import projection from \"./index.js\";\nimport {abs, asin, cos, epsilon2, sin, sqrt} from \"../math.js\";\n\nvar A1 = 1.340264,\n A2 = -0.081106,\n A3 = 0.000893,\n A4 = 0.003796,\n M = sqrt(3) / 2,\n iterations = 12;\n\nexport function equalEarthRaw(lambda, phi) {\n var l = asin(M * sin(phi)), l2 = l * l, l6 = l2 * l2 * l2;\n return [\n lambda * cos(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))),\n l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2))\n ];\n}\n\nequalEarthRaw.invert = function(x, y) {\n var l = y, l2 = l * l, l6 = l2 * l2 * l2;\n for (var i = 0, delta, fy, fpy; i < iterations; ++i) {\n fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y;\n fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2);\n l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2;\n if (abs(delta) < epsilon2) break;\n }\n return [\n M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / cos(l),\n asin(sin(l) / M)\n ];\n};\n\nexport default function() {\n return projection(equalEarthRaw)\n .scale(177.158);\n}\n", "import {atan, cos, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function gnomonicRaw(x, y) {\n var cy = cos(y), k = cos(x) * cy;\n return [cy * sin(x) / k, sin(y) / k];\n}\n\ngnomonicRaw.invert = azimuthalInvert(atan);\n\nexport default function() {\n return projection(gnomonicRaw)\n .scale(144.049)\n .clipAngle(60);\n}\n", "import projection from \"./index.js\";\nimport {abs, epsilon} from \"../math.js\";\n\nexport function naturalEarth1Raw(lambda, phi) {\n var phi2 = phi * phi, phi4 = phi2 * phi2;\n return [\n lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))),\n phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4)))\n ];\n}\n\nnaturalEarth1Raw.invert = function(x, y) {\n var phi = y, i = 25, delta;\n do {\n var phi2 = phi * phi, phi4 = phi2 * phi2;\n phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) /\n (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4)));\n } while (abs(delta) > epsilon && --i > 0);\n return [\n x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))),\n phi\n ];\n};\n\nexport default function() {\n return projection(naturalEarth1Raw)\n .scale(175.295);\n}\n", "import {asin, cos, epsilon, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function orthographicRaw(x, y) {\n return [cos(y) * sin(x), sin(y)];\n}\n\northographicRaw.invert = azimuthalInvert(asin);\n\nexport default function() {\n return projection(orthographicRaw)\n .scale(249.5)\n .clipAngle(90 + epsilon);\n}\n", "import {atan, cos, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function stereographicRaw(x, y) {\n var cy = cos(y), k = 1 + cos(x) * cy;\n return [cy * sin(x) / k, sin(y) / k];\n}\n\nstereographicRaw.invert = azimuthalInvert(function(z) {\n return 2 * atan(z);\n});\n\nexport default function() {\n return projection(stereographicRaw)\n .scale(250)\n .clipAngle(142);\n}\n", "import {atan, exp, halfPi, log, tan} from \"../math.js\";\nimport {mercatorProjection} from \"./mercator.js\";\n\nexport function transverseMercatorRaw(lambda, phi) {\n return [log(tan((halfPi + phi) / 2)), -lambda];\n}\n\ntransverseMercatorRaw.invert = function(x, y) {\n return [-y, 2 * atan(exp(x)) - halfPi];\n};\n\nexport default function() {\n var m = mercatorProjection(transverseMercatorRaw),\n center = m.center,\n rotate = m.rotate;\n\n m.center = function(_) {\n return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]);\n };\n\n m.rotate = function(_) {\n return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]);\n };\n\n return rotate([0, 0, 90])\n .scale(159.155);\n}\n", "function count(node) {\n var sum = 0,\n children = node.children,\n i = children && children.length;\n if (!i) sum = 1;\n else while (--i >= 0) sum += children[i].value;\n node.value = sum;\n}\n\nexport default function() {\n return this.eachAfter(count);\n}\n", "export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n", "export default function(callback, that) {\n var node = this, nodes = [node], children, i, index = -1;\n while (node = nodes.pop()) {\n callback.call(that, node, ++index, this);\n if (children = node.children) {\n for (i = children.length - 1; i >= 0; --i) {\n nodes.push(children[i]);\n }\n }\n }\n return this;\n}\n", "export default function(callback, that) {\n var node = this, nodes = [node], next = [], children, i, n, index = -1;\n while (node = nodes.pop()) {\n next.push(node);\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n nodes.push(children[i]);\n }\n }\n }\n while (node = next.pop()) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n", "export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n if (callback.call(that, node, ++index, this)) {\n return node;\n }\n }\n}\n", "export default function(value) {\n return this.eachAfter(function(node) {\n var sum = +value(node.data) || 0,\n children = node.children,\n i = children && children.length;\n while (--i >= 0) sum += children[i].value;\n node.value = sum;\n });\n}\n", "export default function(compare) {\n return this.eachBefore(function(node) {\n if (node.children) {\n node.children.sort(compare);\n }\n });\n}\n", "export default function(end) {\n var start = this,\n ancestor = leastCommonAncestor(start, end),\n nodes = [start];\n while (start !== ancestor) {\n start = start.parent;\n nodes.push(start);\n }\n var k = nodes.length;\n while (end !== ancestor) {\n nodes.splice(k, 0, end);\n end = end.parent;\n }\n return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n if (a === b) return a;\n var aNodes = a.ancestors(),\n bNodes = b.ancestors(),\n c = null;\n a = aNodes.pop();\n b = bNodes.pop();\n while (a === b) {\n c = a;\n a = aNodes.pop();\n b = bNodes.pop();\n }\n return c;\n}\n", "export default function() {\n var node = this, nodes = [node];\n while (node = node.parent) {\n nodes.push(node);\n }\n return nodes;\n}\n", "export default function() {\n return Array.from(this);\n}\n", "export default function() {\n var leaves = [];\n this.eachBefore(function(node) {\n if (!node.children) {\n leaves.push(node);\n }\n });\n return leaves;\n}\n", "export default function() {\n var root = this, links = [];\n root.each(function(node) {\n if (node !== root) { // Don’t include the root’s parent, if any.\n links.push({source: node.parent, target: node});\n }\n });\n return links;\n}\n", "export default function*() {\n var node = this, current, next = [node], children, i, n;\n do {\n current = next.reverse(), next = [];\n while (node = current.pop()) {\n yield node;\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n next.push(children[i]);\n }\n }\n }\n } while (next.length);\n}\n", "import node_count from \"./count.js\";\nimport node_each from \"./each.js\";\nimport node_eachBefore from \"./eachBefore.js\";\nimport node_eachAfter from \"./eachAfter.js\";\nimport node_find from \"./find.js\";\nimport node_sum from \"./sum.js\";\nimport node_sort from \"./sort.js\";\nimport node_path from \"./path.js\";\nimport node_ancestors from \"./ancestors.js\";\nimport node_descendants from \"./descendants.js\";\nimport node_leaves from \"./leaves.js\";\nimport node_links from \"./links.js\";\nimport node_iterator from \"./iterator.js\";\n\nexport default function hierarchy(data, children) {\n if (data instanceof Map) {\n data = [undefined, data];\n if (children === undefined) children = mapChildren;\n } else if (children === undefined) {\n children = objectChildren;\n }\n\n var root = new Node(data),\n node,\n nodes = [root],\n child,\n childs,\n i,\n n;\n\n while (node = nodes.pop()) {\n if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) {\n node.children = childs;\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = childs[i] = new Node(childs[i]));\n child.parent = node;\n child.depth = node.depth + 1;\n }\n }\n }\n\n return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n return hierarchy(this).eachBefore(copyData);\n}\n\nfunction objectChildren(d) {\n return d.children;\n}\n\nfunction mapChildren(d) {\n return Array.isArray(d) ? d[1] : null;\n}\n\nfunction copyData(node) {\n if (node.data.value !== undefined) node.value = node.data.value;\n node.data = node.data.data;\n}\n\nexport function computeHeight(node) {\n var height = 0;\n do node.height = height;\n while ((node = node.parent) && (node.height < ++height));\n}\n\nexport function Node(data) {\n this.data = data;\n this.depth =\n this.height = 0;\n this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n constructor: Node,\n count: node_count,\n each: node_each,\n eachAfter: node_eachAfter,\n eachBefore: node_eachBefore,\n find: node_find,\n sum: node_sum,\n sort: node_sort,\n path: node_path,\n ancestors: node_ancestors,\n descendants: node_descendants,\n leaves: node_leaves,\n links: node_links,\n copy: node_copy,\n [Symbol.iterator]: node_iterator\n};\n", "export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (x1 - x0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.y0 = y0, node.y1 = y1;\n node.x0 = x0, node.x1 = x0 += node.value * k;\n }\n}\n", "import {Node} from \"./hierarchy/index.js\";\n\nfunction defaultSeparation(a, b) {\n return a.parent === b.parent ? 1 : 2;\n}\n\n// function radialSeparation(a, b) {\n// return (a.parent === b.parent ? 1 : 2) / a.depth;\n// }\n\n// This function is used to traverse the left contour of a subtree (or\n// subforest). It returns the successor of v on this contour. This successor is\n// either given by the leftmost child of v or by the thread of v. The function\n// returns null if and only if v is on the highest level of its subtree.\nfunction nextLeft(v) {\n var children = v.children;\n return children ? children[0] : v.t;\n}\n\n// This function works analogously to nextLeft.\nfunction nextRight(v) {\n var children = v.children;\n return children ? children[children.length - 1] : v.t;\n}\n\n// Shifts the current subtree rooted at w+. This is done by increasing\n// prelim(w+) and mod(w+) by shift.\nfunction moveSubtree(wm, wp, shift) {\n var change = shift / (wp.i - wm.i);\n wp.c -= change;\n wp.s += shift;\n wm.c += change;\n wp.z += shift;\n wp.m += shift;\n}\n\n// All other shifts, applied to the smaller subtrees between w- and w+, are\n// performed by this function. To prepare the shifts, we have to adjust\n// change(w+), shift(w+), and change(w-).\nfunction executeShifts(v) {\n var shift = 0,\n change = 0,\n children = v.children,\n i = children.length,\n w;\n while (--i >= 0) {\n w = children[i];\n w.z += shift;\n w.m += shift;\n shift += w.s + (change += w.c);\n }\n}\n\n// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise,\n// returns the specified (default) ancestor.\nfunction nextAncestor(vim, v, ancestor) {\n return vim.a.parent === v.parent ? vim.a : ancestor;\n}\n\nfunction TreeNode(node, i) {\n this._ = node;\n this.parent = null;\n this.children = null;\n this.A = null; // default ancestor\n this.a = this; // ancestor\n this.z = 0; // prelim\n this.m = 0; // mod\n this.c = 0; // change\n this.s = 0; // shift\n this.t = null; // thread\n this.i = i; // number\n}\n\nTreeNode.prototype = Object.create(Node.prototype);\n\nfunction treeRoot(root) {\n var tree = new TreeNode(root, 0),\n node,\n nodes = [tree],\n child,\n children,\n i,\n n;\n\n while (node = nodes.pop()) {\n if (children = node._.children) {\n node.children = new Array(n = children.length);\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = node.children[i] = new TreeNode(children[i], i));\n child.parent = node;\n }\n }\n }\n\n (tree.parent = new TreeNode(null, 0)).children = [tree];\n return tree;\n}\n\n// Node-link tree diagram using the Reingold-Tilford \"tidy\" algorithm\nexport default function() {\n var separation = defaultSeparation,\n dx = 1,\n dy = 1,\n nodeSize = null;\n\n function tree(root) {\n var t = treeRoot(root);\n\n // Compute the layout using Buchheim et al.’s algorithm.\n t.eachAfter(firstWalk), t.parent.m = -t.z;\n t.eachBefore(secondWalk);\n\n // If a fixed node size is specified, scale x and y.\n if (nodeSize) root.eachBefore(sizeNode);\n\n // If a fixed tree size is specified, scale x and y based on the extent.\n // Compute the left-most, right-most, and depth-most nodes for extents.\n else {\n var left = root,\n right = root,\n bottom = root;\n root.eachBefore(function(node) {\n if (node.x < left.x) left = node;\n if (node.x > right.x) right = node;\n if (node.depth > bottom.depth) bottom = node;\n });\n var s = left === right ? 1 : separation(left, right) / 2,\n tx = s - left.x,\n kx = dx / (right.x + s + tx),\n ky = dy / (bottom.depth || 1);\n root.eachBefore(function(node) {\n node.x = (node.x + tx) * kx;\n node.y = node.depth * ky;\n });\n }\n\n return root;\n }\n\n // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is\n // applied recursively to the children of v, as well as the function\n // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the\n // node v is placed to the midpoint of its outermost children.\n function firstWalk(v) {\n var children = v.children,\n siblings = v.parent.children,\n w = v.i ? siblings[v.i - 1] : null;\n if (children) {\n executeShifts(v);\n var midpoint = (children[0].z + children[children.length - 1].z) / 2;\n if (w) {\n v.z = w.z + separation(v._, w._);\n v.m = v.z - midpoint;\n } else {\n v.z = midpoint;\n }\n } else if (w) {\n v.z = w.z + separation(v._, w._);\n }\n v.parent.A = apportion(v, w, v.parent.A || siblings[0]);\n }\n\n // Computes all real x-coordinates by summing up the modifiers recursively.\n function secondWalk(v) {\n v._.x = v.z + v.parent.m;\n v.m += v.parent.m;\n }\n\n // The core of the algorithm. Here, a new subtree is combined with the\n // previous subtrees. Threads are used to traverse the inside and outside\n // contours of the left and right subtree up to the highest common level. The\n // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the\n // superscript o means outside and i means inside, the subscript - means left\n // subtree and + means right subtree. For summing up the modifiers along the\n // contour, we use respective variables si+, si-, so-, and so+. Whenever two\n // nodes of the inside contours conflict, we compute the left one of the\n // greatest uncommon ancestors using the function ANCESTOR and call MOVE\n // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees.\n // Finally, we add a new thread (if necessary).\n function apportion(v, w, ancestor) {\n if (w) {\n var vip = v,\n vop = v,\n vim = w,\n vom = vip.parent.children[0],\n sip = vip.m,\n sop = vop.m,\n sim = vim.m,\n som = vom.m,\n shift;\n while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) {\n vom = nextLeft(vom);\n vop = nextRight(vop);\n vop.a = v;\n shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);\n if (shift > 0) {\n moveSubtree(nextAncestor(vim, v, ancestor), v, shift);\n sip += shift;\n sop += shift;\n }\n sim += vim.m;\n sip += vip.m;\n som += vom.m;\n sop += vop.m;\n }\n if (vim && !nextRight(vop)) {\n vop.t = vim;\n vop.m += sim - sop;\n }\n if (vip && !nextLeft(vom)) {\n vom.t = vip;\n vom.m += sip - som;\n ancestor = v;\n }\n }\n return ancestor;\n }\n\n function sizeNode(node) {\n node.x *= dx;\n node.y = node.depth * dy;\n }\n\n tree.separation = function(x) {\n return arguments.length ? (separation = x, tree) : separation;\n };\n\n tree.size = function(x) {\n return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]);\n };\n\n tree.nodeSize = function(x) {\n return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null);\n };\n\n return tree;\n}\n", "export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (y1 - y0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.x0 = x0, node.x1 = x1;\n node.y0 = y0, node.y1 = y0 += node.value * k;\n }\n}\n", "import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\n\nexport var phi = (1 + Math.sqrt(5)) / 2;\n\nexport function squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n var rows = [],\n nodes = parent.children,\n row,\n nodeValue,\n i0 = 0,\n i1 = 0,\n n = nodes.length,\n dx, dy,\n value = parent.value,\n sumValue,\n minValue,\n maxValue,\n newRatio,\n minRatio,\n alpha,\n beta;\n\n while (i0 < n) {\n dx = x1 - x0, dy = y1 - y0;\n\n // Find the next non-empty node.\n do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);\n minValue = maxValue = sumValue;\n alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n beta = sumValue * sumValue * alpha;\n minRatio = Math.max(maxValue / beta, beta / minValue);\n\n // Keep adding nodes while the aspect ratio maintains or improves.\n for (; i1 < n; ++i1) {\n sumValue += nodeValue = nodes[i1].value;\n if (nodeValue < minValue) minValue = nodeValue;\n if (nodeValue > maxValue) maxValue = nodeValue;\n beta = sumValue * sumValue * alpha;\n newRatio = Math.max(maxValue / beta, beta / minValue);\n if (newRatio > minRatio) { sumValue -= nodeValue; break; }\n minRatio = newRatio;\n }\n\n // Position and record the row orientation.\n rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});\n if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n value -= sumValue, i0 = i1;\n }\n\n return rows;\n}\n\nexport default (function custom(ratio) {\n\n function squarify(parent, x0, y0, x1, y1) {\n squarifyRatio(ratio, parent, x0, y0, x1, y1);\n }\n\n squarify.ratio = function(x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return squarify;\n})(phi);\n", "import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\nimport {phi, squarifyRatio} from \"./squarify.js\";\n\nexport default (function custom(ratio) {\n\n function resquarify(parent, x0, y0, x1, y1) {\n if ((rows = parent._squarify) && (rows.ratio === ratio)) {\n var rows,\n row,\n nodes,\n i,\n j = -1,\n n,\n m = rows.length,\n value = parent.value;\n\n while (++j < m) {\n row = rows[j], nodes = row.children;\n for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value;\n if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += (y1 - y0) * row.value / value : y1);\n else treemapSlice(row, x0, y0, value ? x0 += (x1 - x0) * row.value / value : x1, y1);\n value -= row.value;\n }\n } else {\n parent._squarify = rows = squarifyRatio(ratio, parent, x0, y0, x1, y1);\n rows.ratio = ratio;\n }\n }\n\n resquarify.ratio = function(x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return resquarify;\n})(phi);\n", "export default Math.random;\n", "import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomUniform(source) {\n function randomUniform(min, max) {\n min = min == null ? 0 : +min;\n max = max == null ? 1 : +max;\n if (arguments.length === 1) max = min, min = 0;\n else max -= min;\n return function() {\n return source() * max + min;\n };\n }\n\n randomUniform.source = sourceRandomUniform;\n\n return randomUniform;\n})(defaultSource);\n", "import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomInt(source) {\n function randomInt(min, max) {\n if (arguments.length < 2) max = min, min = 0;\n min = Math.floor(min);\n max = Math.floor(max) - min;\n return function() {\n return Math.floor(source() * max + min);\n };\n }\n\n randomInt.source = sourceRandomInt;\n\n return randomInt;\n})(defaultSource);\n", "import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomNormal(source) {\n function randomNormal(mu, sigma) {\n var x, r;\n mu = mu == null ? 0 : +mu;\n sigma = sigma == null ? 1 : +sigma;\n return function() {\n var y;\n\n // If available, use the second previously-generated uniform random.\n if (x != null) y = x, x = null;\n\n // Otherwise, generate a new x and y.\n else do {\n x = source() * 2 - 1;\n y = source() * 2 - 1;\n r = x * x + y * y;\n } while (!r || r > 1);\n\n return mu + sigma * y * Math.sqrt(-2 * Math.log(r) / r);\n };\n }\n\n randomNormal.source = sourceRandomNormal;\n\n return randomNormal;\n})(defaultSource);\n", "import defaultSource from \"./defaultSource.js\";\nimport normal from \"./normal.js\";\n\nexport default (function sourceRandomLogNormal(source) {\n var N = normal.source(source);\n\n function randomLogNormal() {\n var randomNormal = N.apply(this, arguments);\n return function() {\n return Math.exp(randomNormal());\n };\n }\n\n randomLogNormal.source = sourceRandomLogNormal;\n\n return randomLogNormal;\n})(defaultSource);\n", "import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomIrwinHall(source) {\n function randomIrwinHall(n) {\n if ((n = +n) <= 0) return () => 0;\n return function() {\n for (var sum = 0, i = n; i > 1; --i) sum += source();\n return sum + i * source();\n };\n }\n\n randomIrwinHall.source = sourceRandomIrwinHall;\n\n return randomIrwinHall;\n})(defaultSource);\n", "import defaultSource from \"./defaultSource.js\";\nimport irwinHall from \"./irwinHall.js\";\n\nexport default (function sourceRandomBates(source) {\n var I = irwinHall.source(source);\n\n function randomBates(n) {\n // use limiting distribution at n === 0\n if ((n = +n) === 0) return source;\n var randomIrwinHall = I(n);\n return function() {\n return randomIrwinHall() / n;\n };\n }\n\n randomBates.source = sourceRandomBates;\n\n return randomBates;\n})(defaultSource);\n", "import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomExponential(source) {\n function randomExponential(lambda) {\n return function() {\n return -Math.log1p(-source()) / lambda;\n };\n }\n\n randomExponential.source = sourceRandomExponential;\n\n return randomExponential;\n})(defaultSource);\n", "import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomPareto(source) {\n function randomPareto(alpha) {\n if ((alpha = +alpha) < 0) throw new RangeError(\"invalid alpha\");\n alpha = 1 / -alpha;\n return function() {\n return Math.pow(1 - source(), alpha);\n };\n }\n\n randomPareto.source = sourceRandomPareto;\n\n return randomPareto;\n})(defaultSource);\n", "import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomBernoulli(source) {\n function randomBernoulli(p) {\n if ((p = +p) < 0 || p > 1) throw new RangeError(\"invalid p\");\n return function() {\n return Math.floor(source() + p);\n };\n }\n\n randomBernoulli.source = sourceRandomBernoulli;\n\n return randomBernoulli;\n})(defaultSource);\n", "import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomGeometric(source) {\n function randomGeometric(p) {\n if ((p = +p) < 0 || p > 1) throw new RangeError(\"invalid p\");\n if (p === 0) return () => Infinity;\n if (p === 1) return () => 1;\n p = Math.log1p(-p);\n return function() {\n return 1 + Math.floor(Math.log1p(-source()) / p);\n };\n }\n\n randomGeometric.source = sourceRandomGeometric;\n\n return randomGeometric;\n})(defaultSource);\n", "import defaultSource from \"./defaultSource.js\";\nimport normal from \"./normal.js\";\n\nexport default (function sourceRandomGamma(source) {\n var randomNormal = normal.source(source)();\n\n function randomGamma(k, theta) {\n if ((k = +k) < 0) throw new RangeError(\"invalid k\");\n // degenerate distribution if k === 0\n if (k === 0) return () => 0;\n theta = theta == null ? 1 : +theta;\n // exponential distribution if k === 1\n if (k === 1) return () => -Math.log1p(-source()) * theta;\n\n var d = (k < 1 ? k + 1 : k) - 1 / 3,\n c = 1 / (3 * Math.sqrt(d)),\n multiplier = k < 1 ? () => Math.pow(source(), 1 / k) : () => 1;\n return function() {\n do {\n do {\n var x = randomNormal(),\n v = 1 + c * x;\n } while (v <= 0);\n v *= v * v;\n var u = 1 - source();\n } while (u >= 1 - 0.0331 * x * x * x * x && Math.log(u) >= 0.5 * x * x + d * (1 - v + Math.log(v)));\n return d * v * multiplier() * theta;\n };\n }\n\n randomGamma.source = sourceRandomGamma;\n\n return randomGamma;\n})(defaultSource);\n", "import defaultSource from \"./defaultSource.js\";\nimport gamma from \"./gamma.js\";\n\nexport default (function sourceRandomBeta(source) {\n var G = gamma.source(source);\n\n function randomBeta(alpha, beta) {\n var X = G(alpha),\n Y = G(beta);\n return function() {\n var x = X();\n return x === 0 ? 0 : x / (x + Y());\n };\n }\n\n randomBeta.source = sourceRandomBeta;\n\n return randomBeta;\n})(defaultSource);\n", "import defaultSource from \"./defaultSource.js\";\nimport beta from \"./beta.js\";\nimport geometric from \"./geometric.js\";\n\nexport default (function sourceRandomBinomial(source) {\n var G = geometric.source(source),\n B = beta.source(source);\n\n function randomBinomial(n, p) {\n n = +n;\n if ((p = +p) >= 1) return () => n;\n if (p <= 0) return () => 0;\n return function() {\n var acc = 0, nn = n, pp = p;\n while (nn * pp > 16 && nn * (1 - pp) > 16) {\n var i = Math.floor((nn + 1) * pp),\n y = B(i, nn - i + 1)();\n if (y <= pp) {\n acc += i;\n nn -= i;\n pp = (pp - y) / (1 - y);\n } else {\n nn = i - 1;\n pp /= y;\n }\n }\n var sign = pp < 0.5,\n pFinal = sign ? pp : 1 - pp,\n g = G(pFinal);\n for (var s = g(), k = 0; s <= nn; ++k) s += g();\n return acc + (sign ? k : nn - k);\n };\n }\n\n randomBinomial.source = sourceRandomBinomial;\n\n return randomBinomial;\n})(defaultSource);\n", "import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomWeibull(source) {\n function randomWeibull(k, a, b) {\n var outerFunc;\n if ((k = +k) === 0) {\n outerFunc = x => -Math.log(x);\n } else {\n k = 1 / k;\n outerFunc = x => Math.pow(x, k);\n }\n a = a == null ? 0 : +a;\n b = b == null ? 1 : +b;\n return function() {\n return a + b * outerFunc(-Math.log1p(-source()));\n };\n }\n\n randomWeibull.source = sourceRandomWeibull;\n\n return randomWeibull;\n})(defaultSource);\n", "import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomCauchy(source) {\n function randomCauchy(a, b) {\n a = a == null ? 0 : +a;\n b = b == null ? 1 : +b;\n return function() {\n return a + b * Math.tan(Math.PI * source());\n };\n }\n\n randomCauchy.source = sourceRandomCauchy;\n\n return randomCauchy;\n})(defaultSource);\n", "import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomLogistic(source) {\n function randomLogistic(a, b) {\n a = a == null ? 0 : +a;\n b = b == null ? 1 : +b;\n return function() {\n var u = source();\n return a + b * Math.log(u / (1 - u));\n };\n }\n\n randomLogistic.source = sourceRandomLogistic;\n\n return randomLogistic;\n})(defaultSource);\n", "import defaultSource from \"./defaultSource.js\";\nimport binomial from \"./binomial.js\";\nimport gamma from \"./gamma.js\";\n\nexport default (function sourceRandomPoisson(source) {\n var G = gamma.source(source),\n B = binomial.source(source);\n\n function randomPoisson(lambda) {\n return function() {\n var acc = 0, l = lambda;\n while (l > 16) {\n var n = Math.floor(0.875 * l),\n t = G(n)();\n if (t > l) return acc + B(n - 1, l / t)();\n acc += n;\n l -= t;\n }\n for (var s = -Math.log1p(-source()), k = 0; s <= l; ++k) s -= Math.log1p(-source());\n return acc + k;\n };\n }\n\n randomPoisson.source = sourceRandomPoisson;\n\n return randomPoisson;\n})(defaultSource);\n", "// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use\nconst mul = 0x19660D;\nconst inc = 0x3C6EF35F;\nconst eps = 1 / 0x100000000;\n\nexport default function lcg(seed = Math.random()) {\n let state = (0 <= seed && seed < 1 ? seed / eps : Math.abs(seed)) | 0;\n return () => (state = mul * state + inc | 0, eps * (state >>> 0));\n}\n", "export function Transform(k, x, y) {\n this.k = k;\n this.x = x;\n this.y = y;\n}\n\nTransform.prototype = {\n constructor: Transform,\n scale: function(k) {\n return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n },\n translate: function(x, y) {\n return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n },\n apply: function(point) {\n return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n },\n applyX: function(x) {\n return x * this.k + this.x;\n },\n applyY: function(y) {\n return y * this.k + this.y;\n },\n invert: function(location) {\n return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n },\n invertX: function(x) {\n return (x - this.x) / this.k;\n },\n invertY: function(y) {\n return (y - this.y) / this.k;\n },\n rescaleX: function(x) {\n return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n },\n rescaleY: function(y) {\n return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n },\n toString: function() {\n return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n }\n};\n\nexport var identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nexport default function transform(node) {\n while (!node.__zoom) if (!(node = node.parentNode)) return identity;\n return node.__zoom;\n}\n", "const {\n entries,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor,\n} = Object;\n\nlet { freeze, seal, create } = Object; // eslint-disable-line import/no-mutable-exports\nlet { apply, construct } = typeof Reflect !== 'undefined' && Reflect;\n\nif (!apply) {\n apply = function (fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n}\n\nif (!freeze) {\n freeze = function (x) {\n return x;\n };\n}\n\nif (!seal) {\n seal = function (x) {\n return x;\n };\n}\n\nif (!construct) {\n construct = function (Func, args) {\n return new Func(...args);\n };\n}\n\nconst arrayForEach = unapply(Array.prototype.forEach);\nconst arrayIndexOf = unapply(Array.prototype.indexOf);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nconst arraySlice = unapply(Array.prototype.slice);\n\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\n\nconst regExpTest = unapply(RegExp.prototype.test);\n\nconst typeErrorCreate = unconstruct(TypeError);\n\nexport function unapply(func) {\n return (thisArg, ...args) => apply(func, thisArg, args);\n}\n\nexport function unconstruct(func) {\n return (...args) => construct(func, args);\n}\n\n/* Add properties to a lookup table */\nexport function addToSet(set, array, transformCaseFunc) {\n transformCaseFunc = transformCaseFunc ?? stringToLowerCase;\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n let l = array.length;\n while (l--) {\n let element = array[l];\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n}\n\n/* Shallow clone an object */\nexport function clone(object) {\n const newObject = create(null);\n\n for (const [property, value] of entries(object)) {\n newObject[property] = value;\n }\n\n return newObject;\n}\n\n/* This method automatically checks if the prop is function\n * or getter and behaves accordingly. */\nfunction lookupGetter(object, prop) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n}\n\nexport {\n // Array\n arrayForEach,\n arrayIndexOf,\n arrayPop,\n arrayPush,\n arraySlice,\n // Object\n entries,\n freeze,\n getPrototypeOf,\n getOwnPropertyDescriptor,\n isFrozen,\n setPrototypeOf,\n seal,\n // RegExp\n regExpTest,\n // String\n stringIndexOf,\n stringMatch,\n stringReplace,\n stringToLowerCase,\n stringToString,\n stringTrim,\n // Errors\n typeErrorCreate,\n // Other\n lookupGetter,\n};\n", "import { freeze } from './utils.js';\n\nexport const html = freeze([\n 'a',\n 'abbr',\n 'acronym',\n 'address',\n 'area',\n 'article',\n 'aside',\n 'audio',\n 'b',\n 'bdi',\n 'bdo',\n 'big',\n 'blink',\n 'blockquote',\n 'body',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n 'center',\n 'cite',\n 'code',\n 'col',\n 'colgroup',\n 'content',\n 'data',\n 'datalist',\n 'dd',\n 'decorator',\n 'del',\n 'details',\n 'dfn',\n 'dialog',\n 'dir',\n 'div',\n 'dl',\n 'dt',\n 'element',\n 'em',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'font',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'head',\n 'header',\n 'hgroup',\n 'hr',\n 'html',\n 'i',\n 'img',\n 'input',\n 'ins',\n 'kbd',\n 'label',\n 'legend',\n 'li',\n 'main',\n 'map',\n 'mark',\n 'marquee',\n 'menu',\n 'menuitem',\n 'meter',\n 'nav',\n 'nobr',\n 'ol',\n 'optgroup',\n 'option',\n 'output',\n 'p',\n 'picture',\n 'pre',\n 'progress',\n 'q',\n 'rp',\n 'rt',\n 'ruby',\n 's',\n 'samp',\n 'section',\n 'select',\n 'shadow',\n 'small',\n 'source',\n 'spacer',\n 'span',\n 'strike',\n 'strong',\n 'style',\n 'sub',\n 'summary',\n 'sup',\n 'table',\n 'tbody',\n 'td',\n 'template',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'time',\n 'tr',\n 'track',\n 'tt',\n 'u',\n 'ul',\n 'var',\n 'video',\n 'wbr',\n]);\n\n// SVG\nexport const svg = freeze([\n 'svg',\n 'a',\n 'altglyph',\n 'altglyphdef',\n 'altglyphitem',\n 'animatecolor',\n 'animatemotion',\n 'animatetransform',\n 'circle',\n 'clippath',\n 'defs',\n 'desc',\n 'ellipse',\n 'filter',\n 'font',\n 'g',\n 'glyph',\n 'glyphref',\n 'hkern',\n 'image',\n 'line',\n 'lineargradient',\n 'marker',\n 'mask',\n 'metadata',\n 'mpath',\n 'path',\n 'pattern',\n 'polygon',\n 'polyline',\n 'radialgradient',\n 'rect',\n 'stop',\n 'style',\n 'switch',\n 'symbol',\n 'text',\n 'textpath',\n 'title',\n 'tref',\n 'tspan',\n 'view',\n 'vkern',\n]);\n\nexport const svgFilters = freeze([\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feDropShadow',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n]);\n\n// List of SVG elements that are disallowed by default.\n// We still need to know them so that we can do namespace\n// checks properly in case one wants to add them to\n// allow-list.\nexport const svgDisallowed = freeze([\n 'animate',\n 'color-profile',\n 'cursor',\n 'discard',\n 'font-face',\n 'font-face-format',\n 'font-face-name',\n 'font-face-src',\n 'font-face-uri',\n 'foreignobject',\n 'hatch',\n 'hatchpath',\n 'mesh',\n 'meshgradient',\n 'meshpatch',\n 'meshrow',\n 'missing-glyph',\n 'script',\n 'set',\n 'solidcolor',\n 'unknown',\n 'use',\n]);\n\nexport const mathMl = freeze([\n 'math',\n 'menclose',\n 'merror',\n 'mfenced',\n 'mfrac',\n 'mglyph',\n 'mi',\n 'mlabeledtr',\n 'mmultiscripts',\n 'mn',\n 'mo',\n 'mover',\n 'mpadded',\n 'mphantom',\n 'mroot',\n 'mrow',\n 'ms',\n 'mspace',\n 'msqrt',\n 'mstyle',\n 'msub',\n 'msup',\n 'msubsup',\n 'mtable',\n 'mtd',\n 'mtext',\n 'mtr',\n 'munder',\n 'munderover',\n 'mprescripts',\n]);\n\n// Similarly to SVG, we want to know all MathML elements,\n// even those that we disallow by default.\nexport const mathMlDisallowed = freeze([\n 'maction',\n 'maligngroup',\n 'malignmark',\n 'mlongdiv',\n 'mscarries',\n 'mscarry',\n 'msgroup',\n 'mstack',\n 'msline',\n 'msrow',\n 'semantics',\n 'annotation',\n 'annotation-xml',\n 'mprescripts',\n 'none',\n]);\n\nexport const text = freeze(['#text']);\n", "import { freeze } from './utils.js';\n\nexport const html = freeze([\n 'accept',\n 'action',\n 'align',\n 'alt',\n 'autocapitalize',\n 'autocomplete',\n 'autopictureinpicture',\n 'autoplay',\n 'background',\n 'bgcolor',\n 'border',\n 'capture',\n 'cellpadding',\n 'cellspacing',\n 'checked',\n 'cite',\n 'class',\n 'clear',\n 'color',\n 'cols',\n 'colspan',\n 'controls',\n 'controlslist',\n 'coords',\n 'crossorigin',\n 'datetime',\n 'decoding',\n 'default',\n 'dir',\n 'disabled',\n 'disablepictureinpicture',\n 'disableremoteplayback',\n 'download',\n 'draggable',\n 'enctype',\n 'enterkeyhint',\n 'face',\n 'for',\n 'headers',\n 'height',\n 'hidden',\n 'high',\n 'href',\n 'hreflang',\n 'id',\n 'inputmode',\n 'integrity',\n 'ismap',\n 'kind',\n 'label',\n 'lang',\n 'list',\n 'loading',\n 'loop',\n 'low',\n 'max',\n 'maxlength',\n 'media',\n 'method',\n 'min',\n 'minlength',\n 'multiple',\n 'muted',\n 'name',\n 'nonce',\n 'noshade',\n 'novalidate',\n 'nowrap',\n 'open',\n 'optimum',\n 'pattern',\n 'placeholder',\n 'playsinline',\n 'poster',\n 'preload',\n 'pubdate',\n 'radiogroup',\n 'readonly',\n 'rel',\n 'required',\n 'rev',\n 'reversed',\n 'role',\n 'rows',\n 'rowspan',\n 'spellcheck',\n 'scope',\n 'selected',\n 'shape',\n 'size',\n 'sizes',\n 'span',\n 'srclang',\n 'start',\n 'src',\n 'srcset',\n 'step',\n 'style',\n 'summary',\n 'tabindex',\n 'title',\n 'translate',\n 'type',\n 'usemap',\n 'valign',\n 'value',\n 'width',\n 'xmlns',\n 'slot',\n]);\n\nexport const svg = freeze([\n 'accent-height',\n 'accumulate',\n 'additive',\n 'alignment-baseline',\n 'ascent',\n 'attributename',\n 'attributetype',\n 'azimuth',\n 'basefrequency',\n 'baseline-shift',\n 'begin',\n 'bias',\n 'by',\n 'class',\n 'clip',\n 'clippathunits',\n 'clip-path',\n 'clip-rule',\n 'color',\n 'color-interpolation',\n 'color-interpolation-filters',\n 'color-profile',\n 'color-rendering',\n 'cx',\n 'cy',\n 'd',\n 'dx',\n 'dy',\n 'diffuseconstant',\n 'direction',\n 'display',\n 'divisor',\n 'dur',\n 'edgemode',\n 'elevation',\n 'end',\n 'fill',\n 'fill-opacity',\n 'fill-rule',\n 'filter',\n 'filterunits',\n 'flood-color',\n 'flood-opacity',\n 'font-family',\n 'font-size',\n 'font-size-adjust',\n 'font-stretch',\n 'font-style',\n 'font-variant',\n 'font-weight',\n 'fx',\n 'fy',\n 'g1',\n 'g2',\n 'glyph-name',\n 'glyphref',\n 'gradientunits',\n 'gradienttransform',\n 'height',\n 'href',\n 'id',\n 'image-rendering',\n 'in',\n 'in2',\n 'k',\n 'k1',\n 'k2',\n 'k3',\n 'k4',\n 'kerning',\n 'keypoints',\n 'keysplines',\n 'keytimes',\n 'lang',\n 'lengthadjust',\n 'letter-spacing',\n 'kernelmatrix',\n 'kernelunitlength',\n 'lighting-color',\n 'local',\n 'marker-end',\n 'marker-mid',\n 'marker-start',\n 'markerheight',\n 'markerunits',\n 'markerwidth',\n 'maskcontentunits',\n 'maskunits',\n 'max',\n 'mask',\n 'media',\n 'method',\n 'mode',\n 'min',\n 'name',\n 'numoctaves',\n 'offset',\n 'operator',\n 'opacity',\n 'order',\n 'orient',\n 'orientation',\n 'origin',\n 'overflow',\n 'paint-order',\n 'path',\n 'pathlength',\n 'patterncontentunits',\n 'patterntransform',\n 'patternunits',\n 'points',\n 'preservealpha',\n 'preserveaspectratio',\n 'primitiveunits',\n 'r',\n 'rx',\n 'ry',\n 'radius',\n 'refx',\n 'refy',\n 'repeatcount',\n 'repeatdur',\n 'restart',\n 'result',\n 'rotate',\n 'scale',\n 'seed',\n 'shape-rendering',\n 'specularconstant',\n 'specularexponent',\n 'spreadmethod',\n 'startoffset',\n 'stddeviation',\n 'stitchtiles',\n 'stop-color',\n 'stop-opacity',\n 'stroke-dasharray',\n 'stroke-dashoffset',\n 'stroke-linecap',\n 'stroke-linejoin',\n 'stroke-miterlimit',\n 'stroke-opacity',\n 'stroke',\n 'stroke-width',\n 'style',\n 'surfacescale',\n 'systemlanguage',\n 'tabindex',\n 'targetx',\n 'targety',\n 'transform',\n 'transform-origin',\n 'text-anchor',\n 'text-decoration',\n 'text-rendering',\n 'textlength',\n 'type',\n 'u1',\n 'u2',\n 'unicode',\n 'values',\n 'viewbox',\n 'visibility',\n 'version',\n 'vert-adv-y',\n 'vert-origin-x',\n 'vert-origin-y',\n 'width',\n 'word-spacing',\n 'wrap',\n 'writing-mode',\n 'xchannelselector',\n 'ychannelselector',\n 'x',\n 'x1',\n 'x2',\n 'xmlns',\n 'y',\n 'y1',\n 'y2',\n 'z',\n 'zoomandpan',\n]);\n\nexport const mathMl = freeze([\n 'accent',\n 'accentunder',\n 'align',\n 'bevelled',\n 'close',\n 'columnsalign',\n 'columnlines',\n 'columnspan',\n 'denomalign',\n 'depth',\n 'dir',\n 'display',\n 'displaystyle',\n 'encoding',\n 'fence',\n 'frame',\n 'height',\n 'href',\n 'id',\n 'largeop',\n 'length',\n 'linethickness',\n 'lspace',\n 'lquote',\n 'mathbackground',\n 'mathcolor',\n 'mathsize',\n 'mathvariant',\n 'maxsize',\n 'minsize',\n 'movablelimits',\n 'notation',\n 'numalign',\n 'open',\n 'rowalign',\n 'rowlines',\n 'rowspacing',\n 'rowspan',\n 'rspace',\n 'rquote',\n 'scriptlevel',\n 'scriptminsize',\n 'scriptsizemultiplier',\n 'selection',\n 'separator',\n 'separators',\n 'stretchy',\n 'subscriptshift',\n 'supscriptshift',\n 'symmetric',\n 'voffset',\n 'width',\n 'xmlns',\n]);\n\nexport const xml = freeze([\n 'xlink:href',\n 'xml:id',\n 'xlink:title',\n 'xml:space',\n 'xmlns:xlink',\n]);\n", "import { seal } from './utils.js';\n\n// eslint-disable-next-line unicorn/better-regex\nexport const MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\nexport const ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\nexport const TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\nexport const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\nexport const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\nexport const IS_ALLOWED_URI = seal(\n /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nexport const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nexport const ATTR_WHITESPACE = seal(\n /[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n);\nexport const DOCTYPE_NAME = seal(/^html$/i);\n", "import * as TAGS from './tags.js';\nimport * as ATTRS from './attrs.js';\nimport * as EXPRESSIONS from './regexp.js';\nimport {\n addToSet,\n clone,\n entries,\n freeze,\n arrayForEach,\n arrayPop,\n arrayPush,\n stringMatch,\n stringReplace,\n stringToLowerCase,\n stringToString,\n stringIndexOf,\n stringTrim,\n regExpTest,\n typeErrorCreate,\n lookupGetter,\n} from './utils.js';\n\nconst getGlobal = () => (typeof window === 'undefined' ? null : window);\n\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\nconst _createTrustedTypesPolicy = function (trustedTypes, purifyHostElement) {\n if (\n typeof trustedTypes !== 'object' ||\n typeof trustedTypes.createPolicy !== 'function'\n ) {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n createScriptURL(scriptUrl) {\n return scriptUrl;\n },\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn(\n 'TrustedTypes policy ' + policyName + ' could not be created.'\n );\n return null;\n }\n};\n\nfunction createDOMPurify(window = getGlobal()) {\n const DOMPurify = (root) => createDOMPurify(root);\n\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = VERSION;\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n\n return DOMPurify;\n }\n\n const originalDocument = window.document;\n const currentScript = originalDocument.currentScript;\n\n let { document } = window;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes,\n } = window;\n\n const ElementPrototype = Element.prototype;\n\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n let trustedTypesPolicy;\n let emptyHTML = '';\n\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName,\n } = document;\n const { importNode } = originalDocument;\n\n let hooks = {};\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported =\n typeof entries === 'function' &&\n typeof getParentNode === 'function' &&\n implementation &&\n implementation.createHTMLDocument !== undefined;\n\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE,\n } = EXPRESSIONS;\n\n let { IS_ALLOWED_URI } = EXPRESSIONS;\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [\n ...TAGS.html,\n ...TAGS.svg,\n ...TAGS.svgFilters,\n ...TAGS.mathMl,\n ...TAGS.text,\n ]);\n\n /* Allowed attribute names */\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [\n ...ATTRS.html,\n ...ATTRS.svg,\n ...ATTRS.mathMl,\n ...ATTRS.xml,\n ]);\n\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n let CUSTOM_ELEMENT_HANDLING = Object.seal(\n Object.create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false,\n },\n })\n );\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n let FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n let FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n let ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n let ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n let SAFE_FOR_TEMPLATES = false;\n\n /* Decide if document with ... should be returned */\n let WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n let SET_CONFIG = false;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n let FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n let RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n let RETURN_DOM_FRAGMENT = false;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n let RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n let SANITIZE_DOM = true;\n\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\n /* Keep element content when removing element? */\n let KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n let IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n let USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, [\n 'annotation-xml',\n 'audio',\n 'colgroup',\n 'desc',\n 'foreignobject',\n 'head',\n 'iframe',\n 'math',\n 'mi',\n 'mn',\n 'mo',\n 'ms',\n 'mtext',\n 'noembed',\n 'noframes',\n 'noscript',\n 'plaintext',\n 'script',\n 'style',\n 'svg',\n 'template',\n 'thead',\n 'title',\n 'video',\n 'xmp',\n ]);\n\n /* Tags that are safe for data: URIs */\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, [\n 'audio',\n 'video',\n 'img',\n 'source',\n 'image',\n 'track',\n ]);\n\n /* Attributes safe for values like \"javascript:\" */\n let URI_SAFE_ATTRIBUTES = null;\n const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, [\n 'alt',\n 'class',\n 'for',\n 'id',\n 'label',\n 'name',\n 'pattern',\n 'placeholder',\n 'role',\n 'summary',\n 'title',\n 'value',\n 'style',\n 'xmlns',\n ]);\n\n const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n\n /* Allowed XHTML+XML namespaces */\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet(\n {},\n [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE],\n stringToString\n );\n\n /* Parsing of strict XHTML documents */\n let PARSER_MEDIA_TYPE;\n const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n let transformCaseFunc;\n\n /* Keep a reference to config to pass to hooks */\n let CONFIG = null;\n\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n\n const formElement = document.createElement('form');\n\n const isRegexOrFunction = function (testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n const _parseConfig = function (cfg) {\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n\n /* Shield configuration object from tampering */\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n\n PARSER_MEDIA_TYPE =\n // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1\n ? (PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE)\n : (PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE);\n\n // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n transformCaseFunc =\n PARSER_MEDIA_TYPE === 'application/xhtml+xml'\n ? stringToString\n : stringToLowerCase;\n\n /* Set configuration parameters */\n ALLOWED_TAGS =\n 'ALLOWED_TAGS' in cfg\n ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc)\n : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR =\n 'ALLOWED_ATTR' in cfg\n ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc)\n : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES =\n 'ALLOWED_NAMESPACES' in cfg\n ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString)\n : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES =\n 'ADD_URI_SAFE_ATTR' in cfg\n ? addToSet(\n clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS =\n 'ADD_DATA_URI_TAGS' in cfg\n ? addToSet(\n clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS =\n 'FORBID_CONTENTS' in cfg\n ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc)\n : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS =\n 'FORBID_TAGS' in cfg\n ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc)\n : {};\n FORBID_ATTR =\n 'FORBID_ATTR' in cfg\n ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc)\n : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI = cfg.ALLOWED_URI_REGEXP || EXPRESSIONS.IS_ALLOWED_URI;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n if (\n cfg.CUSTOM_ELEMENT_HANDLING &&\n isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)\n ) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck =\n cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n\n if (\n cfg.CUSTOM_ELEMENT_HANDLING &&\n isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)\n ) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck =\n cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n\n if (\n cfg.CUSTOM_ELEMENT_HANDLING &&\n typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements ===\n 'boolean'\n ) {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements =\n cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, [...TAGS.text]);\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, TAGS.html);\n addToSet(ALLOWED_ATTR, ATTRS.html);\n }\n\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, TAGS.svg);\n addToSet(ALLOWED_ATTR, ATTRS.svg);\n addToSet(ALLOWED_ATTR, ATTRS.xml);\n }\n\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, TAGS.svgFilters);\n addToSet(ALLOWED_ATTR, ATTRS.svg);\n addToSet(ALLOWED_ATTR, ATTRS.xml);\n }\n\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, TAGS.mathMl);\n addToSet(ALLOWED_ATTR, ATTRS.mathMl);\n addToSet(ALLOWED_ATTR, ATTRS.xml);\n }\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n\n if (cfg.TRUSTED_TYPES_POLICY) {\n if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n throw typeErrorCreate(\n 'TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.'\n );\n }\n\n if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n throw typeErrorCreate(\n 'TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.'\n );\n }\n\n // Overwrite existing TrustedTypes policy.\n trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n\n // Sign local variables required by `sanitize`.\n emptyHTML = trustedTypesPolicy.createHTML('');\n } else {\n // Uninitialized policy, attempt to initialize the internal dompurify policy.\n if (trustedTypesPolicy === undefined) {\n trustedTypesPolicy = _createTrustedTypesPolicy(\n trustedTypes,\n currentScript\n );\n }\n\n // If creating the internal policy succeeded sign internal variables.\n if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n emptyHTML = trustedTypesPolicy.createHTML('');\n }\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n\n CONFIG = cfg;\n };\n\n const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, [\n 'mi',\n 'mo',\n 'mn',\n 'ms',\n 'mtext',\n ]);\n\n const HTML_INTEGRATION_POINTS = addToSet({}, [\n 'foreignobject',\n 'desc',\n 'title',\n 'annotation-xml',\n ]);\n\n // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, [\n 'title',\n 'style',\n 'font',\n 'a',\n 'script',\n ]);\n\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n const ALL_SVG_TAGS = addToSet({}, TAGS.svg);\n addToSet(ALL_SVG_TAGS, TAGS.svgFilters);\n addToSet(ALL_SVG_TAGS, TAGS.svgDisallowed);\n\n const ALL_MATHML_TAGS = addToSet({}, TAGS.mathMl);\n addToSet(ALL_MATHML_TAGS, TAGS.mathMlDisallowed);\n\n /**\n *\n *\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n const _checkValidNamespace = function (element) {\n let parent = getParentNode(element);\n\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template',\n };\n }\n\n const tagName = stringToLowerCase(element.tagName);\n const parentTagName = stringToLowerCase(parent.tagName);\n\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via