UNPKG

g-chartframe

Version:
2 lines (1 loc) • 49.2 kB
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports):"function"==typeof define&&define.amd?define(["exports"],factory):(global="undefined"!=typeof globalThis?globalThis:global||self,factory(global.gChartframe={}))}(this,function(exports){"use strict";function namespace(name){var prefix=name+="",i=prefix.indexOf(":");return i>=0&&"xmlns"!==(prefix=name.slice(0,i))&&(name=name.slice(i+1)),namespaces.hasOwnProperty(prefix)?{space:namespaces[prefix],local:name}:name}function creator(name){var fullname=namespace(name);return(fullname.local?function(fullname){return function(){return this.ownerDocument.createElementNS(fullname.space,fullname.local)}}:function(name){return function(){var document=this.ownerDocument,uri=this.namespaceURI;return uri===xhtml&&document.documentElement.namespaceURI===xhtml?document.createElement(name):document.createElementNS(uri,name)}})(fullname)}function selector(selector){return null==selector?function(){}:function(){return this.querySelector(selector)}}function array(x){return"object"==typeof x&&"length"in x?x:Array.from(x)}function childMatcher(selector){return function(node){return node.matches(selector)}}function sparse(update){return new Array(update.length)}function EnterNode(parent,datum){this.ownerDocument=parent.ownerDocument,this.namespaceURI=parent.namespaceURI,this._next=null,this._parent=parent,this.__data__=datum}function datum(node){return node.__data__}function ascending(a,b){return a<b?-1:a>b?1:a>=b?0:NaN}function defaultView(node){return node.ownerDocument&&node.ownerDocument.defaultView||node.document&&node||node.defaultView}function classArray(string){return string.trim().split(/^|\s+/)}function classList(node){return node.classList||new ClassList(node)}function ClassList(node){this._node=node,this._names=classArray(node.getAttribute("class")||"")}function classedAdd(node,names){for(var list=classList(node),i=-1,n=names.length;++i<n;)list.add(names[i])}function classedRemove(node,names){for(var list=classList(node),i=-1,n=names.length;++i<n;)list.remove(names[i])}function raise(){this.nextSibling&&this.parentNode.appendChild(this)}function lower(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function remove(){var parent=this.parentNode;parent&&parent.removeChild(this)}function dispatchEvent(node,type,params){var window=defaultView(node),event=window.CustomEvent;"function"==typeof event?event=new event(type,params):(event=window.document.createEvent("Event"),params?(event.initEvent(type,params.bubbles,params.cancelable),event.detail=params.detail):event.initEvent(type,!1,!1)),node.dispatchEvent(event)}function Selection(groups,parents){this._groups=groups,this._parents=parents}function select(selector){return"string"==typeof selector?new Selection([[document.querySelector(selector)]],[document.documentElement]):new Selection([[selector]],root)}function chartFrame(configObject){function attributeStyle(parent,style){Object.keys(style).forEach(function(attribute){parent.attr(attribute,style[attribute])})}function frame(p){if(p.attr("class",containerClass).attr("font-family","MetricWeb,sans-serif"),p.attr("role","img"),"svg"===p.node().nodeName.toLowerCase()&&(p.attr("width",graphicWidth).attr("height",graphicHeight).attr("viewBox",["0 0",graphicWidth,graphicHeight].join(" ")),!1===a11yTitle&&!1===title||(p.append("title").text(a11yTitle||title).attr("id","".concat(containerClass,"__chart-a11y-title")),p.attr("aria-labelledby","".concat(containerClass,"__chart-a11y-title"))),!1!==a11yDesc&&(p.append("desc").text(a11yDesc).attr("id","".concat(containerClass,"__chart-a11y-desc")),p.attr("aria-labelledby","".concat(p.attr("aria-labelledby")?"".concat(p.attr("aria-labelledby")," "):"").concat(containerClass,"__chart-a11y-desc")))),void 0===backgroundColor||p.select("#chart-background").size()||p.append("rect").attr("role","presentation").attr("id","chart-background").attr("class","chart-background").attr("x",0).attr("y",0).attr("width",graphicWidth).attr("height",graphicHeight).attr("fill",backgroundColor),blackbar&&!p.selectAll("rect.black-bar").size()&&p.append("rect").attr("class","black-bar").attr("width",60).attr("height",4).style("fill",blackbar),whitebar&&!p.selectAll("rect.white-bar").size()&&p.append("rect").attr("class","white-bar").attr("width",60).attr("height",4).style("fill",whitebar).attr("transform","translate(".concat(margin.left,",").concat(margin.left,")")),goalposts&&!p.selectAll("path.chart-goalposts").size()){var goalpostPaths=["M 0, ".concat(graphicHeight," L ").concat(graphicWidth,", ").concat(graphicHeight),"M 0, 15 L 0, 0 L ".concat(graphicWidth,", 0 L ").concat(graphicWidth,", 15")];p.append("path").attr("class","chart-goalposts").attr("d",goalpostPaths).attr("stroke-width",.3).attr("fill","none").attr("stroke",goalposts)}var titleLineCount=title?title.split("|").length:0,subtitleLineCount=subtitle?subtitle.split("|").length:0,sourceLineCount=source?source.split("|").length:0;if(title&&!p.select("text.chart-title").size()&&p.append("text").attr("class","chart-title").attr("id","".concat(containerClass,"title")).call(function(titleText){titleText.selectAll("tspan").data(title.split("|")).enter().append("tspan").text(function(d){return d}).attr("y",function(d,i){return titlePosition.y+i*titleLineHeight}).attr("x",titlePosition.x).call(attributeStyle,titleStyle)}),subtitle&&!p.select("text.chart-subtitle").size()&&p.append("text").attr("id","".concat(containerClass,"subtitle")).attr("class","chart-subtitle").call(function(subtitleText){subtitleText.selectAll("tspan").data(subtitle.split("|")).enter().append("tspan").text(function(d){return d}).attr("id","".concat(containerClass,"subtitle")).attr("y",function(d,i){return titleLineCount>1?titlePosition.y+titleLineCount*titleLineHeight+subtitleLineHeight*i:subtitlePosition.y+i*subtitleLineHeight}).attr("x",subtitlePosition.x).call(attributeStyle,subtitleStyle)}),source&&!p.selectAll("text.chart-source").size()&&p.append("text").attr("class","chart-source").attr("id","".concat(containerClass,"source")).call(function(sourceText){sourceText.selectAll("tspan").data(source.split("|")).enter().append("tspan").text(function(d){return d}).attr("id","".concat(containerClass,"source")).attr("y",function(d,i){return sourcePosition.y?sourcePosition.y+i*sourceLineHeight:graphicHeight-(margin.bottom-sourcePlotYOffset)+1.5*sourceLineHeight+i*sourceLineHeight}).attr("x",sourcePosition.x).call(attributeStyle,sourceStyle)}),copyrightStyle&&!p.selectAll("text.chart-copyright").size()&&p.append("text").attr("class","chart-copyright").append("tspan").text(copyright).attr("x",sourcePosition.x).attr("y",function(){return sourceLineCount>1?graphicHeight-(margin.bottom-sourcePlotYOffset)+1.125*sourceLineHeight+sourceLineCount*sourceLineHeight*1.2:graphicHeight-(margin.bottom-sourcePlotYOffset)+2.5*sourceLineHeight}).call(attributeStyle,copyrightStyle),!autoPosition||"ft-printgraphic"!==containerClass&&"ft-socialgraphic"!==containerClass&&"ft-videographic"!==containerClass?autoPosition&&(margin.top=titlePosition.y+titleLineCount*titleLineHeight+subtitleLineCount*subtitleLineHeight+28-plotAdjuster):margin.top=titlePosition.y+titleLineCount*titleLineHeight+subtitleLineCount*subtitleLineHeight+rem/3,watermarkMarkup&&!p.selectAll("g.chart-watermark").size()&&"svg"!==p.node().ownerDocument.doctype.name&&p.append("g").attr("class","chart-watermark").html(watermarkMarkup).attr("role","presentation").attr("transform","translate(".concat(graphicWidth-watermarkWidth-watermarkOffsetX,",").concat(graphicHeight-watermarkHeight-watermarkOffsetY,") scale(1) ")),(plot=p.selectAll("g.chart-plot").size()?p.select("g.chart-plot"):p.append("g").attr("class","chart-plot")).attr("transform","translate(".concat(margin.left,",").concat(margin.top,")")),a11yPlotPresentation&&plot.attr("role","presentation"),showDownloadPngButtons&&"svg"!==p.node().ownerDocument.doctype.name){var parent;if(!(parent=select("svg"===p.node().nodeName.toLowerCase()?p.node().parentNode:p.node())).selectAll(".button-holder").size()){var holder=parent.append("div").attr("class","button-holder");holder.append("button").attr("class","save-png-button save-png-button__1x").text("Save as .png").style("float","left").style("opacity",.6).on("click",function(){return savePNG(p,1)}),holder.append("button").attr("class","save-png-button save-png-button__2x").style("float","left").style("opacity",.6).text("Save as double size .png").on("click",function(){return savePNG(p,2)})}}}var backgroundColor,plot,autoPosition=!1,a11yDesc="A graphic by the Financial Times",a11yPlotPresentation=!0,a11yTitle="A chart",containerClass="g-chartframe",copyright="© FT",copyrightStyle=!1,goalposts=!1,blackbar=!1,whitebar=!1,fullYear=!1,showDownloadPngButtons=!0,graphicHeight=400,graphicWidth=500,plotAdjuster=0,rem=18,subtitle="some supporting information, units perhaps",subtitleLineHeight=20,subtitleStyle={},source="Source: research",sourceLineHeight=16,sourcePlotYOffset=46,sourceStyle={},title="Title: A description of the charts purpose",titleLineHeight=32,titleStyle={},watermarkLocation="icons.svg#ft-logo",watermarkMarkup="",watermarkOffsetX=40,watermarkOffsetY=0,watermarkWidth=124,watermarkHeight=10,units="px",margin={top:100,left:1,bottom:20,right:20},subtitlePosition={x:1,y:67},sourcePosition={x:1},titlePosition={x:1,y:30},convertFrom={mm:function(x){return 2.83464480558843*x},px:function(x){return x}},custom={};return frame.a11y=function(){var _ref=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},newTitle=_ref.title,newDesc=_ref.desc;return void 0!==newTitle&&(a11yTitle=newTitle),void 0!==newDesc&&(a11yDesc=newDesc),void 0===newTitle&&void 0===newDesc?{title:a11yTitle,desc:a11yDesc}:frame},frame.a11yDesc=function(x){return void 0===x?a11yDesc:(a11yDesc=x,frame)},frame.a11yPlotPresentation=function(x){return void 0===x?a11yPlotPresentation:(a11yPlotPresentation=x,frame)},frame.a11yTitle=function(x){return void 0===x?a11yTitle:(a11yTitle=x,frame)},frame.autoPosition=function(x){return void 0===x?autoPosition:(autoPosition=x,frame)},frame.backgroundColor=function(x){return void 0===x?backgroundColor:(backgroundColor=x,frame)},frame.backgroundColour=function(){return console.error("gChartframe.backgroundColour() is deprecated and will be removed next version."),console.error("Please use gChartframe.backgroundColor() instead."),frame.backgroundColor.apply(frame,arguments)},frame.blackbar=function(x){return void 0===x?blackbar:(blackbar=x,frame)},frame.containerClass=function(x){return void 0===x?containerClass:(containerClass=x,frame)},frame.copyright=function(x){return void 0===x?copyright:(copyright=x,frame)},frame.copyrightStyle=function(x){return void 0===x?copyrightStyle:(copyrightStyle=x,frame)},frame.dimension=function(){return{width:graphicWidth-(margin.left+margin.right),height:graphicHeight-(margin.top+margin.bottom)}},frame.extend=function(key,value){return custom[key]=value,frame[key]=function(d){return void 0===d?custom[key]:(custom[key]=d,frame)},frame},frame.fullYear=function(x){return void 0===x?fullYear:(fullYear=x,frame)},frame.goalposts=function(x){return void 0===x?goalposts:(goalposts=x,frame)},frame.height=function(x){return void 0===x?graphicHeight:(graphicHeight=convertFrom[units](x),frame)},frame.margin=function(x){return void 0===x?margin:(Object.keys(x).forEach(function(k){margin[k]=x[k]}),frame)},frame.plot=function(){return plot},frame.plotAdjuster=function(x){return void 0===x?plotAdjuster:(plotAdjuster=x,frame)},frame.rem=function(x){return void 0===x?rem:(rem=x,frame)},frame.showDownloadPngButtons=function(d){return void 0===d?showDownloadPngButtons:(showDownloadPngButtons=d,frame)},frame.source=function(x){return void 0===x?source:(source=x,frame)},frame.sourceLineHeight=function(x){return void 0===x?sourceLineHeight:(sourceLineHeight=x,frame)},frame.sourcePlotYOffset=function(x){return void 0===x?sourcePlotYOffset:(sourcePlotYOffset=x,frame)},frame.sourceStyle=function(x){return void 0===x?sourceStyle:(sourceStyle=x,frame)},frame.sourceX=function(x){return void 0===x?sourcePosition.x:(sourcePosition.x=x,frame)},frame.sourceY=function(x){return void 0===x?sourcePosition.y:(sourcePosition.y=x,frame)},frame.subtitle=function(x){return void 0===x?subtitle:(subtitle=x,frame)},frame.subtitleLineHeight=function(x){return void 0===x?subtitleLineHeight:(subtitleLineHeight=x,frame)},frame.subtitleStyle=function(x){return void 0===x?subtitleStyle:(subtitleStyle=x,frame)},frame.subtitleX=function(x){return void 0===x?subtitlePosition.x:(subtitlePosition.x=x,frame)},frame.subtitleY=function(x){return void 0===x?subtitlePosition.y:(subtitlePosition.y=x,frame)},frame.title=function(x){return void 0===x?title:(title=x,frame)},frame.titleStyle=function(x){return void 0===x?titleStyle:(titleStyle=x,frame)},frame.titleLineHeight=function(x){return void 0===x?titleLineHeight:(titleLineHeight=x,frame)},frame.titleX=function(x){return void 0===x?titlePosition.x:(titlePosition.x=x,frame)},frame.titleY=function(x){return void 0===x?titlePosition.y:(titlePosition.y=x,frame)},frame.units=function(x){return void 0===x?units:(units=x,frame)},frame.watermark=function(x){return void 0===x?watermarkMarkup:(watermarkLocation="",watermarkMarkup=x,frame)},frame.watermarkOffsetY=function(x){return void 0===x?watermarkOffsetY:(watermarkOffsetY=x,frame)},frame.watermarkOffsetX=function(x){return void 0===x?watermarkOffsetX:(watermarkOffsetX=x,frame)},frame.watermarkLocation=function(x){return void 0===x?watermarkLocation:(watermarkMarkup="",watermarkLocation=x,frame)},frame.watermarkWidth=function(x){return void 0===x?watermarkWidth:(watermarkWidth=x,frame)},frame.watermarkHeight=function(x){return void 0===x?watermarkHeight:(watermarkHeight=x,frame)},frame.whitebar=function(x){return void 0===x?whitebar:(whitebar=x,frame)},frame.width=function(x){return x?(graphicWidth=convertFrom[units](x),frame):graphicWidth},frame.attrs=function(x){return void 0===x?Object.assign({},{a11yDesc:a11yDesc,a11yPlotPresentation:a11yPlotPresentation,a11yTitle:a11yTitle,autoPosition:autoPosition,containerClass:containerClass,copyright:copyright,copyrightStyle:copyrightStyle,blackbar:blackbar,backgroundColor:backgroundColor,goalposts:goalposts,graphicHeight:graphicHeight,graphicWidth:graphicWidth,margin:margin,plot:plot,plotAdjuster:plotAdjuster,rem:rem,subtitle:subtitle,subtitleLineHeight:subtitleLineHeight,subtitlePosition:subtitlePosition,subtitleStyle:subtitleStyle,source:source,sourceLineHeight:sourceLineHeight,sourcePosition:sourcePosition,sourceStyle:sourceStyle,title:title,titleLineHeight:titleLineHeight,titlePosition:titlePosition,titleStyle:titleStyle,watermarkLocation:watermarkLocation,watermarkMarkup:watermarkMarkup,watermarkOffsetX:watermarkOffsetX,watermarkOffsetY:watermarkOffsetY,watermarkHeight:watermarkHeight,watermarkWidth:watermarkWidth,whitebar:whitebar,units:units},custom):(Object.keys(x).forEach(function(setterName){var value=x[setterName];(function(functionToCheck){return functionToCheck&&"[object Function]"==={}.toString.call(functionToCheck)})(frame[setterName])&&frame[setterName](value)}),frame)},void 0!==configObject&&frame.attrs(configObject),frame}function savePNG(svg,scaleFactor){svg.selectAll(classes.join(", ")).each(function(){for(var element=this,computedStyle=getComputedStyle(element,null),i=0;i<computedStyle.length;i+=1){var property=computedStyle.item(i),value=computedStyle.getPropertyValue(property);element.style[property]=value}}),saveSvgAsPng_1(svg.node(),"".concat(svg.select("title").text().replace(/\s/g,"-").toLowerCase(),".png"),{scale:scaleFactor})}var saveSvgAsPng_1=function(fn,module){return module={exports:{}},fn(module,module.exports),module.exports}(function(module,exports){!function(){var out$=exports||!1||this||window;out$.default=out$;var xmlNs="http://www.w3.org/2000/xmlns/",svgNs="http://www.w3.org/2000/svg",urlRegex=/url\(["']?(.+?)["']?\)/,fontFormats={woff2:"font/woff2",woff:"font/woff",otf:"application/x-font-opentype",ttf:"application/x-font-ttf",eot:"application/vnd.ms-fontobject",sfnt:"application/font-sfnt",svg:"image/svg+xml"},isElement=function(obj){return obj instanceof HTMLElement||obj instanceof SVGElement},requireDomNode=function(el){if(!isElement(el))throw new Error("an HTMLElement or SVGElement is required; got "+el)},requireDomNodePromise=function(el){return new Promise(function(resolve,reject){isElement(el)?resolve(el):reject(new Error("an HTMLElement or SVGElement is required; got "+el))})},getDimension=function(el,clone,dim){var v=el.viewBox&&el.viewBox.baseVal&&el.viewBox.baseVal[dim]||null!==clone.getAttribute(dim)&&!clone.getAttribute(dim).match(/%$/)&&parseInt(clone.getAttribute(dim))||el.getBoundingClientRect()[dim]||parseInt(clone.style[dim])||parseInt(window.getComputedStyle(el).getPropertyValue(dim));return void 0===v||null===v||isNaN(parseFloat(v))?0:v},uriToBlob=function(uri){for(var byteString=window.atob(uri.split(",")[1]),mimeString=uri.split(",")[0].split(":")[1].split(";")[0],buffer=new ArrayBuffer(byteString.length),intArray=new Uint8Array(buffer),i=0;i<byteString.length;i++)intArray[i]=byteString.charCodeAt(i);return new Blob([buffer],{type:mimeString})},detectCssFont=function(rule,href){var match=rule.cssText.match(urlRegex),url=match&&match[1]||"";if(url&&!url.match(/^data:/)&&"about:blank"!==url){var fullUrl=url.startsWith("../")?href+"/../"+url:url.startsWith("./")?href+"/."+url:url;return{text:rule.cssText,format:function(fontUrl){var formats=Object.keys(fontFormats).filter(function(extension){return fontUrl.indexOf("."+extension)>0}).map(function(extension){return fontFormats[extension]});return formats?formats[0]:(console.error("Unknown font format for "+fontUrl+". Fonts may not be working correctly."),"application/octet-stream")}(fullUrl),url:fullUrl}}},inlineImages=function(el){return Promise.all(Array.from(el.querySelectorAll("image")).map(function(image){var href=image.getAttributeNS("http://www.w3.org/1999/xlink","href")||image.getAttribute("href");return href?(function(url){return url&&0===url.lastIndexOf("http",0)&&-1===url.lastIndexOf(window.location.host)}(href)&&(href+=(-1===href.indexOf("?")?"?":"&")+"t="+(new Date).valueOf()),new Promise(function(resolve,reject){var canvas=document.createElement("canvas"),img=new Image;img.crossOrigin="anonymous",img.src=href,img.onerror=function(){return reject(new Error("Could not load "+href))},img.onload=function(){canvas.width=img.width,canvas.height=img.height,canvas.getContext("2d").drawImage(img,0,0),image.setAttributeNS("http://www.w3.org/1999/xlink","href",canvas.toDataURL("image/png")),resolve(!0)}})):Promise.resolve(null)}))},cachedFonts={},inlineFonts=function(fonts){return Promise.all(fonts.map(function(font){return new Promise(function(resolve,reject){if(cachedFonts[font.url])return resolve(cachedFonts[font.url]);var req=new XMLHttpRequest;req.addEventListener("load",function(){var fontInBase64=function(buffer){for(var binary="",bytes=new Uint8Array(buffer),i=0;i<bytes.byteLength;i++)binary+=String.fromCharCode(bytes[i]);return window.btoa(binary)}(req.response),fontUri=font.text.replace(urlRegex,'url("data:'+font.format+";base64,"+fontInBase64+'")')+"\n";cachedFonts[font.url]=fontUri,resolve(fontUri)}),req.addEventListener("error",function(e){console.warn("Failed to load font from: "+font.url,e),cachedFonts[font.url]=null,resolve(null)}),req.addEventListener("abort",function(e){console.warn("Aborted loading font from: "+font.url,e),resolve(null)}),req.open("GET",font.url),req.responseType="arraybuffer",req.send()})})).then(function(fontCss){return fontCss.filter(function(x){return x}).join("")})},cachedRules=null,inlineCss=function(el,options){var _ref=options||{},selectorRemap=_ref.selectorRemap,modifyStyle=_ref.modifyStyle,fonts=_ref.fonts,excludeUnusedCss=_ref.excludeUnusedCss,generateCss=_ref.modifyCss||function(selector,properties){return(selectorRemap?selectorRemap(selector):selector)+"{"+(modifyStyle?modifyStyle(properties):properties)+"}\n"},css=[],detectFonts=void 0===fonts,fontList=fonts||[];return(cachedRules||(cachedRules=Array.from(document.styleSheets).map(function(sheet){try{return{rules:sheet.cssRules,href:sheet.href}}catch(e){return console.warn("Stylesheet could not be loaded: "+sheet.href,e),{}}}))).forEach(function(_ref2){var rules=_ref2.rules,href=_ref2.href;rules&&Array.from(rules).forEach(function(rule){if(void 0!==rule.style)if(function(el,selector){if(selector)try{return el.querySelector(selector)||el.parentNode&&el.parentNode.querySelector(selector)}catch(err){console.warn('Invalid CSS selector "'+selector+'"',err)}}(el,rule.selectorText))css.push(generateCss(rule.selectorText,rule.style.cssText));else if(detectFonts&&rule.cssText.match(/^@font-face/)){var font=detectCssFont(rule,href);font&&fontList.push(font)}else excludeUnusedCss||css.push(rule.cssText)})}),inlineFonts(fontList).then(function(fontCss){return css.join("\n")+fontCss})},downloadOptions=function(){if(!(navigator.msSaveOrOpenBlob||"download"in document.createElement("a")))return{popup:window.open()}};out$.prepareSvg=function(el,options,done){requireDomNode(el);var _ref3=options||{},_ref3$left=_ref3.left,left=void 0===_ref3$left?0:_ref3$left,_ref3$top=_ref3.top,top=void 0===_ref3$top?0:_ref3$top,w=_ref3.width,h=_ref3.height,_ref3$scale=_ref3.scale,scale=void 0===_ref3$scale?1:_ref3$scale,_ref3$responsive=_ref3.responsive,responsive=void 0!==_ref3$responsive&&_ref3$responsive,_ref3$excludeCss=_ref3.excludeCss,excludeCss=void 0!==_ref3$excludeCss&&_ref3$excludeCss;return inlineImages(el).then(function(){var clone=el.cloneNode(!0);clone.style.backgroundColor=(options||{}).backgroundColor||el.style.backgroundColor;var _getDimensions=function(el,clone,width,height){if("svg"===el.tagName)return{width:width||getDimension(el,clone,"width"),height:height||getDimension(el,clone,"height")};if(el.getBBox){var _el$getBBox=el.getBBox(),x=_el$getBBox.x,y=_el$getBBox.y;return{width:x+_el$getBBox.width,height:y+_el$getBBox.height}}}(el,clone,w,h),width=_getDimensions.width,height=_getDimensions.height;if("svg"!==el.tagName){if(!el.getBBox)return void console.error("Attempted to render non-SVG element",el);null!=clone.getAttribute("transform")&&clone.setAttribute("transform",clone.getAttribute("transform").replace(/translate\(.*?\)/,""));var svg=document.createElementNS("http://www.w3.org/2000/svg","svg");svg.appendChild(clone),clone=svg}if(clone.setAttribute("version","1.1"),clone.setAttribute("viewBox",[left,top,width,height].join(" ")),clone.getAttribute("xmlns")||clone.setAttributeNS(xmlNs,"xmlns",svgNs),clone.getAttribute("xmlns:xlink")||clone.setAttributeNS(xmlNs,"xmlns:xlink","http://www.w3.org/1999/xlink"),responsive?(clone.removeAttribute("width"),clone.removeAttribute("height"),clone.setAttribute("preserveAspectRatio","xMinYMin meet")):(clone.setAttribute("width",width*scale),clone.setAttribute("height",height*scale)),Array.from(clone.querySelectorAll("foreignObject > *")).forEach(function(foreignObject){foreignObject.setAttributeNS(xmlNs,"xmlns","svg"===foreignObject.tagName?svgNs:"http://www.w3.org/1999/xhtml")}),!excludeCss)return inlineCss(el,options).then(function(css){var style=document.createElement("style");style.setAttribute("type","text/css"),style.innerHTML="<![CDATA[\n"+css+"\n]]>";var defs=document.createElement("defs");defs.appendChild(style),clone.insertBefore(defs,clone.firstChild);var outer=document.createElement("div");outer.appendChild(clone);var src=outer.innerHTML.replace(/NS\d+:href/gi,'xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href');if("function"!=typeof done)return{src:src,width:width,height:height};done(src,width,height)});var outer=document.createElement("div");outer.appendChild(clone);var src=outer.innerHTML;if("function"!=typeof done)return{src:src,width:width,height:height};done(src,width,height)})},out$.svgAsDataUri=function(el,options,done){return requireDomNode(el),out$.prepareSvg(el,options).then(function(_ref4){var src=_ref4.src,width=_ref4.width,height=_ref4.height,svgXml="data:image/svg+xml;base64,"+window.btoa(function(data){return decodeURIComponent(encodeURIComponent(data).replace(/%([0-9A-F]{2})/g,function(match,p1){var c=String.fromCharCode("0x"+p1);return"%"===c?"%25":c}))}('<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [<!ENTITY nbsp "&#160;">]>'+src));return"function"==typeof done&&done(svgXml,width,height),svgXml})},out$.svgAsPngUri=function(el,options,done){requireDomNode(el);var _ref5=options||{},_ref5$encoderType=_ref5.encoderType,encoderType=void 0===_ref5$encoderType?"image/png":_ref5$encoderType,_ref5$encoderOptions=_ref5.encoderOptions,encoderOptions=void 0===_ref5$encoderOptions?.8:_ref5$encoderOptions,canvg=_ref5.canvg,convertToPng=function(_ref6){var src=_ref6.src,width=_ref6.width,height=_ref6.height,canvas=document.createElement("canvas"),context=canvas.getContext("2d"),pixelRatio=window.devicePixelRatio||1;canvas.width=width*pixelRatio,canvas.height=height*pixelRatio,canvas.style.width=canvas.width+"px",canvas.style.height=canvas.height+"px",context.setTransform(pixelRatio,0,0,pixelRatio,0,0),canvg?canvg(canvas,src):context.drawImage(src,0,0);var png=void 0;try{png=canvas.toDataURL(encoderType,encoderOptions)}catch(e){if("undefined"!=typeof SecurityError&&e instanceof SecurityError||"SecurityError"===e.name)return void console.error("Rendered SVG images cannot be downloaded in this browser.");throw e}return"function"==typeof done&&done(png,canvas.width,canvas.height),Promise.resolve(png)};return canvg?out$.prepareSvg(el,options).then(convertToPng):out$.svgAsDataUri(el,options).then(function(uri){return new Promise(function(resolve,reject){var image=new Image;image.onload=function(){return resolve(convertToPng({src:image,width:image.width,height:image.height}))},image.onerror=function(){reject("There was an error loading the data URI as an image on the following SVG\n"+window.atob(uri.slice(26))+"Open the following link to see browser's diagnosis\n"+uri)},image.src=uri})})},out$.download=function(name,uri,options){if(navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(uriToBlob(uri),name);else{var saveLink=document.createElement("a");if("download"in saveLink){saveLink.download=name,saveLink.style.display="none",document.body.appendChild(saveLink);try{var blob=uriToBlob(uri),url=URL.createObjectURL(blob);saveLink.href=url,saveLink.onclick=function(){return requestAnimationFrame(function(){return URL.revokeObjectURL(url)})}}catch(e){console.error(e),console.warn("Error while getting object URL. Falling back to string URL."),saveLink.href=uri}saveLink.click(),document.body.removeChild(saveLink)}else options&&options.popup&&(options.popup.document.title=name,options.popup.location.replace(uri))}},out$.saveSvg=function(el,name,options){var downloadOpts=downloadOptions();return requireDomNodePromise(el).then(function(el){return out$.svgAsDataUri(el,options||{})}).then(function(uri){return out$.download(name,uri,downloadOpts)})},out$.saveSvgAsPng=function(el,name,options){var downloadOpts=downloadOptions();return requireDomNodePromise(el).then(function(el){return out$.svgAsPngUri(el,options||{})}).then(function(uri){return out$.download(name,uri,downloadOpts)})}}()}).saveSvgAsPng,xhtml="http://www.w3.org/1999/xhtml",namespaces={svg:"http://www.w3.org/2000/svg",xhtml:xhtml,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},find=Array.prototype.find,filter=Array.prototype.filter;EnterNode.prototype={constructor:EnterNode,appendChild:function(child){return this._parent.insertBefore(child,this._next)},insertBefore:function(child,next){return this._parent.insertBefore(child,next)},querySelector:function(selector){return this._parent.querySelector(selector)},querySelectorAll:function(selector){return this._parent.querySelectorAll(selector)}},ClassList.prototype={add:function(name){this._names.indexOf(name)<0&&(this._names.push(name),this._node.setAttribute("class",this._names.join(" ")))},remove:function(name){var i=this._names.indexOf(name);i>=0&&(this._names.splice(i,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(name){return this._names.indexOf(name)>=0}};var root=[null];Selection.prototype={constructor:Selection,select:function(select){"function"!=typeof select&&(select=selector(select));for(var groups=this._groups,m=groups.length,subgroups=new Array(m),j=0;j<m;++j)for(var node,subnode,group=groups[j],n=group.length,subgroup=subgroups[j]=new Array(n),i=0;i<n;++i)(node=group[i])&&(subnode=select.call(node,node.__data__,i,group))&&("__data__"in node&&(subnode.__data__=node.__data__),subgroup[i]=subnode);return new Selection(subgroups,this._parents)},selectAll:function(select){select="function"==typeof select?function(select){return function(){var group=select.apply(this,arguments);return null==group?[]:array(group)}}(select):function(selector){return null==selector?function(){return[]}:function(){return this.querySelectorAll(selector)}}(select);for(var groups=this._groups,m=groups.length,subgroups=[],parents=[],j=0;j<m;++j)for(var node,group=groups[j],n=group.length,i=0;i<n;++i)(node=group[i])&&(subgroups.push(select.call(node,node.__data__,i,group)),parents.push(node));return new Selection(subgroups,parents)},selectChild:function(match){return this.select(null==match?function(){return this.firstElementChild}:function(match){return function(){return find.call(this.children,match)}}("function"==typeof match?match:childMatcher(match)))},selectChildren:function(match){return this.selectAll(null==match?function(){return this.children}:function(match){return function(){return filter.call(this.children,match)}}("function"==typeof match?match:childMatcher(match)))},filter:function(match){"function"!=typeof match&&(match=function(selector){return function(){return this.matches(selector)}}(match));for(var groups=this._groups,m=groups.length,subgroups=new Array(m),j=0;j<m;++j)for(var node,group=groups[j],n=group.length,subgroup=subgroups[j]=[],i=0;i<n;++i)(node=group[i])&&match.call(node,node.__data__,i,group)&&subgroup.push(node);return new Selection(subgroups,this._parents)},data:function(value,key){if(!arguments.length)return Array.from(this,datum);var bind=key?function(parent,group,enter,update,exit,data,key){var i,node,keyValue,nodeByKeyValue=new Map,groupLength=group.length,dataLength=data.length,keyValues=new Array(groupLength);for(i=0;i<groupLength;++i)(node=group[i])&&(keyValues[i]=keyValue=key.call(node,node.__data__,i,group)+"",nodeByKeyValue.has(keyValue)?exit[i]=node:nodeByKeyValue.set(keyValue,node));for(i=0;i<dataLength;++i)keyValue=key.call(parent,data[i],i,data)+"",(node=nodeByKeyValue.get(keyValue))?(update[i]=node,node.__data__=data[i],nodeByKeyValue.delete(keyValue)):enter[i]=new EnterNode(parent,data[i]);for(i=0;i<groupLength;++i)(node=group[i])&&nodeByKeyValue.get(keyValues[i])===node&&(exit[i]=node)}:function(parent,group,enter,update,exit,data){for(var node,i=0,groupLength=group.length,dataLength=data.length;i<dataLength;++i)(node=group[i])?(node.__data__=data[i],update[i]=node):enter[i]=new EnterNode(parent,data[i]);for(;i<groupLength;++i)(node=group[i])&&(exit[i]=node)},parents=this._parents,groups=this._groups;"function"!=typeof value&&(value=function(x){return function(){return x}}(value));for(var m=groups.length,update=new Array(m),enter=new Array(m),exit=new Array(m),j=0;j<m;++j){var parent=parents[j],group=groups[j],groupLength=group.length,data=array(value.call(parent,parent&&parent.__data__,j,parents)),dataLength=data.length,enterGroup=enter[j]=new Array(dataLength),updateGroup=update[j]=new Array(dataLength);bind(parent,group,enterGroup,updateGroup,exit[j]=new Array(groupLength),data,key);for(var previous,next,i0=0,i1=0;i0<dataLength;++i0)if(previous=enterGroup[i0]){for(i0>=i1&&(i1=i0+1);!(next=updateGroup[i1])&&++i1<dataLength;);previous._next=next||null}}return update=new Selection(update,parents),update._enter=enter,update._exit=exit,update},enter:function(){return new Selection(this._enter||this._groups.map(sparse),this._parents)},exit:function(){return new Selection(this._exit||this._groups.map(sparse),this._parents)},join:function(onenter,onupdate,onexit){var enter=this.enter(),update=this,exit=this.exit();return enter="function"==typeof onenter?onenter(enter):enter.append(onenter+""),null!=onupdate&&(update=onupdate(update)),null==onexit?exit.remove():onexit(exit),enter&&update?enter.merge(update).order():update},merge:function(selection){if(!(selection instanceof Selection))throw new Error("invalid merge");for(var groups0=this._groups,groups1=selection._groups,m0=groups0.length,m1=groups1.length,m=Math.min(m0,m1),merges=new Array(m0),j=0;j<m;++j)for(var node,group0=groups0[j],group1=groups1[j],n=group0.length,merge=merges[j]=new Array(n),i=0;i<n;++i)(node=group0[i]||group1[i])&&(merge[i]=node);for(;j<m0;++j)merges[j]=groups0[j];return new Selection(merges,this._parents)},selection:function(){return this},order:function(){for(var groups=this._groups,j=-1,m=groups.length;++j<m;)for(var node,group=groups[j],i=group.length-1,next=group[i];--i>=0;)(node=group[i])&&(next&&4^node.compareDocumentPosition(next)&&next.parentNode.insertBefore(node,next),next=node);return this},sort:function(compare){function compareNode(a,b){return a&&b?compare(a.__data__,b.__data__):!a-!b}compare||(compare=ascending);for(var groups=this._groups,m=groups.length,sortgroups=new Array(m),j=0;j<m;++j){for(var node,group=groups[j],n=group.length,sortgroup=sortgroups[j]=new Array(n),i=0;i<n;++i)(node=group[i])&&(sortgroup[i]=node);sortgroup.sort(compareNode)}return new Selection(sortgroups,this._parents).order()},call:function(){var callback=arguments[0];return arguments[0]=this,callback.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var groups=this._groups,j=0,m=groups.length;j<m;++j)for(var group=groups[j],i=0,n=group.length;i<n;++i){var node=group[i];if(node)return node}return null},size:function(){let size=0;for(const node of this)++size;return size},empty:function(){return!this.node()},each:function(callback){for(var groups=this._groups,j=0,m=groups.length;j<m;++j)for(var node,group=groups[j],i=0,n=group.length;i<n;++i)(node=group[i])&&callback.call(node,node.__data__,i,group);return this},attr:function(name,value){var fullname=namespace(name);if(arguments.length<2){var node=this.node();return fullname.local?node.getAttributeNS(fullname.space,fullname.local):node.getAttribute(fullname)}return this.each((null==value?fullname.local?function(fullname){return function(){this.removeAttributeNS(fullname.space,fullname.local)}}:function(name){return function(){this.removeAttribute(name)}}:"function"==typeof value?fullname.local?function(fullname,value){return function(){var v=value.apply(this,arguments);null==v?this.removeAttributeNS(fullname.space,fullname.local):this.setAttributeNS(fullname.space,fullname.local,v)}}:function(name,value){return function(){var v=value.apply(this,arguments);null==v?this.removeAttribute(name):this.setAttribute(name,v)}}:fullname.local?function(fullname,value){return function(){this.setAttributeNS(fullname.space,fullname.local,value)}}:function(name,value){return function(){this.setAttribute(name,value)}})(fullname,value))},style:function(name,value,priority){return arguments.length>1?this.each((null==value?function(name){return function(){this.style.removeProperty(name)}}:"function"==typeof value?function(name,value,priority){return function(){var v=value.apply(this,arguments);null==v?this.style.removeProperty(name):this.style.setProperty(name,v,priority)}}:function(name,value,priority){return function(){this.style.setProperty(name,value,priority)}})(name,value,null==priority?"":priority)):function(node,name){return node.style.getPropertyValue(name)||defaultView(node).getComputedStyle(node,null).getPropertyValue(name)}(this.node(),name)},property:function(name,value){return arguments.length>1?this.each((null==value?function(name){return function(){delete this[name]}}:"function"==typeof value?function(name,value){return function(){var v=value.apply(this,arguments);null==v?delete this[name]:this[name]=v}}:function(name,value){return function(){this[name]=value}})(name,value)):this.node()[name]},classed:function(name,value){var names=classArray(name+"");if(arguments.length<2){for(var list=classList(this.node()),i=-1,n=names.length;++i<n;)if(!list.contains(names[i]))return!1;return!0}return this.each(("function"==typeof value?function(names,value){return function(){(value.apply(this,arguments)?classedAdd:classedRemove)(this,names)}}:value?function(names){return function(){classedAdd(this,names)}}:function(names){return function(){classedRemove(this,names)}})(names,value))},text:function(value){return arguments.length?this.each(null==value?function(){this.textContent=""}:("function"==typeof value?function(value){return function(){var v=value.apply(this,arguments);this.textContent=null==v?"":v}}:function(value){return function(){this.textContent=value}})(value)):this.node().textContent},html:function(value){return arguments.length?this.each(null==value?function(){this.innerHTML=""}:("function"==typeof value?function(value){return function(){var v=value.apply(this,arguments);this.innerHTML=null==v?"":v}}:function(value){return function(){this.innerHTML=value}})(value)):this.node().innerHTML},raise:function(){return this.each(raise)},lower:function(){return this.each(lower)},append:function(name){var create="function"==typeof name?name:creator(name);return this.select(function(){return this.appendChild(create.apply(this,arguments))})},insert:function(name,before){var create="function"==typeof name?name:creator(name),select=null==before?function(){return null}:"function"==typeof before?before:selector(before);return this.select(function(){return this.insertBefore(create.apply(this,arguments),select.apply(this,arguments)||null)})},remove:function(){return this.each(remove)},clone:function(deep){return this.select(deep?function(){var clone=this.cloneNode(!0),parent=this.parentNode;return parent?parent.insertBefore(clone,this.nextSibling):clone}:function(){var clone=this.cloneNode(!1),parent=this.parentNode;return parent?parent.insertBefore(clone,this.nextSibling):clone})},datum:function(value){return arguments.length?this.property("__data__",value):this.node().__data__},on:function(typename,value,options){var i,t,typenames=(typename+"").trim().split(/^|\s+/).map(function(t){var name="",i=t.indexOf(".");return i>=0&&(name=t.slice(i+1),t=t.slice(0,i)),{type:t,name:name}}),n=typenames.length;if(!(arguments.length<2)){for(on=value?function(typename,value,options){return function(){var o,on=this.__on,listener=function(listener){return function(event){listener.call(this,event,this.__data__)}}(value);if(on)for(var j=0,m=on.length;j<m;++j)if((o=on[j]).type===typename.type&&o.name===typename.name)return this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=listener,o.options=options),void(o.value=value);this.addEventListener(typename.type,listener,options),o={type:typename.type,name:typename.name,value:value,listener:listener,options:options},on?on.push(o):this.__on=[o]}}:function(typename){return function(){var on=this.__on;if(on){for(var o,j=0,i=-1,m=on.length;j<m;++j)o=on[j],typename.type&&o.type!==typename.type||o.name!==typename.name?on[++i]=o:this.removeEventListener(o.type,o.listener,o.options);++i?on.length=i:delete this.__on}}},i=0;i<n;++i)this.each(on(typenames[i],value,options));return this}var on=this.node().__on;if(on)for(var o,j=0,m=on.length;j<m;++j)for(i=0,o=on[j];i<n;++i)if((t=typenames[i]).type===o.type&&t.name===o.name)return o.value},dispatch:function(type,params){return this.each(("function"==typeof params?function(type,params){return function(){return dispatchEvent(this,type,params.apply(this,arguments))}}:function(type,params){return function(){return dispatchEvent(this,type,params)}})(type,params))},[Symbol.iterator]:function*(){for(var groups=this._groups,j=0,m=groups.length;j<m;++j)for(var node,group=groups[j],i=0,n=group.length;i<n;++i)(node=group[i])&&(yield node)}};var classes=[".annotation",".lines",".highlights",".axis path",".axis text",".axis line",".axis",".baseline",".baseline line",".legend",".legend text",".chart-goalposts",".chart-title",".chart-subtitle",".chart-source",".chart-copyright",".chart-watermark",".annotations-holder",".lines highlighlines",".highlights",".annotation",".annotations-holder line",".annotations-holder text",".line path",".highlights rects"],watermarkPath={light:'<path fill="#8e9095" id="logo" d="M3,8.5c0,0.7,0.2,0.9,1.5,0.9v0.4H0V9.4c0.9,0,1.2-0.1,1.2-0.8V1.4c0-0.8-0.3-0.8-1.2-0.8V0.2h6.1c0.8,0,1.1,0,1.4-0.1l0,2.7H7.2c-0.2-2-0.7-2.2-2.6-2.2H3v4h1.3c1.3,0,1.3-0.2,1.4-1.2h0.4v2.9H5.7c-0.1-1-0.2-1.2-1.4-1.2H3V8.5zM8.4,9.8V9.4c0.9,0,1.2-0.1,1.2-0.8V1.4c0-0.8-0.3-0.8-1.2-0.8V0.2h4.2v0.4c-0.9,0-1.2,0.1-1.2,0.8v7.1c0,0.8,0.3,0.8,1.2,0.8v0.4H8.4z M22,10l-6.6-8.2v6.7c0,0.8,0.5,0.9,1.5,0.9v0.4h-3.5V9.4c0.9,0,1.4-0.1,1.4-0.9V1.1c-0.4-0.4-0.7-0.5-1.4-0.5V0.2h3.1l5.1,6.5V1.5c0-0.8-0.5-0.9-1.5-0.9V0.2h3.5v0.4c-0.9,0-1.4,0.1-1.4,0.9V10H22z M26.7,9.8h-3.5V9.4c0.9,0,1.3-0.1,1.6-0.9L28,0.1h0.9l3.4,8.5c0.3,0.8,0.4,0.8,1.1,0.8v0.4h-4.1V9.4c1.2,0,1.4-0.1,1.1-0.8l-1-2.6h-3l-0.9,2.5c-0.3,0.8,0.2,0.9,1.2,0.9V9.8z M26.6,5.5h2.6L27.9,2L26.6,5.5z M42.6,10l-6.6-8.2v6.7c0,0.8,0.5,0.9,1.5,0.9v0.4H34V9.4c0.8,0,1.3-0.1,1.3-0.9V1.1c-0.5-0.4-0.8-0.5-1.6-0.5V0.2H37l5.1,6.5V1.5c0-0.8-0.5-0.9-1.5-0.9V0.2h3.5v0.4c-0.9,0-1.4,0.1-1.4,0.9V10H42.6z M52.4,0.1h0.2L52.7,3l-0.4,0c-0.2-1.7-1.1-2.5-2.7-2.5c-1.8,0-3.2,1.5-3.2,3.9c0,3,1.9,4.7,3.9,4.7c0.9,0,1.6-0.2,2.4-1.1L53,8.4c-0.6,0.9-1.8,1.6-3.5,1.6c-2.4,0-4.9-1.8-4.9-4.9c0-3,2.3-5.1,5-5.1c1.3,0,2,0.6,2.3,0.6C52.2,0.6,52.3,0.4,52.4,0.1z M53.8,9.8V9.4c0.9,0,1.2-0.1,1.2-0.8V1.4c0-0.8-0.3-0.8-1.2-0.8V0.2H58v0.4c-0.9,0-1.2,0.1-1.2,0.8v7.1c0,0.8,0.3,0.8,1.2,0.8v0.4H53.8z M61.9,9.8h-3.3V9.4c0.7,0,1.1-0.1,1.4-0.9l3.2-8.4h0.9l3.4,8.5c0.3,0.8,0.4,0.8,1.1,0.8v0.4h-4.1V9.4c1.2,0,1.4-0.1,1.1-0.8l-1-2.6h-3l-0.9,2.5c-0.3,0.8,0.2,0.9,1.2,0.9V9.8z M61.8,5.5h2.6L63,2L61.8,5.5z M69.3,9.8V9.4c0.9,0,1.2-0.1,1.2-0.8V1.4c0-0.8-0.3-0.8-1.2-0.8V0.2h4.1v0.4c-0.9,0-1.2,0.1-1.2,0.8v7.2c0,0.6,0.3,0.7,0.8,0.7h0.5c1.9,0,2.5-0.3,3-2.4L77,7l-0.3,2.9H69.3z M89.4,0.1l0,2.9h-0.4c-0.2-2.1-0.7-2.3-2.6-2.3H86v7.9c0,0.8,0.3,0.9,1.5,0.9v0.4h-4.8V9.4c1.2,0,1.5-0.1,1.5-0.9V0.6h-0.6c-1.9,0-2.3,0.3-2.6,2.3h-0.4l0-2.9c0.3,0,0.5,0.1,1.4,0.1h6C88.9,0.2,89.2,0.1,89.4,0.1z M90.4,9.8V9.4c0.9,0,1.2-0.1,1.2-0.8V1.4c0-0.8-0.3-0.8-1.2-0.8V0.2h4.2v0.4c-0.9,0-1.2,0.1-1.2,0.8v7.1c0,0.8,0.3,0.8,1.2,0.8v0.4H90.4z M107,0.2v0.4c-0.9,0-1.3,0-1.2,0.8l0.8,7.2c0.1,0.7,0.4,0.8,1.2,0.8v0.4h-4.1V9.4c0.9,0,1.2-0.1,1.1-0.8L104,1l-3.1,9h-0.1l-3-9l-0.7,7.5c-0.1,0.8,0.4,0.8,1.3,0.8v0.4h-3.2V9.4c0.9,0,1.2-0.1,1.2-0.8l0.7-7.2c0.1-0.8-0.3-0.8-1.2-0.8V0.2h3.4l2,6.6l2.2-6.6H107z M114.8,6.3h-0.4c-0.1-1-0.2-1.2-1.4-1.2h-1.5v3.5c0,0.6,0.3,0.7,0.8,0.7h0.8c1.9,0,2.5-0.3,3-2.4l0.4,0l-0.3,2.9h-7.6V9.4c0.9,0,1.2-0.1,1.2-0.8V1.4c0-0.8-0.3-0.8-1.2-0.8V0.2h7.3l0,2.4h-0.4c-0.2-1.7-0.7-1.9-2.6-1.9h-1.4v3.9h1.5c1.3,0,1.3-0.2,1.4-1.2h0.4V6.3z M122.5,7.8c0-0.9-0.6-1.3-1.5-1.9l-1.5-0.8c-1.2-0.6-1.8-1.3-1.8-2.5c0-1.5,1.3-2.7,3-2.7c1.2,0,1.8,0.6,2.1,0.6c0.2,0,0.3-0.1,0.4-0.4h0.3l0.1,2.7l-0.4,0c-0.2-1.3-1.1-2.3-2.5-2.3c-1,0-1.7,0.6-1.7,1.4c0,0.9,0.7,1.3,1.5,1.7l1.3,0.7c1.2,0.7,2.1,1.4,2.1,2.7c0,1.7-1.5,2.9-3.3,2.9c-1.3,0-1.9-0.6-2.3-0.6c-0.2,0-0.3,0.2-0.4,0.5h-0.3L117.4,7l0.4,0c0.3,1.8,1.5,2.5,2.8,2.5C121.6,9.5,122.5,9,122.5,7.8z"/>'};exports.frame=chartFrame,exports.printFrame=function(configObject){var f=chartFrame().containerClass("ft-printgraphic").autoPosition(!0).backgroundColor("#FFF").goalposts("#000").units("mm").width(112.25).height(68).margin({top:40,left:15,bottom:35,right:7}).rem(9.6).titleStyle({"font-size":"12px",fill:"#000000","font-weight":"600","font-family":"MetricWeb,sans-serif"}).titleX(7).titleY(15).titleLineHeight(13).subtitleStyle({fill:"#000000","font-size":"9.6px","font-weight":400,"font-family":"MetricWeb,sans-serif"}).subtitleLineHeight(10).subtitleX(7).subtitleY(27).sourceStyle({fill:"#000000","font-size":"7.2px","font-weight":400,"font-family":"MetricWeb,sans-serif"}).sourceX(7).sourcePlotYOffset(18).sourceLineHeight(8);return void 0!==configObject&&f.attrs(configObject),f},exports.socialFrame=function(configObject){var f=chartFrame().autoPosition(!0).containerClass("ft-socialgraphic").backgroundColor("#262a33").whitebar("#fff").width(612).height(612).watermark(watermarkPath.light).watermarkOffsetX(40).watermarkOffsetY(40).margin({left:40,right:40,bottom:138,top:140}).rem(24).titleX(40).titleY(80).titleLineHeight(32).titleStyle({"font-size":"30px",fill:"#ffffff","font-weight":400,"font-family":"MetricWeb,sans-serif"}).subtitleX(40).subtitleY(112).subtitleLineHeight(28).subtitleStyle({"font-size":"24px",fill:"#8e9095","font-weight":400,"font-family":"MetricWeb,sans-serif"}).sourceX(40).sourceLineHeight(20).sourcePlotYOffset(66).sourceStyle({"font-size":"20px",fill:"#8e9095","font-weight":400,"font-family":"MetricWeb,sans-serif"});return void 0!==configObject&&f.attrs(configObject),f},exports.videoFrame=function(configObject){var f=chartFrame().autoPosition(!0).backgroundColor("#262a33").containerClass("ft-videographic").width(1920).height(1080).margin({left:207,right:207,bottom:210,top:233}).rem(48).titleX(207).titleY(130).titleLineHeight(68).titleStyle({"font-size":"72px",fill:"#ffffff","font-weight":400,"font-family":"MetricWeb,sans-serif"}).subtitleX(207).subtitleY(200).subtitleLineHeight(48).subtitleStyle({"font-size":"48px",fill:"#8e9095","font-weight":400,"font-family":"MetricWeb,sans-serif"}).sourceX(207).sourcePlotYOffset(60).sourceLineHeight(38).sourceStyle({"font-size":"36px",fill:"#8e9095","font-weight":400,"font-family":"MetricWeb,sans-serif"});return void 0!==configObject&&f.attrs(configObject),f},exports.webFrameL=function(configObject){var f=chartFrame().autoPosition(!0).containerClass("ft-webgraphic-l").backgroundColor("#FFF1E0").width(1180).height(700).blackbar("#000").fullYear(!0).margin({bottom:105,right:5,left:20}).rem(18).plotAdjuster(8).titleY(32).titleStyle({"font-size":28,"font-family":"MetricWeb,sans-serif","font-weight":400,fill:"#000"}).titleLineHeight(32).subtitleLineHeight(20).subtitleY(64).subtitleStyle({"font-size":18,"font-family":"MetricWeb,sans-serif",fill:"#66605C"}).sourceLineHeight(16).sourcePlotYOffset(44).sourceStyle({"font-size":"16px","font-family":"MetricWeb,sans-serif",fill:"#66605C"}).copyrightStyle({"font-size":"16px","font-style":"italic","font-family":"MetricWeb,sans-serif",fill:"#66605C"});return void 0!==configObject&&f.attrs(configObject),f},exports.webFrameM=function(configObject){var f=chartFrame().autoPosition(!0).containerClass("ft-webgraphic-m").backgroundColor("#FFF1E0").blackbar("#000").width(700).height(500).margin({bottom:104,right:5,left:20}).rem(16).plotAdjuster(4).titleY(32).titleStyle({"font-size":24,"font-family":"MetricWeb,sans-serif","font-weight":400,fill:"#000"}).titleLineHeight(28).subtitleLineHeight(20).subtitleStyle({"font-size":18,"font-family":"MetricWeb,sans-serif",fill:"#66605C"}).subtitleY(64).sourceLineHeight(16).sourcePlotYOffset(44).sourceStyle({"font-size":"14px","font-family":"MetricWeb,sans-serif",fill:"#66605C"}).copyrightStyle({"font-size":"14px","font-style":"italic","font-family":"MetricWeb,sans-serif",fill:"#66605C"});return void 0!==configObject&&f.attrs(configObject),f},exports.webFrameMDefault=function(configObject){var f=chartFrame().autoPosition(!0).containerClass("ft-webgraphic-m-default").backgroundColor("#FFF1E0").blackbar("#000").width(700).height(500).margin({bottom:115,right:5,left:20}).rem(20).plotAdjuster(8).titleY(32).titleStyle({"font-size":28,"font-family":"MetricWeb,sans-serif","font-weight":400,fill:"#000"}).titleLineHeight(28).subtitleLineHeight(28).subtitleStyle({"font-size":24,"font-family":"MetricWeb,sans-serif",fill:"#66605C"}).subtitleY(68).sourceLineHeight(18).sourcePlotYOffset(34).sourceStyle({"font-size":"16px","font-family":"MetricWeb,sans-serif",fill:"#66605C"}).copyrightStyle({"font-size":"14px","font-style":"italic","font-family":"MetricWeb,sans-serif",fill:"#66605C"});return void 0!==configObject&&f.attrs(configObject),f},exports.webFrameS=function(configObject){var f=chartFrame().autoPosition(!0).containerClass("ft-webgraphic-s").backgroundColor("#FFF1E0").blackbar("#000").width(300).margin({bottom:90,right:5,left:15}).rem(14).plotAdjuster(0).titleStyle({"font-size":20,"font-family":"MetricWeb,sans-serif","font-weight":400,fill:"#000"}).titleY(32).titleLineHeight(24).subtitleLineHeight(20).subtitleStyle({"font-size":18,"font-family":"MetricWeb,sans-serif",fill:"#66605C"}).subtitleY(64).sourceLineHeight(12).sourcePlotYOffset(38).sourceStyle({"font-size":"12px","font-family":"MetricWeb,sans-serif",fill:"#66605C"}).copyrightStyle({"font-size":"12px","font-style":"italic","font-family":"MetricWeb,sans-serif",fill:"#66605C"});return void 0!==configObject&&f.attrs(configObject),f},Object.defineProperty(exports,"__esModule",{value:!0})});