UNPKG

splunk-sdk

Version:

SDK for usage with the Splunk REST API

1 lines 250 kB
var __exportName="splunkjs";!function r(n,s,a){function o(e,t){if(!s[e]){if(!n[e]){var i="function"==typeof require&&require;if(!t&&i)return i(e,!0);if(h)return h(e,!0);throw(t=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",t}i=s[e]={exports:{}},n[e][0].call(i.exports,function(t){return o(n[e][1][t]||t)},i,i.exports,r,n,s,a)}return s[e].exports}for(var h="function"==typeof require&&require,t=0;t<a.length;t++)o(a[t]);return o}({1:[function(t,e,i){var r;r=__exportName,window[r]||(window[r]={}),window[r].UI||(window[r].UI={}),window[r].UI.Charting=t("../ui/charting.js")},{"../ui/charting.js":3}],2:[function(t,e,i){!function(){var t=i||this,s=!1,a=/xyz/.test(function(){return xyz})?/\b_super\b/:/.*/;t.Class=function(){},t.Class.extend=function(t){var e,n=this.prototype,i=(s=!0,new this);for(e in s=!1,t)i[e]="function"==typeof t[e]&&"function"==typeof n[e]&&a.test(t[e])?function(i,r){return function(){var t=this._super,e=(this._super=n[i],r.apply(this,arguments));return this._super=t,e}}(e,t[e]):t[e];function r(){!s&&this.init&&this.init.apply(this,arguments)}return r.prototype=i,(r.constructor=r).extend=arguments.callee,r}}()},{}],3:[function(r,t,s){!function(){r("../utils");var t=r("../jquery.class").Class,e=r("./charting/js_charting").Splunk,i=s||this,n=e.JSCharting;i.ChartType={LINE:"line",AREA:"area",COLUMN:"column",BAR:"bar",PIE:"pie",SCATTER:"scatter",HYBRID:"hybrid",RADIALGAUGE:"radialGauge",FILLERGAUGE:"fillerGauge",MARKERGAUGE:"markerGauge"},i.Chart=t.extend({init:function(t,e,i,r){this.el=$(t),this.chartType=e,this.chart=n.createChart(this.el.eq(0)[0],{chart:e,"chart.orientation":i,"layout.splitSeries":r})},destroy:function(){this.chart.destroy(),this.chart=null},setData:function(t,e){var i=n.extractFieldInfo(t),t=n.extractChartReadyData(t,i);e.chart||(e.chart=this.chartType),this.chart.prepare(t,i,e)},draw:function(){this.chart.draw(function(){})}})}()},{"../jquery.class":2,"../utils":11,"./charting/js_charting":7}],4:[function(i,r,n){var ne,s,se,ae,o,Pt,oe,he,le,ce,de,ue,fe,ge,pe,me,ye,be,a,h,l,dt=document,ut=window,Et=Math,It=Et.round,Dt=Et.floor,ke=Et.ceil,Nt=Et.max,Ft=Et.min,zt=Et.abs,b=Et.cos,k=Et.sin,I=Et.PI,y=2*I/360,c=navigator.userAgent,ve=/msie/i.test(c)&&!ut.opera,m=8===dt.documentMode,xe=/AppleWebKit/.test(c),Ce=/Firefox/.test(c),v="http://www.w3.org/2000/svg",Se=!!dt.createElementNS&&!!dt.createElementNS(v,"svg").createSVGRect,d=Ce&&parseInt(c.split("Firefox/")[1],10)<4,we=void 0!==dt.documentElement.ontouchstart,u={},Te=0,Me="div",Le="absolute",Ae="relative",Rt="hidden",Oe="highcharts-",Bt="visible",$t="px",ft="none",Vt="M",Yt="L",f="rgba(192,192,192,"+(Se?1e-6:.002)+")",He="hover",x="select",t=ut.HighchartsAdapter,Ut=(e=t||{}).each,_e=e.grep,We=e.map,Jt=e.merge,jt=e.addEvent,Gt=e.removeEvent,Xt=e.fireEvent,Pe=e.animate,Ee=e.stop,gt={};function qt(t,e){for(var i in t=t||{},e)t[i]=e[i];return t}function Kt(t,e){return parseInt(t,e||10)}function Ie(t){return"string"==typeof t}function De(t){return"object"==typeof t}function C(t){return"number"==typeof t}function Ne(t){return Et.log(t)/Et.LN10}function Fe(t){return Et.pow(10,t)}function ze(t,e){for(var i=t.length;i--;)if(t[i]===e){t.splice(i,1);break}}function Zt(t){return t!==Pt&&null!==t}function Qt(t,e,i){var r,n,s="setAttribute";if(Ie(e))Zt(i)?t[s](e,i):t&&t.getAttribute&&(n=t.getAttribute(e));else if(Zt(e)&&De(e))for(r in e)t[s](r,e[r]);return n}function Re(t){return"[object Array]"===Object.prototype.toString.call(t)?t:[t]}function te(){for(var t,e=arguments,i=e.length,r=0;r<i;r++)if(null!=(t=e[r]))return t}function ee(t,e){ve&&e&&e.opacity!==Pt&&(e.filter="alpha(opacity="+100*e.opacity+")"),qt(t.style,e)}function ie(t,e,i,r,n){t=dt.createElement(t);return e&&qt(t,e),n&&ee(t,{padding:0,border:ft,margin:0}),i&&ee(t,i),r&&r.appendChild(t),t}function g(t,e){function i(){}return qt(i.prototype=new t,e),i}function Be(t,e,i,r){var n=re.lang,e=isNaN(e=zt(e))?2:e,i=void 0===i?n.decimalPoint:i,n=void 0===r?n.thousandsSep:r,r=t<0?"-":"",s=String(Kt(t=zt(+t||0).toFixed(e))),a=3<s.length?s.length%3:0;return r+(a?s.substr(0,a)+n:"")+s.substr(a).replace(/(\d{3})(?=\d)/g,"$1"+n)+(e?i+zt(t-s).toFixed(e).slice(2):"")}function $e(t){var e={left:t.offsetLeft,top:t.offsetTop};for(t=t.offsetParent;t;)e.left+=t.offsetLeft,e.top+=t.offsetTop,t!==dt.body&&t!==dt.documentElement&&(e.left-=t.scrollLeft,e.top-=t.scrollTop),t=t.offsetParent;return e}function Ve(){this.color=0,this.symbol=0}function Ye(t,r){for(var e=t.length,i=0;i<e;i++)t[i].ss_i=i;for(t.sort(function(t,e){var i=r(t,e);return 0===i?t.ss_i-e.ss_i:i}),i=0;i<e;i++)delete t[i].ss_i}function Ue(t){for(var e in t)t[e]&&t[e].destroy&&t[e].destroy(),delete t[e]}function Je(t,e){ae=te(t,e.animation)}function S(){var t=re.global.useUTC;oe=t?Date.UTC:function(t,e,i,r,n,s){return new Date(t,e,te(i,1),te(r,0),te(n,0),te(s,0)).getTime()},he=t?"getUTCMinutes":"getMinutes",le=t?"getUTCHours":"getHours",ce=t?"getUTCDay":"getDay",de=t?"getUTCDate":"getDate",ue=t?"getUTCMonth":"getMonth",fe=t?"getUTCFullYear":"getFullYear",ge=t?"setUTCMinutes":"setMinutes",pe=t?"setUTCHours":"setHours",me=t?"setUTCDate":"setDate",ye=t?"setUTCMonth":"setMonth",be=t?"setUTCFullYear":"setFullYear"}function je(t){s=s||ie(Me),t&&s.appendChild(t),s.innerHTML=""}function w(e){var t,i,r=[];return(t=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(i=e))?r=[Kt(t[1]),Kt(t[2]),Kt(t[3]),parseFloat(t[4],10)]:(t=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(i))&&(r=[Kt(t[1],16),Kt(t[2],16),Kt(t[3],16),1]),{get:function(t){return t=r&&!isNaN(r[0])?"rgb"===t?"rgb("+r[0]+","+r[1]+","+r[2]+")":"a"===t?r[3]:"rgba("+r.join(",")+")":e},brighten:function(t){if(C(t)&&0!==t)for(var e=0;e<3;e++)r[e]+=Kt(255*t),r[e]<0&&(r[e]=0),255<r[e]&&(r[e]=255);return this},setOpacity:function(t){return r[3]=t,this}}}se=function(t,e,i){function r(t){return t.toString().replace(/^([0-9])$/,"0$1")}if(!Zt(e)||isNaN(e))return"Invalid date";t=te(t,"%Y-%m-%d %H:%M:%S");var n,e=new Date(+e),s=e[le](),a=e[ce](),o=e[de](),h=e[ue](),l=e[fe](),c=re.lang,d=c.weekdays,u={a:d[a].substr(0,3),A:d[a],d:r(o),e:o,b:c.shortMonths[h],B:c.months[h],m:r(h+1),y:l.toString().substr(2,2),Y:l,H:r(s),I:r(s%12||12),l:s%12||12,M:r(e[he]()),p:s<12?"AM":"PM",P:s<12?"am":"pm",S:r(e.getSeconds())};for(n in u)t=t.replace("%"+n,u[n]);return i?t.substr(0,1).toUpperCase()+t.substr(1):t},Ve.prototype={wrapColor:function(t){this.color>=t&&(this.color=0)},wrapSymbol:function(t){this.symbol>=t&&(this.symbol=0)}},o={init:function(t,e,i){function r(t){for(a=t.length;a--;)t[a]===Vt&&t.splice(a+1,0,t[a+1],t[a+2],t[a+1],t[a+2])}var n,s,a,o,h,l=t.shift,c=-1<(e=e||"").indexOf("C"),d=c?7:3,u=e.split(" "),e=[].concat(i);if(c&&(r(u),r(e)),t.isArea&&(o=u.splice(u.length-6,6),h=e.splice(e.length-6,6)),l&&(e=[].concat(e).splice(0,d).concat(e),t.shift=!1),u.length)for(n=e.length;u.length<n;)s=[].concat(u).splice(u.length-d,d),c&&(s[d-6]=s[d-2],s[d-5]=s[d-1]),u=u.concat(s);return o&&(u=u.concat(o),e=e.concat(h)),[u,e]},step:function(t,e,i,r){var n,s=[],a=t.length;if(1===i)s=r;else if(a===e.length&&i<1)for(;a--;)n=parseFloat(t[a]),s[a]=isNaN(n)?t[a]:i*parseFloat(e[a]-n)+n;else s=e;return s}},t&&t.init&&t.init(o),!t&&ut.jQuery&&(a=jQuery,Ut=function(t,e){for(var i=0,r=t.length;i<r;i++)if(!1===e.call(t[i],t[i],i,t))return i},_e=a.grep,We=function(t,e){for(var i=[],r=0,n=t.length;r<n;r++)i[r]=e.call(t[r],t[r],r,t);return i},Jt=function(){var t=arguments;return a.extend(!0,null,t[0],t[1],t[2],t[3])},jt=function(t,e,i){a(t).bind(e,i)},Gt=function(t,e,i){var r=dt.removeEventListener?"removeEventListener":"detachEvent";dt[r]&&!t[r]&&(t[r]=function(){}),a(t).unbind(e,i)},Xt=function(t,e,i,r){var n=a.Event(e),s="detached"+e;qt(n,i),t[e]&&(t[s]=t[e],t[e]=null),a(t).trigger(n),t[s]&&(t[e]=t[s],t[s]=null),r&&!n.isDefaultPrevented()&&r(n)},Pe=function(t,e,i){var r=a(t);e.d&&(t.toD=e.d,e.d=1),r.stop(),r.animate(e,i)},Ee=function(t){a(t).stop()},a.extend(a.easing,{easeOutQuad:function(t,e,i,r,n){return-r*(e/=n)*(e-2)+i}}),h=jQuery.fx.step._default,l=jQuery.fx.prototype.cur,a.fx.step._default=function(t){var e=t.elem;e.attr?e.attr(t.prop,t.now):h.apply(this,arguments)},a.fx.step.d=function(t){var e,i=t.elem;t.started||(e=o.init(i,i.d,i.toD),t.start=e[0],t.end=e[1],t.started=!0),i.attr("d",o.step(t.start,t.end,t.pos,i.toD))},a.fx.prototype.cur=function(){var t=this.elem,t=t.attr?t.attr(this.prop):l.apply(this,arguments);return t});var re={colors:["#4572A7","#AA4643","#89A54E","#80699B","#3D96AE","#DB843D","#92A8CD","#A47D7C","#B5CA92"],symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","June","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],decimalPoint:".",resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:!0},chart:{borderColor:"#4572A7",borderRadius:5,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacingTop:10,spacingRight:10,spacingBottom:15,spacingLeft:10,style:{fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',fontSize:"12px"},backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0"},title:{text:"Chart title",align:"center",y:15,style:{color:"#3E576F",fontSize:"16px"}},subtitle:{text:"",align:"center",y:30,style:{color:"#6D869F"}},plotOptions:{line:{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1e3},events:{},lineWidth:2,shadow:!0,marker:{enabled:!0,lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:Jt(e={enabled:!0,align:"center",x:0,y:15,style:{color:"#666",fontSize:"11px",lineHeight:"14px"}},{enabled:!1,y:-6,formatter:function(){return this.y}}),showInLegend:!0,states:{hover:{marker:{}},select:{marker:{}}},stickyTracking:!0}},labels:{style:{position:Le,color:"#3E576F"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderWidth:1,borderColor:"#909090",borderRadius:5,shadow:!1,style:{padding:"5px"},itemStyle:{cursor:"pointer",color:"#3E576F"},itemHoverStyle:{cursor:"pointer",color:"#000000"},itemHiddenStyle:{color:"#C0C0C0"},itemCheckboxStyle:{position:Le,width:"13px",height:"13px"},symbolWidth:16,symbolPadding:5,verticalAlign:"bottom",x:0,y:0},loading:{hideDuration:100,labelStyle:{fontWeight:"bold",position:Ae,top:"1em"},showDuration:100,style:{position:Le,backgroundColor:"white",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,backgroundColor:"rgba(255, 255, 255, .85)",borderWidth:2,borderRadius:5,shadow:!0,snap:we?25:10,style:{color:"#333333",fontSize:"12px",padding:"5px",whiteSpace:"nowrap"}},toolbar:{itemStyle:{color:"#4572A7",cursor:"pointer"}},credits:{enabled:!0,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"10px"}}},Ge={dateTimeLabelFormats:{second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#C0C0C0",labels:e,lineColor:"#C0D0E0",lineWidth:1,max:null,min:null,minPadding:.01,maxPadding:.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:5,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#6D869F",fontWeight:"bold"}},type:"linear"},Xe=Jt(Ge,{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{align:"right",x:-8,y:3},lineWidth:0,maxPadding:.05,minPadding:.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Y-values"},stackLabels:{enabled:!1,formatter:function(){return this.total},style:e.style}}),qe={labels:{align:"right",x:-8,y:null},title:{rotation:270}},Ke={labels:{align:"left",x:8,y:null},title:{rotation:90}},Ze={labels:{align:"center",x:0,y:14},title:{rotation:0}},Qe=Jt(Ze,{labels:{y:-5}}),p=re.plotOptions,t=p.line;function T(){}function ti(){this.init.apply(this,arguments)}function M(o,d){Ge=Jt(Ge,re.xAxis),Xe=Jt(Xe,re.yAxis),re.xAxis=re.yAxis=null;var H,h,l,pt,mt,yt,bt,kt,n,i,_,u,f,r,vt,xt,_t,Wt,a,g,p,m,e,E,v,T,s,y,b,Ct,St,wt,x,M,c,W,P,C,Tt,Mt,Lt,I,L,A,k,O,D,N,F,z,R,At=(o=Jt(re,o)).chart,t=At.margin,t=De(t)?t:[t,t,t,t],B=te(At.marginTop,t[0]),$=te(At.marginRight,t[1]),V=te(At.marginBottom,t[2]),Y=te(At.marginLeft,t[3]),U=At.spacingTop,J=At.spacingRight,j=At.spacingBottom,G=At.spacingLeft,Ot=this,X=At.events,q=X&&!!X.click,S=At.showAxes,K=0,w=[],Ht=[];function Z(i){var u,S,k,l,v,x,C,J,f,w,T,g,M,L,j,s,G,X,q,t,A,K,n,O,r,o,Z,Q,H=i.isX,_=i.opposite,W=Mt?!H:H,p=W?_?0:2:_?1:3,m={},P=Jt(H?Ge:Xe,[Qe,Ke,Ze,qe][p],i),E=this,e=P.type,tt="datetime"===e,I="logarithmic"===e,D=P.offset||0,et=H?"x":"y",it=W?bt:yt,N=null,F=null,rt=P.minPadding,nt=P.maxPadding,z=Zt(P.linkedTo),a=P.events,y=[],b={},R={},B={},$=P.categories,h=P.labels.formatter||function(){var t=this.value,t=Q?se(Q,t):A%1e6==0?t/1e6+"M":A%1e3==0?t/1e3+"k":!$&&1e3<=t?Be(t,0):t;return t},st=W&&P.labels.staggerLines,V=P.reversed,Y=$&&"between"===P.tickmarkPlacement?.5:0,U=P.hooks||{};function at(t,e){this.pos=t,this.minor=e,this.isNew=!0,e||this.addLabel()}function ot(t){return t&&(this.options=t,this.id=t.id),this}function ht(t,e,i,r){var n=this;n.isNegative=e,n.options=t,n.x=i,n.stack=r,n.alignOptions={align:t.align||(Mt?e?"left":"right":"center"),verticalAlign:t.verticalAlign||(Mt?"middle":e?"bottom":"top"),y:te(t.y,Mt?4:e?14:-6),x:te(t.x,Mt?e?-6:6:0)},n.textAlign=t.textAlign||(Mt?e?"right":"left":"center")}function lt(t,e){var i,r=t/(n=e?1:Et.pow(10,Dt(Et.log(t)/Et.LN10)));for(e||!(e=[1,2,2.5,5,10])!==P.allowDecimals&&!I||(1===n?e=[1,2,5,10]:n<=.1&&(e=[1/n])),i=0;i<e.length&&(t=e[i],!(r<=(e[i]+(e[i+1]||e[i]))/2));i++);return t*=n}function ct(t){var e,i=t;return(n=te(n,Et.pow(10,Dt(Et.log(A)/Et.LN10))))<1&&(e=10*It(1/n),i=It(t*e)/e),i}function c(){var t,e=P.tickInterval,i=P.tickPixelInterval,r=P.maxZoom||(!H||Zt(P.min)||Zt(P.max)?null:Ft(5*Ot.smallestInterval,T-w));if(S=W?St:Ct,N=z?(x=(t=Ot[H?"xAxis":"yAxis"][P.linkedTo]).getExtremes(),F=te(x.min,x.dataMin),te(x.max,x.dataMax)):(F=te(M,P.min,w),te(L,P.max,T)),I&&(F=Ne(F),N=Ne(N)),N-F<r&&(F=Nt(F-(x=(r-N+F)/2),te(P.min,F-x),w),N=Ft(F+r,te(P.max,F+r),T)),$||q||z||!Zt(F)||!Zt(N)||(x=N-F||1,Zt(P.min)||Zt(M)||!rt||!(w<0)&&G||(F-=x*rt),Zt(P.max)||Zt(L)||!nt||!(0<T)&&X||(N+=x*nt)),A=F===N?1:z&&!e&&i===t.options.tickPixelInterval?t.tickInterval:te(e,$?1:(N-F)*i/S),tt||Zt(P.tickInterval)||(A=lt(A)),E.tickInterval=A,K="auto"===P.minorTickInterval&&A?A/5:P.minorTickInterval,tt){O=[];for(var n=re.global.useUTC,s=864e5,a=6048e5,o=2592e6,h=31556952e3,l=[["second",1e3,[1,2,5,10,15,30]],["minute",6e4,[1,2,5,10,15,30]],["hour",36e5,[1,2,3,4,6,8,12]],["day",s,[1,2]],["week",a,[1,2]],["month",o,[1,2,3,4,6]],["year",h,null]],c=l[6],d=c[1],u=c[2],f=0;f<l.length;f++)if(d=(c=l[f])[1],u=c[2],l[f+1]){var g=(d*u[u.length-1]+l[f+1][1])/2;if(A<=g)break}for(var p,m=lt(A/d,u=d===h&&A<5*d?[1,2,5]:u),r=new Date(+F),y=(r.setMilliseconds(0),1e3<=d&&r.setSeconds(6e4<=d?0:m*Dt(r.getSeconds()/m)),6e4<=d&&r[ge](36e5<=d?0:m*Dt(r[he]()/m)),36e5<=d&&r[pe](s<=d?0:m*Dt(r[le]()/m)),s<=d&&r[me](o<=d?1:m*Dt(r[de]()/m)),o<=d&&(r[ye](h<=d?0:m*Dt(r[ue]()/m)),p=r[fe]()),h<=d&&r[be](p-=p%m),d===a&&r[me](r[de]()-r[ce]()+P.startOfWeek),f=1,p=r[fe](),+r.getTime()),b=r[ue](),k=r[de]();y<N&&f<St;)O.push(y),d===h?y=+oe(p+f*m,0):d===o?y=+oe(p,b+f*m):n||d!==s&&d!==a?y+=d*m:y=oe(p,b,k+f*m*(d===s?1:7)),f++;O.push(y),Q=P.dateTimeLabelFormats[c[0]]}else{var v,x=ct(Dt(F/A)*A),C=ct(ke(N/A)*A);for(O=[],v=ct(x);v<=C;)O.push(v),v=ct(v+A)}z||(($||H&&Ot.hasColumn)&&(t=.5*($?1:A),!$&&Zt(te(P.min,M))||(F-=t),!$&&Zt(te(P.max,L))||(N+=t)),e=O[0],i=O[O.length-1],P.startOnTick?F=e:e<F&&O.shift(),P.endOnTick?N=i:N<i&&O.pop(),Tt=Tt||{x:0,y:0},!tt&&O.length>Tt[et]&&(Tt[et]=O.length)),U.tickPositionsSet&&U.tickPositionsSet(P,$,O,Ot)}function d(){var t,e,i,r,n;if(j=F,s=N,r=[],n=[],w=T=null,g=[],Ut(Ht,function(e){var a,o,h,l,c,d;i=!1,Ut(["xAxis","yAxis"],function(t){e.isCartesian&&("xAxis"===t&&H||"yAxis"===t&&!H)&&(e.options[t]===P.index||e.options[t]===Pt&&0===P.index)&&(e[t]=E,g.push(e),i=!0)}),(i=!e.visible&&At.ignoreHiddenSeries?!1:i)&&(H||(a=e.options.stacking,q="percent"===a,a&&(c=e.options.stack,l=e.type+te(c,""),d="-"+l,e.stackKey=l,o=r[l]||[],r[l]=o,h=n[d]||[],n[d]=h),q&&(w=0,T=99)),e.isCartesian&&(Ut(e.data,function(t){var e=t.x,i=t.y,r=i<0,n=r?h:o,s=r?d:l;null===w&&(w=T=t[et]),H?T<e?T=e:e<w&&(w=e):Zt(i)&&(a&&(n[e]=Zt(n[e])?n[e]+i:i),n=n?n[e]:i,i=te(t.low,n),q||(T<n?T=n:i<w&&(w=i)),a&&(m[s]||(m[s]={}),m[s][e]||(m[s][e]=new ht(P.stackLabels,r,e,c)),m[s][e].setTotal(n)))}),/(area|column|bar)/.test(e.type)&&!H&&(0<=w?G=!(w=0):T<0&&(X=!(T=0)))))}),U.tickRenderStart&&U.tickRenderStart(P,dt(),Ot),c(),l=k,k=S/(N-F||1),!H)for(t in m)for(e in m[t])m[t][e].cum=m[t][e].total;E.isDirty||(E.isDirty=F!==j||N!==s)}function dt(){return{min:F,max:N,dataMin:w,dataMax:T,userMin:M,userMax:L}}function ut(t){t=new ot(t).render();return y.push(t),t}function ft(){var t=P.title,e=P.stackLabels,i=P.alternateGridColor,r=P.lineWidth,n=Ot.hasRendered,s=n&&Zt(j)&&!isNaN(j),a=g.length&&Zt(F)&&Zt(N);if(k=(S=W?St:Ct)/(N-F||1),it=W?bt:yt,a||z){if(K&&!$)for(var o=F+(O[0]-F)%K;o<=N;o+=K)R[o]||(R[o]=new at(o,!0)),s&&R[o].isNew&&R[o].render(null,!0),R[o].isActive=!0,R[o].render();Ut(O,function(t,e){(!z||F<=t&&t<=N)&&(s&&b[t].isNew&&b[t].render(e,!0),b[t].isActive=!0,b[t].render(e))}),i&&Ut(O,function(t,e){e%2==0&&t<N&&(B[t]||(B[t]=new ot),B[t].options={from:t,to:O[e+1]!==Pt?O[e+1]:N,color:i},B[t].render(),B[t].isActive=!0)}),n||Ut((P.plotLines||[]).concat(P.plotBands||[]),function(t){y.push(new ot(t).render())})}if(Ut([b,R,B],function(t){for(var e in t)t[e].isActive?t[e].isActive=!1:(t[e].destroy(),delete t[e])}),r&&(a=bt+(_?St:0)+D,n=xt-yt-(_?Ct:0)+D,a=Lt.crispLine([Vt,W?bt:a,W?n:pt,Yt,W?vt-mt:a,W?n:xt-yt],r),f?f.animate({d:a}):f=Lt.path(a).attr({stroke:P.lineColor,"stroke-width":r,zIndex:7}).add()),u&&(n=W?bt:pt,a=Kt(t.style.fontSize||12),r={low:n+(W?0:S),middle:n+S/2,high:n+(W?S:0)}[t.align],n=(W?pt+Ct:bt)+(W?1:-1)*(_?-1:1)*Z+(2===p?a:0),u[u.isNew?"attr":"animate"]({x:W?r:n+(_?St:0)+D+(t.x||0),y:W?n-(_?Ct:0)+D:r+(t.y||0)}),u.isNew=!1),e&&e.enabled){var h,l,c,d=E.stackTotalGroup;for(h in d||(E.stackTotalGroup=d=Lt.g("stack-labels").attr({visibility:Bt,zIndex:6}).translate(bt,pt).add()),m)for(c in l=m[h])l[c].render(d)}E.isDirty=!1}function gt(t){for(var e=y.length;e--;)y[e].id===t&&y[e].destroy()}for(t in at.prototype={addLabel:function(){var t=this.pos,e=P.labels,i=!(t===F&&!te(P.showFirstLabel,1)||t===N&&!te(P.showLastLabel,0)),r=$&&W&&$.length&&!e.step&&!e.staggerLines&&!e.rotation&&St/$.length||!W&&St/2,n=$&&Zt($[t])?$[t]:t,s=this.label,t=h.call({isFirst:t===O[0],isLast:t===O[O.length-1],dateTimeLabelFormat:Q,value:I?Fe(n):n}),n=r&&{width:Nt(1,It(r-2*(e.padding||10)))+$t};n=qt(n,e.style),s===Pt?this.label=Zt(t)&&i&&e.enabled?Lt.text(t,0,0,e.useHTML).attr({align:e.align,rotation:e.rotation}).css(n).add(C):null:s&&s.attr({text:t}).css(n)},getLabelSize:function(){var t=this.label;return t?(this.labelBBox=t.getBBox())[W?"height":"width"]:0},render:function(t,e){var i=this,r=!i.minor,n=i.label,s=i.pos,a=P.labels,o=i.gridLine,h=r?P.gridLineWidth:P.minorGridLineWidth,l=r?P.gridLineColor:P.minorGridLineColor,c=r?P.gridLineDashStyle:P.minorGridLineDashStyle,d=i.mark,u=r?P.tickLength:P.minorTickLength,f=r?P.tickWidth:P.minorTickWidth||0,g=r?P.tickColor:P.minorTickColor,p=r?P.tickPosition:P.minorTickPosition,m=a.step,y=e&&Wt||xt,b=W?v(s+Y,null,null,e)+it:bt+D+(_?(e&&_t||vt)-mt-bt:0),y=W?y-yt+D-(_?Ct:0):y-v(s+Y,null,null,e)-it;h&&(s=x(s+Y,h,e),o===Pt&&(l={stroke:l,"stroke-width":h},c&&(l.dashstyle=c),r&&(l.zIndex=1),i.gridLine=o=h?Lt.path(s).attr(l).add(J):null),!e&&o&&s&&o.animate({d:s})),f&&("inside"===p&&(u=-u),_&&(u=-u),c=Lt.crispLine([Vt,b,y,Yt,b+(W?0:-u),y+(W?u:0)],f),d?d.animate({d:c}):i.mark=Lt.path(c).attr({stroke:g,"stroke-width":f}).add(C)),n&&!isNaN(b)&&(b=b+a.x-(Y&&W?Y*k*(V?-1:1):0),y=y+a.y-(Y&&!W?Y*k*(V?1:-1):0),Zt(a.y)||(y+=.9*Kt(n.styles.lineHeight)-n.getBBox().height/2),st&&(y+=t/(m||1)%st*16),m&&n[t%m?"hide":"show"](),n[i.isNew?"attr":"animate"]({x:b,y:y})),i.isNew=!1},destroy:function(){Ue(this)}},ot.prototype={render:function(){var t,e,i,r,n=this,s=n.options,a=s.label,o=n.label,h=s.width,l=s.to,c=s.from,d=s.value,u=s.dashStyle,f=n.svgElem,g=[],p=s.color,m=s.zIndex,y=s.events;if(I&&(c=Ne(c),l=Ne(l),d=Ne(d)),h)g=x(d,h),r={stroke:p,"stroke-width":h},u&&(r.dashstyle=u);else{if(!Zt(c)||!Zt(l))return;c=Nt(c,F),l=Ft(l,N),t=x(l),(g=x(c))&&t?g.push(t[4],t[5],t[1],t[2]):g=null,r={fill:p}}if(Zt(m)&&(r.zIndex=m),f)g?f.animate({d:g},null,f.onGetPath):(f.hide(),f.onGetPath=function(){f.show()});else if(g&&g.length&&(n.svgElem=f=Lt.path(g).attr(r).add(),y))for(i in e=function(e){f.on(e,function(t){y[e].apply(n,[t])})},y)e(i);return a&&Zt(a.text)&&g&&g.length&&0<St&&0<Ct?(a=Jt({align:W&&t&&"center",x:W?!t&&4:10,verticalAlign:!W&&t&&"middle",y:W?t?16:10:t?6:-4,rotation:W&&!t&&90},a),o||(n.label=o=Lt.text(a.text,0,0).attr({align:a.textAlign||a.align,rotation:a.rotation,zIndex:m}).css(a.style).add()),s=[g[1],g[4],te(g[6],g[1])],d=[g[2],g[5],te(g[7],g[2])],h=Ft.apply(Et,s),u=Ft.apply(Et,d),o.align(a,!1,{x:h,y:u,width:Nt.apply(Et,s)-h,height:Nt.apply(Et,d)-u}),o.show()):o&&o.hide(),n},destroy:function(){Ue(this),ze(y,this)}},ht.prototype={destroy:function(){Ue(this)},setTotal:function(t){this.total=t,this.cum=t},render:function(t){var e=this,i=e.options.formatter.call(e);e.label?e.label.attr({text:i,visibility:Rt}):e.label=Ot.renderer.text(i,0,0).css(e.options.style).attr({align:e.textAlign,rotation:e.options.rotation,visibility:Rt}).add(t)},setOffset:function(t,e){var i=this,r=i.isNegative,n=E.translate(i.total),s=E.translate(0),s=zt(n-s),t=Ot.xAxis[0].translate(i.x)+t,a=Ot.plotHeight,t={x:Mt?r?n:n-s:t,y:Mt?a-t-e:r?a-n-s:a-n,width:Mt?s:e,height:Mt?e:s};i.label&&i.label.align(i.alignOptions,null,t).attr({visibility:Bt})}},qt(E,{addPlotBand:ut,addPlotLine:ut,adjustTickAmount:function(){if(Tt&&!tt&&!$&&!z){var t=r,e=O.length;if(e<(r=Tt[et])){for(;O.length<r;)O.push(ct(O[O.length-1]+A));k*=(e-1)/(r-1),N=O[O.length-1]}Zt(t)&&r!==t&&(E.isDirty=!0)}},categories:$,getExtremes:dt,getPlotLinePath:x=function(t,e,i){var r,n,s,t=v(t,null,null,i),a=i&&Wt||xt,i=i&&_t||vt,o=r=It(t+it),h=n=It(a-t-it);return isNaN(t)?s=!0:W?(h=pt,n=a-yt,(o<bt||bt+St<o)&&(s=!0)):(o=bt,r=i-mt,(h<pt||pt+Ct<h)&&(s=!0)),s?null:Lt.crispLine([Vt,o,h,Yt,r,n],e||0)},getThreshold:function(t){return t<F?t=F:N<t&&(t=N),v(t,0,1)},isXAxis:H,options:P,plotLinesAndBands:y,getOffset:function(){var t,e=g.length&&Zt(F)&&Zt(N),i=0,r=0,n=P.title,s=P.labels,a=[-1,1,1,-1][p];if(C||(C=Lt.g("axis").attr({zIndex:7}).add(),J=Lt.g("grid").attr({zIndex:1}).add()),o=0,e||z)U.tickLabelsRenderStart&&U.tickLabelsRenderStart(P,$,Ot),Ut(O,function(t){b[t]?b[t].addLabel():b[t]=new at(t),0!==p&&2!==p&&{1:"left",3:"right"}[p]!==s.align||(o=Nt(b[t].getLabelSize(),o))}),st&&(o+=16*(st-1));else for(t in b)b[t].destroy(),delete b[t];n&&n.text&&(u||((u=E.axisTitle=Lt.text(n.text,0,0,n.useHTML).attr({zIndex:7,rotation:n.rotation||0,align:n.textAlign||{low:"left",middle:"center",high:"right"}[n.align]}).css(n.style).add()).isNew=!0),i=u.getBBox()[W?"height":"width"],r=te(n.margin,W?5:10)),D=a*(P.offset||kt[p]),Z=o+(2!==p&&o&&a*P.labels[W?"y":"x"])+r,kt[p]=Nt(kt[p],Z+i+a*D)},render:ft,setCategories:function(t,e){E.categories=i.categories=$=t,Ut(g,function(t){t.translate(),t.setTooltipPoints(!0)}),te(e,E.isDirty=!0)&&Ot.redraw()},setExtremes:function(t,e,i,r){i=te(i,!0),Xt(E,"setExtremes",{min:t,max:e},function(){M=t,L=e,i&&Ot.redraw(r)})},setScale:d,setTickPositions:c,translate:v=function(t,e,i,r,n){var s,a=1,o=0,h=r?j:F,r=(r=r?l:k)||k;return i&&(a*=-1,o=S),V&&(o-=(a*=-1)*S),e?(s=(t=V?S-t:t)/r+h,I&&n&&(s=Fe(s))):s=a*((t=I&&n?Ne(t):t)-h)*r+o,s},redraw:function(){wt.resetTracker&&wt.resetTracker(),ft(),Ut(y,function(t){t.render()}),Ut(g,function(t){t.isDirty=!0})},removePlotBand:gt,removePlotLine:gt,reversed:V=Mt&&H&&V===Pt?!0:V,stacks:m,destroy:function(){for(var t in Gt(E),m)Ue(m[t]),m[t]=null;E.stackTotalGroup&&(E.stackTotalGroup=E.stackTotalGroup.destroy()),Ut([b,R,B,y],function(t){Ue(t)}),Ut([f,C,J,u],function(t){t&&t.destroy()}),f=C=J=u=null},ticks:b}),a)jt(E,t,a[t]);d()}function Q(){var n={};return{add:function(t,e,i,r){n[t]||(e=Lt.text(e,0,0).css(o.toolbar.itemStyle).align({align:"right",x:-mt-20,y:pt+30}).on("click",r).attr({align:"right",zIndex:20}).add(),n[t]=e)},remove:function(t){je(n[t].element),n[t]=null}}}function tt(y){var b,k,v,t=y.borderWidth,x=y.crosshairs,C=[],e=y.style,S=y.shared,w=Kt(e.padding),T=t+w,M=!0,L=0,A=0,O=(e.padding=0,Lt.g("tooltip").attr({zIndex:8}).add()),H=Lt.rect(T,T,0,0,y.borderRadius,t).attr({fill:y.backgroundColor,"stroke-width":t}).add(O).shadow(y.shadow),_=Lt.text("",w+T,Kt(e.fontSize)+w+T,y.useHTML).attr({zIndex:1}).css(e).add(O);function W(){var t=this.points||Re(this),e=t[0].series.xAxis,i=this.x,e=e&&"datetime"===e.options.type,r=Ie(i)||e,n=r?['<span style="font-size: 10px">'+(e?se("%A, %b %e, %Y",i):i)+"</span>"]:[];return Ut(t,function(t){n.push(t.point.tooltipFormatter(r))}),n.join("<br/>")}function P(){var t;M||(t=Ot.hoverPoints,O.hide(),Ut(C,function(t){t&&t.hide()}),t&&Ut(t,function(t){t.setState()}),Ot.hoverPoints=null,M=!0)}return O.hide(),{shared:S,refresh:function(t){var e,i,r,n,s,a,o,h=0,l={},c=[],d=t.tooltipPos,u=y.formatter||W,f=Ot.hoverPoints;if(S?(f&&Ut(f,function(t){t.setState()}),Ot.hoverPoints=t,Ut(t,function(t){t.setState(He),h+=t.plotY,c.push(t.getLabelConfig())}),e=t[0].plotX,h=It(h)/t.length,(l={x:t[0].category}).points=c,t=t[0]):l=t.getLabelConfig(),f=u.call(l),b=t.series,e=S?e:t.plotX,h=S?h:t.plotY,t.series.chart.options.chart.type in{column:!0,bar:!0}&&(h=Math.max(h,0)),"column"===t.series.chart.options.chart.type&&(e=t.barX),u=It(d?d[0]:Mt?St-h:e),l=It(d?d[1]:Mt?Ct-e:h),d=S||!t.series.isCartesian||E(u,l),!1!==f&&d?(M&&(O.show(),M=!1),_.attr({text:f}),e=_.getBBox(),k=e.width+2*w,v=e.height+2*w,H.attr({width:k,height:v,stroke:y.borderColor||t.color||b.color||"#606060"}),d=k,f=v,e=bt,i=pt,r=St,n=Ct,l=(u={x:u,y:l}).x,u=u.y,o=u-f+i+10,e+r<(a=(a=l-d+e-25)<7?e+l+15:a)+d&&(r<d?a=7:a-=a+d-(e+r),o-=f,s=!0),o<5?(o=5,s&&o<=u&&u<=o+f&&(o=u+f-5)):i+n<o+f&&(o=i+n-f-5),function t(e,i){L=e,A=i,O.translate(L,A),I=1<zt(e-L)||1<zt(i-A)?function(){t(e,i)}:null}(It((l={x:a,y:o}).x-T),It(l.y-T))):P(),x)for(var g,p,m=(x=Re(x)).length;m--;)p=t.series[m?"yAxis":"xAxis"],x[m]&&p&&(p=p.getPlotLinePath(t[m?"y":"x"],1),C[m]?C[m].attr({d:p,visibility:Bt}):(g={"stroke-width":x[m].width||1,stroke:x[m].color||"#C0C0C0",zIndex:2},x[m].dashStyle&&(g.dashstyle=x[m].dashStyle),C[m]=Lt.path(p).attr(g).add()))},hide:P,destroy:function(){Ut(C,function(t){t&&t.destroy()}),Ut([H,_,O],function(t){t&&t.destroy()}),H=_=O=null}}}function et(c){var d,u,f,g,t=At.zoomType,p=/x/.test(t),m=/y/.test(t),y=p&&!Mt||m&&Mt,b=m&&!Mt||p&&Mt;function k(t){var e,i,r,n,s=xe&&dt.width/dt.body.scrollWidth-1;return(t=t||ut.event).target||(t.target=t.srcElement),n=t.touches?t.touches.item(0):t,("mousemove"!==t.type||ut.opera||s)&&(e=(C=$e(_)).left,i=C.top),n=ve?(r=t.x,t.y):n.layerX===Pt?(r=n.pageX-e,n.pageY-i):(r=t.layerX,t.layerY),s&&(r+=It((s+1)*e-e),n+=It((s+1)*i-i)),qt(t,{chartX:r,chartY:n})}function i(){var t=Ot.hoverSeries,e=Ot.hoverPoint;e&&e.onMouseOut(),t&&t.onMouseOut(),v&&v.hide(),A=null}function e(){var s,a,o,h;g&&(s={xAxis:[],yAxis:[]},a=g.getBBox(),o=a.x-bt,h=a.y-pt,f&&(Ut(w,function(t){var e=t.translate,i=t.isXAxis,r=Mt?!i:i,n=e(r?o:Ct-h-a.height,!0,0,0,1),e=e(r?o+a.width:Ct-h,!0,0,0,1);s[i?"xAxis":"yAxis"].push({axis:t,min:Ft(n,e),max:Nt(n,e)})}),Xt(Ot,"selection",s,z)),g=g.destroy()),Ot.mouseIsDown=T=f=!1,Gt(dt,we?"touchend":"mouseup",e)}function r(t){var e=Zt(t.pageX)?t.pageX:t.page.x,t=Zt(t.pageX)?t.pageY:t.page.y;C&&!E(e-C.left-bt,t-C.top-pt)&&i()}function n(t){if(!(t&&t.touches&&1<t.touches.length)){t=k(t),we||(t.returnValue=!1);var e=t.chartX,i=t.chartY,r=!E(e-bt,i-pt);if(C=C||$e(_),we&&"touchstart"===t.type&&(Qt(t.target,"isTracker")?Ot.runTrackerClick||t.preventDefault():q||r||t.preventDefault()),r&&(e<bt?e=bt:bt+St<e&&(e=bt+St),i<pt?i=pt:pt+Ct<i&&(i=pt+Ct)),T&&"touchstart"!==t.type)10<(f=Math.sqrt(Math.pow(d-e,2)+Math.pow(u-i,2)))&&((g=S&&(p||m)&&E(d-bt,u-pt)?g||Lt.rect(bt,pt,y?1:St,b?1:Ct,0).attr({fill:At.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add():g)&&y&&(e=e-d,g.attr({width:zt(e),x:(0<e?0:e)+d})),g&&b&&(e=i-u,g.attr({height:zt(e),y:(0<e?0:e)+u})));else if(!r){var n,s,a,o,i=t,e=Ot.hoverPoint,t=Ot.hoverSeries,h=vt,l=Mt?i.chartY:i.chartX-bt;if(v&&c.shared){for(s=[],a=Ht.length,o=0;o<a;o++)Ht[o].visible&&Ht[o].tooltipPoints.length&&((n=Ht[o].tooltipPoints[l])._dist=zt(l-n.plotX),h=Ft(h,n._dist),s.push(n));for(a=s.length;a--;)s[a]._dist>h&&s.splice(a,1);s.length&&s[0].plotX!==A&&(v.refresh(s),A=s[0].plotX)}t&&t.tracker&&(n=t.tooltipPoints[l])&&n!==e&&n.onMouseOver()}return r||!S}}(M=function(){x?(x.translate(bt,pt),Mt&&x.attr({width:Ot.plotWidth,height:Ot.plotHeight}).invert()):Ot.trackerGroup=x=Lt.g("tracker").attr({zIndex:9}).add()})(),c.enabled&&(Ot.tooltip=v=tt(c)),_.onmousedown=function(t){t=k(t),!we&&t.preventDefault&&t.preventDefault(),Ot.mouseIsDown=T=!0,d=t.chartX,u=t.chartY,jt(dt,we?"touchend":"mouseup",e)},_.onmousemove=n,jt(_,"mouseleave",i),jt(dt,"mousemove",r),_.ontouchstart=function(t){(p||m)&&_.onmousedown(t),n(t)},_.ontouchmove=n,_.ontouchend=function(){f&&i()},_.onclick=function(t){var e,i,n,s,r=Ot.hoverPoint;(t=k(t)).cancelBubble=!0,f||(r&&Qt(t.target,"isTracker")?(e=r.plotX,i=r.plotY,qt(r,{pageX:C.left+bt+(Mt?St-i:e),pageY:C.top+pt+(Mt?Ct-e:i)}),Xt(r.series,"click",qt(t,{point:r})),r.firePointEvent("click",t)):(qt(t,(n=t,s={xAxis:[],yAxis:[]},Ut(w,function(t){var e=t.translate,i=t.isXAxis,r=Mt?!i:i;s[i?"xAxis":"yAxis"].push({axis:t,value:e(r?n.chartX-bt:Ct-n.chartY+pt,!0)})}),s)),E(t.chartX-bt,t.chartY-pt)&&Xt(Ot,"click",t))),f=!1},L=setInterval(function(){I&&I()},32),qt(this,{zoomX:p,zoomY:m,resetTracker:i,destroy:function(){Ot.trackerGroup&&(Ot.trackerGroup=x=Ot.trackerGroup.destroy()),Gt(dt,"mousemove",r),_.onclick=_.onmousedown=_.onmousemove=_.ontouchstart=_.ontouchend=_.ontouchmove=null}})}var it=function(){var l,c,d,r,n,u,f,g,p,m,y,b,k,v,s,a,o,x,C,S,h,w,T,M=Ot.options.legend;if(M.enabled)return l="horizontal"===M.layout,c=M.symbolWidth,d=M.symbolPadding,n=M.style,u=M.itemStyle,f=M.itemHoverStyle,g=M.itemHiddenStyle,p=Kt(n.padding),m=4+p+c+d,v=0,a=M.borderWidth,o=M.backgroundColor,S=M.width,h=Ot.series,w=M.reversed,T=M.hooks||{},t(),jt(Ot,"endResize",A),{colorizeItem:L,destroyItem:function(e){var t=e.checkbox;Ut(["legendItem","legendLine","legendSymbol"],function(t){e[t]&&e[t].destroy()}),t&&je(e.checkbox)},renderLegend:t,destroy:function(){s=s&&s.destroy(),x=x&&x.destroy()}};function L(t,e){var i=t.legendItem,r=t.legendLine,n=t.legendSymbol,s=g.color,a=e?M.itemStyle.color:s,o=e?t.color:s,e=e?t.pointAttr[""]:{stroke:s,fill:s};i&&i.css({fill:a}),r&&r.attr({stroke:o}),n&&n.attr(e)}function A(){Ut(r,function(t){var e=t.checkbox,i=x.alignAttr;e&&ee(e,{left:i.translateX+t.legendItemWidth+e.x-40+$t,top:i.translateY+e.y-11+$t})})}function O(r){var t,e,i,n,s=r.legendItem,a=r.series||r,o=a.options,h=o&&o.borderWidth||0;s||(a=/^(bar|pie|area|column)$/.test(a.type),r.legendItem=s=Lt.text(M.labelFormatter.call(r),0,0).css(r.visible?u:g).on("mouseover",function(){r.setState(He),s.css(f)}).on("mouseout",function(){s.css(r.visible?u:g),r.setState()}).on("click",function(t){function e(){r.setVisible()}var i="legendItemClick",t={ctrlKey:t.ctrlKey,metaKey:t.metaKey};r.firePointEvent?r.firePointEvent(i,t,e):Xt(r,i,t,e)}).attr({zIndex:2}).add(x),!a&&o&&o.lineWidth&&(n={"stroke-width":o.lineWidth,zIndex:2},o.dashStyle&&(n.dashstyle=o.dashStyle),r.legendLine=Lt.path([Vt,-c-d,0,Yt,-d,0]).attr(n).add(x)),a?i=Lt.rect(t=-c-d,e=-11,c,12,2).attr({zIndex:3}).add(x):o&&o.marker&&o.marker.enabled&&(i=Lt.symbol(r.symbol,t=-c/2-d,e=-4,o.marker.radius).attr({zIndex:3}).add(x)),i&&(i.xOff=t+h%2/2,i.yOff=e+h%2/2),r.legendSymbol=i,L(r,r.visible),o&&o.showCheckbox&&(r.checkbox=ie("input",{type:"checkbox",checked:r.selected,defaultChecked:r.selected},M.itemCheckboxStyle,_),jt(r.checkbox,"click",function(t){t=t.target;Xt(r,"checkboxClick",{checked:t.checked},function(){r.select()})}))),n=s.getBBox(),a=r.legendItemWidth=M.itemWidth||c+d+n.width+p,v=n.height,l&&(S||vt-2*p-m)<y-m+a&&(y=m,b+=v),t=y,e=k=b,i=(h=r).legendItem,o=h.legendLine,n=h.legendSymbol,h=h.checkbox,i&&i.attr({x:t,y:e}),o&&o.translate(t,e-4),n&&n.attr({x:t+n.xOff,y:e+n.yOff}),h&&(h.x=t,h.y=e),l?y+=a:b+=v,C=S||Nt(l?y-m:a,C)}function t(){y=m,b=18,k=C=0,x=x||Lt.g("legend").attr({zIndex:7}).add(),r=[],Ut(h,function(t){var e=t.options;e.showInLegend&&(r=r.concat("point"===e.legendType?t.data:t))}),Ye(r,function(t,e){return(t.options.legendIndex||0)-(e.options.legendIndex||0)}),w&&r.reverse(),T.labelRenderHook&&T.labelRenderHook(r,M,u,H,Lt),Ut(r,O),W=S||C,P=k-18+v,(a||o)&&(W+=2*p,P+=2*p,s?0<W&&0<P&&(s[s.isNew?"attr":"animate"](s.crisp(null,null,null,W,P)),s.isNew=!1):(s=Lt.rect(0,0,W,P,M.borderRadius,a||0).attr({stroke:M.borderColor,"stroke-width":a||0,fill:o||ft}).add(x).shadow(M.shadow)).isNew=!0,s[r.length?"show":"hide"]());for(var t,e=["left","right","top","bottom"],i=4;i--;)n[t=e[i]]&&"auto"!==n[t]&&(M[i<2?"align":"verticalAlign"]=t,M[i<2?"x":"y"]=Kt(n[t])*(i%2?-1:1));T.placementHook&&T.placementHook(M,W,P,H),r.length&&x.align(qt(M,{width:W,height:P}),!0,H),K||A()}};function rt(t){var e=t.type||At.type||At.defaultSeriesType,i=gt[e],r=Ot.hasRendered;return r&&(Mt&&"column"===e?i=gt.bar:Mt||"bar"!==e||(i=gt.column)),(e=new i).init(Ot,t),!r&&e.inverted&&(Mt=!0),e.isCartesian&&(S=e.isCartesian),Ht.push(e),e}function nt(){!1!==At.alignTicks&&Ut(w,function(t){t.adjustTickAmount()}),Tt=null}function st(t){var e,i,r=Ot.isDirtyLegend,n=Ot.isDirtyBox,s=Ht.length,a=s,o=Ot.clipRect;for(Je(t,Ot);a--;)if((i=Ht[a]).isDirty&&i.options.stacking){e=!0;break}if(e)for(a=s;a--;)(i=Ht[a]).options.stacking&&(i.isDirty=!0);Ut(Ht,function(t){t.isDirty&&(t.cleanData(),t.getSegments(),"point"===t.options.legendType&&(r=!0))}),r&&c.renderLegend&&(c.renderLegend(),Ot.isDirtyLegend=!1),S&&(K||(Tt=null,Ut(w,function(t){t.setScale()})),nt(),O(),Ut(w,function(t){(t.isDirty||n)&&(t.redraw(),n=!0)})),n&&(k(),M(),o&&(Ee(o),o.animate({width:Ot.plotSizeX,height:Ot.plotSizeY}))),Ut(Ht,function(t){t.isDirty&&t.visible&&(!t.isCartesian||t.xAxis)&&t.redraw()}),wt&&wt.resetTracker&&wt.resetTracker(),Xt(Ot,"redraw")}function at(t,e){h=Jt(o.title,t),l=Jt(o.subtitle,e),Ut([["title",t,h],["subtitle",e,l]],function(t){var e=t[0],i=Ot[e],r=t[1],t=t[2];i&&r&&(i=i.destroy()),t&&t.text&&!i&&(Ot[e]=Lt.text(t.text,0,0,t.useHTML).attr({align:t.align,class:"highcharts-"+e,zIndex:1}).css(t.style).add().align(t,!1,H))})}function ot(){var t,e;n=At.renderTo,u=Oe+Te++,(n=Ie(n)?dt.getElementById(n):n).innerHTML="",n.offsetWidth||(ee(i=n.cloneNode(0),{position:Le,top:"-9999px",display:""}),dt.body.appendChild(i)),f=(i||n).offsetWidth,r=(i||n).offsetHeight,Ot.chartWidth=vt=At.width||f||600,Ot.chartHeight=xt=At.height||(19<r?r:400),Ot.container=_=ie(Me,{className:"highcharts-container"+(At.className?" "+At.className:""),id:u},qt({position:Ae,overflow:Rt,width:vt+$t,height:xt+$t,textAlign:"left"},At.style),i||n),Ot.renderer=Lt=At.forExport?new ti(_,vt,xt,!0):new ne(_,vt,xt),Ce&&_.getBoundingClientRect&&((t=function(){ee(_,{left:0,top:0}),e=_.getBoundingClientRect(),ee(_,{left:-(e.left-Kt(e.left))+$t,top:-(e.top-Kt(e.top))+$t})})(),jt(ut,"resize",t),jt(Ot,"destroy",function(){Gt(ut,"resize",t)}))}function ht(){Xt(Ot,"endResize",null,function(){--K})}function lt(){var t,r=o.labels,e=o.credits;at(),c=Ot.legend=new it,O(),Ut(w,function(t){t.setTickPositions(!0)}),nt(),O(),k(),S&&Ut(w,function(t){t.render()}),Ot.seriesGroup||(Ot.seriesGroup=Lt.g("series-group").attr({zIndex:3}).add()),Ut(Ht,function(t){t.translate(),t.setTooltipPoints(),t.render()}),r.items&&Ut(r.items,function(){var t=qt(r.style,this.style),e=Kt(t.left)+bt,i=Kt(t.top)+pt+12;delete t.left,delete t.top,Lt.text(this.html,e,i).attr({zIndex:2}).css(t).add()}),Ot.toolbar||(Ot.toolbar=Q()),e.enabled&&!Ot.credits&&(t=e.href,Ot.credits=Lt.text(e.text,0,0).on("click",function(){t&&(location.href=t)}).attr({align:e.position.align,zIndex:8}).css(e.style).add().align(e.position)),M(),Ot.hasRendered=!0,i&&(n.appendChild(_),je(i))}function ct(){var t,e=_&&_.parentNode;if(null!==Ot){for(Xt(Ot,"destroy"),Gt(ut,"."+u),Gt(Ot),t=w.length;t--;)w[t]=w[t].destroy();for(t=Ht.length;t--;)Ht[t]=Ht[t].destroy();for(t in Ut(["title","subtitle","seriesGroup","clipRect","credits","tracker"],function(t){var e=Ot[t];e&&(Ot[t]=e.destroy())}),Ut([a,c,v,Lt,wt],function(t){t&&t.destroy&&t.destroy()}),a=c=v=Lt=wt=null,_&&(_.innerHTML="",Gt(_),e&&e.removeChild(_),_=null),clearInterval(L),Ot)delete Ot[t];Ot=null}}if(E=function(t,e){return 0<=t&&t<=St&&0<=e&&e<=Ct},R=function(){Xt(Ot,"selection",{resetSelection:!0},z),Ot.toolbar.remove("zoom")},z=function(t){var e=re.lang,i=Ot.pointCount<100;Ot.toolbar.add("zoom",e.resetZoom,e.resetZoomTitle,R),!t||t.resetSelection?Ut(w,function(t){t.setExtremes(null,null,!1,i)}):Ut(t.xAxis.concat(t.yAxis),function(t){var e=t.axis;Ot.tracker[e.isXAxis?"zoomX":"zoomY"]&&e.setExtremes(t.min,t.max,!1,i)}),st()},O=function(){var t,e=o.legend,i=te(e.margin,10),r=e.x,n=e.y,s=e.align,a=e.verticalAlign;D(),!Ot.title&&!Ot.subtitle||Zt(B)||(t=Nt(Ot.title&&!h.floating&&!h.verticalAlign&&h.y||0,Ot.subtitle&&!l.floating&&!l.verticalAlign&&l.y||0))&&(pt=Nt(pt,t+te(h.margin,15)+U)),e.enabled&&!e.floating&&("right"===s?Zt($)||(mt=Nt(mt,W-r+i+J)):"left"===s?Zt(Y)||(bt=Nt(bt,W+r+i+G)):"top"===a?Zt(B)||(pt=Nt(pt,P+n+i+U)):"bottom"!==a||Zt(V)||(yt=Nt(yt,P-n+i+j))),S&&Ut(w,function(t){t.getOffset()}),Zt(Y)||(bt+=kt[3]),Zt(B)||(pt+=kt[0]),Zt(V)||(yt+=kt[2]),Zt($)||(mt+=kt[1]),N()},F=function(t,e,i){var r=Ot.title,n=Ot.subtitle;K+=1,Je(i,Ot),Wt=xt,_t=vt,Ot.chartWidth=vt=It(t),Ot.chartHeight=xt=It(e),ee(_,{width:vt+$t,height:xt+$t}),Lt.setSize(vt,xt,i),St=vt-bt-mt,Ct=xt-pt-yt,Tt=null,Ut(w,function(t){t.isDirty=!0,t.setScale()}),Ut(Ht,function(t){t.isDirty=!0}),Ot.isDirtyLegend=!0,Ot.isDirtyBox=!0,O(),r&&r.align(null,null,H),n&&n.align(null,null,H),st(i),Wt=null,Xt(Ot,"resize"),!1===ae?ht():setTimeout(ht,ae&&ae.duration||500)},N=function(){Ot.plotLeft=bt=It(bt),Ot.plotTop=pt=It(pt),Ot.plotWidth=St=It(vt-bt-mt),Ot.plotHeight=Ct=It(xt-pt-yt),Ot.plotSizeX=Mt?Ct:St,Ot.plotSizeY=Mt?St:Ct,H={x:G,y:U,width:vt-G-J,height:xt-U-j}},D=function(){pt=te(B,U),mt=te($,J),yt=te(V,j),bt=te(Y,G),kt=[0,0,0,0]},!(k=function(){var t=At.borderWidth||0,e=At.backgroundColor,i=At.plotBackgroundColor,r=At.plotBackgroundImage,n={x:bt,y:pt,width:St,height:Ct},s=t+(At.shadow?8:0);(t||e)&&(a?a.animate(a.crisp(null,null,null,vt-s,xt-s)):a=Lt.rect(s/2,s/2,vt-s,xt-s,At.borderRadius,t).attr({stroke:At.borderColor,"stroke-width":t,fill:e||ft}).add().shadow(At.shadow)),i&&(g?g.animate(n):g=Lt.rect(bt,pt,St,Ct,0).attr({fill:i}).add().shadow(At.plotShadow)),r&&(p?p.animate(n):p=Lt.image(r,bt,pt,St,Ct).add()),At.plotBorderWidth&&(m?m.animate(m.crisp(null,bt,pt,St,Ct)):m=Lt.rect(bt,pt,St,Ct,0,At.plotBorderWidth).attr({stroke:At.plotBorderColor,"stroke-width":At.plotBorderWidth,zIndex:4}).add()),Ot.isDirtyBox=!1})!==At.reflow&&jt(Ot,"load",function(){var i;function t(){var t=At.width||n.offsetWidth,e=At.height||n.offsetHeight;t&&e&&(t===f&&e===r||(clearTimeout(i),i=setTimeout(function(){F(t,e,!1)},100)),f=t,r=e)}jt(ut,"resize",t),jt(Ot,"destroy",function(){Gt(ut,"resize",t)})}),X)for(e in X)jt(Ot,e,X[e]);Ot.options=o,Ot.series=Ht,Ot.addSeries=function(t,e,i){var r;return t&&(Je(i,Ot),e=te(e,!0),Xt(Ot,"addSeries",{options:t},function(){(r=rt(t)).isDirty=!0,Ot.isDirtyLegend=!0,e&&Ot.redraw()})),r},Ot.animation=te(At.animation,!0),Ot.destroy=ct,Ot.get=function(t){for(var e,i,r=0;r<w.length;r++)if(w[r].options.id===t)return w[r];for(r=0;r<Ht.length;r++)if(Ht[r].options.id===t)return Ht[r];for(r=0;r<Ht.length;r++)for(i=Ht[r].data,e=0;e<i.length;e++)if(i[e].id===t)return i[e];return null},Ot.getSelectedPoints=function(){var e=[];return Ut(Ht,function(t){e=e.concat(_e(t.data,function(t){return t.selected}))}),e},Ot.getSelectedSeries=function(){return _e(Ht,function(t){return t.selected})},Ot.hideLoading=function(){Pe(s,{opacity:0},{duration:o.loading.hideDuration,complete:function(){ee(s,{display:ft})}}),b=!1},Ot.isInsidePlot=E,Ot.redraw=st,Ot.setSize=F,Ot.setTitle=at,Ot.showLoading=function(t){var e=o.loading;s||(s=ie(Me,{className:"highcharts-loading"},qt(e.style,{left:bt+$t,top:pt+$t,width:St+$t,height:Ct+$t,zIndex:10,display:ft}),_),y=ie("span",null,e.labelStyle,s)),y.innerHTML=t||o.lang.loading,b||(ee(s,{opacity:0,display:""}),Pe(s,{opacity:e.style.opacity},{duration:e.showDuration}),b=!0)},Ot.pointCount=0,Ot.counters=new Ve,function t(){var e,i,r,n="onreadystatechange",s="complete";Se||ut!=ut.top||dt.readyState===s?(ot(),D(),N(),Ut(o.series||[],function(t){rt(t)}),Ot.inverted=Mt=te(Mt,o.chart.inverted),i=o.xAxis||{},r=o.yAxis||{},i=Re(i),Ut(i,function(t,e){t.index=e,t.isX=!0}),r=Re(r),Ut(r,function(t,e){t.index=e}),w=i.concat(r),Ot.xAxis=[],Ot.yAxis=[],w=We(w,function(t){return e=new Z(t),Ot[e.isXAxis?"xAxis":"yAxis"].push(e),e}),nt(),Ot.render=lt,Ot.tracker=wt=new et(o.tooltip),lt(),Xt(Ot,"load"),d&&d.apply(Ot,[Ot]),Ut(Ot.callbacks,function(t){t.apply(Ot,[Ot])})):dt.attachEvent(n,function(){dt.detachEvent(n,t),dt.readyState===s&&t()})}(),jt(ut,"unload."+u,ct)}function L(){}function E(){}p.spline=Jt(t),p.scatter=Jt(t,{lineWidth:0,states:{hover:{lineWidth:0}}}),p.area=Jt(t,{}),p.areaspline=Jt(p.area),p.column=Jt(t,{borderColor:"#FFFFFF",borderWidth:1,borderRadius:0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,states:{hover:{brightness:.1,shadow:!1},select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}},dataLabels:{y:null,verticalAlign:null}}),p.bar=Jt(p.column,{dataLabels:{align:"left",x:5,y:0}}),p.pie=Jt(t,{borderColor:"#FFFFFF",borderWidth:1,center:["50%","50%"],colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name},y:5},legendType:"point",marker:null,size:"75%",showInLegend:!1,slicedOffset:10,states:{hover:{brightness:.1,shadow:!1}}}),S(),T.prototype={init:function(t,e){this.element=dt.createElementNS(v,e),this.renderer=t},animate:function(t,e,i){e=te(e,ae,!0);e?(e=Jt(e),i&&(e.complete=i),Pe(this,t,e)):(this.attr(t),i&&i())},attr:function(t,e){var i,r,n,s,a,o,h,l=this.element,c=l.nodeName,d=this.renderer,u=this.shadows,f=this.htmlNode,g=this;if(Ie(t)&&Zt(e)&&(i=t,(t={})[i]=e),Ie(t))i=t,"circle"===c?i={x:"cx",y:"cy"}[i]||i:"strokeWidth"===i&&(i="stroke-width"),g=Qt(l,i)||this[i]||0,"d"!==i&&"visibility"!==i&&(g=parseFloat(g));else for(i in t){if(a=!1,r=t[i],"d"===i)r&&r.join&&(r=r.join(" ")),/(NaN| {2}|^$)/.test(r)&&(r="M 0 0"),this.d=r;else if("x"===i&&"text"===c){for(n=0;n<l.childNodes.length;n++)Qt(s=l.childNodes[n],"x")===Qt(l,"x")&&Qt(s,"x",r);this.rotation&&Qt(l,"transform","rotate("+this.rotation+" "+r+" "+Kt(t.y||Qt(l,"y"))+")")}else if("fill"===i)r=d.color(r,l,i);else if("circle"!==c||"x"!==i&&"y"!==i)if("translateX"===i||"translateY"===i||"rotation"===i||"verticalAlign"===i)this[i]=r,this.updateTransform(),a=!0;else if("stroke"===i)r=d.color(r,l,i);else if("dashstyle"===i){if(i="stroke-dasharray","solid"===(r=r&&r.toLowerCase()))r=ft;else if(r){for(n=(r=r.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",")).length;n--;)r[n]=Kt(r[n])*t["stroke-width"];r=r.join(",")}}else"isTracker"===i?this[i]=r:"width"===i?r=Kt(r):"align"===i?(i="text-anchor",r={left:"start",center:"middle",right:"end"}[r]):"title"===i&&((h=dt.createElementNS(v,"title")).appendChild(dt.createTextNode(r)),l.appendChild(h));else i={x:"cx",y:"cy"}[i]||i;if("strokeWidth"===i&&(i="stroke-width"),xe&&"stroke-width"===i&&0===r&&(r=1e-6),this.symbolName&&/^(x|y|r|start|end|innerR)/.test(i)&&(o||(this.symbolAttr(t),o=!0),a=!0),u&&/^(width|height|visibility|x|y|d)$/.test(i))for(n=u.length;n--;)Qt(u[n],i,r);if(("width"===i||"height"===i)&&"rect"===c&&r<0&&(r=0),"text"===i?(this.textStr=r,this.added&&d.buildText(this)):a||Qt(l,i,r),f&&("x"===i||"y"===i||"translateX"===i||"translateY"===i||"visibility"===i))for(var p,m,y=f.length?f:[this],b=y.length,k=0;k<b;k++)p=(m=y[k]).getBBox(),ee(f=m.htmlNode,qt(this.styles,{left:p.x+(this.translateX||0)+$t,top:p.y+(this.translateY||0)+$t})),"visibility"===i&&ee(f,{visibility:r})}return g},symbolAttr:function(e){var i=this;Ut(["x","y","r","start","end","width","height","innerR"],function(t){i[t]=te(e[t],i[t])}),i.attr({d:i.renderer.symbols[i.symbolName](It(2*i.x)/2,It(2*i.y)/2,i.r,{start:i.start,end:i.end,width:i.width,height:i.height,innerR:i.innerR})})},clip:function(t){return this.attr("clip-path","url("+this.renderer.url+"#"+t.id+")")},crisp:function(t,e,i,r,n){var s,a=this,o={},h={},l=(t=t||a.strokeWidth||0)%2/2;for(s in h.x=Dt(e||a.x||0)+l,h.y=Dt(i||a.y||0)+l,h.width=Dt((r||a.width||0)-2*l),h.height=Dt((n||a.height||0)-2*l),h.strokeWidth=t,h)a[s]!==h[s]&&(a[s]=o[s]=h[s]);return o},css:function(t){function e(t,e){return"-"+e.toLowerCase()}var i,r=this,n=r.element,n=t&&t.width&&"text"===n.nodeName,s="";if(t&&t.color&&(t.fill=t.color),t=qt(r.styles,t),r.styles=t,ve&&!Se)n&&delete t.width,ee(r.element,t);else{for(i in t)s+=i.replace(/([A-Z])/g,e)+":"+t[i]+";";r.attr({style:s})}return n&&r.added&&r.renderer.buildText(r),r},on:function(t,e){var i=e;return we&&"click"===t&&(t="touchstart",i=function(t){t.preventDefault(),e()}),this.element["on"+t]=i,this},translate:function(t,e){return this.attr({translateX:t,translateY:e})},invert:function(){return this.inverted=!0,this.updateTransform(),this},updateTransform:function(){var t=this,e=t.translateX||0,i=t.translateY||0,r=t.inverted,n=t.rotation,s=[];r&&(e+=t.attr("width"),i+=t.attr("height")),(e||i)&&s.push("translate("+e+","+i+")"),r?s.push("rotate(90) scale(-1,1)"):n&&s.push("rotate("+n+" "+t.x+" "+t.y+")"),s.length&&Qt(t.element,"transform",s.join(" "))},toFront:function(){var t=this.element;return t.parentNode.appendChild(t),this},align:function(t,e,i){var r=this,n=(t?(r.alignOptions=t,r.alignByTranslate=e,i||r.renderer.alignedObjects.push(r)):(t=r.alignOptions,e=r.alignByTranslate),i=te(i,r.renderer),t.align),s=t.verticalAlign,a=(i.x||0)+(t.x||0),o=(i.y||0)+(t.y||0),h={};return/^(right|center)$/.test(n)&&(a+=(i.width-(t.width||0))/{right:1,center:2}[n]),h[e?"translateX":"x"]=It(a),/^(bottom|middle)$/.test(s)&&(o+=(i.height-(t.height||0))/({bottom:1,middle:2}[s]||1)),h[e?"translateY":"y"]=It(o),r[r.placed?"animate":"attr"](h),r.placed=!0,r.alignAttr=h,r},getBBox:function(){var e,t,i,r=this.rotation,n=r*y;try{e=qt({},this.element.getBBox())}catch(t){e={width:0,height:0}}return t=e.width,i=e.height,r&&(e.width=zt(i*k(n))+zt(t*b(n)),e.height=zt(i*b(n))+zt(t*k(n))),e},show:function(){return this.attr({visibility:Bt})},hide:function(){return this.attr({visibility:Rt})},add:function(t){var e,i,r,n=this.renderer,s=t||n,a=s.element||n.box,o=a.childNodes,h=this.element,l=Qt(h,"zIndex");if(this.parentInverted=t&&t.inverted,void 0!==this.textStr&&n.buildText(this),t&&this.htmlNode&&(t.htmlNode||(t.htmlNode=[]),t.htmlNode.push(this)),l&&(s.handleZ=!0,l=Kt(l)),s.handleZ)for(r=0;r<o.length;r++)if(i=Qt(e=o[r],"zIndex"),e!==h&&(Kt(i)>l||!Zt(l)&&Zt(i)))return a.insertBefore(h,e),this;return a.appendChild(h),this.added=!0,this},destroy:function(){var t,e,i=this,r=i.element||{},n=i.shadows,s=r.parentNode;if(r.onclick=r.onmouseout=r.onmouseover=r.onmousemove=null,Ee(i),i.clipPath&&(i.clipPath=i.clipPath.destroy()),i.stops){for(e=0;e<i.stops.length;e++)i.stops[e]=i.stops[e].destroy();i.stops=null}for(t in s&&s.removeChild(r),n&&Ut(n,function(t){(s=t.parentNode)&&s.removeChild(t)}),ze(i.renderer.alignedObjects,i),i)delete i[t];return null},empty:function(){for(var t=this.element,e=t.childNodes,i=e.length;i--;)t.removeChild(e[i])},shadow:function(t,e){var i,r,n=[],s=this.element,a=this.parentInverted?"(-1,-1)":"(1,1)";if(t){for(i=1;i<=3;i++)Qt(r=s.cloneNode(0),{isShadow:"true",stroke:"rgb(0, 0, 0)","stroke-opacity":.05*i,"stroke-width":7-2*i,transform:"translate"+a,fill:ft}),e?e.element.appendChild(r):s.parentNode.insertBefore(r,s),n.push(r);this.shadows=n}return this}},ti.prototype={Element:T,init:function(t,e,i,r){var n=this,s=location,a=n.createElement("svg").attr({xmlns:v,version:"1.1"});t.appendChild(a.element),n.box=a.element,n.boxWrapper=a,n.alignedObjects=[],n.url=ve?"":s.href.replace(/#.*?$/,""),n.defs=this.createElement("defs").add(),n.forExport=r,n.gradients=[],n.setSize(e,i,!1)},destroy:function(){var t,e=this,i=e.gradients,r=e.defs;if(e.box=null,e.boxWrapper=e.boxWrapper.destroy(),i){for(t=0;t<i.length;t++)e.gradients[t]=i[t].destroy();e.gradients=null}return r&&(e.defs=r.destroy()),e.alignedObjects=null},createElement:function(t){var e=new this.Element;return e.init(this,t),e},buildText:function(o){for(var h,l=o.element,t=te(o.textStr,"").toString().replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g),e=l.childNodes,c=/style="([^"]+)"/,d=/href="([^"]+)"/,u=Qt(l,"x"),i=o.styles,r=i&&o.useHTML&&!this.forExport,n=o.htmlNode,s=i&&Kt(i.width),f=i&&i.lineHeight,g="getComputedStyle",a=e.length;a--;)l.removeChild(e[a]);if(s&&!o.added&&this.box.appendChild(l),Ut(t,function(t,r){var n,s,a=0;t=t.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||"),n=t.split("|||"),Ut(n,function(t){var e,i;""===t&&1!==n.length||(e={},i=dt.createElementNS(v,"tspan"),c.test(t)&&Qt(i,"style",t.match(c)[1].replace(/(;