@unovis/ts 1.7.0-pre.1 → 1.7.0-pre.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- var css_248z = ".leaflet-image-layer,.leaflet-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane,.leaflet-pane>canvas,.leaflet-pane>svg,.leaflet-tile,.leaflet-tile-container,.leaflet-zoom-box{left:0;position:absolute;top:0}.leaflet-container{overflow:hidden}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{height:1600px;-webkit-transform-origin:0 0;width:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-overlay-pane svg,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer{max-height:none!important;max-width:none!important}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{-moz-box-sizing:border-box;box-sizing:border-box;height:0;width:0;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-overlay-pane{z-index:1}.leaflet-vml-shape{height:1px;width:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{pointer-events:visiblePainted;pointer-events:auto;position:relative;z-index:800}.leaflet-bottom,.leaflet-top{pointer-events:none;position:absolute;z-index:1}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{clear:both;float:left}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-tile{will-change:opacity}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1);will-change:transform}.leaflet-pan-anim .leaflet-tile,.leaflet-zoom-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-image-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-image-layer.leaflet-interactive,.leaflet-marker-icon.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#dfe5eb;outline:0}.leaflet-container a{color:#0078a8}.leaflet-container a.leaflet-active{outline:2px solid orange}.leaflet-zoom-box{background:rgba(255,255,255,.5);border:2px dotted #38f}.leaflet-container{font:12px/1.5 Helvetica Neue,Arial,Helvetica,sans-serif}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.65)}.leaflet-bar a,.leaflet-bar a:hover{background-color:#fff;border-bottom:1px solid rgba(130,130,130,.2);color:#000;display:block;height:26px;line-height:26px;text-align:center;text-decoration:none;width:26px}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.leaflet-bar a.leaflet-disabled{background-color:#f4f4f4;color:#bbb;cursor:default}.leaflet-touch .leaflet-bar a{height:30px;line-height:30px;width:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px rgba(0,0,0,.4)}.leaflet-touch .leaflet-control-layers-toggle{height:44px;width:44px}.leaflet-control-layers-expanded .leaflet-control-layers-toggle,.leaflet-control-layers .leaflet-control-layers-list{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{background:#fff;color:#333;padding:6px 10px 6px 6px}.leaflet-control-layers-scrollbar{overflow-x:hidden;overflow-y:scroll;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -10px 5px -6px}.leaflet-container .leaflet-control-attribution{background:#fff;background:hsla(0,0%,100%,.7);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;padding:0 5px}.leaflet-control-attribution a{color:#333;font-size:7pt;opacity:.6;text-decoration:none}.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-container .leaflet-control-attribution,.leaflet-container .leaflet-control-scale{font-size:11px}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{background:#fff;background:hsla(0,0%,100%,.5);border:2px solid #777;border-top:none;-moz-box-sizing:border-box;box-sizing:border-box;font-size:11px;line-height:1.1;overflow:hidden;padding:2px 5px 1px;white-space:nowrap}.leaflet-control-scale-line:not(:first-child){border-bottom:none;border-top:2px solid #777;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{background-clip:padding-box;border:1px solid rgba(0,0,0,.15)}.leaflet-popup{margin-bottom:20px;position:absolute;text-align:center}.leaflet-popup-content-wrapper{border-radius:12px;padding:1px;text-align:left}.leaflet-popup-content{line-height:1.4;margin:13px 19px}.leaflet-popup-content p{margin:18px 0}.leaflet-popup-tip-container{height:20px;left:50%;margin-left:-20px;overflow:hidden;pointer-events:none;position:absolute;width:40px}.leaflet-popup-tip{height:17px;margin:-10px auto 0;padding:1px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);width:17px}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4);color:#333}.leaflet-container a.leaflet-popup-close-button{background:transparent;border:none;color:#c3c3c3;font:16px/14px Tahoma,Verdana,sans-serif;font-weight:700;height:14px;padding:4px 4px 0 0;position:absolute;right:0;text-align:center;text-decoration:none;top:0;width:18px}.leaflet-container a.leaflet-popup-close-button:hover{color:#999}.leaflet-popup-scrolled{border-bottom:1px solid #ddd;border-top:1px solid #ddd;overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678,M12=0.70710678,M21=-0.70710678,M22=0.70710678);margin:0 auto;width:24px}.leaflet-oldie .leaflet-popup-tip-container{margin-top:-1px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{background-color:#fff;border:1px solid #fff;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.4);color:#222;padding:6px;pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.leaflet-tooltip.leaflet-clickable{cursor:pointer;pointer-events:auto}.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before,.leaflet-tooltip-top:before{background:transparent;border:6px solid transparent;content:\"\";pointer-events:none;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{border-top-color:#fff;bottom:0;margin-bottom:-12px}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-left:-6px;margin-top:-12px;top:0}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-left-color:#fff;margin-right:-12px;right:0}.leaflet-tooltip-right:before{border-right-color:#fff;left:0;margin-left:-12px}";
2
- var stylesheet=".leaflet-image-layer,.leaflet-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane,.leaflet-pane>canvas,.leaflet-pane>svg,.leaflet-tile,.leaflet-tile-container,.leaflet-zoom-box{left:0;position:absolute;top:0}.leaflet-container{overflow:hidden}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{height:1600px;-webkit-transform-origin:0 0;width:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-overlay-pane svg,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer{max-height:none!important;max-width:none!important}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{-moz-box-sizing:border-box;box-sizing:border-box;height:0;width:0;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-overlay-pane{z-index:1}.leaflet-vml-shape{height:1px;width:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{pointer-events:visiblePainted;pointer-events:auto;position:relative;z-index:800}.leaflet-bottom,.leaflet-top{pointer-events:none;position:absolute;z-index:1}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{clear:both;float:left}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-tile{will-change:opacity}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1);will-change:transform}.leaflet-pan-anim .leaflet-tile,.leaflet-zoom-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-image-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-image-layer.leaflet-interactive,.leaflet-marker-icon.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#dfe5eb;outline:0}.leaflet-container a{color:#0078a8}.leaflet-container a.leaflet-active{outline:2px solid orange}.leaflet-zoom-box{background:rgba(255,255,255,.5);border:2px dotted #38f}.leaflet-container{font:12px/1.5 Helvetica Neue,Arial,Helvetica,sans-serif}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.65)}.leaflet-bar a,.leaflet-bar a:hover{background-color:#fff;border-bottom:1px solid rgba(130,130,130,.2);color:#000;display:block;height:26px;line-height:26px;text-align:center;text-decoration:none;width:26px}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.leaflet-bar a.leaflet-disabled{background-color:#f4f4f4;color:#bbb;cursor:default}.leaflet-touch .leaflet-bar a{height:30px;line-height:30px;width:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px rgba(0,0,0,.4)}.leaflet-touch .leaflet-control-layers-toggle{height:44px;width:44px}.leaflet-control-layers-expanded .leaflet-control-layers-toggle,.leaflet-control-layers .leaflet-control-layers-list{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{background:#fff;color:#333;padding:6px 10px 6px 6px}.leaflet-control-layers-scrollbar{overflow-x:hidden;overflow-y:scroll;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -10px 5px -6px}.leaflet-container .leaflet-control-attribution{background:#fff;background:hsla(0,0%,100%,.7);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;padding:0 5px}.leaflet-control-attribution a{color:#333;font-size:7pt;opacity:.6;text-decoration:none}.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-container .leaflet-control-attribution,.leaflet-container .leaflet-control-scale{font-size:11px}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{background:#fff;background:hsla(0,0%,100%,.5);border:2px solid #777;border-top:none;-moz-box-sizing:border-box;box-sizing:border-box;font-size:11px;line-height:1.1;overflow:hidden;padding:2px 5px 1px;white-space:nowrap}.leaflet-control-scale-line:not(:first-child){border-bottom:none;border-top:2px solid #777;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{background-clip:padding-box;border:1px solid rgba(0,0,0,.15)}.leaflet-popup{margin-bottom:20px;position:absolute;text-align:center}.leaflet-popup-content-wrapper{border-radius:12px;padding:1px;text-align:left}.leaflet-popup-content{line-height:1.4;margin:13px 19px}.leaflet-popup-content p{margin:18px 0}.leaflet-popup-tip-container{height:20px;left:50%;margin-left:-20px;overflow:hidden;pointer-events:none;position:absolute;width:40px}.leaflet-popup-tip{height:17px;margin:-10px auto 0;padding:1px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);width:17px}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4);color:#333}.leaflet-container a.leaflet-popup-close-button{background:transparent;border:none;color:#c3c3c3;font:16px/14px Tahoma,Verdana,sans-serif;font-weight:700;height:14px;padding:4px 4px 0 0;position:absolute;right:0;text-align:center;text-decoration:none;top:0;width:18px}.leaflet-container a.leaflet-popup-close-button:hover{color:#999}.leaflet-popup-scrolled{border-bottom:1px solid #ddd;border-top:1px solid #ddd;overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678,M12=0.70710678,M21=-0.70710678,M22=0.70710678);margin:0 auto;width:24px}.leaflet-oldie .leaflet-popup-tip-container{margin-top:-1px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{background-color:#fff;border:1px solid #fff;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.4);color:#222;padding:6px;pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.leaflet-tooltip.leaflet-clickable{cursor:pointer;pointer-events:auto}.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before,.leaflet-tooltip-top:before{background:transparent;border:6px solid transparent;content:\"\";pointer-events:none;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{border-top-color:#fff;bottom:0;margin-bottom:-12px}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-left:-6px;margin-top:-12px;top:0}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-left-color:#fff;margin-right:-12px;right:0}.leaflet-tooltip-right:before{border-right-color:#fff;left:0;margin-left:-12px}";
1
+ var css_248z = ".leaflet-image-layer,.leaflet-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane,.leaflet-pane>canvas,.leaflet-pane>svg,.leaflet-tile,.leaflet-tile-container,.leaflet-zoom-box{left:0;position:absolute;top:0}.leaflet-container{overflow:hidden}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{height:1600px;-webkit-transform-origin:0 0;width:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-overlay-pane svg,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer{max-height:none!important;max-width:none!important}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{-moz-box-sizing:border-box;box-sizing:border-box;height:0;width:0;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-overlay-pane{z-index:1}.leaflet-vml-shape{height:1px;width:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{pointer-events:visiblePainted;pointer-events:auto;position:relative;z-index:800}.leaflet-bottom,.leaflet-top{pointer-events:none;position:absolute;z-index:1}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{clear:both;float:left}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-tile{will-change:opacity}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1);will-change:transform}.leaflet-pan-anim .leaflet-tile,.leaflet-zoom-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-image-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-image-layer.leaflet-interactive,.leaflet-marker-icon.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#dfe5eb;outline:0}.leaflet-container a{color:#0078a8}.leaflet-container a.leaflet-active{outline:2px solid orange}.leaflet-zoom-box{background:hsla(0,0%,100%,.5);border:2px dotted #38f}.leaflet-container{font:12px/1.5 Helvetica Neue,Arial,Helvetica,sans-serif}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.65)}.leaflet-bar a,.leaflet-bar a:hover{background-color:#fff;border-bottom:1px solid hsla(0,0%,51%,.2);color:#000;display:block;height:26px;line-height:26px;text-align:center;text-decoration:none;width:26px}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.leaflet-bar a.leaflet-disabled{background-color:#f4f4f4;color:#bbb;cursor:default}.leaflet-touch .leaflet-bar a{height:30px;line-height:30px;width:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px rgba(0,0,0,.4)}.leaflet-touch .leaflet-control-layers-toggle{height:44px;width:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{background:#fff;color:#333;padding:6px 10px 6px 6px}.leaflet-control-layers-scrollbar{overflow-x:hidden;overflow-y:scroll;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -10px 5px -6px}.leaflet-container .leaflet-control-attribution{background:#fff;background:hsla(0,0%,100%,.7);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;padding:0 5px}.leaflet-control-attribution a{color:#333;font-size:7pt;opacity:.6;text-decoration:none}.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-container .leaflet-control-attribution,.leaflet-container .leaflet-control-scale{font-size:11px}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{background:#fff;background:hsla(0,0%,100%,.5);border:2px solid #777;border-top:none;-moz-box-sizing:border-box;box-sizing:border-box;font-size:11px;line-height:1.1;overflow:hidden;padding:2px 5px 1px;white-space:nowrap}.leaflet-control-scale-line:not(:first-child){border-bottom:none;border-top:2px solid #777;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{background-clip:padding-box;border:1px solid rgba(0,0,0,.15)}.leaflet-popup{margin-bottom:20px;position:absolute;text-align:center}.leaflet-popup-content-wrapper{border-radius:12px;padding:1px;text-align:left}.leaflet-popup-content{line-height:1.4;margin:13px 19px}.leaflet-popup-content p{margin:18px 0}.leaflet-popup-tip-container{height:20px;left:50%;margin-left:-20px;overflow:hidden;pointer-events:none;position:absolute;width:40px}.leaflet-popup-tip{height:17px;margin:-10px auto 0;padding:1px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);width:17px}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4);color:#333}.leaflet-container a.leaflet-popup-close-button{background:transparent;border:none;color:#c3c3c3;font:16px/14px Tahoma,Verdana,sans-serif;font-weight:700;height:14px;padding:4px 4px 0 0;position:absolute;right:0;text-align:center;text-decoration:none;top:0;width:18px}.leaflet-container a.leaflet-popup-close-button:hover{color:#999}.leaflet-popup-scrolled{border-bottom:1px solid #ddd;border-top:1px solid #ddd;overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678,M12=0.70710678,M21=-0.70710678,M22=0.70710678);margin:0 auto;width:24px}.leaflet-oldie .leaflet-popup-tip-container{margin-top:-1px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{background-color:#fff;border:1px solid #fff;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.4);color:#222;padding:6px;pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.leaflet-tooltip.leaflet-clickable{cursor:pointer;pointer-events:auto}.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before,.leaflet-tooltip-top:before{background:transparent;border:6px solid transparent;content:\"\";pointer-events:none;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{border-top-color:#fff;bottom:0;margin-bottom:-12px}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-left:-6px;margin-top:-12px;top:0}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-left-color:#fff;margin-right:-12px;right:0}.leaflet-tooltip-right:before{border-right-color:#fff;left:0;margin-left:-12px}";
2
+ var stylesheet=".leaflet-image-layer,.leaflet-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane,.leaflet-pane>canvas,.leaflet-pane>svg,.leaflet-tile,.leaflet-tile-container,.leaflet-zoom-box{left:0;position:absolute;top:0}.leaflet-container{overflow:hidden}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{height:1600px;-webkit-transform-origin:0 0;width:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-overlay-pane svg,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer{max-height:none!important;max-width:none!important}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{-moz-box-sizing:border-box;box-sizing:border-box;height:0;width:0;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-overlay-pane{z-index:1}.leaflet-vml-shape{height:1px;width:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{pointer-events:visiblePainted;pointer-events:auto;position:relative;z-index:800}.leaflet-bottom,.leaflet-top{pointer-events:none;position:absolute;z-index:1}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{clear:both;float:left}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-tile{will-change:opacity}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1);will-change:transform}.leaflet-pan-anim .leaflet-tile,.leaflet-zoom-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-image-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-image-layer.leaflet-interactive,.leaflet-marker-icon.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#dfe5eb;outline:0}.leaflet-container a{color:#0078a8}.leaflet-container a.leaflet-active{outline:2px solid orange}.leaflet-zoom-box{background:hsla(0,0%,100%,.5);border:2px dotted #38f}.leaflet-container{font:12px/1.5 Helvetica Neue,Arial,Helvetica,sans-serif}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.65)}.leaflet-bar a,.leaflet-bar a:hover{background-color:#fff;border-bottom:1px solid hsla(0,0%,51%,.2);color:#000;display:block;height:26px;line-height:26px;text-align:center;text-decoration:none;width:26px}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.leaflet-bar a.leaflet-disabled{background-color:#f4f4f4;color:#bbb;cursor:default}.leaflet-touch .leaflet-bar a{height:30px;line-height:30px;width:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px rgba(0,0,0,.4)}.leaflet-touch .leaflet-control-layers-toggle{height:44px;width:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{background:#fff;color:#333;padding:6px 10px 6px 6px}.leaflet-control-layers-scrollbar{overflow-x:hidden;overflow-y:scroll;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -10px 5px -6px}.leaflet-container .leaflet-control-attribution{background:#fff;background:hsla(0,0%,100%,.7);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;padding:0 5px}.leaflet-control-attribution a{color:#333;font-size:7pt;opacity:.6;text-decoration:none}.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-container .leaflet-control-attribution,.leaflet-container .leaflet-control-scale{font-size:11px}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{background:#fff;background:hsla(0,0%,100%,.5);border:2px solid #777;border-top:none;-moz-box-sizing:border-box;box-sizing:border-box;font-size:11px;line-height:1.1;overflow:hidden;padding:2px 5px 1px;white-space:nowrap}.leaflet-control-scale-line:not(:first-child){border-bottom:none;border-top:2px solid #777;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{background-clip:padding-box;border:1px solid rgba(0,0,0,.15)}.leaflet-popup{margin-bottom:20px;position:absolute;text-align:center}.leaflet-popup-content-wrapper{border-radius:12px;padding:1px;text-align:left}.leaflet-popup-content{line-height:1.4;margin:13px 19px}.leaflet-popup-content p{margin:18px 0}.leaflet-popup-tip-container{height:20px;left:50%;margin-left:-20px;overflow:hidden;pointer-events:none;position:absolute;width:40px}.leaflet-popup-tip{height:17px;margin:-10px auto 0;padding:1px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);width:17px}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4);color:#333}.leaflet-container a.leaflet-popup-close-button{background:transparent;border:none;color:#c3c3c3;font:16px/14px Tahoma,Verdana,sans-serif;font-weight:700;height:14px;padding:4px 4px 0 0;position:absolute;right:0;text-align:center;text-decoration:none;top:0;width:18px}.leaflet-container a.leaflet-popup-close-button:hover{color:#999}.leaflet-popup-scrolled{border-bottom:1px solid #ddd;border-top:1px solid #ddd;overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678,M12=0.70710678,M21=-0.70710678,M22=0.70710678);margin:0 auto;width:24px}.leaflet-oldie .leaflet-popup-tip-container{margin-top:-1px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{background-color:#fff;border:1px solid #fff;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.4);color:#222;padding:6px;pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.leaflet-tooltip.leaflet-clickable{cursor:pointer;pointer-events:auto}.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before,.leaflet-tooltip-top:before{background:transparent;border:6px solid transparent;content:\"\";pointer-events:none;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{border-top-color:#fff;bottom:0;margin-bottom:-12px}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-left:-6px;margin-top:-12px;top:0}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-left-color:#fff;margin-right:-12px;right:0}.leaflet-tooltip-right:before{border-right-color:#fff;left:0;margin-left:-12px}";
3
3
 
4
4
  export { css_248z as default, stylesheet };
5
5
  //# sourceMappingURL=leaflet.css.js.map
@@ -25,6 +25,8 @@ export interface TreemapConfigInterface<Datum> extends ComponentConfigInterface
25
25
  * Default: `undefined`
26
26
  */
27
27
  tilePaddingTop?: number;
28
+ /** Append SVG `<title>` element to tile rects. It will be shown when hovering over the tile. Default: `false` */
29
+ tileShowHtmlTooltip?: boolean;
28
30
  /** Label internal nodes. Default: `false` */
29
31
  labelInternalNodes?: boolean;
30
32
  /** Label offset in the X direction. Default: `4` */
@@ -1,7 +1,7 @@
1
1
  import { ComponentDefaultConfig } from '../../core/component/config.js';
2
2
  import { FitMode, TrimMode } from '../../types/text.js';
3
3
 
4
- const TreemapDefaultConfig = Object.assign(Object.assign({}, ComponentDefaultConfig), { id: (d, i) => { var _a; return (_a = d.id) !== null && _a !== void 0 ? _a : i; }, value: undefined, tileColor: undefined, layers: [], tilePadding: 2, tilePaddingTop: undefined, labelInternalNodes: false, labelOffsetX: 4, labelOffsetY: 4, labelFit: FitMode.Wrap, labelTrimMode: TrimMode.Middle, tileBorderRadius: 2, tileBorderRadiusFactor: 1 / 8, enableLightnessVariance: false, enableTileLabelFontSizeVariation: true, tileLabelSmallFontSize: 8, tileLabelMediumFontSize: 12, tileLabelLargeFontSize: 22, showTileClickAffordance: false, lightnessVariationAmount: 0.08, minTileSizeForLabel: 20, numberFormat: (value) => `${value}`, tileLabel: function (d) { return `${d.data.key}: ${this.numberFormat(d.value)}`; } });
4
+ const TreemapDefaultConfig = Object.assign(Object.assign({}, ComponentDefaultConfig), { id: (d, i) => { var _a; return (_a = d.id) !== null && _a !== void 0 ? _a : i; }, value: undefined, tileColor: undefined, layers: [], tilePadding: 2, tilePaddingTop: undefined, tileShowHtmlTooltip: true, labelInternalNodes: false, labelOffsetX: 4, labelOffsetY: 4, labelFit: FitMode.Wrap, labelTrimMode: TrimMode.Middle, tileBorderRadius: 2, tileBorderRadiusFactor: 1 / 8, enableLightnessVariance: false, enableTileLabelFontSizeVariation: true, tileLabelSmallFontSize: 8, tileLabelMediumFontSize: 12, tileLabelLargeFontSize: 22, showTileClickAffordance: false, lightnessVariationAmount: 0.08, minTileSizeForLabel: 20, numberFormat: (value) => `${value}`, tileLabel: function (d) { return `${d.data.key}: ${this.numberFormat(d.value)}`; } });
5
5
 
6
6
  export { TreemapDefaultConfig };
7
7
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sources":["../../../src/components/treemap/config.ts"],"sourcesContent":["import { ComponentConfigInterface, ComponentDefaultConfig } from 'core/component/config'\nimport { ColorAccessor, NumericAccessor, StringAccessor } from 'types/accessor'\nimport { FitMode, TrimMode } from 'types/text'\nimport { TreemapNode } from './types'\n\nexport interface TreemapConfigInterface<Datum> extends ComponentConfigInterface {\n id?: ((d: Datum, i: number) => string | number);\n /* Numeric accessor for segment size value. Default: `undefined`. */\n value?: NumericAccessor<Datum>;\n\n /** Array of accessor functions to defined the nested groups. Default: `[]` */\n layers: StringAccessor<Datum>[];\n\n /** @deprecated Define `tileLabel` instead.\n * A function that accepts a value number and returns a string. Default: `(value: number) => `${value}`` */\n numberFormat?: (value: number) => string;\n\n /**\n * Function to generate the label text for each tile. Receives the `TreemapNode` and returns a `string`.\n * Default: shows key and formatted value (e.g., \"label: value\").\n */\n tileLabel?: (node: TreemapNode<Datum>) => string;\n\n /** Color accessor function for tiles. Default: `undefined` */\n tileColor?: ColorAccessor<TreemapNode<Datum>>;\n\n /** Padding passed to D3 treemap layout. Default: `2` */\n tilePadding?: number;\n\n /**\n * Top padding passed to D3 treemap layout.\n * Useful to make room for internal node labels.\n * Default: `undefined`\n */\n tilePaddingTop?: number;\n\n /** Label internal nodes. Default: `false` */\n labelInternalNodes?: boolean;\n\n /** Label offset in the X direction. Default: `4` */\n labelOffsetX?: number;\n\n /** Label offset in the Y direction. Default: `4` */\n labelOffsetY?: number;\n\n /** How labels should fit within tiles: wrap or trim. Applicable only for leaf nodes. Default: `FitMode.Wrap` */\n labelFit?: FitMode;\n\n /** Label trimming mode. Default: `TrimMode.Middle` */\n labelTrimMode?: TrimMode;\n\n /** Border radius of the tiles in pixels. Default: `2` */\n tileBorderRadius?: number;\n\n /** Minimum fraction of width for border radius. Default: `1/8` */\n tileBorderRadiusFactor?: number;\n\n /** Enable lightness variance for sibling tiles. Default: `false` */\n enableLightnessVariance?: boolean;\n\n /** Enable font size variation for leaf node labels based on value. Default: `false` */\n enableTileLabelFontSizeVariation?: boolean;\n\n /** Small font size for leaf labels (used when `enableTileLabelFontSizeVariation` is `true`). Default: `8` */\n tileLabelSmallFontSize?: number;\n\n /** Medium font size for leaf labels (used when `enableTileLabelFontSizeVariation` is `true`). Default: `12` */\n tileLabelMediumFontSize?: number;\n\n /** Large font size for leaf labels (used when `enableTileLabelFontSizeVariation` is `true`). Default: `24` */\n tileLabelLargeFontSize?: number;\n\n\n /** Flag for showing cursor:pointer to indicate leaf tiles are clickable. Default: `undefined` */\n showTileClickAffordance?: boolean;\n\n /** Amount of lightness variation applied to sibling tiles when `enableLightnessVariance` is `true`. Default: `0.08` */\n lightnessVariationAmount?: number;\n\n /** Minimum size for labels in pixels. Default: `20` */\n minTileSizeForLabel?: number;\n}\n\nexport const TreemapDefaultConfig: TreemapConfigInterface<unknown> = {\n ...ComponentDefaultConfig,\n id: (d: unknown, i: number): string | number => (d as { id: string }).id ?? i,\n value: undefined,\n tileColor: undefined,\n layers: [],\n tilePadding: 2,\n tilePaddingTop: undefined,\n labelInternalNodes: false,\n labelOffsetX: 4,\n labelOffsetY: 4,\n labelFit: FitMode.Wrap,\n labelTrimMode: TrimMode.Middle,\n tileBorderRadius: 2,\n tileBorderRadiusFactor: 1 / 8,\n enableLightnessVariance: false,\n enableTileLabelFontSizeVariation: true,\n tileLabelSmallFontSize: 8,\n tileLabelMediumFontSize: 12,\n tileLabelLargeFontSize: 22,\n showTileClickAffordance: false,\n lightnessVariationAmount: 0.08,\n minTileSizeForLabel: 20,\n numberFormat: (value: number) => `${value}`,\n tileLabel: function (d: TreemapNode<unknown>): string { return `${d.data.key}: ${this.numberFormat(d.value)}` },\n}\n"],"names":[],"mappings":";;;AAmFO,MAAM,oBAAoB,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAC5B,sBAAsB,CACzB,EAAA,EAAA,EAAE,EAAE,CAAC,CAAU,EAAE,CAAS,eAAsB,OAAA,CAAA,EAAA,GAAC,CAAoB,CAAC,EAAE,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAI,CAAC,CAAA,EAAA,EAC7E,KAAK,EAAE,SAAS,EAChB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,EAAE,EACV,WAAW,EAAE,CAAC,EACd,cAAc,EAAE,SAAS,EACzB,kBAAkB,EAAE,KAAK,EACzB,YAAY,EAAE,CAAC,EACf,YAAY,EAAE,CAAC,EACf,QAAQ,EAAE,OAAO,CAAC,IAAI,EACtB,aAAa,EAAE,QAAQ,CAAC,MAAM,EAC9B,gBAAgB,EAAE,CAAC,EACnB,sBAAsB,EAAE,CAAC,GAAG,CAAC,EAC7B,uBAAuB,EAAE,KAAK,EAC9B,gCAAgC,EAAE,IAAI,EACtC,sBAAsB,EAAE,CAAC,EACzB,uBAAuB,EAAE,EAAE,EAC3B,sBAAsB,EAAE,EAAE,EAC1B,uBAAuB,EAAE,KAAK,EAC9B,wBAAwB,EAAE,IAAI,EAC9B,mBAAmB,EAAE,EAAE,EACvB,YAAY,EAAE,CAAC,KAAa,KAAK,GAAG,KAAK,CAAA,CAAE,EAC3C,SAAS,EAAE,UAAU,CAAuB,EAAY,EAAA,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAA,EAAA,EAAK,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAE,CAAA,CAAA,EAAE;;;;"}
1
+ {"version":3,"file":"config.js","sources":["../../../src/components/treemap/config.ts"],"sourcesContent":["import { ComponentConfigInterface, ComponentDefaultConfig } from 'core/component/config'\nimport { ColorAccessor, NumericAccessor, StringAccessor } from 'types/accessor'\nimport { FitMode, TrimMode } from 'types/text'\nimport { TreemapNode } from './types'\n\nexport interface TreemapConfigInterface<Datum> extends ComponentConfigInterface {\n id?: ((d: Datum, i: number) => string | number);\n /* Numeric accessor for segment size value. Default: `undefined`. */\n value?: NumericAccessor<Datum>;\n\n /** Array of accessor functions to defined the nested groups. Default: `[]` */\n layers: StringAccessor<Datum>[];\n\n /** @deprecated Define `tileLabel` instead.\n * A function that accepts a value number and returns a string. Default: `(value: number) => `${value}`` */\n numberFormat?: (value: number) => string;\n\n /**\n * Function to generate the label text for each tile. Receives the `TreemapNode` and returns a `string`.\n * Default: shows key and formatted value (e.g., \"label: value\").\n */\n tileLabel?: (node: TreemapNode<Datum>) => string;\n\n /** Color accessor function for tiles. Default: `undefined` */\n tileColor?: ColorAccessor<TreemapNode<Datum>>;\n\n /** Padding passed to D3 treemap layout. Default: `2` */\n tilePadding?: number;\n\n /**\n * Top padding passed to D3 treemap layout.\n * Useful to make room for internal node labels.\n * Default: `undefined`\n */\n tilePaddingTop?: number;\n\n /** Append SVG `<title>` element to tile rects. It will be shown when hovering over the tile. Default: `false` */\n tileShowHtmlTooltip?: boolean;\n\n /** Label internal nodes. Default: `false` */\n labelInternalNodes?: boolean;\n\n /** Label offset in the X direction. Default: `4` */\n labelOffsetX?: number;\n\n /** Label offset in the Y direction. Default: `4` */\n labelOffsetY?: number;\n\n /** How labels should fit within tiles: wrap or trim. Applicable only for leaf nodes. Default: `FitMode.Wrap` */\n labelFit?: FitMode;\n\n /** Label trimming mode. Default: `TrimMode.Middle` */\n labelTrimMode?: TrimMode;\n\n /** Border radius of the tiles in pixels. Default: `2` */\n tileBorderRadius?: number;\n\n /** Minimum fraction of width for border radius. Default: `1/8` */\n tileBorderRadiusFactor?: number;\n\n /** Enable lightness variance for sibling tiles. Default: `false` */\n enableLightnessVariance?: boolean;\n\n /** Enable font size variation for leaf node labels based on value. Default: `false` */\n enableTileLabelFontSizeVariation?: boolean;\n\n /** Small font size for leaf labels (used when `enableTileLabelFontSizeVariation` is `true`). Default: `8` */\n tileLabelSmallFontSize?: number;\n\n /** Medium font size for leaf labels (used when `enableTileLabelFontSizeVariation` is `true`). Default: `12` */\n tileLabelMediumFontSize?: number;\n\n /** Large font size for leaf labels (used when `enableTileLabelFontSizeVariation` is `true`). Default: `24` */\n tileLabelLargeFontSize?: number;\n\n /** Flag for showing cursor:pointer to indicate leaf tiles are clickable. Default: `undefined` */\n showTileClickAffordance?: boolean;\n\n /** Amount of lightness variation applied to sibling tiles when `enableLightnessVariance` is `true`. Default: `0.08` */\n lightnessVariationAmount?: number;\n\n /** Minimum size for labels in pixels. Default: `20` */\n minTileSizeForLabel?: number;\n}\n\nexport const TreemapDefaultConfig: TreemapConfigInterface<unknown> = {\n ...ComponentDefaultConfig,\n id: (d: unknown, i: number): string | number => (d as { id: string }).id ?? i,\n value: undefined,\n tileColor: undefined,\n layers: [],\n tilePadding: 2,\n tilePaddingTop: undefined,\n tileShowHtmlTooltip: true,\n labelInternalNodes: false,\n labelOffsetX: 4,\n labelOffsetY: 4,\n labelFit: FitMode.Wrap,\n labelTrimMode: TrimMode.Middle,\n tileBorderRadius: 2,\n tileBorderRadiusFactor: 1 / 8,\n enableLightnessVariance: false,\n enableTileLabelFontSizeVariation: true,\n tileLabelSmallFontSize: 8,\n tileLabelMediumFontSize: 12,\n tileLabelLargeFontSize: 22,\n showTileClickAffordance: false,\n lightnessVariationAmount: 0.08,\n minTileSizeForLabel: 20,\n numberFormat: (value: number) => `${value}`,\n tileLabel: function (d: TreemapNode<unknown>): string { return `${d.data.key}: ${this.numberFormat(d.value)}` },\n}\n"],"names":[],"mappings":";;;AAqFO,MAAM,oBAAoB,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAC5B,sBAAsB,CACzB,EAAA,EAAA,EAAE,EAAE,CAAC,CAAU,EAAE,CAAS,eAAsB,OAAA,CAAA,EAAA,GAAC,CAAoB,CAAC,EAAE,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,CAAC,CAAA,EAAA,EAC7E,KAAK,EAAE,SAAS,EAChB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,EAAE,EACV,WAAW,EAAE,CAAC,EACd,cAAc,EAAE,SAAS,EACzB,mBAAmB,EAAE,IAAI,EACzB,kBAAkB,EAAE,KAAK,EACzB,YAAY,EAAE,CAAC,EACf,YAAY,EAAE,CAAC,EACf,QAAQ,EAAE,OAAO,CAAC,IAAI,EACtB,aAAa,EAAE,QAAQ,CAAC,MAAM,EAC9B,gBAAgB,EAAE,CAAC,EACnB,sBAAsB,EAAE,CAAC,GAAG,CAAC,EAC7B,uBAAuB,EAAE,KAAK,EAC9B,gCAAgC,EAAE,IAAI,EACtC,sBAAsB,EAAE,CAAC,EACzB,uBAAuB,EAAE,EAAE,EAC3B,sBAAsB,EAAE,EAAE,EAC1B,uBAAuB,EAAE,KAAK,EAC9B,wBAAwB,EAAE,IAAI,EAC9B,mBAAmB,EAAE,EAAE,EACvB,YAAY,EAAE,CAAC,KAAa,KAAK,CAAG,EAAA,KAAK,CAAE,CAAA,EAC3C,SAAS,EAAE,UAAU,CAAuB,EAAA,EAAY,OAAO,CAAG,EAAA,CAAC,CAAC,IAAI,CAAC,GAAG,CAAA,EAAA,EAAK,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAE,CAAA,CAAA,EAAE;;;;"}
@@ -6,14 +6,14 @@ import { hsl } from 'd3-color';
6
6
  import { ComponentCore } from '../../core/component/index.js';
7
7
  import { SeriesDataModel } from '../../data-models/series.js';
8
8
  import { getColor, getHexValue, brighter, isColorDark } from '../../utils/color.js';
9
- import { isNumber, getString, getNumber } from '../../utils/data.js';
9
+ import { isNumber, getString, getNumber, isFunction } from '../../utils/data.js';
10
10
  import { smartTransition } from '../../utils/d3.js';
11
11
  import { wrapSVGText, trimSVGText } from '../../utils/text.js';
12
12
  import { cssvar } from '../../utils/style.js';
13
13
  import { FitMode } from '../../types/text.js';
14
14
  import { TreemapDefaultConfig } from './config.js';
15
15
  import * as style from './style.js';
16
- import { tiles, tileGroup, tile, clickableTile, labelGroup, label, variables, internalLabel } from './style.js';
16
+ import { tiles, tileGroup, tileExiting, tile, clickableTile, labelGroup, label, variables, internalLabel } from './style.js';
17
17
 
18
18
  class Treemap extends ComponentCore {
19
19
  constructor(config) {
@@ -130,23 +130,21 @@ class Treemap extends ComponentCore {
130
130
  }
131
131
  d._fill = brighter(hslColor.toString(), brightnessIncrease(d.depth));
132
132
  });
133
- // Render tiles
133
+ /* Render tiles */
134
134
  const tiles = this.tiles
135
- .selectAll(`g.${tileGroup}`)
135
+ .selectAll(`g.${tileGroup}:not(.${tileExiting})`)
136
136
  .data(visibleTiles, d => `${d.data.key}-${d.depth}`);
137
- const tilesEnter = tiles
138
- .enter()
137
+ const tilesEnter = tiles.enter()
139
138
  .append('g')
140
139
  .attr('class', tileGroup);
141
140
  // Add clipPath elements
142
141
  tilesEnter
143
142
  .append('clipPath')
144
- .attr('id', d => `clip-${this.uid}-${d._id}`)
145
143
  .append('rect')
146
144
  .attr('rx', d => this._getTileBorderRadius(d))
147
145
  .attr('ry', d => this._getTileBorderRadius(d));
148
146
  // Tile rectangles
149
- const tileRects = tilesEnter
147
+ const tileEnterRects = tilesEnter
150
148
  .append('rect')
151
149
  .classed(tile, true)
152
150
  .classed(clickableTile, d => config.showTileClickAffordance && !d.children)
@@ -159,19 +157,26 @@ class Treemap extends ComponentCore {
159
157
  .style('fill', d => d._fill)
160
158
  .style('opacity', 0)
161
159
  .style('cursor', config.showTileClickAffordance ? d => !d.children ? 'pointer' : null : null);
162
- tileRects.append('title');
160
+ if (config.tileShowHtmlTooltip)
161
+ tileEnterRects.append('title');
163
162
  tilesEnter
164
163
  .append('g')
165
164
  .attr('class', labelGroup)
166
- .attr('clip-path', d => `url(#clip-${this.uid}-${d._id})`)
167
165
  .attr('transform', d => `translate(${d.x0 + config.labelOffsetX},${d.y0 + config.labelOffsetY})`)
168
166
  .style('opacity', 0)
169
167
  .append('text')
170
168
  .attr('class', label)
171
169
  .attr('x', 0)
172
170
  .attr('y', 0);
173
- const mergedTiles = tiles.merge(tilesEnter);
174
- const tileRectsMerged = mergedTiles.select(`rect.${tile}`);
171
+ /* Update */
172
+ const tilesMerged = tiles.merge(tilesEnter);
173
+ // Update clipPath elements
174
+ tilesMerged.select('clipPath')
175
+ .attr('id', d => `clip-${this.uid}-${d._id}`);
176
+ tilesMerged.select('clipPath rect')
177
+ .attr('width', d => Math.max(this._getTileWidth(d) - 2 * config.labelOffsetX, 0))
178
+ .attr('height', d => Math.max(this._getTileHeight(d) - 2 * config.labelOffsetY, 0));
179
+ const tileRectsMerged = tilesMerged.select(`rect.${tile}`);
175
180
  smartTransition(tileRectsMerged, duration)
176
181
  .style('fill', d => d._fill)
177
182
  .style('opacity', 1)
@@ -179,20 +184,25 @@ class Treemap extends ComponentCore {
179
184
  .attr('y', d => d.y0)
180
185
  .attr('width', this._getTileWidth)
181
186
  .attr('height', this._getTileHeight);
182
- tileRectsMerged.select('title')
183
- .text(d => config.tileLabel(d));
184
- // Update clipPath rects
185
- mergedTiles.select('clipPath rect')
186
- .attr('width', d => Math.max(this._getTileWidth(d) - 2 * config.labelOffsetX, 0))
187
- .attr('height', d => Math.max(this._getTileHeight(d) - 2 * config.labelOffsetY, 0));
188
- const textSelection = mergedTiles.selectAll(`g.${labelGroup} text`);
187
+ const tileTitlesMerged = tileRectsMerged.select('title');
188
+ if (config.tileShowHtmlTooltip)
189
+ tileTitlesMerged.text(d => config.tileLabel(d));
190
+ else
191
+ tileTitlesMerged.remove();
192
+ // Apply clip-path to labels
193
+ const labelGroupsMerged = tilesMerged.select(`g.${labelGroup}`)
194
+ .attr('clip-path', d => `url(#clip-${this.uid}-${d._id})`);
195
+ // Transition group position and text opacity (fade-in)
196
+ smartTransition(labelGroupsMerged, duration)
197
+ .attr('transform', d => `translate(${d.x0 + config.labelOffsetX},${d.y0 + config.labelOffsetY})`)
198
+ .style('opacity', 1);
199
+ const textSelection = tilesMerged.select(`g.${labelGroup} text`);
189
200
  textSelection
190
201
  .text(d => {
191
202
  const shouldShowLabel = config.labelInternalNodes ? true : !d.children;
192
203
  const isLargeEnough = this._isTileLargeEnough(d);
193
- return (shouldShowLabel && isLargeEnough) ? d.data.key : null;
204
+ return (shouldShowLabel && isLargeEnough && isFunction(config.tileLabel)) ? config.tileLabel(d) : null;
194
205
  })
195
- .attr('title', d => config.tileLabel(d))
196
206
  .property('font-size-px', d => {
197
207
  var _a;
198
208
  const sqrtVal = Math.sqrt((_a = d.value) !== null && _a !== void 0 ? _a : 0);
@@ -219,14 +229,13 @@ class Treemap extends ComponentCore {
219
229
  trimSVGText(text, maxLabelWidth, config.labelTrimMode, true, fontSize);
220
230
  }
221
231
  });
222
- // Transition group position and text opacity (fade-in)
223
- smartTransition(mergedTiles.select(`g.${labelGroup}`), duration)
224
- .attr('transform', d => `translate(${d.x0 + config.labelOffsetX},${d.y0 + config.labelOffsetY})`)
225
- .style('opacity', 1);
226
232
  // Make the internal labels semibold via class
227
- mergedTiles.select(`text.${label}`)
233
+ tilesMerged.select(`text.${label}`)
228
234
  .classed(internalLabel, d => !!d.children);
229
- smartTransition(tiles.exit(), duration)
235
+ /* Exit */
236
+ const tilesExit = tiles.exit()
237
+ .classed(tileExiting, true);
238
+ smartTransition(tilesExit, duration)
230
239
  .style('opacity', 0)
231
240
  .remove();
232
241
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/treemap/index.ts"],"sourcesContent":["import { Selection, select } from 'd3-selection'\nimport { hierarchy, HierarchyNode, treemap } from 'd3-hierarchy'\nimport { group, max, extent } from 'd3-array'\nimport { scaleLinear, scaleThreshold } from 'd3-scale'\nimport { hsl } from 'd3-color'\n\n// Core\nimport { ComponentCore } from 'core/component'\n\n// Data Model\nimport { SeriesDataModel } from 'data-models/series'\n\n// Utils\nimport { getColor, brighter, getHexValue, isColorDark } from 'utils/color'\nimport { getString, getNumber, isNumber } from 'utils/data'\nimport { smartTransition } from 'utils/d3'\nimport { trimSVGText, wrapSVGText } from 'utils/text'\nimport { cssvar } from 'utils/style'\n\n// Types\nimport { FitMode } from 'types/text'\n\n// Config\nimport { TreemapConfigInterface, TreemapDefaultConfig } from './config'\n\n// Local Types\nimport { TreemapDatum, TreemapNode } from './types'\n\n// Styles\nimport * as s from './style'\n\nexport class Treemap<Datum> extends ComponentCore<Datum[], TreemapConfigInterface<Datum>> {\n static selectors = s\n protected _defaultConfig = TreemapDefaultConfig as TreemapConfigInterface<Datum>\n public config: TreemapConfigInterface<Datum> = this._defaultConfig\n\n datamodel: SeriesDataModel<Datum> = new SeriesDataModel()\n tiles: Selection<SVGGElement, unknown, SVGGElement, unknown>\n\n constructor (config?: TreemapConfigInterface<Datum>) {\n super()\n if (config) this.setConfig(config)\n this.tiles = this.g.append('g').attr('class', s.tiles)\n }\n\n _render (customDuration?: number): void {\n super._render(customDuration)\n const { config, datamodel: { data }, _width, _height } = this\n const duration = isNumber(customDuration) ? customDuration : config.duration\n\n if (!config.layers?.length) {\n console.warn('Unovis | Treemap: No layers defined')\n return\n }\n\n // Map each layer accessor function to get string values from the data array\n const layerAccessors = config.layers.map(layerAccessor => {\n return (i: number) => getString(data[i], layerAccessor, i)\n })\n\n // Group the data indices by the layer accessors to create a hierarchical structure\n const nestedData = group(data.keys(), ...layerAccessors as [(d: number) => string])\n\n // Create the hierarchy from the grouped data,\n // which by itself is not quite right because there is an extra\n // level of nesting that we don't want, just above the leaf nodes.\n const rootNode = hierarchy(nestedData)\n\n // Compute the aggregation\n if (config.value) {\n rootNode.sum(index => isNumber(index) && getNumber(data[index], config.value, index))\n } else {\n rootNode.count()\n }\n\n // Fix the hierarchy by removing the extra level of nesting\n rootNode.each(node => {\n if (!node.children && node.parent) {\n node.parent.children = null\n }\n })\n\n const treemapLayout = treemap()\n .size([_width, _height])\n .round(true)\n .padding(config.tilePadding)\n\n // Apply padding to the top of each tile,\n // but not for the root node.\n if (this.config.tilePaddingTop !== undefined) {\n treemapLayout.paddingTop(d => d.parent ? config.tilePaddingTop : 0)\n }\n\n // Compute the treemap layout\n const treemapData = treemapLayout(rootNode) as TreemapNode<Datum>\n\n // Process the resulting hierarchy into the type we need\n let nodeId = 0\n treemapData.each(node => {\n const n = node as unknown as HierarchyNode<[string, number[]]>\n // Generate unique IDs for each node\n node._id = `node-${nodeId++}`\n\n const treemapDatum: TreemapDatum<Datum> = {\n key: n.data[0],\n }\n\n // Populate the index and datum for leaf nodes\n const isLeafNode = !n.children\n if (isLeafNode) {\n treemapDatum.index = n.data[1][0]\n treemapDatum.datum = data[treemapDatum.index]\n }\n\n node.data = treemapDatum\n })\n\n const descendants = treemapData.descendants()\n\n // Set up the brightness increase scale based on depth\n const maxDepth = max(descendants, d => d.depth)\n\n const brightnessIncrease = scaleLinear()\n .domain([1, maxDepth])\n .range([0, 1])\n\n // Get all leaf node values and calculate their square roots\n // (since area is proportional to value)\n const leafValues = descendants.filter(d => !d.children).map(d => d.value)\n const maxLeafValue = Math.sqrt(max(leafValues)) || 0\n // Divide the range into three equal intervals based on the square root of values\n // This accounts for the fact that area is proportional to value\n const fontSizeScale = scaleThreshold<number, number>()\n .domain([\n maxLeafValue / 3, // First third of the max value\n (maxLeafValue * 2) / 3, // Second third of the max value\n ])\n .range([\n config.tileLabelSmallFontSize,\n config.tileLabelMediumFontSize,\n config.tileLabelLargeFontSize,\n ])\n\n const visibleTiles = descendants.filter(d => d.depth > 0)\n const firstLevelTiles = visibleTiles.filter(d => d.depth === 1)\n const nonFirstLevelTiles = visibleTiles.filter(d => d.depth > 1)\n\n // Set the fill color for the first level tiles\n firstLevelTiles.forEach((d, i) => {\n d._fill = getColor(d, config.tileColor, i)\n })\n\n // Set the fill color for the non-first level tiles\n nonFirstLevelTiles.forEach((d, i) => {\n const providedColor = getColor(d, config.tileColor, i, true)\n if (providedColor) {\n d._fill = providedColor\n return\n }\n\n const hslColor = hsl(getHexValue(d.parent?._fill, this.element))\n\n if (config.enableLightnessVariance && !d.children && d.parent) {\n const siblings = d.parent.children\n const lightnessAdjustment = this._getTileLightness(d, siblings)\n hslColor.l = Math.min(1, hslColor.l + lightnessAdjustment)\n }\n\n d._fill = brighter(hslColor.toString(), brightnessIncrease(d.depth))\n })\n\n\n // Render tiles\n const tiles = this.tiles\n .selectAll<SVGGElement, TreemapNode<Datum>>(`g.${s.tileGroup}`)\n .data(visibleTiles, d => `${d.data.key}-${d.depth}`)\n\n const tilesEnter = tiles\n .enter()\n .append('g')\n .attr('class', s.tileGroup)\n\n // Add clipPath elements\n tilesEnter\n .append('clipPath')\n .attr('id', d => `clip-${this.uid}-${d._id}`)\n .append('rect')\n .attr('rx', d => this._getTileBorderRadius(d))\n .attr('ry', d => this._getTileBorderRadius(d))\n\n // Tile rectangles\n const tileRects = tilesEnter\n .append('rect')\n .classed(s.tile, true)\n .classed(s.clickableTile, d => config.showTileClickAffordance && !d.children)\n .attr('rx', d => this._getTileBorderRadius(d))\n .attr('ry', d => this._getTileBorderRadius(d))\n .attr('x', d => d.x0)\n .attr('y', d => d.y0)\n .attr('width', this._getTileWidth)\n .attr('height', this._getTileHeight)\n .style('fill', d => d._fill)\n .style('opacity', 0)\n .style('cursor', config.showTileClickAffordance ? d => !d.children ? 'pointer' : null : null)\n\n tileRects.append('title')\n\n tilesEnter\n .append('g')\n .attr('class', s.labelGroup)\n .attr('clip-path', d => `url(#clip-${this.uid}-${d._id})`)\n .attr('transform', d => `translate(${d.x0 + config.labelOffsetX},${d.y0 + config.labelOffsetY})`)\n .style('opacity', 0)\n .append('text')\n .attr('class', s.label)\n .attr('x', 0)\n .attr('y', 0)\n\n const mergedTiles = tiles.merge(tilesEnter)\n const tileRectsMerged = mergedTiles.select(`rect.${s.tile}`)\n smartTransition(tileRectsMerged, duration)\n .style('fill', d => d._fill)\n .style('opacity', 1)\n .attr('x', d => d.x0)\n .attr('y', d => d.y0)\n .attr('width', this._getTileWidth)\n .attr('height', this._getTileHeight)\n\n tileRectsMerged.select('title')\n .text(d => config.tileLabel(d))\n\n // Update clipPath rects\n mergedTiles.select('clipPath rect')\n .attr('width', d => Math.max(this._getTileWidth(d) - 2 * config.labelOffsetX, 0))\n .attr('height', d => Math.max(this._getTileHeight(d) - 2 * config.labelOffsetY, 0))\n\n const textSelection = mergedTiles.selectAll<SVGTextElement, TreemapNode<Datum>>(`g.${s.labelGroup} text`)\n textSelection\n .text(d => {\n const shouldShowLabel = config.labelInternalNodes ? true : !d.children\n const isLargeEnough = this._isTileLargeEnough(d)\n return (shouldShowLabel && isLargeEnough) ? d.data.key : null\n })\n .attr('title', d => config.tileLabel(d))\n .property('font-size-px', d => {\n const sqrtVal = Math.sqrt(d.value ?? 0)\n return config.enableTileLabelFontSizeVariation && !d.children\n ? fontSizeScale(sqrtVal)\n : null // Use the default css variable value\n })\n .style('font-size', (_, i, els) => `${select(els[i]).property('font-size-px')}px`)\n .style('fill', d => cssvar(\n isColorDark(d._fill) ? s.variables.treemapLabelTextColorLight : s.variables.treemapLabelTextColor)\n )\n\n // Fit label (wrap or trim)\n textSelection.each((d, i, els) => {\n const isLeafNode = !d.children\n const el = els[i] as SVGTextElement\n if (!el.textContent) return\n\n const text = select(el)\n const maxLabelWidth = d.x1 - d.x0 - (config.labelOffsetX ?? 0) * 2\n const fontSize = parseFloat(text.property('font-size-px')) || parseFloat(window.getComputedStyle(el).fontSize)\n\n if (config.labelFit === FitMode.Wrap && isLeafNode) {\n wrapSVGText(text, maxLabelWidth)\n } else {\n trimSVGText(text, maxLabelWidth, config.labelTrimMode, true, fontSize)\n }\n })\n\n // Transition group position and text opacity (fade-in)\n smartTransition(mergedTiles.select(`g.${s.labelGroup}`), duration)\n .attr('transform', d => `translate(${d.x0 + config.labelOffsetX},${d.y0 + config.labelOffsetY})`)\n .style('opacity', 1)\n\n // Make the internal labels semibold via class\n mergedTiles.select(`text.${s.label}`)\n .classed(s.internalLabel, d => !!d.children)\n\n\n smartTransition(tiles.exit(), duration)\n .style('opacity', 0)\n .remove()\n }\n\n private _isTileLargeEnough (d: TreemapNode<Datum>): boolean {\n const w = this._getTileWidth(d)\n const h = this._getTileHeight(d)\n return (w >= this.config.minTileSizeForLabel) && (h >= this.config.minTileSizeForLabel)\n }\n\n private _getTileLightness (node: TreemapNode<Datum>, siblings: TreemapNode<Datum>[]): number {\n // Get the value extent of the sibling group\n const [minValue, maxValue] = extent(siblings, d => d.value)\n\n // If there's no range or no value, return default lightness\n if (minValue === maxValue || !node.value) return 0\n\n // Calculate relative position in the range (0 to 1)\n // Larger values will be closer to 0 (darker)\n return this.config.lightnessVariationAmount * ((maxValue - node.value) / (maxValue - minValue))\n }\n\n // Computes the rect border radius for a given tile. The rx and ry values are the minimum of the tile\n // border radius and some fraction the width of the tile, based on the tileBorderRadiusFactor config.\n // This ensures that the tile border radius is not larger than the tile size, which makes small tiles\n // look better.\n private _getTileBorderRadius (d: TreemapNode<Datum>): number {\n return Math.min(this.config.tileBorderRadius, this._getTileWidth(d) * this.config.tileBorderRadiusFactor)\n }\n\n private _getTileHeight (d: TreemapNode<Datum>): number {\n return Math.max(d.y1 - d.y0, 0.5)\n }\n\n private _getTileWidth (d: TreemapNode<Datum>): number {\n return Math.max(d.x1 - d.x0, 0.5)\n }\n}\n"],"names":["s.tiles","s.tileGroup","s.tile","s.clickableTile","s.labelGroup","s.label","s.variables","s.internalLabel","s"],"mappings":";;;;;;;;;;;;;;;;;AA+BM,MAAO,OAAe,SAAQ,aAAqD,CAAA;AAQvF,IAAA,WAAA,CAAa,MAAsC,EAAA;AACjD,QAAA,KAAK,EAAE,CA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,IAAI,CAAC,MAAM,CAAC,wBAAwB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,KAAK,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAA;KAChG;;;;;AAMO,IAAA,oBAAoB,CAAE,CAAqB,EAAA;QACjD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAA;KAC1G;AAEO,IAAA,cAAc,CAAE,CAAqB,EAAA;AAC3C,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,CAAA;KAClC;AAEO,IAAA,aAAa,CAAE,CAAqB,EAAA;AAC1C,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,CAAA;KAClC;;AA/RM,OAAS,CAAA,SAAA,GAAGC,KAAC;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/treemap/index.ts"],"sourcesContent":["import { Selection, select } from 'd3-selection'\nimport { hierarchy, HierarchyNode, treemap } from 'd3-hierarchy'\nimport { group, max, extent } from 'd3-array'\nimport { scaleLinear, scaleThreshold } from 'd3-scale'\nimport { hsl } from 'd3-color'\n\n// Core\nimport { ComponentCore } from 'core/component'\n\n// Data Model\nimport { SeriesDataModel } from 'data-models/series'\n\n// Utils\nimport { getColor, brighter, getHexValue, isColorDark } from 'utils/color'\nimport { getString, getNumber, isNumber, isFunction } from 'utils/data'\nimport { smartTransition } from 'utils/d3'\nimport { trimSVGText, wrapSVGText } from 'utils/text'\nimport { cssvar } from 'utils/style'\n\n// Types\nimport { FitMode } from 'types/text'\n\n// Config\nimport { TreemapConfigInterface, TreemapDefaultConfig } from './config'\n\n// Local Types\nimport { TreemapDatum, TreemapNode } from './types'\n\n// Styles\nimport * as s from './style'\n\nexport class Treemap<Datum> extends ComponentCore<Datum[], TreemapConfigInterface<Datum>> {\n static selectors = s\n protected _defaultConfig = TreemapDefaultConfig as TreemapConfigInterface<Datum>\n public config: TreemapConfigInterface<Datum> = this._defaultConfig\n\n datamodel: SeriesDataModel<Datum> = new SeriesDataModel()\n tiles: Selection<SVGGElement, unknown, SVGGElement, unknown>\n\n constructor (config?: TreemapConfigInterface<Datum>) {\n super()\n if (config) this.setConfig(config)\n this.tiles = this.g.append('g').attr('class', s.tiles)\n }\n\n _render (customDuration?: number): void {\n super._render(customDuration)\n const { config, datamodel: { data }, _width, _height } = this\n const duration = isNumber(customDuration) ? customDuration : config.duration\n\n if (!config.layers?.length) {\n console.warn('Unovis | Treemap: No layers defined')\n return\n }\n\n // Map each layer accessor function to get string values from the data array\n const layerAccessors = config.layers.map(layerAccessor => {\n return (i: number) => getString(data[i], layerAccessor, i)\n })\n\n // Group the data indices by the layer accessors to create a hierarchical structure\n const nestedData = group(data.keys(), ...layerAccessors as [(d: number) => string])\n\n // Create the hierarchy from the grouped data,\n // which by itself is not quite right because there is an extra\n // level of nesting that we don't want, just above the leaf nodes.\n const rootNode = hierarchy(nestedData)\n\n // Compute the aggregation\n if (config.value) {\n rootNode.sum(index => isNumber(index) && getNumber(data[index], config.value, index))\n } else {\n rootNode.count()\n }\n\n // Fix the hierarchy by removing the extra level of nesting\n rootNode.each(node => {\n if (!node.children && node.parent) {\n node.parent.children = null\n }\n })\n\n const treemapLayout = treemap()\n .size([_width, _height])\n .round(true)\n .padding(config.tilePadding)\n\n // Apply padding to the top of each tile,\n // but not for the root node.\n if (this.config.tilePaddingTop !== undefined) {\n treemapLayout.paddingTop(d => d.parent ? config.tilePaddingTop : 0)\n }\n\n // Compute the treemap layout\n const treemapData = treemapLayout(rootNode) as TreemapNode<Datum>\n\n // Process the resulting hierarchy into the type we need\n let nodeId = 0\n treemapData.each(node => {\n const n = node as unknown as HierarchyNode<[string, number[]]>\n // Generate unique IDs for each node\n node._id = `node-${nodeId++}`\n\n const treemapDatum: TreemapDatum<Datum> = {\n key: n.data[0],\n }\n\n // Populate the index and datum for leaf nodes\n const isLeafNode = !n.children\n if (isLeafNode) {\n treemapDatum.index = n.data[1][0]\n treemapDatum.datum = data[treemapDatum.index]\n }\n\n node.data = treemapDatum\n })\n\n const descendants = treemapData.descendants()\n\n // Set up the brightness increase scale based on depth\n const maxDepth = max(descendants, d => d.depth)\n\n const brightnessIncrease = scaleLinear()\n .domain([1, maxDepth])\n .range([0, 1])\n\n // Get all leaf node values and calculate their square roots\n // (since area is proportional to value)\n const leafValues = descendants.filter(d => !d.children).map(d => d.value)\n const maxLeafValue = Math.sqrt(max(leafValues)) || 0\n // Divide the range into three equal intervals based on the square root of values\n // This accounts for the fact that area is proportional to value\n const fontSizeScale = scaleThreshold<number, number>()\n .domain([\n maxLeafValue / 3, // First third of the max value\n (maxLeafValue * 2) / 3, // Second third of the max value\n ])\n .range([\n config.tileLabelSmallFontSize,\n config.tileLabelMediumFontSize,\n config.tileLabelLargeFontSize,\n ])\n\n const visibleTiles = descendants.filter(d => d.depth > 0)\n const firstLevelTiles = visibleTiles.filter(d => d.depth === 1)\n const nonFirstLevelTiles = visibleTiles.filter(d => d.depth > 1)\n\n // Set the fill color for the first level tiles\n firstLevelTiles.forEach((d, i) => {\n d._fill = getColor(d, config.tileColor, i)\n })\n\n // Set the fill color for the non-first level tiles\n nonFirstLevelTiles.forEach((d, i) => {\n const providedColor = getColor(d, config.tileColor, i, true)\n if (providedColor) {\n d._fill = providedColor\n return\n }\n\n const hslColor = hsl(getHexValue(d.parent?._fill, this.element))\n\n if (config.enableLightnessVariance && !d.children && d.parent) {\n const siblings = d.parent.children\n const lightnessAdjustment = this._getTileLightness(d, siblings)\n hslColor.l = Math.min(1, hslColor.l + lightnessAdjustment)\n }\n\n d._fill = brighter(hslColor.toString(), brightnessIncrease(d.depth))\n })\n\n\n /* Render tiles */\n const tiles = this.tiles\n .selectAll<SVGGElement, TreemapNode<Datum>>(`g.${s.tileGroup}:not(.${s.tileExiting})`)\n .data(visibleTiles, d => `${d.data.key}-${d.depth}`)\n\n const tilesEnter = tiles.enter()\n .append('g')\n .attr('class', s.tileGroup)\n\n // Add clipPath elements\n tilesEnter\n .append('clipPath')\n .append('rect')\n .attr('rx', d => this._getTileBorderRadius(d))\n .attr('ry', d => this._getTileBorderRadius(d))\n\n // Tile rectangles\n const tileEnterRects = tilesEnter\n .append('rect')\n .classed(s.tile, true)\n .classed(s.clickableTile, d => config.showTileClickAffordance && !d.children)\n .attr('rx', d => this._getTileBorderRadius(d))\n .attr('ry', d => this._getTileBorderRadius(d))\n .attr('x', d => d.x0)\n .attr('y', d => d.y0)\n .attr('width', this._getTileWidth)\n .attr('height', this._getTileHeight)\n .style('fill', d => d._fill)\n .style('opacity', 0)\n .style('cursor', config.showTileClickAffordance ? d => !d.children ? 'pointer' : null : null)\n\n if (config.tileShowHtmlTooltip) tileEnterRects.append('title')\n\n tilesEnter\n .append('g')\n .attr('class', s.labelGroup)\n .attr('transform', d => `translate(${d.x0 + config.labelOffsetX},${d.y0 + config.labelOffsetY})`)\n .style('opacity', 0)\n .append('text')\n .attr('class', s.label)\n .attr('x', 0)\n .attr('y', 0)\n\n /* Update */\n const tilesMerged = tiles.merge(tilesEnter)\n\n // Update clipPath elements\n tilesMerged.select<SVGClipPathElement>('clipPath')\n .attr('id', d => `clip-${this.uid}-${d._id}`)\n\n tilesMerged.select('clipPath rect')\n .attr('width', d => Math.max(this._getTileWidth(d) - 2 * config.labelOffsetX, 0))\n .attr('height', d => Math.max(this._getTileHeight(d) - 2 * config.labelOffsetY, 0))\n\n const tileRectsMerged = tilesMerged.select(`rect.${s.tile}`)\n smartTransition(tileRectsMerged, duration)\n .style('fill', d => d._fill)\n .style('opacity', 1)\n .attr('x', d => d.x0)\n .attr('y', d => d.y0)\n .attr('width', this._getTileWidth)\n .attr('height', this._getTileHeight)\n\n const tileTitlesMerged = tileRectsMerged.select('title')\n if (config.tileShowHtmlTooltip) tileTitlesMerged.text(d => config.tileLabel(d))\n else tileTitlesMerged.remove()\n\n // Apply clip-path to labels\n const labelGroupsMerged = tilesMerged.select<SVGGElement>(`g.${s.labelGroup}`)\n .attr('clip-path', d => `url(#clip-${this.uid}-${d._id})`)\n\n // Transition group position and text opacity (fade-in)\n smartTransition(labelGroupsMerged, duration)\n .attr('transform', d => `translate(${d.x0 + config.labelOffsetX},${d.y0 + config.labelOffsetY})`)\n .style('opacity', 1)\n\n const textSelection = tilesMerged.select<SVGTextElement>(`g.${s.labelGroup} text`)\n textSelection\n .text(d => {\n const shouldShowLabel = config.labelInternalNodes ? true : !d.children\n const isLargeEnough = this._isTileLargeEnough(d)\n return (shouldShowLabel && isLargeEnough && isFunction(config.tileLabel)) ? config.tileLabel(d) : null\n })\n .property('font-size-px', d => {\n const sqrtVal = Math.sqrt(d.value ?? 0)\n return config.enableTileLabelFontSizeVariation && !d.children\n ? fontSizeScale(sqrtVal)\n : null // Use the default css variable value\n })\n .style('font-size', (_, i, els) => `${select(els[i]).property('font-size-px')}px`)\n .style('fill', d => cssvar(\n isColorDark(d._fill) ? s.variables.treemapLabelTextColorLight : s.variables.treemapLabelTextColor)\n )\n\n // Fit label (wrap or trim)\n textSelection.each((d, i, els) => {\n const isLeafNode = !d.children\n const el = els[i] as SVGTextElement\n if (!el.textContent) return\n\n const text = select(el)\n const maxLabelWidth = d.x1 - d.x0 - (config.labelOffsetX ?? 0) * 2\n const fontSize = parseFloat(text.property('font-size-px')) || parseFloat(window.getComputedStyle(el).fontSize)\n\n if (config.labelFit === FitMode.Wrap && isLeafNode) {\n wrapSVGText(text, maxLabelWidth)\n } else {\n trimSVGText(text, maxLabelWidth, config.labelTrimMode, true, fontSize)\n }\n })\n\n // Make the internal labels semibold via class\n tilesMerged.select(`text.${s.label}`)\n .classed(s.internalLabel, d => !!d.children)\n\n /* Exit */\n const tilesExit = tiles.exit()\n .classed(s.tileExiting, true)\n\n smartTransition(tilesExit, duration)\n .style('opacity', 0)\n .remove()\n }\n\n private _isTileLargeEnough (d: TreemapNode<Datum>): boolean {\n const w = this._getTileWidth(d)\n const h = this._getTileHeight(d)\n return (w >= this.config.minTileSizeForLabel) && (h >= this.config.minTileSizeForLabel)\n }\n\n private _getTileLightness (node: TreemapNode<Datum>, siblings: TreemapNode<Datum>[]): number {\n // Get the value extent of the sibling group\n const [minValue, maxValue] = extent(siblings, d => d.value)\n\n // If there's no range or no value, return default lightness\n if (minValue === maxValue || !node.value) return 0\n\n // Calculate relative position in the range (0 to 1)\n // Larger values will be closer to 0 (darker)\n return this.config.lightnessVariationAmount * ((maxValue - node.value) / (maxValue - minValue))\n }\n\n // Computes the rect border radius for a given tile. The rx and ry values are the minimum of the tile\n // border radius and some fraction the width of the tile, based on the tileBorderRadiusFactor config.\n // This ensures that the tile border radius is not larger than the tile size, which makes small tiles\n // look better.\n private _getTileBorderRadius (d: TreemapNode<Datum>): number {\n return Math.min(this.config.tileBorderRadius, this._getTileWidth(d) * this.config.tileBorderRadiusFactor)\n }\n\n private _getTileHeight (d: TreemapNode<Datum>): number {\n return Math.max(d.y1 - d.y0, 0.5)\n }\n\n private _getTileWidth (d: TreemapNode<Datum>): number {\n return Math.max(d.x1 - d.x0, 0.5)\n }\n}\n"],"names":["s.tiles","s.tileGroup","s.tileExiting","s.tile","s.clickableTile","s.labelGroup","s.label","s.variables","s.internalLabel","s"],"mappings":";;;;;;;;;;;;;;;;;AA+BM,MAAO,OAAe,SAAQ,aAAqD,CAAA;AAQvF,IAAA,WAAA,CAAa,MAAsC,EAAA;AACjD,QAAA,KAAK,EAAE,CAAA;QAPC,IAAc,CAAA,cAAA,GAAG,oBAAqD,CAAA;AACzE,QAAA,IAAA,CAAA,MAAM,GAAkC,IAAI,CAAC,cAAc,CAAA;AAElE,QAAA,IAAA,CAAA,SAAS,GAA2B,IAAI,eAAe,EAAE,CAAA;AAKvD,QAAA,IAAI,MAAM;AAAE,YAAA,IAA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3D,QAAA,IAAI,QAAQ,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,KAAK;AAAE,YAAA,OAAO,CAAC,CAAA;;;QAIlD,OAAO,IAAI,CAAC,MAAM,CAAC,wBAAwB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,KAAK,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAA;KAChG;;;;;AAMO,IAAA,oBAAoB,CAAE,CAAqB,EAAA;QACjD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAA;KAC1G;AAEO,IAAA,cAAc,CAAE,CAAqB,EAAA;AAC3C,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,CAAA;KAClC;AAEO,IAAA,aAAa,CAAE,CAAqB,EAAA;AAC1C,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,CAAA;KAClC;;AAxSM,OAAS,CAAA,SAAA,GAAGO,KAAC;;;;"}
@@ -13,6 +13,7 @@ export declare const variables: {
13
13
  export declare const tiles: string;
14
14
  export declare const tileGroup: string;
15
15
  export declare const tile: string;
16
+ export declare const tileExiting: string;
16
17
  export declare const clickableTile: string;
17
18
  export declare const tileForeground: string;
18
19
  export declare const label: string;
@@ -33,6 +33,10 @@ const tile = css `
33
33
  stroke-opacity: var(${variables.treemapTileHoverStrokeOpacity})
34
34
  }
35
35
  `;
36
+ const tileExiting = css `
37
+ label: tile-exiting;
38
+ pointer-events: none;
39
+ `;
36
40
  // The leaf tiles are clickable
37
41
  const clickableTile = css `
38
42
  label: clickable-tile;
@@ -60,5 +64,5 @@ const labelGroup = css `
60
64
  label: label-group;
61
65
  `;
62
66
 
63
- export { clickableTile, internalLabel, label, labelGroup, root, tile, tileForeground, tileGroup, tiles, variables };
67
+ export { clickableTile, internalLabel, label, labelGroup, root, tile, tileExiting, tileForeground, tileGroup, tiles, variables };
64
68
  //# sourceMappingURL=style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sources":["../../../src/components/treemap/style.ts"],"sourcesContent":["import { css } from '@emotion/css'\n\n// Utils\nimport { getCssVarNames, injectGlobalCssVariables } from 'utils/style'\n\nconst cssVarDefaults = {\n '--vis-treemap-tile-stroke-color': '#fff',\n '--vis-treemap-tile-stroke-width': '2px',\n '--vis-treemap-tile-hover-stroke-color': '#fff',\n '--vis-treemap-tile-hover-stroke-opacity': 0,\n\n /* Labels */\n '--vis-treemap-label-opacity': 0.8,\n '--vis-treemap-label-font-weight': 'normal',\n '--vis-treemap-label-text-color': '#000',\n '--vis-treemap-label-text-color-light': '#fff',\n '--vis-treemap-label-font-size': '12px',\n}\n\nexport const root = css`\n label: treemap-component;\n`\n\nexport const variables = getCssVarNames(cssVarDefaults)\ninjectGlobalCssVariables(cssVarDefaults, root)\n\nexport const tiles = css`\n label: g-tiles;\n`\n\nexport const tileGroup = css`\n label: tile-group;\n`\n\nexport const tile = css`\n label: tile;\n stroke: var(${variables.treemapTileHoverStrokeColor});\n stroke-opacity: 0;\n\n &:hover {\n stroke-opacity: var(${variables.treemapTileHoverStrokeOpacity})\n }\n`\n\n// The leaf tiles are clickable\nexport const clickableTile = css`\n label: clickable-tile;\n cursor: pointer;\n`\n\nexport const tileForeground = css`\n label: tile-foreground;\n`\n\nexport const label = css`\n label: label;\n text-anchor: start;\n dominant-baseline: hanging;\n user-select: none;\n pointer-events: none;\n font-size: var(${variables.treemapLabelFontSize});\n opacity: var(${variables.treemapLabelOpacity});\n fill: var(${variables.treemapLabelTextColor});\n font-weight: var(${variables.treemapLabelFontWeight});\n`\n\nexport const internalLabel = css`\n label: internal-label;\n font-weight: 500;\n`\n\nexport const labelGroup = css`\n label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/components/treemap/style.ts"],"sourcesContent":["import { css } from '@emotion/css'\n\n// Utils\nimport { getCssVarNames, injectGlobalCssVariables } from 'utils/style'\n\nconst cssVarDefaults = {\n '--vis-treemap-tile-stroke-color': '#fff',\n '--vis-treemap-tile-stroke-width': '2px',\n '--vis-treemap-tile-hover-stroke-color': '#fff',\n '--vis-treemap-tile-hover-stroke-opacity': 0,\n\n /* Labels */\n '--vis-treemap-label-opacity': 0.8,\n '--vis-treemap-label-font-weight': 'normal',\n '--vis-treemap-label-text-color': '#000',\n '--vis-treemap-label-text-color-light': '#fff',\n '--vis-treemap-label-font-size': '12px',\n}\n\nexport const root = css`\n label: treemap-component;\n`\n\nexport const variables = getCssVarNames(cssVarDefaults)\ninjectGlobalCssVariables(cssVarDefaults, root)\n\nexport const tiles = css`\n label: g-tiles;\n`\n\nexport const tileGroup = css`\n label: tile-group;\n`\n\nexport const tile = css`\n label: tile;\n stroke: var(${variables.treemapTileHoverStrokeColor});\n stroke-opacity: 0;\n\n &:hover {\n stroke-opacity: var(${variables.treemapTileHoverStrokeOpacity})\n }\n`\n\nexport const tileExiting = css`\n label: tile-exiting;\n pointer-events: none;\n`\n\n// The leaf tiles are clickable\nexport const clickableTile = css`\n label: clickable-tile;\n cursor: pointer;\n`\n\nexport const tileForeground = css`\n label: tile-foreground;\n`\n\nexport const label = css`\n label: label;\n text-anchor: start;\n dominant-baseline: hanging;\n user-select: none;\n pointer-events: none;\n font-size: var(${variables.treemapLabelFontSize});\n opacity: var(${variables.treemapLabelOpacity});\n fill: var(${variables.treemapLabelTextColor});\n font-weight: var(${variables.treemapLabelFontWeight});\n`\n\nexport const internalLabel = css`\n label: internal-label;\n font-weight: 500;\n`\n\nexport const labelGroup = css`\n label: label-group;\n`\n"],"names":[],"mappings":";;;AAKA,MAAM,cAAc,GAAG;AACrB,IAAA,iCAAiC,EAAE,MAAM;AACzC,IAAA,iCAAiC,EAAE,KAAK;AACxC,IAAA,uCAAuC,EAAE,MAAM;AAC/C,IAAA,yCAAyC,EAAE,CAAC;;AAG5C,IAAA,6BAA6B,EAAE,GAAG;AAClC,IAAA,iCAAiC,EAAE,QAAQ;AAC3C,IAAA,gCAAgC,EAAE,MAAM;AACxC,IAAA,sCAAsC,EAAE,MAAM;AAC9C,IAAA,+BAA+B,EAAE,MAAM;CACxC,CAAA;AAEM,MAAM,IAAI,GAAG,GAAG,CAAA,CAAA;;EAEtB;MAEY,SAAS,GAAG,cAAc,CAAC,cAAc,EAAC;AACvD,wBAAwB,CAAC,cAAc,EAAE,IAAI,CAAC,CAAA;AAEvC,MAAM,KAAK,GAAG,GAAG,CAAA,CAAA;;EAEvB;AAEM,MAAM,SAAS,GAAG,GAAG,CAAA,CAAA;;EAE3B;AAEM,MAAM,IAAI,GAAG,GAAG,CAAA,CAAA;;AAEP,cAAA,EAAA,SAAS,CAAC,2BAA2B,CAAA;;;;AAI3B,wBAAA,EAAA,SAAS,CAAC,6BAA6B,CAAA;;EAEhE;AAEM,MAAM,WAAW,GAAG,GAAG,CAAA,CAAA;;;EAG7B;AAED;AACO,MAAM,aAAa,GAAG,GAAG,CAAA,CAAA;;;EAG/B;AAEM,MAAM,cAAc,GAAG,GAAG,CAAA,CAAA;;EAEhC;AAEM,MAAM,KAAK,GAAG,GAAG,CAAA,CAAA;;;;;;AAML,iBAAA,EAAA,SAAS,CAAC,oBAAoB,CAAA;AAChC,eAAA,EAAA,SAAS,CAAC,mBAAmB,CAAA;AAChC,YAAA,EAAA,SAAS,CAAC,qBAAqB,CAAA;AACxB,mBAAA,EAAA,SAAS,CAAC,sBAAsB,CAAA;EACpD;AAEM,MAAM,aAAa,GAAG,GAAG,CAAA,CAAA;;;EAG/B;AAEM,MAAM,UAAU,GAAG,GAAG,CAAA,CAAA;;;;;;"}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@unovis/ts",
3
3
  "description": "Modular data visualization framework for React, Angular, Svelte, Vue, Solid, and vanilla TypeScript or JavaScript",
4
- "version": "1.7.0-pre.1",
5
- "packageManager": "npm@10.9.1",
4
+ "version": "1.7.0-pre.2",
5
+ "packageManager": "pnpm@10.23.0",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/f5/unovis.git",
@@ -55,9 +55,45 @@
55
55
  "dependencies": {
56
56
  "@emotion/css": "^11.7.1",
57
57
  "@juggle/resize-observer": "^3.3.1",
58
+ "d3-array": "~3",
59
+ "d3-shape": "~3",
60
+ "d3-hierarchy": "~3",
61
+ "d3-scale": "~4",
62
+ "d3-selection": "~3",
63
+ "d3-color": "~3",
64
+ "d3-chord": "~3",
65
+ "d3-force": "~3",
66
+ "d3-interpolate": "~3",
67
+ "d3-ease": "~3",
68
+ "d3-brush": "~3",
69
+ "d3-drag": "~3",
70
+ "d3-zoom": "~3",
71
+ "d3-timer": "~3",
72
+ "d3-axis": "~3",
73
+ "d3-transition": "~3",
74
+ "d3-path": "~3",
75
+ "d3-geo": "~3",
58
76
  "@types/d3": "^7.4.0",
59
77
  "@types/d3-collection": "^1.0.10",
60
78
  "@types/d3-sankey": "^0.12.4",
79
+ "@types/d3-array": "~3.2.2",
80
+ "@types/d3-shape": "~3.1.7",
81
+ "@types/d3-hierarchy": "~3.1.7",
82
+ "@types/d3-scale": "~4.0.9",
83
+ "@types/d3-selection": "~3.0.0",
84
+ "@types/d3-color": "~3.1.3",
85
+ "@types/d3-chord": "~3.0.6",
86
+ "@types/d3-force": "~3.0.10",
87
+ "@types/d3-interpolate": "~3.0.4",
88
+ "@types/d3-ease": "~3.0.2",
89
+ "@types/d3-brush": "~3.0.6",
90
+ "@types/d3-drag": "~3.0.7",
91
+ "@types/d3-zoom": "~3.0.8",
92
+ "@types/d3-timer": "~3.0.2",
93
+ "@types/d3-axis": "~3.0.6",
94
+ "@types/d3-transition": "~3.0.9",
95
+ "@types/d3-path": "~3.1.1",
96
+ "@types/d3-geo": "~3.1.0",
61
97
  "@types/dagre": "^0.7.50",
62
98
  "@types/geojson": "^7946.0.8",
63
99
  "@types/leaflet": "1.7.6",
@@ -83,6 +119,7 @@
83
119
  "three": "^0.135.0",
84
120
  "throttle-debounce": "^5.0.0",
85
121
  "topojson-client": "^3.1.0",
86
- "tslib": "^2.3.1"
122
+ "tslib": "^2.3.1",
123
+ "typescript": "~4.2.4"
87
124
  }
88
125
  }