import{o as Ld}from"./_commonjsHelpers.773c2c82.js";function jd(ui,Et){for(var Tt=0;TtRt[Kt]})}}}return Object.freeze(Object.defineProperty(ui,Symbol.toStringTag,{value:"Module"}))}var fu,Jo={exports:{}};fu=()=>(()=>{var ui,Et,Tt,Rt,Kt={},Di={};function N(s){var i=Di[s];if(i!==void 0)return i.exports;var e=Di[s]={exports:{}};return Kt[s].call(e.exports,e,e.exports,N),e.exports}N.m=Kt,N.n=s=>{var i=s&&s.__esModule?()=>s.default:()=>s;return N.d(i,{a:i}),i},Et=Object.getPrototypeOf?s=>Object.getPrototypeOf(s):s=>s.__proto__,N.t=function(s,i){if(1&i&&(s=this(s)),8&i||typeof s=="object"&&s&&(4&i&&s.__esModule||16&i&&typeof s.then=="function"))return s;var e=Object.create(null);N.r(e);var t={};ui=ui||[null,Et({}),Et([]),Et(Et)];for(var n=2&i&&s;typeof n=="object"&&!~ui.indexOf(n);n=Et(n))Object.getOwnPropertyNames(n).forEach(r=>t[r]=()=>s[r]);return t.default=()=>s,N.d(e,t),e},N.d=(s,i)=>{for(var e in i)N.o(i,e)&&!N.o(s,e)&&Object.defineProperty(s,e,{enumerable:!0,get:i[e]})},N.f={},N.e=s=>Promise.all(Object.keys(N.f).reduce((i,e)=>(N.f[e](s,i),i),[])),N.u=s=>({265:"canvg",297:"xlsx",643:"pdfmake"}[s]||s)+".js",N.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),N.o=(s,i)=>Object.prototype.hasOwnProperty.call(s,i),Tt={},Rt="EsriAmCharts:",N.l=(s,i,e,t)=>{if(Tt[s])Tt[s].push(i);else{var n,r;if(e!==void 0)for(var a=document.getElementsByTagName("script"),o=0;o{n.onerror=n.onload=null,clearTimeout(p);var c=Tt[s];if(delete Tt[s],n.parentNode&&n.parentNode.removeChild(n),c&&c.forEach(f=>f(d)),u)return u(d)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=h.bind(null,n.onerror),n.onload=h.bind(null,n.onload),r&&document.head.appendChild(n)}},N.r=s=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},N.p="",(()=>{var s={826:0};N.f.j=(t,n)=>{var r=N.o(s,t)?s[t]:void 0;if(r!==0)if(r)n.push(r[2]);else{var a=new Promise((h,p)=>r=s[t]=[h,p]);n.push(r[2]=a);var o=N.p+N.u(t),l=new Error;N.l(o,h=>{if(N.o(s,t)&&((r=s[t])!==0&&(s[t]=void 0),r)){var p=h&&(h.type==="load"?"missing":h.type),u=h&&h.target&&h.target.src;l.message="Loading chunk "+t+` failed. (`+p+": "+u+")",l.name="ChunkLoadError",l.type=p,l.request=u,r[1](l)}},"chunk-"+t,t)}};var i=(t,n)=>{var r,a,[o,l,h]=n,p=0;if(o.some(u=>s[u]!==0)){for(r in l)N.o(l,r)&&(N.m[r]=l[r]);h&&h(N)}for(t&&t(n);pRs,am4core:()=>Es,am4themes_animated:()=>Td,am4themes_dark:()=>kd});var Cs={};N.r(Cs),N.d(Cs,{castNumber:()=>rl,castString:()=>sn,checkArray:()=>yu,checkBoolean:()=>tl,checkDate:()=>mu,checkNumber:()=>il,checkObject:()=>nl,checkString:()=>el,getDefault:()=>gu,getType:()=>kt,getValue:()=>be,getValueDefault:()=>rr,hasValue:()=>v,isArray:()=>Ae,isDate:()=>ki,isNaN:()=>Fe,isNumber:()=>y,isObject:()=>ye,isString:()=>J,toBoolean:()=>ve,toNumber:()=>ce,toNumberOrPercent:()=>sl,toText:()=>Xe});var Os={};N.r(Os),N.d(Os,{DEGREES:()=>vt,HALFPI:()=>Hs,PI:()=>an,RADIANS:()=>Ai,adjustTension:()=>hn,ceil:()=>Ns,closest:()=>al,cos:()=>L,fitAngleToRange:()=>bt,fitToRange:()=>R,getAngle:()=>Ee,getArcPoint:()=>or,getArcRect:()=>xt,getBBox:()=>Fi,getCenterShift:()=>bu,getCommonRectangle:()=>Mi,getCubicControlPointA:()=>Ys,getCubicControlPointB:()=>zs,getCubicCurveDistance:()=>pl,getDistance:()=>oe,getHorizontalDistance:()=>ll,getLineIntersection:()=>xu,getMidPoint:()=>ln,getPointOnCubicCurve:()=>ar,getPointOnQuadraticCurve:()=>Xs,getRotation:()=>dl,getScale:()=>ul,getVerticalDistance:()=>hl,intersect:()=>on,intersection:()=>ol,invertRange:()=>Vi,isInRectangle:()=>Us,max:()=>q,min:()=>ie,normalizeAngle:()=>Zt,round:()=>V,sin:()=>M,stretch:()=>vu,tan:()=>Ws,toNumberRange:()=>sr});var Ss={};N.r(Ss),N.d(Ss,{add:()=>ci,any:()=>lr,copy:()=>ji,each:()=>j,eachContinue:()=>hr,eachReverse:()=>cl,find:()=>Su,findIndex:()=>pr,first:()=>Pu,getSortedIndex:()=>pn,has:()=>Cu,indexOf:()=>ht,insert:()=>gl,insertIndex:()=>fi,keepIf:()=>Ks,last:()=>_u,map:()=>Li,move:()=>pt,pushAll:()=>yl,remove:()=>z,removeIndex:()=>gi,replace:()=>ml,setIndex:()=>wu,shiftLeft:()=>fl,shuffle:()=>Iu,slice:()=>Ou,toArray:()=>Gs});var Is={};N.r(Is),N.d(Is,{clone:()=>Cl,copy:()=>Tu,copyAllProperties:()=>Ei,copyProperties:()=>De,each:()=>X,eachContinue:()=>na,eachOrdered:()=>At,entries:()=>Pl,forceCopyProperties:()=>Ol,getKey:()=>Du,hasKey:()=>_t,keys:()=>ia,keysOrdered:()=>wl,merge:()=>dr,softCopyProperties:()=>ku});var Ds={};N.r(Ds),N.d(Ds,{ListIterator:()=>fn,concat:()=>Il,contains:()=>cr,each:()=>A,eachContinue:()=>rt,filter:()=>Au,find:()=>Tl,findIndex:()=>Vu,findMap:()=>Fu,flatten:()=>Dl,foldl:()=>sa,fromArray:()=>qt,indexed:()=>$t,join:()=>Vl,length:()=>Sl,map:()=>ra,max:()=>Al,min:()=>kl,sort:()=>yi,toArray:()=>Ri});var Ts={};N.r(Ts),N.d(Ts,{order:()=>fr,random:()=>Fl,repeat:()=>aa});var ks={};N.r(ks),N.d(ks,{order:()=>Pt});var As={};N.r(As),N.d(As,{brighten:()=>zl,getBrightnessStep:()=>Eu,getLightnessStep:()=>vn,hexToRgb:()=>Bl,hexToRgbWithAlpha:()=>Hl,hslToRgb:()=>ua,hsvToRgb:()=>Bu,interpolate:()=>mn,isLight:()=>Gl,lighten:()=>Yl,pad2:()=>vr,rgb:()=>Rl,rgbToHex:()=>Wl,rgbToHsl:()=>bn,rgbToHsv:()=>Ru,rgbToRGBA:()=>Xl,rgbaToRgb:()=>Nl,saturate:()=>Ul});var Vs={};N.r(Vs),N.d(Vs,{anyToDate:()=>ma,anyToNumber:()=>Or,camelToDashed:()=>Yu,capitalize:()=>wn,cleanFormat:()=>Cn,copy:()=>ql,copyProperties:()=>Vt,decimalPlaces:()=>ah,documentPointToSprite:()=>vi,documentPointToSvg:()=>Ht,escapeForRgex:()=>xr,fitNumber:()=>Sr,fitNumberRelative:()=>Ir,get12Hours:()=>On,getBaseURI:()=>Ni,getDayFromWeek:()=>nh,getFormat:()=>eh,getMonthWeek:()=>ih,getPixelRatio:()=>$l,getTimeZone:()=>Sn,getWeek:()=>Wi,getYearDay:()=>va,height:()=>sh,isIE:()=>Xi,isNotEmpty:()=>Pn,joinUrl:()=>kr,ltrim:()=>Ql,numberToString:()=>th,padString:()=>ze,parseUrl:()=>xa,plainText:()=>Cr,random:()=>Uu,relativeRadiusToValue:()=>Re,relativeToValue:()=>xe,reverseString:()=>wr,rtrim:()=>Jl,serializeUrl:()=>_a,softCopyProperties:()=>Wu,splitTextByCharCount:()=>_r,spritePointToDocument:()=>Tr,spritePointToSprite:()=>Qe,spritePointToSvg:()=>ut,spriteRectToSvg:()=>Dr,stringify:()=>fa,stripHash:()=>ca,stripTags:()=>ya,svgPointToDocument:()=>ba,svgPointToSprite:()=>at,svgRectToSprite:()=>Gu,trim:()=>ga,truncateWithEllipsis:()=>Pr,unquote:()=>zu,used:()=>Nu,valueToRelative:()=>Xu,width:()=>rh});var Fs={};N.r(Fs),N.d(Fs,{bounceIn:()=>Ph,bounceInOut:()=>wh,bounceOut:()=>In,circleIn:()=>bh,circleInOut:()=>_h,circleOut:()=>xh,cubicIn:()=>Ia,cubicInOut:()=>vh,cubicOut:()=>Qt,elasticIn:()=>Ch,elasticInOut:()=>Sh,elasticOut:()=>Oh,expIn:()=>ch,expInOut:()=>gh,expOut:()=>fh,linear:()=>Pa,polyIn:()=>wa,polyIn3:()=>uh,polyInOut:()=>Oa,polyInOut3:()=>dh,polyOut:()=>Ca,polyOut3:()=>Ar,quadIn:()=>lh,quadInOut:()=>ph,quadOut:()=>hh,sinIn:()=>yh,sinInOut:()=>mh,sinOut:()=>Sa});var Ms={};N.r(Ms),N.d(Ms,{add:()=>Ze,checkChange:()=>Rr,copy:()=>bi,getDuration:()=>Se,getNextUnit:()=>Ma,getTime:()=>Ot,getTimezoneMinutes:()=>Uh,now:()=>zh,round:()=>Be,setTimezone:()=>Vn,timeUnitDurations:()=>Yh});var Ls={};N.r(Ls),N.d(Ls,{load:()=>Fn,readBlob:()=>$h});var js={};N.r(js),N.d(js,{arc:()=>Pi,arcTo:()=>Le,arcToPoint:()=>ot,closePath:()=>pd,cubicCurveTo:()=>_i,lineTo:()=>T,moveTo:()=>E,pathToPoints:()=>ud,pointsToPath:()=>cd,polyline:()=>Zi,quadraticCurveTo:()=>ni,rectToPath:()=>Yt,rectangle:()=>Xr,spiralPoints:()=>dd});var Es={};N.r(Es),N.d(Es,{AMElement:()=>An,Adapter:()=>it,Animation:()=>gt,BaseObject:()=>Ke,BaseObjectEvents:()=>wt,Basis:()=>fd,BlurFilter:()=>Ip,Button:()=>Xt,CSVParser:()=>Ln,Cache:()=>Ml,Circle:()=>ii,CirclePattern:()=>no,CloseButton:()=>dp,Color:()=>se,ColorModifier:()=>eo,ColorSet:()=>$i,ColorizeFilter:()=>Sp,Component:()=>ti,Cone:()=>Pp,Container:()=>W,CounterDisposer:()=>un,DATE:()=>_n,DURATION:()=>br,DataItem:()=>ei,DataLoader:()=>np,DataParser:()=>Ka,DataSource:()=>rp,DateFormatter:()=>Gi,DesaturateFilter:()=>Wn,Dictionary:()=>me,DictionaryDisposer:()=>Jt,DictionaryTemplate:()=>Bi,Disposer:()=>le,DropShadowFilter:()=>qa,DurationFormatter:()=>Hr,Ellipse:()=>Wr,EventDispatcher:()=>Bt,Export:()=>tp,ExportMenu:()=>qh,Filter:()=>wi,FocusFilter:()=>Dp,GlobalAdapter:()=>jl,Group:()=>Eh,Image:()=>ap,IndexedIterable:()=>oa,Inertia:()=>Wh,Interaction:()=>Gh,InteractionKeyboardObject:()=>Nh,InteractionObject:()=>Hh,InteractionObjectEventDispatcher:()=>Bh,InterfaceColorSet:()=>ae,JSONParser:()=>Ki,Keyboard:()=>Xh,Label:()=>$e,Language:()=>Wt,LightenFilter:()=>Gr,Line:()=>yt,LinePattern:()=>io,LinearGradient:()=>dt,LinearGradientModifier:()=>Nn,List:()=>re,ListDisposer:()=>fe,ListGrouper:()=>ju,ListIterator:()=>fn,ListTemplate:()=>Oe,Modal:()=>Ea,Morpher:()=>pp,MouseCursorStyle:()=>He,MultiDisposer:()=>_e,MutableValueDisposer:()=>Me,NUMBER:()=>xn,NumberFormatter:()=>Br,OrderedList:()=>la,OrderedListTemplate:()=>yn,PLACEHOLDER:()=>st,PLACEHOLDER2:()=>mi,PX:()=>Hu,Paper:()=>Wa,Pattern:()=>xi,PatternSet:()=>Tp,Percent:()=>te,PlayButton:()=>_p,Plugin:()=>gd,PointedRectangle:()=>lp,PointedShape:()=>op,Polyarc:()=>hp,Polygon:()=>up,Polyline:()=>qi,Polyspline:()=>jn,Popup:()=>ja,Preloader:()=>Za,RadialGradient:()=>Nt,RadialGradientModifier:()=>Op,RectPattern:()=>ro,Rectangle:()=>Mn,Rectangle3D:()=>wp,Registry:()=>Ll,ResizeButton:()=>Yr,Responsive:()=>sp,ResponsiveBreakpoints:()=>Ue,RoundedRectangle:()=>St,STRING:()=>da,SVGContainer:()=>Na,SVGDefaults:()=>Dh,Scrollbar:()=>En,Slice:()=>ri,Slice3D:()=>Cp,Slider:()=>fp,SortedList:()=>gr,SortedListTemplate:()=>ha,Sprite:()=>$,SpriteEventDispatcher:()=>Ih,SpriteState:()=>Tn,StyleClass:()=>nd,StyleRule:()=>ue,SwitchButton:()=>cp,System:()=>ip,TargetedEventDispatcher:()=>ta,Tension:()=>zt,TextFormatter:()=>za,TextLink:()=>zr,Tooltip:()=>Rn,Trapezoid:()=>$a,Triangle:()=>Ur,Validatable:()=>Ga,WavedCircle:()=>Hn,WavedLine:()=>si,WavedRectangle:()=>Ja,ZoomOutButton:()=>Qa,addClass:()=>Mr,addLicense:()=>Cd,animate:()=>Zu,array:()=>Ss,blur:()=>kn,cache:()=>Hi,castColor:()=>Zl,castNumber:()=>rl,castString:()=>sn,checkBoolean:()=>tl,checkNumber:()=>il,checkObject:()=>nl,checkString:()=>el,color:()=>B,colors:()=>As,copyAttributes:()=>td,create:()=>vd,createDeferred:()=>xd,createFromConfig:()=>bd,dataLoader:()=>Nr,defaultRules:()=>Ne,disposeAllCharts:()=>md,ease:()=>Fs,fixPixelPerfect:()=>Lh,focus:()=>Ju,getElement:()=>ka,getInteraction:()=>K,getTextFormatter:()=>Ft,globalAdapter:()=>mr,is:()=>Ye,isArray:()=>Ae,isColor:()=>Kl,isElement:()=>ed,isNaN:()=>Fe,isNumber:()=>y,isObject:()=>ye,isPercent:()=>Qo,isString:()=>J,iter:()=>Ds,join:()=>Vl,keyboard:()=>Ct,math:()=>Os,max:()=>Al,min:()=>kl,net:()=>Ls,nextFrame:()=>Qs,number:()=>ks,object:()=>Is,options:()=>Z,or:()=>pa,outerHTML:()=>Qu,path:()=>js,percent:()=>F,readFrame:()=>bl,ready:()=>jh,registry:()=>_,removeClass:()=>Lr,reverse:()=>yr,string:()=>Ts,system:()=>Q,time:()=>Ms,triggerIdle:()=>_l,type:()=>Cs,unuseAllThemes:()=>wd,unuseTheme:()=>Pd,useTheme:()=>_d,utils:()=>Vs,viewPortHandler:()=>Ci,whenIdle:()=>xl,writeFrame:()=>ea});var Rs={};N.r(Rs),N.d(Rs,{Axis:()=>Gn,AxisBreak:()=>Un,AxisBullet:()=>tn,AxisDataItem:()=>Ji,AxisFill:()=>qr,AxisFillCircular:()=>bo,AxisLabel:()=>$r,AxisLabelCircular:()=>Jn,AxisLine:()=>po,AxisRenderer:()=>Kn,AxisRendererCircular:()=>_o,AxisRendererRadial:()=>Po,AxisRendererX:()=>Mt,AxisRendererX3D:()=>Eo,AxisRendererY:()=>mt,AxisRendererY3D:()=>Gp,AxisTick:()=>uo,Bullet:()=>It,Candlestick:()=>ir,CandlestickSeries:()=>Bo,CandlestickSeriesDataItem:()=>us,CategoryAxis:()=>Ve,CategoryAxisBreak:()=>go,CategoryAxisDataItem:()=>yo,Chart:()=>ai,ChartDataItem:()=>oo,ChordDiagram:()=>Yp,ChordDiagramDataItem:()=>Xp,ChordLink:()=>Lo,ChordNode:()=>Mo,CircleBullet:()=>lu,ClockHand:()=>Co,Column:()=>hi,Column3D:()=>Ro,ColumnSeries:()=>pi,ColumnSeries3D:()=>ps,ColumnSeries3DDataItem:()=>Kp,ColumnSeriesDataItem:()=>Gt,ConeColumn:()=>Uo,ConeSeries:()=>su,ConeSeriesDataItem:()=>ru,Cursor:()=>Ko,CurvedColumn:()=>Go,CurvedColumnSeries:()=>ou,CurvedColumnSeriesDataItem:()=>au,DateAxis:()=>Pe,DateAxisBreak:()=>co,DateAxisDataItem:()=>fo,DurationAxis:()=>ts,DurationAxisDataItem:()=>Lp,ErrorBullet:()=>hu,FlowDiagram:()=>os,FlowDiagramDataItem:()=>as,FlowDiagramLink:()=>tr,FlowDiagramNode:()=>er,FunnelSeries:()=>Xo,FunnelSeriesDataItem:()=>fs,FunnelSlice:()=>cs,GaugeChart:()=>Ep,GaugeChartDataItem:()=>Od,Grid:()=>Qi,GridCircular:()=>xo,HeatLegend:()=>qp,LabelBullet:()=>ls,Legend:()=>Xn,LegendDataItem:()=>Fp,LegendSettings:()=>lo,LineSeries:()=>is,LineSeriesDataItem:()=>$n,LineSeriesSegment:()=>es,NavigationBar:()=>uu,NavigationBarDataItem:()=>pu,OHLC:()=>ds,OHLCSeries:()=>$p,OHLCSeriesDataItem:()=>Ho,PictorialStackedSeries:()=>nu,PictorialStackedSeriesDataItem:()=>zo,PieChart:()=>To,PieChart3D:()=>Rp,PieChart3DDataItem:()=>Sd,PieChartDataItem:()=>Do,PieSeries:()=>ss,PieSeries3D:()=>Ao,PieSeries3DDataItem:()=>ko,PieSeriesDataItem:()=>rs,PieTick:()=>Io,PyramidSeries:()=>Yo,PyramidSeriesDataItem:()=>gs,RadarChart:()=>wo,RadarChartDataItem:()=>jp,RadarColumn:()=>Wo,RadarColumnSeries:()=>tu,RadarColumnSeriesDataItem:()=>eu,RadarCursor:()=>du,RadarSeries:()=>vo,RadarSeriesDataItem:()=>mo,SankeyDiagram:()=>Wp,SankeyDiagramDataItem:()=>Np,SankeyLink:()=>Fo,SankeyNode:()=>Vo,SerialChart:()=>Zr,SerialChartDataItem:()=>ho,Series:()=>zn,SeriesDataItem:()=>Yn,SlicedChart:()=>Hp,SlicedChartDataItem:()=>Bp,StepLineSeries:()=>Qp,StepLineSeriesDataItem:()=>No,Tick:()=>en,TreeMap:()=>Up,TreeMapDataItem:()=>zp,TreeMapSeries:()=>hs,TreeMapSeriesDataItem:()=>jo,ValueAxis:()=>ee,ValueAxisBreak:()=>Jr,ValueAxisDataItem:()=>Zn,XYChart:()=>Ut,XYChart3D:()=>Zp,XYChart3DDataItem:()=>Dd,XYChartDataItem:()=>Qr,XYChartScrollbar:()=>li,XYCursor:()=>Zo,XYSeries:()=>oi,XYSeriesDataItem:()=>qn});var Bs=function(s,i){return Bs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Bs(s,i)};function w(s,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function e(){this.constructor=s}Bs(s,i),s.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}var ct=function(){return ct=Object.assign||function(s){for(var i,e=1,t=arguments.length;e0&&n[n.length-1])||p[0]!==6&&p[0]!==2)){a=0;continue}if(p[0]===3&&(!n||p[1]>n[0]&&p[1]=s.length&&(s=void 0),{value:s&&s[t++],done:!s}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ti(s,i){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var t,n,r=e.call(s),a=[];try{for(;(i===void 0||i-- >0)&&!(t=r.next()).done;)a.push(t.value)}catch(o){n={error:o}}finally{try{t&&!t.done&&(e=r.return)&&e.call(r)}finally{if(n)throw n.error}}return a}function di(){for(var s=[],i=0;ie&&(s=e),s}function M(s){return V(Math.sin(Ai*s),10)}function Ws(s){return V(Math.tan(Ai*s),10)}function L(s){return V(Math.cos(Ai*s),10)}function q(s,i){return y(s)?y(i)&&i>s?i:s:y(i)?i:null}function ie(s,i){return y(s)?y(i)&&i0)for(var o=0;o<=n;o++){var l=ar(s,i,e,t,o/n);r+=oe(a,l),a=l}return r}function ul(s,i,e,t){var n=oe(i,t),r=oe(s,e);return Math.abs(r/n)}function ln(s,i,e){return y(e)||(e=.5),{x:s.x+(i.x-s.x)*e,y:s.y+(i.y-s.y)*e}}function dl(s,i,e,t){var n=Ee(i,t)-Ee(s,e);return n<0&&(n+=360),n}function Ee(s,i){i||(i={x:2*s.x,y:2*s.y});var e=i.x-s.x,t=i.y-s.y,n=Math.atan2(t,e)*vt;return n<0&&(n+=360),Zt(n)}function bu(s,i,e,t,n){var r=dl(i,e,t,n)-90;r<0&&(r+=360);var a=oe(i,t),o=Math.cos(r)/a+i.x,l=Math.cos(r)/a+i.y;return{x:o-s.x,y:l-s.y}}function Fi(s){if(s){var i=s.length;if(i!==0){for(var e,t=void 0,n=void 0,r=void 0,a=0;an)&&(n=o.x),(!y(t)||o.xr)&&(r=o.y)}return{x:t,y:e,width:n-t,height:r-e}}}return{x:0,y:0,width:0,height:0}}function Mi(s){var i=s.length;if(i!==0){for(var e=void 0,t=void 0,n=void 0,r=void 0,a=0;ae){var t=i;i=e,e=t}s=Zt(s);var n=(i-Zt(i))/360;return se&&(s-360>i?s-=360:s=si+(e-i)/2-180?i:e),s}function xt(s,i,e){var t=Number.MAX_VALUE,n=Number.MAX_VALUE,r=-Number.MAX_VALUE,a=-Number.MAX_VALUE,o=[];y(e)||(e=1),o.push(or(e,s)),o.push(or(e,i));for(var l=Math.min(90*Math.floor(s/90),90*Math.floor(i/90)),h=Math.max(90*Math.ceil(s/90),90*Math.ceil(i/90)),p=l;p<=h;p+=90)p>=s&&p<=i&&o.push(or(e,p));for(var u=0;ur&&(r=d.x),d.y>a&&(a=d.y)}return{x:t,y:n,width:r-t,height:a-n}}function or(s,i){return{x:s*L(i),y:s*M(i)}}function Us(s,i){return s.x>=i.x&&s.x<=i.x+i.width&&s.y>=i.y&&s.y<=i.y+i.height}function xu(s,i,e,t){return{x:((s.x*i.y-i.x*s.y)*(e.x-t.x)-(s.x-i.x)*(e.x*t.y-e.y*t.x))/((s.x-i.x)*(e.y-t.y)-(s.y-i.y)*(e.x-t.x)),y:((s.x*i.y-i.x*s.y)*(e.y-t.y)-(s.y-i.y)*(e.x*t.y-e.y*t.x))/((s.x-i.x)*(e.y-t.y)-(s.y-i.y)*(e.x-t.x))}}function ht(s,i){for(var e=s.length,t=0;t>1,o=i(e,s[a]);o<0?n=a:(o===0&&(r=!0),t=a+1)}return{found:r,index:r?t-1:t}}function pr(s,i){for(var e=s.length,t=0;t0&&this.hasListenersByType(i)&&this._disabled[i]==null},s.prototype.has=function(i,e,t){return pr(this._listeners,function(n){return n.once!==!0&&n.type===i&&(e==null||n.callback===e)&&n.context===t})!==-1},s.prototype._shouldDispatch=function(i){if(this._disposed)throw new Error("EventDispatcher is disposed");var e=this._disabled[i];return y(e)?(e<=1?delete this._disabled[i]:--this._disabled[i],!1):this._enabled},s.prototype._eachListener=function(i){var e=this;++this._iterating;try{j(this._listeners,i)}finally{--this._iterating,this._iterating===0&&this._killed.length!==0&&(j(this._killed,function(t){e._removeListener(t)}),this._killed.length=0)}},s.prototype.dispatchImmediately=function(i,e){this._shouldDispatch(i)&&this._eachListener(function(t){t.killed||t.type!==null&&t.type!==i||t.dispatch(i,e)})},s.prototype.dispatch=function(i,e){this._shouldDispatch(i)&&this._eachListener(function(t){t.killed||t.type!==null&&t.type!==i||xl(function(){t.killed||t.dispatch(i,e)})})},s.prototype._on=function(i,e,t,n,r,a){var o=this;if(this._disposed)throw new Error("EventDispatcher is disposed");this._removeExistingListener(i,e,t,n);var l={type:e,callback:t,context:n,shouldClone:r,dispatch:a,killed:!1,once:i,disposer:new le(function(){l.killed=!0,o._removeListener(l)})};return this._listeners.push(l),l},s.prototype.onAll=function(i,e,t){return t===void 0&&(t=!0),this._on(!1,null,i,e,t,function(n,r){return i.call(e,n,r)}).disposer},s.prototype.on=function(i,e,t,n){return n===void 0&&(n=!0),this._on(!1,i,e,t,n,function(r,a){return e.call(t,a)}).disposer},s.prototype.once=function(i,e,t,n){n===void 0&&(n=!0);var r=this._on(!0,i,e,t,n,function(a,o){r.disposer.dispose(),e.call(t,o)});return r.disposer},s.prototype.off=function(i,e,t){this._removeExistingListener(!1,i,e,t)},s.prototype.copyFrom=function(i){var e=this;if(this._disposed)throw new Error("EventDispatcher is disposed");if(i===this)throw new Error("Cannot copyFrom the same TargetedEventDispatcher");j(i._listeners,function(t){!t.killed&&t.shouldClone&&(t.type===null?e.onAll(t.callback,t.context):t.once?e.once(t.type,t.callback,t.context):e.on(t.type,t.callback,t.context))})},s}(),ta=function(s){function i(e){var t=s.call(this)||this;return t.target=e,t}return w(i,s),i.prototype.copyFrom=function(e){var t=this;if(this._disposed)throw new Error("EventDispatcher is disposed");if(e===this)throw new Error("Cannot copyFrom the same TargetedEventDispatcher");j(e._listeners,function(n){n.context!==e.target&&!n.killed&&n.shouldClone&&(n.type===null?t.onAll(n.callback,n.context):n.once?t.once(n.type,n.callback,n.context):t.on(n.type,n.callback,n.context))})},i}(Bt);function Pl(s){return function(i){for(var e in s)if(_t(s,e)&&!i([e,s[e]]))break}}function ia(s){var i=[];for(var e in s)_t(s,e)&&i.push(e);return i}function wl(s,i){return ia(s).sort(i)}function _t(s,i){return{}.hasOwnProperty.call(s,i)}function Du(s,i){return s[i]}function na(s,i){for(var e in s)if(_t(s,e)&&!i(e,s[e]))break}function X(s,i){na(s,function(e,t){return i(e,t),!0})}function At(s,i,e){j(wl(s,e),function(t){i(t,s[t])})}function Tu(s){return Object.assign({},s)}function dr(s,i){return Object.assign({},s,i)}function Cl(s){return JSON.parse(JSON.stringify(s))}function De(s,i,e){j(e,function(t){v(s[t])&&(i[t]=s[t])})}function ku(s,i,e){j(e,function(t){v(s[t])&&!v(i[t])&&(i[t]=s[t])})}function Ol(s,i,e){j(e,function(t){i[t]=s[t]})}function Ei(s,i){De(s,i,ia(s))}function qt(s){return function(i){for(var e=s.length,t=0;ts?i:s}function Al(s){return sa(s,null,Lu)}function Vl(s,i){i===void 0&&(i="");var e=!0,t="";return s(function(n){return e?e=!1:t+=i,t+=n,!0}),t}var fn=function(){function s(i,e){this.createNewItems=!1,this.list=i,this._create=e,this.reset()}return s.prototype.reset=function(){this._listCopy=Ri(this.list.iterator())},s.prototype.clear=function(){this._listCopy.length=0},s.prototype.getFirst=function(){return this.returnItem(0)},s.prototype.getLast=function(){return this.returnItem(this._listCopy.length-1)},s.prototype.find=function(i){var e=pr(this._listCopy,i);if(e!==-1){var t=this._listCopy[e];return z(this._listCopy,t),t}return this.getLast()},s.prototype.removeItem=function(i){return z(this._listCopy,i)},s.prototype.returnItem=function(i){if(i>=0&&i=i._end&&e(i._array[t]);--t);}},s.prototype.backwards=function(){return new s(this._array,this._end,this._start)},s.prototype.range=function(i,e){if(i<=e){if(this._start===this._end)return this;if(this._start=0&&s=0&&i0);if(a>=o)return o;this.swap(a,o)}},s.prototype.sort=function(i){this._sortQuicksort(0,this._values.length-1,i)},s.prototype.swap=function(i,e){var t=this._values.length;if(gn(i,t),gn(e,t),i!==e){var n=this._values[i],r=this._values[e];this._values[i]=r,this.events.isEnabled("setIndex")&&this.events.dispatchImmediately("setIndex",{type:"setIndex",target:this,index:i,oldValue:n,newValue:r}),this._values[e]=n,this.events.isEnabled("setIndex")&&this.events.dispatchImmediately("setIndex",{type:"setIndex",target:this,index:e,oldValue:r,newValue:n})}},s.prototype.removeIndex=function(i){gn(i,this._values.length);var e=this._values[i];return gi(this._values,i),this.events.isEnabled("removeIndex")&&this.events.dispatchImmediately("removeIndex",{type:"removeIndex",target:this,index:i,oldValue:e}),this.events.isEnabled("removed")&&this.events.dispatchImmediately("removed",{type:"removed",target:this,oldValue:e}),e},s.prototype.moveValue=function(i,e){var t=this.indexOf(i);if(t!==-1){var n=this._values[t];gi(this._values,t),this.events.isEnabled("removeIndex")&&this.events.dispatchImmediately("removeIndex",{type:"removeIndex",target:this,index:t,oldValue:n})}e==null?(e=this._values.length,this._values.push(i)):fi(this._values,e,i),this.events.isEnabled("insertIndex")&&this.events.dispatchImmediately("insertIndex",{type:"insertIndex",target:this,index:e,newValue:i}),t===-1&&this.events.isEnabled("inserted")&&this.events.dispatchImmediately("inserted",{type:"inserted",target:this,newValue:i})},s.prototype.push=function(i){var e=this._values.push(i)-1;return this.events.isEnabled("insertIndex")&&this.events.dispatchImmediately("insertIndex",{type:"insertIndex",target:this,index:e,newValue:i}),this.events.isEnabled("inserted")&&this.events.dispatchImmediately("inserted",{type:"inserted",target:this,newValue:i}),i},s.prototype.unshift=function(i){this.insertIndex(0,i)},s.prototype.pushAll=function(i){var e=this;j(i,function(t){e.push(t)})},s.prototype.copyFrom=function(i){this.pushAll(i._values)},s.prototype.pop=function(){return this._values.length-1<0?void 0:this.removeIndex(this._values.length-1)},s.prototype.shift=function(){return this._values.length?this.removeIndex(0):void 0},s.prototype.setAll=function(i){var e=this,t=ji(this._values);this._values.length=0,j(i,function(n){e._values.push(n)}),this.events.isEnabled("setAll")&&this.events.dispatchImmediately("setAll",{type:"setAll",target:this,oldArray:t,newArray:this._values}),this.events.isEnabled("removed")&&j(t,function(n){e.events.dispatchImmediately("removed",{type:"removed",target:e,oldValue:n})}),this.events.isEnabled("inserted")&&j(this._values,function(n){e.events.dispatchImmediately("inserted",{type:"inserted",target:e,newValue:n})})},s.prototype.clear=function(){this.setAll([])},s.prototype.iterator=function(){return qt(this._values)},s.prototype[Symbol.iterator]=function(){var i,e;return pe(this,function(t){switch(t.label){case 0:i=this._values.length,e=0,t.label=1;case 1:return ep)&&(a=o,n=h,r=p)}else t==="left"&&h=i&&(!v(n)||n>=h)&&(a=o,n=h);return++o,!0}),a===-1&&(t==="left"?a=0:t==="right"&&(a=this.length-1)),a},s.prototype.iterator=function(){return qt(this._values)},s.prototype[Symbol.iterator]=function(){var i,e;return pe(this,function(t){switch(t.label){case 0:i=this._values.length,e=0,t.label=1;case 1:return e0)for(var r=0;r0?255-s:s;return Math.round(e*i)}function zl(s,i){if(s){var e=vn(Math.min(Math.max(s.r,s.g,s.b),230),i);return{r:Math.max(0,Math.min(255,Math.round(s.r+e))),g:Math.max(0,Math.min(255,Math.round(s.g+e))),b:Math.max(0,Math.min(255,Math.round(s.b+e))),a:s.a}}return s}function Eu(s,i){return Math.round(255*i)}function Ul(s,i){if(s==null||i==1)return s;var e=bn(s);return e.s=i,ua(e)}function ua(s){var i,e,t,n=s.h,r=s.s,a=s.l;if(r==0)i=e=t=a;else{var o=function(p,u,d){return d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?p+6*(u-p)*d:d<.5?u:d<.6666666666666666?p+(u-p)*(.6666666666666666-d)*6:p},l=a<.5?a*(1+r):a+r-a*r,h=2*a-l;i=o(h,l,n+1/3),e=o(h,l,n),t=o(h,l,n-1/3)}return{r:Math.round(255*i),g:Math.round(255*e),b:Math.round(255*t)}}function bn(s){var i=s.r/255,e=s.g/255,t=s.b/255,n=Math.max(i,e,t),r=Math.min(i,e,t),a=0,o=0,l=(n+r)/2;if(n===r)a=o=0;else{var h=n-r;switch(o=l>.5?h/(2-n-r):h/(n+r),n){case i:a=(e-t)/h+(e=128}var se=function(){function s(i){this._value=i}return Object.defineProperty(s.prototype,"rgb",{get:function(){return this._value},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hex",{get:function(){return this._value?Wl(this._value):"none"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rgba",{get:function(){return this._value?Xl(this._value):"none"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"alpha",{get:function(){return this._value!=null&&this._value.a!=null?this._value.a:1},set:function(i){this._value&&(this._value.a=i)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"lightColor",{get:function(){return this._lightColor||(this._lightColor=new s({r:255,g:255,b:255})),this._lightColor},set:function(i){this._lightColor=i},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"darkColor",{get:function(){return this._darkColor||(this._darkColor=new s({r:0,g:0,b:0})),this._darkColor},set:function(i){this._darkColor=i},enumerable:!0,configurable:!0}),s.prototype.toString=function(){return this.alpha<1?this.rgba:this.hex},s.prototype.lighten=function(i){return new s(Yl(this.rgb,i))},s.prototype.brighten=function(i){return new s(zl(this.rgb,i))},s.prototype.saturate=function(i){return new s(Ul(this.rgb,i))},Object.defineProperty(s.prototype,"alternative",{get:function(){if(this.rgb!=null)return Gl(this.rgb)?this.darkColor:this.lightColor;throw new Error("Color does not exist")},enumerable:!0,configurable:!0}),s}();function B(s,i){if(!v(s))return new se(void 0);if(typeof s=="string"){var e="_color_"+s+"_"+(i||"1"),t=_.getCache(e);if(t)return new se({r:t.r,g:t.g,b:t.b,a:t.a});var n=Rl(s,i);return _.setCache(e,n),new se(n)}return s instanceof se?(v(i)&&(s.alpha=i),s):new se(s)}function Kl(s){return s instanceof se}function Zl(s){return B(s)}function ft(s){return v(s)&&!Kl(s)?Zl(s):s}var Ke=function(){function s(){this._disposed=!1,this._disposers=[],this.className="BaseObject"}return s.prototype.debug=function(){},Object.defineProperty(s.prototype,"uid",{get:function(){return this._uid||(this._uid=_.getUniqueId(),_.map.setKey(this._uid,this)),this._uid},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"id",{get:function(){return this._id},set:function(i){this._id=i},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"map",{get:function(){return this._map||(this._map=new me),this._map},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"delayedMap",{get:function(){return this._delayedMap||(this._delayedMap=new me),this._delayedMap},enumerable:!0,configurable:!0}),s.prototype.addDelayedMap=function(i,e){var t=this.delayedMap;t.hasKey(e)||t.setKey(e,[]),t.getKey(e).push({property:i,target:this})},s.prototype.processDelayedMap=function(){var i=this;this.delayedMap.each(function(e,t){if(i.map.hasKey(e)){var n=i.map.getKey(e);j(t,function(r){r.target[r.property]=n}),i.delayedMap.removeKey(e)}})},s.prototype.applyTheme=function(){var i=this;if(_){var e=this.getCurrentThemes();e&&j(e,function(t,n){t(i)})}},Object.defineProperty(s.prototype,"themes",{get:function(){return this._themes},set:function(i){this._themes=i},enumerable:!0,configurable:!0}),s.prototype.getCurrentThemes=function(){return this.themes||_.themes},s.prototype.isDisposed=function(){return this._disposed},s.prototype.dispose=function(){if(!this._disposed){this._disposed=!0;var i=this._disposers;for(this._disposers=null;i.length!==0;)i.shift().dispose();this.clearCache(),this.clonedFrom&&this.clonedFrom.clones.removeValue(this);var e=this._uid;e!=null&&_.map.removeKey(e)}},s.prototype.addDisposer=function(i){this._disposers.push(i)},s.prototype.removeDispose=function(i){if(!this._disposed){var e=ht(this._disposers,i);e>-1&&this._disposers.splice(e,1)}i.dispose()},s.prototype.clone=function(i){i||(i="clone-"+_.getUniqueId());var e=new this.constructor;return e.cloneId=i,e.copyFrom(this),e},Object.defineProperty(s.prototype,"clones",{get:function(){return this._clones||(this._clones=new re),this._clones},enumerable:!0,configurable:!0}),s.prototype.copyFrom=function(i){i.clones.push(this),this.clonedFrom=i},Object.defineProperty(s.prototype,"className",{get:function(){return this._className},set:function(i){this._className=i},enumerable:!0,configurable:!0}),s.prototype.setCache=function(i,e,t){Hi.set(this.uid,i,e,t)},s.prototype.getCache=function(i,e){return e===void 0&&(e=void 0),Hi.get(this.uid,i,e)},s.prototype.clearCache=function(){Hi.clear(this.uid)},s.prototype.setTimeout=function(i,e){var t=this,n=setTimeout(function(){t.removeDispose(r),i()},e),r=new le(function(){clearTimeout(n)});return this._disposers.push(r),r},s.prototype.setInterval=function(i,e){var t=this,n=setInterval(function(){t.removeDispose(r),i()},e),r=new le(function(){clearTimeout(n)});return this._disposers.push(r),r},Object.defineProperty(s.prototype,"config",{set:function(i){try{this.processConfig(i)}catch(e){this.raiseCriticalError(e)}},enumerable:!0,configurable:!0}),s.prototype.processConfig=function(i){var e=this;if(i){var t=this;if(At(i,function(r,a){var o,l=a;if(r=="callback"&&typeof a=="function"&&a.call(t),e.hasProperty(r))if(!ye(l)||!v(l.type)||ye(t[r])&&v(t[r].className)&&!l.forceCreate&&t[r].className==l.type||e.asIs(r)?o=t[r]:(o=e.createClassInstance(l.type))?t[r]=o:o=t[r],o instanceof it)e.processAdapters(o,l);else if(o instanceof Bt)e.processEvents(o,l);else if(r=="locale"&&J(l))window["am4lang_"+l]&&(t[r]=window["am4lang_"+l]);else if(r=="parent"&&J(l)){var h=e.map.getKey(l);h?t[r]=h:e.addDelayedMap("parent",l)}else if(e.asIs(r))t[r]=l;else if(e.asFunction(r)&&J(l)){if(!v(_.registeredClasses[l]))throw Error("Invalid easing function: "+l);t[r]=_.registeredClasses[l]}else if(l instanceof s)t[r]=l;else if(o instanceof s)o.config=l;else if(o instanceof Oe||o instanceof yn||o instanceof ha){if(Ae(l))o instanceof Oe?e.processListTemplate(l,o):e.processOrderedTemplate(l,o);else if(ye(l))if(l instanceof s)o.template=l;else{var p;p=v(l.template)?l.template:l,o.template instanceof s?o.template.config=p:X(p,function(u,d){var c=o.template[u];c instanceof it?e.processAdapters(c,d):c instanceof Bt?e.processEvents(c,d):c instanceof Bi?e.processDictionaryTemplate(c,d):o.template[u]instanceof s?o.template[u].config=d:ye(d)&&v(d.type)?(c=e.createClassInstance(d.type))?(c instanceof s&&(c.config=d),o.template[u]=c):o.template[u]=d:c instanceof re?e.processList(d,c):o.template[u]=e.maybeColorOrPercent(d)}),v(l.values)&&(o instanceof Oe?e.processListTemplate(l.values,o):e.processOrderedTemplate(l.values,o))}}else o instanceof re?r=="children"?e.processList(l,o,e):e.processList(l,o):o instanceof Bi?e.processDictionaryTemplate(o,l):o instanceof me?e.processDictionary(o,l):o instanceof se||o instanceof te?t[r]=e.maybeColorOrPercent(l):ye(o)&&ye(l)?Ei(l,o):(l=e.maybeColorOrPercent(l),t[r]=l);else e.isReserved(r)||(t[r]=l)},this.configOrder),this.processingErrors.length){var n=this.processingErrors.join(` `);throw this._processingErrors=[],Error(n)}}},s.prototype.maybeColorOrPercent=function(i){if(J(i)){if(i.match(/^[\-]?[0-9.]+\%$/))return F(ce(i));if(i.match(/^\#[0-9abcdef]{3,}$/i))return B(i)}return i},s.prototype.processAdapters=function(i,e){var t=this;Ae(e)?j(e,function(n,r){i.add(n.key,n.callback,n.priority||0,t)}):ye(e)&&X(e,function(n,r){i.has(n,r)||i.add(n,r)})},s.prototype.processEvents=function(i,e){var t=this;Ae(e)?j(e,function(n,r){i.on(n.type,n.callback,t)}):ye(e)&&X(e,function(n,r){i.has(n,r)||i.on(n,r)})},s.prototype.processDictionaryTemplate=function(i,e){ye(e)&&X(e,function(t,n){var r;(r=t=="template"?i.template:i.hasKey(t)?i.getKey(t):i.create(t))instanceof s?r.config=n:ye(r)&&ye(n)?Ei(n,r):r.setKey(t,n)})},s.prototype.processDictionary=function(i,e){ye(e)&&X(e,function(t,n){i.setKey(t,n)})},s.prototype.processListTemplate=function(i,e){var t=this;for(j(i,function(n,r){var a,o=t.getConfigEntryType(n);if(e.hasIndex(r)&&!n.forceCreate)a=e.getIndex(r);else{if(n instanceof s)return void e.push(n);a=o?e.create(o):e.create()}n===a||ye(n)&&(a instanceof s?a.config=n:ye(a)&&ye(n)?Ei(n,a):e.setIndex(e.indexOf(a),n))});i.length>e.length;)e.pop()},s.prototype.processOrderedTemplate=function(i,e){var t=this;j(i,function(n,r){var a,o=t.getConfigEntryType(n);a=o?e.create(o):e.create(),ye(n)&&(a instanceof s?a.config=n:ye(a)&&ye(n)?Ei(n,a):e.insert(n))})},s.prototype.processList=function(i,e,t){var n=this;Ae(i)||(i=[i]);var r=e.length,a=0;for(j(i,function(o,l){if(ye(o)){var h=void 0;if(li&&(e!==!0||n!=0)){if(t&&(h=wr(h)),d=h.match(new RegExp(".{1,"+i+"}","g"))){if(t)for(var u=0;ui&&r[a]!==""&&(r.push(""),a++),r[a]+=h;a=r.length-1}}}else{var d;if(d=s.match(new RegExp(".{1,"+i+"}","g"))){if(t)for(u=0;ui&&(r=[]),r}function Pr(s,i,e,t,n){return s.length<=i?s:((i-=e.length)<1&&(i=1),(_r(s,i,t,n)[0]||"")+e)}function ga(s){return s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function Jl(s){return s.replace(/[\s\uFEFF\xA0]+$/g,"")}function Ql(s){return s.replace(/^[\s\uFEFF\xA0]+/g,"")}function wr(s){return s.split("").reverse().join("")}function zu(s){var i=s.trim();return(i=s.replace(/^'(.*)'$/,"$1"))==s&&(i=s.replace(/^"(.*)"$/,"$1")),i}function ze(s,i,e){return i===void 0&&(i=0),e===void 0&&(e="0"),typeof s!="string"&&(s=s.toString()),i>s.length?Array(i-s.length+1).join(e)+s:s}function eh(s){if(s===void 0)return da;var i=(s=(s=(s=s.toLowerCase().replace(/^\[[^\]]*\]/,"")).replace(/\[[^\]]+\]/,"")).trim()).match(/\/(date|number|duration)$/);return i?i[1]:s===xn?xn:s===_n?_n:s===br?br:s.match(/[#0]/)?xn:s.match(/[ymwdhnsqaxkzgtei]/)?_n:da}function Cn(s){return s.replace(/\/(date|number|duration)$/i,"")}function ya(s){return s&&s.replace(/<[^>]*>/g,"")}function Cr(s){return s&&ya((""+s).replace(/[\n\r]+/g,". "))}function th(s){if(Fe(s))return"NaN";if(s===1/0)return"Infinity";if(s===-1/0)return"-Infinity";if(s===0&&1/s==-1/0)return"-0";var i=s<0;s=Math.abs(s);var e,t=be(/^([0-9]+)(?:\.([0-9]+))?(?:e[\+\-]([0-9]+))?$/.exec(""+s)),n=t[1],r=t[2]||"";if(t[3]==null)e=r===""?n:n+"."+r;else{var a,o=+t[3];e=s<1?"0."+aa("0",a=o-1)+n+r:(a=o-r.length)==0?n+r:a<0?n+r.slice(0,a)+"."+r.slice(a):n+r+aa("0",a)}return i?"-"+e:e}function ma(s){if(ki(s)){var i=new Date(s);return i.setMilliseconds(s.getMilliseconds()),i}if(y(s))return new Date(s);var e=Number(s);return y(e)?new Date(e):new Date(s)}function Or(s){if(ki(s))return s.getTime();if(y(s))return s;if(J(s)){var i=Number(s);return y(i)?i:void 0}}function va(s,i){var e=new Date(s.getFullYear(),0,0),t=s.getTime()-e.getTime()+60*(e.getTimezoneOffset()-s.getTimezoneOffset())*1e3;return Math.floor(t/864e5)}function Wi(s,i){var e=new Date(Date.UTC(s.getFullYear(),s.getMonth(),s.getDate())),t=e.getUTCDay()||7;e.setUTCDate(e.getUTCDate()+4-t);var n=new Date(Date.UTC(e.getUTCFullYear(),0,1));return Math.ceil(((e.getTime()-n.getTime())/864e5+1)/7)}function ih(s,i){var e=Wi(new Date(s.getFullYear(),s.getMonth(),1)),t=Wi(s);return t==1&&(t=53),t-e+1}function nh(s,i,e,t){e===void 0&&(e=1),t===void 0&&(t=!1);var n=new Date(i,0,4,0,0,0,0);return t&&n.setUTCFullYear(i),7*s+e-((n.getDay()||7)+3)}function On(s,i){return s>12?s-=12:s===0&&(s=12),v(i)?s+(i-1):s}function Sn(s,i,e,t){if(i===void 0&&(i=!1),e===void 0&&(e=!1),t===void 0&&(t=!1),t)return i?"Coordinated Universal Time":"UTC";var n=s.toLocaleString("UTC"),r=s.toLocaleString("UTC",{timeZoneName:i?"long":"short"}).substr(n.length);return e===!1&&(r=r.replace(/ (standard|daylight|summer|winter) /i," ")),r}function Uu(s,i){return Math.floor(Math.random()*(i-s))+s}function Sr(s,i,e){return s>e?e:se||s1&&n.pop(),yl(n,r),e.path=n.join("/"),e.path!==""&&e.path[0]!=="/")throw new Error("URL path must start with /")}return e.query=t.query,e.hash=t.hash,_a(e)}return _a(t)}function Xi(){return!!window.MSInputMethodContext&&!!document.documentMode}function Pa(s){return+s}function lh(s){return s*s}function hh(s){return s*(2-s)}function ph(s){return((s*=2)<=1?s*s:--s*(2-s)+1)/2}function wa(s,i){return Math.pow(s,i)}function Ca(s,i){return 1-Math.pow(1-s,i)}function Oa(s,i){return((s*=2)<=1?Math.pow(s,i):2-Math.pow(2-s,i))/2}function uh(s){return wa(s,3)}function Ar(s){return Ca(s,3)}function dh(s){return Oa(s,3)}function ch(s){return Math.pow(2,10*s-10)}function fh(s){return 1-Math.pow(2,-10*s)}function gh(s){return((s*=2)<=1?Math.pow(2,10*s-10):2-Math.pow(2,10-10*s))/2}function yh(s){return 1-Math.cos(s*Hs)}function Sa(s){return Math.sin(s*Hs)}function mh(s){return(1-Math.cos(an*s))/2}function Ia(s){return s*s*s}function Qt(s){return--s*s*s+1}function vh(s){return((s*=2)<=1?s*s*s:(s-=2)*s*s+2)/2}function bh(s){return 1-Math.sqrt(1-s*s)}function xh(s){return Math.sqrt(1- --s*s)}function _h(s){return((s*=2)<=1?1-Math.sqrt(1-s*s):Math.sqrt(1-(s-=2)*s)+1)/2}_.registeredClasses["ease.linear"]=Pa,_.registeredClasses["ease.quadIn"]=lh,_.registeredClasses["ease.quadOut"]=hh,_.registeredClasses["ease.quadInOut"]=ph,_.registeredClasses["ease.polyIn"]=wa,_.registeredClasses["ease.polyOut"]=Ca,_.registeredClasses["ease.polyInOut"]=Oa,_.registeredClasses["ease.polyIn3"]=uh,_.registeredClasses["ease.polyOut3"]=Ar,_.registeredClasses["ease.polyInOut3"]=dh,_.registeredClasses["ease.expIn"]=ch,_.registeredClasses["ease.expOut"]=fh,_.registeredClasses["ease.expInOut"]=gh,_.registeredClasses["ease.sinIn"]=yh,_.registeredClasses["ease.sinOut"]=Sa,_.registeredClasses["ease.sinInOut"]=mh,_.registeredClasses["ease.cubicIn"]=Ia,_.registeredClasses["ease.cubicOut"]=Qt,_.registeredClasses["ease.cubicInOut"]=vh,_.registeredClasses["ease.circleIn"]=bh,_.registeredClasses["ease.circleOut"]=xh,_.registeredClasses["ease.circleInOut"]=_h;var Vr=7.5625;function Ph(s){return 1-In(1-s)}function In(s){return(s=+s)<.36363636363636365?Vr*s*s:s<.7272727272727273?Vr*(s-=.5454545454545454)*s+.75:s<.9090909090909091?Vr*(s-=.8181818181818182)*s+.9375:Vr*(s-=.9545454545454546)*s+.984375}function wh(s){return((s*=2)<=1?1-In(1-s):In(s-1)+1)/2}_.registeredClasses["ease.bounceIn"]=Ph,_.registeredClasses["ease.bounceOut"]=In,_.registeredClasses["ease.bounceInOut"]=wh;var Dn=.3/(2*Math.PI),Fr=Math.asin(1)*Dn;function Ch(s){return 1*Math.pow(2,10*--s)*Math.sin((Fr-s)/Dn)}function Oh(s){return 1-1*Math.pow(2,-10*(s=+s))*Math.sin((s+Fr)/Dn)}function Sh(s){return((s=2*s-1)<0?1*Math.pow(2,10*s)*Math.sin((Fr-s)/Dn):2-1*Math.pow(2,-10*s)*Math.sin((Fr+s)/Dn))/2}_.registeredClasses["ease.elasticIn"]=Ch,_.registeredClasses["ease.elasticOut"]=Oh,_.registeredClasses["ease.elasticInOut"]=Sh;var Tn=function(s){function i(){var e=s.call(this)||this;return e.transitionDuration=0,e.transitionEasing=Qt,e.properties={},e.propertyFields={},e.filters=new re,e.isTemplate=!1,e.className="SpriteState",e._disposers.push(new fe(e.filters)),e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"adapter",{get:function(){var e=this;return this._adapterO||(this._adapterO=new it(this),this._adapterO.events.on("inserted",function(t){e[t.newValue.key]=e[t.newValue.key]},void 0,!1),this._adapterO.events.on("removed",function(t){e[t.newValue.key]=e[t.newValue.key]},void 0,!1)),this._adapterO},enumerable:!0,configurable:!0}),i.prototype.getPropertyValue=function(e){var t=this.properties[e],n=this.sprite;if(n){var r=this.propertyFields[e];if(v(r)&&(n.dataItem&&(t=n.dataItem.dataContext[r]),t==null&&(t="__unset")),v(t))this._adapterO&&(t=this._adapterO.apply(e,t));else{var a=n.getPropertyValue(e);(t=this._adapterO?this._adapterO.apply(e,a):a)==a&&(t=void 0)}}return t},i.prototype.copyFrom=function(e){e&&e!=this&&(this.transitionDuration=e.transitionDuration,this.transitionEasing=e.transitionEasing,Vt(e.properties,this.properties),Vt(e.propertyFields,this.propertyFields),this.filters.copyFrom(e.filters),e._adapterO&&this.adapter.copyFrom(e._adapterO))},Object.defineProperty(i.prototype,"allValues",{get:function(){var e=this,t={};return X(this.properties,function(n,r){t[n]=e.getPropertyValue(n)}),this._adapterO&&X(this._adapterO.keys(),function(n,r){var a=e.getPropertyValue(r);t[r]=a}),X(this.propertyFields,function(n){var r=e.getPropertyValue(n);t[n]=r}),t},enumerable:!0,configurable:!0}),i.prototype.reset=function(){this.properties={},this.filters.clear()},i.prototype.processConfig=function(e){v(e)&&v(e.properties)&&X(e.properties,function(t,n){J(n)&&(n.match(/^[0-9.\-]+\%$/)?e.properties[t]=F(ce(n)):n.match(/^\#[0-9abcdef]{3,}$/i)&&(e.properties[t]=ft(n)))}),s.prototype.processConfig.call(this,e)},i.prototype.asFunction=function(e){return e=="transitionEasing"||s.prototype.asIs.call(this,e)},i}(Ke);_.registeredClasses.SpriteState=Tn;var Ih=function(s){function i(){var e=s!==null&&s.apply(this,arguments)||this;return e._interactionEvents=new me,e}return w(i,s),i.prototype._dispatchSpriteEvent=function(e){if(!this.target.disabled&&!this.target.isTemplate&&this.target.events.isEnabled(e.type)){var t=dr(e,{target:this.target});this.target.events.dispatchImmediately(t.type,t)}},i.prototype._dispatchSpritePointEvent=function(e){if(!this.target.disabled&&!this.target.isTemplate&&this.target.events.isEnabled(e.type)){var t=dr(e,{target:this.target,spritePoint:e.point?vi(e.point,this.target):void 0,svgPoint:this.target.getSvgPoint(e.point)});this.target.events.dispatchImmediately(t.type,t)}},i.prototype._addInteractionObjectEvent=function(e,t,n,r){var a=this,o=r+"-"+e;return this._interactionEvents.insertKeyIfEmpty(o,function(){var l=a.target.interactions.events.on(e,t,n,r);return new un(function(){a._interactionEvents.removeKey(o),l.dispose()})}).increment()},i.prototype._on=function(e,t,n,r,a,o){var l=s.prototype._on.call(this,e,t,n,r,a,o),h=[l.disposer];switch(t){case"hit":case"track":case"doublehit":case"wheel":case"wheelup":case"wheeldown":case"wheelleft":case"wheelright":h.push(this._addInteractionObjectEvent(t,this._dispatchSpritePointEvent,this,a));break;case"rightclick":case"down":case"up":case"drag":case"dragged":case"dragstart":case"dragstop":case"over":case"out":case"swipe":case"swipeleft":case"swiperight":case"resize":case"focus":case"blur":case"toggled":h.push(this._addInteractionObjectEvent(t,this._dispatchSpriteEvent,this,a))}switch(t){case"hit":case"doublehit":case"rightclick":case"down":case"up":this.target.clickable=!0;break;case"toggled":this.target.togglable=!0;break;case"drag":case"dragstart":case"dragstop":this.target.draggable=!0;break;case"track":this.target.trackable=!0;break;case"resize":this.target.resizable=!0;break;case"swipe":case"swipeleft":case"swiperight":this.target.swipeable=!0;break;case"wheel":case"wheelup":case"wheeldown":case"wheelleft":case"wheelright":this.target.wheelable=!0;break;case"over":this.target.hoverable=!0;case"out":this.target.hoverable=!0;break;case"focus":case"blur":this.target.focusable=!0}return l.disposer=new _e(h),l},i}(ta),Dh=function(){function s(){}return s.opacity=1,s.strokeOpacity=1,s.strokeWidth=1,s.fillOpacity=1,s.fill=B("#000000"),s.stroke=B("#000000"),s.focusable=void 0,s.tabindex=0,s}(),Z={verbose:!0,commercialLicense:!1,classNamePrefix:"amcharts-",autoSetClassName:!1,minPolylineStep:.5,onlyShowOnViewport:!1,queue:!1,autoDispose:!1,licenses:[],suppressErrors:!1,suppressWarnings:!1,animationsEnabled:!0,nonce:"",deferredDelay:100,disableHoverOnTransform:"never",pixelPerfectPrecision:0};function Zu(s,i){var e=!1,t=Date.now();return Qs(function n(r){if(!e){var a=r-t;a>=s?i(1):(Qs(n),i(a/s))}}),new le(function(){e=!0})}function Th(s,i,e){return i+(e-i)*s}function qu(s,i,e){return new te(Th(s,i.percent,e.percent))}function $u(s,i,e){var t=new se(mn(i.rgb,e.rgb,s));return i.alpha!=e.alpha&&(t.alpha=i.alpha+(e.alpha-i.alpha)*s),t}function kh(s,i){return i+s.charAt(0).toUpperCase()+s.substr(1)}var Da,Yi=function(){function s(i){this._disposer=new le(function(){for(;i.length!==0;)i[0].dispose()})}return s.prototype.isDisposed=function(){return this._disposer.isDisposed()},s.prototype.dispose=function(){this._disposer.dispose()},s}(),gt=function(s){function i(e,t,n,r){var a=s.call(this)||this;return a.duration=0,a.easing=Pa,a.progress=0,a._loop=0,a._pause=!1,a._delayTimeout=null,a._time=0,a._isFinished=!1,a.className="Animation",Z.animationsEnabled===!1&&(n=0),a.object=e,a.animationOptions=Gs(t),a.duration=n,r&&(a.easing=r),a.applyTheme(),a}return w(i,s),i.prototype.debug=function(){},i.prototype.dispose=function(){s.prototype.dispose.call(this),this.pause()},i.prototype.delay=function(e){var t=this;if(e>0){this.pause(),pt(this.object.animations,this);var n=setTimeout(function(){t._delayTimeout=null,t.start()},e);this._delayTimeout=new le(function(){clearTimeout(n)})}return this},i.prototype._start=function(){this._isFinished=!1,this._delayTimeout&&(this.removeDispose(this._delayTimeout),this._delayTimeout=null),this.stopSameAnimations(),this._pause=!1,pt(Q.animations,this),pt(this.object.animations,this),Q.requestFrame()},i.prototype.start=function(){this._start(),this._startTime=Date.now(),this._time=0,this.staticOptions=[];for(var e=this.animationOptions.length-1;e>=0;e--){var t=this.animationOptions[e];if(v(t.from)||(t.childObject?t.from=t.childObject[t.property]:(t.from=this.object[t.property],v(t.from)||(t.from=Dh[t.property]))),t.from==t.to)z(this.animationOptions,t);else if(!v(t.from)||!(t.from instanceof te)&&t.to instanceof te||t.from instanceof te&&!(t.to instanceof te))this.staticOptions.push(t),z(this.animationOptions,t);else if(y(t.to))if(t.updateMethod=Th,t.from instanceof te){var n=this.object[kh(t.property,"pixel")];isNaN(n)?(this.staticOptions.push(t),z(this.animationOptions,t)):t.from=n}else isNaN(t.from)&&(this.staticOptions.push(t),z(this.animationOptions,t));else t.to instanceof se?t.from?t.updateMethod=$u:(this.staticOptions.push(t),z(this.animationOptions,t)):t.to instanceof te?(t.updateMethod=qu,isNaN(t.from)||(n=this.object[kh(t.property,"relative")],isNaN(n)||(t.from=F(100*n)))):(this.staticOptions.push(t),z(this.animationOptions,t))}if(this.applyStaticOptions(),this.events.isEnabled("animationstarted")){var r={type:"animationstarted",target:this,progress:this.progress};this.events.dispatchImmediately("animationstarted",r)}return this.update(),this.duration===0&&this.end(),this},i.prototype.loop=function(e){return y(e)||(e=1/0),this._loop=e,this},i.prototype.pause=function(){return this._pause=!0,this._delayTimeout&&(this.removeDispose(this._delayTimeout),this._delayTimeout=null),z(Q.animations,this),z(this.object.animations,this),this},i.prototype.resume=function(){return this._start(),this._startTime=Date.now()-this._time,this},i.prototype.end=function(){if(this._loop==0&&this.pause(),this.setProgress(1),this.applyStaticOptions(),this.events.isEnabled("animationended")){var e={type:"animationended",target:this,progress:this.progress};this.events.dispatchImmediately("animationended",e)}return this._loop>0?(this._loop--,this.start()):(this.stop(),this._isFinished=!0),this},i.prototype.kill=function(){this.pause(),this._isFinished=!0},i.prototype.isFinished=function(){return this._isFinished},i.prototype.applyStaticOptions=function(){var e=this;j(this.staticOptions,function(t){t.childObject?t.childObject[t.property]=e.progress==1?t.to:t.from:e.object[t.property]=e.progress==1?t.to:t.from})},i.prototype.stop=function(e){if(this.pause(),!e&&this.events.isEnabled("animationstopped")){var t={type:"animationstopped",target:this,progress:this.progress};this.events.dispatchImmediately("animationstopped",t)}return this},i.prototype.setProgress=function(e){var t=this;if(this._time=this.duration*e,j(this.animationOptions,function(r){if(r.updateMethod&&v(r.from)){var a=r.updateMethod(e,r.from,r.to);r.childObject?r.childObject[r.property]=a:t.object[r.property]=a}}),this.progress=e,this.events.isEnabled("animationprogress")){var n={type:"animationprogress",target:this,progress:this.progress};this.events.dispatchImmediately("animationprogress",n)}Q.requestFrame()},i.prototype.update=function(){if(!this._pause){var e=void 0;this._time=R(Date.now()-this._startTime,0,this.duration);var t=this._time/this.duration;e=this.easing(t),(this.duration==0||!y(e)||t>=1)&&(e=1),this.setProgress(e),V(this._time/this.duration,6)==1&&this.end()}return this},Object.defineProperty(i.prototype,"delayed",{get:function(){return!!this._delayTimeout},enumerable:!0,configurable:!0}),i.prototype.stopSameAnimations=function(){var e=this;j(ji(this.object.animations),function(t){if(t!==e&&!t.delayed){var n=[];j(e.animationOptions,function(r){j(t.animationOptions,function(a){r.property==a.property&&r.childObject==a.childObject&&(n.push(a),t.animationOptions.length==0&&t.kill())})}),j(n,function(r){z(t.animationOptions,r)})}})},i.prototype.asFunction=function(e){return e=="easing"||s.prototype.asIs.call(this,e)},i}(wt),zi="http://www.w3.org/2000/svg",Ah="http://www.w3.org/2000/xmlns/",Ta="http://www.w3.org/1999/xlink";function Ce(s,i,e,t){return s.addEventListener(i,e,t||!1),new le(function(){s.removeEventListener(i,e,t||!1)})}function ka(s){if(J(s)){var i=document.getElementById(s);if(i==null&&(i=document.getElementsByClassName(s)[0]),i instanceof HTMLElement)return i}else if(s instanceof HTMLElement)return s}function Mr(s,i){if(s)if(s.classList)j(i.split(" "),function(t){s.classList.add(t)});else{var e=s.getAttribute("class");e?s.setAttribute("class",e.split(" ").filter(function(t){return t!==i}).join(" ")+" "+i):s.setAttribute("class",i)}}function Lr(s,i){if(s)if(s.classList)s.classList.remove(i);else{var e=s.getAttribute("class");e&&s.setAttribute("class",e.split(" ").filter(function(t){return t!==i}).join(" "))}}function Vh(s,i,e){s.style[i]=e}function Aa(s,i){return s.currentStyle?s.currentStyle[i]:document.defaultView.getComputedStyle(s,null).getPropertyValue(i)}function kn(){if(document.activeElement&&document.activeElement!=document.body)if(document.activeElement.blur)document.activeElement.blur();else{var s=document.createElement("button");s.style.position="fixed",s.style.top="0px",s.style.left="-10000px",document.body.appendChild(s),s.focus(),s.blur(),document.body.removeChild(s)}}function Ju(s){if(s instanceof HTMLElement)s.focus();else{var i=document.createElement("input"),e=document.createElementNS(zi,"foreignObject");e.appendChild(i),s.appendChild(e),i.focus(),i.disabled=!0,e.remove()}}function Qu(s){if(s.outerHTML)return s.outerHTML;var i=document.createElement("div"),e=s.cloneNode(!0);return i.appendChild(e),i.innerHTML}function ed(s){return s instanceof Object&&s&&s.nodeType===1}function Fh(s,i){for(var e=i;;){if(s===e)return!0;if(e.parentNode==null){if(e.host==null)return!1;e=e.host}else e=e.parentNode}}function Va(s){for(var i=s;;){if(i.parentNode==null)return i.host!=null?i:null;i=i.parentNode}}function Mh(s){for(var i=s.ownerDocument,e=s;;){if(e.parentNode==null)return e===i||e.host!=null?e:null;e=e.parentNode}}function td(s,i){j(s.attributes,function(e){e.value!=null&&i.setAttribute(e.name,e.value)})}function Lh(s){bl(function(){try{var i=s.getBoundingClientRect(),e=i.left-Math.round(i.left),t=i.top-Math.round(i.top);e!==0&&ea(function(){s.style.left=e+"px"}),t!==0&&ea(function(){s.style.top=t+"px"})}catch{}})}var ue=function(s){function i(e,t,n){var r=this,a=function(o){return o==null?(v(Da)||((l=document.createElement("style")).type="text/css",Z.nonce!=""&&l.setAttribute("nonce",Z.nonce),document.head.appendChild(l),Da=l.sheet),Da):((l=document.createElement("style")).type="text/css",Z.nonce!=""&&l.setAttribute("nonce",Z.nonce),o.appendChild(l),l.sheet);var l}(e);return(r=s.call(this,function(){var o=ht(a.cssRules,r._rule);if(o===-1)throw new Error("Could not dispose StyleRule");a.deleteRule(o)})||this)._rule=function(o,l){var h=o.cssRules.length;return o.insertRule(l+"{}",h),o.cssRules[h]}(a,t),X(n,function(o,l){r.setStyle(o,l)}),r}return w(i,s),Object.defineProperty(i.prototype,"selector",{get:function(){return this._rule.selectorText},set:function(e){this._rule.selectorText=e},enumerable:!0,configurable:!0}),i.prototype._setVendorPrefixName=function(e,t){var n=this._rule.style;n.setProperty("-webkit-"+e,t,""),n.setProperty("-moz-"+e,t,""),n.setProperty("-ms-"+e,t,""),n.setProperty("-o-"+e,t,""),n.setProperty(e,t,"")},i.prototype.setStyle=function(e,t){e==="transition"?this._setVendorPrefixName(e,t):this._rule.style.setProperty(e,t,"")},i}(le),id=0,nd=function(s){function i(e,t,n){var r=this,a=v(n)?n:"__style_"+ ++id+"__";return(r=s.call(this,e,"."+a,t)||this)._className=a,r}return w(i,s),Object.defineProperty(i.prototype,"className",{get:function(){return this._className},set:function(e){this._className=e,this.selector="."+e},enumerable:!0,configurable:!0}),i.prototype.toString=function(){return this._className},i}(ue);function jh(s){if(document.readyState!=="loading")s();else{var i=function(){document.readyState!=="loading"&&(document.removeEventListener("readystatechange",i),s())};document.addEventListener("readystatechange",i)}}function jr(s){var i=Aa(s,"font-family");if(i)return i;var e=s.parentElement||s.parentNode;return e?jr(e):void 0}function Er(s){var i=Aa(s,"font-size");if(i)return i;var e=s.parentElement||s.parentNode;return e?Er(e):void 0}function Fa(s,i){var e=s.getBoundingClientRect(),t=Ae(i)?i:i?[i]:[];if(t.length){for(var n=0;n=0&&e.left>=0&&e.top<=a.top+a.height&&e.left<=a.left+a.width)return!0}return!1}return e.top>=0&&e.left>=0&&e.top<=(window.innerHeight||document.documentElement.clientHeight)&&e.left<=(window.innerWidth||document.documentElement.clientWidth)}var An=function(){function s(i){this._isDisposed=!1,this._x=0,this._y=0,this._rotationY=0,this._rotationX=0,this._rotation=0,this._scale=1,this.node=typeof i=="string"?document.createElementNS(zi,i):i}return s.prototype.removeNode=function(){this.node&&this.node.parentNode&&this.node.parentNode.removeChild(this.node)},Object.defineProperty(s.prototype,"transformString",{get:function(){if(this.node)return this._transformString},enumerable:!0,configurable:!0}),s.prototype.transform=function(){var i="translate("+this._x+","+this._y+")";if(this._scale!=1&&(i+=(i?" ":"")+"scale("+this._scale+")"),this._rotation!=0){var e="rotate("+this._rotation+")";this._rotationX&&this._rotationY&&(e="rotate("+this._rotation+" "+this._rotationX+" "+this._rotationY+")"),i+=(i?" ":"")+e}this._transformString=i,this.node.setAttribute("transform",i)},s.prototype.getBBox=function(){var i={width:0,height:0,x:0,y:0};if(this.node&&this.node.parentNode)try{var e=this.node.getBBox();i.x=e.x,i.y=e.y,i.width=e.width,i.height=e.height}catch{}return i},s.prototype.moveTo=function(i){if(i){var e=i.x,t=i.y;this._x==e&&this._y==t||(this._x=e,this._y=t,this.transform())}},Object.defineProperty(s.prototype,"content",{get:function(){return this.node.innerHTML||""},set:function(i){this.node.innerHTML=i},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"textContent",{get:function(){return this.node.textContent||""},set:function(i){this.node.textContent=i},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"x",{get:function(){return this._x},set:function(i){this._x!=i&&(this._x=i,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"y",{get:function(){return this._y},set:function(i){this._y!=i&&(this._y=i,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rotation",{get:function(){return this._rotation},set:function(i){this._rotation!=i&&(this._rotation=i,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rotationX",{get:function(){return this._rotationX},set:function(i){this._rotationX!=i&&(this._rotationX=i,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rotationY",{get:function(){return this._rotationY},set:function(i){this._rotationY!=i&&(this._rotationY=i,this.transform())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"scale",{get:function(){return this._scale},set:function(i){this._scale!=i&&(this._scale=i,this.transform())},enumerable:!0,configurable:!0}),s.prototype.removeAttr=function(i){this.node.removeAttribute(i)},s.prototype.attr=function(i){var e=this;return X(i,function(t,n){v(n)?e.node.setAttribute(t,n):e.node.removeAttribute(t)}),this},s.prototype.getAttr=function(i){return this.node.getAttribute(i)},s.prototype.attrNS=function(i,e,t){return this.node.setAttributeNS(i,e,t),this},s.prototype.getAttrNS=function(i,e){return this.node.getAttributeNS(i,e)},s.prototype.removeStyle=function(i){this.node.style[i]=null,delete this.node.style[i]},s.prototype.getStyle=function(i){return this.node.style[i]},s.prototype.addStyle=function(i){var e=this;return X(i,function(t,n){v(n)?e.node.style[t]=n:e.removeStyle(t)}),this},s.prototype.addClass=function(i){Mr(this.node,i)},s.prototype.removeClass=function(i){Lr(this.node,i)},s.prototype.setClass=function(i){this.node.setAttribute("class",i)},s.prototype.removeChildNodes=function(){for(;this.node.childNodes.length>0;)this.node.removeChild(this.node.firstChild)},s.prototype.isDisposed=function(){return this._isDisposed},s.prototype.dispose=function(){this.removeNode()},s}(),Eh=function(s){function i(e){return s.call(this,e)||this}return w(i,s),i.prototype.add=function(e){e&&this.node.appendChild(e.node)},i.prototype.addToBack=function(e){if(e){var t=this.node.childNodes[0];t?t!=e.node&&this.node.insertBefore(e.node,t):this.node.appendChild(e.node)}},i.prototype.removeElement=function(e){if(e)try{e.node&&e.node.parentNode==this.node&&this.node.removeChild(e.node)}catch{}},i.prototype.hasChild=function(e){for(var t=0;t0;){var e=this.node.firstChild;e&&e.parentNode&&e.parentNode.removeChild(e)}},i.prototype.removeChildrenByTag=function(e){if(this.node.childNodes)for(var t=this.node.getElementsByTagName(e),n=0;n-1&&(this.focusable=!0),K().processFocusable(this))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"element",{get:function(){return this._element},set:function(e){this._element=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"originalPosition",{get:function(){return this._originalPosition||{x:0,y:0}},set:function(e){this._originalPosition=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"originalScale",{get:function(){return rr(this._originalScale,1)},set:function(e){this._originalScale!==e&&(this._originalScale=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"originalAngle",{get:function(){return rr(this._originalAngle,0)},set:function(e){this._originalAngle!==e&&(this._originalAngle=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"inertiaOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("inertiaOptions",this._inertiaOptions):this._inertiaOptions},set:function(e){this._inertiaOptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hitOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("hitOptions",this._hitOptions):this._hitOptions},set:function(e){this._hitOptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hoverOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("hoverOptions",this._hoverOptions):this._hoverOptions},set:function(e){this._hoverOptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"swipeOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("swipeOptions",this._swipeOptions):this._swipeOptions},set:function(e){this._swipeOptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"keyboardOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("keyboardOptions",this._keyboardOptions):this._keyboardOptions},set:function(e){this._keyboardOptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"mouseOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("mouseOptions",this._mouseOptions):this._mouseOptions},set:function(e){this._mouseOptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cursorOptions",{get:function(){return this.sprite&&this.sprite._adapterO?this.sprite._adapterO.apply("cursorOptions",this._cursorOptions):this._cursorOptions},set:function(e){this._cursorOptions=e},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.inertiaOptions=e.inertiaOptions,this.hitOptions=e.hitOptions,this.hoverOptions=e.hoverOptions,this.swipeOptions=e.swipeOptions,this.keyboardOptions=e.keyboardOptions,this.cursorOptions=e.cursorOptions,this.contextMenuDisabled=e.contextMenuDisabled,K().applyCursorOverStyle(this)},i.prototype.setEventDisposer=function(e,t,n){var r=this.eventDisposers.getKey(e);t?r==null&&this.eventDisposers.setKey(e,n()):r!=null&&(r.dispose(),this.eventDisposers.removeKey(e))},i.prototype.dispose=function(){s.prototype.dispose.call(this);var e=K();e.overObjects.removeValue(this),e.downObjects.removeValue(this),e.trackedObjects.removeValue(this),e.transformedObjects.removeValue(this),this.isHover&&this.wheelable&&e.unlockWheel(),e.focusedObject===this&&(e.focusedObject=void 0)},i}(wt),Nh=function(){function s(i,e){this._disposed=!1,this.directionX=0,this.directionY=0,this.interaction=i,this.keyboardEvent=e,this._startedOn=new Date().getTime(),K().processDragStart(i),Q.animations.push(this),this.update()}return s.prototype.update=function(){var i=this.interaction,e=K().getKeyboardOption(i,"speed"),t=K().getKeyboardOption(i,"accelleration"),n=K().getKeyboardOption(i,"accellerationDelay"),r={x:0,y:0};this.keyboardEvent.shiftKey?(e*=.5,t=1):this.keyboardEvent.ctrlKey&&(e*=2);var a=new Date().getTime()-this._startedOn,o=a-n;if(t>0&&o>0){var l=a/n;a=n,r.x+=this.directionX*(e*t*l*o),r.y+=this.directionY*(e*t*l*o)}r.x+=this.directionX*(e*a),r.y+=this.directionY*(e*a),K().handleTransformMove(i,r,{x:0,y:0},this.keyboardEvent,!0,!1)},s.prototype.isDisposed=function(){return this._disposed},s.prototype.dispose=function(){this._disposed||(K().processDragStop(this.interaction),z(Q.animations,this))},s}(),Wh=function(s){function i(e,t,n,r){var a=s.call(this)||this;return a.animations=[],a.className="Inertia",a.interaction=e,a.type=t,a.point=n,a.startPoint=r,a._disposers.push(new Yi(a.animations)),a}return w(i,s),Object.defineProperty(i.prototype,"x",{get:function(){return this.point.x},set:function(e){y(e)&&(this.point.x=e,this.handleMove())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"y",{get:function(){return this.point.y},set:function(e){y(e)&&(this.point.y=e,this.handleMove())},enumerable:!0,configurable:!0}),i.prototype.handleMove=function(){if(this.interaction.events.isEnabled("drag")){var e={type:"drag",target:this.interaction,shift:{x:this.x-this.startPoint.x,y:this.y-this.startPoint.y},startPoint:this.startPoint,point:{x:this.x,y:this.y},touch:!1};this.interaction.events.dispatchImmediately("drag",e)}},i.prototype.done=function(){this.interaction.inertias.removeKey(this.type),this.type==="move"&&K().processDragStop(this.interaction),this.dispose()},i}(Ke),Xh=function(){function s(){}return s.prototype.getEventKey=function(i){var e;switch(i.keyCode||i.which){case 38:e="up";break;case 40:e="down";break;case 37:e="left";break;case 39:e="right";break;case 13:e="enter";break;case 27:e="esc";break;case 36:case 36:e="home";break;case 35:case 35:e="end";break;case 9:e="tab";break;case 17:e="ctrl";break;case 18:e="alt";break;case 16:e="shift";break;case 32:e="space";break;case 33:e="pgup";break;case 34:e="pgdn";break;case 45:e="ins";break;case 46:e="del";break;case 107:e="plus";break;case 109:e="minus";break;default:e="other"}return e},s.prototype.isKey=function(i,e){var t=this.getEventKey(i);return J(e)&&(e=[e]),e.indexOf(t)!==-1},s.prototype.shiftKey=function(i){return i.shiftKey},s.prototype.ctrlKey=function(i){return i.ctrlKey},s.prototype.altKey=function(i){return i.altKey},s.prototype.metaKey=function(i){return i.metaKey},s}(),Ct=new Xh,Yh={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6};function Ma(s){switch(s){case"year":return;case"month":return"year";case"week":case"day":return"month";case"hour":return"day";case"minute":return"hour";case"second":return"minute";case"millisecond":return"second"}}function Se(s,i){return v(i)||(i=1),Yh[s]*i}function zh(){return new Date}function Ot(){return zh().getTime()}function bi(s){return new Date(s.getTime())}function Rr(s,i,e,t){s=new Date(s.getTime()),i=new Date(i.getTime());var n=0,r=0;t||e=="millisecond"||(n=s.getTimezoneOffset(),s.setUTCMinutes(s.getUTCMinutes()-n),r=i.getTimezoneOffset(),i.setUTCMinutes(i.getUTCMinutes()-r));var a=!1;switch(e){case"year":s.getUTCFullYear()!=i.getUTCFullYear()&&(a=!0);break;case"month":(s.getUTCFullYear()!=i.getUTCFullYear()||s.getUTCMonth()!=i.getUTCMonth())&&(a=!0);break;case"day":(s.getUTCMonth()!=i.getUTCMonth()||s.getUTCDate()!=i.getUTCDate())&&(a=!0);break;case"hour":s.getUTCHours()!=i.getUTCHours()&&(a=!0);break;case"minute":s.getUTCMinutes()!=i.getUTCMinutes()&&(a=!0);break;case"second":s.getUTCSeconds()!=i.getUTCSeconds()&&(a=!0);break;case"millisecond":s.getTime()!=i.getTime()&&(a=!0)}if(a)return!0;var o=Ma(e);return!!o&&(s.setUTCMinutes(s.getUTCMinutes()+n),i.setUTCMinutes(i.getUTCMinutes()+r),Rr(s,i,o,t))}function Ze(s,i,e,t){var n=0;switch(t||i=="millisecond"||(n=s.getTimezoneOffset(),s.setUTCMinutes(s.getUTCMinutes()-n)),i){case"day":var r=s.getUTCDate();s.setUTCDate(r+e);break;case"second":var a=s.getUTCSeconds();s.setUTCSeconds(a+e);break;case"millisecond":var o=s.getUTCMilliseconds();s.setUTCMilliseconds(o+e);break;case"hour":var l=s.getUTCHours();s.setUTCHours(l+e);break;case"minute":var h=s.getUTCMinutes();s.setUTCMinutes(h+e);break;case"year":var p=s.getUTCFullYear();s.setUTCFullYear(p+e);break;case"month":var u=s.getUTCMonth();s.setUTCMonth(u+e);break;case"week":var d=s.getUTCDate();s.setUTCDate(d+7*e)}if(!t&&i!="millisecond"&&(s.setUTCMinutes(s.getUTCMinutes()+n),i=="day"||i=="week"||i=="month"||i=="year")){var c=s.getTimezoneOffset();if(c!=n){var f=c-n;s.setUTCMinutes(s.getUTCMinutes()+f),s.getTimezoneOffset()!=c&&s.setUTCMinutes(s.getUTCMinutes()-f)}}return s}function Be(s,i,e,t,n,r,a,o){a===void 0&&(a=0),y(e)||(e=1);var l=0;switch(o&&["day","month","week","year"].indexOf(i)!=-1&&(s=Vn(s,o)),n||i=="millisecond"||(l=s.getTimezoneOffset(),s.setUTCMinutes(s.getUTCMinutes()-l)),i){case"day":var h=s.getUTCDate();if(e>1){if(r){r=Be(r,"day",1);var p=s.getTime()-r.getTime(),u=Math.floor(p/Se("day")/e),d=Se("day",u*e);s.setTime(r.getTime()+d-l*Se("minute"))}}else s.setUTCDate(h);s.setUTCHours(0,0,0,0);break;case"second":var c=s.getUTCSeconds();e>1&&(c=Math.floor(c/e)*e),s.setUTCSeconds(c,0);break;case"millisecond":if(e==1)return s;var f=s.getUTCMilliseconds();f=Math.floor(f/e)*e,s.setUTCMilliseconds(f);break;case"hour":var g=s.getUTCHours();e>1&&(g=Math.floor(g/e)*e),s.setUTCHours(g,a,0,0);break;case"minute":var m=s.getUTCMinutes();f=s.getUTCMilliseconds(),e>1&&(m=Math.floor(m/e)*e),s.setUTCMinutes(m,0,0);break;case"month":var x=s.getUTCMonth();e>1&&(x=Math.floor(x/e)*e),s.setUTCMonth(x,1),s.setUTCHours(0,a,0,0);break;case"year":var b=s.getUTCFullYear();e>1&&(b=Math.floor(b/e)*e),s.setUTCFullYear(b,0,1),s.setUTCHours(0,a,0,0);break;case"week":var C=s.getUTCDate(),S=s.getUTCDay();y(t)||(t=1),C=S>=t?C-S+t:C-(7+S)+t,s.setUTCDate(C),s.setUTCHours(0,a,0,0)}if(!n&&i!="millisecond"&&(s.setUTCMinutes(s.getUTCMinutes()+l),i=="day"||i=="week"||i=="month"||i=="year")){var P=s.getTimezoneOffset();if(P!=l){var O=P-l;s.setUTCMinutes(s.getUTCMinutes()+O)}}return s}function Vn(s,i){return new Date(s.toLocaleString("en-US",{timeZone:i}))}function Uh(s){var i=new Date;return i.setHours(0,0,0,0),Vn(i,s).getMinutes()}var Gh=function(s){function i(){var e=s.call(this)||this;return e._globalEventsAdded=!1,e._pointerEvents={pointerdown:"mousedown",pointerup:"mouseup",pointermove:"mousemove",pointercancel:"mouseup",pointerover:"mouseover",pointerout:"mouseout",wheel:"wheel"},e._usePointerEventsOnly=!1,e._useTouchEventsOnly=!1,e._addHoverEvents=!0,e._passiveSupported=!1,e._delayedEvents={out:[]},e.overObjects=new re,e.downObjects=new re,e.trackedObjects=new re,e.transformedObjects=new re,e.pointers=new me,e.inertiaOptions=new me,e.hitOptions={doubleHitTime:300,hitTolerance:10,noFocus:!0},e.hoverOptions={touchOutBehavior:"leave",touchOutDelay:1e3},e.swipeOptions={time:500,verticalThreshold:75,horizontalThreshold:30},e.keyboardOptions={speed:.1,accelleration:1.2,accellerationDelay:2e3},e.mouseOptions={sensitivity:1},e.className="Interaction",e.body=e.getInteraction(document.body),e._disposers.push(e.body),window.hasOwnProperty("PointerEvent")?(e._pointerEvents.pointerdown="pointerdown",e._pointerEvents.pointerup="pointerup",e._pointerEvents.pointermove="pointermove",e._pointerEvents.pointercancel="pointercancel",e._pointerEvents.pointerover="pointerover",e._pointerEvents.pointerout="pointerout"):window.hasOwnProperty("MSPointerEvent")?(e._pointerEvents.pointerdown="MSPointerDown",e._pointerEvents.pointerup="MSPointerUp",e._pointerEvents.pointermove="MSPointerMove",e._pointerEvents.pointercancel="MSPointerUp",e._pointerEvents.pointerover="MSPointerOver",e._pointerEvents.pointerout="MSPointerOut"):typeof matchMedia!="undefined"&&matchMedia("(pointer:fine)").matches?"ontouchstart"in window&&(e._addHoverEvents=!1,e._useTouchEventsOnly=!0):window.navigator.userAgent.match(/MSIE /)||e.fullFF()?e._usePointerEventsOnly=!0:e._useTouchEventsOnly=!0,"onwheel"in document.createElement("div")?e._pointerEvents.wheel="wheel":v(document.onmousewheel)&&(e._pointerEvents.wheel="mousewheel"),e.inertiaOptions.setKey("move",{time:100,duration:500,factor:1,easing:Ar}),e.inertiaOptions.setKey("resize",{time:100,duration:500,factor:1,easing:Ar}),e._passiveSupported=i.passiveSupported,e.applyTheme(),e}return w(i,s),i.prototype.fullFF=function(){return window.navigator.userAgent.match(/Firefox/)&&!window.navigator.userAgent.match(/Android/)},i.prototype.debug=function(){},i.prototype.addGlobalEvents=function(){var e=this;this._globalEventsAdded||(this._useTouchEventsOnly||(this._disposers.push(Ce(document,this._pointerEvents.pointerdown,function(t){e.handleGlobalPointerDown(t)})),this._disposers.push(Ce(document,this._pointerEvents.pointermove,function(t){e.handleGlobalPointerMove(t)})),this._disposers.push(Ce(document,this._pointerEvents.pointerup,function(t){e.handleGlobalPointerUp(t)})),this._disposers.push(Ce(document,this._pointerEvents.pointercancel,function(t){e.handleGlobalPointerUp(t,!0)})),this._disposers.push(Ce(document,"mouseenter",function(t){v(t.relatedTarget)||t.buttons!=0&&t.which!=0||e.handleDocumentLeave(t)}))),this._usePointerEventsOnly||(this._disposers.push(Ce(document,"touchstart",function(t){e.handleGlobalTouchStart(t)})),this._disposers.push(Ce(document,"touchmove",function(t){e.handleGlobalTouchMove(t)})),this._disposers.push(Ce(document,"touchend",function(t){e.handleGlobalTouchEnd(t)}))),this._disposers.push(Ce(document,"keydown",function(t){e.handleGlobalKeyDown(t)})),this._disposers.push(Ce(document,"keyup",function(t){e.handleGlobalKeyUp(t)})),this._globalEventsAdded=!0)},i.prototype.processClickable=function(e){this.processTouchable(e)},i.prototype.processContextMenu=function(e){e.contextMenuDisabled?e.eventDisposers.hasKey("contextMenuDisabled")||e.eventDisposers.setKey("contextMenuDisabled",Ce(e.element,"contextmenu",function(t){t.preventDefault()})):e.eventDisposers.hasKey("contextMenuDisabled")&&e.eventDisposers.getKey("contextMenuDisabled").dispose()},i.prototype.processHoverable=function(e){var t=this;if(e.hoverable||e.trackable)this.addGlobalEvents(),this.applyCursorOverStyle(e),!e.eventDisposers.hasKey("hoverable")&&this._addHoverEvents&&e.eventDisposers.setKey("hoverable",new _e([Ce(e.element,this._pointerEvents.pointerout,function(r){return t.handlePointerOut(e,r)}),Ce(e.element,this._pointerEvents.pointerover,function(r){return t.handlePointerOver(e,r)})])),e.trackable;else{var n=e.eventDisposers.getKey("hoverable");n!=null&&(n.dispose(),e.eventDisposers.removeKey("hoverable"))}this.processTouchable(e)},i.prototype.processMovable=function(e){(e.draggable||e.swipeable||e.trackable||e.resizable)&&(this.isGlobalElement(e)||e.isTouchProtected||this.prepElement(e),this.applyCursorOverStyle(e)),this.processTouchable(e)},i.prototype.processTrackable=function(e){this.processHoverable(e),this.processMovable(e),e.trackable?this.trackedObjects.moveValue(e):this.trackedObjects.removeValue(e)},i.prototype.processDraggable=function(e){this.processMovable(e)},i.prototype.processSwipeable=function(e){this.processMovable(e)},i.prototype.processResizable=function(e){this.processMovable(e)},i.prototype.processWheelable=function(e){var t=this;if(e.wheelable)e.eventDisposers.hasKey("wheelable")||e.eventDisposers.setKey("wheelable",new _e([Ce(e.element,this._pointerEvents.wheel,function(r){return t.handleMouseWheel(e,r)},!!this._passiveSupported&&{passive:!1}),e.events.on("out",function(r){e.wheelable&&t.unlockWheel()}),e.events.on("over",function(r){e.wheelable&&t.lockWheel()})]));else{var n=e.eventDisposers.getKey("wheelable");n!=null&&(n.dispose(),e.eventDisposers.removeKey("wheelable"))}},i.prototype.processFocusable=function(e){var t=this;if(e.focusable===!0&&e.tabindex>-1&&!this._useTouchEventsOnly)e.eventDisposers.hasKey("focusable")||e.eventDisposers.setKey("focusable",new _e([Ce(e.element,"focus",function(r){return t.handleFocus(e,r)}),Ce(e.element,"blur",function(r){return t.handleBlur(e,r)}),Ce(e.element,this._pointerEvents.pointerdown,function(r){return t.handleFocusBlur(e,r)}),Ce(e.element,"touchstart",function(r){return t.handleFocusBlur(e,r)},!!this._passiveSupported&&{passive:!1})]));else{var n=e.eventDisposers.getKey("focusable");n!=null&&(n.dispose(),e.eventDisposers.removeKey("focusable"))}},i.prototype.processTouchable=function(e){var t=this;if(e.clickable||e.hoverable||e.trackable||e.draggable||e.swipeable||e.resizable)this.addGlobalEvents(),e.eventDisposers.hasKey("touchable")||(this._useTouchEventsOnly||this._usePointerEventsOnly?this._useTouchEventsOnly?this._usePointerEventsOnly||e.eventDisposers.setKey("touchable",Ce(e.element,"touchstart",function(r){return t.handleTouchDown(e,r)},!!this._passiveSupported&&{passive:!1})):e.eventDisposers.setKey("touchable",Ce(e.element,this._pointerEvents.pointerdown,function(r){return t.handlePointerDown(e,r)})):e.eventDisposers.setKey("touchable",new _e([Ce(e.element,this._pointerEvents.pointerdown,function(r){return t.handlePointerDown(e,r)}),Ce(e.element,"touchstart",function(r){return t.handleTouchDown(e,r)},!!this._passiveSupported&&{passive:!1})])));else{var n=e.eventDisposers.getKey("touchable");n!=null&&(n.dispose(),e.eventDisposers.removeKey("touchable"))}},i.prototype.handleFocus=function(e,t){if(e.focusable){if(e.isFocused=!0,e.events.isEnabled("focus")&&!Q.isPaused){var n={type:"focus",target:e,event:t};e.events.dispatchImmediately("focus",n)}}else t.preventDefault()},i.prototype.handleFocusBlur=function(e,t){e.focusable!==!1&&this.getHitOption(e,"noFocus")&&e.events.once("focus",function(){e.events.disableType("blur"),kn(),e.sprite&&e.sprite.handleBlur(),e.events.enableType("blur")})},i.prototype.handleBlur=function(e,t){if(e.focusable){if(e.isFocused=!1,e.events.isEnabled("blur")&&!Q.isPaused){var n={type:"blur",target:e,event:t};e.events.dispatchImmediately("blur",n)}}else t.preventDefault()},i.prototype.handleGlobalKeyDown=function(e){if(this.focusedObject){if(Ct.isKey(e,"esc"))kn();else if(this.focusedObject.draggable&&Ct.isKey(e,["up","down","left","right"])){e.preventDefault();var t=this.focusedObject,n="interactionKeyboardObject";if(t.eventDisposers.hasKey(n))return;var r=new Nh(t,e);switch(t.eventDisposers.setKey(n,r),Ct.getEventKey(e)){case"up":r.directionY=-1;break;case"down":r.directionY=1;break;case"left":r.directionX=-1;break;case"right":r.directionX=1}}}},i.prototype.handleGlobalKeyUp=function(e){var t="interactionKeyboardObject";if(this.focusedObject){var n=this.focusedObject.eventDisposers.getKey(t);n!=null&&(e.preventDefault(),n.dispose(),this.focusedObject.eventDisposers.removeKey(t));var r=this.focusedObject.sprite;Ct.isKey(e,"enter")&&r&&(r.events.isEnabled("hit")||r.events.isEnabled("toggled")?this.focusedObject.dispatchImmediately("hit"):r.showTooltipOn=="hit"&&this.focusedObject.dispatchImmediately("up"))}},i.prototype.handleGlobalPointerMove=function(e){var t=this.getPointer(e);if(t.point=this.getPointerPoint(e),this.events.isEnabled("track")&&!Q.isPaused){var n={type:"track",target:this,event:e,pointer:t,touch:t.touch};this.events.dispatchImmediately("track",n)}this.addBreadCrumb(t,t.point),this.handleGlobalMove(t,e)},i.prototype.handleGlobalPointerDown=function(e){this.processDelayed();var t=this.getPointer(e);if(this.events.isEnabled("down")&&!Q.isPaused){var n={type:"down",target:this,event:e,pointer:t,touch:t.touch};this.events.dispatchImmediately("down",n)}},i.prototype.preventTouchAction=function(e){e.defaultPrevented||e.preventDefault()},i.prototype.handleGlobalPointerUp=function(e,t){t===void 0&&(t=!1);var n=this.getPointer(e);if(this.events.isEnabled("up")&&!Q.isPaused){var r={type:"up",target:this,event:e,pointer:n,touch:n.touch};this.events.dispatchImmediately("up",r)}this.handleGlobalUp(n,e,t)},i.prototype.handleGlobalTouchMove=function(e){for(var t=0;t=r-this.getHitOption(e,"doubleHitTime")){if(r-e.lastHit<100)return;if(e.lastHit=void 0,e.lastHitPointer=void 0,e.events.isEnabled("doublehit")&&!Q.isPaused){var a={type:"doublehit",target:e,point:t.point,event:n,touch:t.touch};e.events.dispatchImmediately("doublehit",a)}}else e.lastHit=r,e.lastHitPointer=t,t.button===3?e.events.isEnabled("rightclick")&&!Q.isPaused&&(a={type:"rightclick",target:e,event:n},e.events.dispatchImmediately("rightclick",a)):e.events.isEnabled("hit")&&!Q.isPaused&&(a={type:"hit",target:e,event:n,point:t.point,touch:t.touch},e.events.dispatchImmediately("hit",a))},i.prototype.handleOver=function(e,t,n,r){if(e.hoverable){var a=!1;if(this.shouldCancelHovers(t)&&this.areTransformed()&&this.moved(t,this.getHitOption(e,"hitTolerance"))&&(a=!0,this.cancelAllHovers(n)),this.processDelayed(),e.overPointers.moveValue(t),!e.isRealHover&&(a||(e.isHover=!0,e.isRealHover=!0,this.overObjects.moveValue(e)),this.handleTrack(this.body,t,n,!0),e.events.isEnabled("over")&&!Q.isPaused&&!a)){var o={type:"over",target:e,event:n,pointer:t,touch:t.touch};e.events.dispatchImmediately("over",o)}}},i.prototype.handleOut=function(e,t,n,r,a){var o=this;if(r===void 0&&(r=!1),a===void 0&&(a=!1),e.hoverable&&(e.overPointers.removeValue(t),e.isHover&&(!e.hasDelayedOut||a))){if(r&&e.overPointers.length)return;if(t&&t.touch&&!a&&!this.old(t)){var l=this.getHoverOption(e,"touchOutBehavior");if(l=="leave")return this._delayedEvents.out.push({type:"out",io:e,pointer:t,event:n,keepUntil:Ot()+500}),void(e.hasDelayedOut=!0);if(l=="delay"&&this.getHoverOption(e,"touchOutDelay"))return void this._delayedEvents.out.push({type:"out",io:e,pointer:t,event:n,keepUntil:Ot()+500,timeout:this.setTimeout(function(){o.handleOut(e,t,n,!0)},this.getHoverOption(e,"touchOutDelay"))})}if(e.isHover=!1,this.overObjects.removeValue(e),!e.isDisposed()&&e.events.isEnabled("out")&&!Q.isPaused){var h={type:"out",target:e,event:n,pointer:t,touch:t.touch};e.events.dispatchImmediately("out",h)}e.overPointers.clear(),e.hasDelayedOut=!1}},i.prototype.processDelayed=function(){for(var e;e=this._delayedEvents.out.pop();)e.timeout&&e.timeout.dispose(),this.handleOut(e.io,e.pointer,e.event,!1,!0)},i.prototype.handleDown=function(e,t,n){if(this.maybePreventDefault(e,n,t),e.inert&&this.stopInertia(e),this.handleOver(e,t,n,!0),e.downPointers.moveValue(t),this.applyCursorDownStyle(e,t),e.isDown||(e.focusable!==!1&&this.getHitOption(e,"noFocus")&&this.focusedObject&&kn(),e.isDown=!0,this.downObjects.moveValue(e),e.draggable&&this.processDragStart(e,t,n),e.resizable&&this.processResizeStart(e,t,n)),e.events.isEnabled("down")&&!Q.isPaused){var r={type:"down",target:e,event:n,pointer:t,touch:t.touch};e.events.dispatchImmediately("down",r)}},i.prototype.handleGlobalUp=function(e,t,n){var r=this;n===void 0&&(n=!1);var a=this.downObjects.values.slice();a.sort(function(o,l){if(o&&l){var h=o.element.compareDocumentPosition(l.element);return h&Node.DOCUMENT_POSITION_CONTAINED_BY?1:h&Node.DOCUMENT_POSITION_CONTAINS?-1:0}return 0}),j(a,function(o){o&&o.downPointers.contains(e)&&r.handleUp(o,e,t,n)})},i.prototype.handleDocumentLeave=function(e){var t=this;A(this.downObjects.backwards().iterator(),function(n){n.downPointers.each(function(r){t.handleUp(n,r,e)})})},i.prototype.handleUp=function(e,t,n,r){if(r===void 0&&(r=!1),this.restoreCursorDownStyle(e,t),e.downPointers.removeValue(t),(t.touch||this._useTouchEventsOnly)&&this.handleOut(e,t,n,!0),e.isDown){if(e.downPointers.length==0&&(e.isDown=!1,this.downObjects.removeValue(e)),e.events.isEnabled("up")&&!Q.isPaused){var a={type:"up",target:e,event:n,pointer:t,touch:t.touch};e.events.dispatchImmediately("up",a)}r||(e.swipeable&&this.swiped(e,t)?this.handleSwipe(e,t,n):(e.clickable&&!this.moved(t,this.getHitOption(e,"hitTolerance"))&&this.handleHit(e,t,n),e.inert&&this.moved(t,this.getHitOption(e,"hitTolerance"))?this.handleInertia(e,t):e.draggable&&this.processDragStop(e,t,n),e.resizable&&this.processResizeStop(e,t,n)))}},i.prototype.maybePreventDefault=function(e,t,n){!v(t)||!(e.draggable||e.swipeable||e.trackable||e.resizable)||this.isGlobalElement(e)||t.cancelable===!1||e.isTouchProtected&&n&&n.touch||t.preventDefault()},i.prototype.cancelAllHovers=function(e){var t=this;A(this.overObjects.backwards().iterator(),function(n){if(n){var r=n.overPointers.getIndex(0);t.handleOut(n,r,e,!0,!0)}})},i.prototype.shouldCancelHovers=function(e){return Z.disableHoverOnTransform=="always"||Z.disableHoverOnTransform=="touch"&&e.touch},i.prototype.handleGlobalMove=function(e,t){var n,r=this;if(!e.touch){var a=typeof(n=e.lastEvent).composedPath=="function"?n.composedPath()[0]:n.target;A(this.overObjects.backwards().iterator(),function(o){if(o&&o.overPointers.contains(e)&&o.hoverable){var l=!1;o.element&&e.lastEvent&&Fh(o.element,a)||(l=!0),l&&r.handleOut(o,e,t,!0)}})}A(this.transformedObjects.backwards().iterator(),function(o){!o.downPointers.contains(e)||o.swipeable&&r.swiping(o,e)||!o.draggable&&!o.resizable||r.handleTransform(o,t)}),A(this.trackedObjects.backwards().iterator(),function(o){o.overPointers.contains(e)||r.handleTrack(o,e,t)})},i.prototype.handleTrack=function(e,t,n,r){if(r===void 0&&(r=!1),(r||this.moved(t,0))&&e.events.isEnabled("track")&&!Q.isPaused){var a={type:"track",target:e,event:n,point:t.point,pointer:t,touch:t.touch};e.events.dispatchImmediately("track",a)}},i.prototype.handleSwipe=function(e,t,n){if(e.events.isEnabled("swipe")&&!Q.isPaused){var r={type:"swipe",target:e,event:n,touch:t.touch};e.events.dispatchImmediately("swipe",r)}t.startPoint.x0?e.events.isEnabled("swiperight")&&!Q.isPaused&&e.events.dispatchImmediately("wheelright",{type:"wheelright",target:e,event:a,point:t.point,shift:o}):r<0?e.events.isEnabled("wheelup")&&!Q.isPaused&&e.events.dispatchImmediately("wheelup",{type:"wheelup",target:e,event:a,point:t.point,shift:o}):r>0&&e.events.isEnabled("wheeldown")&&!Q.isPaused&&e.events.dispatchImmediately("wheeldown",{type:"wheeldown",target:e,event:a,point:t.point,shift:o})},i.prototype.handleInertia=function(e,t){e.draggable&&e.downPointers.length===0&&this.handleMoveInertia(e,t),e.resizable&&e.downPointers.length>1&&this.handleResizeInertia(e,t)},i.prototype.handleMoveInertia=function(e,t){var n=e,r={x:t.point.x,y:t.point.y},a={x:t.startPoint.x,y:t.startPoint.y},o=new Wh(n,"move",r,a),l=this.getTrailPoint(t,Ot()-this.getInertiaOption(e,"move","time"));if(l!==void 0){var h=this.getInertiaOption(e,"move","factor"),p=[{to:t.point.x+(t.point.x-l.point.x)*h,property:"x"},{to:t.point.y+(t.point.y-l.point.y)*h,property:"y"}],u=new gt(o,p,this.getInertiaOption(e,"move","duration"),this.getInertiaOption(e,"move","easing")).start();this._disposers.push(u.events.on("animationended",function(d){o.done()})),e.inertias.setKey("move",o)}else this.processDragStop(e,t,t.lastUpEvent)},i.prototype.handleResizeInertia=function(e,t){},i.prototype.handleTransform=function(e,t){var n,r,a,o=e.downPointers.getIndex(0),l=null,h=null;o&&(l=o.point,h=o.startPoint),a=r={x:e.originalPosition.x,y:e.originalPosition.y};for(var p=!0,u=1;un-this.getSwipeOption(e,"time")},i.prototype.swiped=function(e,t){var n=Ot();return!t.swipeCanceled&&Math.abs(t.startPoint.x-t.point.x)>this.getSwipeOption(e,"horizontalThreshold")&&Math.abs(t.startPoint.y-t.point.y)n-this.getSwipeOption(e,"time")},i.prototype.applyCursorOverStyle=function(e){var t=e.cursorOptions;if(v(t.overStyle))for(var n=0;nt||Math.abs(r.y)>t},i.prototype.old=function(e,t){return t===void 0&&(t=300),Ot()-e.startTime>t},i.prototype.getShift=function(e){return{x:e.startPoint.x-e.point.x,y:e.startPoint.y-e.point.y}},i.prototype.getTrailPoint=function(e,t){for(var n,r=0;r=t){n=e.track[r];break}return n},i.prototype.pointerExists=function(e,t){var n=!1;return e.each(function(r){r!=t&&(n=r.point.x==t.point.x&&r.point.y==t.point.y)}),n},i.prototype.getInteraction=function(e){return new Hh(e)},i.prototype.setTemporaryStyle=function(e,t,n){var r=e.element;v(r.style[t])&&!e.replacedStyles.hasKey(t)&&e.replacedStyles.setKey(t,r.style[t]),Vh(r,t,n)},i.prototype.restoreStyle=function(e,t){e.replacedStyles.hasKey(t)?(e.element.style[t]=e.replacedStyles.getKey(t),e.replacedStyles.removeKey(t)):delete e.element.style[t]},i.prototype.restoreAllStyles=function(e){A(e.replacedStyles.iterator(),function(t){var n=t[0],r=t[1];e.element.style[n]=r,e.replacedStyles.removeKey(n)})},i.prototype.dispose=function(){this.isDisposed()||(s.prototype.dispose.call(this),this.restoreAllStyles(this.body),this.unlockWheel())},i.prototype.log=function(e,t,n){if(t.changedTouches)for(var r=0;r0},i.prototype.logTouch=function(e,t,n){console.log(e+" "+t+" touch "+n.identifier)},Object.defineProperty(i,"passiveSupported",{get:function(){var e=this;if(this._passiveSupported==null)try{var t=Object.defineProperty({},"passive",{get:function(){e._passiveSupported=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch{this._passiveSupported=!1}return this._passiveSupported},enumerable:!0,configurable:!0}),i}(wt),La=null;function K(){return La==null&&(La=new Gh),La}var ja=function(s){function i(){var e=s.call(this)||this;return e.adapter=new it(e),e._elements={},e._IOs={},e._content="",e._title="",e._classPrefix="ampopup",e._defaultStyles=!0,e._showCurtain=!1,e._draggable=!0,e._align="center",e._dynamicResize=!0,e._verticalAlign="middle",e._shift={x:0,y:0},e._tempShift={x:0,y:0},e._readerTitle="",e._closable=!0,e._cssLoaded=!1,e._fitTo="window",e.isTemplate=!1,e._sized=!1,e.className="Popup",e}return w(i,s),i.prototype.open=function(){this.container&&(this._elements.wrapper&&this.container.appendChild(this._elements.wrapper),this._elements.curtain&&(this.container.appendChild(this._elements.curtain),this.showCurtain=this.showCurtain),this.positionElement(),this.dispatchImmediately("opened"))},i.prototype.close=function(){this._elements.wrapper&&this._elements.wrapper.parentElement&&this._elements.wrapper.parentElement.removeChild(this._elements.wrapper),this._elements.curtain&&this._elements.curtain.parentElement&&this._elements.curtain.parentElement.removeChild(this._elements.curtain),this.dispatchImmediately("closed"),this.releasePointers()},i.prototype.dispose=function(){this.close(),s.prototype.dispose.call(this)},i.prototype.positionElement=function(e){var t=this;e===void 0&&(e=!0),this._elements.wrapper&&setTimeout(function(){if(t._elements.wrapper){if(e||!t._sized){t._elements.wrapper.style.opacity="0.01",t._elements.wrapper.style.left="0",t._elements.wrapper.style.top="0",t._elements.wrapper.style.margin="0 0 0 0",t._elements.wrapper.style.width="",t._elements.wrapper.style.height="";var n=t._elements.wrapper.getBoundingClientRect();t._elements.wrapper.style.width=n.width+"px",t._elements.wrapper.style.height=n.height+"px",t._sized=!0}if(t.dynamicResize)for(var r=t._elements.wrapper.getElementsByTagName("img"),a=0;an+s.delay)&&(n=o,j(t._targets,function(l){var h=l.target.getBoundingClientRect();h.width===l.size.width&&h.height===l.size.height||(l.size=h,l.callback())})),t._timer=requestAnimationFrame(r)};this._timer=requestAnimationFrame(r)}var a=i.getBoundingClientRect();this._targets.push({target:i,callback:e,size:a})},s.prototype.removeTarget=function(i){Ks(this._targets,function(e){return e.target!==i}),this._targets.length===0&&cancelAnimationFrame(this._timer)},s.delay=200,s}(),Ba=null,ad=function(){function s(i,e){this._disposed=!1,this._sensor=(Ba===null&&(Ba=typeof ResizeObserver!="undefined"?new rd:new sd),Ba),this._element=i,this._sensor.addTarget(i,e)}return s.prototype.isDisposed=function(){return this._disposed},s.prototype.dispose=function(){this._disposed||(this._disposed=!0,this._sensor.removeTarget(this._element))},Object.defineProperty(s.prototype,"sensor",{get:function(){return this._sensor},enumerable:!0,configurable:!0}),s.prototype.reset=function(){Ra("resizeSensor.reset() is no longer needed and can be removed")},s}(),Ha=[],Na=function(){function s(i,e){var t=this;this._disposed=!1,this.autoResize=!0,this.nonExportableSprites=[],this._disposers=[],this.cssScale=1,this._printing=!1,this.htmlElement=i,e||(this._printing=!1,this.initSensor(),this._disposers.push(Ce(window,"beforeprint",function(){t._printing=!0})),this._disposers.push(Ce(window,"afterprint",function(){t._printing=!1}))),Ha.push(this);var n=document.createElement("div"),r=n.style;r.width="100%",r.height="100%",r.position="relative",i.appendChild(n),this.SVGContainer=n}return s.prototype.initSensor=function(){var i=this;this.resizeSensor&&this.resizeSensor.dispose(),this.resizeSensor=new ad(this.htmlElement,function(){i.autoResize&&!i._printing&&i.measure()}),this._disposers.push(this.resizeSensor)},s.prototype.measure=function(){var i=rh(this.htmlElement),e=sh(this.htmlElement),t=this.container;t&&(this.width==i&&this.height==e||(this.width=i,this.height=e,i>0&&(t.maxWidth=i),e>0&&(t.maxHeight=e),Lh(this.SVGContainer)),t.maxWidth||(t.maxWidth=0),t.maxHeight||(t.maxHeight=0),this.cssScale=1,this.checkTransform(this.htmlElement))},Object.defineProperty(s.prototype,"container",{get:function(){return this._container},set:function(i){this._container=i,this.measure()},enumerable:!0,configurable:!0}),s.prototype.isDisposed=function(){return this._disposed},s.prototype.dispose=function(){this._disposed||z(Ha,this),j(this._disposers,function(i){i.dispose()})},Object.defineProperty(s.prototype,"hideOverflow",{set:function(i){this.SVGContainer.style.overflow=i?"hidden":""},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"modal",{get:function(){return v(this._modal)||(this._modal=new Ea,this._modal.container=this.SVGContainer,this._disposers.push(this._modal)),this._modal},enumerable:!0,configurable:!0}),s.prototype.openModal=function(i,e){this.closeModal();var t=this.modal;return t.content=i,t.readerTitle=e||"",t.title=e||"",t.open(),t},s.prototype.closeModal=function(){this._modal&&this.modal.close()},Object.defineProperty(s.prototype,"popups",{get:function(){if(!v(this._popups)){var i=new ja;i.container=this.SVGContainer,this._popups=new Oe(i),this._disposers.push(new fe(this._popups)),this._disposers.push(this._popups.template)}return this._popups},enumerable:!0,configurable:!0}),s.prototype.openPopup=function(i,e){var t=this.popups.create();return t.content=i,v(e)&&(t.title=e),t.open(),t},s.prototype.closeAllPopups=function(){this.popups.each(function(i){i.close()})},Object.defineProperty(s.prototype,"readerAlertElement",{get:function(){if(!v(this._readerAlertElement)){var i=document.createElement("div");i.setAttribute("role","alert"),i.style.zIndex="-100000",i.style.opacity="0",i.style.position="absolute",i.style.top="0",this.SVGContainer.appendChild(i),this._readerAlertElement=i}return this._readerAlertElement},enumerable:!0,configurable:!0}),s.prototype.readerAlert=function(i){this.readerAlertElement.innerHTML=i},s.prototype.checkTransform=function(i){if(window.getComputedStyle){if(i&&i.style){var e=window.getComputedStyle(i,null);if(e){var t=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform");if(t&&t!=="none"){var n=t.split("(")[1].split(")")[0].split(","),r=Number(n[0]),a=Number(n[1]),o=Math.sqrt(r*r+a*a);isNaN(o)||(this.cssScale*=o)}}}i.parentNode&&i.parentNode instanceof HTMLElement&&this.checkTransform(i.parentNode)}},s}(),Wa=function(){function s(i,e){this.container=i,this.id=e;var t=document.createElementNS(zi,"svg");t.setAttribute("version","1.1"),t.setAttributeNS(Ah,"xmlns",zi),t.setAttributeNS(Ah,"xmlns:xlink",Ta),t.setAttribute("role","group"),this.container.appendChild(t),this.defs=document.createElementNS(zi,"defs"),t.appendChild(this.defs),t.style.width="100%",t.style.height="100%",t.style.overflow="visible",this.svg=t}return s.prototype.add=function(i){return new An(i)},s.prototype.addGroup=function(i){return new Eh(i)},s.prototype.append=function(i){i&&this.svg.appendChild(i.node)},s.prototype.appendDef=function(i){i&&this.defs.appendChild(i.node)},s.prototype.foreignObject=function(){return new An("foreignObject")},s.prototype.supportsForeignObject=function(){return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Extensibility","1.1")},s}(),Xa=null;function Ui(){if(Xa===null){var s=document.createElement("div");s.hidden=!0,s.style.width="1px",s.style.height="1px",s.style.position="absolute",s.style.zIndex="-1000000",document.body.appendChild(s);var i=new Na(s,!0);Xa=new Wa(i.SVGContainer,"ghost")}return Xa}var xi=function(s){function i(){var e=s.call(this)||this;e._elements=new re,e.properties={},e.className="Pattern",e.width=10,e.height=10,e.x=0,e.y=0,e.patternUnits="userSpaceOnUse";var t=new ae;return e.backgroundFill=t.getFor("background"),e.backgroundOpacity=0,e.fillOpacity=1,e.fill=t.getFor("alternativeBackground"),e.stroke=t.getFor("alternativeBackground"),e.strokeOpacity=1,e.strokeWidth=1,e.shapeRendering="crispEdges",e.rotation=0,e.element=e.paper.addGroup("pattern"),e.id="pattern-"+_.getUniqueId(),e.element.attr({id:e.id}),e._disposers.push(e.element),e._disposers.push(new fe(e._elements)),e.patternUnits=e.patternUnits,e.width=e.width,e.height=e.height,e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){var e=this,t=this.element;if(t){t.removeChildNodes();var n=this.paper.add("rect");n.attr({width:this.width,height:this.height,"shape-rendering":"crispEdges",fill:this.backgroundFill.hex,"fill-opacity":this.backgroundOpacity,stroke:this.backgroundFill.hex,"stroke-opacity":0}),t.add(n),t.attr({x:this.x,y:this.y,width:this.width,height:this.height,stroke:this.stroke.hex,fill:this.fill.hex,"fill-opacity":this.fillOpacity,"stroke-opacity":this.strokeOpacity,"stroke-width":this.strokeWidth,"shape-rendering":this.shapeRendering,patternUnits:this.patternUnits,"stroke-dasharray":this.strokeDasharray}),A(this._elements.iterator(),function(r){r.rotation=e.rotation,r.rotationX=e.properties.rotationX,r.rotationY=e.properties.rotationY,e.element.add(r)})}},i.prototype.animate=function(e,t,n){return new gt(this,e,t,n).start()},i.prototype.addElement=function(e){this._elements.push(e),this._disposers.push(e)},i.prototype.removeElement=function(e){this._elements.removeValue(e),this.removeDispose(e)},Object.defineProperty(i.prototype,"elements",{get:function(){return this._elements},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fillOpacity",{get:function(){return this.properties.fillOpacity},set:function(e){this.properties.fillOpacity=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fill",{get:function(){return this.properties.fill},set:function(e){this.properties.fill=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"backgroundFill",{get:function(){return this.properties.backgroundFill},set:function(e){this.properties.backgroundFill=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"backgroundOpacity",{get:function(){return this.properties.backgroundOpacity},set:function(e){this.properties.backgroundOpacity=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"stroke",{get:function(){return this.properties.stroke},set:function(e){this.properties.stroke=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"strokeOpacity",{get:function(){return this.properties.strokeOpacity},set:function(e){this.properties.strokeOpacity=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"strokeWidth",{get:function(){return this.properties.strokeWidth},set:function(e){this.properties.strokeWidth=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"shapeRendering",{get:function(){return this.properties.shapeRendering},set:function(e){this.properties.shapeRendering=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rotation",{get:function(){return this.properties.rotation},set:function(e){this.properties.rotation=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"patternUnits",{get:function(){return this.properties.patternUnits},set:function(e){this.properties.patternUnits=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"width",{get:function(){return this.properties.width},set:function(e){this.properties.width=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"height",{get:function(){return this.properties.height},set:function(e){this.properties.height=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"x",{get:function(){return this.properties.x},set:function(e){this.properties.x=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"y",{get:function(){return this.properties.y},set:function(e){this.properties.y=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"paper",{get:function(){return this._paper?this._paper:Ui()},set:function(e){this._paper!=e&&(this._paper=e,this.draw(),e.appendDef(this.element))},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){var t=this;s.prototype.copyFrom.call(this,e),X(e.properties,function(n,r){t[n]=r})},Object.defineProperty(i.prototype,"animations",{get:function(){return this._animations||(this._animations=[],this._disposers.push(new Yi(this._animations))),this._animations},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"strokeDasharray",{get:function(){return this.properties.strokeDashArray},set:function(e){this.properties.strokeDashArray=e,this.draw()},enumerable:!0,configurable:!0}),i.prototype.processConfig=function(e){if(e&&v(e.elements)&&Ae(e.elements))for(var t=0,n=e.elements.length;t13)switch(s%10){case 1:i="st";break;case 2:i="nd";break;case 3:i="rd"}return i},"Zoom Out":"",Play:"",Stop:"",Legend:"","Click, tap or press ENTER to toggle":"",Loading:"",Home:"",Chart:"","Serial chart":"","X/Y chart":"","Pie chart":"","Gauge chart":"","Radar chart":"","Sankey diagram":"","Flow diagram":"","Chord diagram":"","TreeMap chart":"","Force directed tree":"","Sliced chart":"",Series:"","Candlestick Series":"","OHLC Series":"","Column Series":"","Line Series":"","Pie Slice Series":"","Funnel Series":"","Pyramid Series":"","X/Y Series":"",Map:"","Press ENTER to zoom in":"","Press ENTER to zoom out":"","Use arrow keys to zoom in and out":"","Use plus and minus keys on your keyboard to zoom in and out":"",Export:"",Image:"",Data:"",Print:"","Press ENTER or use arrow keys to navigate":"","Click, tap or press ENTER to open":"","Click, tap or press ENTER to print.":"","Click, tap or press ENTER to export as %1.":"",'To save the image, right-click this link and choose "Save picture as..."':"",'To save the image, right-click thumbnail on the left and choose "Save picture as..."':"","(Press ESC to close this message)":"","Image Export Complete":"","Export operation took longer than expected. Something might have gone wrong.":"","Saved from":"",PNG:"",JPG:"",GIF:"",SVG:"",PDF:"",JSON:"",CSV:"",XLSX:"","Use TAB to select grip buttons or left and right arrows to change selection":"","Use left and right arrows to move selection":"","Use left and right arrows to move left selection":"","Use left and right arrows to move right selection":"","Use TAB select grip buttons or up and down arrows to change selection":"","Use up and down arrows to move selection":"","Use up and down arrows to move lower selection":"","Use up and down arrows to move upper selection":"","From %1 to %2":"","From %1":"","To %1":"","No parser available for file: %1":"","Error parsing file: %1":"","Unable to load file: %1":"","Invalid date":"",Close:"",Minimize:""};var Ya,Wt=function(s){function i(){var e=s.call(this)||this;return e.adapter=new it(e),e._locale=Kh,e._defaultLocale=Kh,e.className="Language",v(Z.defaultLocale)&&(e.locale=Z.defaultLocale),e.applyTheme(),e}return w(i,s),i.prototype.getLocale=function(e){return e==null&&(e=this._locale),this.adapter.apply("locale",{locale:e}).locale},i.prototype.translate=function(e,t){for(var n=[],r=2;r0&&(p=r[o-1].replace("[","").replace("]","")),n+=this.wrap(h,p,t)}}return n=this.unescape(n),this.cleanUp(n)},i.prototype.escape=function(e){return e.replace(/\[\[/g,_.getPlaceholder("1")).replace(/([^\/\]]{1})\]\]/g,"$1"+_.getPlaceholder("2")).replace(/\]\]/g,_.getPlaceholder("2")).replace(/\{\{/g,_.getPlaceholder("3")).replace(/\}\}/g,_.getPlaceholder("4")).replace(/\'\'/g,_.getPlaceholder("5"))},i.prototype.unescape=function(e){return e.replace(new RegExp(_.getPlaceholder("1"),"g"),"[[").replace(new RegExp(_.getPlaceholder("2"),"g"),"]]").replace(new RegExp(_.getPlaceholder("3"),"g"),"{{").replace(new RegExp(_.getPlaceholder("4"),"g"),"}}").replace(new RegExp(_.getPlaceholder("5"),"g"),"''")},i.prototype.cleanUp=function(e){return e.replace(/\[\[/g,"[").replace(/\]\]/g,"]").replace(/\{\{/g,"{").replace(/\}\}/g,"}").replace(/\'\'/g,"'")},i.prototype.wrap=function(e,t,n){return t!==""&&t!=="/"||(t=""),n==="html"?this.wrapHtml(e,this.translateStyleShortcuts(t)):this.wrapSvg(e,this.translateStyleShortcuts(t))},i.prototype.wrapSvg=function(e,t){return t===""?""+e+"":""+e+""},i.prototype.getSvgElement=function(e,t){var n=new An("tspan");return n.textContent=e,t&&n.node.setAttribute("style",t),n},i.prototype.wrapHtml=function(e,t){return t===""?""+e+"":""+e+""},i.prototype.getHtmlElement=function(e,t){var n=document.createElement("span");return n.innerHTML=e,t&&n.setAttribute("style",t),n},i.prototype.styleSvgToHtml=function(e){return e.replace(/fill:/,"color:")},i.prototype.translateStyleShortcuts=function(e){if(e==""||e=="[ ]")return"";var t=_.getCache("translateStyleShortcuts_"+e);if(t)return t;var n=e.match(/('[^']*')|("[^"]*")/gi);if(n)for(var r=0;rthis._negativeBase?o.positive:a=0?e.toExponential(t.decimals.passive).split("e"):e.toExponential().split("e"),e=Number(r[0]),o="e"+r[1],t.modSpacing&&(o=" "+o);else if(t.decimals.passive===0)e=Math.round(e);else if(t.decimals.passive>0){var d=Math.pow(10,t.decimals.passive);e=Math.round(e*d)/d}var c="",f=th(e).split("."),g=f[0];if(g.length0){for(var m=[],x=g.split("").reverse().join(""),b=0,C=g.length;b<=C;b+=t.thousands.interval){var S=x.substr(b,t.thousands.interval).split("").reverse().join("");S!==""&&m.unshift(S)}g=m.join(t.thousands.separator)}c+=g,f.length===1&&f.push("");var P=f[1];return P.length4&&C--,b=t.parts[m]=="YYYY"?Math.abs(C).toString():Math.abs(C).toString().substr(-t.parts[m].length),C<0&&(b+=n.translate("_era_bc"));break;case"u":case"F":case"g":break;case"q":b=""+Math.ceil((e.getMonth()+1)/3);break;case"MMMMM":b=n.translate(this.months[a]).substr(0,1);break;case"MMMM":b=n.translate(this.months[a]);break;case"MMM":b=n.translate(this.monthsShort[a]);break;case"MM":b=ze(a+1,2,"0");break;case"M":b=(a+1).toString();break;case"ww":b=ze(Wi(e,this.utc),2,"0");break;case"w":b=Wi(e,this.utc).toString();break;case"W":b=ih(e,this.utc).toString();break;case"dd":b=ze(l,2,"0");break;case"d":b=l.toString();break;case"DD":case"DDD":b=ze(va(e,this.utc).toString(),t.parts[m].length,"0");break;case"D":b=va(e,this.utc).toString();break;case"t":b=n.translateFunc("_dateOrd").call(this,l);break;case"E":b=(o||7).toString();break;case"EE":b=ze((o||7).toString(),2,"0");break;case"EEE":case"eee":b=n.translate(this.weekdaysShort[o]);break;case"EEEE":case"eeee":b=n.translate(this.weekdays[o]);break;case"EEEEE":case"eeeee":b=n.translate(this.weekdays[o]).substr(0,1);break;case"e":case"ee":b=(o-this.firstDayOfWeek+1).toString(),t.parts[m]=="ee"&&(b=ze(b,2,"0"));break;case"a":b=h>=12?n.translate("PM"):n.translate("AM");break;case"aa":b=h>=12?n.translate("P.M."):n.translate("A.M.");break;case"aaa":b=h>=12?n.translate("P"):n.translate("A");break;case"h":b=On(h).toString();break;case"hh":b=ze(On(h),2,"0");break;case"H":b=h.toString();break;case"HH":b=ze(h,2,"0");break;case"K":b=On(h,0).toString();break;case"KK":b=ze(On(h,0),2,"0");break;case"k":b=(h+1).toString();break;case"kk":b=ze(h+1,2,"0");break;case"m":b=p.toString();break;case"mm":b=ze(p,2,"0");break;case"s":b=u.toString();break;case"ss":b=ze(u,2,"0");break;case"S":case"SS":case"SSS":b=Math.round(d/1e3*Math.pow(10,t.parts[m].length)).toString();break;case"x":b=g.toString();break;case"n":case"nn":case"nnn":b=ze(d,t.parts[m].length,"0");break;case"z":b=Sn(e,!1,!1,this.utc);break;case"zz":b=Sn(e,!0,!1,this.utc);break;case"zzz":b=Sn(e,!1,!0,this.utc);break;case"zzzz":b=Sn(e,!0,!0,this.utc);break;case"Z":case"ZZ":var S=Math.abs(f)/60,P=Math.floor(S),O=60*S-60*P;this.utc&&(P=0,O=0),t.parts[m]=="Z"?(b="GMT",b+=f>0?"-":"+",b+=ze(P,2)+":"+ze(O,2)):(b=f>0?"-":"+",b+=ze(P,2)+ze(O,2));break;case"i":b=e.toISOString();break;case"I":b=e.toUTCString()}c=c.replace(st,b)}return c},i.prototype.parse=function(e,t){if(v(t)||(t=this.inputDateFormat),e instanceof Date)return e;if(typeof e=="number")return new Date(e);var n;typeof e!="string"&&(e=e.toString()),this.language||(this.sprite?this.language=this.sprite.language:this.language=new Wt);var r="";t=(t=Cn(t)).substr(0,e.length);for(var a=this.parseFormat(t),o={year:-1,year3:-1,year2:-1,year1:-1,month:-1,monthShort:-1,monthLong:-1,weekdayShort:-1,weekdayLong:-1,day:-1,yearDay:-1,week:-1,hourBase0:-1,hour12Base0:-1,hourBase1:-1,hour12Base1:-1,minute:-1,second:-1,millisecond:-1,millisecondDigits:-1,am:-1,zone:-1,timestamp:-1,iso:-1},l={year:1970,month:0,day:1,hour:0,minute:0,second:0,millisecond:0,timestamp:null,offset:0,utc:this.utc},h=0,p=0,u=0;u-1&&(l.year=parseInt(c[o.year])),o.year3>-1){var f=parseInt(c[o.year3]);f+=1e3,l.year=f}if(o.year2>-1&&(f=parseInt(c[o.year2]),f+=f>50?1e3:2e3,l.year=f),o.year1>-1&&(f=parseInt(c[o.year1]),f=10*Math.floor(new Date().getFullYear()/10)+f,l.year=f),o.monthLong>-1&&(l.month=this.resolveMonth(c[o.monthLong])),o.monthShort>-1&&(l.month=this.resolveShortMonth(c[o.monthShort])),o.month>-1&&(l.month=parseInt(c[o.month])-1),o.week>-1&&o.day===-1&&(l.month=0,l.day=nh(parseInt(c[o.week]),l.year,1,this.utc)),o.day>-1&&(l.day=parseInt(c[o.day])),o.yearDay>-1&&(l.month=0,l.day=parseInt(c[o.yearDay])),o.hourBase0>-1&&(l.hour=parseInt(c[o.hourBase0])),o.hourBase1>-1&&(l.hour=parseInt(c[o.hourBase1])-1),o.hour12Base0>-1&&((f=parseInt(c[o.hour12Base0]))==11&&(f=0),o.am>-1&&!this.isAm(c[o.am])&&(f+=12),l.hour=f),o.hour12Base1>-1&&((f=parseInt(c[o.hour12Base1]))==12&&(f=0),o.am>-1&&!this.isAm(c[o.am])&&(f+=12),l.hour=f),o.minute>-1&&(l.minute=parseInt(c[o.minute])),o.second>-1&&(l.second=parseInt(c[o.second])),o.millisecond>-1&&(f=parseInt(c[o.millisecond]),o.millisecondDigits==2?f*=10:o.millisecondDigits==1&&(f*=100),l.millisecond=f),o.timestamp>-1){l.timestamp=parseInt(c[o.timestamp]);var g=new Date(l.timestamp);l.year=g.getUTCFullYear(),l.month=g.getUTCMonth(),l.day=g.getUTCDate(),l.hour=g.getUTCHours(),l.minute=g.getUTCMinutes(),l.second=g.getUTCSeconds(),l.millisecond=g.getUTCMilliseconds()}o.zone>-1&&(l.offset=this.resolveTimezoneOffset(new Date(l.year,l.month,l.day),c[o.zone])),o.iso>-1&&(l.year=ce(c[o.iso+0]),l.month=ce(c[o.iso+1])-1,l.day=ce(c[o.iso+2]),l.hour=ce(c[o.iso+3]),l.minute=ce(c[o.iso+4]),l.second=ce(c[o.iso+5]),l.millisecond=ce(c[o.iso+6]),c[o.iso+7]=="Z"||c[o.iso+7]=="z"?l.utc=!0:c[o.iso+7]!=""&&(l.offset=this.resolveTimezoneOffset(new Date(l.year,l.month,l.day),c[o.iso+7]))),n=l.utc?new Date(Date.UTC(l.year,l.month,l.day,l.hour,l.minute,l.second,l.millisecond)):new Date(l.year,l.month,l.day,l.hour,l.minute+l.offset,l.second,l.millisecond)}else n=new Date(e);return n},i.prototype.resolveTimezoneOffset=function(e,t){if(t.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/)){var n=be(t.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/)),r=n[1],a=n[2],o=n[3],l=60*parseInt(a)+parseInt(o);return r=="+"&&(l*=-1),l-(e||new Date).getTimezoneOffset()}return 0},i.prototype.resolveMonth=function(e){var t=this.months.indexOf(e);return t>-1||this.language&&!this.language.isDefault()&&(t=this.language.translateAll(this.months).indexOf(e))>-1?t:0},i.prototype.resolveShortMonth=function(e){var t=this.monthsShort.indexOf(e);return t>-1||(t=this.months.indexOf(e))>-1||this.language&&!this.language.isDefault()&&(t=this.language.translateAll(this.monthsShort).indexOf(e))>-1?t:0},i.prototype.isAm=function(e){return this.getStringList(["AM","A.M.","A"]).indexOf(e.toUpperCase())>-1},i.prototype.invalidateSprite=function(){this.sprite&&this.sprite.invalidate()},i.prototype.getStringList=function(e){for(var t=[],n=0;nthis._negativeBase?o.positive:l"+h+"":this._outputFormat==="html"&&(h=""+h+"")),h},i.prototype.parseFormat=function(e,t){var n=this,r=this.getCache(e);if(v(r))return r;var a=t||this._baseUnit,o={positive:{color:"",template:"",parts:[],source:"",baseUnit:a,parsed:!1,absolute:!1},negative:{color:"",template:"",parts:[],source:"",baseUnit:a,parsed:!1,absolute:!1},zero:{color:"",template:"",parts:[],source:"",baseUnit:a,parsed:!1,absolute:!1}},l=(e=e.replace("||",mi)).split("|");return o.positive.source=l[0],l[2]===void 0?o.zero=o.positive:o.zero.source=l[2],l[1]===void 0?o.negative=o.positive:o.negative.source=l[1],X(o,function(h,p){if(!p.parsed)if(n.getCache(p.source)===void 0){var u,d=p.source;(u=p.source.match(/^\[([^\]]*)\]/))&&u.length&&u[0]!==""&&(d=p.source.substr(u[0].length),p.color=u[1]);for(var c=Ft().chunk(d,!0),f=0;f div > ."+n+"-menu ."+n+"-item."+n+"-item-level-0, ."+n+"-item."+n+"-item-level-0.active",{opacity:"0.9"}),new ue(e,"."+n+"-item."+n+"-item-level-0 > a",{padding:"0","text-align":"center",overflow:"hidden"}),new ue(e,"."+n+"-item."+n+"-item-level-0:before",{display:"block"}),new ue(e,"."+n+"-item",{position:"relative",display:"block",opacity:"0","z-index":"1","border-radius":"3px","background-color":r.getFor("secondaryButton").hex,padding:"0",margin:"1px 1px 0 0",color:r.getFor("secondaryButton").alternative.hex,transition:"all 100ms ease-in-out, opacity 0.5s ease 0.5s"}),new ue(e,"."+n+"-left ."+n+"-item",{margin:"1px 0 0 1px"}),new ue(e,"."+n+"-item:hover, ."+n+"-item.active",{background:r.getFor("secondaryButtonHover").hex,color:r.getFor("secondaryButtonText").hex}),new ue(e,"."+n+"-item > ."+n+"-menu",{position:"absolute",top:"-1px",right:"0","margin-right":"100%"}),new ue(e,"."+n+"-left ."+n+"-item > ."+n+"-menu",{left:"0",right:"auto","margin-left":"100%","margin-right":"auto"}),new ue(e,"."+n+"-right ."+n+"-item > ."+n+"-menu",{left:"auto",right:"0","margin-left":"auto","margin-right":"100%"}),new ue(e,"."+n+"-top ."+n+"-item > ."+n+"-menu",{top:"-1px",bottom:"auto"}),new ue(e,"."+n+"-bottom ."+n+"-item > ."+n+"-menu",{top:"auto",bottom:"0"}),new ue(e,"."+n+"-item > ."+n+"-menu",{display:"none"}),new ue(e,"."+n+"-item:hover > ."+n+"-menu, ."+n+"-item.active > ."+n+"-menu",{display:"block"}),new ue(e,"."+n+"-item:hover > ."+n+"-menu > ."+n+"-item, ."+n+"-item.active > ."+n+"-menu > ."+n+"-item",{opacity:"1"}),new ue(e,"."+n+"-menu",{display:"block","list-style":"none",margin:"0",padding:"0"}),new ue(e,"."+n+"-label",{display:"block",cursor:"default",padding:"0.5em 1em"}),new ue(e,"."+n+"-icon",{display:"block",cursor:"default",padding:"0.2em 0.4em",width:"1.2em",height:"1.2em","min-width":"32px","min-height":"32px",margin:"auto auto","border-radius":"3px"}),new ue(e,"."+n+"-item-level-0 > ."+n+"-icon",{padding:"0.1em 0.2em"}),new ue(e,"."+n+"-clickable",{cursor:"pointer"})]);return new un(function(){Zh.removeKey(n),a.dispose()})}).increment())),this._element&&(this._element.style.display="")},Object.defineProperty(i.prototype,"tabindex",{get:function(){return this.adapter.apply("tabindex",{tabindex:this._tabindex}).tabindex},set:function(e){this._tabindex=e,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"language",{get:function(){var e=this,t=this._language.get();return t==null&&(t=new Wt,this._language.set(t,t.events.on("localechanged",function(n){e.invalidate()}))),t},set:function(e){var t=this;this._language.set(e,e.events.on("localechanged",function(n){t.invalidate()})),this.invalidate()},enumerable:!0,configurable:!0}),i.prototype.close=function(){var e=this;if(!this.isDisposed())if(this._ignoreNextClose)this._ignoreNextClose=!1;else{if(this.closeOnClick&&(this._element.style.pointerEvents="none",setTimeout(function(){e._element.style.pointerEvents="auto"},100)),this._currentSelection&&(this.setBlur(this._currentSelection),this._currentSelection=void 0),this._element)for(var t=this._element.getElementsByClassName("active"),n=t.length-1;n>=0;n--)t[n]&&Lr(t[n],"active");this.events.dispatchImmediately("closed",{type:"closed",target:this})}},i.prototype.selectBranch=function(e){var t=this;if(!this.isDisposed()&&(e.closeTimeout&&(this.removeDispose(e.closeTimeout),e.closeTimeout=void 0),Mr(e.element,"active"),e.submenuElement&&e.submenuElement.setAttribute("aria-expanded","true"),this._currentSelection&&this._currentSelection!==e&&this._currentSelection.ascendants&&A(Il(qt([this._currentSelection]),this._currentSelection.ascendants.iterator()),function(r){e.ascendants.contains(r)||e===r||t.unselectBranch(r,!0)}),A(e.ascendants.iterator(),function(r){r.closeTimeout&&(t.removeDispose(r.closeTimeout),r.closeTimeout=void 0),Mr(r.element,"active")}),this._currentSelection=e,this.events.isEnabled("branchselected"))){var n={type:"branchselected",target:this,branch:e};this.events.dispatchImmediately("branchselected",n)}},i.prototype.unselectBranch=function(e,t){if(!this.isDisposed()&&(Lr(e.element,"active"),e.submenuElement&&e.submenuElement.removeAttribute("aria-expanded"),this._currentSelection==e&&(this._currentSelection=void 0),this.events.isEnabled("branchunselected"))){var n={type:"branchunselected",target:this,branch:e};this.events.dispatchImmediately("branchunselected",n)}},i.prototype.delayUnselectBranch=function(e,t){var n=this;this.isDisposed()||(e.closeTimeout&&(this.removeDispose(e.closeTimeout),e.closeTimeout=void 0),e.closeTimeout=this.setTimeout(function(){n.unselectBranch(e,t)},this.closeDelay),t!==!0&&e.ascendants&&A(e.ascendants.iterator(),function(r){n.delayUnselectBranch(r,!0)}))},i.prototype.moveSelection=function(e){if(!this.isDisposed()&&this._currentSelection){var t;if(e=="up")t=this.getPrevSibling(this._currentSelection);else if(e=="down")t=this.getNextSibling(this._currentSelection);else if(e=="left"&&this.align=="right"||e=="right"&&this.align=="left"){var n=this.getSubMenu(this._currentSelection);n!=null&&(t=n[0])}else(e=="right"&&this.align=="right"||e=="left"&&this.align=="left")&&(t=this.getParentItem(this._currentSelection));t&&t!==this._currentSelection&&(this.selectBranch(t),this.setFocus(t),this._currentSelection=t)}},i.prototype.getSiblings=function(e){var t=this.getParentItem(e);return t&&t.menu?t.menu:[]},i.prototype.getParentItem=function(e){return e.ascendants&&e.ascendants.length?e.ascendants.getIndex(e.ascendants.length-1):void 0},i.prototype.getNextSibling=function(e){var t=this.getSiblings(e);if(t.length>1){var n=t.indexOf(e)+1;return t[n=t.length==n?0:n].unsupported?this.getNextSibling(t[n]):t[n]}return e},i.prototype.getPrevSibling=function(e){var t=this.getSiblings(e);if(t.length>1){var n=t.indexOf(e)-1;return t[n=n==-1?t.length-1:n].unsupported?this.getPrevSibling(t[n]):t[n]}return e},i.prototype.setFocus=function(e){if(e.interactions)try{e.interactions.element.focus()}catch{}},i.prototype.setBlur=function(e){if(e.interactions)try{e.interactions.element.blur()}catch{}},i.prototype.hideBranch=function(e){e.element.style.display="none"},i.prototype.showBranch=function(e){e.element.style.display=""},Object.defineProperty(i.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),i}(Ga);function Fn(s,i,e){return new Promise(function(t,n){var r=v(e)&&e.responseType=="blob",a=new XMLHttpRequest;if(a.onload=function(){if(a.status===200){var h,p;if(r)return void $h(h=a.response).then(function(d){var c={xhr:a,error:!1,response:d,blob:h,type:a.getResponseHeader("Content-Type"),target:i};t(c)});p=a.responseText||a.response;var u={xhr:a,error:!1,response:p,blob:h,type:a.getResponseHeader("Content-Type"),target:i};t(u)}else n({xhr:a,error:!0,type:a.getResponseHeader("Content-Type"),target:i})},a.onerror=function(){n({xhr:a,error:!0,type:a.getResponseHeader("Content-Type"),target:i})},a.open("GET",s,!0),e&&e.withCredentials&&(a.withCredentials=!0),v(e)){if(v(e.requestHeaders))for(var o=0;o to load"))},1e4)})];case 3:return[2,e.sent()];case 4:return[2]}})})}function Qh(s,i,e){return de(this,void 0,void 0,function(){var t,n,r,a;return pe(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,Fn(i)];case 1:return t=o.sent(),[3,3];case 2:return n=o.sent(),console.error("Failed to load stylesheet",i,n),[2];case 3:(r=s.createElement("style")).textContent=t.response,Z.nonce!=""&&r.setAttribute("nonce",Z.nonce),s.head.appendChild(r),o.label=4;case 4:return o.trys.push([4,,7,8]),[4,od(r)];case 5:return a=o.sent(),[4,ep(s,i,a,e)];case 6:return o.sent(),[3,8];case 7:return s.head.removeChild(r),[7];case 8:return[2]}})})}function ep(s,i,e,t){return de(this,void 0,void 0,function(){var n,r,a,o,l;return pe(this,function(h){switch(h.label){case 0:for(n=[],r=e.length,a=0;a"+m[0]+""+this.serializeElement(this.sprite.paper.defs)+this.serializeElement(this.sprite.dom),e,l,h,d,p,u),b=new Blob([x],{type:"image/svg+xml"}),r=n.createObjectURL(b),[4,this.loadNewImage(r,l*d*c,h*d*c,"anonymous")];case 3:return C=S.sent(),f.drawImage(C,0,0),[3,5];case 4:return r!==null&&n.revokeObjectURL(r),a!==null&&j(a,function(P){n.revokeObjectURL(P)}),this.restoreRemovedObjects(),[7];case 5:return[2,o]}})})},i.prototype.getCanvasAdvanced=function(e){return de(this,void 0,void 0,function(){var t,n,r,a,o,l,h,p,u,d,c;return pe(this,function(f){switch(f.label){case 0:return v(e)||(e={}),[4,this.imagesToDataURI(this.sprite.dom,e)];case 1:return f.sent(),t=this.backgroundColor||this.findBackgroundColor(this.sprite.dom),[4,this.canvg];case 2:return n=f.sent(),r=this.sprite.pixelWidth,a=this.sprite.pixelHeight,o=jr(this.sprite.dom),l=Er(this.sprite.dom),h=e.scale||1,p=this.getPixelRatio(e),h=this.getAdjustedScale(r*p,a*p,h,e),u=this.normalizeSVG(this.serializeElement(this.sprite.paper.defs)+this.serializeElement(this.sprite.dom),e,r,a,h,o,l,t),(d=this.getDisposableCanvas()).style.width=r*p*h+"px",d.style.height=a*p*h+"px",d.width=r*p*h,d.height=a*p*h,c={useCORS:!0},p!=1&&(c.ignoreDimensions=!0,c.scaleWidth=r*p*h,c.scaleHeight=a*p*h),[4,n.fromString(d.getContext("2d"),u,c).render()];case 3:return f.sent(),[2,d]}})})},i.prototype.getImageAdvanced=function(e,t,n){return de(this,void 0,void 0,function(){var r,a,o;return pe(this,function(l){switch(l.label){case 0:return(r=this._objectsAlreadyHidden)||this.hideNonExportableSprites(),v(t)||(t=this.getFormatOptions(e)),[4,this.getCanvasAdvanced(t)];case 1:return a=l.sent(),n===!1?[3,3]:[4,this.addExtras(a,t,!0)];case 2:a=l.sent(),l.label=3;case 3:return o=a.toDataURL(this.getContentType(e),t.quality),this.disposeCanvas(a),r||this.restoreNonExportableSprites(),[2,o]}})})},i.prototype.getDisposableCanvas=function(){var e=document.createElement("canvas");return e.style.position="fixed",e.style.top="-10000px",document.body.appendChild(e),e},i.prototype.disposeCanvas=function(e){document.body.removeChild(e)},i.prototype.getPixelRatio=function(e){return this.useRetina?$l():1},i.prototype.getAdjustedScale=function(e,t,n,r){if(!r)return n;var a,o,l=e*n,h=e*n;return r.maxWidth&&l>r.maxWidth&&(a=r.maxWidth/e),r.maxHeight&&h>r.maxHeight&&(o=r.maxHeight/t),a||o?ie(a,o):(r.minWidth&&l",{},1,1)],{type:"image/svg+xml"}),o=r.createObjectURL(a),l=void 0,h.label=2;case 2:return h.trys.push([2,4,,5]),[4,this.loadNewImage(o,1,1)];case 3:return l=h.sent(),[3,5];case 4:return h.sent(),[2,!1];case 5:n.drawImage(l,0,0),r.revokeObjectURL(o);try{return _.setCache("simplifiedImageExport",!0),[2,!0]}catch{return _.setCache("simplifiedImageExport",!1),[2,!1]}return[3,7];case 6:return h.sent(),_.setCache("simplifiedImageExport",!1),[2,!1];case 7:return[2]}})})},i.prototype.loadNewImage=function(e,t,n,r){return new Promise(function(a,o){var l;function h(){if(r){var p=l.src;l.onerror=function(){o(new Error('Loading image "'+e+'" failed'))},l.removeAttribute("crossorigin"),l.src="",l.src=p}else o(new Error('Loading image "'+e+'" failed'))}l=t&&n?new Image(t,n):new Image,r&&l.setAttribute("crossOrigin",r),l.onload=function(){a(l)},l.onabort=h,l.onerror=h,l.src=e})},i.prototype.getDOMURL=function(){return self.URL||self.webkitURL||self},i.prototype.getSVG=function(e,t,n){return n===void 0&&(n=!0),de(this,void 0,void 0,function(){var r,a,o,l,h,p,u,d,c,f;return pe(this,function(g){switch(g.label){case 0:return(r=this._objectsAlreadyHidden)||this.hideNonExportableSprites(),v(t)||(t=this.getFormatOptions("svg")),[4,this.awaitValidSprites()];case 1:return g.sent(),a=this.sprite.pixelWidth,o=this.sprite.pixelHeight,l=jr(this.sprite.dom),h=Er(this.sprite.dom),p=t.scale||1,u=this.getPixelRatio(t),p=this.getAdjustedScale(a*u,o*u,p,t),d=this.normalizeSVG(this.serializeElement(this.sprite.paper.defs)+this.serializeElement(this.sprite.dom),t,a,o,p,l,h),c=this.adapter.apply("charset",{charset:"charset=utf-8",type:"svg",options:t}).charset,f=this.adapter.apply("getSVG",{data:n?"data:"+this.getContentType(e)+";"+c+","+encodeURIComponent(d):d,options:t}).data,r||this.restoreNonExportableSprites(),[2,f]}})})},i.prototype.normalizeSVG=function(e,t,n,r,a,o,l,h){var p="";n&&(p+='width="'+Math.round(n*(a||1))+'px" '),r&&(p+='height="'+Math.round(r*(a||1))+'px" ');var u="";o&&(u+="font-family: "+o.replace(/"/g,"")+";"),l&&(u+="font-size: "+l+";"),a&&(p+='viewBox="0 0 '+n+" "+r+'" ');var d=[],c=e.match(//gi);if(c)for(var f=0;f]*)width="[^"]*"/,"$1")).replace(/(]*)height="[^"]*"/,"$1")).replace(/('+e+"",h&&(e=e.replace(/(]*>)/,'$1')),/MSIE |Trident\//.test(navigator.userAgent)&&(e=e.replace(/]*\/>/gi,""));var g=new RegExp("url\\("+xr(Ni()),"g");if(e=(e=e.replace(g,"url(#")).replace(/url\("([^)]*)"\)/gm,"url($1)"),d.length)for(f=0;fg?1:fd?1:ub?1:xd?1:uC?-1:b=0)&&(c='"'+c+'"'),l.push(c)},function(p,u){var d=h.indexOf(p),c=h.indexOf(u);return d>c?1:d",t.tableClass&&(r=''),a=this.adapter.apply("formatDataFields",{dataFields:this.dataFields,format:"html"}).dataFields,o=this.data,t.pivot)l=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"html"}).dataFieldsOrder,r+=` `,At(a,function(f,g){var m=[];t.addColumnNames&&m.push(g);for(var x=o.length,b=0;bx?-1:m`;else{for(t.addColumnNames&&(r+=` `+this.getHTMLRow(a,t,void 0,!0,!0)+` `),r+=` `,h=o.length,p=0;p`}return r+=`
`,u=this.adapter.apply("charset",{charset:"charset=utf-8",type:e,options:t}).charset,[2,this.adapter.apply("getHTML",{data:n?"data:"+this.getContentType(e)+";"+u+","+encodeURIComponent(r):r,options:t}).data]})})},i.prototype.getHTMLRow=function(e,t,n,r,a){var o=this;r===void 0&&(r=!1),a===void 0&&(a=!1);var l=" ";t.rowClass&&(l=' '),n||(n=e);var h=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"html"}).dataFieldsOrder,p=a?"th":"td",u=!0;return At(n,function(d,c){var f=o.convertEmptyValue(d,e[d],t),g=r?f:o.convertToSpecialFormat(d,f,t);g=(g=""+g).replace(/[\u00A0-\u9999<>\&]/gim,function(x){return"&#"+x.charCodeAt(0)+";"});var m=p;t.pivot&&u&&(m="th"),t.cellClass?l+=` <`+m+' class="'+t.cellClass+'">'+g+"":l+=` <`+m+">"+g+"",u=!1},function(d,c){var f=h.indexOf(d),g=h.indexOf(c);return f>g?1:f`},i.prototype.getJSON=function(e,t,n){return n===void 0&&(n=!0),de(this,void 0,void 0,function(){var r,a,o,l,h,p,u,d,c=this;return pe(this,function(f){if(v(t)||(t=this.getFormatOptions("json")),a=this.adapter.apply("formatDataFields",{dataFields:this.dataFields,format:"json"}).dataFields,this._dynamicDataFields)r=this.data;else for(r=[],o=this.data,l=function(g,m){var x=o[m];if(typeof x=="object"){var b={};X(x,function(C,S){v(a[C])&&(b[a[C]]=c.convertToSpecialFormat(C,S,t))}),r.push(b)}},h=o.length,p=0;p

'+this.language.translate('To save the image, right-click thumbnail on the left and choose "Save picture as..."')+'

'+this.language.translate("(Press ESC to close this message)")+"

",this.language.translate("Image Export Complete")):(x=void 0,t.match(/\.svg$/)?x="image/svg+xml":(x="text/plain",t+=".txt"),(b=document.createElement("iframe")).width="1px",b.height="1px",b.style.display="none",document.body.appendChild(b),(C=b.contentDocument).open(x,"replace"),C.write(decodeURIComponent(m[3])),C.close(),C.execCommand("SaveAs",!0,t),document.body.removeChild(b))):window.location.href=e;return[2,!0]})})},i.prototype.downloadSupport=function(){return this.linkDownloadSupport()||this.msBlobDownloadSupport()},i.prototype.linkDownloadSupport=function(){var e=_.getCache("linkDownloadSupport");if(e===!1||e===!0)return e;var t=document.createElement("a").download!==void 0;return _.setCache("linkDownloadSupport",t),t},i.prototype.blobDownloadSupport=function(){return v(window.Blob)},i.prototype.msBlobDownloadSupport=function(){return v(window.navigator.msSaveOrOpenBlob)},i.prototype.legacyIE=function(){var e=document.createElement("div");return e.innerHTML="",e.getElementsByTagName("i").length==1},i.prototype.print=function(e,t,n){return de(this,void 0,void 0,function(){return pe(this,function(r){return t.printMethod=="css"?[2,this.printViaCSS(e,t,n)]:[2,this.printViaIframe(e,t,n)]})})},i.prototype.printViaCSS=function(e,t,n){return de(this,void 0,void 0,function(){var r,a,o,l;return pe(this,function(h){return r=document.documentElement.scrollTop||document.body.scrollTop,a=new ue(Va(this.container),"body > *",{display:"none",position:"fixed",visibility:"hidden",opacity:"0",clipPath:"polygon(0px 0px,0px 0px,0px 0px,0px 0px);"}),n&&document&&document.title&&(o=document.title,document.title=n),(l=new Image).src=e,l.style.maxWidth="100%",l.style.display="block",l.style.position="relative",l.style.visibility="visible",l.style.opacity="1",l.style.clipPath="none",document.body.appendChild(l),this.setTimeout(function(){window.print()},50),/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&t.delay<1e3?t.delay=1e3:t.delay<100&&(t.delay=100),this.setTimeout(function(){document.body.removeChild(l),a.dispose(),o&&(document.title=document.title),document.documentElement.scrollTop=document.body.scrollTop=r},t.delay||500),[2,!0]})})},i.prototype.printViaIframe=function(e,t,n){return de(this,void 0,void 0,function(){var r,a;return pe(this,function(o){return(r=document.createElement("iframe")).style.visibility="hidden",document.body.appendChild(r),r.contentWindow.document.open(),r.contentWindow.document.close(),(a=new Image).src=e,a.style.maxWidth="100%",a.style.height="auto",n&&(r.contentWindow.document.title=n),r.contentWindow.document.body.appendChild(a),r.load=function(){r.contentWindow.document.body.appendChild(a)},this.setTimeout(function(){try{r.contentWindow.document.execCommand("print",!1,null)||r.contentWindow.print()}catch{r.contentWindow.print()}},t.delay||50),/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&t.delay<1e3?t.delay=1e3:t.delay<100&&(t.delay=100),this.setTimeout(function(){document.body.removeChild(r)},t.delay+50||100),[2,!0]})})},i.prototype.findBackgroundColor=function(e){var t=1,n=Aa(e,"background-color");if((n.match(/[^,]*,[^,]*,[^,]*,[ ]?0/)||n=="transparent")&&(t=0),t==0){var r=e.parentElement;return r?this.findBackgroundColor(r):B("#fff")}return B(n,t)},Object.defineProperty(i.prototype,"container",{get:function(){return this.adapter.apply("container",{container:this._container}).container},set:function(e){this._container=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sprite",{get:function(){return this.adapter.apply("sprite",{sprite:this._sprite}).sprite},set:function(e){this._sprite=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"extraSprites",{get:function(){return this.adapter.apply("extraSprites",{extraSprites:this._extraSprites}).extraSprites},set:function(e){this._extraSprites=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"validateSprites",{get:function(){return this.adapter.apply("validateSprites",{validateSprites:this._validateSprites}).validateSprites},set:function(e){this._validateSprites=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"data",{get:function(){return this.adapter.apply("data",{data:this._data}).data},set:function(e){this._data=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dataFields",{get:function(){return this._dataFields||this.generateDataFields(),this.adapter.apply("dataFields",{dataFields:this._dataFields}).dataFields},set:function(e){this._dataFields=e,this._dynamicDataFields=!1},enumerable:!0,configurable:!0}),i.prototype.handleDataUpdated=function(){this._dynamicDataFields&&(this._dataFields=void 0);var e=this.data.length>0;this._prevHasData!=e&&(this._prevHasData=e,this.menu&&this.menu.invalidate())},Object.defineProperty(i.prototype,"dateFormatter",{get:function(){return this._dateFormatter||(this._dateFormatter=new Gi,this._dateFormatter.language=this.language),this.adapter.apply("dateFormatter",{dateFormatter:this._dateFormatter}).dateFormatter},set:function(e){this._dateFormatter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dateFormat",{get:function(){return this.adapter.apply("dateFormat",{dateFormat:this._dateFormat}).dateFormat},set:function(e){this._dateFormat=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dateFields",{get:function(){return this._dateFields||(this._dateFields=new re),this.adapter.apply("dateFields",{dateFields:this._dateFields}).dateFields},set:function(e){this._dateFields=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"numberFormatter",{get:function(){return this._numberFormatter||(this._numberFormatter=new Br,this._numberFormatter.language=this.language),this.adapter.apply("numberFormatter",{numberFormatter:this._numberFormatter}).numberFormatter},set:function(e){this._numberFormatter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"numberFormat",{get:function(){return this.adapter.apply("numberFormat",{numberFormat:this._numberFormat}).numberFormat},set:function(e){this._numberFormat=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"numberFields",{get:function(){return this._numberFields||(this._numberFields=new re),this.adapter.apply("numberFields",{numberFields:this._numberFields}).numberFields},set:function(e){this._numberFields=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"durationFormatter",{get:function(){return this._durationFormatter||(this._durationFormatter=new Hr,this._durationFormatter.language=this.language),this.adapter.apply("durationFormatter",{durationFormatter:this._durationFormatter}).durationFormatter},set:function(e){this._durationFormatter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"durationFormat",{get:function(){return this.adapter.apply("durationFormat",{durationFormat:this._durationFormat}).durationFormat},set:function(e){this._durationFormat=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"durationFields",{get:function(){return this._durationFields||(this._durationFields=new re),this.adapter.apply("durationFields",{durationFields:this._durationFields}).durationFields},set:function(e){this._durationFields=e},enumerable:!0,configurable:!0}),i.prototype.generateDataFields=function(){var e=this;this._dataFields={},this.data.length&&j(this.data,function(t){X(t,function(n,r){v(e._dataFields[n])||(e._dataFields[n]=e.adapter.apply("dataFieldName",{name:n,field:n}).name)})})},i.prototype.isDateField=function(e){return this.adapter.apply("isDateField",{isDateField:this.dateFields.contains(e),field:e}).isDateField},i.prototype.isNumberField=function(e){return this.adapter.apply("isNumberField",{isNumberField:this.numberFields.contains(e),field:e}).isNumberField},i.prototype.isDurationField=function(e){return this.adapter.apply("isDurationField",{isDurationField:this.durationFields.contains(e),field:e}).isDurationField},i.prototype.getContentType=function(e){var t="";switch(e){case"png":case"gif":t="image/"+e;break;case"jpg":t="image/jpeg";break;case"svg":t="image/svg+xml";break;case"csv":t="text/csv";break;case"json":t="application/json";break;case"html":t="text/html";break;case"pdf":case"pdfdata":t="application/pdf";break;case"xlsx":t="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}return this.adapter.apply("contentType",{contentType:t,type:e}).contentType},Object.defineProperty(i.prototype,"filePrefix",{get:function(){return this.adapter.apply("filePrefix",{filePrefix:this._filePrefix}).filePrefix},set:function(e){this._filePrefix=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"backgroundColor",{get:function(){return this.adapter.apply("backgroundColor",{backgroundColor:this._backgroundColor}).backgroundColor},set:function(e){this._backgroundColor=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"title",{get:function(){return this.adapter.apply("title",{title:this._title}).title},set:function(e){this._title=e},enumerable:!0,configurable:!0}),i.prototype.showPreloader=function(){var e=this.preloader;e&&(e.progress=.5,e.label.text="...")},i.prototype.hidePreloader=function(){var e=this.preloader;e&&(e.progress=1)},Object.defineProperty(i.prototype,"preloader",{get:function(){return this._sprite&&this._sprite.parent&&this._sprite.parent.preloader?this._sprite.parent.preloader:void 0},enumerable:!0,configurable:!0}),i.prototype.showTimeout=function(){this.showModal(this.adapter.apply("timeoutMessage",{message:this.language.translate("Export operation took longer than expected. Something might have gone wrong.")}).message)},i.prototype.hideTimeout=function(){this._timeoutTimeout&&(this.removeDispose(this._timeoutTimeout),this._timeoutTimeout=null),this.hideModal()},Object.defineProperty(i.prototype,"language",{get:function(){return this._language||(this._language=new Wt),this._language},set:function(e){this._language=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"modal",{get:function(){return this._modal||(this._modal=new Ea,this._modal.adapter.add("classPrefix",function(e){return Z.classNamePrefix+e})),this._modal},enumerable:!0,configurable:!0}),i.prototype.showModal=function(e,t){this.hideModal(),this.hidePreloader();var n=this.modal;n.container=this.sprite.svgContainer.SVGContainer,n.content=e,n.readerTitle=t,n.open()},i.prototype.hideModal=function(){this._modal&&this.modal.close()},i.prototype._canvg=function(){return de(this,void 0,void 0,function(){var e;return pe(this,function(t){switch(t.label){case 0:return[4,N.e(265).then(N.bind(N,1234))];case 1:return(e=t.sent()).default!=null?[2,e.default]:[2,e]}})})},Object.defineProperty(i.prototype,"canvg",{get:function(){return this._canvg()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pdfmake",{get:function(){return Ua==null&&(Ua=function(){return de(this,void 0,void 0,function(){var e,t,n,r;return pe(this,function(a){switch(a.label){case 0:return[4,Promise.all([N.e(643).then(N.t.bind(N,6727,23)),N.e(643).then(N.bind(N,4995))])];case 1:return e=a.sent(),t=e[0],n=e[1],(r=window).pdfMake=r.pdfMake||{},r.pdfMake.vfs=n.default,t.vfs=n.default,[2,t]}})})}()),Ua},enumerable:!0,configurable:!0}),i.prototype._xlsx=function(){return de(this,void 0,void 0,function(){return pe(this,function(e){switch(e.label){case 0:return[4,Promise.all([N.e(739),N.e(297)]).then(N.t.bind(N,7739,23))];case 1:return[2,e.sent()]}})})},Object.defineProperty(i.prototype,"xlsx",{get:function(){return this._xlsx()},enumerable:!0,configurable:!0}),i.prototype.setFormatOptions=function(e,t){this._formatOptions.setKey(e,t)},i.prototype.getFormatOptions=function(e){return this._formatOptions.getKey(e)},Object.defineProperty(i.prototype,"formatOptions",{get:function(){return this._formatOptions},enumerable:!0,configurable:!0}),i.prototype._disablePointers=function(){v(this._spriteInteractionsEnabled)||(this._spriteInteractionsEnabled=this.sprite.interactionsEnabled),this.sprite.interactionsEnabled=!1},i.prototype._releasePointers=function(){v(this._spriteInteractionsEnabled)&&!this._exportRunning&&(this.sprite.interactionsEnabled=this._spriteInteractionsEnabled)},i.prototype.hideNonExportableSprites=function(){var e=this;if(!this._objectsAlreadyHidden){var t=this.sprite.svgContainer;t&&j(t.nonExportableSprites,function(n){n.isHidden||n.isHiding||!n.visible||e._hiddenObjects.push(n),n.hide(0)}),this._objectsAlreadyHidden=!0}},i.prototype.restoreNonExportableSprites=function(){this._objectsAlreadyHidden&&(j(this._hiddenObjects,function(e){e.show(0)}),this._hiddenObjects=[],this._objectsAlreadyHidden=!1)},i.prototype.awaitValidSprites=function(){return de(this,void 0,void 0,function(){var e;return pe(this,function(t){switch(t.label){case 0:return e=[],this.validateSprites.length&&j(this.validateSprites,function(n,r){n.invalid&&e.push(new Promise(function(a,o){n.events.once("validated",function(l){a()})}))}),e.length?[4,Promise.all(e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},i.prototype.processConfig=function(e){_.registeredClasses.ExportMenu=qh,e&&(v(e.menu)&&!v(e.menu.type)&&(e.menu.type="ExportMenu"),v(e.dataFields)&&ye(e.dataFields)&&(this.dataFields=e.dataFields,delete e.dataFields)),s.prototype.processConfig.call(this,e)},i.XLINK="http://www.w3.org/1999/xlink",i}(Ga),Ie=["fill","fillOpacity","stroke","strokeOpacity","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin"],$=function(s){function i(){var e=s.call(this)||this;return e.properties={},e._eventDispatcher=new Ih(e),e._bindings={},e._isTemplate=!1,e._isPath=!1,e._inited=!1,e._ready=!1,e.isHiding=!1,e._isHidden=!1,e.isShowing=!1,e.isStandaloneInstance=!1,e._isActive=!1,e._mask=new Me,e._positionPrecision=3,e._language=new Me,e._exporting=new Me,e._exportable=!0,e._bbox={x:0,y:0,width:0,height:0},e.invalid=!1,e.positionInvalid=!1,e.propertyFields={},e.applyOnClones=!1,e._measuredWidthSelf=0,e._measuredHeightSelf=0,e.maxLeft=0,e.maxRight=0,e.maxTop=0,e.maxBottom=0,e.maxLeftSelf=0,e.maxRightSelf=0,e.maxTopSelf=0,e.maxBottomSelf=0,e._isDragged=!1,e._isResized=!1,e._disabled=!1,e._internalDisabled=!1,e._updateDisabled=!1,e._internalDefaultsApplied=!1,e.rollOutDelay=0,e.isBaseSprite=!1,e.shouldClone=!0,e.appeared=!1,e.ex=0,e.ey=0,e.dragWhileResize=!1,e.measureFailed=!1,e.preventShow=!1,e.cloneTooltip=!0,e.className="Sprite",e._disposers.push(e._eventDispatcher),e.uid,e.group=e.paper.addGroup("g"),e.setPropertyValue("scale",1),e.setPropertyValue("rotation",0),e.setPropertyValue("align","none"),e.setPropertyValue("valign","none"),e.setPropertyValue("pixelPerfect",!1),e.setPropertyValue("visible",!0),e.setPropertyValue("tooltipPosition","fixed"),e.setPropertyValue("verticalCenter","none"),e.setPropertyValue("horizontalCenter","none"),e.setPropertyValue("tooltipX",F(50)),e.setPropertyValue("tooltipX",F(50)),e.setPropertyValue("marginTop",0),e.setPropertyValue("marginBottom",0),e.setPropertyValue("marginLeft",0),e.setPropertyValue("marginRight",0),e.setPropertyValue("dx",0),e.setPropertyValue("dy",0),e.setPropertyValue("paddingTop",0),e.setPropertyValue("paddingBottom",0),e.setPropertyValue("paddingRight",0),e.setPropertyValue("paddingLeft",0),e.setPropertyValue("togglable",!1),e.setPropertyValue("hidden",!1),e.setPropertyValue("urlTarget","_self"),e.setPropertyValue("alwaysShowTooltip",!1),e.setPropertyValue("showTooltipOn","hover"),e._prevMeasuredWidth=0,e._prevMeasuredHeight=0,e._measuredWidth=0,e._measuredHeight=0,e._isMeasured=!0,e.invalidate(),e.applyTheme(),e._disposers.push(e.events),e._disposers.push(e.group),e._disposers.push(e._mask),e._disposers.push(e._language),e._disposers.push(e._exporting),e._disposers.push(new le(function(){X(e._bindings,function(t,n){n.dispose()})})),e.setPropertyValue("interactionsEnabled",!0),e}return w(i,s),Object.defineProperty(i.prototype,"events",{get:function(){return this._eventDispatcher},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"adapter",{get:function(){return this._adapterO||(this._adapterO=new it(this)),this._adapterO},enumerable:!0,configurable:!0}),i.prototype.applyTheme=function(){s.prototype.applyTheme.call(this),Z.autoSetClassName&&this.setClassName()},i.prototype.getCurrentThemes=function(){var e=this._themes;if(e)return e;var t=this._parent;return t?t.getCurrentThemes():_.themes},i.prototype.applyInternalDefaults=function(){this._internalDefaultsApplied=!0},i.prototype.invalidate=function(){this.disabled||this._isTemplate||this.__disabled||this.invalid||(this.invalid=!0,_.addToInvalidSprites(this),Q.requestFrame())},i.prototype.validate=function(){this.dispatchImmediately("beforevalidated"),this._internalDefaultsApplied||this.applyInternalDefaults(),this.beforeDraw(),this.draw(),this.invalid=!1,_.removeFromInvalidSprites(this),this.afterDraw()},i.prototype.invalidatePosition=function(){this.disabled||this._isTemplate||this.positionInvalid||(this.positionInvalid=!0,_.addToInvalidPositions(this),Q.requestFrame())},i.prototype.validatePosition=function(){var e=this.pixelX,t=this.pixelY,n=this.dx,r=this.dy,a=e+n,o=t+r;this._updateDisabled&&(this._internalDisabled?this.group.attr({display:"none"}):this.disabled||this.removeSVGAttribute("display"),this._updateDisabled=!1);var l=this.measure(),h=this.group.transformString;this.group.moveTo({x:a,y:o}),this.group.rotation=this.rotation,this.nonScaling?this.group.scale=this.scale/this.globalScale:this.group.scale=this.scale,(h!=this.group.transformString||l)&&(h==null?this.dispatch("transformed"):this.dispatchImmediately("transformed"),this.dispatch("positionchanged"),this.showTooltipOn!="hit"&&this.showTooltipOn!="always"||this.updateTooltipPosition()),e+n==a&&t+r==o&&(_.removeFromInvalidPositions(this),this.positionInvalid=!1);var p=this._maskRectangle;p&&this._clipElement.moveTo({x:p.x-e,y:p.y-t})},i.prototype.beforeDraw=function(){},i.prototype.draw=function(){},i.prototype.afterDraw=function(){var e,t;if((this.isMeasured||this.horizontalCenter!=="none"||this.verticalCenter!=="none")&&this.measureElement(),this._inited)this.dispatch("validated");else{if(this._adapterO)try{for(var n=nr(this._adapterO.keys()),r=n.next();!r.done;r=n.next()){var a=r.value;switch(a){case"mask":case"fill":case"opacity":case"fillOpacity":case"stroke":case"strokeOpacity":case"strokeWidth":case"shapeRendering":case"strokeDasharray":case"strokeDashoffset":case"strokeLinecap":case"strokeLinejoin":case"textDecoration":case"fontSize":case"fontFamily":case"fontWeight":this[a]=this[a]}}}catch(o){e={error:o}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.applyFilters(),this.visible=this.visible,this.interactionsEnabled=this.getPropertyValue("interactionsEnabled"),this._inited=!0,this.showOnInit||(this.appeared=!0),this.hidden&&this.hide(0),this.applyMask(),this.dispatch("validated"),this.dispatch("inited"),this.dispatchReady()}this.showTooltipOn=="always"&&(!this.visible||this.disabled||this.__disabled?this.hideTooltip(0):this.showTooltip())},i.prototype.dispatchReady=function(){this.isReady()||(this._ready=!0,this.dispatch("ready"))},i.prototype.reinit=function(){this._inited=!1,this.setState(this.defaultState),this.invalidate()},i.prototype.handleGlobalScale=function(){this.dispatch("globalscalechanged"),this.nonScalingStroke&&(this.strokeWidth=this.strokeWidth),this.nonScaling&&this.validatePosition(),this.updateFilterScale()},i.prototype.updateFilterScale=function(){var e=this;A(this.filters.iterator(),function(t){t.scale=e.globalScale})},i.prototype.removeFromInvalids=function(){_.removeFromInvalidSprites(this),_.removeFromInvalidPositions(this)},i.prototype.copyFrom=function(e){var t=this;s.prototype.copyFrom.call(this,e),this.isMeasured=e.isMeasured,this.states.copyFrom(e.states),e.filters.length>0&&e.filters.each(function(n){t.filters.push(n.clone())}),e._adapterO&&this.adapter.copyFrom(e._adapterO),e._interaction&&this.interactions.copyFrom(e.interactions),e._plugins&&this.plugins.copyFrom(e.plugins),this.configField=e.configField,this.applyOnClones=e.applyOnClones,this.disabled=e.disabled,this.virtualParent=e.virtualParent,this.exportable=e.exportable,e._tooltip&&(this._tooltip?this._tooltip.copyFrom(e.tooltip):e.cloneTooltip?this.tooltip=e.tooltip.clone():this._tooltip=e.tooltip),this._showSystemTooltip=e.showSystemTooltip,Vt(e.propertyFields,this.propertyFields),Vt(e.properties,this),e.fillModifier&&(this.fillModifier=e.fillModifier.clone()),e.strokeModifier&&(this.strokeModifier=e.strokeModifier.clone()),e.focusFilter&&(this.focusFilter=e.focusFilter.clone())},i.prototype.dispose=function(){if(!this.isDisposed()){if(this.showTooltipOn=="always"&&this.tooltip&&this.tooltip.hide(),this.dispatchImmediately("beforedisposed"),this.isBaseSprite){if(this.htmlContainer)for(;this.htmlContainer.childNodes.length>0;)this.htmlContainer.removeChild(this.htmlContainer.firstChild);this.isBaseSprite=!1}if(s.prototype.dispose.call(this),this._adapterO&&this._adapterO.clear(),this.applyOnClones&&this._clones)for(var e=this._clones.length-1;e>=0;e--)this._clones.getIndex(e).dispose();this._svgContainer&&this._svgContainer.dispose(),this._interactionDisposer&&(this._interactionDisposer.dispose(),this._interactionDisposer=void 0),this._urlDisposer&&this._urlDisposer.dispose(),this.removeFromInvalids(),this.element&&this.element.dispose(),this.group&&this.group.dispose(),this._numberFormatter&&this._numberFormatter.dispose(),this._focusFilter&&this._focusFilter.dispose();var t=this.stroke;!t||t instanceof se||!t.dispose||this.clonedFrom&&this.clonedFrom.stroke==t||t.dispose();var n=this.fill;if(!n||n instanceof se||!n.dispose||this.clonedFrom&&this.clonedFrom.fill==n||n.dispose(),v(this.id)&&this.map.removeKey(this.id),this.parent=void 0,this._filters)for(;this._filters.length>0;){var r=this._filters.getIndex(0);r.dispose(),this._filters.removeValue(r)}this._alwaysShowDisposers=void 0}},Object.defineProperty(i.prototype,"isTemplate",{get:function(){return this._isTemplate},set:function(e){e=ve(e),this._isTemplate!=e&&(this._isTemplate=e,this instanceof W&&A(this.children.iterator(),function(t){t.isTemplate=e}),e?(this.parent=this._parent,this.removeFromInvalids()):this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"showSystemTooltip",{get:function(){return v(this._showSystemTooltip)?this._showSystemTooltip:this.virtualParent?this.virtualParent.showSystemTooltip:!!this._parent&&this._parent.showSystemTooltip},set:function(e){e=ve(e),this._showSystemTooltip!=e&&(this._showSystemTooltip=e,this.applyAccessibility())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"topParent",{get:function(){return this._topParent?this._topParent:this._parent?this._parent.topParent:void 0},set:function(e){this._topParent=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"parent",{get:function(){return this._parent},set:function(e){if(!this._isTemplate){this.paper;var t=this._parent;t!=e&&(t&&t.children.removeValue(this),this._parent=e,e?(this.topParent=e.topParent,e.isTemplate&&(this.isTemplate=!0),this.baseId=e.baseId,e.children.push(this),this._tooltip&&!this._tooltipContainer&&(this._tooltip.parent=e.tooltipContainer),this._dataItem||(this.dataItem=e.dataItem),this.handleAlwaysShowTooltip(),this.dataItem&&this.applyAccessibility(),this.dispatchImmediately("parentset")):this.topParent=void 0)}},enumerable:!0,configurable:!0}),i.prototype.handleAlwaysShow=function(){this.showTooltip()},i.prototype.handleAlwaysShowTooltip=function(){var e=this,t=this._alwaysShowDisposers;if(t&&j(t,function(r){r.dispose()}),this._alwaysShowDisposers=[],this.showTooltipOn=="always")for(;e!=null;){var n=e.events.on("visibilitychanged",this.handleAlwaysShow,this,!1);this.addDisposer(n),this._alwaysShowDisposers.push(n),e=e.parent}},Object.defineProperty(i.prototype,"virtualParent",{get:function(){return this._virtualParent},set:function(e){this._virtualParent=e,this.dataItem&&this.applyAccessibility()},enumerable:!0,configurable:!0}),i.prototype.appendDefs=function(){this.filterElement&&this.paper.appendDef(this.filterElement);var e=this.fill;e&&e.element&&this.paper.appendDef(e.element);var t=this.stroke;if(t&&t.element&&this.paper.appendDef(t.element),this.fillModifier&&this.fill instanceof se){var n=this.fillModifier.modify(this.fill);n&&n.element&&this.paper.appendDef(n.element)}if(this.strokeModifier&&this.stroke instanceof se){var r=this.strokeModifier.modify(this.stroke);r&&r.element&&this.paper.appendDef(r.element)}this._clipPath&&this.paper.appendDef(this._clipPath),this._exportable===!1&&(this.exportable=!1)},Object.defineProperty(i.prototype,"map",{get:function(){var e=this.topParent;return e?e.map:(this._map||(this._map=new me),this._map)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"delayedMap",{get:function(){var e=this.topParent;return e?e.delayedMap:(this._delayedMap||(this._delayedMap=new me),this._delayedMap)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"id",{get:function(){return this._id},set:function(e){if(this._id!=e){if(this._id=e,this.map.hasKey(e))throw Error("Duplicate id ("+e+") used on multiple objects.");this.map.setKey(e,this),Z.autoSetClassName&&this.setClassName()}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dom",{get:function(){return this.group.node},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"paper",{get:function(){if(this._paper)return this._paper;var e=this._parent;return e?e.paper:Ui()},set:function(e){this.setPaper(e)},enumerable:!0,configurable:!0}),i.prototype.setPaper=function(e){return this._paper!=e&&(this._paper=e,this.appendDefs(),!0)},Object.defineProperty(i.prototype,"htmlContainer",{get:function(){if(this._htmlContainer)return this._htmlContainer;var e=this._parent;return e?e.htmlContainer:void 0},set:function(e){this._htmlContainer=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"titleElement",{get:function(){return this._titleElement||(this._titleElement=this.paper.add("title"),this.group.add(this._titleElement)),this._titleElement},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"descriptionElement",{get:function(){return this._descriptionElement||(this._descriptionElement=this.paper.add("desc"),this.group.add(this._descriptionElement)),this._descriptionElement},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"filters",{get:function(){return this._filters||(this._filters=new re,this._disposers.push(this._filters.events.onAll(this.applyFilters,this)),this._disposers.push(new fe(this._filters))),this._filters},enumerable:!0,configurable:!0}),i.prototype.setSVGAttributes=function(){this.fill=this.fill,this.opacity=this.opacity,this.fillOpacity=this.fillOpacity,this.stroke=this.stroke,this.strokeOpacity=this.strokeOpacity,this.shapeRendering=this.shapeRendering,this.strokeDasharray=this.strokeDasharray,this.strokeDashoffset=this.strokeDashoffset,this.strokeLinecap=this.strokeLinecap,this.strokeLinejoin=this.strokeLinejoin,this.focusable=this.focusable,this.tabindex=this.tabindex,this.role=this.role},i.prototype.setSVGAttribute=function(e){this.group.attr(e)},i.prototype.removeSVGAttribute=function(e){this.group.removeAttr(e)},i.prototype.setClassName=function(){var e=this.className,t=Z.classNamePrefix;this.element&&this.element.addClass(t+e),this.group.addClass(t+e+"-group"),v(this.id)&&this.group.addClass(t+this.id),this.userClassName&&this.group.addClass(this.userClassName)},i.prototype.uidAttr=function(){return this.setSVGAttribute({id:this.uid}),this.uid},i.prototype.updateClipPath=function(){var e=this._clipElement;e&&e.moveTo({x:this.mask.pixelX,y:this.mask.pixelY})},i.prototype.createClipPath=function(){if(!this._clipPath){this._clipPath=this.paper.addGroup("clipPath"),this.paper.appendDef(this._clipPath),this._disposers.push(this._clipPath);var e=_.getUniqueId();this._clipPath.attr({id:e}),this.group.attr({"clip-path":'url("'+Ni()+e+'")'})}},i.prototype.applyMask=function(){var e=this.mask;if(this._clipPath&&e)if(e instanceof W){this._clipElement.attr({width:q(0,e.pixelWidth),height:q(0,e.pixelHeight)});var t=Qe({x:e.pixelX,y:e.pixelY},e.parent,this);this._clipPath.x=t.x,this._clipPath.y=t.y}else e.element&&e.element!=this._clipElement&&(this._clipElement=e.element,this._clipPath.add(this._clipElement)),this._clipPath.scale=e.scale,this._clipPath.x=e.pixelX,this._clipPath.y=e.pixelY,this._clipPath.rotation=e.rotation},i.prototype.applyFilters=function(){var e=this;if(this._filters&&this._filters.length>0){var t=100,n=100;this.filterElement?this.filterElement.removeChildNodes():(this.filterElement=this.paper.addGroup("filter"),this._disposers.push(this.filterElement)),this.paper.appendDef(this.filterElement);var r="filter-"+this.uid;this.filterElement.attr({id:r}),A(this.filters.iterator(),function(l){l.sprite=e,l.paper=e.paper,e.filterElement.attr({filterUnits:l.filterUnits}),l.appendPrimitives(e.filterElement),l.width>t&&(t=l.width),l.height>n&&(n=l.height),l.scale=e.globalScale});var a=t+"%",o=n+"%";this.filterElement.attr({width:a,height:o,x:-(t-100)/2+"%",y:-(n-100)/2+"%"}),this.group.attr({filter:'url("'+Ni()+r+'")'})}else this.filterElement&&(this.group.removeAttr("filter"),this.filterElement.removeChildNodes())},i.prototype.removeClipPath=function(){this._clipPath&&(this.removeDispose(this._clipPath),this._clipPath=void 0)},i.prototype.setElement=function(e){this.element=e,this.setSVGAttributes(),this.applyAccessibility()},Object.defineProperty(i.prototype,"element",{get:function(){return this._element},set:function(e){this.removeElement(),this._element=e,this.group.add(e),e.node instanceof SVGPathElement&&(this._isPath=!0),this.invalid||this.validate(),Z.autoSetClassName&&this.setClassName()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"svgContainer",{get:function(){return this._svgContainer?this._svgContainer:this._parent?this._parent.svgContainer:void 0},set:function(e){this._svgContainer=e},enumerable:!0,configurable:!0}),i.prototype.measureElement=function(){if(this.element)if(this.definedBBox)this._bbox=this.definedBBox;else{var e=this.element.getBBox();this._bbox={x:e.x,y:e.y,width:e.width,height:e.height}}},i.prototype.updateCenter=function(){if(this.element){var e=this.element.transformString,t=this.bbox,n=0,r=0,a=t.x,o=t.y,l=t.width,h=t.height,p=this.pixelPaddingLeft,u=this.pixelPaddingRight,d=this.pixelPaddingTop,c=this.pixelPaddingBottom,f=q(l+p+u,this.pixelWidth),g=q(h+d+c,this.pixelHeight),m=t.x,x=t.x+f,b=t.y,C=t.y+g,S=this.horizontalCenter,P=this.verticalCenter;switch(S){case"none":n=a+p;break;case"left":n=p;break;case"middle":n=p-(l+u+p)/2;break;case"right":n=-u-l}switch(P){case"none":r=o+d;break;case"top":r=d;break;case"middle":r=d-(h+c+d)/2;break;case"bottom":r=-c-h}this._measuredHeight=g,this._measuredWidth=f;var O=V(n-a,this._positionPrecision,!0),I=V(r-o,this._positionPrecision,!0);this.ex=O-p,this.ey=I-d,this.maxLeft=m+O-p,this.maxRight=x+O-p,this.maxTop=b+I-d,this.maxBottom=C+I-d,this.pixelPerfect&&Z.pixelPerfectPrecision==0&&(O-=.5,I-=.5),this.element.moveTo({x:O,y:I}),e!=this.element.transformString&&this.dispatchImmediately("transformed")}},i.prototype.measure=function(){this.updateCenter();var e=this._measuredWidth,t=this._measuredHeight,n=this.maxLeft,r=this.maxRight,a=this.maxTop,o=this.maxBottom;this._measuredWidthSelf=e,this._measuredHeightSelf=t;var l=this._positionPrecision;if(this.maxLeftSelf=this.maxLeft,this.maxRightSelf=this.maxRight,this.maxTopSelf=this.maxTop,this.maxBottomSelf=this.maxBottom,this.rotation!==0||this.scale!==1||this.nonScaling){this.nonScalingStroke&&(this.strokeWidth=this.strokeWidth);var h=this.paper.svg,p=h.createSVGMatrix(),u=this.rotation,d=this.scale;this.nonScaling&&(d=this.scale/this.globalScale),p.a=L(u)*d,p.c=-M(u)*d,p.e=0,p.b=M(u)*d,p.d=L(u)*d,p.f=0;var c=h.createSVGPoint();c.x=n,c.y=a;var f=h.createSVGPoint();f.x=r,f.y=a;var g=h.createSVGPoint();g.x=r,g.y=o;var m=h.createSVGPoint();m.x=n,m.y=o;var x=c.matrixTransform(p),b=f.matrixTransform(p),C=g.matrixTransform(p),S=m.matrixTransform(p);n=Math.min(x.x,b.x,C.x,S.x),r=Math.max(x.x,b.x,C.x,S.x),a=Math.min(x.y,b.y,C.y,S.y),e=r-n,t=(o=Math.max(x.y,b.y,C.y,S.y))-a,this.maxLeft=V(n,l,!0),this.maxRight=V(r,l,!0),this.maxTop=V(a,l,!0),this.maxBottom=V(o,l,!0)}return this._measuredWidth=V(e,l,!0),this._measuredHeight=V(t,l,!0),(this._measuredWidth!=this._prevMeasuredWidth||this._measuredHeight!=this._prevMeasuredHeight)&&(this._prevMeasuredHeight=this._measuredHeight,this._prevMeasuredWidth=this._measuredWidth,this.dispatch("sizechanged"),(this.isHover||this.showTooltipOn=="hit"||this.showTooltipOn=="always")&&this.tooltip&&this.tooltip.visible&&(v(this.tooltipText)||v(this.tooltipHTML))&&this.updateTooltipPosition(),!0)},i.prototype.insertBefore=function(e){var t=this._parent;if(t){var n=t.children.indexOf(e);n!==-1&&(t.children.moveValue(this,n),t.sortChildren())}return this},i.prototype.insertAfter=function(e){var t=this._parent;if(t){var n=t.children.indexOf(e);n!==-1&&(t.children.moveValue(this,n+1),t.sortChildren())}return this},i.prototype.removeElement=function(){this._element&&(this.removeDispose(this._element),this._element=void 0)},i.prototype.getRelativeX=function(e){return e instanceof te?e.value:this._parent?e/this._parent.innerWidth:0},i.prototype.getRelativeY=function(e){return e instanceof te?e.value:this._parent?e/this._parent.innerHeight:0},i.prototype.getPixelX=function(e){var t=0;if(y(e))t=e;else if(e instanceof te){var n=e.value;this._parent&&(t=V(this._parent.innerWidth*n,this._positionPrecision,!0))}return t},i.prototype.getPixelY=function(e){var t=0;if(y(e))t=e;else if(e instanceof te){var n=e.value;this._parent&&(t=V(this._parent.innerHeight*n,this._positionPrecision,!0))}return t},i.prototype.moveTo=function(e,t,n,r){this.isDragged&&!r||(e&&(y(e.x)&&this.setPropertyValue("x",V(e.x,this._positionPrecision,!0)),y(e.y)&&this.setPropertyValue("y",V(e.y,this._positionPrecision,!0))),y(t)&&(this.rotation=t),y(n)&&(this.scale=n),this.invalidatePosition())},Object.defineProperty(i.prototype,"mask",{get:function(){return this._adapterO?this._adapterO.apply("mask",this._mask.get()):this._mask.get()},set:function(e){var t=this;this._mask.get()!==e&&(e?(this.createClipPath(),e instanceof W?this._clipElement=this.paper.add("rect"):(e.isMeasured=!1,e.element&&(this._clipElement=e.element)),this._clipElement&&this._clipPath.add(this._clipElement),this._mask.set(e,new _e([e.events.on("maxsizechanged",function(){t.inited&&t.applyMask()},void 0,!1),e.events.on("validated",this.applyMask,this,!1),e.events.on("positionchanged",this.applyMask,this,!1)])),this.applyMask()):(this._mask.reset(),this.group.removeAttr("clip-path"),this.removeClipPath()))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maskRectangle",{get:function(){return this._maskRectangle},set:function(e){e?(this.createClipPath(),this._clipElement||(this._clipElement=this.paper.add("rect"),this._clipPath.add(this._clipElement)),this._clipElement.attr({width:e.width,height:e.height})):(this.removeClipPath(),this._clipElement=void 0),this._maskRectangle=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isMeasured",{get:function(){return this._isMeasured},set:function(e){(e=ve(e))||(this._measuredWidth=0,this._measuredHeight=0),this._isMeasured!=e&&(this._isMeasured=e,this.invalidatePosition())},enumerable:!0,configurable:!0}),i.prototype.hitTest=function(e){this.invalid&&this.validate(),e.invalid&&e.validate();var t=this.pixelX+this.maxLeft,n=this.pixelY+this.maxTop,r=t+this.maxRight,a=n+this.maxBottom,o=e.pixelX+e.maxLeft,l=e.pixelY+e.maxTop,h=o+e.maxRight,p=l+e.maxBottom;return!(o>r||ha||p0&&((r=this.animate(o,t,n))&&!r.isFinished()?this._disposers.push(r.events.on("animationended",function(){a.dispatchImmediately("transitionended")})):this.dispatchImmediately("transitionended")),e.filters.length>0){var l=[];A(e.filters.iterator(),function(h){var p=h.clone();l.push(p);var u=[];A(a.filters.iterator(),function(d){d.className==p.className&&(cr(a.defaultState.filters.iterator(),function(c){return c.className===p.className})||a.defaultState.filters.push(d),X(p.properties,function(c,f){var g=d.properties[c];g!=f&&u.push({property:c,from:g,to:f})}))}),p.animate(u,t,n)}),this.filters.clear(),this.filters.pushAll(l)}return r},i.prototype.isInTransition=function(){return this.animations.length>0},Object.defineProperty(i.prototype,"isHover",{get:function(){return!!this.isInteractive()&&this.interactions.isHover},set:function(e){(e=ve(e))!==this.isHover&&this.isInteractive()&&(this.interactions.isHover=e,e?this.handleOver():(this.interactions.isRealHover=!1,this.handleOut()))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isDragged",{get:function(){return this._isDragged},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isResized",{get:function(){return this._isResized},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isDown",{get:function(){return!!this.isInteractive()&&this.interactions.isDown},set:function(e){e=ve(e),this.isInteractive()&&this.isDown!=e&&(this.interactions.isDown=e,e?this.handleDown():this.handleUp())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isFocused",{get:function(){return!!this.isInteractive()&&this.interactions.isFocused},set:function(e){e=ve(e),this.focusable&&this.isFocused!=e&&this.isInteractive()&&(this.interactions.isFocused=e,e===!0?this.handleFocus():this.handleBlur())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isActive",{get:function(){return this._isActive},set:function(e){this.setActive(e)},enumerable:!0,configurable:!0}),i.prototype.setActive=function(e){e=ve(e),this._isActive!==e&&(this._isActive=e,e&&this.states.hasKey("active")?(this.setState("active"),this.isHover&&this.states.hasKey("hoverActive")&&this.setState("hoverActive")):this.applyCurrentState(),this.dispatchImmediately("toggled"))},Object.defineProperty(i.prototype,"disabled",{get:function(){var e=this.getPropertyValue("disabled");return v(e)?e:this.virtualParent?this.virtualParent.disabled:!!this._parent&&this._parent.disabled},set:function(e){this.setDisabled(e)},enumerable:!0,configurable:!0}),i.prototype.setDisabled=function(e){if(e=ve(e),this.getPropertyValue("disabled")!=e){if(this.setPropertyValue("disabled",e,!0),e)this.parent=this._parent,this.removeFromInvalids(),this.group.attr({display:"none"}),this.dispatch("disabled");else{if(this._parent){var t=this._parent.element;t.hasChild(this.group)||t.add(this.group)}this instanceof W?(this.deepInvalidate(),this._background&&this._background.invalidate()):this.invalidate(),this.__disabled||this.removeSVGAttribute("display"),this.dispatch("enabled")}return this.dispatch("transformed"),Q.requestFrame(),!0}return!1},Object.defineProperty(i.prototype,"__disabled",{get:function(){return this._internalDisabled},set:function(e){this._internalDisabled!=e&&(this._internalDisabled=e,this._updateDisabled=!0,this.invalidatePosition(),e||this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"numberFormatter",{get:function(){return this._numberFormatter?this._numberFormatter:this.virtualParent?this.virtualParent.numberFormatter:this._parent?this._parent.numberFormatter:(this._numberFormatter=new Br,this._numberFormatter.language=this.language,this.numberFormatter)},set:function(e){this._numberFormatter=e,this._numberFormatter.language=this.language},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dateFormatter",{get:function(){return this._dateFormatter?this._dateFormatter:this.virtualParent?this.virtualParent.dateFormatter:this._parent?this._parent.dateFormatter:(this._dateFormatter=new Gi,this._dateFormatter.language=this.language,this.dateFormatter)},set:function(e){this._dateFormatter=e,this._dateFormatter.language=this.language},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"durationFormatter",{get:function(){return this._durationFormatter?this._durationFormatter:this.virtualParent?this.virtualParent.durationFormatter:this._parent?this._parent.durationFormatter:(this._durationFormatter=new Hr,this._durationFormatter.language=this.language,this.durationFormatter)},set:function(e){this._durationFormatter=e,this._durationFormatter.language=this.language},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"language",{get:function(){var e=this._language.get();return e||(this.virtualParent?this.virtualParent.language:this._parent?this._parent.language:(e=new Wt,this.language=e,e))},set:function(e){var t=this;this._language.get()!==e&&this._language.set(e,e.events.on("localechanged",function(n){if(t._numberFormatter&&(t._numberFormatter.language=t.language),t._dateFormatter&&(t._dateFormatter.language=t.language),t._durationFormatter&&(t._durationFormatter.language=t.language),t._exporting.get()){var r=t._exporting.get();r.numberFormatter.language=t.language,r.dateFormatter.language=t.language,r.durationFormatter.language=t.language,r.language=t.language}t instanceof W&&t.deepInvalidate()}))},enumerable:!0,configurable:!0}),i.prototype.populateString=function(e,t){if(v(e)){e=sn(e);var n=(e=Ft().escape(e)).match(/\{([^}]+)\}/g),r=void 0;if(n)for(r=0;ru?1:l.idx-h.idx}),e=t.map(function(l){return l.data});var n=this.element,r=!0;if(n.node&&n.node.childNodes){for(var a=0,o=n.node.childNodes.length;a0;){var e=this.children.getIndex(0);e.parent=void 0,this.children.removeValue(e)}},i.prototype.disposeChildren=function(){for(;this.children.length>0;){var e=this.children.getIndex(0);e.dispose(),this.children.removeValue(e)}},Object.defineProperty(i.prototype,"background",{get:function(){return this._background||(this._background=this.createBackground(),this.processBackground()),this._background},set:function(e){this._background&&this.background!=e&&this.removeDispose(this._background),e&&(this._background=e,this._disposers.push(e),this.processBackground())},enumerable:!0,configurable:!0}),i.prototype.handleGlobalScale=function(){s.prototype.handleGlobalScale.call(this),this.children.each(function(e){e.handleGlobalScale()})},i.prototype.createBackground=function(){return new Mn},i.prototype.processBackground=function(){var e=this._background;e&&(e.isMeasured=!1,this._background.fill=new ae().getFor("background"),e.parent=this,e.isMeasured=!1,this.children.removeValue(e),this._disposers.push(e),this.group.addToBack(this._background.group))},i.prototype.validateLayout=function(){var e=this;_.removeFromInvalidLayouts(this),this.layoutInvalid=!1,this._availableWidth=this.innerWidth,this._availableHeight=this.innerHeight;var t=0,n=0,r=!0;this.children&&(this.sortChildren(),j(this._childrenByLayout,function(a){var o,l;if(y(a.relativeWidth)?(o=V(e._availableWidth*a.relativeWidth,2),e.layout=="horizontal"&&(o-=a.pixelMarginRight+a.pixelMarginLeft)):e.layout=="horizontal"&&a.invalid&&a.validate(),y(a.relativeHeight)?(l=V(e._availableHeight*a.relativeHeight,2),e.layout=="vertical"&&(l-=a.pixelMarginTop+a.pixelMarginBottom)):e.layout=="vertical"&&a.invalid&&a.validate(),a.invalid==0){if(y(a.relativeWidth)&&(a.maxWidth=o),y(a.relativeHeight)&&(a.maxHeight=l),a.isMeasured){e.layout=="horizontal"&&(y(a.percentWidth)||a.measuredWidth>0&&(e._availableWidth-=a.measuredWidth+a.pixelMarginLeft+a.pixelMarginRight)),e.layout=="vertical"&&(y(a.percentHeight)||a.measuredHeight>0&&(e._availableHeight-=a.measuredHeight+a.pixelMarginTop+a.pixelMarginBottom));var h=a.measuredWidth,p=a.measuredHeight;a.align!="none"&&(h+=a.pixelMarginLeft+a.pixelMarginRight),a.valign!="none"&&(p+=a.pixelMarginTop+a.pixelMarginBottom),t=Math.max(t,h),n=Math.max(n,p)}}else a.isMeasured&&(y(a.relativeWidth)&&a.maxWidth!=o&&(a.maxWidth=o,r=!1),y(a.relativeHeight)&&a.maxHeight!=l&&(a.maxHeight=l,r=!1))})),this._absoluteWidth=t,this._absoluteHeight=n,r&&this.arrange()},i.prototype.arrange=function(){var e,t,n,r,a,o,l,h,p,u,d,c=this,f=this.children,g=0,m=0,x=q(this.innerWidth,this._absoluteWidth),b=q(this.innerHeight,this._absoluteHeight),C=this.pixelPaddingLeft,S=this.pixelPaddingRight,P=this.pixelPaddingTop,O=this.pixelPaddingBottom,I=0,k=0,D=0,G=0,H=[],ne=[],Te=this.maxWidth,Ge=this.maxHeight,he=this.minWidth,et=this.minHeight,we=ji(f.values);if(this.reverseOrder&&we.reverse(),this.layout=="grid"){o=Te,a=1;for(var U=0,nt=we.length;Ua&&(a=qe)}o=R(o,1,Te),a=R(a,1,Te),l=this.fixedWidthGrid?Te/a:Te/o,l=q(1,Math.floor(l)),l=ie(this.maxColumns,l),H=this.getColumnWidth(we,l,a)}for(U=0,nt=we.length;Uie(this.innerWidth,Te)-qo+1&&G=l&&(G=0,k+=ne[D],D++,I=0)}this.layout!=="none"&&(Y.moveTo({x:We,y:ge}),Oi=We+Y.maxLeft-ke,Si=We+Y.maxRight+Lt,Ii=ge+Y.maxTop-tt,ys=ge+Y.maxBottom+Je,(Si>t||!y(t))&&(t=Si),(Oir||!y(r))&&(r=ys),(Si>p||!y(p))&&(p=Si),(Oid||y(d))}}if(this.layout=="none"){var nn=this.bbox;e=nn.x,t=nn.x+nn.width,n=nn.y,r=nn.y+nn.height}y(e)||(e=0,h=0),y(t)||(p=t=this._availableWidth),y(n)||(n=0,u=0),y(r)||(d=r=this._availableHeight),y(u)||(u=0),y(d)||(d=u),y(h)||(h=0),y(p)||(p=h),g=t-e,m=r-n,y(this.relativeWidth)&&(e=0,t=g=Te-C-S),y(this.relativeHeight)&&(n=0,r=m=Ge-P-O),y(this._pixelWidth)&&(e=0,g=this._pixelWidth-C-S),y(he)&&g0){var bs,xs,_s=g,Ps=m;_s=-.5&&t<=this.pixelWidth+.5&&n>=-.5&&n<=this.pixelHeight+.5},i.prototype.copyFrom=function(e){var t=this;s.prototype.copyFrom.call(this,e),this.layout=e.layout,this.setStateOnChildren=e.setStateOnChildren,e._background&&(this.background=e._background.clone(),this.background.copyFrom(e._background)),A(e.children.iterator(),function(n){n.shouldClone&&(n.clone().parent=t)})},Object.defineProperty(i.prototype,"preloader",{get:function(){return this._preloader||(this.parent?this.parent.preloader:void 0)},set:function(e){this._preloader&&this.removeDispose(this._preloader),this._preloader=e,e&&(e.parent=this.tooltipContainer,this._disposers.push(e))},enumerable:!0,configurable:!0}),i.prototype.setPaper=function(e){var t=this,n=s.prototype.setPaper.call(this,e);return n&&(this._background&&(this._background.paper=e,this._background.topParent=this.topParent),this.children.each(function(r){r.setPaper(e),r.topParent=t.topParent})),n},i.prototype.removeFromInvalids=function(){s.prototype.removeFromInvalids.call(this),_.removeFromInvalidLayouts(this)},i.prototype.setDataItem=function(e){this._dataItem!=e&&(A(this.children.iterator(),function(t){t.dataItem=e}),this._background&&(this._background.dataItem=e)),s.prototype.setDataItem.call(this,e)},i.prototype.measureElement=function(){this.disabled||this.isTemplate||this.layout=="none"||this.__disabled||this.validateLayout()},Object.defineProperty(i.prototype,"fontFamily",{get:function(){return this.getPropertyValue("fontFamily")},set:function(e){this.setPropertyValue("fontFamily",e,!0)&&(this.setSVGAttribute({"font-family":e}),this.invalidateLabels())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fontSize",{get:function(){return this.getPropertyValue("fontSize")},set:function(e){this.setPropertyValue("fontSize",e,!0)&&(this.setSVGAttribute({"font-size":e}),this.invalidateLabels())},enumerable:!0,configurable:!0}),i.prototype.invalidateLabels=function(){this.children.each(function(e){e.hardInvalidate?(e.hardInvalidate(),e.events.once("validated",e.handleValidate,e,!1)):e instanceof i&&e.invalidateLabels()})},Object.defineProperty(i.prototype,"fontWeight",{get:function(){return this.getPropertyValue("fontWeight")},set:function(e){this.setPropertyValue("fontWeight",e),this.setSVGAttribute({"font-weight":e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"textDecoration",{get:function(){return this.getPropertyValue("textDecoration")},set:function(e){this.setPropertyValue("textDecoration",e),this.setSVGAttribute({"text-decoration":e})},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._background&&this._background.dispose(),this._shouldBeReady=[],this.disposeChildren(),s.prototype.dispose.call(this)},i.prototype.setState=function(e,t,n){var r=e;return e instanceof Tn&&(r=e.name),this.setStateOnChildren&&A(this.children.iterator(),function(a){a.setState(r,t,n),r!="active"&&(a.isActive=!1)}),this._background&&this._background.setState(r),this.setStateOnSprites.length&&j(this.setStateOnSprites,function(a){a.setState(r,t,n)}),s.prototype.setState.call(this,e,t,n)},i.prototype.setActive=function(e){s.prototype.setActive.call(this,e),this._background&&(this._background.isActive=e)},i.prototype.dispatchReady=function(){var e=this;if(!this.isReady()&&!this.isDisposed()){var t=!0;rt(this.children.iterator(),function(n){return!!(n.__disabled||n.disabled||n.isReady())||(t=!1,!1)}),hr(this._shouldBeReady,function(n){return!!(n.__disabled||n.disabled||n.isReady())||(t=!1,!1)}),t?s.prototype.dispatchReady.call(this):_.events.once("exitframe",function(){e.dispatchReady(),Q.requestFrame()},void 0,!1)}},i.prototype._systemUpdate=function(e){this.children.each(function(t){t.invalid&&(t._systemCheckIfValidate()?t.dataItem&&t.dataItem.component&&t.dataItem.component.dataInvalid?e.push(t):t.validate():e.push(t))}),s.prototype._systemUpdate.call(this,e)},i.prototype._systemValidatePositions=function(){this.children.each(function(e){e.positionInvalid&&e.validatePosition()}),s.prototype._systemValidatePositions.call(this)},i.prototype._systemValidateLayouts=function(){this.layoutInvalid&&!this.isDisposed()&&this.validateLayout()},Object.defineProperty(i.prototype,"tapToActivate",{get:function(){return this._tapToActivate},set:function(e){this._tapToActivate!=e&&this.setTapToActivate(e)},enumerable:!0,configurable:!0}),i.prototype.setTapToActivate=function(e){var t=this;this._tapToActivate=e,this.interactions.isTouchProtected=e,e&&this.interactions.setEventDisposer("container-tapToActivate",e,function(){return new _e([t.events.on("hit",t.handleTapToActivate,t,!1),t.events.on("down",t.initTapTimeout,t,!1),t.events.on("track",t.initTapTimeout,t,!1),K().body.events.on("down",function(n){K().isLocalElement(n.pointer,t.paper.svg,t.uid)||t.handleTapToActivateDeactivation()},t,!1)])}),K()},i.prototype.handleTapToActivate=function(){this.interactions.isTouchProtected=!1,this.initTapTimeout()},i.prototype.handleTapToActivateDeactivation=function(){this.interactions.isTouchProtected=!0},i.prototype.initTapTimeout=function(){var e=this;this._tapToActivateTimeout&&this._tapToActivateTimeout.dispose(),this.tapToActivate&&!this.interactions.isTouchProtected&&this.tapTimeout&&(this._tapToActivateTimeout=this.setTimeout(function(){e.handleTapToActivateDeactivation()},this.tapTimeout))},i.prototype.moveHtmlContainer=function(e){var t=ka(e);if(t){this.htmlContainer=t;var n=this.svgContainer;n.htmlElement=t,n.htmlElement.appendChild(n.SVGContainer),n.initSensor(),n.measure()}else J(e)&&e!=""&&Q.log("html container '"+e+"' not found")},i.prototype.hasLicense=function(){if(Z.commercialLicense)return!0;for(var e=0;e0;){var r=(a=n[0]).dataProvider;if(a.isDisposed())z(n,a);else if(r&&r.dataInvalid)try{if(r.validateData(),r.dataValidationProgress<1)break}catch(p){z(n,r),r.raiseCriticalError(p)}else try{if(a.validateData(),a.dataValidationProgress<1)break}catch(p){z(n,a),a.raiseCriticalError(p)}}if(Date.now()-e>this.updateStepDuration)break}for(;_.invalidRawDatas.length>0;)if((a=_.invalidRawDatas[0]).isDisposed())z(_.invalidRawDatas,a);else try{a.validateRawData()}catch(p){z(_.invalidRawDatas,a),a.raiseCriticalError(p)}for(;_.invalidDataItems.length>0;){if(r=(a=_.invalidDataItems[0]).dataProvider,!(a.isDisposed()||a.dataInvalid||r&&r.dataInvalid))try{a.validateDataItems()}catch(p){z(_.invalidDataItems,a),a.raiseCriticalError(p)}z(_.invalidDataItems,a)}for(;_.invalidDataRange.length>0;){var a;if(r=(a=_.invalidDataRange[0]).dataProvider,!(a.isDisposed()||a.dataInvalid||r&&r.dataInvalid))try{a.validateDataRange(),a.skipRangeEvent||a.dispatchImmediately("datarangechanged"),a.skipRangeEvent=!1}catch(p){z(_.invalidDataRange,a),a.raiseCriticalError(p)}z(_.invalidDataRange,a)}var o=[];X(_.invalidLayouts,function(p){i.validateLayouts(p)}),X(_.invalidPositions,function(p){i.validatePositions(p)});var l=!1;if(e=Date.now(),X(_.invalidSprites,function(p,u){for(var d=0;u.length>0;){if(i.validateLayouts(p),i.validatePositions(p),++d==5){if(Date.now()-e>i.updateStepDuration)break;d=0}var c=u[u.length-1];if(c&&!c.isDisposed()){if(c._systemCheckIfValidate())if(i.checkIfValidate2(c))try{c._systemUpdate(o)}catch(f){c.invalid=!1,z(u,c),c.raiseCriticalError(f)}else o.push(c);else o.push(c);c.invalid=!1}z(u,c)}_.invalidSprites[p]=_.invalidSprites[p].concat(o)}),X(_.invalidSprites,function(p,u){u.length>0&&(l=!0)}),X(_.invalidDatas,function(p,u){u.length>0&&(l=!0)}),j(ji(this.animations),function(p){p.update()}),X(_.invalidLayouts,function(p){i.validateLayouts(p)}),X(_.invalidPositions,function(p){i.validatePositions(p)}),_l(),X(_.invalidLayouts,function(p){i.validateLayouts(p)}),X(_.invalidPositions,function(p){i.validatePositions(p)}),_.dispatchImmediately("exitframe"),(l||this.animations.length>0||[].length>0)&&this.requestFrame(),this.updateStepDuration<200){var h=!0;X(_.invalidDatas,function(p,u){u.length>0&&(h=!1)}),X(_.invalidSprites,function(p,u){u.length>0&&(h=!1)}),h&&(this.updateStepDuration=200)}}},s.prototype.checkIfValidate2=function(i){return!(i.dataItem&&i.dataItem.component&&i.dataItem.component.dataInvalid&&!i.dataItem.component.isTemplate)},s.prototype.requestFrame=function(){var i=this;this._frameRequested||($s(function(){i.update()}),this._frameRequested=!0)},s.prototype.softInvalidate=function(i){var e=this;i.children.each(function(t){t instanceof W&&e.softInvalidate(t),t.measureFailed&&(Ye(t,"Label")?t.hardInvalidate():t.invalidate(),t.measureFailed=!1)})},s.prototype.validatePositions=function(i){for(var e=_.invalidPositions[i];e.length>0;){var t=e[e.length-1];if(t.isDisposed())z(e,t);else try{t._systemValidatePositions()}catch(n){t.positionInvalid=!1,z(e,t),t.raiseCriticalError(n)}}},s.prototype.validateLayouts=function(i){for(var e=_.invalidLayouts[i];e.length>0;){var t=e[e.length-1];if(t.isDisposed())z(e,t);else try{t.children.each(function(n){n._systemValidateLayouts()}),t.validateLayout()}catch(n){t.layoutInvalid=!1,z(e,t),t.raiseCriticalError(n)}}},s.prototype.log=function(i){(function(){for(var e=[],t=0;t0},enumerable:!0,configurable:!0}),s.prototype.maybeToNumber=function(i,e){return this.options.numberFields.indexOf(i)!==-1?Or(e):e},Object.defineProperty(s.prototype,"parsableDates",{get:function(){return this.options.dateFields&&this.options.dateFields.length>0},enumerable:!0,configurable:!0}),s.prototype.maybeToDate=function(i,e){return this.options.dateFields.indexOf(i)!==-1?this.options.dateFormatter.parse(e,this.dateFormat):e},s.prototype.maybeToEmpty=function(i){return v(i)&&i!=""||!v(this.options.emptyAs)?i:this.options.emptyAs},Object.defineProperty(s.prototype,"dateFormatter",{get:function(){return this.options.dateFormatter||(this.options.dateFormatter=new Gi,this.options.dateFormat&&(this.options.dateFormat=this.options.dateFormat)),this.options.dateFormatter},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"dateFormat",{get:function(){return this.options.dateFormat||this.dateFormatter.inputDateFormat},enumerable:!0,configurable:!0}),s}(),hd=[",",";"," "],Ln=function(s){function i(){var e=s!==null&&s.apply(this,arguments)||this;return e.contentType="text/csv",e.options={delimiter:"",reverse:!1,skipRows:0,skipEmpty:!0,useColumnNames:!1},e}return w(i,s),i.isCSV=function(e){return!!i.getDelimiterFromData(e)},i.getDelimiterFromData=function(e){var t,n=e.split(` `),r=n.length;return j(hd,function(a){for(var o=0,l=0,h=0;h1)){l=0;break}if(l===0)l=o;else if(o!=l){l=0;break}}l&&(t=a)}),t},i.prototype.parse=function(e){this.options.delimiter||(this.options.delimiter=i.getDelimiterFromData(e));var t,n,r,a=this.CSVToArray(e,this.options.delimiter),o=v(this.options.emptyAs),l=this.parsableNumbers,h=this.parsableDates,p=[],u=[];for(n=0;n0&&l.delay(t))}),r},i.prototype.dispose=function(){s.prototype.dispose.call(this),j(this.sprites,function(e){e.dispose()}),this.sprites=[]},i.prototype.hide=function(e,t,n,r){var a=this;if(this.isHiding=!0,j(this.sprites,function(l){var h=l.hide(e);h==null||h.isFinished()||(a._disposers.push(h),t!=null&&t>0&&h.delay(t))}),y(n)&&r){var o;if(j(r,function(l){var h=a.setWorkingValue(l,n,e,t);h&&(o=h)}),o&&!o.isFinished())return this._hideDisposer=o.events.on("animationended",function(){a.setVisibility(!1,!0),a.isHiding=!1}),this._disposers.push(this._hideDisposer),o;this.isHiding=!1,this.setVisibility(!1,!0)}else this.isHiding=!1,this.setVisibility(!1)},i.prototype.getDuration=function(e){if(!y(e)){var t=this.component;t&&(e=t.interpolationDuration)}if(e!=null)return this._adapterO?this._adapterO.apply("duration",e):e},i.prototype.getValue=function(e,t){if(e&&this.component){t||(t=this.component.dataFields[e+"Show"])||(t="value");var n=this.values[e][t];return this._adapterO&&this._adapterO.isEnabled("value")?this._adapterO.apply("value",{value:n,field:e}).value:n}},i.prototype.getWorkingValue=function(e){if(e&&this.component){var t=this.component.dataFields[e+"Show"];return t||(t="workingValue"),this._adapterO?this._adapterO.apply("workingValue",{workingValue:this.values[e][t],field:e}).workingValue:this.values[e][t]}},i.prototype.getActualWorkingValue=function(e){return this.values[e].workingValue},i.prototype.setValue=function(e,t,n,r){var a=this.values[e].value,o=this.getDuration(n);if(a!==(t=ce(t))){if(this.values[e].value=t,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("valuechanged")){var l={type:"valuechanged",target:this,property:e};this.events.dispatchImmediately("valuechanged",l)}this.component&&this.component.handleDataItemValueChange(this,e)}this.setWorkingValue(e,t,o,r)},i.prototype.setCalculatedValue=function(e,t,n){if(this.values[e][n]!==t&&y(t)){if(this.values[e][n]=t,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("calculatedvaluechanged")){var r={type:"calculatedvaluechanged",target:this,property:e};this.events.dispatchImmediately("calculatedvaluechanged",r)}this.component&&this.component.handleDataItemCalculatedValueChange(this,e)}},i.prototype.setWorkingValue=function(e,t,n,r){if(y(this.values[e].value)){var a=this.getDuration(n),o=this.values[e].workingValue;if(a!=null&&a>0&&y(o)&&this.component){if(o!=t){var l=this.animate({childObject:this.values[e],property:"workingValue",from:o,to:t,dummyData:e},a,this.component.interpolationEasing);return r!=null&&l.delay(r),l.events.on("animationstarted",this.handleInterpolationProgress,this),l.events.on("animationprogress",this.handleInterpolationProgress,this),l.events.on("animationended",this.handleInterpolationProgress,this),this._valueAnimations[e]=l,l}(h=this._valueAnimations[e])&&h.stop(),this.values[e].workingValue=t}else{var h;if((h=this._valueAnimations[e])&&h.stop(),this.values[e].workingValue=t,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("workingvaluechanged")){var p={type:"workingvaluechanged",target:this,property:e};this.events.dispatchImmediately("workingvaluechanged",p)}this.component&&this.component.handleDataItemWorkingValueChange(this,e)}}},i.prototype.setLocation=function(e,t,n,r){if(this.locations[e]!==t){if(this.locations[e]=t,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("locationchanged")){var a={type:"locationchanged",target:this,property:e};this.events.dispatchImmediately("locationchanged",a)}this.component&&this.component.handleDataItemValueChange(this,e),this.setWorkingLocation(e,t,n,r)}},i.prototype.setWorkingLocation=function(e,t,n,r){var a=this.getDuration(n),o=this.workingLocations[e];if(a!=null&&a>0&&y(o)&&this.component){if(o!=t){var l=this.animate({childObject:this.workingLocations,property:e,from:o,to:t,dummyData:e},a,this.component.interpolationEasing);return r!=null&&l.delay(r),l.events.on("animationstarted",this.handleInterpolationProgress,this),l.events.on("animationprogress",this.handleInterpolationProgress,this),l.events.on("animationended",this.handleInterpolationProgress,this),this._locationAnimations[e]=l,l}(h=this._locationAnimations[e])&&h.stop(),this.workingLocations[e]=t}else{var h;if((h=this._locationAnimations[e])&&h.stop(),this.workingLocations[e]=t,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("workinglocationchanged")){var p={type:"workinglocationchanged",target:this,property:e};this.events.dispatchImmediately("workinglocationchanged",p)}this.component&&this.component.handleDataItemWorkingLocationChange(this,e)}},i.prototype.setDate=function(e,t,n){!ki(t)&&this.component&&(t=this.component.dateFormatter.parse(t)),this.dates[e]!==t&&(this.dates[e]=t,this.setValue(e,t.getTime(),n))},i.prototype.getDate=function(e){return this._adapterO?this._adapterO.apply("date",{date:this.dates[e],field:e}).date:this.dates[e]},i.prototype.setProperty=function(e,t){if(this.properties[e]!==t){if(this.hasProperties=!0,this.properties[e]=t,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("propertychanged")){var n={type:"propertychanged",target:this,property:e,value:t};this.events.dispatchImmediately("propertychanged",n)}this.component&&this.component.handleDataItemPropertyChange(this,e)}},i.prototype.setCategory=function(e,t){J(t)||(t=sn(t)),this.categories[e]!==t&&(this.categories[e]=t)},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),e.dataContext&&(this.dataContext=ql(e.dataContext,{})),Vt(e.locations,this.locations),e._adapterO&&this.adapter.copyFrom(e._adapterO),this.component=e.component},Object.defineProperty(i.prototype,"opacity",{set:function(e){j(this.sprites,function(t){t.opacity=e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"ignoreMinMax",{get:function(){return this._ignoreMinMax},set:function(e){if(this._ignoreMinMax=e,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("propertychanged")){var t={type:"propertychanged",target:this,property:"ignoreMinMax",value:e};this.events.dispatchImmediately("propertychanged",t)}this.component&&this.component.handleDataItemPropertyChange(this,"ignoreMinMax")},enumerable:!0,configurable:!0}),i.prototype.animate=function(e,t,n){return new gt(this,e,t,n).start()},i.prototype.handleInterpolationProgress=function(e){var t=e.target.animationOptions[0];if(t){if(this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("workingvaluechanged")){var n={type:"workingvaluechanged",target:this,property:t.dummyData};this.events.dispatchImmediately("workingvaluechanged",n)}this.component&&this.component.handleDataItemWorkingValueChange(this,t.dummyData)}},i.prototype.hasValue=function(e){for(var t=0,n=e.length;t0;)this.data.shift(),t--;this.invalidateData()},i.prototype.removeData=function(e,t){if(y(e)&&e>0){for(;e>0;){var n=this.mainDataSet.getIndex(0);n&&this.mainDataSet.remove(n),this.dataUsers.each(function(r){if(!r.data||r.data.length==0){var a=r.mainDataSet.getIndex(0);a&&r.mainDataSet.remove(a)}}),t||this.data.shift(),this._parseDataFrom>0&&this._parseDataFrom--,e--}this.invalidateDataItems()}},i.prototype.invalidateData=function(){this.disabled||this.isTemplate||(_.addToInvalidComponents(this),Q.requestFrame(),this.dataInvalid=!0,A(this.dataUsers.iterator(),function(e){e.invalidateDataItems()}))},i.prototype.invalidateDataUsers=function(){A(this.dataUsers.iterator(),function(e){e.invalidate()})},i.prototype.invalidateDataItems=function(){this.disabled||this.isTemplate||(pt(_.invalidDataItems,this),Q.requestFrame(),this.dataItemsInvalid=!0,A(this.dataUsers.iterator(),function(e){e.invalidateDataItems()}))},i.prototype.invalidateDataRange=function(){this.disabled||this.isTemplate||(this.dataRangeInvalid=!0,pt(_.invalidDataRange,this),Q.requestFrame())},i.prototype.validateDataRange=function(){z(_.invalidDataRange,this),this.dataRangeInvalid=!1,this.startIndex==this._prevStartIndex&&this.endIndex==this._prevEndIndex||(this.rangeChangeUpdate(),this.appendDataItems(),this.invalidate(),this.dispatchImmediately("datarangechanged"))},i.prototype.sliceData=function(){this._workingStartIndex=this.startIndex,this._workingEndIndex=this.endIndex},i.prototype.rangeChangeUpdate=function(){this.sliceData(),this._prevStartIndex=this.startIndex,this._prevEndIndex=this.endIndex},i.prototype.appendDataItems=function(){for(var e=this.endIndex,t=this.startIndex;t0&&this.disposeData(),this.data.length>0){var t=this.preloader;A(this.dataUsers.iterator(),function(u){u._startIndex=void 0,u._endIndex=void 0});for(var n=0,r=Date.now(),a=this._parseDataFrom,o=this.data.length,l=function(){var u=h.data[a];if(h._usesData){var d=h.getDataItem(u);h.processDataItem(d,u)}if(h.dataUsers.each(function(c){if(c.data.length==0){var f=c.getDataItem(u);c.processDataItem(f,u)}}),++n==100&&(n=0,Date.now()-r>h.parsingStepDuration&&a.5&&!t.visible||(t.progress=a/h.data.length)),h.dataValidationProgress=a/h.data.length,a=h.data.length,h.invalidateData(),{value:void 0}},h=this;a0?this.invalidateData():(this.dispatchImmediately("beforedatavalidated"),this.dispatch("datavalidated")))},i.prototype.getDataSource=function(e){var t=this;return v(this._dataSources[e])||(this._dataSources[e]=new rp,this._dataSources[e].component=this,this.setDataSourceEvents(this._dataSources[e],e),this._dataSources[e].adapter.add("dateFields",function(n){return t.dataSourceDateFields(n)}),this._dataSources[e].adapter.add("numberFields",function(n){return t.dataSourceNumberFields(n)}),this.events.on("inited",function(){t.loadData(e)},this,!1)),this._dataSources[e]},Object.defineProperty(i.prototype,"dataSource",{get:function(){return this._dataSources.data||this.getDataSource("data"),this._dataSources.data},set:function(e){var t=this;this._dataSources.data&&this.removeDispose(this._dataSources.data),this._dataSources.data=e,this._dataSources.data.component=this,this.events.on("inited",function(){t.loadData("data")},this,!1),this.setDataSourceEvents(e,"data")},enumerable:!0,configurable:!0}),i.prototype.loadData=function(e){this._dataSources[e].load()},i.prototype.dataSourceDateFields=function(e){return e},i.prototype.dataSourceNumberFields=function(e){return e},i.prototype.populateDataSourceFields=function(e,t,n){return j(n,function(r){t[r]&&ht(e,t[r])===-1&&e.push(t[r])}),e},i.prototype.setDataSourceEvents=function(e,t){var n=this;e.events.on("started",function(r){var a=n.preloader;a&&(a.progress=0)},void 0,!1),e.events.on("loadstarted",function(r){var a=n.preloader;a&&(a.progress=.25)},void 0,!1),e.events.on("loadended",function(r){var a=n.preloader;a&&(a.progress=.5)},void 0,!1),e.events.on("parseended",function(r){var a=n.preloader;a&&(a.progress=.75)},void 0,!1),e.events.on("ended",function(r){var a=n.preloader;a&&(a.progress=1)},void 0,!1),e.events.on("error",function(r){var a=n.preloader;a&&(a.progress=1),n.openModal(r.message)},void 0,!1),t&&e.events.on("done",function(r){var a=n.preloader;a&&(a.progress=1),t!="data"||Ae(r.data)||(r.data=[r.data]),e.incremental&&t=="data"&&n.data.length?n.addData(r.data,e.keepCount?r.data.length:0):e.updateCurrentData&&t=="data"&&n.data.length?(j(n.data,function(o,l){v(r.data[l])&&X(o,function(h,p){v(r.data[l][h])&&(o[h]=r.data[l][h])})}),n.invalidateRawData()):n[t]=r.data})},Object.defineProperty(i.prototype,"responsive",{get:function(){return this._responsive||(this._responsive=new sp,this._responsive.component=this),this._responsive},set:function(e){this._responsive=e,this._responsive.component=this},enumerable:!0,configurable:!0}),i.prototype.zoom=function(e,t,n,r){var a=this;t===void 0&&(t=!1),n===void 0&&(n=!1);var o=e.start,l=e.end,h=e.priority;if(e.start==e.end&&(e.start=e.start-.5/this.maxZoomFactor,e.end=e.end+.5/this.maxZoomFactor),h=="end"&&l==1&&o!=0&&othis.end&&(h="end"),y(r)||(r=this.maxZoomDeclination),!y(o)||!y(l))return{start:this.start,end:this.end};if(this._finalStart!=o||this._finalEnd!=l){var p=this.maxZoomFactor/this.minZoomCount,u=this.maxZoomFactor/this.maxZoomCount;if(h=="start"?(this.maxZoomCount>0&&1/(l-o)p&&(l=o+1/p),l>1&&l-o<1/p&&(o=l-1/p)):(this.maxZoomCount>0&&1/(l-o)p&&(o<=0?l=o+1/p:o=l-1/p),o<0&&l-o<1/p&&(l=o+1/p)),o<-r&&(o=-r),1/(l-o)>p&&(l=o+1/p),l>1+r&&(l=1+r),1/(l-o)>p&&(o=l-1/p),this._finalEnd=l,this._finalStart=o,this.skipRangeEvent=t,this.dispatchImmediately("rangechangestarted"),this.rangeChangeDuration>0&&!n){var d=this.rangeChangeAnimation;if(d&&d.progress<1){var c=d.animationOptions;if(c.length>1){if(c[0].to==o&&c[1].to==l)return{start:o,end:l};d.isDisposed()||d.stop()}}this.rangeChangeAnimation&&this.rangeChangeAnimation.kill(),d=this.animate([{property:"start",to:o},{property:"end",to:l}],this.rangeChangeDuration,this.rangeChangeEasing),this.rangeChangeAnimation=d,d&&!d.isFinished()?d.events.on("animationended",function(){a.dispatchImmediately("rangechangeended")}):this.dispatchImmediately("rangechangeended")}else this.start=o,this.end=l,this.dispatch("rangechangeended")}return{start:o,end:l}},i.prototype.zoomToIndexes=function(e,t,n,r){if(y(e)&&y(t)){var a=e/this.dataItems.length,o=t/this.dataItems.length;this.zoom({start:a,end:o},n,r)}},Object.defineProperty(i.prototype,"zoomFactor",{get:function(){return R(1/(this.end-this.start),1,this.maxZoomFactor)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxZoomFactor",{get:function(){return this.getPropertyValue("maxZoomFactor")},set:function(e){this.setPropertyValue("maxZoomFactor",e)&&(e==1&&(this.maxZoomDeclination=0),this.invalidateDataRange())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxZoomDeclination",{get:function(){return this.getPropertyValue("maxZoomDeclination")},set:function(e){this.setPropertyValue("maxZoomDeclination",e)&&this.invalidateDataRange()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startIndex",{get:function(){return y(this._startIndex)||(this._startIndex=0),this._startIndex},set:function(e){this._startIndex=R(Math.round(e),0,this.dataItems.length),this.start=this.indexToPosition(this._startIndex)},enumerable:!0,configurable:!0}),i.prototype.indexToPosition=function(e){return e/this.dataItems.length},Object.defineProperty(i.prototype,"endIndex",{get:function(){var e=this.dataItems.length;return(!y(this._endIndex)||this._endIndex>e)&&(this._endIndex=e),this._endIndex},set:function(e){this._endIndex=R(Math.round(e),0,this.dataItems.length),this.end=this.indexToPosition(this._endIndex)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"start",{get:function(){return this._adapterO?this._adapterO.apply("start",this._start):this._start},set:function(e){if(this._start!=e){this._start=e;var t=Math.max(0,Math.floor(this.dataItems.length*e)||0);this._startIndex=Math.min(t,this.dataItems.length),this.invalidateDataRange(),this.invalidate(),this.dispatchImmediately("startchanged"),this.dispatch("startendchanged")}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"end",{get:function(){return this._adapterO?this._adapterO.apply("end",this._end):this._end},set:function(e){this._end!=e&&(this._end=e,this._endIndex=Math.min(this.dataItems.length,Math.ceil(this.dataItems.length*e)||0),this.invalidateDataRange(),this.invalidate(),this.dispatchImmediately("endchanged"),this.dispatch("startendchanged"))},enumerable:!0,configurable:!0}),i.prototype.removeFromInvalids=function(){s.prototype.removeFromInvalids.call(this),_.removeFromInvalidComponents(this),z(_.invalidDataItems,this),z(_.invalidDataRange,this),z(_.invalidRawDatas,this)},Object.defineProperty(i.prototype,"dataItems",{get:function(){if(this._currentDataSetId!=""){var e=this.dataSets.getKey(this._currentDataSetId);if(e)return e}return this._dataItems},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dataSets",{get:function(){return this._dataSets||(this._dataSets=new me),this._dataSets},enumerable:!0,configurable:!0}),i.prototype.setDataSet=function(e){if(this._currentDataSetId!=e){if(this.dataSets.getKey(e))return this.dataItems.each(function(t){t.__disabled=!0}),this._currentDataSetId=e,this.invalidateDataRange(),this._prevStartIndex=void 0,this.dataItems.each(function(t){t.__disabled=!1}),!0;if(this._currentDataSetId!="")return this.dataItems.each(function(t){t.__disabled=!0}),this._currentDataSetId="",this.invalidateDataRange(),this._prevStartIndex=void 0,this.dataItems.each(function(t){t.__disabled=!1}),!0}return!1},Object.defineProperty(i.prototype,"currentDataSetId",{get:function(){return this._currentDataSetId},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"mainDataSet",{get:function(){return this._dataItems},enumerable:!0,configurable:!0}),i.prototype._updateDataItemIndexes=function(e){for(var t=this.mainDataSet.values,n=t.length,r=e;rthis.availableWidth||this.bbox.widththis.availableHeight||this.bbox.heightr){this.isOversized=!0;var k=P.element.textContent,D=P.bbox.width/k.length,G=ie(Math.ceil((P.bbox.width-r)/D),k.length);if(this.truncate){var H=!1,ne=P.element.node;if(ne&&ne.childNodes)for(var Te=P.element.node.childNodes.length-1;Te>=0;Te--){var Ge=P.element.node.childNodes[Te];if(H&&P.bbox.width<=r&&(Ge.textContent+=" "+this.ellipsis,P.bbox=P.element.getBBox(),P.bbox.width=Math.floor(P.bbox.width),P.bbox.width<=r))break;H=!1;var he=Ge.textContent;for(k=P.element.textContent,G=ie(Math.ceil((P.bbox.width-r)/D),k.length);P.bbox.width>r&&G<=k.length&&G>0;)(U=q(k.length-G-this.ellipsis.length,1))<=1&&(G=0,Te>0&&(H=!0,P.element.node.removeChild(Ge))),(he=Pr(he,U,this.ellipsis,this.fullWords,this.rtl)).length>U&&this.fullWords&&(he=Pr(he,U,this.ellipsis,!1,this.rtl)),Ge.textContent=he,P.bbox=P.element.getBBox(),P.bbox.width=Math.floor(P.bbox.width),G=Math.ceil(1.1*G);S=!0}}else if(P.element.node){for(var et=P.element.node.lastChild,we=void 0;P.bbox.width>r&&G<=k.length&&G>0;){var U=q(I.text.length-G,1);if(C?we=_r(I.text,U,!0,this.rtl):((we=_r(I.text,U,!0,this.rtl,!1))[0].length>U||U===1)&&(P.element.node.removeChild(et),G=0),G>0){var nt=we.shift();C&&(nt=ga(nt)),et.textContent=Ft().cleanUp(nt)}P.bbox=P.element.getBBox(),P.bbox.width=Math.floor(P.bbox.width),G++}if(we.length>0){var qe="";v(we)&&(this.rtl?qe+=we.join("")+f:qe+=f+we.join("").replace(/([\[\]]{1})/g,"$1$1"));for(var Y=O+1;Y0&&(c+=ke),d.removeElement(ge);var Lt=this.getLineInfo(g);Lt&&(Lt.text="",Lt.element.textContent="")}}this.maybeHideOversized(),this.measureFailed=!1,this.bbox.width!=0&&this.bbox.height!=0||(this.measureFailed=!0),this._measuredWidth=V(q(this.bbox.width,this.pixelWidth-this.pixelPaddingLeft-this.pixelPaddingRight)),this._measuredHeight=V(q(this.bbox.height,this.pixelHeight-this.pixelPaddingTop-this.pixelPaddingBottom)),this.alignSVGText(),this.bbox.width=this._measuredWidth,this.bbox.height=this._measuredHeight,t==this._measuredHeight&&e==this._measuredWidth||this.dispatch("transformed"),this.hideUnused(p.length)}else{this.element.removeAttr("display"),this.resetBBox(),(d=this.element).removeChildren(),this.setCache("lineInfo",[],0);var tt=this.paper.foreignObject();d.add(tt),this.maxWidth&&tt.attr({width:this.maxWidth-this.pixelPaddingLeft-this.pixelPaddingRight}),this.maxHeight&&tt.attr({height:this.maxHeight-this.pixelPaddingTop-this.pixelPaddingBottom});var Je=this.getHTMLLineElement(h);tt.node.appendChild(Je),Je.style.display="inline-block";var Dt=Je.clientWidth,jt=Je.clientHeight;Je.style.display="block",this._bbox={x:0,y:0,width:Dt,height:jt},tt.attr({width:Dt+1,height:jt}),this.maybeHideOversized(),this._measuredWidth=q(this.bbox.width,this.pixelWidth-this.pixelPaddingLeft-this.pixelPaddingRight),this._measuredHeight=q(this.bbox.height,this.pixelHeight-this.pixelPaddingTop-this.pixelPaddingBottom),this.bbox.width=this._measuredWidth,this.bbox.height=this._measuredHeight,this.truncate&&(Je.style.overflow="hidden"),(Dt>r||jt>a)&&(this.isOversized=!0)}this.setStyles(),this.updateCenter(),this.updateBackground(),u=="none"&&this.group.attr({display:"none"}),this.pathElement&&this.paper.appendDef(this.pathElement)}else this.element.attr({display:"none"})}}else n.events.once("maxsizechanged",this.hardInvalidate,this,!1)},i.prototype.maybeHideOversized=function(){this.hideOversized&&(this.availableWidth=0;a--){var o=t[a];if(o.setAttribute("text-anchor",this.textAlign),this.textPathElement)o.removeAttribute("x"),o.removeAttribute("y");else{switch(this.textAlign){case"middle":o.setAttribute("x",(n/2).toString()+"px");break;case"end":this.rtl||o.setAttribute("x",n.toString());break;default:this.rtl?o.setAttribute("x",n.toString()):o.removeAttribute("text-anchor")}var l=ce(o.getAttribute("y"));switch(this.textValign){case"middle":o.setAttribute("y",((l||0)+(r-this.bbox.height)/2).toString());break;case"bottom":o.setAttribute("y",((l||0)+r-this.bbox.height).toString());break;default:o.setAttribute("y",(l||0).toString())}}}}},i.prototype.getSVGLineElement=function(e,t){var n=this.paper.addGroup("text");return n.textContent=e,n.attr({x:"0"}),v(t)&&n.attr({y:t.toString()}),(this.truncate||this.wrap)&&n.attr({overflow:"hidden"}),n},Object.defineProperty(i.prototype,"rtl",{get:function(){return v(this._rtl)?this._rtl:!!this._topParent&&this._topParent.rtl},set:function(e){e=ve(e),this._rtl=e,this.element&&this.alignSVGText()},enumerable:!0,configurable:!0}),i.prototype.resetBBox=function(){this._bbox={x:0,y:0,width:0,height:0}},i.prototype.getHTMLLineElement=function(e){var t=document.createElement("div");switch(t.innerHTML=e,this.textAlign){case"middle":t.style.textAlign="center";break;case"end":t.style.textAlign="right"}return this.wrap?t.style.wordWrap="break-word":t.style.whiteSpace="nowrap",this.rtl&&(t.style.direction="rtl"),v(this.fill)&&(t.style.color=this.fill.toString()),t},i.prototype.setStyles=function(){var e=this.element;!this.selectable||this.draggable||this.resizable||this.swipeable?e.addStyle({webkitUserSelect:"none",msUserSelect:"none"}):this.selectable&&(e.removeStyle("webkitUserSelect"),e.removeStyle("msUserSelect"))},i.prototype.hideUnused=function(e){this.initLineCache();var t=this.getCache("lineInfo");if(t.length>=e)for(var n=e;ne?t[e]:void 0},i.prototype.addLineInfo=function(e,t){this.initLineCache(),this.getCache("lineInfo")[t]=e},i.prototype.initLineCache=function(){v(this.getCache("lineInfo"))||this.setCache("lineInfo",[],0)},i.prototype.setDataItem=function(e){this._sourceDataItemEvents&&this._sourceDataItemEvents.dispose(),e&&(this._sourceDataItemEvents=new _e([e.events.on("valuechanged",this.invalidate,this,!1),e.events.on("workingvaluechanged",this.invalidate,this,!1),e.events.on("calculatedvaluechanged",this.invalidate,this,!1),e.events.on("propertychanged",this.invalidate,this,!1)])),s.prototype.setDataItem.call(this,e)},Object.defineProperty(i.prototype,"availableWidth",{get:function(){return v(this.maxWidth)?this.maxWidth:this.pixelWidth},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"availableHeight",{get:function(){return v(this.maxHeight)?this.maxHeight:this.pixelHeight},enumerable:!0,configurable:!0}),i.prototype.getSvgElement=function(e,t,n){var r=this.paper.add("tspan");if(r.textContent=e,t)if(Z.nonce&&n){var a="amcharts_element_style_"+btoa(t).replace(/[^\w]*/g,"");r.node.setAttribute("class",a);var o=document.createElementNS(zi,"defs");n.node.appendChild(o);var l=document.createElement("style");l.type="text/css",l.innerHTML="."+a+" { "+t+"}",l.setAttribute("nonce",Z.nonce),o.appendChild(l)}else r.node.setAttribute("style",t);return n&&n.add(r),r},i.prototype.deepInvalidate=function(){s.prototype.deepInvalidate.call(this),this.hardInvalidate()},Object.defineProperty(i.prototype,"readerTitle",{get:function(){var e=this.getPropertyValue("readerTitle");return e?this.dataItem&&(e=this.populateString(e)):e=this.populateString(Cr(Pn(this.html)?this.html:this.text)),e},set:function(e){e=Xe(e),this.setPropertyValue("readerTitle",e)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),i}(W);_.registeredClasses.Label=$e,Ne.push({relevant:Ue.heightXS,state:function(s,i){if(s instanceof $e&&s.parent&&s.parent.isBaseSprite){var e=s.states.create(i);return e.properties.disabled=!0,e}return null}});var St=function(s){function i(){var e=s.call(this)||this;return e.className="RoundedRectangle",e.element=e.paper.add("path"),e.cornerRadius(3,3,3,3),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.innerWidth,t=this.innerHeight;if(y(e)&&y(t)){var n=ie(e,t)/2,r=xe(this.cornerRadiusTopLeft,n),a=xe(this.cornerRadiusTopRight,n),o=xe(this.cornerRadiusBottomRight,n),l=xe(this.cornerRadiusBottomLeft,n),h=ie(Math.abs(e/2),Math.abs(t/2)),p=R(r,0,h),u=R(a,0,h),d=R(o,0,h),c=R(l,0,h),f="M"+p+",0 L"+(e-u)+",0 a"+u+","+u+" 0 0 1 "+u+","+u+" L"+e+","+(t-d)+" a"+d+","+d+" 0 0 1 -"+d+","+d+" L"+c+","+t+" a"+c+","+c+" 0 0 1 -"+c+",-"+c+" L0,"+p+" a"+p+","+p+" 0 0 1 "+p+",-"+p+" Z";this.path=f}},i.prototype.cornerRadius=function(e,t,n,r){this.cornerRadiusTopLeft=e,this.cornerRadiusTopRight=t,this.cornerRadiusBottomLeft=n,this.cornerRadiusBottomRight=r},Object.defineProperty(i.prototype,"cornerRadiusTopLeft",{get:function(){return this.getPropertyValue("cornerRadiusTopLeft")},set:function(e){this.setPercentProperty("cornerRadiusTopLeft",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cornerRadiusTopRight",{get:function(){return this.getPropertyValue("cornerRadiusTopRight")},set:function(e){this.setPercentProperty("cornerRadiusTopRight",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cornerRadiusBottomRight",{get:function(){return this.getPropertyValue("cornerRadiusBottomRight")},set:function(e){this.setPercentProperty("cornerRadiusBottomRight",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cornerRadiusBottomLeft",{get:function(){return this.getPropertyValue("cornerRadiusBottomLeft")},set:function(e){this.setPercentProperty("cornerRadiusBottomLeft",e,!0)},enumerable:!0,configurable:!0}),i.prototype.measureElement=function(){},Object.defineProperty(i.prototype,"bbox",{get:function(){return this.definedBBox?this.definedBBox:this.isMeasured?{x:0,y:0,width:this.innerWidth,height:this.innerHeight}:{x:0,y:0,width:0,height:0}},enumerable:!0,configurable:!0}),i}($);_.registeredClasses.RoundedRectangle=St;var Xt=function(s){function i(){var e=s.call(this)||this;e.className="Button",e.tooltipY=0,e.iconPosition="left",e.layout="horizontal",e.contentAlign="center",e.contentValign="middle",e.padding(8,16,8,16),e.setStateOnChildren=!0;var t=new ae,n=e.background;n.fill=t.getFor("secondaryButton"),n.stroke=t.getFor("secondaryButtonStroke"),n.fillOpacity=1,n.strokeOpacity=1,n.cornerRadius(3,3,3,3),e.label=new $e,e.label.fill=t.getFor("secondaryButtonText"),e.label.shouldClone=!1;var r=n.states.create("hover");r.properties.fillOpacity=1,r.properties.fill=t.getFor("secondaryButtonHover");var a=n.states.create("down");return a.transitionDuration=100,a.properties.fill=t.getFor("secondaryButtonDown"),a.properties.fillOpacity=1,e.role="button",e.focusable=!0,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"icon",{get:function(){return this._icon},set:function(e){var t=this._icon;t&&(t.parent=void 0),e&&(this._icon=e,e.parent=this,e.interactionsEnabled=!1,e.shouldClone=!1,this.iconPosition=this.iconPosition,this._disposers.push(e))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"iconPosition",{get:function(){return this.getPropertyValue("iconPosition")},set:function(e){this.setPropertyValue("iconPosition",e),this.icon&&(e=="left"?this.icon.toBack():this.icon.toFront())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"label",{get:function(){return this._label},set:function(e){this._label&&this.removeDispose(this._label),this._label=e,e&&(e.parent=this,e.interactionsEnabled=!1,this._disposers.push(this._label))},enumerable:!0,configurable:!0}),i.prototype.createBackground=function(){return new St},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),e.label&&this.label.copyFrom(e.label),e.icon&&(this.icon=e.icon.clone())},i}(W);_.registeredClasses.Button=Xt;var ii=function(s){function i(){var e=s.call(this)||this;return e.className="Circle",e.element=e.paper.add("circle"),e.setPercentProperty("radius",F(100)),e.setPropertyValue("horizontalCenter","middle"),e.setPropertyValue("verticalCenter","middle"),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this),this.element.attr({r:this.pixelRadius})},Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPercentProperty("radius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelRadius",{get:function(){return xe(this.radius,ie(this.innerWidth/2,this.innerHeight/2))},enumerable:!0,configurable:!0}),i.prototype.measureElement=function(){var e=this.pixelRadius;this._bbox={x:-e,y:-e,width:2*e,height:2*e}},i}($);_.registeredClasses.Circle=ii;var Wr=function(s){function i(){var e=s.call(this)||this;return e.className="Ellipse",e.element=e.paper.add("ellipse"),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this),this.element.attr({rx:this.radius}),this.element.attr({ry:this.radiusY})},Object.defineProperty(i.prototype,"radiusY",{get:function(){return this.innerHeight/2},set:function(e){this.height=2*e,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radius",{get:function(){return this.innerWidth/2},set:function(e){this.width=2*e,this.invalidate()},enumerable:!0,configurable:!0}),i}(ii);_.registeredClasses.Ellipse=Wr;var ap=function(s){function i(){var e=s.call(this)||this;return e.className="Image",e.element=e.paper.add("image"),e.applyTheme(),e.width=50,e.height=50,e}return w(i,s),i.prototype.draw=function(){if(s.prototype.draw.call(this),this.href){var e=this.innerWidth,t=this.innerHeight;y(this.widthRatio)&&(e=t*this.widthRatio,this.width=e),y(this.heightRatio)&&(t=e*this.heightRatio,this.height=t),this.element.attr({width:e,height:t}),this.element.attrNS(Ta,"xlink:href",this.href)}},Object.defineProperty(i.prototype,"href",{get:function(){return this.getPropertyValue("href")},set:function(e){this.setPropertyValue("href",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"widthRatio",{get:function(){return this.getPropertyValue("widthRatio")},set:function(e){this.setPropertyValue("widthRatio",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"heightRatio",{get:function(){return this.getPropertyValue("heightRatio")},set:function(e){this.setPropertyValue("heightRatio",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bbox",{get:function(){return{x:0,y:0,width:this.pixelWidth,height:this.pixelHeight}},enumerable:!0,configurable:!0}),i}($);_.registeredClasses.Image=ap;var yt=function(s){function i(){var e=s.call(this)||this;return e.className="Line",e.element=e.paper.add("line"),e.fill=B(),e.x1=0,e.y1=0,e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this),this.x1==this.x2||this.y1==this.y2?this.pixelPerfect=!0:this.pixelPerfect=!1,this.x1=this.x1,this.x2=this.x2,this.y1=this.y1,this.y2=this.y2},Object.defineProperty(i.prototype,"x1",{get:function(){return this.getPropertyValue("x1")},set:function(e){y(e)||(e=0);var t=0;this.pixelPerfect&&this.stroke instanceof dt&&(t=1e-5),this.setPropertyValue("x1",e,!0),this.element.attr({x1:e+t})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"x2",{get:function(){var e=this.getPropertyValue("x2");return y(e)||(e=this.pixelWidth),e},set:function(e){y(e)||(e=0),this.setPropertyValue("x2",e,!0),this.element.attr({x2:e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"y1",{get:function(){return this.getPropertyValue("y1")},set:function(e){y(e)||(e=0);var t=0;this.pixelPerfect&&this.stroke instanceof dt&&(t=1e-5),this.setPropertyValue("y1",e,!0),this.element.attr({y1:e+t})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"y2",{get:function(){var e=this.getPropertyValue("y2");return y(e)||(e=this.pixelHeight),e},set:function(e){y(e)||(e=0),this.setPropertyValue("y2",e,!0),this.element.attr({y2:e})},enumerable:!0,configurable:!0}),i.prototype.positionToPoint=function(e){var t={x:this.x1,y:this.y1},n={x:this.x2,y:this.y2},r=ln(t,n,e),a=Ee(t,n);return{x:r.x,y:r.y,angle:a}},i}($);_.registeredClasses.Line=yt;var op=function(s){function i(){var e=s.call(this)||this;return e.className="PointedShape",e.pointerBaseWidth=15,e.pointerLength=10,e.pointerY=0,e.pointerX=0,e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this),y(this.pointerX)||(this.pointerX=this.pixelWidth/2),y(this.pointerY)||(this.pointerY=this.pixelHeight+10)},Object.defineProperty(i.prototype,"pointerBaseWidth",{get:function(){return this.getPropertyValue("pointerBaseWidth")},set:function(e){this.setPropertyValue("pointerBaseWidth",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pointerLength",{get:function(){return this.getPropertyValue("pointerLength")},set:function(e){this.setPropertyValue("pointerLength",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pointerX",{get:function(){return this.getPropertyValue("pointerX")},set:function(e){this.setPropertyValue("pointerX",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pointerY",{get:function(){return this.getPropertyValue("pointerY")},set:function(e){this.setPropertyValue("pointerY",e,!0)},enumerable:!0,configurable:!0}),i}($),lp=function(s){function i(){var e=s.call(this)||this;return e.className="PointedRectangle",e.element=e.paper.add("path"),e.cornerRadius=6,e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.cornerRadius,t=this.innerWidth,n=this.innerHeight;if(t>0&&n>0){var r,a,o=this.pointerX,l=this.pointerY,h=this.pointerBaseWidth/2,p=ie(t/2,n/2),u=R(e,0,p),d=R(e,0,p),c=R(e,0,p),f=R(e,0,p),g=void 0,m=void 0,x=void 0,b=void 0,C=(o-0)*(n-0)-(l-0)*(t-0),S=(o-0)*(0-n)-(l-n)*(t-0);g=C>0&&S>0?"M"+u+",0 L"+((r=R(o,u+h,t-h-d))-h)+",0 L"+o+","+(l=R(l,-1/0,0))+" L"+(r+h)+",0 L"+(t-d)+",0":"M"+u+",0 L"+(t-d)+",0",x=C<0&&S<0?" L"+(t-c)+","+n+" L"+((r=R(o,f+h,t-h-c))+h)+","+n+" L"+o+","+(l=R(l,n,1/0))+" L"+(r-h)+","+n+" L"+f+","+n:" L"+f+","+n,b=C<0&&S>0?" L0,"+(n-f)+" L0,"+((a=R(l,u+h,n-f-h))+h)+" L"+(o=R(o,-1/0,0))+","+l+" L0,"+(a-h)+" L0,"+u:" L0,"+u,m=C>0&&S<0?" L"+t+","+d+" L"+t+","+((a=R(l,d+h,n-h-c))-h)+" L"+(o=R(o,t,1/0))+","+l+" L"+t+","+(a+h)+" L"+t+","+(n-c):" L"+t+","+(n-c);var P=" a"+d+","+d+" 0 0 1 "+d+","+d,O=" a"+c+","+c+" 0 0 1 -"+c+","+c,I=" a"+f+","+f+" 0 0 1 -"+f+",-"+f,k=" a"+u+","+u+" 0 0 1 "+u+",-"+u;this.path=g+P+m+O+x+I+b+k}},Object.defineProperty(i.prototype,"cornerRadius",{get:function(){return this.getPropertyValue("cornerRadius")},set:function(e){this.setPropertyValue("cornerRadius",e,!0)},enumerable:!0,configurable:!0}),i}(op);function Zi(s){var i=T(s[0]),e={x:0,y:0},t=Z.minPolylineStep;y(t)||(t=.5);for(var n=0,r=s.length;nt&&(i+=T(a),e=a)}return i}function E(s){return" M"+V(s.x,4)+","+V(s.y,4)+" "}function T(s){return" L"+V(s.x,4)+","+V(s.y,4)+" "}function ni(s,i){return" Q"+V(i.x,4)+","+V(i.y,4)+" "+V(s.x,4)+","+V(s.y,4)}function _i(s,i,e){return" C"+V(i.x,4)+","+V(i.y,4)+" "+V(e.x,4)+","+V(e.y,4)+" "+V(s.x,4)+","+V(s.y,4)}function pd(){return" Z"}function Le(s,i,e,t){if(i==0)return"";y(t)||(t=e);var n="",r=",",a=Math.ceil(Math.abs(i)/180),o=1;i<0&&(o=0);var l=0,h=0,p=-L(s)*e,u=-M(s)*t;if(i<.5&&e>3e3)return T({x:f=V(L(c=s+i)*e,4),y:g=V(M(c)*t,4)});for(var d=0;d(l-s)/2&&(k=b);var D="";return i==360?D=E(S):(D=E(C),D+=T(S),D+=ot(I,r,u,!0)),D+=Le(s+c,i-2*c,e,n),y(t)&&t!=0?(i==360&&r==0?D+=E(O):(D+=ot(P,r,u,!0),D+=T(O),D+=ot(k,a,d,!0)),D+=Le(l-g,-(i-2*g),t,p),(i<360||r>0)&&(D+=ot(C,a,d,!0)),D+=T(C)):(D+=ot(P,r,u,!0),i<360&&(D+=T(C))),D}function ot(s,i,e,t,n,r){if(i==0)return"";var a=",";return" A"+i+a+e+a+(r=r||0)+a+ +(n=Boolean(n))+a+ +(t=Boolean(t))+a+V(s.x,4)+a+V(s.y,4)}function Xr(s,i,e,t){return y(e)||(e=0),y(t)||(t=0),E({x:e,y:t})+T({x:e+s,y:t})+T({x:e+s,y:t+i})+T({x:e,y:t+i})+" Z"}function Yt(s,i){var e=",",t=" L";return i?"M"+s.x+e+s.y+t+s.x+e+(s.y+s.height)+t+(s.x+s.width)+e+(s.y+s.height)+t+(s.x+s.width)+e+s.y+t+s.x+e+s.y:"M"+s.x+e+s.y+t+(s.x+s.width)+e+s.y+t+(s.x+s.width)+e+(s.y+s.height)+t+s.x+e+(s.y+s.height)+t+s.x+e+s.y}function ud(s,i){var e=Ui().add("path").node;if(e.setAttribute("d",s),e.getPointAtLength&&e.getTotalLength){for(var t=e.getTotalLength(),n=[],r=0;rh&&(d=2*h),(p+=2*Math.asin(d/2/h))*vt>l+(e-n)/a*360)break;var c=p*vt,f={x:s+h*Math.cos(p),y:i+h*t/e*Math.sin(p)};u.push(f),h=n+c/360*a}return u.shift(),u}function cd(s){if(!s||s.length==0)return"";var i=E(s[0]);if(s&&s.length>0)for(var e=1;e0){for(var t="",n=0,r=e.length;n0){t+=E(a[0]);for(var o=1;o1){for(var c=1;ce){u=n.length;break}}else d.length==1&&(h=d[0],p=d[0],o=0,l=1)}if(h&&p){var f=ln(h,p,(e-o)/(l-o));return{x:f.x,y:f.y,angle:t+Ee(h,p)}}}return{x:0,y:0,angle:0}},Object.defineProperty(i.prototype,"realSegments",{get:function(){return this._realSegments},enumerable:!0,configurable:!0}),i}($);_.registeredClasses.Polyline=qi;var hp=function(s){function i(){var e=s.call(this)||this;return e.className="Polyarc",e.controlPointDistance=.5,e.controlPointPosition=.5,e.applyTheme(),e}return w(i,s),i.prototype.makePath=function(){this._distance=0;var e=this.segments;if(e&&e.length>0){var t="";this._realSegments=[];for(var n=0,r=e.length;n0){t+=E(a[0]);for(var l=1;l0)for(var C=0;C<=x;C++){var S=ar(h,p,g,m,C/x);o.push(S),this._distance+=oe(b,S),b=S}else o.push(h)}}}this.path=t}},Object.defineProperty(i.prototype,"controlPointPosition",{get:function(){return this.getPropertyValue("controlPointPosition")},set:function(e){this.setPropertyValue("controlPointPosition",e),this.makePath()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"controlPointDistance",{get:function(){return this.getPropertyValue("controlPointDistance")},set:function(e){this.setPropertyValue("controlPointDistance",e),this.makePath()},enumerable:!0,configurable:!0}),i}(qi);_.registeredClasses.Polyarc=hp;var pp=function(s){function i(e){var t=s.call(this)||this;return t._bboxes=[],t.morphDuration=800,t.morphEasing=Qt,t.morphToSingle=!0,t.scaleRatio=1,t.className="Morpher",t.morphable=e,t.applyTheme(),t}return w(i,s),i.prototype.morphToPolygon=function(e,t,n){var r=this.morphable.currentPoints;if(r&&e){this.sortPoints(r),this.sortPoints(e),this._morphFromPointsReal=[],this._morphToPointsReal=[],v(t)||(t=this.morphDuration),v(n)||(n=this.morphEasing),this._morphFromPointsReal=this.normalizePoints(e,r),this._morphToPointsReal=this.normalizePoints(r,e),this.morphable.currentPoints=this._morphFromPointsReal;var a=new gt(this,{property:"morphProgress",from:0,to:1},t,n);return this._disposers.push(a),a.start(),a}},i.prototype.normalizePoints=function(e,t){for(var n=0,r=e.length;np.width*p.height?-1:1});for(var t=[],n=0,r=e.length;nb&&(b=h.length);for(var C=360/((b=(d=this.addPoints(h,b)).length)-1),S=0;S0)for(var I=0,k=p.length;I0){var c=e[e.length-1];for(p=r.length;p0)for(var C=c.x+c.width/2,S=c.y+c.height/2,P=0,O=p.length;P0&&u&&u.length>0){for(var c=[],f=0,g=h.length;f0&&d&&d.length>0){for(var C=[],S=0,P=p.length;S0){var o=a.split("M"),l=o[0],h=o[1];if(l&&l.length>0){var p=l.split("L");if(p.length>0){var u=[],d=[u];e.push(d);for(var c=0;c0){var g=h.split("L");if(g.length>0){var m=[];for(d.push(m),c=g.length-1;c>=0;c--)f=g[c].split(","),m.push({x:+f[0],y:+f[1]})}}}}}}this.setPropertyValue("points",e),this._currentPoints=e}return e},set:function(e){this.setPropertyValue("points",e,!0),this._currentPoints=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"currentPoints",{get:function(){return this._currentPoints&&this._currentPoints.length!=0||!this.path||(this._currentPoints=this.points),this._currentPoints},set:function(e){this._currentPoints!=e&&(this._currentPoints=e,this.draw())},enumerable:!0,configurable:!0}),i.prototype.draw=function(){var e,t,n,r,a="",o=this._currentPoints;if(o.length>0){for(var l=0,h=o.length;l0){a+=E(c=p[0]);for(var d=0;dc.x)&&(e=c.x),(!y(n)||n>c.y)&&(n=c.y),(!y(r)||r0){var c;a+=E(c=u[0]);for(var f=0,g=u.length;f0){var r="";this._realSegments=[];for(var a=0,o=e.length;a0){var p=l[0],u=l[l.length-1],d=!1;V(p.x,3)==V(u.x)&&V(p.y)==V(u.y)&&(d=!0),r+=E(l[0]);for(var c=0;c0)for(var O=0;O<=S;O++){var I=ar(g,m,b,C,O/S);if(I.x!=P.x||I.y!=P.y){h.push(I);var k=V(Ee(P,I),5);this._distance+=oe(P,I),this.allPoints[Math.floor(this._distance)]={x:I.x,y:I.y,angle:k},P=I}}else h.push(f)}}var D=this.allPoints;if(D.length>1){for(var G=0;G1)D[G]=D[G-1];else for(var H=1;H1)for(var a=1;a1){if(t&&a>3){if(e<0){e<-.01&&(e=-.01);var o=r[0],l=r[1];return{x:h=o.x-(o.x-l.x)*a*e,y:p=o.y-(o.y-l.y)*a*e,angle:Ee(o,l)}}var h,p;if(e>1)return e>1.01&&(e=1.01),o=r[r.length-2],l=r[r.length-3],{x:h=o.x+(o.x-l.x)*a*(e-1),y:p=o.y+(o.y-l.y)*a*(e-1),angle:Ee(o,{x:h,y:p})};if(e==1){var u=r[r.length-1];return{x:u.x,y:u.y,angle:u.angle}}}else e<0&&(e=Math.abs(e),n=180),e>=1&&(e=.9999999999999);var d;return{x:(d=r[Math.floor(e*a)]).x,y:d.y,angle:d.angle+n}}return a==1?{x:(d=r[0]).x,y:d.y,angle:d.angle}:{x:0,y:0,angle:0}},i}(qi);_.registeredClasses.Polyspline=jn;var ri=function(s){function i(){var e=s.call(this)||this;return e.className="Slice",e.setPropertyValue("cornerRadius",0),e.setPropertyValue("startAngle",0),e.setPercentProperty("innerRadius",0),e.setPercentProperty("radius",0),e.setPropertyValue("arc",0),e.setPropertyValue("shiftRadius",0),e.strokeOpacity=1,e.setPropertyValue("layout","none"),e.slice=e.createChild($),e.slice.isMeasured=!1,e._disposers.push(e.slice),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.radiusY;this.radius>0&&e==0&&(e=.01),this.slice.path=Pi(this.startAngle,this.arc,this.radius,this.pixelInnerRadius,e,this.cornerRadius,this.innerCornerRadius),this.slice.invalidate(),this.shiftRadius=this.shiftRadius,this.realFill instanceof Nt&&this.updateGradient(this.realFill),this.realStroke instanceof Nt&&this.updateGradient(this.realStroke)},i.prototype.updateGradient=function(e){e.element.attr({gradientUnits:"userSpaceOnUse"}),e.element.attr({r:this.radius}),e.cx=0,e.cy=0,e.element.attr({radius:this.radius})},Object.defineProperty(i.prototype,"bbox",{get:function(){return this.definedBBox?this.definedBBox:this.isMeasured?Mi([xt(this.startAngle,this.startAngle+this.arc,this.pixelInnerRadius),xt(this.startAngle,this.startAngle+this.arc,this.radius)]):{x:0,y:0,width:0,height:0}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(e){this.setPropertyValue("startAngle",Zt(e),!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"arc",{get:function(){return this.getPropertyValue("arc")},set:function(e){y(e)||(e=0),this.setPropertyValue("arc",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radius",{get:function(){var e=this.getPropertyValue("radius");return y(e)||(e=0),e},set:function(e){this.setPropertyValue("radius",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radiusY",{get:function(){var e=this.getPropertyValue("radiusY");return y(e)||(e=this.radius),e},set:function(e){this.setPropertyValue("radiusY",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(e){this.setPercentProperty("innerRadius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelInnerRadius",{get:function(){return xe(this.innerRadius,this.radius)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cornerRadius",{get:function(){return this.getPropertyValue("cornerRadius")},set:function(e){this.setPropertyValue("cornerRadius",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"innerCornerRadius",{get:function(){return this.getPropertyValue("innerCornerRadius")},set:function(e){this.setPropertyValue("innerCornerRadius",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"shiftRadius",{get:function(){return this.getPropertyValue("shiftRadius")},set:function(e){this.setPropertyValue("shiftRadius",e),e=this.getPropertyValue("shiftRadius"),this.dx=e*this.radius*this.ix,this.dy=e*this.radiusY*this.iy},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"ix",{get:function(){return L(this.middleAngle)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"iy",{get:function(){return M(this.middleAngle)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"middleAngle",{get:function(){return this.startAngle+this.arc/2},enumerable:!0,configurable:!0}),i.prototype.getTooltipX=function(){var e=this.getPropertyValue("tooltipX");if(y(e))return e;var t=.5;e instanceof te&&(t=e.value);var n=xe(this.innerRadius,this.radius);return this.ix*(n+(this.radius-n)*t)},i.prototype.getTooltipY=function(){var e=this.getPropertyValue("tooltipY");if(y(e))return e;var t=.5;e instanceof te&&(t=e.value);var n=xe(this.innerRadius,this.radius);return this.iy*(n+(this.radius-n)*t)+this.slice.dy},i}(W);_.registeredClasses.Slice=ri;var Za=function(s){function i(){var e=s.call(this)||this;e.className="Preloader",e.width=F(100),e.height=F(100);var t=new ae,n=e.createChild(W);n.shouldClone=!1;var r=n.createChild(ri);r.shouldClone=!1,r.radius=53,r.arc=360,r.fill=t.getFor("fill"),r.fillOpacity=.8,r.innerRadius=42,r.isMeasured=!1,e.backgroundSlice=r;var a=n.createChild(ri);a.shouldClone=!1,a.radius=50,a.innerRadius=45,a.fill=t.getFor("alternativeBackground"),a.fillOpacity=.2,a.isMeasured=!1,e.progressSlice=a;var o=n.createChild($e);return o.shouldClone=!1,o.horizontalCenter="middle",o.verticalCenter="middle",o.isMeasured=!1,o.fill=t.getFor("text"),o.align="center",o.valign="middle",o.textAlign="middle",o.fillOpacity=.4,e.label=o,e.background.opacity=1,e.background.fill=t.getFor("background"),e.contentAlign="center",e.contentValign="middle",e.delay=300,e.states.create("hidden").properties.opacity=0,e.visible=!1,e.hide(0),e.__disabled=!0,e._disposers.push(e.backgroundSlice),e._disposers.push(e.progressSlice),e._disposers.push(e.label),e._disposers.push(n),e}return w(i,s),Object.defineProperty(i.prototype,"progress",{get:function(){return this.getPropertyValue("progress")},set:function(e){var t=this;this.__disabled=!1,this.validateLayout(),this.setPropertyValue("progress",e),this.progressSlice.arc=360*e,this.label&&(this.label.text=Math.round(100*e)+"%"),e>=1?(this._started&&(this._started=void 0),_.events.once("enterframe",function(){var n=t.hide();n&&!n.isFinished()?n.events.once("animationended",function(){t.__disabled=!0}):t.__disabled=!0}),this.interactionsEnabled=!1,this.setPropertyValue("progress",0)):e>0&&(this.delay?this._started?this._started+this.delay<=new Date().getTime()&&(this.__disabled=!1,this.show(),this.interactionsEnabled=!0):this._started=new Date().getTime():(this.__disabled=!1,this.show(),this.interactionsEnabled=!0))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"delay",{get:function(){return this.getPropertyValue("delay")},set:function(e){this.setPropertyValue("delay",e)},enumerable:!0,configurable:!0}),i}(W);_.registeredClasses.Preloader=Za;var Yr=function(s){function i(){var e=s.call(this)||this;e.className="ResizeButton",e.orientation="horizontal",e.layout="absolute",e.horizontalCenter="middle",e.verticalCenter="middle",e.draggable=!0,e.padding(8,8,8,8),e.background.cornerRadius(20,20,20,20);var t=new $;t.element=e.paper.add("path");var n=E({x:-2,y:-6});return n+=T({x:-2,y:6}),n+=E({x:2,y:-6}),n+=T({x:2,y:6}),t.path=n,t.pixelPerfect=!0,t.padding(0,4,0,4),t.stroke=new ae().getFor("alternativeText"),t.strokeOpacity=.7,e.icon=t,e.label.dispose(),e.label=void 0,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"orientation",{set:function(e){var t=this.icon;t&&(t.rotation=e=="horizontal"?0:-90)},enumerable:!0,configurable:!0}),i}(Xt);_.registeredClasses.ResizeButton=Yr;var dp=function(s){function i(){var e=s.call(this)||this;e.className="CloseButton",e.padding(8,8,8,8),e.showSystemTooltip=!0,e.width=30,e.height=30;var t=new ae;e.cursorOverStyle=He.pointer;var n=e.background;n.cornerRadius(20,20,20,20);var r=t.getFor("background");n.fill=r,n.stroke=t.getFor("primaryButton"),n.strokeOpacity=1,n.strokeWidth=1;var a=t.getFor("primaryButtonActive"),o=n.states.getKey("hover");o.properties.strokeWidth=3,o.properties.fill=r;var l=n.states.getKey("down");l.properties.stroke=a,l.properties.fill=r;var h=new $;return h.element=e.paper.add("path"),h.stroke=n.stroke,e.icon=h,e.applyTheme(),e}return w(i,s),i.prototype.validate=function(){s.prototype.validate.call(this);var e=this.pixelWidth/3,t=this.pixelHeight/3,n=E({x:-e/2,y:-t/2});n+=T({x:e/2,y:t/2}),n+=E({x:e/2,y:-t/2}),n+=T({x:-e/2,y:t/2}),this.icon.path=n,this.invalidateLayout()},i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Close"))},i}(Xt);_.registeredClasses.CloseButton=dp;var cp=function(s){function i(){var e=s.call(this)||this;e.className="SwitchButton",e.tooltipY=0,e.layout="horizontal",e.contentAlign="center",e.contentValign="middle",e.padding(8,16,8,16),e.setStateOnChildren=!0,e.states.create("active");var t=new ae,n=new $e;n.fillOpacity=.3,n.states.create("active").properties.fillOpacity=1,n.isActive=!0,e.leftLabel=n;var r=new Xt,a=new ii;r.contentValign="none",r.padding(0,0,0,0),a.radius=10,r.icon=a,r.icon.valign="middle",r.label=void 0;var o=F(100);r.background.cornerRadius(o,o,o,o),r.width=3.5*a.radius,r.height=2.1*a.radius,r.marginLeft=8,r.marginRight=8,r.togglable=!0,a.dx=.7*-a.radius,a.fill=t.getFor("primaryButton"),a.states.create("hover").properties.fill=t.getFor("primaryButtonHover");var l=a.states.create("active");l.properties.fill=t.getFor("primaryButtonActive"),l.properties.dx=.7*a.radius,e.switchButton=r,e.events.on("toggled",function(){e.leftLabel.isActive=!e.isActive,e.rightLabel.isActive=e.isActive});var h=new $e;return h.fillOpacity=.3,h.states.create("active").properties.fillOpacity=1,e.rightLabel=h,e.role="button",e.focusable=!0,h.valign="middle",n.valign="middle",r.valign="middle",e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"leftLabel",{get:function(){return this._leftLabel},set:function(e){this._leftLabel&&this.removeDispose(this._leftLabel),this._leftLabel=e,e&&(e.parent=this,e.interactionsEnabled=!1,e.shouldClone=!1,this._disposers.push(this._leftLabel))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rightLabel",{get:function(){return this._rightLabel},set:function(e){this._rightLabel&&this.removeDispose(this._rightLabel),this._rightLabel=e,e&&(e.parent=this,e.interactionsEnabled=!1,e.shouldClone=!1,this._disposers.push(this._rightLabel))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"switch",{get:function(){return this._switchButton},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"switchButton",{get:function(){return this._switchButton},set:function(e){this._switchButton&&this.removeDispose(this._switchButton),this._switchButton=e,e&&(e.parent=this,e.shouldClone=!1,this._disposers.push(this._switchButton))},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),e.leftLabel&&this.leftLabel.copyFrom(e.leftLabel),e.rightLabel&&this.rightLabel.copyFrom(e.rightLabel),e.switchButton&&this.switchButton.copyFrom(e.switchButton)},i}(W);_.registeredClasses.SwitchButton=cp;var En=function(s){function i(){var e=s.call(this)||this;e._previousStart=0,e._previousEnd=1,e._prevStart=0,e._prevEnd=1,e._isBusy=!1,e._skipRangeEvents=!1,e.updateWhileMoving=!0,e.className="Scrollbar",e.minHeight=12,e.minWidth=12,e.animationDuration=0,e.animationEasing=Qt,e.margin(10,10,10,10);var t=new ae,n=e.background;return n.cornerRadius(10,10,10,10),n.fill=t.getFor("fill"),n.fillOpacity=.5,e.showSystemTooltip=!0,e.startGrip=new Yr,e.endGrip=new Yr,e.events.on("transformed",function(){e.updateThumb()},e,!1),e.start=0,e.end=1,e.role="scrollbar",e.thumb.role="slider",e.thumb.readerLive="polite",e.startGrip.role="slider",e.endGrip.role="slider",e.events.once("inited",function(){e._previousStart=void 0,e.dispatchRangeChange()},void 0,!1),e.hideGrips=!1,e.orientation="horizontal",e.setSVGAttribute({"aria-valuemin":"0"}),e.setSVGAttribute({"aria-valuemax":"100"}),e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),this.orientation==="horizontal"?(v(this.readerTitle)||(this.readerTitle=this.language.translate("Use TAB to select grip buttons or left and right arrows to change selection")),v(this.thumb.readerDescription)||(this.thumb.readerDescription=this.language.translate("Use left and right arrows to move selection")),v(this.startGrip.readerDescription)||(this.startGrip.readerDescription=this.language.translate("Use left and right arrows to move left selection")),v(this.endGrip.readerDescription)||(this.endGrip.readerDescription=this.language.translate("Use left and right arrows to move right selection")),this.readerOrientation="horizontal"):(v(this.readerTitle)||(this.readerTitle=this.language.translate("Use TAB select grip buttons or up and down arrows to change selection")),v(this.thumb.readerDescription)||(this.thumb.readerDescription=this.language.translate("Use up and down arrows to move selection")),v(this.startGrip.readerDescription)||(this.startGrip.readerDescription=this.language.translate("Use up and down arrows to move upper selection")),v(this.endGrip.readerDescription)||(this.endGrip.readerDescription=this.language.translate("Use up and down arrows to move lower selection")),this.readerOrientation="vertical"),this.readerControls=this.baseSprite.uidAttr()},i.prototype.validateLayout=function(){this.updateSize(),s.prototype.validateLayout.call(this),this.updateExtremes()},i.prototype.processBackground=function(){s.prototype.processBackground.call(this);var e=this.background;e.clickable=!0,e.events.on("hit",this.handleBgHit,this,void 0)},i.prototype.handleBgHit=function(e){this.makeBusy();var t=e.spritePoint;t=Qe(t,this.background,this);var n=this.thumb;if(this.orientation=="horizontal"){var r=t.x-n.pixelWidth/2;r=R(r,0,this.innerWidth-n.pixelWidth),this._thumbAnimation=n.animate({property:"x",to:r},this.animationDuration,this.animationEasing)}else{var a=t.y-n.pixelHeight/2;a=R(a,0,this.innerHeight-n.pixelHeight),this._thumbAnimation=n.animate({property:"y",to:a},this.animationDuration,this.animationEasing)}this.animationDuration>0?this._thumbAnimation.events.on("animationended",this.makeUnbusy,this,!1):(this._thumb.validate(),this.makeUnbusy())},i.prototype.makeBusy=function(){this._isBusy=!0,this._skipRangeEvents=!1,this._unbusyTimeout&&this.removeDispose(this._unbusyTimeout),this._unbusyTimeout=void 0,this.stopAnimations()},i.prototype.stopAnimations=function(){this._thumbAnimation&&this._thumbAnimation.stop(!0),this._zoomAnimation&&this._zoomAnimation.stop(!0)},i.prototype.makeUnbusy=function(){this._unbusyTimeout=this.setTimeout(this.makeUnbusyReal.bind(this),1.1*this.animationDuration)},i.prototype.makeUnbusyReal=function(){this._usingGrip=void 0,this._isBusy=!1,this.updateWhileMoving||this.dispatchRangeChange()},i.prototype.dispatchRangeChange=function(){this._previousEnd==this.end&&this._previousStart==this.start||(this._previousStart=this.start,this._previousEnd=this.end,this.dispatch("rangechanged"))},i.prototype.updateThumb=function(e){if(e===void 0&&(e=!0),this.parent){var t=this.thumb,n=this.start,r=this.end,a=this.startGrip,o=this.endGrip;if(this.orientation=="horizontal"){var l=this.innerWidth;t.width=l*(r-n),t.maxX=l-t.pixelWidth,t.x=n*l,a.moveTo({x:t.pixelX,y:0},void 0,void 0,!0),o.moveTo({x:t.pixelX+t.pixelWidth,y:0},void 0,void 0,!0),a.readerTitle=this.language.translate("From %1",void 0,this.adapter.apply("positionValue",{value:Math.round(100*n)+"%",position:n}).value),a.readerValueNow=""+Math.round(100*n),a.readerValueText=a.readerTitle,o.readerTitle=this.language.translate("To %1",void 0,this.adapter.apply("positionValue",{value:Math.round(100*r)+"%",position:r}).value),o.readerValueNow=""+Math.round(100*r),o.readerValueText=o.readerTitle}else{var h=this.innerHeight;t.height=h*(r-n),t.maxY=h-t.pixelHeight,t.y=(1-r)*h,a.moveTo({x:0,y:t.pixelY+t.pixelHeight},void 0,void 0,!0),o.moveTo({x:0,y:t.pixelY},void 0,void 0,!0),a.readerTitle=this.language.translate("To %1",void 0,this.adapter.apply("positionValue",{value:Math.round(100*(1-n))+"%",position:1-n}).value),a.readerValueNow=""+Math.round(100*n),a.readerValueText=a.readerTitle,o.readerTitle=this.language.translate("From %1",void 0,this.adapter.apply("positionValue",{value:Math.round(100*(1-r))+"%",position:1-r}).value),o.readerValueNow=""+Math.round(100*r),o.readerValueText=o.readerTitle}t.readerTitle=this.language.translate("From %1 to %2",void 0,this.adapter.apply("positionValue",{value:Math.round(100*n)+"%",position:n}).value,this.adapter.apply("positionValue",{value:Math.round(100*r)+"%",position:r}).value),t.readerValueNow=""+Math.round(100*n),t.readerValueText=t.readerTitle,this.readerValueNow=""+Math.round(100*n),this.readerValueText=t.readerTitle,!this._skipRangeEvents&&this.updateWhileMoving&&e&&this.dispatchRangeChange()}},i.prototype.updateExtremes=function(){var e=0,t=0,n=0,r=0;this.orientation=="horizontal"?(n=this.innerWidth,t=r=this.innerHeight/2):(r=this.innerHeight,e=n=this.innerWidth/2);var a=this.startGrip;a.minX=e,a.maxX=n,a.minY=t,a.maxY=r;var o=this.endGrip;o.minX=e,o.maxX=n,o.minY=t,o.maxY=r;var l=this.thumb;l.minX=e,l.maxX=n,l.minY=t,l.maxY=r},i.prototype.updateSize=function(){var e=this.orientation,t=this.startGrip;t&&(t.orientation=e),this.endGrip&&(this.endGrip.orientation=e);var n=this.thumb;n&&(e=="horizontal"?(y(this._pixelWidth)||this.width instanceof te||(this.width=F(100)),v(this.percentHeight)&&(this.height=this.minHeight),n.height=this.innerHeight,n.verticalCenter="middle",n.horizontalCenter="left"):(y(this._pixelHeight)||this.height instanceof te||(this.height=F(100)),v(this.percentWidth)&&(this.width=this.minWidth),n.width=this.innerWidth,n.verticalCenter="top",n.horizontalCenter="middle"))},Object.defineProperty(i.prototype,"isBusy",{get:function(){return this._isBusy},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"start",{get:function(){return Math.min(this.getPosition(this._start),this.getPosition(this._end))},set:function(e){this._isBusy||(this.__start=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"__start",{get:function(){return this._start},set:function(e){this._start=this.getPosition(e),this.updateThumb()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"end",{get:function(){return Math.max(this.getPosition(this._start),this.getPosition(this._end))},set:function(e){this._isBusy||(this.__end=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"__end",{get:function(){return this._end},set:function(e){this._end=this.getPosition(e),this.updateThumb()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"range",{get:function(){return{start:this.start,end:this.end,priority:this._usingGrip}},enumerable:!0,configurable:!0}),i.prototype.skipRangeEvents=function(){this._isBusy||(this._skipRangeEvents=!0)},i.prototype.fixRange=function(e){e.start==V(this._start,2)&&e.end==V(this._end,2)||(this._start=e.start,this._end=e.end,this._skipRangeEvents=!0,this.updateThumb(),this._skipRangeEvents=!1,this.thumb.validate(),this.thumb.background.validate())},i.prototype.getPosition=function(e){return R(V(e,4),0,1)},Object.defineProperty(i.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(e){this.setPropertyValue("orientation",e)&&(e==="horizontal"?(this.startGrip.cursorOverStyle=He.horizontalResize,this.endGrip.cursorOverStyle=He.horizontalResize):(this.startGrip.cursorOverStyle=He.verticalResize,this.endGrip.cursorOverStyle=He.verticalResize),this.updateByOrientation(),this.invalidate())},enumerable:!0,configurable:!0}),i.prototype.updateByOrientation=function(){},Object.defineProperty(i.prototype,"startGrip",{get:function(){return this._startGrip},set:function(e){this._startGrip&&this.removeDispose(this._startGrip),this._startGrip=e,this.processGrip(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endGrip",{get:function(){return this._endGrip},set:function(e){this._endGrip&&this.removeDispose(this._endGrip),this._endGrip=e,this.processGrip(e)},enumerable:!0,configurable:!0}),i.prototype.processGrip=function(e){e.parent=this,e.isMeasured=!1,e.focusable=!0,e.shouldClone=!1,e.zIndex=100,e.events.on("drag",this.handleGripDrag,this,!1),e.events.on("dragstop",this.makeUnbusy,this,!1),e.events.on("down",this.makeBusy,this,!1),e.events.on("up",this.makeUnbusy,this,!1),this._disposers.push(e)},i.prototype.handleGripDrag=function(e){this.makeBusy(),e.target===this._startGrip?this._usingGrip="start":this._usingGrip="end",this.orientation=="horizontal"?(this._start=this.startGrip.pixelX/this.innerWidth,this._end=this.endGrip.pixelX/this.innerWidth):(this._start=1-this.startGrip.pixelY/this.innerHeight,this._end=1-this.endGrip.pixelY/this.innerHeight),this.updateThumb()},Object.defineProperty(i.prototype,"thumb",{get:function(){if(!this._thumb){var e=new Xt;e.background.cornerRadius(10,10,10,10),e.padding(0,0,0,0),this.thumb=e}return this._thumb},set:function(e){var t=this;e&&(this._thumb&&this.removeDispose(this._thumb),this._thumb=e,e.parent=this,e.isMeasured=!1,e.inert=!0,e.draggable=!0,e.clickable=!0,e.hoverable=!0,e.focusable=!0,e.shouldClone=!1,e.zIndex=0,e.cursorOverStyle=He.grab,e.cursorDownStyle=He.grabbing,e.events.on("dragstart",this.makeBusy,this,!1),e.events.on("dragstop",this.makeUnbusy,this,!1),e.events.on("positionchanged",this.handleThumbPosition,this,!1),e.events.on("sizechanged",this.handleThumbPosition,this,!1),e.events.on("doublehit",this.handleDoubleClick,this,!1),this._disposers.push(K().body.events.on("keyup",function(n){Ct.isKey(n.event,["space","enter"])&&t.thumb.isFocused&&(n.event.preventDefault(),t.handleDoubleClick())})),this._disposers.push(this._thumb))},enumerable:!0,configurable:!0}),i.prototype.handleDoubleClick=function(){this.makeBusy();var e=0,t=1;this.start!=0||this.end!=1?(this._prevStart=this.start,this._prevEnd=this.end):(e=this._prevStart,t=this._prevEnd);var n=this.animate([{property:"__start",to:e},{property:"__end",to:t}],this.animationDuration,this.animationEasing);n&&!n.isFinished()?(n.events.on("animationended",this.makeUnbusy,this,!1),this._zoomAnimation=n):this.makeUnbusy()},i.prototype.handleThumbPosition=function(){var e=this.thumb;if(this.orientation=="horizontal"){var t=this.innerWidth,n=e.innerWidth,r=e.pixelX;this._start=r/t,this._end=(r+n)/t,this.updateThumb()}else{var a=this.innerHeight,o=e.innerHeight,l=e.pixelY;l+o>a&&(l=a-o,e.y=l),this._start=1-(l+o)/a,this._end=1-l/a,this.updateThumb()}},i.prototype.createBackground=function(){return new St},Object.defineProperty(i.prototype,"hideGrips",{get:function(){return this._hideGrips},set:function(e){var t=this;this._hideGrips=e,this._overDisposer&&this.removeDispose(this._overDisposer),this._outDisposer&&this.removeDispose(this._outDisposer),e?(this._overDisposer=this.events.on("over",function(){t.startGrip.show(),t.endGrip.show()},void 0,!1),this._outDisposer=this.events.on("out",function(){t.startGrip.hide(),t.endGrip.hide()},void 0,!1),this.startGrip.hide(),this.endGrip.hide()):(this.startGrip.show(),this.endGrip.show())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"animationDuration",{get:function(){return this.getPropertyValue("animationDuration")},set:function(e){this.setPropertyValue("animationDuration",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"animationEasing",{get:function(){return this.getPropertyValue("animationEasing")},set:function(e){this.setPropertyValue("animationEasing",e)},enumerable:!0,configurable:!0}),i.prototype.asFunction=function(e){return e=="animationEasing"||s.prototype.asIs.call(this,e)},i}(W);_.registeredClasses.Scrollbar=En;var fp=function(s){function i(){var e=s.call(this)||this;return e.className="Slider",e.thumb.opacity=0,e.thumb.interactionsEnabled=!1,e.endGrip.opacity=0,e.endGrip.interactionsEnabled=!1,e.startGrip.events.on("drag",function(){e.endGrip.x=e.startGrip.x,e.endGrip.y=e.startGrip.y}),e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"__end",{get:function(){return this._start},set:function(e){},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"end",{get:function(){return this._start},set:function(e){},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"start",{get:function(){return this._start},set:function(e){this._isBusy||(this.__start=e)},enumerable:!0,configurable:!0}),i}(En);_.registeredClasses.Slider=fp;var zr=function(s){function i(){var e=s.call(this)||this;e.className="TextLink",e.selectable=!0;var t=new ae;return e.fill=t.getFor("primaryButton").brighten(.3),e.states.create("hover").properties.fill=t.getFor("primaryButtonHover").brighten(.3),e.states.create("down").properties.fill=t.getFor("primaryButtonDown").brighten(.3),e.cursorOverStyle=He.pointer,e.applyTheme(),e}return w(i,s),i}($e);_.registeredClasses.TextLink=zr;var wi=function(s){function i(){var e=s.call(this)||this;return e.properties={},e.isTemplate=!1,e._scale=1,e._nonScaling=!0,e.className="Filter",e.filterPrimitives=new re,e.properties.filterUnits="objectBoundingBox",e.filterPrimitives.events.on("inserted",function(t){e._disposers.push(t.newValue)}),e.width=120,e.height=120,e.applyTheme(),e}return w(i,s),i.prototype.appendPrimitives=function(e){A(this.filterPrimitives.iterator(),function(t){e.add(t)})},i.prototype.animate=function(e,t,n){return new gt(this,e,t,n).start()},Object.defineProperty(i.prototype,"width",{get:function(){return this.properties.width},set:function(e){this.properties.width=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"height",{get:function(){return this.properties.height},set:function(e){this.properties.height=e},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){var t=this;s.prototype.copyFrom.call(this,e),X(e.properties,function(n,r){t[n]=r})},Object.defineProperty(i.prototype,"paper",{get:function(){return this._paper?this._paper:Ui()},set:function(e){this._paper!=e&&(this._paper=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"animations",{get:function(){return this._animations||(this._animations=[],this._disposers.push(new Yi(this._animations))),this._animations},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scale",{get:function(){return this._scale},set:function(e){this._scale=e,this.updateScale()},enumerable:!0,configurable:!0}),i.prototype.updateScale=function(){},Object.defineProperty(i.prototype,"filterUnits",{get:function(){return this.properties.filterUnits},set:function(e){this.properties.filterUnits=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"nonScaling",{get:function(){return this._nonScaling},set:function(e){this._nonScaling=e,e||(this._scale=1),this.updateScale()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sprite",{set:function(e){this.setSprite(e)},enumerable:!0,configurable:!0}),i.prototype.setSprite=function(e){this._sprite&&this._sprite!=e&&this._sprite.filters.removeValue(this),this._sprite=e},i}(Ke),qa=function(s){function i(){var e=s.call(this)||this;return e.className="DropShadowFilter",e.color=B("#000"),e.feGaussianBlur=e.paper.add("feGaussianBlur"),e.feGaussianBlur.attr({result:"blurOut",in:"SourceGraphic"}),e.filterPrimitives.push(e.feGaussianBlur),e.feOffset=e.paper.add("feOffset"),e.feOffset.attr({result:"offsetBlur"}),e.filterPrimitives.push(e.feOffset),e.feFlood=e.paper.add("feFlood"),e.feFlood.attr({"flood-color":e.color}),e.filterPrimitives.push(e.feFlood),e.feComposite=e.paper.add("feComposite"),e.feComposite.attr({in2:"offsetBlur",operator:"in"}),e.filterPrimitives.push(e.feComposite),e.feMerge=e.paper.addGroup("feMerge"),e.feMerge.add(e.paper.add("feMergeNode")),e.feMerge.add(e.paper.add("feMergeNode").attr({in:"SourceGraphic"})),e.filterPrimitives.push(e.feMerge),e.width=200,e.height=200,e.blur=1.5,e.dx=3,e.dy=3,e.opacity=.5,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"color",{get:function(){return this.properties.color},set:function(e){this.properties.color=e,this.feFlood&&this.feFlood.attr({"flood-color":e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"opacity",{get:function(){return this.properties.opacity},set:function(e){this.properties.opacity=e,this.feFlood.attr({"flood-opacity":e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dx",{get:function(){return this.properties.dx},set:function(e){this.properties.dx=e,this.feOffset.attr({dx:e/this.scale})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dy",{get:function(){return this.properties.dy},set:function(e){this.properties.dy=e,this.feOffset.attr({dy:e/this.scale})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"blur",{get:function(){return this.properties.blur},set:function(e){this.properties.blur=e,this.feGaussianBlur.attr({stdDeviation:e/this.scale})},enumerable:!0,configurable:!0}),i.prototype.updateScale=function(){this.dx=this.dx,this.dy=this.dy,this.blur=this.blur},i}(wi);_.registeredClasses.DropShadowFilter=qa;var Rn=function(s){function i(){var e=s.call(this)||this;e._boundingRect={x:-4e4,y:-4e4,width:8e4,height:8e4},e._pointTo={x:0,y:0},e.fitPointerToBounds=!1,e._verticalOrientation="up",e.fixDoc=!0,e.className="Tooltip",e.isMeasured=!1,e.getFillFromObject=!0,e.margin(5,5,5,5),e.defaultState.transitionDuration=1,e.hiddenState.transitionDuration=1;var t=e.background;t.interactionsEnabled=!1,t.fillOpacity=.9,t.strokeWidth=1,t.strokeOpacity=1,t.stroke=B("#ffffff"),t.cornerRadius=3,t.pointerLength=6,t.pointerBaseWidth=10;var n=new qa;n.dy=1,n.dx=1,n.opacity=.5,t.filters.push(n),e.autoTextColor=!0;var r=e.createChild($e);return r.shouldClone=!1,e.label=r,r.padding(7,12,4,12),r.interactionsEnabled=!1,r.horizontalCenter="middle",r.fill=B("#ffffff"),e._disposers.push(r),e.label.events.on("sizechanged",e.drawBackground,e),e.label.zIndex=1,e.pointerOrientation="vertical",e.animationDuration=0,e.animationEasing=Qt,e.setPropertyValue("showInViewport",!1),e.role="tooltip",e.visible=!1,e.opacity=0,e.x=0,e.y=0,e.events.on("visibilitychanged",e.handleVisibility,e),e.applyTheme(),e}return w(i,s),i.prototype.handleVisibility=function(){this.visible&&this.label.invalidate()},Object.defineProperty(i.prototype,"getStrokeFromObject",{get:function(){return this.getPropertyValue("getStrokeFromObject")},set:function(e){this.setPropertyValue("getStrokeFromObject",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"autoTextColor",{get:function(){return this.getPropertyValue("autoTextColor")},set:function(e){this.setPropertyValue("autoTextColor",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"keepTargetHover",{get:function(){return this.getPropertyValue("keepTargetHover")},set:function(e){var t=this;this.setPropertyValue("keepTargetHover",e,!0)&&e&&(this.hoverable=!0,this.background.interactionsEnabled=!0,this._disposers.push(this.events.on("over",function(n){t.targetSprite&&t.targetSprite.hoverable&&(t.targetSprite.isHover=!0)})),this._disposers.push(this.events.on("out",function(n){t.targetSprite&&t.targetSprite.hoverable&&(t.targetSprite.isHover=!1)})))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"showInViewport",{get:function(){return this.getPropertyValue("showInViewport")},set:function(e){this.setPropertyValue("showInViewport",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"getFillFromObject",{get:function(){return this.getPropertyValue("getFillFromObject")},set:function(e){this.setPropertyValue("getFillFromObject",e,!0)},enumerable:!0,configurable:!0}),i.prototype.createBackground=function(){return new lp},Object.defineProperty(i.prototype,"pointerOrientation",{get:function(){return this.getPropertyValue("pointerOrientation")},set:function(e){this.setPropertyValue("pointerOrientation",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"animationDuration",{get:function(){return this.getPropertyValue("animationDuration")},set:function(e){this.setPropertyValue("animationDuration",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"animationEasing",{get:function(){return this.getPropertyValue("animationEasing")},set:function(e){this.setPropertyValue("animationEasing",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"html",{get:function(){return this.label.html},set:function(e){this.label.html!=e&&(this.label.html=e,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"text",{get:function(){return this.label.text},set:function(e){this.label.text!=e&&(this.label.text=e,this.invalidate())},enumerable:!0,configurable:!0}),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.label;e.invalid&&e.validate();var t,n,r=this._pointTo.x,a=this._pointTo.y,o=this._boundingRect,l=e.measuredWidth,h=e.measuredHeight,p=this.background.pointerLength;if(this.ignoreBounds&&(o=void 0),o&&this.fixDoc&&l>o.width){Tr({x:o.x,y:o.y},this.parent);var u=Tr({x:o.x+o.width,y:o.y+o.height},this.parent),d=document.body.offsetWidth;document.body.offsetHeight,u.x>d/2?o.x=o.width-l:o.width=o.x+l}var c=this.pointerOrientation;c=="horizontal"||c=="left"||c=="right"?(n=-h/2,t=c=="horizontal"?o&&r>o.x+o.width/2?-l/2-p:l/2+p:c=="left"?l/2+p:-l/2-p):(o&&(t=R(0,o.x-r+l/2,o.x-r+o.width-l/2)),c=="vertical"?o&&a>o.y+h+p?(n=-h-p,this._verticalOrientation="up"):(n=p,this._verticalOrientation="down"):c=="down"?(n=-h-p,this._verticalOrientation="up"):(n=p,this._verticalOrientation="down")),o&&(n=R(n,o.y-a,o.y+o.height-h-a)),e.x=t,e.y=n,this.drawBackground()},i.prototype.updateBackground=function(){this.group.addToBack(this.background.group)},i.prototype.drawBackground=function(){var e=this.label,t=this.background,n=e.measuredWidth,r=e.measuredHeight,a=this._boundingRect,o=n,l=e.pixelX-n/2,h=r,p=e.pixelY,u=this._pointTo.x,d=this._pointTo.y,c=a.x-u,f=c+a.width,g=a.y-d,m=g+a.height;t.x=l,t.y=p,t.width=o,t.height=h,this.fitPointerToBounds?(t.pointerX=R(-t.x,c-t.x,f-t.x),t.pointerY=R(-t.y,g-t.y,m-t.y)):(t.pointerX=-t.x,t.pointerY=-t.y),t.validate()},i.prototype.delayedPointTo=function(e,t){var n=this;this._pointToDisposer&&this._pointToDisposer.dispose(),this._pointToDisposer=_.events.once("exitframe",function(){n.pointTo(e,t)}),this.addDisposer(this._pointToDisposer)},i.prototype.pointTo=function(e,t){this._pointTo.x==e.x&&this._pointTo.y==e.y||(this._pointTo=e,this.invalidate(),!this.visible||t?(this.moveTo(this._pointTo),this._animation&&this._animation.kill()):this.pixelX==0&&this.pixelY==0?this.moveTo(this._pointTo):(this._animation&&this._animation.kill(),this._animation=new gt(this,[{property:"x",to:e.x,from:this.pixelX},{property:"y",to:e.y,from:this.pixelY}],this.animationDuration,this.animationEasing).start()))},i.prototype.setBounds=function(e){var t=this._boundingRect;t.x==e.x&&t.y==e.y&&t.width==e.width&&t.height==e.height||(this._boundingRect=e,this.invalidate())},Object.defineProperty(i.prototype,"boundingContainer",{set:function(e){this._boundingContainer=e,e.events.on("sizechanged",this.updateBounds,this),e.events.on("positionchanged",this.updateBounds,this)},enumerable:!0,configurable:!0}),i.prototype.updateBounds=function(){var e=this._boundingContainer,t=Dr({x:e.pixelX,y:e.pixelY,width:e.maxWidth,height:e.maxHeight},e);this.setBounds(t)},Object.defineProperty(i.prototype,"ignoreBounds",{get:function(){return this.getPropertyValue("ignoreBounds")},set:function(e){this.setPropertyValue("ignoreBounds",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"verticalOrientation",{get:function(){return this._verticalOrientation},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltip",{get:function(){},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.label.copyFrom(e.label),e._boundingRect&&(this._boundingRect=e._boundingRect)},i.prototype.asFunction=function(e){return e=="animationEasing"||s.prototype.asIs.call(this,e)},i}(W);_.registeredClasses.Tooltip=Rn;var $a=function(s){function i(){var e=s.call(this)||this;return e.className="Trapezoid",e.element=e.paper.add("path"),e.topSide=F(100),e.bottomSide=F(100),e.leftSide=F(100),e.rightSide=F(100),e.isMeasured=!1,e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.pixelWidth,t=this.pixelHeight,n=xe(this.topSide,e),r=xe(this.bottomSide,e),a=xe(this.leftSide,t),o=xe(this.rightSide,t),l=(e-n)/2,h=(t-a)/2,p=e-(e-n)/2,u=(t-o)/2,d=e-(e-r)/2,c=t-(t-o)/2,f=(e-r)/2,g=t-(t-a)/2,m="",x="",b="",C="";if(v(this.horizontalNeck)){var S=this.horizontalNeck.value;m=T({x:e*S,y:Math.max(h,u)}),b=T({x:e*S,y:Math.min(c,g)})}if(v(this.verticalNeck)){var P=this.verticalNeck.value;x=T({x:Math.min(p,d),y:t*P}),C=T({x:Math.max(l,f),y:t*P})}var O=E({x:l,y:h})+m+T({x:p,y:u})+x+T({x:d,y:c})+b+T({x:f,y:g})+C;this.path=O},Object.defineProperty(i.prototype,"topSide",{get:function(){return this.getPropertyValue("topSide")},set:function(e){this.setPercentProperty("topSide",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bottomSide",{get:function(){return this.getPropertyValue("bottomSide")},set:function(e){this.setPercentProperty("bottomSide",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"leftSide",{get:function(){return this.getPropertyValue("leftSide")},set:function(e){this.setPercentProperty("leftSide",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rightSide",{get:function(){return this.getPropertyValue("rightSide")},set:function(e){this.setPercentProperty("rightSide",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"horizontalNeck",{get:function(){return this.getPropertyValue("horizontalNeck")},set:function(e){this.setPropertyValue("horizontalNeck",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"verticalNeck",{get:function(){return this.getPropertyValue("verticalNeck")},set:function(e){this.setPropertyValue("verticalNeck",e,!0)},enumerable:!0,configurable:!0}),i}($);_.registeredClasses.Trapezoid=$a;var Ur=function(s){function i(){var e=s.call(this)||this;return e.className="Triangle",e.element=e.paper.add("path"),e.direction="top",e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e,t=this.pixelWidth,n=this.pixelHeight;switch(this.direction){case"right":e=E({x:0,y:0})+T({x:t,y:n/2})+T({x:0,y:n})+" Z";break;case"left":e=E({x:t,y:0})+T({x:0,y:n/2})+T({x:t,y:n})+" Z";break;case"bottom":e=E({x:0,y:0})+T({x:t,y:0})+T({x:t/2,y:n})+" Z";break;case"top":e=E({x:t/2,y:0})+T({x:t,y:n})+T({x:0,y:n})+" Z"}this.path=e},Object.defineProperty(i.prototype,"direction",{get:function(){return this.getPropertyValue("direction")},set:function(e){this.setPropertyValue("direction",e,!0)},enumerable:!0,configurable:!0}),i}($);_.registeredClasses.Triangle=Ur;var zt=function(){function s(i,e){this._tensionX=i,this._tensionY=e}return s.prototype.smooth=function(i){for(var e=i.length-1;e>0;e--){var t=i[e],n=i[e-1];Math.abs(t.x-n.x)<.1&&Math.abs(t.y-n.y)<.1&&i.splice(e-1,1)}var r=this._tensionX,a=this._tensionY;if(i.length<3||r>=1&&a>=1)return Zi(i);var o=i[0],l=i[i.length-1],h=!1;V(o.x,3)==V(l.x)&&V(o.y)==V(l.y)&&(h=!0);for(var p="",u=(e=0,i.length-1);e0){var d=Math.atan2(h-o,l-a),c=Math.cos(d),f=Math.sin(d),g=e*c,m=e*f;if(e<=1||t<=1)u=T(i);else{var x=Math.round(2*p/e),b=[],C=1;l0&&(e=E((n=this.getPoints(t))[0])+new zt(this.tension,this.tension).smooth(n));var n,r=this.pixelInnerRadius;r>0&&((n=this.getPoints(r)).reverse(),e+=E(n[0])+new zt(this.tension,this.tension).smooth(n)),this.path=e},i.prototype.getPoints=function(e){for(var t=e*Math.PI*2,n=this.waveHeight/2,r=t/Math.round(t/this.waveLength),a=r/2,o=[],l=t/r,h=0;h<=l;h++){var p=h*r/t*360,u=(h*r+a)/t*360;o.push({x:(e-n)*L(p),y:(e-n)*M(p)}),o.push({x:(e+n)*L(u),y:(e+n)*M(u)})}return o.pop(),o},Object.defineProperty(i.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(e){this.setPercentProperty("innerRadius",e,!0,!1,10,!1),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelInnerRadius",{get:function(){return xe(this.innerRadius,ie(this.innerWidth/2,this.innerHeight/2))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"waveLength",{get:function(){return this.getPropertyValue("waveLength")},set:function(e){this.setPropertyValue("waveLength",e),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"waveHeight",{get:function(){return this.getPropertyValue("waveHeight")},set:function(e){this.setPropertyValue("waveHeight",e),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tension",{get:function(){return this.getPropertyValue("tension")},set:function(e){this.setPropertyValue("tension",e),this.invalidate()},enumerable:!0,configurable:!0}),i}(ii);_.registeredClasses.WavedCircle=Hn;var si=function(s){function i(){var e=s.call(this)||this;return e.className="WavedLine",e.element=e.paper.add("path"),e.waveLength=16,e.waveHeight=4,e.tension=.8,e.pixelPerfect=!1,e.fill=B(),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){var e={x:this.x1,y:this.y1},t={x:this.x2,y:this.y2};this.path=E(e)+Bn(e,t,this.waveLength,this.waveHeight,this.tension,!0)},Object.defineProperty(i.prototype,"waveLength",{get:function(){return this.getPropertyValue("waveLength")},set:function(e){this.setPropertyValue("waveLength",e),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"waveHeight",{get:function(){return this.getPropertyValue("waveHeight")},set:function(e){this.setPropertyValue("waveHeight",e),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tension",{get:function(){return this.getPropertyValue("tension")},set:function(e){this.setPropertyValue("tension",e),this.invalidate()},enumerable:!0,configurable:!0}),i}(yt),Ja=function(s){function i(){var e=s.call(this)||this;return e.className="WavedRectangle",e.element=e.paper.add("path"),e.waveLength=16,e.waveHeight=4,e.tension=.8,e.setPropertyValue("wavedLeft",!0),e.setPropertyValue("wavedRight",!0),e.setPropertyValue("wavedTop",!0),e.setPropertyValue("wavedBottom",!0),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.pixelWidth,t=this.pixelHeight;if(e>0&&t>0){var n={x:0,y:0},r={x:e,y:0},a={x:e,y:t},o={x:0,y:t},l=Math.min(e,this.waveLength),h=Math.min(t,this.waveHeight),p=Math.min(t,this.waveLength),u=Math.min(e,this.waveHeight),d="",c="",f="",g="";this.wavedTop&&(d=Bn(n,r,l,h,this.tension,!0)),this.wavedRight&&(c=Bn(r,a,p,u,this.tension,!0)),this.wavedBottom&&(f=Bn(a,o,l,h,this.tension,!0)),this.wavedLeft&&(g=Bn(o,n,p,u,this.tension,!0)),this.path=E(n)+d+T(r)+c+T(a)+f+T(o)+g+"z"}},Object.defineProperty(i.prototype,"waveLength",{get:function(){return this.getPropertyValue("waveLength")},set:function(e){this.setPropertyValue("waveLength",e),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"waveHeight",{get:function(){return this.getPropertyValue("waveHeight")},set:function(e){this.setPropertyValue("waveHeight",e),this.invalidate()},enumerable:!0,configurable:!0}),i.prototype.setWavedSides=function(e,t,n,r){this.wavedTop=e,this.wavedRight=t,this.wavedBottom=n,this.wavedLeft=r},Object.defineProperty(i.prototype,"tension",{get:function(){return this.getPropertyValue("tension")},set:function(e){this.setPropertyValue("tension",e),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"wavedRight",{get:function(){return this.getPropertyValue("wavedRight")},set:function(e){this.setPropertyValue("wavedRight",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"wavedLeft",{get:function(){return this.getPropertyValue("wavedLeft")},set:function(e){this.setPropertyValue("wavedLeft",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"wavedTop",{get:function(){return this.getPropertyValue("wavedTop")},set:function(e){this.setPropertyValue("wavedTop",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"wavedBottom",{get:function(){return this.getPropertyValue("wavedBottom")},set:function(e){this.setPropertyValue("wavedBottom",e,!0)},enumerable:!0,configurable:!0}),i}(Mn),Qa=function(s){function i(){var e=s.call(this)||this;e.className="ZoomOutButton",e.padding(9,9,9,9),e.showSystemTooltip=!0;var t=new ae,n=e.background;n.cornerRadius(20,20,20,20),n.fill=t.getFor("primaryButton"),n.stroke=t.getFor("primaryButtonStroke"),n.strokeOpacity=0,n.states.getKey("hover").properties.fill=t.getFor("primaryButtonHover"),n.states.getKey("down").properties.fill=t.getFor("primaryButtonActive");var r=new $;r.element=e.paper.add("path");var a=E({x:0,y:0});return a+=T({x:11,y:0}),r.path=a,r.pixelPerfect=!0,r.padding(8,3,8,3),r.stroke=t.getFor("primaryButtonText"),e.icon=r,e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Zoom Out"))},i}(Xt);_.registeredClasses.ZoomOutButton=Qa;var _p=function(s){function i(){var e=s.call(this)||this;e.className="PlayButton",e.padding(12,12,12,12),e.showSystemTooltip=!0;var t=new ae,n=e.background;n.cornerRadius(25,25,25,25),n.fill=t.getFor("primaryButton"),n.stroke=t.getFor("primaryButtonStroke"),n.strokeOpacity=0,n.states.getKey("hover").properties.fill=t.getFor("primaryButtonHover"),n.states.getKey("down").properties.fill=t.getFor("primaryButtonActive");var r=new Ur;r.direction="right",r.width=9,r.height=11,r.marginLeft=1,r.marginRight=1,r.horizontalCenter="middle",r.verticalCenter="middle",r.stroke=t.getFor("primaryButtonText"),r.fill=r.stroke,e.icon=r;var a=new St;a.width=11,a.height=11,a.horizontalCenter="middle",a.verticalCenter="middle",a.cornerRadius(0,0,0,0),a.stroke=t.getFor("primaryButtonText"),a.fill=r.stroke,e.togglable=!0;var o=e.states.create("active");return o.transitionDuration=0,o.properties.icon=a,e.defaultState.transitionDuration=0,e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Play"))},i}(Xt);_.registeredClasses.PlayButton=_p;var eo=function(s){function i(){var e=s.call(this)||this;return e.className="ColorModifier",e.applyTheme(),e}return w(i,s),i.prototype.modify=function(e){return e},i}(Ke);_.registeredClasses.ColorModifier=eo;var to=function(s){function i(){var e=s.call(this)||this;return e.lightnesses=[],e.brightnesses=[],e.opacities=[],e.offsets=[],e.className="GradientModifier",e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"lightnesses",{get:function(){return this._lightnesses},set:function(e){this._lightnesses=e,this._brightnesses=[]},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"brightnesses",{get:function(){return this._brightnesses},set:function(e){this._brightnesses=e,this._lightnesses=[]},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"opacities",{get:function(){return this._opacities},set:function(e){this._opacities=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"offsets",{get:function(){return this._offsets},set:function(e){this._offsets=e},enumerable:!0,configurable:!0}),i.prototype.modify=function(e){this.gradient.clear();var t=0;this.opacities&&(t=q(t,this.opacities.length)),this.lightnesses&&(t=q(t,this.lightnesses.length)),this.brightnesses&&(t=q(t,this.brightnesses.length));for(var n,r,a=1,o=0;o0&&this.depth>0){this.sideB.show(0),this.sideA.show(0),this.edge.show(0);for(var e=this.startAngle,t=this.arc,n=this.pixelInnerRadius||0,r=this.radiusY||0,a=this.radius,o=e+t,l=r/a*n,h={x:L(e)*n,y:M(e)*l},p={x:L(e)*a,y:M(e)*r},u={x:L(o)*a,y:M(o)*r},d={x:L(o)*n,y:M(o)*l},c=this.depth,f={x:h.x,y:h.y-c},g={x:p.x,y:p.y-c},m={x:u.x,y:u.y-c},x={x:d.x,y:d.y-c},b="",C=Math.ceil(t/5),S=t/C,P=e,O=g,I=0;I0&&P<180){b+=E(O);var k={x:L(P)*a,y:M(P)*r-c};b+=T({x:O.x,y:O.y+c}),b+=ot({x:k.x,y:k.y+c},a,r,!0),b+=T(k),b+=ot(O,a,r),b+="z",O=k}else b+=E(O),b+=ot(k={x:L(P)*a,y:M(P)*r-c},a,r,!0),b+=T({x:k.x,y:k.y+c}),b+=ot({x:O.x,y:O.y+c},a,r),b+=T(O),b+="z",O=k;for(O=f,P=e,I=0;I0&&P<180?(b+=E(O),k={x:L(P)*n,y:M(P)*l-c},b+=T({x:O.x,y:O.y+c}),b+=ot({x:k.x,y:k.y+c},n,l,!0),b+=T(k),b+=ot(O,n,l),b+="z",O=k):(b+=E(O),b+=ot(k={x:L(P)*n,y:M(P)*l-c},n,l,!0),b+=T({x:k.x,y:k.y+c}),b+=ot({x:O.x,y:O.y+c},n,l),b+=T(O),b+="z",O=k);this.edge.path=b,this.sideA.path=E(h)+T(p)+T(g)+T(f)+" Z",this.sideB.path=E(u)+T(d)+T(x)+T(m)+" Z",this.startAngle<90?this.sideA.toBack():this.sideA.toFront(),this.startAngle+this.arc>90?this.sideB.toBack():this.sideB.toFront(),this.slice.dy=-c}else this.sideA.hide(0),this.sideB.hide(0),this.edge.hide(0)},Object.defineProperty(i.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(e){this.setPropertyValue("depth",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"angle",{get:function(){var e=this.getPropertyValue("angle");return y(e)||(e=0),e},set:function(e){this.setPropertyValue("angle",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radiusY",{get:function(){var e=this.getPropertyValue("radiusY");return y(e)||(e=this.radius-this.radius*this.angle/90),e},set:function(e){this.setPropertyValue("radiusY",e,!0)},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.edge.copyFrom(e.edge),this.sideA.copyFrom(e.sideA),this.sideB.copyFrom(e.sideB)},i}(ri),Op=function(s){function i(){var e=s.call(this)||this;return e.className="RadialGradientModifier",e.gradient=new Nt,e.applyTheme(),e}return w(i,s),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.gradient=e.gradient.clone()},i}(to);_.registeredClasses.RadialGradientModifier=Op;var io=function(s){function i(){var e=s.call(this)||this;return e.properties.gap=0,e._line=e.paper.add("path"),e.addElement(e._line),e}return w(i,s),i.prototype.draw=function(){if(s.prototype.draw.call(this),Math.round(this.rotation/90)!=this.rotation/90&&(this.properties.shapeRendering="auto"),this._line){var e=this.width,t=this.height,n="";if(this.gap)for(var r=this.gap+this.strokeWidth,a=this.height/r,o=-a/2;o<1.5*a;o++)Math.round(this.rotation/90)!=this.rotation/90?(n+=E({x:-e,y:(o+.5)*r})+T({x:2*e,y:(o+.5)*r}),this.properties.rotationX=this.width/2,this.properties.rotationY=this.height/2):n+=E({x:-e,y:o*r})+T({x:2*e,y:o*r});else Math.round(this.rotation/90)!=this.rotation/90?(n=E({x:-e,y:t/2})+T({x:2*e,y:t/2}),this.properties.rotationX=this.width/2,this.properties.rotationY=this.height/2):n=E({x:0,y:0})+T({x:e,y:0});this._line.attr({d:n})}},Object.defineProperty(i.prototype,"gap",{get:function(){return this.properties.gap},set:function(e){this.properties.gap=e,this.draw()},enumerable:!0,configurable:!0}),i}(xi);_.registeredClasses.LinePattern=io;var no=function(s){function i(){var e=s.call(this)||this;return e.properties.radius=2,e._circle=e.paper.add("circle"),e.addElement(e._circle),e.shapeRendering="auto",e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this),this._circle&&this._circle.attr({r:this.radius,cx:this.width/2,cy:this.height/2})},Object.defineProperty(i.prototype,"radius",{get:function(){return this.properties.radius},set:function(e){this.properties.radius=e,this.draw()},enumerable:!0,configurable:!0}),i}(xi);_.registeredClasses.CirclePattern=no;var ro=function(s){function i(){var e=s.call(this)||this;return e.rectHeight=1,e.rectWidth=1,e._rect=e.paper.add("rect"),e.addElement(e._rect),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this),this.properties.rotationX=this.width/2,this.properties.rotationY=this.height/2,this._rect&&this._rect.attr({width:this.rectWidth,height:this.rectHeight,x:(this.width-this.rectWidth)/2,y:(this.height-this.rectHeight)/2})},Object.defineProperty(i.prototype,"rectWidth",{get:function(){return this.properties.rectWidth},set:function(e){this.properties.rectWidth=e,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rectHeight",{get:function(){return this.properties.rectHeight},set:function(e){this.properties.rectHeight=e,this.draw()},enumerable:!0,configurable:!0}),i}(xi);_.registeredClasses.RectPattern=ro;var Sp=function(s){function i(){var e=s.call(this)||this;return e.className="ColorizeFilter",e.feColorMatrix=e.paper.add("feColorMatrix"),e.feColorMatrix.attr({type:"matrix"}),e.filterPrimitives.push(e.feColorMatrix),e.intensity=1,e.applyTheme(),e}return w(i,s),i.prototype.applyFilter=function(){var e,t,n,r=this.intensity,a=1-r,o=this.color;o&&o.rgb?(e=o.rgb.r/255*r,t=o.rgb.g/255*r,n=o.rgb.b/255*r):(e=0,t=0,n=0),this.feColorMatrix.attr({values:a+" 0 0 0 "+e+" 0 "+a+" 0 0 "+t+" 0 0 "+a+" 0 "+n+" 0 0 0 1 0"})},Object.defineProperty(i.prototype,"color",{get:function(){return this.properties.color},set:function(e){this.properties.color=e,this.applyFilter()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"intensity",{get:function(){return this.properties.intensity},set:function(e){this.properties.intensity=e,this.applyFilter()},enumerable:!0,configurable:!0}),i}(wi);_.registeredClasses.ColorizeFilter=Sp;var Wn=function(s){function i(){var e=s.call(this)||this;return e.className="DesaturateFilter",e.feColorMatrix=e.paper.add("feColorMatrix"),e.feColorMatrix.attr({type:"saturate"}),e.filterPrimitives.push(e.feColorMatrix),e.width=120,e.height=120,e.saturation=0,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"saturation",{get:function(){return this.properties.saturation},set:function(e){this.properties.saturation=e,this.feColorMatrix.attr({values:e.toString()})},enumerable:!0,configurable:!0}),i}(wi);_.registeredClasses.DesaturateFilter=Wn;var Ip=function(s){function i(){var e=s.call(this)||this;return e.className="BlurFilter",e.feGaussianBlur=e.paper.add("feGaussianBlur"),e.feGaussianBlur.attr({result:"blurOut",in:"SourceGraphic"}),e.filterPrimitives.push(e.feGaussianBlur),e.width=200,e.height=200,e.blur=1.5,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"blur",{get:function(){return this.properties.blur},set:function(e){this.properties.blur=e,this.feGaussianBlur.attr({stdDeviation:e/this.scale})},enumerable:!0,configurable:!0}),i}(wi);_.registeredClasses.BlurFilter=Ip;var Dp=function(s){function i(){var e=s.call(this)||this;return e.className="FocusFilter",e.feFlood=e.paper.add("feFlood"),e.feFlood.attr({"flood-color":new ae().getFor("primaryButtonHover"),result:"base"}),e.filterPrimitives.push(e.feFlood),e.feMorphology=e.paper.add("feMorphology"),e.feMorphology.attr({result:"bigger",in:"SourceGraphic",operator:"dilate",radius:"2"}),e.filterPrimitives.push(e.feMorphology),e.feColorMatrix=e.paper.add("feColorMatrix"),e.feColorMatrix.attr({result:"mask",in:"bigger",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"}),e.filterPrimitives.push(e.feColorMatrix),e.feComposite=e.paper.add("feComposite"),e.feComposite.attr({result:"drop",in:"base",in2:"mask",operator:"in"}),e.filterPrimitives.push(e.feComposite),e.feBlend=e.paper.add("feBlend"),e.feBlend.attr({in:"SourceGraphic",in2:"drop",mode:"normal"}),e.filterPrimitives.push(e.feBlend),e.width=130,e.height=130,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"stroke",{get:function(){return this.properties.stroke},set:function(e){this.properties.stroke=e,this.feFlood.attr({"flood-color":e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"strokeWidth",{get:function(){return this.properties.strokeWidth},set:function(e){this.properties.strokeWidth=e,this.feMorphology.attr({radius:e})},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"opacity",{get:function(){return this.properties.opacity},set:function(e){this.properties.opacity=e,this.feColorMatrix.attr({values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 "+e+" 0"})},enumerable:!0,configurable:!0}),i.prototype.setSprite=function(e){this._sprite&&this._sprite!=e&&this._sprite.group.removeStyle("outline"),e.group.addStyle({outline:"none"}),s.prototype.setSprite.call(this,e)},i}(wi),$i=function(s){function i(){var e=s.call(this)||this;return e._list=[],e._currentStep=0,e._startIndex=0,e._currentPass=0,e.baseColor=new se({r:103,g:183,b:220}),e.stepOptions={},e.passOptions={brighten:-.2},e.step=1,e.minColors=20,e.minLightness=.2,e.maxLightness=.9,e.shuffle=!1,e.wrap=!0,e.reuse=!1,e.saturation=1,e.className="ColorSet",e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"list",{get:function(){return this._list||this.generate(this.minColors),this._list},set:function(e){this._list=e,this.reset()},enumerable:!0,configurable:!0}),i.prototype.getReusableColor=function(e){if(this._list.length==0)return this.generate(1),this.list[0];var t=e-Math.floor(e/this._list.length)*this.list.length;return this.list[t]},i.prototype.next=function(){var e;return this.list.length<=this._currentStep?this.reuse?e=this.getReusableColor(this._currentStep):(this.generate(q(this.minColors,this._currentStep+1)),e=this.list[this._currentStep]):e=this.list[this._currentStep],this._currentStep+=this.step,e.saturate(this.saturation)},i.prototype.getIndex=function(e){var t;return this.list.length<=e?this.reuse?t=this.getReusableColor(e):(this.generate(this.minColors),t=this.getIndex(e)):t=this.list[e],t.saturate(this.saturation)},i.prototype.reset=function(){this._currentStep=this._startIndex},Object.defineProperty(i.prototype,"currentStep",{get:function(){return this._currentStep},set:function(e){this._currentStep=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startIndex",{get:function(){return this._startIndex},set:function(e){this._startIndex=e,this.reset()},enumerable:!0,configurable:!0}),i.prototype.generate=function(e){var t=bn(be(this.currentColor.rgb)),n=v(this.stepOptions.hue)?this.stepOptions.hue:1/e,r={brighten:0,lighten:0,hue:t.h,lightness:t.l,saturation:t.s},a=[],o=this.list.length==0?0:1;if(this.reuse)for(var l=o;l<=e;l++)a.push(bn(be(this._list[l].rgb)).h);else for(l=o;l<=e;l++){var h=t.h+n*l;this.wrap&&h>1&&(h-=1),a.push(h)}for(this.shuffle&&a.sort(function(c,f){return Math.random()-.5}),l=0;l1?e.l=e.l-Math.floor(e.l):e.l<0&&(e.l=-(e.l-Math.floor(e.l))),e.l=Ir(e.l,this.minLightness,this.maxLightness)):(e.l>1?e.l=1:e.l<0&&(e.l=0),e.l=Sr(e.l,this.minLightness,this.maxLightness))},i.prototype.processConfig=function(e){if(e){if(v(e.list)&&Ae(e.list))for(var t=0,n=e.list.length;t=0){_.queue.splice(_.queue.indexOf(s),1);var e=_.queue[i];e&&Ap(e)}}function Ci(s){s.__disabled&&Fa(s.htmlContainer,Z.viewportTarget)&&(s.vpDisposer&&s.vpDisposer.dispose(),so(s))}function Ap(s){s&&s.tooltipContainer&&(s.__disabled=!1,s.tooltipContainer.__disabled=!1,s.events.enableType("appeared"),s.dispatch("removedfromqueue"),s.showOnInit&&s.events.on("appeared",function(){Kr(s)}),s.vpDisposer&&s.vpDisposer.dispose(),s instanceof W&&s.invalidateLabels(),s.tooltipContainer&&s.tooltipContainer.invalidateLayout(),s instanceof ti?(s.invalidateData(),s.reinit(),s.events.once("datavalidated",function(){s.showOnInit?s.appear():Kr(s)})):(s.reinit(),s.events.once("inited",function(){Kr(s)}),s.showOnInit&&s.appear()))}function vd(s,i){var e;J(i)&&(v(_.registeredClasses[i])?i=_.registeredClasses[i]:(i=_.registeredClasses.Container,e=new Error("Class ["+i+"] is not loaded.")));var t=kp(s,i);return e&&t.raiseCriticalError(e),t}function bd(s,i,e){var t,n;v(e)||(e=s.type,delete s.type),v(i)||(i=s.container,delete s.container),J(e)&&v(_.registeredClasses[e])?t=_.registeredClasses[e]:typeof e!="function"?(t=W,n=new Error("Class ["+e+"] is not loaded.")):t=e;var r=kp(i,t);return n?r.raiseCriticalError(n):r.config=s,r}function xd(s,i){for(var e=[],t=2;t10&&(e.properties.paddingLeft=10),s.pixelPaddingRight>10&&(e.properties.paddingRight=10),e}return null}}),Ne.push({relevant:Ue.heightXS,state:function(s,i){if(s instanceof ai){var e=s.states.create(i);return s.pixelPaddingTop>10&&(e.properties.paddingTop=10),s.pixelPaddingBottom>10&&(e.properties.paddingBottom=10),e}return null}}),Ne.push({relevant:Ue.widthXXS,state:function(s,i){if(s instanceof ai){var e=s.states.create(i);return e.properties.paddingLeft=0,e.properties.paddingRight=0,e}return null}}),Ne.push({relevant:Ue.heightXXS,state:function(s,i){if(s instanceof ai){var e=s.states.create(i);return e.properties.paddingTop=0,e.properties.paddingBottom=0,e}return null}});var It=function(s){function i(){var e=s.call(this)||this;return e.className="Bullet",e.isMeasured=!1,e.tooltipX=0,e.tooltipY=0,e.layout="none",e.applyOnClones=!0,e.copyToLegendMarker=!0,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"locationX",{get:function(){return this.getPropertyValue("locationX")},set:function(e){if(this.setPropertyValue("locationX",e)){var t=this.dataItem;t&&t.component&&t.component.invalidate()}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"locationY",{get:function(){return this.getPropertyValue("locationY")},set:function(e){if(this.setPropertyValue("locationY",e)){var t=this.dataItem;t&&t.component&&t.component.invalidate()}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"xField",{get:function(){return this.getPropertyValue("xField")},set:function(e){this.setPropertyValue("xField",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"yField",{get:function(){return this.getPropertyValue("yField")},set:function(e){this.setPropertyValue("yField",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isDynamic",{get:function(){return this.getPropertyValue("isDynamic")},set:function(e){this.setPropertyValue("isDynamic",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"copyToLegendMarker",{get:function(){return this.getPropertyValue("copyToLegendMarker")},set:function(e){this.setPropertyValue("copyToLegendMarker",e)},enumerable:!0,configurable:!0}),i}(W);_.registeredClasses.Bullet=It,Ne.push({relevant:Ue.isXS,state:function(s,i){if(s instanceof It){var e=s.states.create(i);return e.properties.disabled=!0,e}return null}});var Fp=function(s){function i(){var e=s.call(this)||this;return e.childrenCreated=!1,e.className="LegendDataItem",e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"label",{get:function(){var e=this;if(!this._label){var t=this.component.labels.create();this._label=t,this.addSprite(t),this._disposers.push(t),t.parent=this.itemContainer,this._disposers.push(new le(function(){v(e.component)&&e.component.labels.removeValue(t)}))}return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"color",{get:function(){return this.properties.color},set:function(e){this.setProperty("color",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"valueLabel",{get:function(){var e=this;if(!this._valueLabel){var t=this.component.valueLabels.create();this._valueLabel=t,this.addSprite(t),this._disposers.push(t),t.parent=this.itemContainer,this._disposers.push(new le(function(){v(e.component)&&e.component.valueLabels.removeValue(t)}))}return this._valueLabel},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"itemContainer",{get:function(){var e=this;if(!this._itemContainer){var t=this.component,n=t.itemContainers.create();n.parent=t,this._itemContainer=n,this.addSprite(n),this._disposers.push(n),n.togglable&&n.events.on("toggled",function(o){t.toggleDataItem(o.target.dataItem)},void 0,!1),n.focusable&&(n.events.on("hit",function(o){t.focusedItem=void 0},void 0,!1),n.events.on("focus",function(o){t.focusedItem=o.target.dataItem},void 0,!1),n.events.on("blur",function(o){t.focusedItem=void 0},void 0,!1)),this._disposers.push(new le(function(){v(e.component)&&e.component.itemContainers.removeValue(n)})),this.dataContext.uidAttr&&(n.readerControls=this.dataContext.uidAttr(),n.readerLabelledBy=this.dataContext.uidAttr());var r=this.dataContext;if((r instanceof ei||r instanceof $)&&!r.isDisposed()){var a=function(o){n.readerChecked=o.visible,n.events.disableType("toggled"),n.isActive=!o.visible,n.events.enableType("toggled")};r.addDisposer(new le(function(){e.component&&e.component.dataItems.remove(e)})),r instanceof $?(n.addDisposer(r.events.on("visibilitychanged",a,void 0,!1)),n.addDisposer(r.events.on("hidden",function(o){n.readerChecked=!1,n.events.disableType("toggled"),n.isActive=!0,n.events.enableType("toggled")},void 0,!1)),n.addDisposer(r.events.on("shown",function(o){n.readerChecked=!0,n.events.disableType("toggled"),n.isActive=!1,n.events.enableType("toggled")},void 0,!1))):n.addDisposer(r.events.on("visibilitychanged",a,void 0,!1))}}return this._itemContainer},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"marker",{get:function(){var e=this;if(!this._marker){var t=this.component.markers.create();this._marker=t,t.parent=this.itemContainer,this.addSprite(t),this._disposers.push(t),this._disposers.push(new le(function(){v(e.component)&&e.component.markers.removeValue(t)}))}return this._marker},enumerable:!0,configurable:!0}),i}(ei),lo=function(){this.createMarker=!0},Xn=function(s){function i(){var e=s.call(this)||this;e.className="Legend",e.layout="grid",e.setPropertyValue("useDefaultMarker",!1),e.setPropertyValue("scrollable",!1),e.setPropertyValue("contentAlign","center");var t=new W;t.applyOnClones=!0,t.padding(8,0,8,0),t.margin(0,10,0,10),t.layout="horizontal",t.clickable=!0,t.focusable=!0,t.role="switch",t.togglable=!0,t.cursorOverStyle=He.pointer,t.background.fillOpacity=0,e.itemContainers=new Oe(t),e._disposers.push(new fe(e.itemContainers)),e._disposers.push(e.itemContainers.template),e._disposers.push(K().body.events.on("keyup",function(p){if(Ct.isKey(p.event,"enter")&&e.focusedItem){var u=e.focusedItem,d=u.itemContainer;d.togglable?e.toggleDataItem(u):d.clickable&&d.events.isEnabled("hit")&&(d.dispatchImmediately("hit",{event:p}),e.focusedItem=u)}},e));var n=new ae,r=new W;r.width=23,r.height=23,r.interactionsEnabled=!1,r.applyOnClones=!0,r.setStateOnChildren=!0,r.background.fillOpacity=0,r.background.strokeOpacity=0,r.propertyFields.fill="fill",r.valign="middle";var a=n.getFor("disabledBackground");r.events.on("childadded",function(p){var u=p.newValue.states.create("active");u.properties.stroke=a,u.properties.fill=a}),e.markers=new Oe(r),e._disposers.push(new fe(e.markers)),e._disposers.push(e.markers.template);var o=r.createChild(St);o.width=F(100),o.height=F(100),o.applyOnClones=!0,o.propertyFields.fill="fill",o.strokeOpacity=0;var l=new $e;l.text="{name}",l.margin(0,5,0,5),l.valign="middle",l.applyOnClones=!0,l.states.create("active").properties.fill=n.getFor("disabledBackground"),e.labels=new Oe(l),e._disposers.push(new fe(e.labels)),e._disposers.push(e.labels.template),l.interactionsEnabled=!1,l.truncate=!0,l.fullWords=!1;var h=new $e;return h.margin(0,5,0,0),h.valign="middle",h.width=50,h.align="right",h.textAlign="end",h.applyOnClones=!0,h.states.create("active").properties.fill=n.getFor("disabledBackground"),h.interactionsEnabled=!1,e.valueLabels=new Oe(h),e._disposers.push(new fe(e.valueLabels)),e._disposers.push(e.valueLabels.template),e.position="bottom",t.states.create("active"),t.setStateOnChildren=!0,e.role="group",e.events.on("layoutvalidated",e.handleScrollbar,e,!1),e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Legend"))},i.prototype.createDataItem=function(){return new Fp},i.prototype.validateDataElements=function(){this.scrollbar&&(this.scrollbar.start=0,this.scrollbar.end=1),s.prototype.validateDataElements.call(this)},i.prototype.validateDataElement=function(e){s.prototype.validateDataElement.call(this,e);var t=e.itemContainer,n=e.marker;e.label;var r=e.valueLabel;t.readerChecked=e.dataContext.visible,e.dataContext.legendDataItem=e;var a=e.label.maxWidth;e.label.width instanceof te||(e.label.width=void 0),a>0&&(e.label.maxWidth=a),r.align=="right"&&(r.width=void 0);var o=e.dataContext.legendSettings,l=e.dataContext;!l.createLegendMarker||this.useDefaultMarker&&l instanceof $?this.markers.template.propertyFields.fill=void 0:e.childrenCreated||(l.createLegendMarker(n),e.childrenCreated=!0),l.updateLegendValue&&l.updateLegendValue(),l.component&&l.component.updateLegendValue&&l.component.updateLegendValue(l),r.invalid&&r.validate(),r.text==""||r.text==null?r.__disabled=!0:r.__disabled=!1,!o||o.itemValueText==null&&o.valueText==null||(r.__disabled=!1);var h=e.dataContext.visible;h===void 0&&(h=!0),h=ve(h),e.dataContext.visible=h,t.events.disableType("toggled"),t.isActive=!h,t.isActive?t.setState("active",0):t.setState("default",0),t.events.enableType("toggled")},i.prototype.afterDraw=function(){var e=this,t=this.getPropertyValue("maxWidth"),n=0;this.labels.each(function(u){u.invalid&&(u.maxWidth=void 0,u.validate()),u.measuredWidth+u.pixelMarginLeft+u.pixelMarginRight>n&&(n=u.measuredWidth+u.pixelMarginLeft+u.pixelMarginRight)});var r=0;this.valueLabels.each(function(u){u.invalid&&u.validate(),u.measuredWidth+u.pixelMarginLeft+u.pixelMarginRight>r&&(r=u.measuredWidth+u.pixelMarginLeft+u.pixelMarginRight)});var a=0;this.markers.each(function(u){u.invalid&&u.validate(),u.measuredWidth+u.pixelMarginLeft+u.pixelMarginRight>a&&(a=u.measuredWidth+u.pixelMarginLeft+u.pixelMarginRight)});var o,l=this.itemContainers.template,h=l.pixelMarginRight+l.pixelMarginLeft,p=n+r+a;y(t)?((t-=h)>p&&(t=p),o=t-a-r):o=n,this.labels.each(function(u){(e.valueLabels.template.align=="right"||u.measuredWidth>o)&&(u.width instanceof te||(u.width=Math.min(u.maxWidth,o-u.pixelMarginLeft-u.pixelMarginRight),u.maxWidth=u.width))}),this.valueLabels.template.align=="right"&&this.valueLabels.each(function(u){u.width=r-u.pixelMarginRight-u.pixelMarginLeft}),s.prototype.afterDraw.call(this)},i.prototype.handleScrollbar=function(){var e=this.scrollbar;this.scrollable&&e&&(e.height=this.measuredHeight,e.x=this.measuredWidth-e.pixelWidth-e.pixelMarginLeft,this.contentHeight>this.measuredHeight?(e.visible=!0,e.thumb.height=e.height*this.measuredHeight/this.contentHeight,this.paddingRight=e.pixelWidth+e.pixelMarginLeft+ +e.pixelMarginRight):e.visible=!1,e.handleThumbPosition(),this.updateMasks())},Object.defineProperty(i.prototype,"position",{get:function(){return this.getPropertyValue("position")},set:function(e){this.setPropertyValue("position",e)&&(e=="left"||e=="right"?(this.margin(10,5,10,10),this.valign="middle",this.contentAlign="none",this.valueLabels.template.align="right",y(this.maxColumns)||(this.maxColumns=1),this.width=void 0,this.maxWidth=220):(this.maxColumns=void 0,this.width=F(100),this.valueLabels.template.align="left"),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"useDefaultMarker",{get:function(){return this.getPropertyValue("useDefaultMarker")},set:function(e){this.setPropertyValue("useDefaultMarker",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scrollable",{get:function(){return this.getPropertyValue("scrollable")},set:function(e){if(this.setPropertyValue("scrollable",e,!0))if(e){var t=this.createChild(En);this.scrollbar=t,t.isMeasured=!1,t.orientation="vertical",t.endGrip.__disabled=!0,t.startGrip.__disabled=!0,t.visible=!1,t.marginLeft=5,this._mouseWheelDisposer=this.events.on("wheel",this.handleWheel,this,!1),this._disposers.push(this._mouseWheelDisposer),this._disposers.push(t.events.on("rangechanged",this.updateMasks,this,!1))}else this._mouseWheelDisposer&&(this._mouseWheelDisposer.dispose(),this.scrollbar&&(this.scrollbar.dispose(),this.scrollbar=void 0))},enumerable:!0,configurable:!0}),i.prototype.handleWheel=function(e){var t=e.shift.y,n=this.scrollbar;if(n){var r=t/1e3*this.measuredHeight/this.contentHeight,a=n.end-n.start;t>0?(n.start=q(0,n.start-r),n.end=n.start+a):(n.end=ie(1,n.end-r),n.start=n.end-a)}},i.prototype.updateMasks=function(){var e=this;this.scrollbar&&this.itemContainers.each(function(t){t.dy=-e.scrollbar.thumb.pixelY*e.contentHeight/e.measuredHeight,t.maskRectangle={x:0,y:-t.dy,width:e.measuredWidth,height:e.measuredHeight}})},i.prototype.toggleDataItem=function(e){var t=e.dataContext;!t.visible||t.isHiding||t instanceof $&&t.isHidden?(e.color=e.colorOrig,t.appeared=!0,e.itemContainer.isActive=!1,t.hidden===!0&&(t.hidden=!1),t.show?t.show():t.visible=!0,this.svgContainer.readerAlert(this.language.translate("%1 shown",this.language.locale,e.label.readerTitle))):(e.itemContainer.isActive=!0,t.appeared=!0,t.hide?t.hide():t.visible=!1,this.svgContainer.readerAlert(this.language.translate("%1 hidden",this.language.locale,e.label.readerTitle)),e.color=new ae().getFor("disabledBackground"))},Object.defineProperty(i.prototype,"preloader",{get:function(){},enumerable:!0,configurable:!0}),i.prototype.handleDataItemPropertyChange=function(e,t){e.valueLabel.invalidate(),e.label.invalidate()},i}(ti);_.registeredClasses.Legend=Xn,Ne.push({relevant:Ue.widthXS,state:function(s,i){if(s instanceof Xn&&(s.position=="left"||s.position=="right")){var e=s.states.create(i);return e.properties.position="bottom",e}return null}}),Ne.push({relevant:Ue.heightXS,state:function(s,i){if(s instanceof Xn&&(s.position=="top"||s.position=="bottom")){var e=s.states.create(i);return e.properties.position="right",e}return null}}),Ne.push({relevant:Ue.isXS,state:function(s,i){if(s instanceof Xn){var e=s.states.create(i);return e.properties.disabled=!0,e}return null}});var Yn=function(s){function i(){var e=s.call(this)||this;return e.className="SeriesDataItem",e.values.value={},e.values.value={},e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"bullets",{get:function(){return this._bullets||(this._bullets=new me,this._disposers.push(new Jt(this._bullets))),this._bullets},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this.bullets.clear(),s.prototype.dispose.call(this)},Object.defineProperty(i.prototype,"value",{get:function(){return this.values.value.value},set:function(e){this.setValue("value",e)},enumerable:!0,configurable:!0}),i}(ei),zn=function(s){function i(){var e=s.call(this)||this;if(e._ignoreMinMax=!1,e._showBullets=!0,e.legendSettings=new lo,e._tmin=new me,e._tmax=new me,e._smin=new me,e._smax=new me,e.dataItemsByAxis=new me,e.skipFocusThreshold=20,e._itemReaderTextChanged=!1,e.calculatePercent=!1,e.usePercentHack=!0,e.autoDispose=!0,e.simplifiedProcessing=!1,e.constructor===i)throw new Error("'Series' cannot be instantiated directly. Please use a specific series type.");e.className="Series",e.isMeasured=!1,e.layout="none",e.shouldClone=!1,e.setPropertyValue("hidden",!1),e.axisRanges=new re,e.axisRanges.events.on("inserted",e.processAxisRange,e,!1),e.minBulletDistance=0,e.mainContainer=e.createChild(W),e.mainContainer.shouldClone=!1,e.mainContainer.mask=e.createChild($),e._disposers.push(e.mainContainer);var t=e.mainContainer.createChild(W);return e._shouldBeReady.push(t),t.shouldClone=!1,t.layout="none",t.virtualParent=e,e._disposers.push(t),e.bulletsContainer=t,e.tooltip=new Rn,e.tooltip.virtualParent=e,e._disposers.push(e.tooltip),e.hiddenState.transitionEasing=Ia,e.dataItem=e.createDataItem(),e._disposers.push(e.dataItem),e.dataItem.component=e,e.role="group",e.applyTheme(),e}return w(i,s),i.prototype.applyTheme=function(){s.prototype.applyTheme.call(this),Z.autoSetClassName&&this.bulletsContainer&&(this.bulletsContainer.className=this.className+"-bullets",this.bulletsContainer.setClassName())},i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Series"))},i.prototype.createDataItem=function(){return new Yn},Object.defineProperty(i.prototype,"chart",{get:function(){return this._chart},set:function(e){this._chart=e},enumerable:!0,configurable:!0}),i.prototype.positionBullet=function(e){},i.prototype.processBullet=function(e){var t=this,n=e.newValue;n.isTemplate=!0,this.events.once("datavalidated",function(r){t.itemsFocusable()&&(n.focusable=!0)}),this.invalidate()},i.prototype.removeBullet=function(e){var t=e.oldValue;this.dataItems.each(function(n){var r=n.bullets.getKey(t.uid);r&&r.dispose()}),this.invalidate()},i.prototype.validateDataItems=function(){s.prototype.validateDataItems.call(this),this.processValues(!1)},i.prototype.getFirstValue=function(e,t){for(var n=t;n>=0;n--){var r=this.dataItems.getIndex(n).getActualWorkingValue(e);if(y(r))return r}return null},i.prototype.getAbsoluteFirstValue=function(e){for(var t=0;t0){var x=n.getIndex(g-1);X(x.values,function(I,k){var D=x.getActualWorkingValue(I);y(D)&&(d[I]=D)})}for(var b=function(I){var k=n.getIndex(I);X(k.values,function(D,G){var H=k.getActualWorkingValue(D);if(y(H)){y(r[D])||(r[D]=0),r[D]++,y(a[D])||(a[D]=0),a[D]+=H,y(o[D])||(o[D]=0),o[D]+=Math.abs(H),y(p[D])||(p[D]=H),u[D]=H,y(l[D])?l[D]>H&&(l[D]=H):l[D]=H,y(h[D])?h[D]0){t.usePercentHack&&H==G&&(G=k.values[D].value);var ne=H/G*100;k.setCalculatedValue(D,ne,"percent")}else k.setCalculatedValue(D,0,"percent")})};for(C=g;C0){var P=n.getIndex(g-1);X(P.values,function(I){var k=P.values[I].value;P.setCalculatedValue(I,k-p[I],"change"),P.setCalculatedValue(I,(k-p[I])/p[I]*100,"changePercent")})}var O=this.dataItem;X(O.values,function(I){O.setCalculatedValue(I,a[I],"sum"),O.setCalculatedValue(I,o[I],"absoluteSum"),O.setCalculatedValue(I,a[I]/r[I],"average"),O.setCalculatedValue(I,p[I],"open"),O.setCalculatedValue(I,u[I],"close"),O.setCalculatedValue(I,l[I],"low"),O.setCalculatedValue(I,h[I],"high"),O.setCalculatedValue(I,r[I],"count")})}},i.prototype.validate=function(){Xi()&&this.filters.clear(),A(this.axisRanges.iterator(),function(r){r.validate()}),s.prototype.validate.call(this);var e=this.bulletsContainer;if(e.fill=this.fill,e.stroke=this.stroke,e.x=this.pixelX,e.y=this.pixelY,this.bulletsContainer.children.length>0)if(this._showBullets){for(var t=0;tthis.endIndex;t--){var n;(n=this.dataItems.getIndex(t))&&n.bullets.each(function(r,a){a.__disabled=!0})}}else this.bulletsContainer.children.each(function(r){r.__disabled=!0});this.updateTooltipBounds()},i.prototype.updateTooltipBounds=function(){if(this.topParent){var e={x:0,y:0,width:this.topParent.maxWidth,height:this.topParent.maxHeight};this.tooltip.setBounds(e)}},i.prototype.shouldCreateBullet=function(e,t){return!0},i.prototype.validateDataElement=function(e){var t=this;s.prototype.validateDataElement.call(this,e),this._showBullets?(this.isHidden||(this.bulletsContainer.visible=!0),this.bullets.each(function(n){var r=e.bullets.getKey(n.uid);if(t.shouldCreateBullet(e,n)){if(!r){var a=n.propertyFields.disabled,o=e.dataContext;a&&o&&o[a]===!1?(n.applyOnClones=!1,n.disabled=!1,r=n.clone(),n.disabled=!0,n.applyOnClones=!0):r=n.clone(),r.shouldClone=!1,e.addSprite(r),t.visible&&!t.isHiding||r.hide(0)}var l=r.dataItem;if(l!=e){l&&l.bullets.setKey(n.uid,void 0);var h=t.itemReaderText;r instanceof It&&(h||(h="{"+r.xField+"}: {"+r.yField+"}"),r.isDynamic&&(e.events.on("workingvaluechanged",r.deepInvalidate,r,!1),t.dataItem.events.on("workingvaluechanged",r.deepInvalidate,r,!1)),r.deepInvalidate()),r.focusable&&(r.events.on("focus",function(p){r.readerTitle=t.populateString(h,r.dataItem)},void 0,!1),r.events.on("blur",function(p){r.readerTitle=""},void 0,!1)),r.hoverable&&(r.events.on("over",function(p){r.readerTitle=t.populateString(h,r.dataItem)},void 0,!1),r.events.on("out",function(p){r.readerTitle=""},void 0,!1))}r.parent=t.bulletsContainer,e.bullets.setKey(n.uid,r),r.maxWidth=e.itemWidth,r.maxHeight=e.itemHeight,r.__disabled=!1,t.positionBullet(r)}else r&&(r.__disabled=!0)})):this.bulletsContainer.visible=!1},i.prototype.handleDataItemWorkingValueChange=function(e,t){this.dataRangeInvalid||this.invalidateProcessedData()},Object.defineProperty(i.prototype,"ignoreMinMax",{get:function(){return this._ignoreMinMax},set:function(e){this._ignoreMinMax=e,this.invalidateDataItems()},enumerable:!0,configurable:!0}),i.prototype.createMask=function(){},i.prototype.processAxisRange=function(e){this.rangesContainer||(this.rangesContainer=this.createChild(W),this.rangesContainer.shouldClone=!1,this.rangesContainer.isMeasured=!1);var t=e.newValue;t&&(t.contents.parent=this.rangesContainer,t.isRange=!0,t.events.on("valuechanged",this.invalidateDataItems,this,!1))},i.prototype.getAxisField=function(e){},i.prototype.showTooltipAtPosition=function(e,t){},Object.defineProperty(i.prototype,"minBulletDistance",{get:function(){return this.getPropertyValue("minBulletDistance")},set:function(e){this.setPropertyValue("minBulletDistance",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bullets",{get:function(){return this._bullets||(this._bullets=new Oe(new It),this._bullets.template.virtualParent=this,this._bullets.events.on("inserted",this.processBullet,this,!1),this._bullets.events.on("removed",this.removeBullet,this,!1),this._disposers.push(new fe(this._bullets)),this._disposers.push(this._bullets.template)),this._bullets},enumerable:!0,configurable:!0}),i.prototype.createLegendMarker=function(e){},Object.defineProperty(i.prototype,"hiddenInLegend",{get:function(){return this.getPropertyValue("hiddenInLegend")},set:function(e){this.setPropertyValue("hiddenInLegend",e)&&this.chart&&this.chart.feedLegend()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"name",{get:function(){return this.getPropertyValue("name")},set:function(e){this.setPropertyValue("name",e);var t=this.legendDataItem;t&&(t.component.invalidate(),t.component.invalidateRawData()),this.readerTitle=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"itemReaderText",{get:function(){var e=this._itemReaderText;return e||(this.tooltipText?e=Cr(this.tooltipText):this.tooltipHTML&&(e=Cr(this.tooltipHTML))),this._adapterO?this._adapterO.apply("itemReaderText",e):e},set:function(e){this._itemReaderText=e,this._itemReaderTextChanged=!0},enumerable:!0,configurable:!0}),i.prototype.itemsFocusable=function(){return!(this.dataItems.length>=this.skipFocusThreshold)},Object.defineProperty(i.prototype,"legendDataItem",{get:function(){return this._legendDataItem},set:function(e){this._legendDataItem=e,this._legendDataItem.itemContainer.deepInvalidate()},enumerable:!0,configurable:!0}),i.prototype.updateLegendValue=function(e,t){if(this.legendDataItem){var n=this.legendSettings,r=this.legendDataItem,a=r.label,o=r.valueLabel;e&&!e.isDisposed()||t?(o&&(n.itemValueText&&(o.text=n.itemValueText),o.dataItem=e),a&&(n.itemLabelText&&(a.text=n.itemLabelText),a.dataItem=e)):(a&&((n.labelText||n.itemLabelText!=null)&&(a.text=n.labelText),a.dataItem=this.dataItem),o&&((n.valueText||n.itemValueText!=null)&&(o.text=n.valueText),o.dataItem=this.dataItem))}},i.prototype.copyFrom=function(e){this.bullets.copyFrom(e.bullets),this.bulletsContainer.copyFrom(e.bulletsContainer),this.calculatePercent=e.calculatePercent,this.usePercentHack=e.usePercentHack,this.simplifiedProcessing=e.simplifiedProcessing,s.prototype.copyFrom.call(this,e)},i.prototype.raiseCriticalError=function(e){this._chart&&this._chart.modal&&(this._chart.modal.content=this._chart.adapter.apply("criticalError",e).message,this._chart.modal.closable=!1,Z.suppressErrors||this._chart.modal.open(),this._chart.disabled=!0),Z.verbose&&console.log(e)},i.prototype.applyFilters=function(){var e=this;s.prototype.applyFilters.call(this),this.bulletsContainer.filters.clear(),A(this.filters.iterator(),function(t){e.bulletsContainer.filters.push(t.clone())})},Object.defineProperty(i.prototype,"heatRules",{get:function(){var e=this;return this._heatRules||(this._heatRules=new re,this._heatRules.events.on("inserted",function(t){var n=t.newValue,r=n.target;if(r){var a=n.dataField;v(a)||(a="value");var o=e.dataItem,l=n.property,h=ce(n.minValue),p=ce(n.maxValue);y(h)||y(p)||e.dataItem.events.on("calculatedvaluechanged",function(u){u.property==a&&A(e.dataItems.iterator(),function(d){var c=!1;j(d.sprites,function(f){if(f.clonedFrom==r){var g=f;g[l]=g[l],c=!0}}),c||j(d.sprites,function(f){f instanceof W&&A(f.children.iterator(),function(g){if(g.className==r.className){var m=g;m[l]=m[l]}else g instanceof W&&g.deepInvalidate()})})})}),e.dataItems.template.events.on("workingvaluechanged",function(u){if(u.property==a){var d=u.target,c=!1;j(d.sprites,function(f){if(f.clonedFrom==r){var g=f;g[l]=g[l],c=!0}}),c||j(d.sprites,function(f){f instanceof W&&A(f.children.iterator(),function(g){if(g.className==r.className){var m=g;m[l]=m[l]}else g instanceof W&&g.deepInvalidate()})})}}),r.adapter.add(l,function(u,d,c){var f=ce(n.minValue),g=ce(n.maxValue),m=n.min,x=n.max;if(d instanceof $){var b=d.propertyFields[c];if(b&&d.dataItem){var C=d.dataItem.dataContext;if(C&&v(C[b]))return u}}var S=d.dataItem;if(y(f)||(f=o.values[a].low),y(g)||(g=o.values[a].high),S&&S.values[a]){var P=S.getActualWorkingValue(a);if(v(m)&&v(x)&&y(f)&&y(g)&&y(P)){var O=void 0;if(O=n.logarithmic?(Math.log(P)*Math.LOG10E-Math.log(f)*Math.LOG10E)/(Math.log(g)*Math.LOG10E-Math.log(f)*Math.LOG10E):(P-f)/(g-f),!y(P)||y(O)&&Math.abs(O)!=1/0||(O=.5),y(m))return m+(x-m)*O;if(m instanceof se)return new se(mn(m.rgb,x.rgb,O))}}return u})}})),this._heatRules},enumerable:!0,configurable:!0}),i.prototype.processConfig=function(e){var t;if(e){if(v(e.bullets)&&Ae(e.bullets))for(var n=0,r=e.bullets.length;n=0;a--){var o=r.getIndex(a);o&&o.dataContext==t&&n.dataItems.remove(o)}for(a=n.data.length-1;a>=0;a--){var l=n.data[a];l&&l==t&&z(n.data,l)}}},i.prototype.handleSeriesAdded=function(e){var t=this,n=e.newValue;n.isDisposed()||(n.chart=this,n.parent=this.seriesContainer,n.bulletsContainer.parent=this.bulletsContainer,this._dataUsers.moveValue(n),n.addDisposer(new le(function(){t.dataUsers.removeValue(n)})),this.handleSeriesAdded2(n),this.handleLegendSeriesAdded(n))},i.prototype.handleLegendSeriesAdded=function(e){e.hiddenInLegend||this.legend&&this.legend.addData(e)},i.prototype.handleSeriesAdded2=function(e){var t=this;this.dataInvalid||this._disposers.push(_.events.once("exitframe",function(){e.data&&e.data.length!=0||(e.data=t.data,e.showOnInit&&(e.reinit(),e.setPropertyValue("showOnInit",!1),e.showOnInit=!0),e.isDisposed()||e.events.once("datavalidated",function(){e.data==t.data&&(e._data=[])}))}))},i.prototype.feedLegend=function(){var e=this.legend;if(e){var t=[];A(this.series.iterator(),function(n){n.hiddenInLegend||t.push(n)}),e.dataFields.name="name",e.data=t}},i.prototype.createSeries=function(){return new zn},Object.defineProperty(i.prototype,"colors",{get:function(){return this.getPropertyValue("colors")},set:function(e){this.setPropertyValue("colors",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"patterns",{get:function(){return this.getPropertyValue("patterns")},set:function(e){this.setPropertyValue("patterns",e,!0)},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.series.copyFrom(e.series)},i.prototype.appear=function(){s.prototype.appear.call(this),this.series.each(function(e){e.showOnInit&&e.inited&&e.appear()})},i}(ai);_.registeredClasses.SerialChart=Zr;var Un=function(s){function i(){var e=s.call(this)||this;e._axis=new Me,e.dataItems=new re,e.className="AxisBreak",e.breakSize=.01,e.marginLeft=-5,e.marginRight=-5,e.marginTop=-5,e.marginBottom=-5;var t=new ae,n=new si;n.fill=t.getFor("background"),n.stroke=B(),n.fillOpacity=.9,n.zIndex=0,e._fillShape=n;var r=new si;r.fill=B(),r.stroke=t.getFor("grid"),r.strokeOpacity=.3,r.zIndex=1,e._startLine=r;var a=new si;return a.fill=B(),a.stroke=B("#000000"),a.strokeOpacity=.3,a.zIndex=2,e._endLine=a,e._disposers.push(e._axis),e.applyTheme(),e}return w(i,s),i.prototype.dispose=function(){s.prototype.dispose.call(this),this._fillShape&&this._fillShape.dispose(),this._startLine&&this._startLine.dispose(),this._endLine&&this._endLine.dispose()},Object.defineProperty(i.prototype,"startLine",{get:function(){return this._startLine},set:function(e){this._startLine&&this._startLine.dispose(),this._startLine=e,this.addBreakSprite(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endLine",{get:function(){return this._endLine},set:function(e){this._endLine&&this._endLine.dispose(),this._endLine=e,this.addBreakSprite(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fillShape",{get:function(){return this._fillShape},set:function(e){this._fillShape&&this._fillShape.dispose(),this._fillShape=e,this.addBreakSprite(e)},enumerable:!0,configurable:!0}),i.prototype.addBreakSprite=function(e){e.parent=this,e.isMeasured=!1,this._disposers.push(e)},Object.defineProperty(i.prototype,"axis",{get:function(){return this._axis.get()},set:function(e){if(this._axis.get()!==e){this._axis.set(e,e.renderer.gridContainer.events.on("transformed",this.invalidate,this,!1)),e.renderer.createBreakSprites(this);var t=e.axisBreaks.template;this.startLine.copyFrom(t.startLine),this.endLine.copyFrom(t.endLine),this.fillShape.copyFrom(t.fillShape)}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"breakSize",{get:function(){return this.getPropertyValue("breakSize")},set:function(e){this.setPropertyValue("breakSize",e)&&this.axis&&(this.axis.invalidate(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startPoint",{get:function(){var e=this.axis.renderer;if(e)return e.positionToPoint(this.startPosition)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endPoint",{get:function(){var e=this.axis.renderer;if(e)return e.positionToPoint(this.endPosition)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startPosition",{get:function(){},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endPosition",{get:function(){},enumerable:!0,configurable:!0}),i.prototype.draw=function(){s.prototype.draw.call(this),this.axis&&this.axis.renderer.updateBreakElement(this)},Object.defineProperty(i.prototype,"startValue",{get:function(){return this.getPropertyValue("startValue")},set:function(e){this.setPropertyValue("startValue",e)&&this.axis&&(this.axis.invalidate(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endValue",{get:function(){return this.getPropertyValue("endValue")},set:function(e){this.setPropertyValue("endValue",e)&&this.axis&&(this.axis.invalidate(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),i}(W);_.registeredClasses.AxisBreak=Un;var Mp,Ji=function(s){function i(){var e=s.call(this)||this;return e.className="AxisDataItem",e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"grid",{get:function(){if(!this._grid){var e=this.component;if(e){var t,n=void 0;if(this.isRange){if((n=e.axisRanges.template.grid).disabled)return;t=n.clone()}else{if((n=e.renderer.grid.template).disabled)return;t=e.renderer.grid.create(),this._disposers.push(new le(function(){e.renderer.grid.removeValue(t)}))}this.grid=t,t.shouldClone=!1,this._disposers.push(t),t.axis=this.component}}return this._grid},set:function(e){this._grid&&this._grid!=e&&(z(this.sprites,this._grid),this._grid.dataItem=void 0),e&&(e.dataItem&&e.dataItem!=this&&(z(e.dataItem.sprites,e),e.dataItem.grid=void 0),this.addSprite(e)),this._grid=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tick",{get:function(){if(!this._tick){var e=this.component;if(e){var t,n=void 0;if(this.isRange){if((n=e.axisRanges.template.tick).disabled)return;t=n.clone()}else{if((n=e.renderer.ticks.template).disabled)return;t=e.renderer.ticks.create(),this._disposers.push(new le(function(){e.renderer.ticks.removeValue(t)}))}this.tick=t,t.axis=this.component,t.shouldClone=!1,this._disposers.push(t)}}return this._tick},set:function(e){this._tick&&this._tick!=e&&(z(this.sprites,this._tick),this._tick.dataItem=void 0),e&&(e.dataItem&&e.dataItem!=this&&(z(e.dataItem.sprites,e),e.dataItem.tick=void 0),this.addSprite(e)),this._tick=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"label",{get:function(){if(!this._label){var e=this.component;if(e){var t,n=void 0;if(this.isRange){if((n=e.axisRanges.template.label).disabled)return;t=n.clone()}else{if((n=e.renderer.labels.template).disabled)return;t=e.renderer.labels.create(),this._disposers.push(new le(function(){e.renderer.labels.removeValue(t)}))}this._disposers.push(t),this.label=t,t.shouldClone=!1,t.axis=this.component,t.virtualParent=e}}return this._label},set:function(e){this._label&&this._label!=e&&(z(this.sprites,this._label),this._label.dataItem=void 0),e&&(e.dataItem&&e.dataItem!=this&&(z(e.dataItem.sprites,e),e.dataItem.label=void 0),this.addSprite(e)),this._label=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"axisFill",{get:function(){if(!this._axisFill){var e=this.component;if(e){var t,n=void 0;if(this.isRange){if(n=e.axisRanges.template.axisFill,!this.isTemplate&&n.disabled)return;t=n.clone()}else{if((n=e.renderer.axisFills.template).disabled)return;t=e.renderer.axisFills.create(),this._disposers.push(new le(function(){e.renderer.axisFills.removeValue(t)}))}this.axisFill=t,t.shouldClone=!1,this._disposers.push(t)}}return this._axisFill},set:function(e){this._axisFill&&this._axisFill!=e&&(z(this.sprites,this._axisFill),this._axisFill.dataItem=void 0),e&&(e.dataItem&&e.dataItem!=this&&(z(e.dataItem.sprites,e),e.dataItem.axisFill=void 0),e.axis=this.component,this.addSprite(e)),this._axisFill=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"text",{get:function(){return this._text},set:function(e){this._text=e,this._label&&(this._label.text=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"mask",{get:function(){return this._mask},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"contents",{get:function(){if(!this._contents){var e=new W;this.addSprite(e),e.isMeasured=!1,this._contents=e;var t=this.component;if(t){var n=t.renderer.createFill(this.component);n.disabled=!1,n.axis=t,this.addSprite(n),this._mask=n,e.mask=n}}return this._contents},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"axisBreak",{get:function(){return this._axisBreak},set:function(e){this._axisBreak&&this._axisBreak.dataItems.removeValue(this),e&&e.dataItems.push(this),this._axisBreak=e},enumerable:!0,configurable:!0}),i.prototype.validate=function(){this.component&&this.component.validateDataElement(this)},i.prototype.appendChildren=function(){this.component&&this.component.appendDataItem(this)},i.prototype.hasProperty=function(e){return e=="component"||s.prototype.hasProperty.call(this,e)},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.text=e.text,e.bullet&&(this.bullet=e.bullet.clone()),this.minPosition=e.minPosition,this.maxPosition=e.maxPosition},i.prototype.setVisibility=function(e,t){s.prototype.setVisibility.call(this,e,t),this._contents&&(this._contents.visible=e)},Object.defineProperty(i.prototype,"bullet",{get:function(){return this._bullet},set:function(e){this._bullet&&this._bullet!=e&&(z(this.sprites,this._bullet),this._bullet.dataItem=void 0),this._bullet=e,e&&this.addSprite(e)},enumerable:!0,configurable:!0}),i}(ei);(function(s){s[s.Start=0]="Start",s[s.Middle=.5]="Middle",s[s.End=1]="End"})(Mp||(Mp={}));var Gn=function(s){function i(){var e=s.call(this)||this;if(e._gridCount=10,e._series=new re,e.autoDispose=!0,e._axisItemCount=0,e.constructor===i)throw new Error("'Axis' cannot be instantiated directly. Please use a specific axis type.");e.hideTooltipWhileZooming=!0,e.minWidth=1e-4,e.minHeight=1e-4,e.className="Axis",e.shouldClone=!1,e.setPropertyValue("cursorTooltipEnabled",!0),e.toggleZoomOutButton=!0,e.zoomable=!0;var t=new ae;e.title=new $e,e.title.shouldClone=!1,e._disposers.push(e.title),e.setPropertyValue("startLocation",0),e.setPropertyValue("endLocation",1),e._dataItemsIterator=new fn(e.dataItems,function(){return e.dataItems.create()}),e._dataItemsIterator.createNewItems=!0;var n=new Rn;e._disposers.push(n),n.label.padding(5,10,5,10),n.background.pointerLength=5,n.fitPointerToBounds=!0,n.background.filters.clear(),n.virtualParent=e;var r=n.background;return r.cornerRadius=0,r.fill=t.getFor("alternativeBackground"),r.stroke=r.fill,r.strokeWidth=1,r.fillOpacity=1,n.label.fill=t.getFor("alternativeText"),e.tooltip=n,e.readerHidden=!0,e.events.on("rangechangestarted",function(){e.series.each(function(a){a.hideTooltipWhileZooming&&(a.tooltip.hide(),a.tooltip.preventShow=!0)}),e.hideTooltipWhileZooming&&(e.tooltip.hide(),e.tooltip.preventShow=!0)},void 0,!1),e.events.on("rangechangeended",function(){e.series.each(function(a){a.hideTooltipWhileZooming&&(a.tooltip.hide(),a.tooltip.preventShow=!1)}),e.hideTooltipWhileZooming&&(e.tooltip.hide(),e.tooltip.preventShow=!1)},void 0,!1),e.applyTheme(),e}return w(i,s),i.prototype.fillRule=function(e,t){y(t)||(t=e.index),t/2==Math.round(t/2)?(e.axisFill.__disabled=!0,e.axisFill.opacity=0):(e.axisFill.opacity=1,e.axisFill.__disabled=!1)},i.prototype.createDataItem=function(){return new Ji},i.prototype.invalidateLayout=function(){s.prototype.invalidateLayout.call(this),A(this.series.iterator(),function(e){e.invalidateLayout()})},i.prototype.invalidateSeries=function(){A(this.series.iterator(),function(e){e.invalidate()})},i.prototype.validateDataElements=function(){this._axisItemCount=0,this.ghostLabel&&(this.renderer.updateLabelElement(this.ghostLabel,this.start,this.end),this.ghostLabel.validate())},i.prototype.updateGridCount=function(){if(this.renderer){var e=this.axisLength/this.renderer.minGridDistance;e!=this._gridCount&&(this._gridCount=e,this.clearCache())}},i.prototype.validateLayout=function(){this.axisFullLength=this.axisLength/(this.end-this.start),s.prototype.validateLayout.call(this),this.updateGridCount();var e=this.renderer;e&&(e.updateAxisLine(),e.updateTooltip(),e.updateBaseGridElement()),this._prevLength!=this.axisLength&&(this.dispatchImmediately("lengthchanged"),this._prevLength=this.axisLength)},i.prototype.initRenderer=function(){},i.prototype.appendDataItem=function(e){var t=this.renderer,n=e.tick;n&&(n.above?n.parent=t.bulletsContainer:n.parent=t.gridContainer),e.label&&(e.label.parent=t);var r=e.axisFill;r&&(r.above?r.parent=t.bulletsContainer:r.parent=t.gridContainer);var a=e.grid;a&&(a.above?a.parent=t.bulletsContainer:a.parent=t.gridContainer),e.bullet&&(e.bullet.parent=t.bulletsContainer)},i.prototype.validate=function(){s.prototype.validate.call(this),this.validateLayout(),this.renderer.updateGridContainer()},i.prototype.validateAxisRanges=function(){var e=this;A(this.axisRanges.iterator(),function(t){e.appendDataItem(t),e.validateDataElement(t),t.grid&&t.grid.validate(),t.tick&&t.tick.validate(),t.axisFill&&t.axisFill.validate(),t.label&&t.label.validate()})},i.prototype.validateBreaks=function(){this._axisBreaks&&A(this._axisBreaks.iterator(),function(e){e.invalidate()})},i.prototype.processBreak=function(e){var t=e.newValue;t.parent=this.renderer.breakContainer,t.axis=this},i.prototype.registerSeries=function(e){var t=this;return this.series.moveValue(e),new _e([new le(function(){t.series.removeValue(e)}),this.events.on("lengthchanged",e.invalidate,e,!1),this.events.on("lengthchanged",e.createMask,e,!1),this.events.on("startchanged",e.invalidate,e,!1),this.events.on("endchanged",e.invalidate,e,!1)])},Object.defineProperty(i.prototype,"renderer",{get:function(){return this._renderer},set:function(e){if(e!=this._renderer){this._renderer=e,e.chart=this.chart,e.axis=this,e.parent=this,this.title.parent=this,this.initRenderer(),this._disposers.push(e.gridContainer.events.on("maxsizechanged",this.invalidate,this,!1));var t=this.renderer.labels.create();this._disposers.push(t),t.dataItem=this.dataItems.template.clone(),t.text="L",t.parent=this.renderer,t.shouldClone=!1,t.fillOpacity=0,t.opacity=0,t.strokeOpacity=0,t.interactionsEnabled=!1,t.validate(),this.ghostLabel=t,this.events.on("beforedatavalidated",function(){t.text="L"},void 0,!1)}},enumerable:!0,configurable:!0}),i.prototype.positionToAngle=function(e){return this.renderer.positionToAngle(e)},i.prototype.pointToPosition=function(e){return this.renderer.pointToPosition(e)},i.prototype.positionToCoordinate=function(e){return this.renderer.positionToCoordinate(e)},i.prototype.getAnyRangePath=function(e,t){return this.renderer.getPositionRangePath(e,t)},i.prototype.anyToPosition=function(e){return 0},i.prototype.anyToPoint=function(e){return{x:0,y:0,angle:0}},i.prototype.getPositionRangePath=function(e,t){return this.renderer?this.renderer.getPositionRangePath(e,t):""},Object.defineProperty(i.prototype,"axisLength",{get:function(){return this.renderer?this.renderer.axisLength:0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cursorTooltipEnabled",{get:function(){return this.getPropertyValue("cursorTooltipEnabled")},set:function(e){this.setPropertyValue("cursorTooltipEnabled",e)&&(e&&this.renderer?this.renderer.updateTooltip():this.tooltip&&this.tooltip.hide(0))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"toggleZoomOutButton",{get:function(){return this.getPropertyValue("toggleZoomOutButton")},set:function(e){this.setPropertyValue("toggleZoomOutButton",e)},enumerable:!0,configurable:!0}),i.prototype.hideTooltip=function(e){s.prototype.hideTooltip.call(this,e),this._tooltipPosition=void 0},i.prototype.showTooltipAtPosition=function(e,t){var n=this._tooltip;if(!n||this.dataItems.length<=0)this._tooltipPosition=void 0;else{if(t||(e=this.toAxisPosition(e)),!y(e)||ethis.end)return n.hide(0),void(this._tooltipPosition=void 0);var r=this.renderer;n.parent||(n.parent=this.tooltipContainer);var a=r.tooltipLocation,o=this.getCellStartPosition(e),l=this.getCellEndPosition(e);if(this.tooltipPosition=="fixed"&&(e=o+(l-o)*a),e=R(e,this.start,this.end),this._tooltipPosition!=e){this._tooltipPosition=e;var h=r.tooltipLocation2,p=r.positionToPoint(o,h),u=r.positionToPoint(l,h);this.currentItemStartPoint=p,this.currentItemEndPoint=u,r.fullWidthTooltip&&(n.width=u.x-p.x,n.height=u.y-p.y);var d=ut(r.positionToPoint(e,h),this.renderer.line);n.text=this.getTooltipText(e),n.text&&(n.delayedPointTo(d),n.show())}this.cursorTooltipEnabled&&!this.tooltip.disabled||n.hide(0)}},i.prototype.toAxisPosition=function(e){if((e=this.renderer.toAxisPosition(e))!=null)return e*=this.end-this.start,this.renderer.inversed?this.end-e:this.start+e},i.prototype.toGlobalPosition=function(e){return this.renderer.inversed?e=this.end-e:e-=this.start,e/(this.end-this.start)},i.prototype.getTooltipText=function(e){},i.prototype.updateTooltip=function(e,t){var n=this._tooltip;n&&(n.fixDoc=!1,n.pointerOrientation=e,n.setBounds(Dr(t,this.renderer.line)))},i.prototype.roundPosition=function(e,t,n){return e},i.prototype.getCellStartPosition=function(e){return e},i.prototype.getCellEndPosition=function(e){return e},Object.defineProperty(i.prototype,"axisRanges",{get:function(){if(!this._axisRanges){var e=this.createDataItem();e.isRange=!0,e.axisFill=this.renderer.axisFills.template.clone(),e.grid=this.renderer.grid.template.clone(),e.tick=this.renderer.ticks.template.clone(),e.label=this.renderer.labels.template.clone(),e.isTemplate=!0,e.component=this,e.axisFill.disabled=!1,e.tick.disabled=!1,e.grid.disabled=!1,e.label.disabled=!1,this._axisRanges=new Oe(e),this._axisRanges.events.on("inserted",this.processAxisRange,this,!1),this._disposers.push(new fe(this._axisRanges)),this._disposers.push(this._axisRanges.template)}return this._axisRanges},enumerable:!0,configurable:!0}),i.prototype.processAxisRange=function(e){var t=e.newValue;t.component=this,t.isRange=!0},Object.defineProperty(i.prototype,"axisBreaks",{get:function(){return this._axisBreaks||(this._axisBreaks=new ha(this.createAxisBreak(),function(e,t){return Pt(e.adjustedStartValue,t.adjustedStartValue)}),this._axisBreaks.events.on("inserted",this.processBreak,this,!1),this._disposers.push(new fe(this._axisBreaks)),this._disposers.push(this._axisBreaks.template)),this._axisBreaks},enumerable:!0,configurable:!0}),i.prototype.createAxisBreak=function(){return new Un},Object.defineProperty(i.prototype,"series",{get:function(){return this._series||(this._series=new re),this._series},enumerable:!0,configurable:!0}),i.prototype.processSeriesDataItems=function(){},i.prototype.processSeriesDataItem=function(e,t){},i.prototype.postProcessSeriesDataItems=function(e){},i.prototype.postProcessSeriesDataItem=function(e){},i.prototype.updateAxisBySeries=function(){},i.prototype.hideUnusedDataItems=function(){var e=this,t=this._dataItemsIterator;t.createNewItems=!1,A(t.iterator(),function(n){e.validateDataElement(n),n.__disabled=!0}),t.clear(),t.createNewItems=!0},i.prototype.getSeriesDataItem=function(e,t,n){},i.prototype.getAngle=function(e,t,n,r,a){},i.prototype.getX=function(e,t,n,r,a){},i.prototype.getPositionX=function(e,t,n,r,a){},i.prototype.getY=function(e,t,n,r,a){},i.prototype.getPositionY=function(e,t,n,r,a){},Object.defineProperty(i.prototype,"basePoint",{get:function(){return{x:0,y:0}},enumerable:!0,configurable:!0}),i.prototype.dataChangeUpdate=function(){},i.prototype.seriesDataChangeUpdate=function(e){},i.prototype.adjustDifference=function(e,t){var n=t-e;if(y(n))return this._axisBreaks&&rt(this._axisBreaks.iterator(),function(r){var a=r.adjustedStartValue,o=r.adjustedEndValue;if(y(a)&&y(o)){if(a>t)return!1;if(o>=e&&y(a)&&y(o)){var l=r.breakSize,h=ol({start:a,end:o},{start:e,end:t});h&&(n-=(h.end-h.start)*(1-l))}return!0}}),n},i.prototype.isInBreak=function(e){if(this._axisBreaks)return Tl(this._axisBreaks.iterator(),function(t){return e>=t.adjustedStartValue&&e<=t.adjustedEndValue})},i.prototype.fixAxisBreaks=function(){var e=this;if(this._axisBreaks){var t=this._axisBreaks;if(t.length>0){j(Ri(t.iterator()),function(a){var o=ie(a.startValue,a.endValue),l=q(a.startValue,a.endValue);a.adjustedStartValue=o,a.adjustedEndValue=l,e._axisBreaks.update(a)});var n=t.first,r=Math.min(n.startValue,n.endValue);A(t.iterator(),function(a){var o=a.adjustedStartValue,l=a.adjustedEndValue;oh)},i.prototype.createBreakSprites=function(e){},Object.defineProperty(i.prototype,"axisFills",{get:function(){if(!this._axisFills){var e=this.createFill(this.axis);this._axisFills=new Oe(e),e.applyOnClones=!0,e.events.on("enabled",this.invalidateAxisItems,this,!1),this._disposers.push(new fe(this._axisFills)),this._disposers.push(this._axisFills.template)}return this._axisFills},enumerable:!0,configurable:!0}),i.prototype.createFill=function(e){return new qr(e)},Object.defineProperty(i.prototype,"grid",{get:function(){if(!this._grid){var e=this.createGrid();this._grid=new Oe(e),e.applyOnClones=!0,e.events.on("enabled",this.invalidateAxisItems,this,!1),this._disposers.push(new fe(this._grid)),this._disposers.push(this._grid.template)}return this._grid},enumerable:!0,configurable:!0}),i.prototype.createGrid=function(){return new Qi},Object.defineProperty(i.prototype,"ticks",{get:function(){if(!this._ticks){var e=this.createTick();e.applyOnClones=!0,e.isMeasured=!1,e.events.on("enabled",this.invalidateAxisItems,this,!1),this._ticks=new Oe(e),this._disposers.push(new fe(this._ticks)),this._disposers.push(this._ticks.template)}return this._ticks},enumerable:!0,configurable:!0}),i.prototype.createTick=function(){return new uo},Object.defineProperty(i.prototype,"labels",{get:function(){if(!this._labels){var e=this.createLabel();this._labels=new Oe(e),e.applyOnClones=!0,e.events.on("enabled",this.invalidateAxisItems,this,!1),this._disposers.push(new fe(this._labels)),this._disposers.push(this._labels.template)}return this._labels},enumerable:!0,configurable:!0}),i.prototype.createLabel=function(){return new $r},Object.defineProperty(i.prototype,"inside",{get:function(){return this.getPropertyValue("inside")},set:function(e){this.setPropertyValue("inside",e)&&this.axis&&this.axis.invalidate(),e?(this.width=0,this.height=0):(this.width=void 0,this.height=void 0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"opposite",{get:function(){return this.getPropertyValue("opposite")},set:function(e){this.setPropertyValue("opposite",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fullWidthTooltip",{get:function(){return this.getPropertyValue("fullWidthTooltip")},set:function(e){this.setPropertyValue("fullWidthTooltip",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltipLocation",{get:function(){return this.getPropertyValue("tooltipLocation")},set:function(e){this.setPropertyValue("tooltipLocation",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltipLocation2",{get:function(){return this.getPropertyValue("tooltipLocation2")},set:function(e){this.setPropertyValue("tooltipLocation2",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cellStartLocation",{get:function(){return this.getPropertyValue("cellStartLocation")},set:function(e){this.setPropertyValue("cellStartLocation",e)&&this.axis&&this.axis.invalidateSeries()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cellEndLocation",{get:function(){return this.getPropertyValue("cellEndLocation")},set:function(e){this.setPropertyValue("cellEndLocation",e)&&this.axis&&this.axis.invalidateSeries()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"inversed",{get:function(){return this.getPropertyValue("inversed")},set:function(e){this.setPropertyValue("inversed",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"minLabelPosition",{get:function(){return this.getPropertyValue("minLabelPosition")},set:function(e){this.setPropertyValue("minLabelPosition",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxLabelPosition",{get:function(){return this.getPropertyValue("maxLabelPosition")},set:function(e){this.setPropertyValue("maxLabelPosition",e,!0)},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.grid.template.copyFrom(e.grid.template),this.ticks.template.copyFrom(e.ticks.template),this.labels.template.copyFrom(e.labels.template),this.axisFills.template.copyFrom(e.axisFills.template),this.line.copyFrom(e.line),this.baseGrid.copyFrom(e.baseGrid)},i.prototype.toAxisPosition=function(e){return e},i.prototype.setVisibility=function(e){s.prototype.setVisibility.call(this,e),this.bulletsContainer.visible=e},i}(W);_.registeredClasses.AxisRenderer=Kn;var tn=function(s){function i(){var e=s.call(this)||this;return e.className="AxisBullet",e.location=.5,e.isMeasured=!1,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"location",{get:function(){return this.getPropertyValue("location")},set:function(e){this.setPropertyValue("location",e,!0)},enumerable:!0,configurable:!0}),i.prototype.setDisabled=function(e){var t=s.prototype.setDisabled.call(this,e);return this.axis&&this.axis.invalidateDataItems(),t},i}(W);_.registeredClasses.AxisBullet=tn;var mt=function(s){function i(){var e=s.call(this)||this;return e.className="AxisRendererY",e.minGridDistance=40,e.opposite=!1,e.height=F(100),e.labels.template.verticalCenter="middle",e.applyTheme(),e}return w(i,s),i.prototype.setAxis=function(e){s.prototype.setAxis.call(this,e),e.layout="horizontal"},i.prototype.updateGridContainer=function(){var e=this.axis;if(e){var t=this.gridContainer;t.y=e.pixelY,t.height=e.axisLength}},i.prototype.toAxisPosition=function(e){var t=this.axis;if(t){var n=1-e,r=t.relativePositionSprite,a=t.pixelY;if(r?a=Qe({x:0,y:this.pixelY},this.parent,r).y:r=t.parent,r)return 1-(n-a/r.innerHeight)/(t.axisLength/r.innerHeight)}return e},i.prototype.processRenderer=function(){s.prototype.processRenderer.call(this);var e=this.axis;if(e){var t=e.title;t.valign="middle",e.height instanceof te||(e.height=F(100)),this.opposite?(t.rotation=90,this.line.toBack(),t.toFront()):(t.rotation=-90,t.toBack(),this.line.toFront())}},i.prototype.updateTooltip=function(){if(this.axis){var e=2e3,t=0,n=e,r=this.axisLength;this.opposite?this.inside&&(t=-2e3,n=e):this.inside||(t=-2e3,n=e),this.axis.updateTooltip("horizontal",{x:t,y:0,width:n,height:r})}},Object.defineProperty(i.prototype,"axisLength",{get:function(){var e=this.axis;return e.measuredHeight-e.pixelPaddingTop-e.pixelPaddingBottom||0},enumerable:!0,configurable:!0}),i.prototype.positionToPoint=function(e,t){return{x:0,y:this.positionToCoordinate(e)}},i.prototype.pointToPosition=function(e){return this.coordinateToPosition(e.y,e.x)},i.prototype.coordinateToPosition=function(e,t){var n=this.axis,r=n.axisFullLength;return V(n.renderer.inversed?1-n.start-e/r:e/r+(1-n.end),5)},i.prototype.getPositionRangePath=function(e,t){var n=R(this.positionToCoordinate(e),0,this.axisLength),r=R(this.positionToCoordinate(t),0,this.axisLength),a=Math.abs(r-n),o=this.getWidth();return Yt({x:0,y:Math.min(n,r),width:o,height:a},!0)},i.prototype.updateGridElement=function(e,t,n){t+=(n-t)*e.location;var r=this.positionToPoint(t);e.path=E({x:0,y:0})+T({x:this.getWidth(),y:0}),this.positionItem(e,r),this.toggleVisibility(e,t,0,1)},i.prototype.updateTickElement=function(e,t,n){t+=(n-t)*e.location;var r=this.positionToPoint(t),a=e.length;try{this.axis.title.measuredWidth}catch{}r.x=Qe({x:this.line.pixelX,y:0},this.line.parent,this.gridContainer).x,this.opposite?a*=e.inside?-1:1:a*=e.inside?1:-1,e.path=E({x:0,y:0})+T({x:a,y:0}),this.positionItem(e,r),this.toggleVisibility(e,t,0,1)},i.prototype.updateAxisLine=function(){this.line.path=E({x:0,y:0})+T({x:0,y:this.axisLength})},i.prototype.updateBaseGridElement=function(){s.prototype.updateBaseGridElement.call(this);var e=this.axis,t=this.getWidth(),n=this.axisLength,r=e.basePoint.y,a=this.baseGrid;if(r<-.2||r>n+.2)a.hide(0);else{var o=Qe({x:0,y:0},this.gridContainer,a.parent).x;a.path=E({x:0,y:0})+T({x:t,y:0}),a.moveTo({x:o,y:r}),a.show(0)}},i.prototype.updateLabelElement=function(e,t,n,r){v(r)||(r=e.location),t+=(n-t)*r,e.isMeasured=!e.inside;var a,o=this.positionToPoint(t),l=0,h=this.gridContainer.maxWidth;this.opposite?(e.inside?(a="right",e.align=="left"&&(l=-h,a="left"),e.align=="center"&&(l=-h/2,a="middle")):a="left",o.x=0+l):(e.inside?(a="left",e.align=="right"&&(l=h,a="right"),e.align=="center"&&(l=h/2,a="middle")):a="right",o.x=this.measuredWidth+l),e.rotation==0&&(e.horizontalCenter=a),this.positionItem(e,o),this.toggleVisibility(e,t,this.minLabelPosition,this.maxLabelPosition)},i.prototype.updateBreakElement=function(e){s.prototype.updateBreakElement.call(this,e);var t=e.startLine,n=e.endLine,r=e.fillShape,a=e.startPoint,o=e.endPoint,l=e.pixelMarginLeft,h=this.getWidth()-e.pixelMarginLeft-e.pixelMarginRight;a.y=R(a.y,-1,this.axisLength+1),o.y=R(o.y,-1,this.axisLength+1),a.y==o.y&&(a.y<0||a.y>this.axisLength)?e.fillShape.__disabled=!0:e.fillShape.__disabled=!1;var p=Math.abs(h-l);t.x=l,t.height=0,t.width=p,n.x=l,n.height=0,n.width=p,r.width=p,r.height=Math.abs(o.y-a.y),r.x=l,r.y=o.y},i.prototype.createBreakSprites=function(e){e.startLine=new si,e.endLine=new si;var t=new Ja;t.setWavedSides(!0,!1,!0,!1),e.fillShape=t},i.prototype.positionToCoordinate=function(e){var t=this.axis,n=t.axisFullLength;return t.renderer.inversed?(e-t.start)*n:(t.end-e)*n},i.prototype.updateBullet=function(e,t,n){var r=.5;e instanceof tn&&(r=e.location),t+=(n-t)*r;var a=this.positionToPoint(t);a.x=Qe({x:this.line.pixelX,y:0},this.line.parent,this.gridContainer).x,this.positionItem(e,a),this.toggleVisibility(e,t,0,1)},i}(Kn);_.registeredClasses.AxisRendererY=mt,Ne.push({relevant:Ue.widthS,state:function(s,i){if(s instanceof mt){var e=s.states.create(i);return e.properties.inside=!0,e.properties.maxLabelPosition=.9,e.properties.minLabelPosition=.1,e}return null}}),Ne.push({relevant:Ue.widthXS,state:function(s,i){if(s instanceof mt){var e=s.states.create(i);return e.properties.disabled=!0,e}return null}});var Jr=function(s){function i(){var e=s.call(this)||this;return e.className="ValueAxisBreak",e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"startPosition",{get:function(){if(this.axis)return this.axis.valueToPosition(this.adjustedStartValue)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endPosition",{get:function(){if(this.axis)return this.axis.valueToPosition(this.adjustedEndValue)},enumerable:!0,configurable:!0}),i}(Un);_.registeredClasses.ValueAxisBreak=Jr;var Zn=function(s){function i(){var e=s.call(this)||this;return e.className="ValueAxisDataItem",e.values.value={},e.values.endValue={},e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"value",{get:function(){return this.values.value.value},set:function(e){this.setValue("value",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endValue",{get:function(){return this.values.endValue.value},set:function(e){this.setValue("endValue",e)},enumerable:!0,configurable:!0}),i}(Ji),ee=function(s){function i(){var e=s.call(this)||this;return e._stepDecimalPlaces=0,e._prevStepDecimalPlaces=0,e._adjustLabelPrecision=!0,e._baseValue=0,e._adjustedStart=0,e._adjustedEnd=1,e._extremesChanged=!1,e._deltaMinMax=1,e._dsc=!1,e.calculateTotals=!1,e.className="ValueAxis",e.axisFieldName="value",e.setPropertyValue("maxZoomFactor",1e3),e.setPropertyValue("extraMin",0),e.setPropertyValue("extraMax",0),e.setPropertyValue("strictMinMax",!1),e.setPropertyValue("maxPrecision",Number.MAX_VALUE),e.setPropertyValue("adjustLabelPrecision",!0),e.setPropertyValue("extraTooltipPrecision",0),e.keepSelection=!1,e.includeRangesInMinMax=!1,e.applyTheme(),e}return w(i,s),i.prototype.fillRule=function(e){var t=e.value,n=e.component;e.axisFill.disabled||(V(t/n.step/2,5)==Math.round(t/n.step/2)?e.axisFill.__disabled=!0:e.axisFill.__disabled=!1)},i.prototype.createDataItem=function(){return new Zn},i.prototype.createAxisBreak=function(){return new Jr},i.prototype.dataChangeUpdate=function(){this.clearCache(),this.keepSelection?(this._start!=0&&this.dispatchImmediately("startchanged"),this._end!=1&&this.dispatchImmediately("endchanged"),this._start==0&&this._end==1||this.dispatchImmediately("startendchanged")):this._start==0&&this._end==1||(this._start=0,this._end=1,this.dispatchImmediately("startendchanged")),this._maxZoomed=this._maxDefined,this._minZoomed=this._minDefined,this._maxAdjusted=this._maxDefined,this._minAdjusted=this._minDefined},i.prototype.processSeriesDataItems=function(){if(this.calculateTotals){var e=this.series.getIndex(0),t=e.startIndex;if(e.dataItems.length>0){t>0&&t--;var n=e.endIndex;n1?t=Math.pow(10,Math.log(this.min)*Math.LOG10E):(t=Math.floor(this.minZoomed/this._step)*this._step)==0&&(t=this.minZoomed):t=Math.floor(t/this._step)*this._step;var n=this._maxZoomed+this._step;this.resetIterators();var r=this._dataItemsIterator;if(this._step==0)return;this._step=this.fixSmallStep(this._step);var a=0,o=this._prevStepDecimalPlaces!=this._stepDecimalPlaces;for(this._prevStepDecimalPlaces=this._stepDecimalPlaces;t<=n;){if(!this.isInBreak(t)){var l=r.find(function(f){return f.value===t});l.__disabled&&(l.__disabled=!1),this.appendDataItem(l),l.axisBreak=void 0,(l.value!=t||o)&&(l.value=t,l.text=this.formatLabel(t),l.label&&l.label.invalid&&l.label.validate(),l.value>=this.min&&l.value<=this.max&&l.label&&(this.axisLetter=="Y"&&l.label.measuredWidth>this.ghostLabel.measuredWidth||this.axisLetter=="X"&&l.label.measuredHeight>this.ghostLabel.measuredHeight)&&(this.ghostLabel.text=l.label.currentText,this.ghostLabel.validate())),this.validateDataElement(l)}a++;var h=t;this.logarithmic&&Math.log(this.max)*Math.LOG10E-Math.log(this.min)*Math.LOG10E>1?t=Math.pow(10,Math.log(this.min)*Math.LOG10E+a):t+=this._step;var p=Math.pow(10,Math.floor(Math.log(Math.abs(this._step))*Math.LOG10E));if(p<1){var u=Math.round(Math.abs(Math.log(Math.abs(p))*Math.LOG10E))+2;if(u=Math.min(13,u),h==(t=V(t,u))){t=n;break}}}var d=this._axisBreaks;if(d){var c=this.renderer;A(d.iterator(),function(f){if(f.breakSize>0&&oe(f.startPoint,f.endPoint)>c.minGridDistance)for(var g=f.adjustedMin;g<=f.adjustedMax;){if(g>=f.adjustedStartValue&&g<=f.adjustedEndValue){var m=r.find(function(x){return x.value===g});m.__disabled&&(m.__disabled=!1),e.appendDataItem(m),m.axisBreak=f,m.value!=g&&(m.value=g,m.text=e.formatLabel(g),m.label&&m.label.invalid&&m.label.validate()),e.validateDataElement(m)}g+=f.adjustedStep}})}}},i.prototype.validateDataElement=function(e){s.prototype.validateDataElement.call(this,e),e.itemIndex=this._axisItemCount,this._axisItemCount++;var t=this.renderer,n=e.value,r=e.endValue,a=this.valueToPosition(n);e.position=a;var o=a,l=this.valueToPosition(n+this._step);y(r)&&(l=o=this.valueToPosition(r)),e.point=t.positionToPoint(a);var h=e.tick;h&&!h.disabled&&t.updateTickElement(h,a,o);var p=e.grid;p&&!p.disabled&&t.updateGridElement(p,a,o);var u=e.label;u&&!u.disabled&&t.updateLabelElement(u,a,o);var d=e.axisFill;d&&!d.disabled&&(t.updateFillElement(d,a,l),e.isRange||this.fillRule(e)),e.bullet&&t.updateBullet(e.bullet,a,o);var c=e.mask;c&&t.updateFillElement(c,a,l)},i.prototype.formatLabel=function(e){return this.adjustLabelPrecision&&e!=0?this.numberFormatter.format(e,void 0,this._stepDecimalPlaces):this.numberFormatter.format(e)},Object.defineProperty(i.prototype,"basePoint",{get:function(){var e=this.baseValue,t=this.valueToPosition(e);return this.renderer.positionToPoint(t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"baseValue",{get:function(){var e=this._baseValue;return this.logarithmic&&(e=this.min),this._adapterO?this._adapterO.apply("baseValue",e):e},set:function(e){this._baseValue=e,this.invalidateLayout(),this.invalidateSeries()},enumerable:!0,configurable:!0}),i.prototype.anyToPosition=function(e){return this.valueToPosition(e)},i.prototype.valueToPoint=function(e){var t=this.valueToPosition(e),n=this.renderer.positionToPoint(t),r=this.renderer.positionToAngle(t);return{x:n.x,y:n.y,angle:r}},i.prototype.anyToPoint=function(e){return this.valueToPoint(e)},i.prototype.valueToPosition=function(e){if(y(e)){var t=this.min,n=this.max;if(y(t)&&y(n)){var r=this._difference,a=this._axisBreaks;a&&a.length>0&&rt(a.iterator(),function(h){var p=h.adjustedStartValue,u=h.adjustedEndValue;if(y(p)&&y(u)){if(eu?t+=(u-p)*(1-d):e0&&rt(o.iterator(),function(l){var h=l.startPosition,p=l.endPosition,u=l.adjustedStartValue,d=l.adjustedEndValue;if(y(u)&&y(d)){if(u>n)return!1;if(on({start:u,end:d},{start:t,end:n})){u=q(u,t),d=ie(d,n);var c=l.breakSize;if(r-=(d-u)*(1-c),e>p)t+=(d-u)*(1-c);else if(!(en&&(n=f)}}),this.includeRangesInMinMax&&this.axisRanges.each(function(d){if(!d.ignoreMinMax){var c=ie(d.value,d.endValue),f=q(d.value,d.endValue);(cn||!y(n))&&(n=f)}})),this.logarithmic){var r=this.treatZeroAs;y(r)&&t<=0&&(t=r),t<=0&&this.raiseCriticalError(new Error("Logarithmic value axis can not have values <= 0."),!0)}if(t==0&&n==0&&(n=.9,t=-.9),y(this._minDefined)&&(t=this._minDefined),y(this._maxDefined)&&(n=this._maxDefined),this._adapterO&&(t=this._adapterO.apply("min",t)),this._adapterO&&(n=this._adapterO.apply("max",n)),y(t)&&y(n)){this._minReal=t,this._maxReal=n,t==Number.POSITIVE_INFINITY&&(t=void 0),n==Number.NEGATIVE_INFINITY&&(n=void 0);var a=this.adjustDifference(t,n);if(t=this.fixMin(t),(n=this.fixMax(n))-t<=1/Math.pow(10,15)){if(n-t!=0)this._deltaMinMax=(n-t)/2;else{var o=Math.log(Math.abs(n))*Math.LOG10E,l=Math.pow(10,Math.floor(o));l/=10,this._deltaMinMax=l}t-=this._deltaMinMax,n+=this._deltaMinMax}t-=(n-t)*this.extraMin,n+=(n-t)*this.extraMax;var h=this.strictMinMax;y(this._maxDefined)&&(h=!0);var p=this.adjustMinMax(t,n,a,this._gridCount,h);if(t=p.min,a=(n=p.max)-t,p=this.adjustMinMax(t,n,n-t,this._gridCount,!0),t=p.min,n=p.max,this.strictMinMax&&(t=y(this._minDefined)?this._minDefined:this._minReal,(n=y(this._maxDefined)?this._maxDefined:this._maxReal)-t<=1e-8&&(t-=this._deltaMinMax,n+=this._deltaMinMax),t-=(n-t)*this.extraMin,n+=(n-t)*this.extraMax),this._adapterO&&(t=this._adapterO.apply("min",t)),this._adapterO&&(n=this._adapterO.apply("max",n)),this._step=p.step,y(t)||y(n)||(this.start=0,this.end=1,this.renderer.labels.each(function(d){d.dataItem.text=""})),(this._minAdjusted!=t||this._maxAdjusted!=n)&&y(t)&&y(n)){var u=this._minMaxAnimation;if(this._extremesChanged&&y(this._minAdjusted)&&y(this._maxAdjusted)&&this.inited){if(u&&!u.isFinished()&&this._finalMax==n&&this._finalMin==t)return;this._finalMin=t,this._finalMax=n,(u=this.animateMinMax(t,n))&&!u.isFinished()?(u.events.on("animationprogress",this.validateDataItems,this),u.events.on("animationended",function(){e.series.each(function(d){d.validate()}),e.validateDataItems(),e.handleSelectionExtremesChange()}),this._minMaxAnimation=u):this.series.each(function(d){d.invalidate()}),this.validateDataItems(),this.dispatchImmediately("extremeschanged"),this.handleSelectionExtremesChange()}else{if(u&&!u.isFinished()&&this._finalMax==n&&this._finalMin==t)return;this._minAdjusted=t,this._maxAdjusted=n,this._finalMin=t,this._finalMax=n,this.invalidateDataItems(),this.dispatchImmediately("extremeschanged")}}this._extremesChanged=!1,this._difference=this.adjustDifference(t,n)}},i.prototype.fixMin=function(e){return e},i.prototype.fixMax=function(e){return e},i.prototype.adjustMinMax=function(e,t,n,r,a){r<=1&&(r=1),r=Math.round(r);var o=e,l=t;n===0&&(n=Math.abs(t));var h=Math.log(Math.abs(n))*Math.LOG10E,p=Math.pow(10,Math.floor(h)),u=p/=10;a&&(u=0),this.logarithmic?(e<=0&&(e=this.baseValue),e==1/0&&(e=1),t==-1/0&&(t=10),this.strictMinMax?(this._minDefined>0&&(e=this._minDefined),this._maxDefined):(e=Math.pow(10,Math.floor(Math.log(Math.abs(e))*Math.LOG10E)),t=Math.pow(10,Math.ceil(Math.log(Math.abs(t))*Math.LOG10E)))):(a?(e=Math.floor(e/p)*p,t=Math.ceil(t/p)*p):(e=Math.ceil(e/p)*p-u,t=Math.floor(t/p)*p+u),e<0&&o>=0&&(e=0),t>0&&l<=0&&(t=0)),h=Math.log(Math.abs(n))*Math.LOG10E,p=Math.pow(10,Math.floor(h)),p/=10;var d=Math.ceil(n/r/p)*p,c=Math.pow(10,Math.floor(Math.log(Math.abs(d))*Math.LOG10E)),f=Math.ceil(d/c);f>5?f=10:f<=5&&f>2&&(f=5),d=Math.ceil(d/(c*f))*c*f,this.maxPrecisiono&&(e-=d)}return{min:e,max:t,step:d}},Object.defineProperty(i.prototype,"min",{get:function(){var e=this._minAdjusted;return y(e)||(e=this._minDefined),e},set:function(e){this._minDefined!=e&&(this._minDefined=e,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"minDefined",{get:function(){return this._minDefined},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxDefined",{get:function(){return this._maxDefined},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"extraMin",{get:function(){return this.getPropertyValue("extraMin")},set:function(e){this.setPropertyValue("extraMin",e)&&this.invalidateDataItems()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"extraMax",{get:function(){return this.getPropertyValue("extraMax")},set:function(e){this.setPropertyValue("extraMax",e)&&this.invalidateDataItems()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"step",{get:function(){return this._step},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"max",{get:function(){var e=this._maxAdjusted;return y(e)||(e=this._maxDefined),e},set:function(e){this._maxDefined!=e&&(this._maxDefined=e,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"adjustLabelPrecision",{get:function(){return this.getPropertyValue("adjustLabelPrecision")},set:function(e){this.setPropertyValue("adjustLabelPrecision",e)&&this.invalidate()},enumerable:!0,configurable:!0}),i.prototype.registerSeries=function(e){return new _e([s.prototype.registerSeries.call(this,e),e.events.on("extremeschanged",this.handleExtremesChange,this,!1),e.events.on("selectionextremeschanged",this.handleSelectionExtremesChange,this,!1),this.events.on("extremeschanged",e.invalidate,e,!1)])},i.prototype.handleSelectionExtremesChange=function(){var e,t,n=this,r=!0;if(A(this.series.iterator(),function(c){if(!c.ignoreMinMax&&!c.isHidden&&!c.outOfRange){c.visible&&!c.isHiding&&(r=!1);var f=c.selectionMin(n),g=c.selectionMax(n);y(f)&&(!y(e)||ft)&&(t=g)}}),this.includeRangesInMinMax&&this.axisRanges.each(function(c){if(!c.ignoreMinMax){var f=ie(c.value,c.endValue),g=q(c.value,c.endValue);ft&&(t=g)}}),y(this._minDefined)?e=this.strictMinMax?this._minDefined:this.min:this.strictMinMax&&(e=this._minReal),y(this._maxDefined)?t=this.strictMinMax?this._maxDefined:this.max:this.strictMinMax&&(t=this._maxReal),e==t){e-=this._deltaMinMax,t+=this._deltaMinMax;var a=this.adjustMinMax(e,t,0,this._gridCount,this.strictMinMax);e=a.min,t=a.max}var o=this.adjustDifference(e,t),l=this.adjustMinMax(e,t,o,this._gridCount);e=l.min,t=l.max,e-=(t-e)*this.extraMin,t+=(t-e)*this.extraMax,e=R(e,this.min,this.max),t=R(t,this.min,this.max),o=this.adjustDifference(e,t),l=this.adjustMinMax(e,t,o,this._gridCount,!0),e=l.min,t=l.max,this.strictMinMax&&(e=q(e,this._minDefined),t=ie(t,this._maxDefined));var h=l.step;this.syncWithAxis&&(l=this.syncAxes(e,t,h),e=l.min,t=l.max,this.invalidate()),h=l.step,this._difference=this.adjustDifference(this.min,this.max);var p=this.valueToPosition(e),u=this.valueToPosition(t);r&&!this.syncWithAxis&&(p=0,u=1);var d=0;this.syncWithAxis?(d=5,this.setCache(e+"-"+t,h)):(this._step==h&&this._minZoomed==e&&this._maxZoomed==t||(this._dsc=!0),this._step=h,this._minZoomed=e,this._maxZoomed=t),this.keepSelection||this.zoom({start:p,end:u},!1,!1,d)},Object.defineProperty(i.prototype,"strictMinMax",{get:function(){return this.getPropertyValue("strictMinMax")},set:function(e){this.setPropertyValue("strictMinMax",e)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"logarithmic",{get:function(){return this.getPropertyValue("logarithmic")},set:function(e){this.setPropertyValue("logarithmic",e)&&(this.invalidate(),this.series.each(function(t){t.invalidateDataItems()}))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"keepSelection",{get:function(){return this.getPropertyValue("keepSelection")},set:function(e){this.setPropertyValue("keepSelection",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"includeRangesInMinMax",{get:function(){return this.getPropertyValue("includeRangesInMinMax")},set:function(e){this.setPropertyValue("includeRangesInMinMax",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxPrecision",{get:function(){return this.getPropertyValue("maxPrecision")},set:function(e){this.setPropertyValue("maxPrecision",e)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"extraTooltipPrecision",{get:function(){return this.getPropertyValue("extraTooltipPrecision")},set:function(e){this.setPropertyValue("extraTooltipPrecision",e)&&this.invalidate()},enumerable:!0,configurable:!0}),i.prototype.handleExtremesChange=function(){var e=this;this._extremesChanged=!0,this.getMinMax(),this.ghostLabel&&this.dataItems.each(function(t){t.label&&t.label.pixelWidth>0&&(e.ghostLabel.text=t.label.currentText)})},i.prototype.getX=function(e,t,n,r,a){return this.renderer.positionToPoint(this.getPositionX(e,t,n,r,a)).x},i.prototype.getPositionX=function(e,t,n,r,a){var o=e.getWorkingValue(t);v(r)||(r="valueX");var l=e.getValue(r,"stack");y(o)||(o=this.baseValue,this.logarithmic&&l>0&&(o=0));var h=this.valueToPosition(o+l);return a&&(h=R(h,a.start,a.end)),h},i.prototype.getY=function(e,t,n,r,a){return this.renderer.positionToPoint(this.getPositionY(e,t,n,r,a)).y},i.prototype.getPositionY=function(e,t,n,r,a){var o=e.getWorkingValue(t);v(r)||(r="valueY");var l=e.getValue(r,"stack");y(o)||(o=this.baseValue,this.logarithmic&&l>0&&(o=0));var h=this.valueToPosition(o+l);return a&&(h=R(h,a.start,a.end)),h},i.prototype.getAngle=function(e,t,n,r,a){var o=e.getWorkingValue(t),l=e.getValue(r,"stack");y(o)||(o=this.baseValue);var h=this.valueToPosition(o+l);return a&&(h=R(h,a.start,a.end)),this.positionToAngle(h)},i.prototype.getAnyRangePath=function(e,t,n){var r=this.valueToPosition(e),a=this.valueToPosition(t);return this.getPositionRangePath(r,a)},i.prototype.getTooltipText=function(e){var t=V(this.positionToValue(e),this._stepDecimalPlaces+this.extraTooltipPrecision),n=this.tooltip.numberFormatter.format(t);return this._adapterO?this._adapterO.apply("getTooltipText",n):n},i.prototype.zoomToValues=function(e,t,n,r){var a=(e-this.min)/(this.max-this.min),o=(t-this.min)/(this.max-this.min);this.zoom({start:a,end:o},n,r)},Object.defineProperty(i.prototype,"minZoomed",{get:function(){return this.syncWithAxis?this._minZoomed:q(this.min,this._minZoomed)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxZoomed",{get:function(){return this.syncWithAxis?this._maxZoomed:ie(this.max,this._maxZoomed)},enumerable:!0,configurable:!0}),i.prototype.fixAxisBreaks=function(){var e=this;s.prototype.fixAxisBreaks.call(this);var t=this._axisBreaks;t&&t.length>0&&t.each(function(n){var r=n.adjustedStartValue,a=n.adjustedEndValue,o=a-r,l=Math.ceil(o*n.breakSize)*e._gridCount/(e.max-e.min),h=e.adjustMinMax(r,a,o,l,!0);n.adjustedStep=h.step,n.adjustedMin=h.min,n.adjustedMax=h.max}),this._difference=this.adjustDifference(this.min,this.max)},i.prototype.getPositionLabel=function(e){var t=this.positionToValue(e);return this.numberFormatter.format(t)},i.prototype.showTooltipAt=function(e){this.showTooltipAtPosition(this.valueToPosition(e))},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.min=e.min,this.max=e.max,this.calculateTotals=e.calculateTotals,this._baseValue=e.baseValue},Object.defineProperty(i.prototype,"syncWithAxis",{get:function(){return this.getPropertyValue("syncWithAxis")},set:function(e){var t=this;this.setPropertyValue("syncWithAxis",e,!0)&&e&&(this._disposers.push(e.events.on("extremeschanged",this.handleSelectionExtremesChange,this,!1)),this._disposers.push(e.events.on("selectionextremeschanged",this.handleSelectionExtremesChange,this,!1)),this._disposers.push(e.events.on("startendchanged",this.handleSelectionExtremesChange,this,!1)),this.events.on("shown",this.handleSelectionExtremesChange,this,!1),this.events.on("maxsizechanged",function(){t.clearCache(),t._disposers.push(_.events.once("exitframe",function(){t.handleSelectionExtremesChange()}))},this,!1))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"treatZeroAs",{get:function(){return this.getPropertyValue("treatZeroAs")},set:function(e){this.setPropertyValue("treatZeroAs",e,!0)},enumerable:!0,configurable:!0}),i.prototype.syncAxes=function(e,t,n){var r=this.syncWithAxis;if(r){y(e)||(e=this.min),y(t)||(t=this.max),y(n)||(n=this._step);var a=Math.round((r.maxZoomed-r.minZoomed)/r.step),o=Math.round((t-e)/n);if(y(a)&&y(o))for(var l=!1,h=0,p=.01*(t-e),u=e,d=t,c=n;l!=1;)if(l=this.checkSync(u,d,c,a),++h>1e3&&(l=!0),l)e=u,t=d,n=c;else{h/3==Math.round(h/3)?(u=e-p*h,e>=0&&u<0&&(u=0)):(d=t+p*h)<=0&&d>0&&(d=0);var f=this.adjustMinMax(u,d,d-u,this._gridCount,!0);u=f.min,d=f.max,c=f.step}}return{min:e,max:t,step:n}},i.prototype.checkSync=function(e,t,n,r){for(var a=(t-e)/n,o=1;ox?(p.startIndex=0,p.endIndex=0,p.outOfRange=!0):(p.outOfRange=!1,p.startIndex=g,p.endIndex=S),!n&&p.dataRangeInvalid&&p.validateDataRange()}})},i.prototype.findFirst=function(e,t,n){var r=e.index;if(r>0){var a=e.component.dataItems.getIndex(r-1),o=a[n];return!o||o.getTime()e._minDifference[n.uid]&&(t=e._minDifference[n.uid])}),t!=Number.MAX_VALUE&&t!=0||(t=Se("day")),t},enumerable:!0,configurable:!0}),i.prototype.seriesDataChangeUpdate=function(e){this._minDifference[e.uid]=Number.MAX_VALUE},i.prototype.postProcessSeriesDataItems=function(e){var t=this;this._firstWeekDay=this.getFirstWeekDay(),e?this.seriesGroupUpdate(e):this.series.each(function(n){t.seriesGroupUpdate(n)}),this.addEmptyUnitsBreaks()},i.prototype.seriesGroupUpdate=function(e){var t=this;JSON.stringify(e._baseInterval[this.uid])!=JSON.stringify(this.mainBaseInterval)&&(e._baseInterval[this.uid]=this.mainBaseInterval,e.mainDataSet.each(function(n){t.postProcessSeriesDataItem(n)}),this.groupData&&this.groupSeriesData(e))},i.prototype.groupSeriesData=function(e){var t=this;if(e.baseAxis==this&&e.dataItems.length>0&&!e.dataGrouped){e.bulletsContainer.removeChildren();var n=[],r=this.mainBaseInterval,a=Se(r.timeUnit,r.count);this.groupIntervals.each(function(o){var l=Se(o.timeUnit,o.count);(l>a&&lk||!y(D.low))&&(D.low=k),(D.high0&&t.each(function(n){var r=Math.ceil(e._gridCount*(Math.min(e.end,n.endPosition)-Math.max(e.start,n.startPosition))/(e.end-e.start));n.gridInterval=e.chooseInterval(0,n.adjustedEndValue-n.adjustedStartValue,r);var a=Be(new Date(n.adjustedStartValue),n.gridInterval.timeUnit,n.gridInterval.count,e._firstWeekDay,e._df.utc,void 0,e._df.timezoneMinutes,e._df.timezone);a.getTime()>n.startDate.getTime()&&Ze(a,n.gridInterval.timeUnit,n.gridInterval.count,e._df.utc),n.gridDate=a})},i.prototype.getFirstWeekDay=function(){return this._df?this._df.firstDayOfWeek:1},i.prototype.getGridDate=function(e,t){var n=this._gridInterval.timeUnit,r=this._gridInterval.count;Be(e,n,1,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone);var a=e.getTime(),o=bi(e),l=Ze(o,n,t,this._df.utc).getTime(),h=this.isInBreak(l);h&&h.endDate&&(Be(o=new Date(h.endDate.getTime()),n,r,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),o.getTime()0){var d=u.gridInterval.timeUnit,c=u.gridInterval.count;if(oe(u.startPoint,u.endPoint)>4*p.minGridDistance)for(var f,g=u.gridDate.getTime(),m=0,x=function(){var b=bi(u.gridDate);if(g=Ze(b,d,c*m,e._df.utc).getTime(),m++,g>u.adjustedStartValue&&gthis.baseInterval.count&&(o=a+(o-a)/(this._gridInterval.count/this.baseInterval.count)),e.position=a;var h=e.tick;h&&!h.disabled&&t.updateTickElement(h,a,o);var p=e.grid;p&&!p.disabled&&t.updateGridElement(p,a,o);var u=e.axisFill;u&&!u.disabled&&(t.updateFillElement(u,a,l),e.isRange||this.fillRule(e));var d=e.mask;d&&t.updateFillElement(d,a,o),e.bullet&&t.updateBullet(e.bullet,a,o);var c=e.label;if(c&&!c.disabled){var f=c.location;f==0&&(f=this._gridInterval.count!=1||this._gridInterval.timeUnit=="week"||e.isRange?0:.5),t.updateLabelElement(c,a,o,f)}}},Object.defineProperty(i.prototype,"baseDuration",{get:function(){return Se(this.baseInterval.timeUnit,this.baseInterval.count)},enumerable:!0,configurable:!0}),i.prototype.adjustMinMax=function(e,t){return{min:e,max:t,step:this.baseDuration}},i.prototype.fixMin=function(e){var t=this.baseInterval,n=Be(new Date(e),t.timeUnit,t.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone).getTime();return n+(Ze(new Date(n),t.timeUnit,t.count,this._df.utc).getTime()-n)*this.startLocation},i.prototype.fixMax=function(e){var t=this.baseInterval,n=Be(new Date(e),t.timeUnit,t.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone).getTime();return n+(Ze(new Date(n),t.timeUnit,t.count,this._df.utc).getTime()-n)*this.endLocation},i.prototype.chooseInterval=function(e,t,n,r){r||(r=this.gridIntervals);var a=r.getIndex(e),o=Se(a.timeUnit,a.count),l=r.length-1;if(e>=l)return ct({},r.getIndex(l));var h=Math.ceil(t/o);return t0?ct({},r.getIndex(e-1)):h<=n?ct({},r.getIndex(e)):e+1p&&(this._minDifference[r.uid]=p)}var u=n-h;u>0&&this._minDifference[r.uid]>u&&(this._minDifference[r.uid]=u),this._prevSeriesTime[r.uid]=n,r._baseInterval[this.uid]&&this.postProcessSeriesDataItem(e)}},i.prototype.updateAxisBySeries=function(){s.prototype.updateAxisBySeries.call(this);var e=this.chooseInterval(0,this.minDifference,1);this.minDifference>=Se("day",27)&&e.timeUnit=="week"&&(e.timeUnit="month",e.count=1),e.timeUnit=="month"&&(this.minDifference>=Se("day",58)&&e.count==1&&(e.count=2),this.minDifference>=Se("day",87)&&e.count==2&&(e.count=3),this.minDifference>=Se("day",174)&&e.count==5&&(e.count=6)),this.minDifference>=Se("hour",23)&&e.timeUnit=="hour"&&(e.timeUnit="day",e.count=1),this.minDifference>=Se("week",1)-Se("hour",1)&&e.timeUnit=="day"&&(e.timeUnit="week",e.count=1),this.minDifference>=Se("year",1)-Se("day",1.01)&&e.timeUnit=="month"&&(e.timeUnit="year",e.count=1),this._baseIntervalReal=e,this._mainBaseInterval=e},Object.defineProperty(i.prototype,"baseInterval",{get:function(){return this._groupInterval?this._groupInterval:this._baseInterval?this._baseInterval:this._baseIntervalReal},set:function(e){JSON.stringify(this._baseInterval)!=JSON.stringify(e)&&(this._baseInterval=e,this._mainBaseInterval=e,y(e.count)||(e.count=1),this.invalidate(),this.postProcessSeriesDataItems())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"mainBaseInterval",{get:function(){return this._baseInterval?this._baseInterval:this._mainBaseInterval?this._mainBaseInterval:this._baseIntervalReal},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"skipEmptyPeriods",{get:function(){return this.getPropertyValue("skipEmptyPeriods")},set:function(e){if(e){var t=this.axisBreaks.template;t.startLine.disabled=!0,t.endLine.disabled=!0,t.fillShape.disabled=!0,t.breakSize=0}else this._gapBreaks&&(this.axisBreaks.clear(),this._gapBreaks=!1);this.setPropertyValue("skipEmptyPeriods",e)&&(this.invalidate(),this.postProcessSeriesDataItems(),this.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltipDateFormat",{get:function(){return this.getPropertyValue("tooltipDateFormat")},set:function(e){this.setPropertyValue("tooltipDateFormat",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"markUnitChange",{get:function(){return this.getPropertyValue("markUnitChange")},set:function(e){this.setPropertyValue("markUnitChange",e)&&this.invalidateData()},enumerable:!0,configurable:!0}),i.prototype.getTooltipText=function(e){var t,n=this.positionToDate(e);if(n=Be(n,this.baseInterval.timeUnit,this.baseInterval.count,this._firstWeekDay,this._df.utc,new Date(this.min),this._df.timezoneMinutes,this._df.timezone),this.tooltipDate=n,v(this.tooltipDateFormat))t=this._df.format(n,this.tooltipDateFormat,["day","month","week","year"].indexOf(this.baseInterval.timeUnit)==-1);else{var r=this.dateFormats.getKey(this.baseInterval.timeUnit);t=r?this._df.format(n,r):this.getPositionLabel(e)}return this._adapterO?this._adapterO.apply("getTooltipText",t):t},i.prototype.roundPosition=function(e,t,n){var r=this.baseInterval,a=r.timeUnit,o=r.count,l=this.positionToDate(e);if(Be(l,a,o,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),t>0&&Ze(l,a,t*o,this._df.utc),n>0&&n<1&&l.setTime(l.getTime()+this.baseDuration*n),this.isInBreak(l.getTime()))for(;l.getTime()o.getTime()&&Math.abs(l.getTime()-a)g&&(g=S)}),this.groupMin[c]=f,this.groupMax[c]=g),e=R(e,f,g),t=R(t,f,g),a&&(h&&(e=R(e=t-l,f,g)),p&&(t=R(t=e+l,f,g))),m=(e-f)/(g-f),x=(t-f)/(g-f),this.zoom({start:m,end:x},n,r)}}else{var m=this.valueToPosition(e),x=this.valueToPosition(t);this.zoom({start:m,end:x},n,r)}},i.prototype.asIs=function(e){return e=="baseInterval"||s.prototype.asIs.call(this,e)},i.prototype.copyFrom=function(e){var t=this;s.prototype.copyFrom.call(this,e),this.dateFormats=e.dateFormats,this.periodChangeDateFormats=e.periodChangeDateFormats,this.groupIntervals.clear(),e.groupIntervals.each(function(n){t.groupIntervals.push(ct({},n))}),this.gridIntervals.clear(),e.gridIntervals.each(function(n){t.gridIntervals.push(ct({},n))}),e._baseInterval&&(this.baseInterval=e._baseInterval)},i.prototype.showTooltipAtPosition=function(e,t){var n=this;if(t||(e=this.toAxisPosition(e)),this.snapTooltip){var r,a=this.positionToDate(e).getTime();if(this.series.each(function(h){if(h.baseAxis==n){var p=n.getSeriesDataItem(h,e,!0);if(p){var u=void 0;h.xAxis==n&&(u=p.dateX),h.yAxis==n&&(u=p.dateY),r?Math.abs(r.getTime()-a)>Math.abs(u.getTime()-a)&&(r=u):r=u}}}),r){var o=r.getTime();r=Be(new Date(o),this.baseInterval.timeUnit,this.baseInterval.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),o=r.getTime();var l=this.renderer.tooltipLocation;l==0&&(l=1e-4),r=new Date(r.getTime()+this.baseDuration*l),e=this.dateToPosition(r),this.chart.cursor&&this.chart.cursor.snapToSeries||this.series.each(function(h){var p=h.dataItemsByAxis.getKey(n.uid).getKey(o+h.currentDataSetId),u=h.showTooltipAtDataItem(p);u?n.chart._seriesPoints.push({series:h,point:u}):(h.tooltipText||h.tooltipHTML)&&h.hideTooltip()})}}s.prototype.showTooltipAtPosition.call(this,e,!0)},Object.defineProperty(i.prototype,"snapTooltip",{get:function(){return this.getPropertyValue("snapTooltip")},set:function(e){this.setPropertyValue("snapTooltip",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"groupData",{get:function(){return this.getPropertyValue("groupData")},set:function(e){var t=this;this.setPropertyValue("groupData",e)&&(this.series.each(function(n){n.setDataSet(""),e&&!n.dataGrouped&&n.inited&&(n._baseInterval[t.uid]=t.mainBaseInterval,t.groupSeriesData(n))}),this._currentDataSetId="",this._groupInterval=void 0,this.invalidate(),this.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"groupInterval",{get:function(){return this.getPropertyValue("groupInterval")},set:function(e){this.setPropertyValue("groupInterval",e)&&(this.invalidate(),this.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"groupCount",{get:function(){return this.getPropertyValue("groupCount")},set:function(e){this.setPropertyValue("groupCount",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"timezoneOffset",{get:function(){return this.getPropertyValue("timezoneOffset")},set:function(e){this.setPropertyValue("timezoneOffset",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"timezone",{get:function(){return this.getPropertyValue("timezone")},set:function(e){this.setPropertyValue("timezone",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"gridInterval",{get:function(){return this._gridInterval},enumerable:!0,configurable:!0}),i.prototype.makeGap=function(e,t){var n=e.component;if(e&&t&&!n.connect&&y(n.autoGapCount)&&n.baseAxis==this){var r=e.dates["date"+this.axisLetter],a=t.dates["date"+this.axisLetter];if(r&&a&&r.getTime()-a.getTime()>n.autoGapCount*this.baseDuration)return!0}return!1},Object.defineProperty(i.prototype,"baseValue",{get:function(){return this.min},enumerable:!0,configurable:!0}),i}(ee);_.registeredClasses.DateAxis=Pe,_.registeredClasses.DateAxisDataItem=fo;var Mt=function(s){function i(){var e=s.call(this)||this;return e.className="AxisRendererX",e.minGridDistance=120,e.opposite=!1,e.rotation=0,e.width=F(100),e.labels.template.horizontalCenter="middle",e.applyTheme(),e}return w(i,s),i.prototype.setAxis=function(e){s.prototype.setAxis.call(this,e),e.layout="vertical"},i.prototype.updateGridContainer=function(){var e=this.axis;if(e){var t=this.gridContainer;t.x=e.pixelX,t.width=e.axisLength}},i.prototype.processRenderer=function(){s.prototype.processRenderer.call(this);var e=this.axis;if(e){e.width instanceof te||(e.width=F(100)),this.line;var t=e.title;t.rotation=0,t.align="center",this.opposite?(this.line.toFront(),t.toBack()):(t.toFront(),this.toBack(),this.line.toBack())}},i.prototype.updateTooltip=function(){if(this.axis){var e=1e3,t=this.line.pixelX,n=this.line.pixelY,r=this.axisLength,a=e;this.opposite?this.inside||(n=-1e3,a=e):this.inside&&(n=-1e3,a=e),this.axis.updateTooltip("vertical",{x:t,y:n,width:r,height:a})}},i.prototype.updateLabelElement=function(e,t,n,r){v(r)||(r=e.location),t+=(n-t)*r;var a=this.positionToPoint(t);e.isMeasured=!e.inside;var o,l=0,h=this.gridContainer.maxHeight;this.opposite?(e.inside?(o="top",e.valign=="bottom"&&(l=h,o="bottom"),e.valign=="middle"&&(l=h/2,o="middle")):o="bottom",a.y=l):(e.inside?(o="bottom",e.valign=="top"&&(l=-h,o="top"),e.valign=="middle"&&(l=-h/2,o="middle")):o="top",a.y+=l),e.rotation==0&&(e.verticalCenter=o),this.positionItem(e,a),this.toggleVisibility(e,t,this.minLabelPosition,this.maxLabelPosition)},Object.defineProperty(i.prototype,"axisLength",{get:function(){var e=this.axis;return e.measuredWidth-e.pixelPaddingRight-e.pixelPaddingLeft||0},enumerable:!0,configurable:!0}),i.prototype.positionToPoint=function(e,t){return{x:this.positionToCoordinate(e),y:0}},i.prototype.pointToPosition=function(e){return this.coordinateToPosition(e.x,e.y)},i.prototype.getPositionRangePath=function(e,t){var n=R(this.positionToCoordinate(e),0,this.axisLength),r=R(this.positionToCoordinate(t),0,this.axisLength),a=Math.abs(r-n),o=this.getHeight();return Yt({x:Math.min(n,r),y:0,width:a,height:o},!0)},i.prototype.updateBreakElement=function(e){s.prototype.updateBreakElement.call(this,e);var t=e.startLine,n=e.endLine,r=e.fillShape,a=e.startPoint,o=e.endPoint,l=e.pixelMarginLeft,h=this.getHeight()-e.pixelMarginTop-e.pixelMarginBottom;a.x=R(a.x,-1,this.axisLength+1),o.x=R(o.x,-1,this.axisLength+1),a.x==o.x&&(a.x<0||a.x>this.axisLength)?e.fillShape.__disabled=!0:e.fillShape.__disabled=!1,t.y=l,t.width=0,t.height=h,n.y=l,n.width=0,n.height=h,r.height=h,r.width=Math.abs(o.x-a.x),r.y=l,r.x=a.x},i.prototype.updateGridElement=function(e,t,n){t+=(n-t)*e.location;var r=this.positionToPoint(t);e.path=E({x:0,y:0})+T({x:0,y:this.getHeight()}),this.positionItem(e,r),this.toggleVisibility(e,t,0,1)},i.prototype.updateTickElement=function(e,t,n){t+=(n-t)*e.location;var r=this.positionToPoint(t),a=e.length;r.y=Qe({x:0,y:this.line.pixelY},this.line.parent,this.gridContainer).y,this.opposite?a*=e.inside?1:-1:a*=e.inside?-1:1,e.path=E({x:0,y:0})+T({x:0,y:a}),this.positionItem(e,r),this.toggleVisibility(e,t,0,1)},i.prototype.updateAxisLine=function(){this.line.path=E({x:0,y:0})+T({x:this.axisLength,y:0})},i.prototype.updateBaseGridElement=function(){s.prototype.updateBaseGridElement.call(this);var e=this.axis,t=this.getHeight(),n=this.axisLength,r=this.baseGrid,a=e.basePoint.x;if(a<-.2||a>n+.2)r.hide(0);else{var o=Qe({x:0,y:0},this.gridContainer,r.parent).y;r.path=E({x:0,y:0})+T({x:0,y:t}),r.moveTo({x:a,y:o}),r.show(0)}},i.prototype.createBreakSprites=function(e){e.startLine=new si,e.endLine=new si;var t=new Ja;t.setWavedSides(!1,!0,!1,!0),e.fillShape=t},i.prototype.toAxisPosition=function(e){var t=e,n=this.axis;if(n){var r=n.relativePositionSprite,a=n.pixelX;if(r?a=Qe({x:this.pixelX,y:0},this.parent,r).x:r=n.parent,r)return(t-a/r.innerWidth)/(n.axisLength/r.innerWidth)}return e},i.prototype.updateBullet=function(e,t,n){var r=.5;e instanceof tn&&(r=e.location),t+=(n-t)*r;var a=this.positionToPoint(t);a.y=Qe({x:0,y:this.line.pixelY},this.line.parent,this.gridContainer).y,this.positionItem(e,a),this.toggleVisibility(e,t,0,1)},i}(Kn);_.registeredClasses.AxisRendererX=Mt,Ne.push({relevant:Ue.heightXS,state:function(s,i){if(s instanceof Mt){var e=s.states.create(i);return e.properties.inside=!0,e.properties.maxLabelPosition=.9,e.properties.minLabelPosition=.1,e}return null}}),Ne.push({relevant:Ue.heightXXS,state:function(s,i){if(s instanceof Mt){var e=s.states.create(i);return e.properties.disabled=!0,e}return null}});var go=function(s){function i(){var e=s.call(this)||this;return e.className="CategoryAxisBreak",e.properties.startLocation=.5,e.properties.endLocation=.5,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"startPosition",{get:function(){if(this.axis)return this.axis.indexToPosition(this.adjustedStartValue,this.startLocation)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endPosition",{get:function(){if(this.axis)return this.axis.indexToPosition(this.adjustedEndValue,this.endLocation)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startCategory",{get:function(){return this.getPropertyValue("startCategory")},set:function(e){this.setPropertyValue("startCategory",e)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endCategory",{get:function(){return this.getPropertyValue("endCategory")},set:function(e){this.setPropertyValue("endCategory",e)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startValue",{get:function(){var e=this.getPropertyValue("startCategory");return e?this.axis.categoryToIndex(e):this.getPropertyValue("startValue")},set:function(e){this.setPropertyValue("startValue",e)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endValue",{get:function(){var e=this.getPropertyValue("endCategory");return e?this.axis.categoryToIndex(e):this.getPropertyValue("endValue")},set:function(e){this.setPropertyValue("endValue",e)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startLocation",{get:function(){return this.getPropertyValue("startLocation")},set:function(e){this.setPropertyValue("startLocation",e)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endLocation",{get:function(){return this.getPropertyValue("endLocation")},set:function(e){this.setPropertyValue("endLocation",e)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),i}(Un);_.registeredClasses.CategoryAxisBreak=go;var yo=function(s){function i(){var e=s.call(this)||this;return e.seriesDataItems={},e.className="CategoryAxisDataItem",e.text="{category}",e.locations.category=0,e.locations.endCategory=1,e.deltaPosition=0,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"category",{get:function(){return this._adapterO&&this._adapterO.isEnabled("category")?this._adapterO.apply("category",this.properties.category):this.properties.category},set:function(e){var t=this.properties.category;this.setProperty("category",e),v(t)&&t!=e&&this.component&&this.component.validateDataElement(this)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endCategory",{get:function(){return this.properties.endCategory},set:function(e){this.setProperty("endCategory",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"deltaPosition",{get:function(){return this.properties.deltaCoordinate},set:function(e){e!=this.properties.deltaCoordinate&&(this.setProperty("deltaCoordinate",e),this.component&&(this.component.invalidateDataItems(),this.component.invalidateSeries()))},enumerable:!0,configurable:!0}),i}(Ji),Ve=function(s){function i(){var e=s.call(this)||this;e.dataItemsByCategory=new me,e.className="CategoryAxis",e.axisFieldName="category",e._lastDataItem=e.createDataItem(),e._lastDataItem.component=e,e._disposers.push(e._lastDataItem),e.applyTheme();var t=e.dataItemsByCategory;return e.addDisposer(e.mainDataSet.events.on("removed",function(n){t.removeKey(n.oldValue.category)})),e}return w(i,s),i.prototype.createDataItem=function(){return new yo},i.prototype.createAxisBreak=function(){return new go},i.prototype.processSeriesDataItem=function(e,t){s.prototype.processSeriesDataItem.call(this,e,t);var n=e["category"+this.axisLetter];if(v(n)){var r=this.dataItemsByCategory.getKey(n);if(r){var a=e.component.uid,o=r.seriesDataItems[a];o||(o=[],r.seriesDataItems[a]=o),o.push(e)}}else e.component.dataItems.remove(e)},i.prototype.validateDataRange=function(){var e=this;s.prototype.validateDataRange.call(this),A(this._series.iterator(),function(t){if(t.xAxis instanceof i&&t.yAxis instanceof i)t.invalidateDataRange();else{var n=e.positionToIndex(e.start),r=e.positionToIndex(e.end);r>=e.dataItems.length&&r--;for(var a=t.uid,o=void 0,l=void 0,h=n;h<=r;h++){var p=e.dataItems.getIndex(h);if(p){var u=p.seriesDataItems[a];if(u)for(var d=0;dl)&&(l=f)}}}}y(o)?t.startIndex=o:t.start=e.start,y(l)?t.endIndex=l+1:t.end=e.end,e._axisBreaks&&e._axisBreaks.length>0&&t.invalidateDataRange()}})},i.prototype.validate=function(){var e=this;s.prototype.validate.call(this);var t=this.dataItems.length,n=R(Math.floor(this.start*t-1),0,t),r=R(Math.ceil(this.end*t),0,t);this.renderer.invalid&&this.renderer.validate();var a=this.renderer.axisLength/Math.max(this.renderer.minGridDistance,1/Number.MAX_SAFE_INTEGER),o=Math.min(this.dataItems.length,Math.ceil((r-n)/a));if(this._startIndex=Math.floor(n/o)*o,this._endIndex=Math.ceil(this.end*t),this.fixAxisBreaks(),this._startIndex==this._endIndex&&this._endIndex++,this._frequency=o,!(this.axisLength<=0)){this.maxZoomFactor=this.dataItems.length,this.dataItems.length<=0&&(this.maxZoomFactor=1),this.resetIterators(),n=q(0,this._startIndex-this._frequency),r=ie(this.dataItems.length,this._endIndex+this._frequency);for(var l=0,h=0;h0)for(g=c;g<=f;g+=m){var b;(b=e.dataItems.getIndex(g)).__disabled=!1,e.appendDataItem(b),e.validateDataElement(b,x),x++}}}),this.validateBreaks(),this.validateAxisRanges(),this.ghostLabel.invalidate(),this.renderer.invalidateLayout()}},i.prototype.validateDataElement=function(e,t,n){s.prototype.validateDataElement.call(this,e),e.itemIndex=this._axisItemCount,this._axisItemCount++;var r=this.renderer;y(n)||(n=this.categoryToIndex(e.category));var a=this.categoryToIndex(e.endCategory);y(a)||(a=n);var o,l,h,p=this.indexToPosition(n,e.locations.category),u=this.indexToPosition(a,e.locations.endCategory);e.position=p,e.isRange&&(o=a,l=this.indexToPosition(n,e.locations.category),h=this.indexToPosition(o,e.locations.endCategory)),e.point=r.positionToPoint(p);var d=e.tick;d&&!d.disabled&&r.updateTickElement(d,p,u);var c=e.grid;c&&!c.disabled&&r.updateGridElement(c,p,u);var f=e.label;f&&!f.disabled&&(e.isRange&&f.text!=null||(e.text=e.text),r.updateLabelElement(f,p,u),(r instanceof mt&&e.label.measuredWidth>this.ghostLabel.measuredWidth||r instanceof Mt&&e.label.measuredHeight>this.ghostLabel.measuredHeight)&&(e.label.html?this.ghostLabel.html=e.label.currentText:this.ghostLabel.text=e.label.currentText));var g=e.axisFill;g&&!g.disabled&&(e.isRange||(o=n+this._frequency,l=this.indexToPosition(n,g.location),h=this.indexToPosition(o,g.location)),r.updateFillElement(g,l,h),e.isRange||this.fillRule(e,t)),e.bullet&&r.updateBullet(e.bullet,p,u);var m=e.mask;m&&r.updateFillElement(m,l,h)},i.prototype.disposeData=function(){this.dataItemsByCategory.clear(),s.prototype.disposeData.call(this)},i.prototype.processDataItem=function(e,t){e&&(s.prototype.processDataItem.call(this,e,t),v(e.category)&&this.dataItemsByCategory.setKey(e.category,e))},i.prototype.getDataItem=function(e){var t=e[this.dataFields.category];if(v(t))return this.dataItemsByCategory.getKey(t)||this.dataItems.create()},i.prototype.indexToPosition=function(e,t){y(t)||(t=.5);var n=this.startIndex,r=this.endIndex,a=this.adjustDifference(n,r),o=this.startLocation;a-=o,a-=1-this.endLocation,this._axisBreaks&&rt(this._axisBreaks.iterator(),function(p){var u=p.adjustedStartValue,d=p.adjustedEndValue;if(ed?n+=(d-u)*(1-c):e=0;n--){var r=e.dataItems.getIndex(n);if(e.xAxis==this&&r.categoryX==t||e.yAxis==this&&r.categoryY==t)return r}},i.prototype.getSeriesDataItemByCategory=function(e,t){var n,r=this;return t.dataItems.each(function(a){t.xAxis==r?a.categoryX==e&&(n=a):t.yAxis==r&&a.categoryY==e&&(n=a)}),n},i.prototype.getSeriesDataItem=function(e,t,n){var r=this;if(y(t)){var a=this.positionToIndex(t);a>=this.dataItems.length&&a--;var o=this.dataItems.getIndex(a);if(o){var l,h=o.category,p=e.dataItems.getIndex(a);return p&&(e.xAxis==this&&p.categoryX==h||e.yAxis==this&&p.categoryY==h)?p:(e.dataItems.each(function(u){e.xAxis==r&&u.categoryX==h&&(l||(l=u),Math.abs(a-l.index)>Math.abs(a-u.index)&&(l=u)),e.yAxis==r&&u.categoryY==h&&(l||(l=u),Math.abs(a-l.index)>Math.abs(a-u.index)&&(l=u))}),l)}}},i.prototype.getX=function(e,t,n,r,a){var o=this.getPositionX(e,t,n,r,a);return Fe(o)?this.basePoint.x:this.renderer.positionToPoint(o).x},i.prototype.getPositionX=function(e,t,n,r,a){var o;return v(t)&&(o=this.categoryToPosition(e.categories[t],n)),a&&(o=R(o,a.start,a.end)),o},i.prototype.getY=function(e,t,n,r,a){var o=this.getPositionY(e,t,n,r,a);return Fe(o)?this.basePoint.y:this.renderer.positionToPoint(o).y},i.prototype.getPositionY=function(e,t,n,r,a){var o;return v(t)&&(o=this.categoryToPosition(e.categories[t],n)),a&&(o=R(o,a.start,a.end)),o},i.prototype.getAngle=function(e,t,n,r,a){var o=this.categoryToPosition(e.categories[t],n);return a&&(o=R(o,a.start,a.end)),this.positionToAngle(o)},i.prototype.getCellStartPosition=function(e){return this.roundPosition(e,0)},i.prototype.getCellEndPosition=function(e){return this.roundPosition(e,1)},i.prototype.getTooltipText=function(e){var t=this.dataItems.getIndex(this.positionToIndex(e));if(t)return this.tooltipDataItem=t,this.tooltip.dataItem=t,this.tooltipText?this.tooltipText:this._adapterO?this._adapterO.apply("getTooltipText",t.category):t.category},i.prototype.positionToIndex=function(e){(e=V(e,10))<0&&(e=0),e>1&&(e=1);var t=this.startIndex,n=this.endIndex,r=n-t-this.startLocation-(1-this.endLocation);e+=1/r*this.startLocation;var a=null;return this._axisBreaks&&rt(this._axisBreaks.iterator(),function(o){var l=o.startPosition,h=o.endPosition,p=o.adjustedStartValue,u=o.adjustedEndValue;p=q(p,t),u=ie(u,n);var d=o.breakSize;if(r-=(u-p)*(1-d),e>h)t+=(u-p)*(1-d);else if(!(e=this.dataItems.length&&(a=this.dataItems.length-1),a},i.prototype.positionToCategory=function(e){return this.getPositionLabel(e)},i.prototype.getPositionLabel=function(e){var t=this.dataItems.getIndex(this.positionToIndex(e));if(t)return t.category},Object.defineProperty(i.prototype,"basePoint",{get:function(){return this.renderer.positionToPoint(1)},enumerable:!0,configurable:!0}),i.prototype.initRenderer=function(){s.prototype.initRenderer.call(this),this.renderer.baseGrid.disabled=!0},Object.defineProperty(i.prototype,"frequency",{get:function(){return this._frequency},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sortBySeries",{get:function(){return this.getPropertyValue("sortBySeries")},set:function(e){this.setPropertyValue("sortBySeries",e,!0)},enumerable:!0,configurable:!0}),i.prototype.processConfig=function(e){e&&v(e.sortBySeries)&&J(e.sortBySeries)&&(this.map.hasKey(e.sortBySeries)?e.sortBySeries=this.map.getKey(e.sortBySeries):(this.addDelayedMap("sortBySeries",e.sortBySeries),delete e.sortBySeries)),s.prototype.processConfig.call(this,e)},i}(Gn);_.registeredClasses.CategoryAxis=Ve,_.registeredClasses.CategoryAxisDataItem=yo;var qn=function(s){function i(){var e=s.call(this)||this;return e.className="XYSeriesDataItem",e.values.customValue={},e.values.valueX={stack:0},e.values.valueY={stack:0},e.values.openValueX={},e.values.openValueY={},e.values.dateX={},e.values.dateY={},e.values.openDateX={},e.values.openDateY={},e.setLocation("dateX",.5,0),e.setLocation("dateY",.5,0),e.setLocation("categoryX",.5,0),e.setLocation("categoryY",.5,0),e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"valueX",{get:function(){return this.values.valueX.value},set:function(e){this.setValue("valueX",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"customValue",{get:function(){return this.values.customValue.value},set:function(e){this.setValue("customValue",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"valueY",{get:function(){return this.values.valueY.value},set:function(e){this.setValue("valueY",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dateX",{get:function(){return this.getDate("dateX")},set:function(e){this.setDate("dateX",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dateY",{get:function(){return this.getDate("dateY")},set:function(e){this.setDate("dateY",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"categoryX",{get:function(){return this.categories.categoryX},set:function(e){this.setCategory("categoryX",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"categoryY",{get:function(){return this.categories.categoryY},set:function(e){this.setCategory("categoryY",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"openValueX",{get:function(){return this.values.openValueX.value},set:function(e){this.setValue("openValueX",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"openValueY",{get:function(){return this.values.openValueY.value},set:function(e){this.setValue("openValueY",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"openDateX",{get:function(){return this.getDate("openDateX")},set:function(e){this.setDate("openDateX",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"openDateY",{get:function(){return this.getDate("openDateY")},set:function(e){this.setDate("openDateY",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"openCategoryX",{get:function(){return this.categories.openCategoryX},set:function(e){this.setCategory("openCategoryX",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"openCategoryY",{get:function(){return this.categories.openCategoryY},set:function(e){this.setCategory("openCategoryY",e)},enumerable:!0,configurable:!0}),i.prototype.getMin=function(e,t,n){var r,a=this;return y(n)||(n=0),j(e,function(o){var l;l=t?a.getWorkingValue(o):a.getValue(o),((l+=n)r||!y(r))&&(r=l)}),r},i}(Yn),oi=function(s){function i(){var e=s.call(this)||this;return e.groupFields={},e._xAxis=new Me,e._yAxis=new Me,e._xValueFields=[],e._yValueFields=[],e._baseInterval={},e.dataGrouped=!1,e.usesShowFields=!1,e._dataSetChanged=!1,e._maxxX=1e5,e._maxxY=1e5,e._propertiesChanged=!1,e.outOfRange=!1,e.className="XYSeries",e.isMeasured=!1,e.groupFields.valueX="close",e.groupFields.valueY="close",e.groupFields.customValue="close",e.groupFields.openValueX="open",e.groupFields.openValueY="open",e.cursorTooltipEnabled=!0,e.cursorHoverEnabled=!0,e.excludeFromTotal=!1,e.mainContainer.mask=new $,e.mainContainer.mask.setElement(e.paper.add("path")),e.stacked=!1,e.snapTooltip=!1,e._showBullets=!1,e.tooltip.pointerOrientation="horizontal",e.properties.stackToNegative=!0,e.hideTooltipWhileZooming=!0,e.setPropertyValue("maskBullets",!0),e.tooltip.events.on("hidden",function(){e.returnBulletDefaultState()},void 0,!1),e._disposers.push(e._xAxis),e._disposers.push(e._yAxis),e.observe(Ie,function(){e.inited&&(e._propertiesChanged=!0,e.legendDataItem&&(e.legendDataItem.childrenCreated=!1),e.chart&&e.chart.legend&&e.chart.legend.invalidateDataItems(),e.invalidate())},void 0,!1),e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("X/Y Series"))},i.prototype.createDataItem=function(){return new qn},i.prototype.resetExtremes=function(){this._tmin.clear(),this._tmax.clear(),this._smin.clear(),this._smax.clear()},i.prototype.dataChangeUpdate=function(){this.dataGrouped=!1,this._baseInterval={},this._currentDataSetId="",this.resetExtremes(),this.xAxis&&this.xAxis.seriesDataChangeUpdate(this),this.yAxis&&this.yAxis.seriesDataChangeUpdate(this)},i.prototype.validateData=function(){this._baseInterval={};var e=this.dataFields;if(e.valueYShow||e.openValueXShow||e.openValueXShow||e.openValueYShow?this.usesShowFields=!0:this.usesShowFields=!1,this.defineFields(),this.data.length>0&&this.dataChangeUpdate(),s.prototype.validateData.call(this),this.updateItemReaderText(),this.chart&&(!v(this.dataFields[this._xField])||!v(this.dataFields[this._yField])))throw Error('Data fields for series "'+(this.name?this.name:this.uid)+'" are not properly defined.');this.inited&&this.isHidden&&this.hide(0),this.dataGrouped=!1},i.prototype.processDataItem=function(e,t){try{s.prototype.processDataItem.call(this,e,t),this.xAxis.processSeriesDataItem(e,"X"),this.yAxis.processSeriesDataItem(e,"Y"),this.setInitialWorkingValues(e)}catch(n){this._chart&&this._chart.raiseCriticalError(n)}},i.prototype.updateDataItem=function(e){s.prototype.updateDataItem.call(this,e),this.xAxis.processSeriesDataItem(e,"X"),this.yAxis.processSeriesDataItem(e,"Y")},i.prototype.setInitialWorkingValues=function(e){},i.prototype.disposeData=function(){s.prototype.disposeData.call(this);var e=this.xAxis,t=this.yAxis;if(e){var n=this.dataItemsByAxis.getKey(e.uid);n&&n.clear(),e instanceof Ve&&this.clearCatAxis(e)}if(t){var r=this.dataItemsByAxis.getKey(t.uid);r&&r.clear(),t instanceof Ve&&this.clearCatAxis(t)}},i.prototype.clearCatAxis=function(e){var t=this.uid;e.dataItems.each(function(n){n.seriesDataItems[t]&&(n.seriesDataItems[t]=[])})},i.prototype.defineFields=function(){var e=this.xAxis,t=this.yAxis;if(e&&t){var n=e.axisFieldName,r=n+"X",a="open"+wn(n)+"X",o=t.axisFieldName,l=o+"Y",h="open"+wn(o)+"Y";this._xField=r,this._yField=l,this.dataFields[a]&&(this._xOpenField=a),this.dataFields[h]&&(this._yOpenField=h),this.dataFields[h]||this.baseAxis!=t||(this._yOpenField=l),this.dataFields[a]||this.baseAxis!=e||(this._xOpenField=r),this.stacked&&this.baseAxis==e&&(this._xOpenField=r),this.stacked&&this.baseAxis==t&&(this._yOpenField=l),e instanceof Ve&&t instanceof Ve&&(this._yOpenField||(this._yOpenField=l)),this._xValueFields=[],this._yValueFields=[],this.addValueField(e,this._xValueFields,this._xField),this.addValueField(e,this._xValueFields,this._xOpenField),this.addValueField(t,this._yValueFields,this._yField),this.addValueField(t,this._yValueFields,this._yOpenField)}},i.prototype.addValueField=function(e,t,n){e instanceof ee&&v(this.dataFields[n])&&t.indexOf(n)==-1&&t.push(n)},i.prototype.setCategoryAxisField=function(e,t){v(this.dataFields[e])||(this.dataFields[e]=t.dataFields.category)},i.prototype.setDateAxisField=function(e,t){v(this.dataFields[e])||(this.dataFields[e]=t.dataFields.date)},i.prototype.afterDraw=function(){s.prototype.afterDraw.call(this),this.createMask()},i.prototype.createMask=function(){if(this.mainContainer.mask){var e=this.getMaskPath();A(this.axisRanges.iterator(),function(t){t.axisFill.fillPath&&(t.axisFill.validate(),e+=t.axisFill.fillPath)}),this.mainContainer.mask.path=e}},i.prototype.getMaskPath=function(){return this.xAxis&&this.yAxis?Yt({x:0,y:0,width:this.xAxis.axisLength,height:this.yAxis.axisLength}):""},i.prototype.getAxisField=function(e){return e==this.xAxis?this.xField:e==this.yAxis?this.yField:void 0},i.prototype.validateDataItems=function(){var e=this.chart;e&&(this._maxxX=q(1e5,2*e.plotContainer.maxWidth),this._maxxY=q(1e5,2*e.plotContainer.maxHeight));var t=this.xAxis,n=this.yAxis;t&&n&&(t.updateAxisBySeries(),n.updateAxisBySeries()),s.prototype.validateDataItems.call(this),t&&n&&(t.postProcessSeriesDataItems(this),n.postProcessSeriesDataItems(this))},i.prototype.validateDataRange=function(){var e=this.xAxis,t=this.yAxis;e&&t&&(e.dataRangeInvalid&&e.validateDataRange(),t.dataRangeInvalid&&t.validateDataRange()),s.prototype.validateDataRange.call(this)},i.prototype.validate=function(){var e=this.xAxis,t=this.yAxis;if(e&&t){e.invalid&&e.validate(),t.invalid&&t.validate(),this.y=t.pixelY,this.x=e.pixelX,this._showBullets=!0;var n=this.minBulletDistance;y(n)&&this.baseAxis.axisLength/(this.endIndex-this.startIndex)0){var r=this.xAxis,a=this.yAxis;this._prevStartIndex=void 0,this._prevEndIndex=void 0,this._startIndex=void 0,this._endIndex=void 0,this.appeared||this.processValues(!1),r instanceof Pe&&r==this.baseAxis&&(this._tmin.setKey(r.uid,n.getIndex(0).dateX.getTime()),this._tmax.setKey(r.uid,n.getIndex(n.length-1).dateX.getTime()),this.dispatch("extremeschanged")),a instanceof Pe&&a==this.baseAxis&&(this._tmin.setKey(a.uid,n.getIndex(0).dateY.getTime()),this._tmax.setKey(a.uid,n.getIndex(n.length-1).dateY.getTime()),this.dispatch("extremeschanged"))}}return t},i.prototype.processValues=function(e){s.prototype.processValues.call(this,e);var t=this.xAxis,n=this.yAxis;if(t&&n){var r=this.dataItems,a=1/0,o=-1/0,l=1/0,h=-1/0,p=this.startIndex,u=this.endIndex,d=p,c=u;e||(p=0,u=this.dataItems.length);for(var f=p;fh&&(h=x)),this.baseAxis==n&&(mo&&(o=m)))}t.processSeriesDataItems(),n.processSeriesDataItems();var b=t.uid,C=n.uid;if(this.xAxis instanceof ee&&(a==1/0||o==-1/0))return this._smin.setKey(b,void 0),this._smax.setKey(b,void 0),void this.dispatchImmediately("selectionextremeschanged");if(this.yAxis instanceof ee&&(l==1/0||h==-1/0))return this._smin.setKey(C,void 0),this._smax.setKey(C,void 0),void this.dispatchImmediately("selectionextremeschanged");if(!e&&(this._tmin.getKey(b)!=a||this._tmax.getKey(b)!=o||this._tmin.getKey(C)!=l||this._tmax.getKey(C)!=h)){this._tmin.setKey(b,a),this._tmax.setKey(b,o),this._tmin.setKey(C,l),this._tmax.setKey(C,h);var S=this.stackedSeries;S&&(S.isDisposed()?this.stackedSeries=void 0:S.processValues(!1)),this.dispatchImmediately("extremeschanged")}if(p!=d||u!=c)for(a=1/0,o=-1/0,l=1/0,h=-1/0,f=d;fh&&(h=x)),this.baseAxis==n&&(mo&&(o=m)));if(this.xAxis instanceof ee&&(a==1/0||o==-1/0))return this._smin.setKey(b,void 0),this._smax.setKey(b,void 0),void this.dispatchImmediately("selectionextremeschanged");if(this.yAxis instanceof ee&&(l==1/0||h==-1/0))return this._smin.setKey(C,void 0),this._smax.setKey(C,void 0),void this.dispatchImmediately("selectionextremeschanged");if((this._smin.getKey(b)!=a||this._smax.getKey(b)!=o||this._smin.getKey(C)!=l||this._smax.getKey(C)!=h)&&(this._smin.setKey(b,a),this._smax.setKey(b,o),this._smin.setKey(C,l),this._smax.setKey(C,h),this.appeared||this.start!=0||this.end!=1||this.dataItems!=this.mainDataSet)){var P,O,I=!1;n instanceof ee&&!(n instanceof Pe)&&((!y(P=this._tmin.getKey(C))||(this.usesShowFields||this._dataSetChanged||t instanceof Pe&&t.groupData&&this.isShowing)&&lO||this.stackedSeries&&!this.isHidden)&&(this._tmax.setKey(C,h),I=!0)),t instanceof ee&&!(t instanceof Pe)&&((!y(P=this._tmin.getKey(b))||(this.usesShowFields||this._dataSetChanged||n instanceof Pe&&n.groupData&&this.isShowing)&&aO||this.stackedSeries&&!this.isHidden)&&(this._tmax.setKey(b,o),I=!0)),I&&this.dispatchImmediately("extremeschanged"),this.start==0&&this.end==1&&(this._dataSetChanged=!1),this.dispatchImmediately("selectionextremeschanged")}!e&&this.stacked&&this.processValues(!0)}},i.prototype.hideTooltip=function(e){s.prototype.hideTooltip.call(this,e),this.returnBulletDefaultState(),this._prevTooltipDataItem=void 0},i.prototype.showTooltipAtPosition=function(e,t){var n;if(this.visible&&!this.isHiding&&!this.isShowing){var r=this._xAxis.get(),a=this._yAxis.get();r==this.baseAxis&&(n=r.getSeriesDataItem(this,r.toAxisPosition(e),this.snapTooltip)),a==this.baseAxis&&(n=a.getSeriesDataItem(this,a.toAxisPosition(t),this.snapTooltip));var o=this.showTooltipAtDataItem(n);if(o)return o;if(!this.tooltipText&&!this.tooltipHTML)return}this.hideTooltip()},i.prototype.getAdjustedXLocation=function(e,t,n){return e.locations[t]},i.prototype.getAdjustedYLocation=function(e,t,n){return e.locations[t]},i.prototype.showTooltipAtDataItem=function(e){var t,n,r=this.chart.cursor;if(r&&r.hideSeriesTooltipsOnSelection&&r.selection.visible&&r.downPoint)this.hideTooltip();else if(this.returnBulletDefaultState(e),e&&e.visible){if(this.updateLegendValue(e),this.cursorTooltipEnabled){this.tooltipDataItem=e;var a=this.tooltipXField,o=this.tooltipYField;if(v(e[a])&&v(e[o])){var l=this.getPoint(e,a,o,this.getAdjustedXLocation(e,a),this.getAdjustedYLocation(e,o));if(l&&(this.chart.className!="XYChart"||!(l.y<-1||l.y>this.yAxis.pixelHeight+1||l.x<-1||l.x>this.xAxis.pixelWidth+1))){if(this.tooltipX=l.x,this.tooltipY=l.y,this._prevTooltipDataItem!=e&&(this.dispatchImmediately("tooltipshownat",{type:"tooltipshownat",target:this,dataItem:e}),this._prevTooltipDataItem=e),this.cursorHoverEnabled)try{for(var h=nr(e.sprites),p=h.next();!p.done;p=h.next()){var u=p.value;!u.parent.visible||u.isHidden||u.__disabled||u.disabled||u.isHiding||(u.interactions.isRealHover||(u.dispatchImmediately("over"),u.interactions.isRealHover=!0),u.isHover=!0)}}catch(d){t={error:d}}finally{try{p&&!p.done&&(n=h.return)&&n.call(h)}finally{if(t)throw t.error}}return this.showTooltip()?ut({x:l.x,y:l.y},this):void 0}}}}else this.updateLegendValue(e,!0)},i.prototype.returnBulletDefaultState=function(e){var t,n;if(this._prevTooltipDataItem&&this._prevTooltipDataItem!=e)try{for(var r=nr(this._prevTooltipDataItem.sprites),a=r.next();!a.done;a=r.next()){var o=a.value;if(o.isDisposed())this._prevTooltipDataItem=void 0;else{var l=o.interactions.isRealHover;o.isHover=!1,l&&o.dispatchImmediately("out")}}}catch(h){t={error:h}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},i.prototype.shouldCreateBullet=function(e,t){var n=t.xField;v(n)||(n=this.xField);var r=t.yField;if(v(r)||(r=this.yField),this.xAxis instanceof ee&&!e.hasValue([n])||this.yAxis instanceof ee&&!e.hasValue([r]))return!1;if(t.disabled){var a=t.propertyFields.disabled,o=e.dataContext;return!(!o||o[a]!==!1)}return!0},i.prototype.updateTooltip=function(){this.hideTooltipWhileZooming||!this.tooltip||this.tooltip.isHidden||this.isHiding||this.isHidden||!this.tooltipDataItem||this.showTooltipAtDataItem(this.tooltipDataItem)},i.prototype.positionBullet=function(e){s.prototype.positionBullet.call(this,e);var t=e.dataItem,n=e.xField;v(n)||(n=this.xField);var r=e.yField;v(r)||(r=this.yField);var a=this.xAxis,o=this.yAxis;if(a instanceof ee&&!t.hasValue([n])||o instanceof ee&&!t.hasValue([r]))e.visible=!1;else{var l=this.getBulletLocationX(e,n),h=this.getBulletLocationY(e,r);if(this.getPoint(t,n,r,l,h)){var p=this.xOpenField,u=this.yOpenField,d=void 0,c=void 0;if(a instanceof Pe){y(l)||(l=0);var f=void 0,g=t.getWorkingValue(n);if(p?f=t.getWorkingValue(p):a==this.baseAxis&&(f=a.baseValue),y(f)||(f=g),(f+=O=t.getValue("valueX","stack"))==(g+=O)){var m=a.baseInterval,x=a.dateFormatter;f=Be(new Date(f),m.timeUnit,m.count,x.firstDayOfWeek,x.utc,void 0,x.timezoneMinutes,x.timezone).getTime(),g=Ze(new Date(f),m.timeUnit,m.count,x.utc).getTime()}var b=void 0;b=a==this.baseAxis?f+(g-f)*l:f+(g-f)*(1-l),d=a.valueToPosition(b)}else if(a instanceof ee)y(l)||(l=0),f=void 0,g=t.getWorkingValue(n),f=p?t.getWorkingValue(p):a.baseValue,b=(f+=O=t.getValue("valueX","stack"))+((g+=O)-f)*(1-l),d=a.valueToPosition(b);else if(a instanceof Ve){var C=this.getAdjustedXLocation(t,n,e.locationX),S=this.getAdjustedXLocation(t,p,e.locationX);d=a.categoryToPosition(t[n],C);var P=void 0;p&&(P=a.categoryToPosition(t[p],S)),y(P)||(P=1),d=P+(d-P)*l}if(o instanceof Pe)y(h)||(h=0),f=void 0,g=t.getWorkingValue(r),u?f=t.getWorkingValue(u):o==this.baseAxis&&(f=o.baseValue),y(f)||(f=g),(f+=O=t.getValue("valueY","stack"))==(g+=O)&&(m=o.baseInterval,x=o.dateFormatter,f=Be(new Date(f),m.timeUnit,m.count,x.firstDayOfWeek,x.utc,void 0,x.timezoneMinutes,x.timezone).getTime(),g=Ze(new Date(f),m.timeUnit,m.count,x.utc).getTime()),b=void 0,b=o==this.baseAxis?f+(g-f)*h:f+(g-f)*(1-h),c=o.valueToPosition(b);else if(o instanceof ee){var O;y(h)||(h=0),f=void 0,g=t.getWorkingValue(r),f=u?t.getWorkingValue(u):o.baseValue,b=(f+=O=t.getValue("valueY","stack"))+((g+=O)-f)*(1-h),c=o.valueToPosition(b)}else if(o instanceof Ve){c=o.categoryToPosition(t[r],h);var I=this.getAdjustedYLocation(t,r,e.locationY),k=this.getAdjustedYLocation(t,u,e.locationY);c=o.categoryToPosition(t[r],I);var D=void 0;u&&(D=o.categoryToPosition(t[u],k)),y(D)||(D=1),c=D+(c-D)*h}e.visible=!0,this.positionBulletReal(e,d,c)}else e.visible=!1}},i.prototype.positionBulletReal=function(e,t,n){e.x=this.xAxis.renderer.positionToPoint(t,n).x,e.y=this.yAxis.renderer.positionToPoint(n,t).y},i.prototype.getBulletLocationX=function(e,t){var n=e.locationX,r=e.dataItem;return y(n)||(n=r.workingLocations[t]),n},i.prototype.getBulletLocationY=function(e,t){var n=e.locationY,r=e.dataItem;return y(n)||(n=r.workingLocations[t]),n},i.prototype.updateStacking=function(){var e=this;this.invalidateDataItems(),this.chart&&this.chart.series.each(function(t){t.baseAxis==e.baseAxis&&(t.stackedSeries=void 0,t.invalidateDataItems(),t.invalidateProcessedData())})},Object.defineProperty(i.prototype,"stacked",{get:function(){return this.getPropertyValue("stacked")},set:function(e){if(this.setPropertyValue("stacked",e,!0)){this.updateStacking();var t,n=this.xAxis,r=this.yAxis;e||(n!=this.baseAxis&&n instanceof ee&&(t=this.xField),r!=this.baseAxis&&r instanceof ee&&(t=this.yField),t&&this.dataItems.each(function(a){a.setCalculatedValue(t,0,"stack")}))}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"snapTooltip",{get:function(){return this.getPropertyValue("snapTooltip")},set:function(e){this.setPropertyValue("snapTooltip",e)},enumerable:!0,configurable:!0}),i.prototype.show=function(e){var t,n=this;this.isHidden&&(this.appeared&&this.xAxis instanceof Pe&&this.xAxis.groupData&&(this._tmin.setKey(this.yAxis.uid,void 0),this._tmax.setKey(this.yAxis.uid,void 0)),this.appeared&&this.yAxis instanceof Pe&&this.yAxis.groupData&&(this._tmin.setKey(this.xAxis.uid,void 0),this._tmax.setKey(this.xAxis.uid,void 0))),this.xAxis instanceof ee&&this.xAxis!=this.baseAxis&&(t=this._xValueFields),this.yAxis instanceof ee&&this.yAxis!=this.baseAxis&&(t=this._yValueFields);var r,a=this.startIndex,o=this.endIndex,l=0,h=this.defaultState.transitionDuration;y(e)&&(h=e),Z.animationsEnabled||(h=0),A($t(this.dataItems.iterator()),function(u){var d=u[0],c=u[1],f=h;(dn.endIndex+10)&&(f=0,l=0),n.sequencedInterpolation&&f>0&&(l=n.sequencedInterpolationDelay*d+h*(d-a)/(o-a)),r=c.show(f,l,t)}),this.dataSets.each(function(u,d){d!=n.dataItems&&d.each(function(c){c.events.disable(),c.show(0,0,t),c.events.enable()})}),this.mainDataSet!=this.dataItems&&this.mainDataSet.each(function(u){u.events.disable(),u.show(0,0,t),u.events.enable()});var p=s.prototype.show.call(this,e);return r&&!r.isFinished()&&(p=r),this.hidden&&(this.dispatchImmediately("selectionextremeschanged"),this.hidden=!1),p},i.prototype.hide=function(e){var t,n,r=this,a=this.xAxis;a instanceof ee&&a!=this.baseAxis&&(t=this._xValueFields,n=this.stacked||a.minZoomeda.baseValue||this.stackedSeries?a.baseValue:a.min);var o=this.yAxis;o instanceof ee&&o!=this.baseAxis&&(t=this._yValueFields,n=this.stacked||o.minZoomedo.baseValue||this.stackedSeries?o.baseValue:o.min);var l=this.startIndex,h=this.endIndex,p=this.hiddenState.transitionDuration;y(e)&&(p=e),Z.animationsEnabled||(p=0);var u,d=0;A($t(this.dataItems.iterator()),function(f){var g=f[0],m=f[1],x=p;(gr.endIndex+10)&&(x=0),x==0?m.hide(0,0,n,t):(r.sequencedInterpolation&&x>0&&(d=r.sequencedInterpolationDelay*g+p*(g-l)/(h-l)),u=m.hide(x,d,n,t))}),this.dataSets.each(function(f,g){g!=r.dataItems&&g.each(function(m){m.events.disable(),m.hide(0,0,n,t),m.events.enable()})}),this.mainDataSet!=this.dataItems&&this.mainDataSet.each(function(f){f.events.disable(),f.hide(0,0,n,t),f.events.enable()});var c=s.prototype.hide.call(this,p);return c&&!c.isFinished()&&c.delay(d),u&&!u.isFinished()&&(c=u),this.validateDataElements(),c},i.prototype.handleDataItemWorkingValueChange=function(e,t){s.prototype.handleDataItemWorkingValueChange.call(this,e,t),A(this.baseAxis.series.iterator(),function(n){(n.stacked||n.stackedSeries)&&n.invalidateProcessedData()})},i.prototype.getStackValue=function(e,t){var n=this,r=this.xAxis,a=this.yAxis;if(this.stacked&&r&&a){var o,l=this.chart,h=l.series.indexOf(this);r!=this.baseAxis&&r instanceof ee&&(o=this.xField),a!=this.baseAxis&&a instanceof ee&&(o=this.yField),o&&(e.setCalculatedValue(o,0,"stack"),rt(l.series.range(0,h).backwards().iterator(),function(p){if(p.xAxis==r&&p.yAxis==a&&p.className==n.className){p.stackedSeries=n;var u=p.dataItems.getIndex(e.index);if(u&&u.hasValue(n._xValueFields)&&u.hasValue(n._yValueFields)){var d,c=e.getValue(o),f=u.getValue(o)+u.getValue(o,"stack");if(d=t?u.getWorkingValue(o)+u.getValue(o,"stack"):u.getValue(o)+u.getValue(o,"stack"),!n.stackToNegative||c>=0&&f>=0||c<0&&f<0)return e.setCalculatedValue(o,d,"stack"),!1;if(!p.stacked)return!1}else if(!p.stacked)return!1}return!0}))}},Object.defineProperty(i.prototype,"stackToNegative",{get:function(){return this.getPropertyValue("stackToNegative")},set:function(e){this.setPropertyValue("stackToNegative",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"xField",{get:function(){return this._xField},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"yField",{get:function(){return this._yField},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"xOpenField",{get:function(){return this._xOpenField},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"yOpenField",{get:function(){return this._yOpenField},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltipXField",{get:function(){return this._tooltipXField?this._tooltipXField:this._xField},set:function(e){this._tooltipXField=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltipYField",{get:function(){return this._tooltipYField?this._tooltipYField:this._yField},set:function(e){this._tooltipYField=e},enumerable:!0,configurable:!0}),i.prototype.min=function(e){return this._tmin.getKey(e.uid)},i.prototype.max=function(e){return this._tmax.getKey(e.uid)},i.prototype.selectionMin=function(e){return this._smin.getKey(e.uid)},i.prototype.selectionMax=function(e){return this._smax.getKey(e.uid)},i.prototype.processConfig=function(e){if(e){if(v(e.baseAxis)&&J(e.baseAxis)&&(this.map.hasKey(e.baseAxis)?e.baseAxis=this.map.getKey(e.baseAxis):(this.processingErrors.push("[XYSeries ("+(this.name||"unnamed")+')] No axis with id "'+e.baseAxis+'" found for `baseAxis`.'),delete e.baseAxis)),v(e.xAxis)&&J(e.xAxis)&&(this.map.hasKey(e.xAxis)?e.xAxis=this.map.getKey(e.xAxis):(this.processingErrors.push("[XYSeries ("+(this.name||"unnamed")+')] No axis with id "'+e.xAxis+'" found for `xAxis`.'),delete e.xAxis)),v(e.yAxis)&&J(e.yAxis)&&(this.map.hasKey(e.yAxis)?e.yAxis=this.map.getKey(e.yAxis):(this.processingErrors.push("[XYSeries ("+(this.name||"unnamed")+')] No axis with id "'+e.yAxis+'" found for `yAxis`.'),delete e.yAxis)),v(e.axisRanges)&&Ae(e.axisRanges))for(var t=0,n=e.axisRanges.length;t0&&(a=!1),b.yAxis==n.yAxis&&t.scrollbarChart.yAxes.length>0&&(o=!1))}),n.events.on("beforedisposed",function(){t.series.removeValue(n)});var l=new ae,h=n.clone();if((Z.onlyShowOnViewport||Z.queue)&&this.addDisposer(this.chart.events.on("removedfromqueue",function(){r.invalidateData()})),Xi()&&(h.stroke=B("#aaaaaa"),h.fill=h.stroke,h.propertyFields.fill=void 0,h.propertyFields.stroke=void 0),n.scrollbarSeries=h,a){var p=n.xAxis.clone();if(r.xAxes.moveValue(p),p.title.disabled=!0,p.rangeChangeDuration=0,(f=p.renderer).ticks.template.disabled=!0,f.inside=!0,f.labels.template.inside=!0,f.line.strokeOpacity=0,f.minLabelPosition=.02,f.maxLabelPosition=.98,f.line.disabled=!0,f.axisFills.template.disabled=!0,f.baseGrid.disabled=!0,f.grid.template.strokeOpacity=.05,f.minWidth=void 0,f.minHeight=void 0,f.padding(0,0,0,0),f.chart=r,f.margin(0,0,0,0),p.width=F(100),f.labels.template.fillOpacity=.5,p.maxZoomCount=void 0,p.minZoomCount=void 0,p instanceof Pe){var u=p,d=n.xAxis;u.groupCount=5*d.groupCount,u.min=void 0,u.max=void 0,this._disposers.push(u.clonedFrom.events.on("extremeschanged",function(){y(u.clonedFrom.minDefined)&&(u.min=u.clonedFrom.minDefined),y(u.clonedFrom.maxDefined)&&(u.max=u.clonedFrom.maxDefined)},void 0,!1))}else if(p instanceof ee){var c=p;c.min=void 0,c.max=void 0,y(c.clonedFrom.minDefined)||(c.min=void 0),y(c.clonedFrom.maxDefined)||(c.max=void 0),this._disposers.push(c.clonedFrom.events.on("extremeschanged",function(){y(c.clonedFrom.minDefined)&&(c.min=c.clonedFrom.min),y(c.clonedFrom.maxDefined)&&(c.max=c.clonedFrom.max)},void 0,!1))}h.xAxis=p}else this.scrollbarChart.xAxes.each(function(b){b.clonedFrom==n.xAxis&&(h.xAxis=b)});if(o){var f,g=n.yAxis.clone();if(r.yAxes.moveValue(g),g.title.disabled=!0,g.rangeChangeDuration=0,(f=g.renderer).ticks.template.disabled=!0,f.inside=!0,f.labels.template.inside=!0,f.line.strokeOpacity=0,f.minLabelPosition=.02,f.maxLabelPosition=.98,f.line.disabled=!0,f.axisFills.template.disabled=!0,f.grid.template.stroke=l.getFor("background"),f.baseGrid.disabled=!0,f.grid.template.strokeOpacity=.05,f.minWidth=void 0,f.minHeight=void 0,f.chart=r,f.padding(0,0,0,0),f.margin(0,0,0,0),g.height=F(100),f.labels.template.fillOpacity=.5,h.yAxis=g,g.maxZoomCount=void 0,g.minZoomCount=void 0,g instanceof Pe){var m=g;m.min=void 0,m.max=void 0,d=n.yAxis,g.groupCount=5*d.groupCount,this._disposers.push(m.clonedFrom.events.on("extremeschanged",function(){y(m.clonedFrom.minDefined)&&(m.min=m.clonedFrom.minDefined),y(m.clonedFrom.maxDefined)&&(m.max=m.clonedFrom.maxDefined)}))}else if(g instanceof ee){var x=g;x.min=void 0,x.max=void 0,y(x.clonedFrom.minDefined)||(x.min=void 0),y(x.clonedFrom.maxDefined)||(x.max=void 0),this._disposers.push(x.clonedFrom.events.on("extremeschanged",function(){y(x.clonedFrom.minDefined)&&(x.min=x.clonedFrom.minDefined),y(x.clonedFrom.maxDefined)&&(x.max=x.clonedFrom.maxDefined)}))}}else this.scrollbarChart.yAxes.each(function(b){b.clonedFrom==n.yAxis&&(h.yAxis=b)});h.rangeChangeDuration=0,h.interpolationDuration=0,h.defaultState.transitionDuration=0,h.showOnInit=!1,this._disposers.push(h.events.on("validated",this.zoomOutAxes,this,!1)),this._disposers.push(n.events.on("datavalidated",function(){h.data!=n.data&&(h.data=n.data)},void 0,!1)),h.defaultState.properties.visible=!0,r.series.push(h),this.updateByOrientation()}},i.prototype.updateByOrientation=function(){var e=this;this._scrollbarChart&&(A(this._scrollbarChart.xAxes.iterator(),function(t){var n=t.renderer;e.orientation=="vertical"?(n.grid.template.disabled=!0,n.labels.template.disabled=!0,n.minGridDistance=10):(n.grid.template.disabled=!1,n.labels.template.disabled=!1,n.minGridDistance=t.clonedFrom.renderer.minGridDistance)}),A(this._scrollbarChart.yAxes.iterator(),function(t){var n=t.renderer;e.orientation=="horizontal"?(n.grid.template.disabled=!0,n.labels.template.disabled=!0,n.minGridDistance=10):(n.grid.template.disabled=!1,n.labels.template.disabled=!1,n.minGridDistance=t.clonedFrom.renderer.minGridDistance)}))},i.prototype.handleSeriesRemoved=function(e){var t=e.oldValue,n=this.scrollbarChart;n.series.each(function(r){r&&r.clonedFrom==t&&n.series.removeValue(r)}),n.series.length==0&&(n.xAxes.clear(),n.yAxes.clear());try{t.events.off("validated",this.zoomOutAxes,this)}catch{}},Object.defineProperty(i.prototype,"scrollbarChart",{get:function(){return this._scrollbarChart},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"chart",{get:function(){return this._chart.get()},set:function(e){this._chart.get()!==e&&(this._chart.set(e,e.events.on("datavalidated",this.handleDataChanged,this,!1)),this.handleDataChanged(),this._scrollbarChart.dataProvider=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"unselectedOverlay",{get:function(){return this._unselectedOverlay},enumerable:!0,configurable:!0}),i.prototype.handleDataChanged=function(){this.chart.data!=this.scrollbarChart.data?this.scrollbarChart.data=this.chart.data:this.scrollbarChart.invalidateRawData()},i.prototype.zoomOutAxes=function(){var e=this.scrollbarChart;A(e.xAxes.iterator(),function(t){t.zoom({start:0,end:1},!0,!0)}),A(e.yAxes.iterator(),function(t){t.zoom({start:0,end:1},!0,!0)})},i.prototype.updateThumb=function(e){if(e===void 0&&(e=!0),s.prototype.updateThumb.call(this,e),this._unselectedOverlay){var t=this.thumb,n=t.pixelX||0,r=t.pixelY||0,a=t.pixelWidth||0,o=t.pixelHeight||0,l="";this.orientation=="horizontal"?(l=Yt({x:-1,y:0,width:n,height:o}),l+=Yt({x:n+a,y:0,width:(this.pixelWidth||0)-n-a,height:o})):(l=Yt({x:0,y:0,width:a,height:r}),l+=Yt({x:0,y:r+o,width:a,height:(this.pixelHeight||0)-r-o})),this._unselectedOverlay.path=l}},i.prototype.processConfig=function(e){if(e&&v(e.series)&&Ae(e.series))for(var t=0,n=e.series.length;t0){var n=t.maxZoomFactor/t.maxZoomCount;if(V(t.end-t.start,3)<1/n)return e=!0,!1}else if(V(t.start,3)>0||V(t.end,3)<1)return e=!0,!1}return!0}),rt(this.yAxes.iterator(),function(t){if(t.toggleZoomOutButton){if(t.maxZoomCount>0){var n=t.maxZoomFactor/t.maxZoomCount;if(V(t.end-t.start,3)<1/n)return e=!0,!1}else if(V(t.start,3)>0||V(t.end,3)<1)return e=!0,!1;return!0}}),this.seriesAppeared||(e=!1),e?this.zoomOutButton.show():this.zoomOutButton.hide()}},i.prototype.seriesAppeared=function(){var e=!1;return A(this.series.iterator(),function(t){if(!t.appeared)return e=!1,!1}),e},i.prototype.handleYAxisRangeChange=function(){var e=this.getCommonAxisRange(this.yAxes);this.scrollbarY&&this.zoomAxes(this.yAxes,e,!0),this.toggleZoomOutButton(),this.updateScrollbar(this.scrollbarY,e)},i.prototype.updateScrollbar=function(e,t){e&&(e.skipRangeEvents(),e.start=t.start,e.end=t.end)},i.prototype.getCommonAxisRange=function(e){var t,n;return e.each(function(r){if(!(!r.zoomable||r instanceof ee&&r.syncWithAxis)){var a=r.start,o=r.end;r.renderer.inversed&&(a=1-r.end,o=1-r.start),(!y(t)||an)&&(n=o)}}),{start:t,end:n}},i.prototype.updateXAxis=function(e){var t=e.axis;e.opposite?(t.parent=this.topAxesContainer,t.toFront()):(t.parent=this.bottomAxesContainer,t.toBack()),t.renderer&&t.renderer.processRenderer()},i.prototype.updateYAxis=function(e){var t=e.axis;e.opposite?(t.parent=this.rightAxesContainer,t.toBack()):(t.parent=this.leftAxesContainer,t.toFront()),t.renderer&&t.renderer.processRenderer()},i.prototype.processAxis=function(e){var t=this;e instanceof Ve&&this._dataUsers.moveValue(e);var n=e.renderer;n.gridContainer.parent=this.plotContainer,n.gridContainer.toBack(),n.breakContainer.parent=this.plotContainer,n.breakContainer.toFront(),n.breakContainer.zIndex=10,e.addDisposer(new le(function(){t.dataUsers.removeValue(e)})),n.bulletsContainer.parent=this.axisBulletsContainer,this._disposers.push(e.events.on("positionchanged",function(){var r=Qe({x:0,y:0},e,t.axisBulletsContainer);e.renderer instanceof mt&&(n.bulletsContainer.y=r.y),e.renderer instanceof Mt&&(n.bulletsContainer.x=r.x)},void 0,!1)),this.plotContainer.events.on("maxsizechanged",function(){t.inited&&(e.invalidateDataItems(),t.updateSeriesMasks())},e,!1)},i.prototype.updateSeriesMasks=function(){Xi()&&this.series.each(function(e){var t=e.mainContainer.mask;e.mainContainer.mask=void 0,e.mainContainer.mask=t})},i.prototype.handleSeriesRemoved=function(e){var t=e.oldValue;t&&(t.xAxis&&(t.xAxis.series.removeValue(t),t.xAxis.invalidateProcessedData()),t.yAxis&&(t.yAxis.series.removeValue(t),t.yAxis.invalidateProcessedData()),this.series.each(function(n){n.resetExtremes()})),s.prototype.handleSeriesRemoved.call(this,e)},Object.defineProperty(i.prototype,"xAxes",{get:function(){return this._xAxes||(this._xAxes=new re,this._xAxes.events.on("inserted",this.processXAxis,this,!1),this._xAxes.events.on("removed",this.handleAxisRemoval,this,!1),this._disposers.push(new fe(this._xAxes,!1))),this._xAxes},enumerable:!0,configurable:!0}),i.prototype.handleAxisRemoval=function(e){var t=e.oldValue;this.dataUsers.removeValue(t),t.autoDispose&&t.dispose()},Object.defineProperty(i.prototype,"yAxes",{get:function(){return this._yAxes||(this._yAxes=new re,this._yAxes.events.on("inserted",this.processYAxis,this,!1),this._yAxes.events.on("removed",this.handleAxisRemoval,this,!1),this._disposers.push(new fe(this._yAxes,!1))),this._yAxes},enumerable:!0,configurable:!0}),i.prototype.handleSeriesAdded=function(e){try{s.prototype.handleSeriesAdded.call(this,e);var t=e.newValue;this.xAxes.length!=0&&this.yAxes.length!=0||(_.removeFromInvalidComponents(t),t.dataInvalid=!1),t.xAxis,t.yAxis,t.maskBullets=t.maskBullets,t.fill==null&&(this.patterns?(v(t.stroke)||(t.stroke=this.colors.next()),t.fill=this.patterns.next(),v(t.fillOpacity)&&(t.fill.backgroundOpacity=t.fillOpacity),t.stroke instanceof se&&(t.fill.stroke=t.stroke,t.fill.fill=t.stroke)):t.fill=this.colors.next()),v(t.stroke)||(t.stroke=t.fill)}catch(n){this.raiseCriticalError(n)}},Object.defineProperty(i.prototype,"cursor",{get:function(){return this._cursor},set:function(e){this._cursor!=e&&(this._cursor&&this.removeDispose(this._cursor),this._cursor=e,e&&(this._disposers.push(e),e.chart=this,e.shouldClone=!1,e.parent=this._cursorContainer,e.events.on("cursorpositionchanged",this.handleCursorPositionChange,this,!1),e.events.on("zoomstarted",this.handleCursorZoomStart,this,!1),e.events.on("zoomended",this.handleCursorZoomEnd,this,!1),e.events.on("panstarted",this.handleCursorPanStart,this,!1),e.events.on("panning",this.handleCursorPanning,this,!1),e.events.on("panended",this.handleCursorPanEnd,this,!1),e.events.on("behaviorcanceled",this.handleCursorCanceled,this,!1),e.events.on("hidden",this.handleHideCursor,this,!1),e.zIndex=Number.MAX_SAFE_INTEGER-1,this.tapToActivate&&this.setTapToActivate(this.tapToActivate)))},enumerable:!0,configurable:!0}),i.prototype.handleCursorPositionChange=function(){var e=this.cursor;if(e.visible&&!e.isHiding){var t=this.cursor.xPosition,n=this.cursor.yPosition;this.showSeriesTooltip({x:t,y:n});var r=[],a=e.snapToSeries;if(a&&!e.downPoint){a instanceof oi&&(a=[a]);var o=[];j(a,function(h){if(!h.isHidden&&!h.isHiding){var p=h.xAxis,u=h.yAxis;p instanceof ee&&!(p instanceof Pe)&&u instanceof ee&&!(u instanceof Pe)?(h.dataItems.each(function(d){o.push(d)}),pt(r,h.yAxis),pt(r,h.xAxis)):(h.baseAxis==h.xAxis&&(pt(r,h.yAxis),o.push(p.getSeriesDataItem(h,p.toAxisPosition(t),!0))),h.baseAxis==h.yAxis&&(pt(r,h.xAxis),o.push(u.getSeriesDataItem(h,u.toAxisPosition(n),!0))))}});var l=this.getClosest(o,t,n);l&&(this.series.each(function(h){var p=l.component;h!=p&&(h.hideTooltip(),h.xAxis!=p.xAxis&&(h.xAxis.hideTooltip(),r.push(h.xAxis)),h.yAxis!=p.yAxis&&(h.yAxis.hideTooltip(),r.push(h.yAxis)))}),l.component.showTooltipAtDataItem(l),e.handleSnap(l.component))}this._seriesPoints=[],this._cursorXPosition!=t&&this.showAxisTooltip(this.xAxes,t,r),this._cursorYPosition!=n&&this.showAxisTooltip(this.yAxes,n,r),this.arrangeTooltips&&this.sortSeriesTooltips(this._seriesPoints),this.legend&&this.legend.afterDraw()}},i.prototype.getClosest=function(e,t,n){var r,a=1/0;return hr(e,function(o){if(o){var l=o.component.xAxis,h=o.component.yAxis,p=l.positionToCoordinate(l.toGlobalPosition(l.toAxisPosition(t))),u=h.positionToCoordinate(h.toGlobalPosition(h.toAxisPosition(n))),d=o.component.xField,c=o.component.yField;if(l instanceof ee&&!y(o.getValue(d))||h instanceof ee&&!y(o.getValue(c)))return!0;var f=l.positionToCoordinate(l.toGlobalPosition(l.getPositionX(o,d,o.locations[d],"valueX"))),g=h.positionToCoordinate(h.toGlobalPosition(h.getPositionY(o,c,o.locations[c],"valueY"))),m=Math.sqrt(Math.pow(p-f,2)+Math.pow(u-g,2));return m0){var t=this.cursor;if(t&&y(t.maxTooltipDistance)){var n,r,a=ut({x:t.point.x,y:t.point.y},t),o=1/0;j(e,function(H){var ne=H.series,Te=H.point;if(Te){var Ge={x:Te.x,y:Te.y},he=Math.abs(oe(Ge,a));he0&&j(l,function(H){n!=H.series&&H.series.hideTooltip(0)}),l=[{series:n,point:r}])),e=l}var h=ut({x:-.5,y:-.5},this.plotContainer),p=ut({x:this.plotContainer.pixelWidth+.5,y:this.plotContainer.pixelHeight+.5},this.plotContainer),u=0,d=[];j(e,function(H){var ne=H.point;ne&&Us(ne,{x:h.x,y:h.y,width:p.x-h.x,height:p.y-h.y})&&(d.push({point:ne,series:H.series}),u+=ne.y)}),e=d;var c=this.series.getIndex(0),f=!1;c&&c.yAxis&&c.yAxis.renderer.inversed&&(f=!0),f?e.sort(function(H,ne){return Pt(H.point.y,ne.point.y)}):(e.sort(function(H,ne){return Pt(ne.point.y,H.point.y)}),e.reverse());var g=u/e.length,m=ba({x:0,y:0},this.svgContainer.SVGContainer).y;if(e.length>0){var x=h.y,b=p.y;Tr({x:0,y:x},this);var C=!1;if(g>x+(b-x)/2)for(var S=b,P=e.length-1;P>=0;P--){var O=(G=e[P].series).tooltip,I=e[P].point.y;if(O.setBounds({x:0,y:-m,width:this.pixelWidth,height:S+m}),O.invalid&&O.validate(),O.toBack(),(S=ut({x:0,y:O.label.pixelY-O.pixelY+I-O.pixelMarginTop},O).y)<-m){C=!0;break}}if(g<=x+(b-x)/2||C)for(var k=x,D=(P=0,e.length);P0||a.dataItems.length>0)&&a.showTooltipAtPosition(t)})},i.prototype.getUpdatedRange=function(e,t){if(e){var n,r;e.renderer.inversed?(Vi(t),n=1-e.end,r=1-e.start):(n=e.start,r=e.end);var a=r-n;return{start:n+t.start*a,end:n+t.end*a}}},i.prototype.handleCursorZoomEnd=function(e){var t=this.cursor,n=t.behavior;if(n=="zoomX"||n=="zoomXY"){var r=t.xRange;r&&this.xAxes.length>0&&((r=this.getUpdatedRange(this.xAxes.getIndex(0),r)).priority="start",this.zoomAxes(this.xAxes,r))}if(n=="zoomY"||n=="zoomXY"){var a=t.yRange;a&&this.yAxes.length>0&&((a=this.getUpdatedRange(this.yAxes.getIndex(0),a)).priority="start",this.zoomAxes(this.yAxes,a))}this.handleHideCursor()},i.prototype.handleCursorPanStart=function(e){var t=this.xAxes.getIndex(0);t&&(this._panStartXRange={start:t.start,end:t.end},t.renderer.inversed&&(this._panStartXRange=Vi(this._panStartXRange)));var n=this.yAxes.getIndex(0);n&&(this._panStartYRange={start:n.start,end:n.end},n.renderer.inversed&&(this._panStartYRange=Vi(this._panStartYRange)))},i.prototype.handleCursorPanEnd=function(e){var t=this.cursor,n=t.behavior;if(this._panEndXRange&&(n=="panX"||n=="panXY")){var r=this._panEndXRange,a=this._panStartXRange,o=0;r.start<0&&(o=r.start),a.end>1?r.end>a.end&&(o=r.end-a.end):r.end>1&&(o=r.end-1),this.zoomAxes(this.xAxes,{start:r.start-o,end:r.end-o},!1,t.snapOnPan),this._panEndXRange=void 0,this._panStartXRange=void 0}!this._panEndYRange||n!="panY"&&n!="panXY"||(o=0,(r=this._panEndYRange).start<0&&(o=r.start),r.end>1&&(o=r.end-1),this.zoomAxes(this.yAxes,{start:r.start-o,end:r.end-o},!1,t.snapOnPan),this._panEndYRange=void 0,this._panStartYRange=void 0)},i.prototype.handleCursorCanceled=function(){this._panEndXRange=void 0,this._panStartXRange=void 0},i.prototype.handleCursorPanning=function(e){var t=this.cursor,n=t.behavior,r=t.maxPanOut;if(this._panStartXRange&&(n=="panX"||n=="panXY")){var a=this._panStartXRange,o=t.xRange,l=this.getCommonAxisRange(this.xAxes),h=a.end-a.start,p=o.start*(l.end-l.start),u=Math.max(-r,p+a.start),d=Math.min(p+a.end,1+r);u<=0&&(d=u+h),d>=1&&(u=d-h);var c={start:u,end:d};this._panEndXRange=c,this.zoomAxes(this.xAxes,c,!1,!1,t.maxPanOut)}!this._panStartYRange||n!="panY"&&n!="panXY"||(a=this._panStartYRange,o=t.yRange,l=this.getCommonAxisRange(this.yAxes),h=a.end-a.start,p=o.start*(l.end-l.start),u=Math.max(-r,p+a.start),d=Math.min(p+a.end,1+r),u<=0&&(d=u+h),d>=1&&(u=d-h),c={start:u,end:d},this._panEndYRange=c,this.zoomAxes(this.yAxes,c,!1,!1,t.maxPanOut)),this.handleHideCursor()},i.prototype.handleYAxisSet=function(e){},i.prototype.handleCursorZoomStart=function(e){},Object.defineProperty(i.prototype,"scrollbarX",{get:function(){return this._scrollbarX},set:function(e){var t=this;this._scrollbarX&&this.removeDispose(this._scrollbarX),this._scrollbarX=e,e&&(this._disposers.push(e),e.parent=this.topAxesContainer,e.shouldClone=!1,e.startGrip.exportable=!1,e.endGrip.exportable=!1,e.toBack(),e.orientation="horizontal",e.events.on("rangechanged",this.handleXScrollbarChange,this,!1),this.events.on("datavalidated",function(){return e.updateThumb(!1)},this,!1),e.adapter.add("positionValue",function(n){var r=t.xAxes.getIndex(0);return r&&(n.value=r.getPositionLabel(r.renderer.inversed?1-n.position:n.position)),n}))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scrollbarY",{get:function(){return this._scrollbarY},set:function(e){var t=this;this._scrollbarY&&this.removeDispose(this._scrollbarY),this._scrollbarY=e,e&&(this._disposers.push(e),e.parent=this.rightAxesContainer,e.startGrip.exportable=!1,e.shouldClone=!1,e.endGrip.exportable=!1,e.toFront(),e.orientation="vertical",e.events.on("rangechanged",this.handleYScrollbarChange,this,!1),this.events.on("datavalidated",function(){return e.updateThumb(!1)},this,!1),e.adapter.add("positionValue",function(n){var r=t.yAxes.getIndex(0);return r&&(n.value=r.getPositionLabel(n.position)),n}))},enumerable:!0,configurable:!0}),i.prototype.handleXScrollbarChange=function(e){if(this.inited){var t=e.target,n=t.range;n.start==0&&(n.priority="start"),n.end==1&&(n.priority="end"),n=this.zoomAxes(this.xAxes,n),t.fixRange(n)}},i.prototype.handleYScrollbarChange=function(e){if(this.inited){var t=e.target,n=t.range;n.end==1&&(n.priority="end"),n.start==0&&(n.priority="start"),n=this.zoomAxes(this.yAxes,n),t.fixRange(n)}},i.prototype.zoomAxes=function(e,t,n,r,a,o){var l={start:0,end:1};this.showSeriesTooltip();var h=t;return this.dataInvalid||A(e.iterator(),function(p){var u=p.maxZoomFactor;if(y(p.minZoomCount)&&(u/=p.minZoomCount),!(o&&1/(t.end-t.start)>=u)){if(p.zoomable){if(t=p.renderer.inversed?Vi(h):h,p.hideTooltip(0),r)if(p instanceof Ve){var d=p.getCellEndPosition(0)-p.getCellStartPosition(0);t.start=p.roundPosition(t.start+d/2-p.startLocation*d,p.startLocation),t.end=p.roundPosition(t.end-d/2+(1-p.endLocation)*d,p.endLocation)}else t.start=p.roundPosition(t.start+1e-4,0,p.startLocation),t.end=p.roundPosition(t.end+1e-4,0,p.endLocation);var c=p.zoom(t,n,n,a);p.renderer.inversed&&(c=Vi(c)),l=c}}}),l},Object.defineProperty(i.prototype,"maskBullets",{get:function(){return this.getPropertyValue("maskBullets")},set:function(e){this.setPropertyValue("maskBullets",e,!0)&&this.bulletsContainer&&(this.bulletsContainer.mask=e?this._bulletMask:void 0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"arrangeTooltips",{get:function(){return this.getPropertyValue("arrangeTooltips")},set:function(e){this.setPropertyValue("arrangeTooltips",e,!0)},enumerable:!0,configurable:!0}),i.prototype.handleWheel=function(e){var t=this.plotContainer,n=at(Ht(e.point,this.htmlContainer,this.svgContainer.cssScale),t),r=e.shift.y;this.handleWheelReal(r,this.mouseWheelBehavior,n)},i.prototype.handleHorizontalWheel=function(e){var t=this.plotContainer,n=at(Ht(e.point,this.htmlContainer,this.svgContainer.cssScale),t);this.handleWheelReal(e.shift.x,this.horizontalMouseWheelBehavior,n)},i.prototype.handleWheelReal=function(e,t,n){if(e!=0){var r=this.plotContainer,a=this.getCommonAxisRange(this.xAxes),o=this.getCommonAxisRange(this.yAxes),l=.1;if(t=="panX"||t=="panXY"){var h=a.end-a.start,p=Math.max(-0,a.start+l*e/100*(a.end-a.start)),u=Math.min(a.end+l*e/100*(a.end-a.start),1);p<=0&&(u=p+h),u>=1&&(p=u-h),this.zoomAxes(this.xAxes,{start:p,end:u})}if(t=="panY"||t=="panXY"){e*=-1;var d=o.end-o.start,c=Math.max(-0,o.start+l*e/100*(o.end-o.start)),f=Math.min(o.end+l*e/100*(o.end-o.start),1);c<=0&&(f=c+d),f>=1&&(c=f-d),this.zoomAxes(this.yAxes,{start:c,end:f})}if(t=="zoomX"||t=="zoomXY"){var g=n.x/r.maxWidth,m=this.xAxes.getIndex(0).toAxisPosition(g);p=Math.max(-0,a.start-l*(a.end-a.start)*e/100*g),p=Math.min(p,m),u=Math.min(a.end+l*(a.end-a.start)*e/100*(1-g),1),u=Math.max(u,m),this.zoomAxes(this.xAxes,{start:p,end:u},void 0,void 0,void 0,!0)}if(t=="zoomY"||t=="zoomXY"){var x=n.y/r.maxHeight,b=this.yAxes.getIndex(0).toAxisPosition(x);c=Math.max(-0,o.start-l*(o.end-o.start)*e/100*(1-x)),c=Math.min(c,b),f=Math.min(o.end+l*e/100*x*(o.end-o.start),1),f=Math.max(f,b),this.zoomAxes(this.yAxes,{start:c,end:f},void 0,void 0,void 0,!0)}}},Object.defineProperty(i.prototype,"mouseWheelBehavior",{get:function(){return this.getPropertyValue("mouseWheelBehavior")},set:function(e){this.setPropertyValue("mouseWheelBehavior",e)&&(e!="none"?(this._mouseWheelDisposer=this.plotContainer.events.on("wheel",this.handleWheel,this,!1),this._disposers.push(this._mouseWheelDisposer)):this._mouseWheelDisposer&&(this.plotContainer.wheelable=!1,this.plotContainer.hoverable=!1,this._mouseWheelDisposer.dispose()))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"horizontalMouseWheelBehavior",{get:function(){return this.getPropertyValue("horizontalMouseWheelBehavior")},set:function(e){this.setPropertyValue("horizontalMouseWheelBehavior",e)&&(e!="none"?(this._mouseWheelDisposer2=this.plotContainer.events.on("wheel",this.handleHorizontalWheel,this,!1),this._disposers.push(this._mouseWheelDisposer2)):this._mouseWheelDisposer2&&(this.plotContainer.wheelable=!1,this.plotContainer.hoverable=!1,this._mouseWheelDisposer2.dispose()))},enumerable:!0,configurable:!0}),i.prototype.dataSourceDateFields=function(e){var t=this;return e=s.prototype.dataSourceDateFields.call(this,e),A(this.series.iterator(),function(n){e=t.populateDataSourceFields(e,n.dataFields,["dateX","dateY","openDateX","openDateY"])}),e},i.prototype.dataSourceNumberFields=function(e){var t=this;return e=s.prototype.dataSourceDateFields.call(this,e),A(this.series.iterator(),function(n){e=t.populateDataSourceFields(e,n.dataFields,["valueX","valueY","openValueX","openValueY"])}),e},i.prototype.processConfig=function(e){if(e){var t=[],n=[];if(v(e.xAxes)&&Ae(e.xAxes))for(var r=0,a=e.xAxes.length;r0;){var r=this.dataItems.getIndex(0);r&&n.dataItems.remove(r),n.dataUsers.each(function(a){var o=a.dataItems.getIndex(0);o&&a.dataItems.remove(o)}),n._parseDataFrom--,t--}n.invalidateData()}},i.prototype.removeData=function(e){this.scrollbarX instanceof li&&this.removeScrollbarData(this.scrollbarX,e),this.scrollbarY instanceof li&&this.removeScrollbarData(this.scrollbarY,e),s.prototype.removeData.call(this,e)},i.prototype.setTapToActivate=function(e){s.prototype.setTapToActivate.call(this,e),this.cursor&&(this.cursor.interactions.isTouchProtected=e,this.plotContainer.interactions.isTouchProtected=e)},i.prototype.handleTapToActivate=function(){s.prototype.handleTapToActivate.call(this),this.cursor&&(this.cursor.interactions.isTouchProtected=!1,this.plotContainer.interactions.isTouchProtected=!1)},i.prototype.handleTapToActivateDeactivation=function(){s.prototype.handleTapToActivateDeactivation.call(this),this.cursor&&(this.cursor.interactions.isTouchProtected=!0,this.plotContainer.interactions.isTouchProtected=!0)},i}(Zr);_.registeredClasses.XYChart=Ut,Ne.push({relevant:Ue.maybeXS,state:function(s,i){if(s instanceof Ut&&s.scrollbarX){var e=s.states.create(i);return s.scrollbarX.states.create(i).properties.disabled=!0,e}return null}}),Ne.push({relevant:Ue.maybeXS,state:function(s,i){if(s instanceof Ut&&s.scrollbarY){var e=s.states.create(i);return s.scrollbarY.states.create(i).properties.disabled=!0,e}return null}});var es=function(s){function i(){var e=s.call(this)||this;e.className="LineSeriesSegment",e.isMeasured=!1,e.interactionsEnabled=!1,e.layout="none";var t=e.createChild($);e.fillSprite=t,t.shouldClone=!1,t.setElement(e.paper.add("path")),t.isMeasured=!1,e._disposers.push(t);var n=e.createChild($);return e.strokeSprite=n,n.shouldClone=!1,n.fill=B(),n.setElement(e.paper.add("path")),n.isMeasured=!1,e._disposers.push(n),e}return w(i,s),i.prototype.drawSegment=function(e,t,n,r){if(!this.disabled)if(e.length>0&&t.length>0&&y(e[0].x)&&y(e[0].y)){var a=E({x:e[0].x-.2,y:e[0].y-.2})+E(e[0]),o=this.series;o.smoothing=="bezier"?a+=new zt(n,r).smooth(e):o.smoothing=="monotoneX"?a+=new bp({closed:!1}).smooth(e):o.smoothing=="monotoneY"&&(a+=new xp({closed:!1}).smooth(e)),this.strokeOpacity==0||this.strokeSprite.strokeOpacity==0||(this.strokeSprite.path=a),(this.fillOpacity>0||this.fillSprite.fillOpacity>0)&&y(t[0].x)&&y(t[0].y)&&(a+=T(t[0]),o.smoothing=="bezier"?a+=new zt(n,r).smooth(t):o.smoothing=="monotoneX"?a+=new bp({closed:!1}).smooth(t):o.smoothing=="monotoneY"&&(a+=new xp({closed:!1}).smooth(t)),a+=T(e[0]),a+=" Z",this.fillSprite.path=a)}else this.fillSprite.path="",this.strokeSprite.path=""},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e);var t=this.strokeSprite;De(e,t.properties,Ie),t.events.copyFrom(e.strokeSprite.events),t.fillOpacity=0;var n=this.fillSprite;De(e,n.properties,Ie),n.events.copyFrom(e.fillSprite.events),n.strokeOpacity=0},i}(W);_.registeredClasses.LineSeriesSegment=es;var Lp=function(s){function i(){var e=s.call(this)||this;return e.className="DurationAxisDataItem",e.applyTheme(),e}return w(i,s),i}(Zn),ts=function(s){function i(){var e=s.call(this)||this;return e._baseUnit="second",e.className="DurationAxis",e.setPropertyValue("maxZoomFactor",1e6),e.applyTheme(),e}return w(i,s),i.prototype.formatLabel=function(e,t){return this.durationFormatter.format(e,t||this.axisDurationFormat)},i.prototype.adjustMinMax=function(e,t,n,r,a){var o,l,h,p=this.baseUnit;if(this.setPropertyValue("maxPrecision",0),p=="millisecond"||p=="second"||p=="minute"||p=="hour"){r<=1&&(r=1),r=Math.round(r);var u=e,d=t;n===0&&(n=Math.abs(t));var c,f=[60,30,20,15,10,2,1],g=1;p=="hour"&&(f=[24,12,6,4,2,1]);try{for(var m=nr(f),x=m.next();!x.done;x=m.next()){var b=x.value;if(n/b>r){g=b;break}}}catch(O){o={error:O}}finally{try{x&&!x.done&&(l=m.return)&&l.call(m)}finally{if(o)throw o.error}}var C=Math.ceil((t-e)/g/r),S=Math.log(Math.abs(C))*Math.LOG10E,P=Math.pow(10,Math.floor(S))/10;c=g*(C=al(f,C/P)*P),this.durationFormatter.getValueUnit(c,this.baseUnit),e=Math.floor(e/c)*c,t=Math.ceil(t/c)*c,a&&((e-=c)<0&&u>=0&&(e=0),(t+=c)>0&&d<=0&&(t=0)),h={min:e,max:t,step:c}}else h=s.prototype.adjustMinMax.call(this,e,t,n,r,a);return this.axisDurationFormat=this.durationFormatter.getFormat(h.step,h.max,this.baseUnit),h},Object.defineProperty(i.prototype,"tooltipDurationFormat",{get:function(){return this._tooltipDurationFormat},set:function(e){this._tooltipDurationFormat=e},enumerable:!0,configurable:!0}),i.prototype.getTooltipText=function(e){var t=V(this.positionToValue(e),this._stepDecimalPlaces),n=this.formatLabel(t,this.tooltipDurationFormat);return this._adapterO?this._adapterO.apply("getTooltipText",n):n},Object.defineProperty(i.prototype,"baseUnit",{get:function(){return this._baseUnit},set:function(e){this._baseUnit!=e&&(this._baseUnit=e,this.durationFormatter.baseUnit=e,this.invalidate())},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.baseUnit=e.baseUnit},i}(ee);_.registeredClasses.DurationAxis=ts,_.registeredClasses.DurationAxisDataItem=Lp;var $n=function(s){function i(){var e=s.call(this)||this;return e.className="LineSeriesDataItem",e}return w(i,s),i}(qn),is=function(s){function i(){var e=s.call(this)||this;return e.minDistance=.5,e.segments=new Oe(e.createSegment()),e.segments.template.applyOnClones=!0,e._disposers.push(new fe(e.segments)),e._disposers.push(e.segments.template),e._segmentsIterator=new fn(e.segments,function(){return e.segments.create()}),e._segmentsIterator.createNewItems=!0,e.className="LineSeries",e.strokeOpacity=1,e.fillOpacity=0,e.connect=!0,e.tensionX=1,e.tensionY=1,e.autoGapCount=1.1,e.smoothing="bezier",e.segmentsContainer=e.mainContainer.createChild(W),e.segmentsContainer.isMeasured=!1,e.bulletsContainer.toFront(),e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Line Series"))},i.prototype.createSegment=function(){return new es},i.prototype.createDataItem=function(){return new $n},i.prototype.setInitialWorkingValues=function(e){var t=this._yAxis.get(),n=this._xAxis.get();if(this.appeared&&this.visible){var r=this.dataItems.getIndex(e.index-1);if(e.component=this,this.baseAxis==n&&t instanceof ee){var a=t.minZoomed;if(r&&(a=r.values.valueY.workingValue),e.setWorkingValue("valueY",a,0),e.setWorkingValue("valueY",e.values.valueY.value),n instanceof Pe)e.setWorkingLocation("dateX",e.locations.dateX-1,0),e.setWorkingLocation("dateX",e.locations.dateX);else if(n instanceof ts&&r){var o=e.valueX;e.setWorkingValue("valueX",r.valueX,0),e.setWorkingValue("valueX",o)}}if(this.baseAxis==t&&n instanceof ee){var l=n.minZoomed;r&&(l=r.values.valueX.workingValue),e.setWorkingValue("valueX",l,0),e.setWorkingValue("valueX",e.values.valueX.value),t instanceof Pe?(e.setWorkingLocation("dateY",e.locations.dateX-1,0),e.setWorkingLocation("dateY",e.locations.dateY)):t instanceof ts&&r&&(o=e.valueY,e.setWorkingValue("valueY",r.valueY,0),e.setWorkingValue("valueY",o))}}else this.baseAxis==n&&t instanceof ee&&(n instanceof Pe&&e.setWorkingLocation("dateX",e.locations.dateX),n instanceof Ve&&e.setWorkingLocation("categoryX",e.locations.categoryX)),this.baseAxis==t&&n instanceof ee&&(t instanceof Pe&&e.setWorkingLocation("dateY",e.locations.dateY),t instanceof Ve&&e.setWorkingLocation("categoryY",e.locations.categoryY))},i.prototype.updateLegendValue=function(e,t){s.prototype.updateLegendValue.call(this,e,t),e&&e.segment&&(this.tooltipColorSource=e.segment)},i.prototype.validate=function(){var e=this;s.prototype.validate.call(this),this.xAxis&&this.yAxis&&(this._segmentsIterator.reset(),this.openSegmentWrapper(this._adjustedStartIndex),A(this.axisRanges.iterator(),function(t){e.openSegmentWrapper(e._adjustedStartIndex,t)}),A(this._segmentsIterator.iterator(),function(t){t.__disabled=!0}))},i.prototype.sliceData=function(){for(var e=this.startIndex,t=this.endIndex,n=this.startIndex-1;n>=0;n--)if((a=this.dataItems.getIndex(n))&&a.hasValue(this._xValueFields)&&a.hasValue(this._yValueFields)){e=n;break}this._adjustedStartIndex=this.findAdjustedIndex(e,["stroke","strokeWidth","strokeDasharray","strokeOpacity","fill","fillOpacity","opacity"]),n=this.endIndex;for(var r=this.dataItems.length;n=0;l--){var h=n.dataItems.getIndex(l);if(h&&v(h.properties[o])){e>l&&(e=l);break}}}),e},i.prototype.openSegmentWrapper=function(e,t){var n={index:e,axisRange:t};do n=this.openSegment(n.index,n.axisRange);while(n)},i.prototype.getSegment=function(){var e=this._segmentsIterator.getFirst();return e.series=this,e.isDisposed()?(this.segments.removeValue(e),this.getSegment()):e},i.prototype.openSegment=function(e,t){var n=!1,r=[];e=Math.min(e,this.dataItems.length);var a,o=Math.min(this._workingEndIndex,this.dataItems.length);this._workingEndIndex=Math.min(this._workingEndIndex,this.dataItems.length);var l=!1,h=this.getSegment();h.strokeDasharray=void 0,h.__disabled=!1,t?(h.parent=t.contents,De(t.contents,h,Ie)):(De(this,h,Ie),h.filters.clear(),h.parent=this.segmentsContainer),this.group.node.removeAttribute("fill");for(var p=this.connect,u=!1,d=e;d=n;h--){var p=this.dataItems.getIndex(h);p.hasValue(this._xValueFields)&&p.hasValue(this._yValueFields)&&this.addPoints(l,p,this.xOpenField,this.yOpenField,!0)}else{var u=this.baseAxis,d=t.length,c=this.xAxis,f=this.yAxis;d>0&&(u==c?(l.push({x:t[d-1].x,y:f.basePoint.y}),l.push({x:t[0].x,y:f.basePoint.y})):(l.push({x:c.basePoint.x,y:t[d-1].y}),l.push({x:c.basePoint.x,y:t[0].y})))}return this.drawSegment(e,t,l),o&&r++,r0){var o=e.createChild(Mn);De(this,o,Ie),o.width=n,o.height=r,o.y=0,o.strokeOpacity=0,o.visible=!0,a.y=0}var l=e.dataItem;l.color=this.stroke,l.colorOrig=this.fill,rt(this.bullets.iterator(),function(h){if(h instanceof It&&!h.copyToLegendMarker)return!1;var p=!1;if(h instanceof W&&A(h.children.iterator(),function(d){if(d instanceof $e)return p=!0,!0}),!p){var u=h.clone();return u.parent=e,u.isMeasured=!0,u.tooltipText=void 0,u.x=n/2,t.fillOpacity>0?u.y=0:u.y=r/2,u.visible=!0,v(u.fill)||(u.fill=t.fill),v(u.stroke)||(u.stroke=t.stroke),!1}})},i.prototype.disposeData=function(){s.prototype.disposeData.call(this),this.segments.clear()},Object.defineProperty(i.prototype,"autoGapCount",{get:function(){return this.getPropertyValue("autoGapCount")},set:function(e){this.setPropertyValue("autoGapCount",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"smoothing",{get:function(){return this.getPropertyValue("smoothing")},set:function(e){this.setPropertyValue("smoothing",e,!0)},enumerable:!0,configurable:!0}),i}(oi);_.registeredClasses.LineSeries=is,_.registeredClasses.LineSeriesDataItem=$n;var mo=function(s){function i(){var e=s.call(this)||this;return e.className="RadarSeriesDataItem",e.setLocation("dateX",0,0),e.setLocation("dateY",0,0),e.setLocation("categoryX",0,0),e.setLocation("categoryY",0,0),e.applyTheme(),e}return w(i,s),i}($n),vo=function(s){function i(){var e=s.call(this)||this;return e.className="RadarSeries",e.connectEnds=!0,e.applyTheme(),e}return w(i,s),i.prototype.validate=function(){this.chart.invalid&&this.chart.validate(),s.prototype.validate.call(this)},i.prototype.createDataItem=function(){return new mo},i.prototype.getPoint=function(e,t,n,r,a,o,l){o||(o="valueX"),l||(l="valueY");var h=oe({x:this.yAxis.getX(e,n,a,l),y:this.yAxis.getY(e,n,a,l)});h==0&&(h=1e-5);var p=this.xAxis.getAngle(e,t,r,o),u=this.chart.startAngle,d=this.chart.endAngle;return pd?void 0:{x:h*L(p),y:h*M(p)}},i.prototype.addPoints=function(e,t,n,r,a){var o=this.getPoint(t,n,r,t.locations[n],t.locations[r]);o&&e.push(o)},i.prototype.getMaskPath=function(){var e=this.yAxis.renderer;return Pi(e.startAngle,e.endAngle-e.startAngle,e.pixelRadius,e.pixelInnerRadius)},i.prototype.drawSegment=function(e,t,n){var r=this.yAxis.renderer;this.connectEnds&&Math.abs(r.endAngle-r.startAngle)==360&&(this.dataFields[this._xOpenField]||this.dataFields[this._yOpenField]||this.stacked)&&(t.push(t[0]),n.length>0&&n.unshift(n[n.length-1])),s.prototype.drawSegment.call(this,e,t,n)},Object.defineProperty(i.prototype,"connectEnds",{get:function(){return this.getPropertyValue("connectEnds")},set:function(e){this.setPropertyValue("connectEnds",e,!0)},enumerable:!0,configurable:!0}),i.prototype.positionBulletReal=function(e,t,n){var r=this.xAxis,a=this.yAxis;(tr.end||na.end)&&(e.visible=!1),e.moveTo(this.xAxis.renderer.positionToPoint(t,n))},i.prototype.setXAxis=function(e){s.prototype.setXAxis.call(this,e),this.updateRendererRefs()},i.prototype.setYAxis=function(e){s.prototype.setYAxis.call(this,e),this.updateRendererRefs()},i.prototype.updateRendererRefs=function(){var e=this.xAxis.renderer,t=this.yAxis.renderer;e.axisRendererY=t},i}(is);_.registeredClasses.RadarSeries=vo,_.registeredClasses.RadarSeriesDataItem=mo;var bo=function(s){function i(e){var t=s.call(this,e)||this;return t.className="AxisFillCircular",t.element=t.paper.add("path"),t.radius=F(100),t.applyTheme(),t}return w(i,s),i.prototype.draw=function(){if(s.prototype.draw.call(this),!this.__disabled&&!this.disabled&&this.axis){var e=this.axis.renderer;this.fillPath=e.getPositionRangePath(this.startPosition,this.endPosition,this.radius,v(this.innerRadius)?this.innerRadius:e.innerRadius,this.cornerRadius),this.path=this.fillPath}},Object.defineProperty(i.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(e){this.setPercentProperty("innerRadius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPercentProperty("radius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cornerRadius",{get:function(){return this.getPropertyValue("cornerRadius")},set:function(e){this.setPropertyValue("cornerRadius",e,!0)},enumerable:!0,configurable:!0}),i}(qr);_.registeredClasses.AxisFillCircular=bo;var xo=function(s){function i(){var e=s.call(this)||this;return e.className="GridCircular",e.pixelPerfect=!1,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(e){this.setPercentProperty("innerRadius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPercentProperty("radius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),i}(Qi);_.registeredClasses.GridCircular=xo;var Jn=function(s){function i(){var e=s.call(this)||this;return e.fdx=0,e.fdy=0,e.className="AxisLabelCircular",e.padding(0,0,0,0),e.location=.5,e.locationOnPath=.5,e.radius=0,e.isMeasured=!1,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"relativeRotation",{get:function(){return this.getPropertyValue("relativeRotation")},set:function(e){if(this.setPropertyValue("relativeRotation",e,!0),!v(e)){this.rotation=void 0;var t=this.dataItem;t&&t.component&&t.component.invalidateDataItems()}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPercentProperty("radius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bent",{get:function(){return this.getPropertyValue("bent")},set:function(e){this.setPropertyValue("bent",e,!0),this.setPropertyValue("wrap",!1),this.setPropertyValue("horizontalCenter","none"),this.setPropertyValue("verticalCenter","none"),e?(this.setPropertyValue("dx",0),this.setPropertyValue("dy",0),this.setPropertyValue("x",0),this.setPropertyValue("y",0),this.setPropertyValue("rotation",0),this.fdx=0,this.fdy=0,this.textAlign="middle"):this.textPathElement&&(this.textPathElement.dispose(),this.textPathElement=void 0)},enumerable:!0,configurable:!0}),i.prototype.pixelRadius=function(e){var t=1;return this.inside&&(t=-1),xe(this.radius,e)*t},i.prototype.pixelRadiusY=function(e,t){var n=1;this.inside&&(n=-1);var r=this.radius;return y(r)?xe(r*=t/e,e)*n:xe(r,t)*n},i.prototype.fixPosition=function(e,t,n,r,a){y(n)||(n=t),y(r)||(r=0),y(a)||(a=0);var o={x:t*L(e),y:n*M(e)};this.invalid&&this.validate();var l=!1,h=this.radius;(h instanceof te&&h.value<0||h<0)&&(l=!0);var p=this.relativeRotation,u=this.pixelRadius(t);if(this.bent){var d={x:(t+u)*L(e+180),y:(n+u*n/t)*M(e+180)};return this.path=E(d)+Le(e+180,360,t+u,n+u*n/t),void(this.textPathElement&&this.textPathElement.attr({startOffset:100*this.locationOnPath+"%"}))}if(y(p)){this.horizontalCenter="none",this.verticalCenter="none",e=bt(e,-180,180);var c=this.bbox.width,f=this.bbox.height,g=this.pixelPaddingBottom,m=this.pixelPaddingTop,x=this.pixelPaddingLeft,b=this.pixelPaddingRight;e>90||e<-90?p==-90&&(p=90,c=0):(p==-90&&(f=-f),p==90&&(p=-90,c=-x-b,f=-f-m-g)),this.rotation=p+e+90;var C=M(p)/2,S=L(p)/2,P=this.rotation;this.dx=f*C*M(P)-c*S*L(P),this.dy=-f*C*L(P)-c*S*M(P),this.inside?e>90||e<-90?u-=(g+m)*L(p)+(x+b)*M(p):u+=(g+this.bbox.height+m)*L(p)+(x+b+this.bbox.width)*M(p):u+=(f+g+m)*L(p)+(c+x+b)*M(p),o.x+=L(e)*u,o.y+=M(e)*u*n/t}else this.horizontalCenter="middle",this.verticalCenter="middle",l?(this.dx=0,this.dy=0,o.x=(t+u)*L(e),o.y=(n+u*n/t)*M(e)):(this.dy=this._measuredHeight/2*M(e),this.dx=this._measuredWidth/2*L(e),o.x+=L(e)*u,o.y+=M(e)*u*n/t);o.x+=r,o.y+=a,this.fdx=this.dx,this.fdy=this.dy,this.moveTo(o)},i}($r);_.registeredClasses.AxisLabelCircular=Jn;var _o=function(s){function i(){var e=s.call(this)||this;return e.pixelRadiusReal=0,e.layout="none",e.className="AxisRendererCircular",e.isMeasured=!1,e.startAngle=-90,e.endAngle=270,e.useChartAngles=!0,e.radius=F(100),e.isMeasured=!1,e.grid.template.location=0,e.labels.template.location=0,e.labels.template.radius=15,e.ticks.template.location=0,e.ticks.template.pixelPerfect=!1,e.tooltipLocation=0,e.line.strokeOpacity=0,e.applyTheme(),e}return w(i,s),i.prototype.setAxis=function(e){var t=this;s.prototype.setAxis.call(this,e),e.isMeasured=!1;var n=e.tooltip;n.adapter.add("dx",function(r,a){var o=at({x:a.pixelX,y:a.pixelY},t);return t.pixelRadius*Math.cos(Math.atan2(o.y,o.x))-o.x}),n.adapter.add("dy",function(r,a){var o=at({x:a.pixelX,y:a.pixelY},t);return t.pixelRadius*Math.sin(Math.atan2(o.y,o.x))-o.y})},i.prototype.validate=function(){this.chart&&this.chart.invalid&&this.chart.validate(),s.prototype.validate.call(this)},Object.defineProperty(i.prototype,"axisLength",{get:function(){return 2*Math.PI*this.pixelRadius},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPercentProperty("radius",e,!1,!1,10,!1)&&this.axis&&this.axis.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelRadius",{get:function(){return Re(this.radius,this.pixelRadiusReal)||0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"innerRadius",{get:function(){var e=this.chart,t=this.getPropertyValue("innerRadius");if(e){if(v(t)){if(t instanceof te&&e){var n=e.mr,r=t.value;t=F(100*(r=Math.max(n*r,n-Math.min(e.plotContainer.innerHeight,e.plotContainer.innerWidth))/n))}}else(t=e.innerRadius)instanceof te&&e&&(t=F(t.value*e.innerRadiusModifyer*100));return t}},set:function(e){this.setPercentProperty("innerRadius",e,!1,!1,10,!1)&&this.axis&&this.axis.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"useChartAngles",{get:function(){return this.getPropertyValue("useChartAngles")},set:function(e){this.setPropertyValue("useChartAngles",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelInnerRadius",{get:function(){return Re(this.innerRadius,this.pixelRadiusReal)||0},enumerable:!0,configurable:!0}),i.prototype.positionToPoint=function(e,t){y(t)||(t=1);var n=this.positionToCoordinate(e),r=this.startAngle+(this.endAngle-this.startAngle)*n/this.axisLength,a=this.pixelRadius,o=this.pixelInnerRadius;if(this.axisRendererY){var l=R(this.axisRendererY.positionToCoordinate(t),0,1/0);return l==0&&(l=1e-6),{x:l*L(r),y:l*M(r)}}return{x:L(r)*o+(a-o)*L(r)*t,y:M(r)*o+(a-o)*M(r)*t}},i.prototype.positionToAngle=function(e){var t=this.axis,n=(this.endAngle-this.startAngle)/(t.end-t.start);return V(t.renderer.inversed?this.startAngle+(t.end-e)*n:this.startAngle+(e-t.start)*n,3)},i.prototype.angleToPosition=function(e){var t=this.axis,n=(this.endAngle-this.startAngle)/(t.end-t.start);return V(t.renderer.inversed?t.end-(e-this.startAngle)/n:(e-this.startAngle)/n+t.start,5)},i.prototype.updateAxisLine=function(){var e=this.pixelRadius,t=this.startAngle,n=ie(360,this.endAngle-t);this.line.path=E({x:e*L(t),y:e*M(t)})+Le(t,n,e,e)},i.prototype.updateGridElement=function(e,t,n){t+=(n-t)*e.location;var r=this.positionToPoint(t);if(y(r.x)&&y(r.y)&&e.element){var a=vt*Math.atan2(r.y,r.x),o=Re(v(e.radius)?e.radius:F(100),this.pixelRadius),l=Re(e.innerRadius,this.pixelRadius);e.zIndex=0;var h=Re(y(l)?l:this.innerRadius,this.pixelRadiusReal,!0);y(h)||(h=0),e.path=E({x:h*L(a),y:h*M(a)})+T({x:o*L(a),y:o*M(a)})}this.toggleVisibility(e,t,0,1)},i.prototype.updateTickElement=function(e,t,n){t+=(n-t)*e.location;var r=this.positionToPoint(t);if(e.element){var a=this.pixelRadius,o=vt*Math.atan2(r.y,r.x),l=e.length;e.inside&&(l=-l),e.zIndex=1,e.path=E({x:a*L(o),y:a*M(o)})+T({x:(a+l)*L(o),y:(a+l)*M(o)})}this.toggleVisibility(e,t,0,1)},i.prototype.updateBullet=function(e,t,n){var r=.5;e instanceof tn&&(r=e.location),t+=(n-t)*r;var a=this.positionToPoint(t),o=this.pixelRadius,l=vt*Math.atan2(a.y,a.x);a={x:o*L(l),y:o*M(l)},this.positionItem(e,a),this.toggleVisibility(e,t,0,1)},i.prototype.updateLabelElement=function(e,t,n,r){v(r)||(r=e.location),t+=(n-t)*r,e.fixPosition(this.positionToAngle(t),this.pixelRadius),e.zIndex=2,this.toggleVisibility(e,t,this.minLabelPosition,this.maxLabelPosition)},i.prototype.fitsToBounds=function(e){return!0},Object.defineProperty(i.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(e){this.setPropertyValue("startAngle",e)&&(this.invalidateAxisItems(),this.axis&&this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(e){this.setPropertyValue("endAngle",e)&&(this.invalidateAxisItems(),this.axis&&this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),i.prototype.getPositionRangePath=function(e,t,n,r,a){var o="";if(y(e)&&y(t)){v(n)||(n=this.radius),e=q(e,this.axis.start),(t=ie(t,this.axis.end))0&&d&&p&&p instanceof Ve){var c=p.renderer.grid.template.location,f=p.getAngle(d.dataItems.getIndex(0),"categoryX",c);r=E({x:a*L(f),y:a*M(f)});for(var g=1;g0&&c&&d&&d instanceof Ve){var g=d.renderer.grid.template.location,m=d.getAngle(c.dataItems.getIndex(0),"categoryX",g);n=E({x:l*L(m),y:l*M(m)});for(var x=1;x=0;x--)n+=T({x:o*L(m=d.getAngle(c.dataItems.getIndex(x),"categoryX",g)),y:o*M(m)})}else n=Pi(h,p,l,o);return n},i.prototype.updateBreakElement=function(e){var t=e.startLine,n=e.endLine,r=e.fillShape,a=e.startPoint,o=e.endPoint;t.radius=Math.abs(a.y),n.radius=Math.abs(o.y),r.radius=Math.abs(o.y),r.innerRadius=Math.abs(a.y)},i.prototype.createBreakSprites=function(e){e.startLine=new Hn,e.endLine=new Hn,e.fillShape=new Hn},i.prototype.updateTooltip=function(){if(this.axis){var e=this.axisAngle;e<0&&(e+=360);var t="vertical";(e>45&&e<135||e>225&&e<315)&&(t="horizontal"),this.axis.updateTooltip(t,{x:-4e3,y:-4e3,width:8e3,height:8e3})}},i.prototype.updateTickElement=function(e,t,n){t+=(n-t)*e.location;var r=this.positionToPoint(t);if(e.element){var a=Zt(this.axisAngle+90);a/90!=Math.round(a/90)?e.pixelPerfect=!1:e.pixelPerfect=!0;var o=-e.length;e.inside&&(o*=-1),e.path=E({x:0,y:0})+T({x:o*L(a),y:o*M(a)})}this.positionItem(e,r),this.toggleVisibility(e,t,0,1)},i.prototype.updateBullet=function(e,t,n){var r=.5;e instanceof tn&&(r=e.location),t+=(n-t)*r;var a=this.positionToPoint(t);this.positionItem(e,a),this.toggleVisibility(e,t,0,1)},i.prototype.positionToCoordinate=function(e){var t=this.axis,n=t.axisFullLength,r=this.pixelInnerRadius;return V(t.renderer.inversed?(t.end-e)*n+r:(e-t.start)*n+r,1)},i.prototype.pointToPosition=function(e){var t=oe(e)-this.pixelInnerRadius;return this.coordinateToPosition(t)},Object.defineProperty(i.prototype,"chart",{get:function(){return this._chart.get()},set:function(e){this._chart.set(e,null)},enumerable:!0,configurable:!0}),i}(mt);_.registeredClasses.AxisRendererRadial=Po;var jp=function(s){function i(){var e=s.call(this)||this;return e.className="RadarChartDataItem",e.applyTheme(),e}return w(i,s),i}(Qr),wo=function(s){function i(){var e=s.call(this)||this;e._axisRendererX=_o,e._axisRendererY=Po,e.innerRadiusModifyer=1,e.mr=1,e.className="RadarChart",e.startAngle=-90,e.endAngle=270,e.radius=F(80),e.innerRadius=0;var t=e.plotContainer.createChild(W);return t.shouldClone=!1,t.layout="absolute",t.align="center",t.valign="middle",e.seriesContainer.parent=t,e.radarContainer=t,e.bulletsContainer.parent=t,e.axisBulletsContainer=t,e._cursorContainer=t,e.chartContainer.events.on("maxsizechanged",e.invalidate,e,!1),e._bulletMask=t.createChild(ii),e._bulletMask.shouldClone=!1,e._bulletMask.element=e.paper.add("path"),e._bulletMask.opacity=0,e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Radar chart"))},i.prototype.processAxis=function(e){s.prototype.processAxis.call(this,e);var t=e.renderer;t.gridContainer.parent=t,t.breakContainer.parent=t,e.parent=this.radarContainer,t.toBack()},i.prototype.handleXAxisRangeChange=function(){s.prototype.handleXAxisRangeChange.call(this),A(this.yAxes.iterator(),function(e){e.invalidate()})},i.prototype.handleYAxisRangeChange=function(){s.prototype.handleYAxisRangeChange.call(this),A(this.xAxes.iterator(),function(e){e.invalidate()})},i.prototype.processConfig=function(e){if(e&&(v(e.cursor)&&!v(e.cursor.type)&&(e.cursor.type="RadarCursor"),v(e.series)&&Ae(e.series)))for(var t=0,n=e.series.length;ta&&(this.rotation=a+360),this.animate({property:"rotation",to:r},t,n)}},Object.defineProperty(i.prototype,"currentPosition",{get:function(){if(this.axis)return this.axis.renderer.angleToPosition(this.rotation)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"value",{get:function(){return this._value},set:function(e){this.showValue(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"axis",{get:function(){return this._axis.get()},set:function(e){if(this.axis!=e&&this._axis.set(e,new _e([e.events.on("datavalidated",this.updateValue,this,!1),e.events.on("datarangechanged",this.updateValue,this,!1),e.events.on("dataitemsvalidated",this.updateValue,this,!1),e.events.on("propertychanged",this.invalidate,this,!1)])),e){var t=e.chart;t&&(this.rotation=t.startAngle)}this.parent=e.renderer,this.zIndex=5},enumerable:!0,configurable:!0}),i.prototype.updateValue=function(){this.value=this.value},i.prototype.processConfig=function(e){e&&v(e.axis)&&J(e.axis)&&this.map.hasKey(e.axis)&&(e.axis=this.map.getKey(e.axis)),s.prototype.processConfig.call(this,e)},i}(W);_.registeredClasses.ClockHand=Co;var Od=function(s){function i(){var e=s.call(this)||this;return e.className="GaugeChartDataItem",e.applyTheme(),e}return w(i,s),i}(jp),Ep=function(s){function i(){var e=s.call(this)||this;return e.className="GaugeChart",e.startAngle=180,e.endAngle=360,e.hands=new Oe(new Co),e.hands.events.on("inserted",e.processHand,e,!1),e._disposers.push(new fe(e.hands)),e._disposers.push(e.hands.template),e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Gauge chart"))},i.prototype.processHand=function(e){var t=e.newValue;t.axis||(t.axis=this.xAxes.getIndex(0))},i.prototype.configOrder=function(e,t){return e==t?0:e=="hands"?1:t=="hands"?-1:s.prototype.configOrder.call(this,e,t)},i}(wo);_.registeredClasses.GaugeChart=Ep;var ns=function(s){function i(){var e=s.call(this)||this;return e.className="PercentSeriesDataItem",e.applyTheme(),e}return w(i,s),i.prototype.uidAttr=function(){return this.slice.uidAttr()},i.prototype.hide=function(e,t,n,r){return r||(r=["value"]),s.prototype.hide.call(this,e,t,0,r)},i.prototype.setVisibility=function(e,t){t||(e?this.setWorkingValue("value",this.values.value.value,0,0):this.setWorkingValue("value",0,0,0)),s.prototype.setVisibility.call(this,e,t)},i.prototype.show=function(e,t,n){return n||(n=["value"]),s.prototype.show.call(this,e,t,n)},Object.defineProperty(i.prototype,"category",{get:function(){return this.properties.category},set:function(e){this.setProperty("category",e)},enumerable:!0,configurable:!0}),i.prototype.createLegendMarker=function(e){this.component.createLegendMarker(e,this)},Object.defineProperty(i.prototype,"legendDataItem",{get:function(){return this._legendDataItem},set:function(e){this._legendDataItem=e,e.label&&(e.label.dataItem=this),e.valueLabel&&(e.valueLabel.dataItem=this)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tick",{get:function(){var e=this;if(!this._tick){var t=this.component.ticks.create();this._tick=t,this.addSprite(t),this._disposers.push(t),t.parent=this.component.ticksContainer,this._disposers.push(new le(function(){e.component&&e.component.ticks.removeValue(t)})),t.visible=this.visible}return this._tick},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"label",{get:function(){var e=this;if(!this._label){var t=this.component.labels.create();this.addSprite(t),this._label=t,this._disposers.push(t),t.parent=this.component.labelsContainer,this._disposers.push(new le(function(){e.component&&e.component.labels.removeValue(t)})),t.visible=this.visible}return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"slice",{get:function(){var e=this;if(!this._slice){var t=this.component,n=t.slices.create();this.addSprite(n),this._slice=n,this._disposers.push(n),n.parent=t.slicesContainer,this._disposers.push(new le(function(){t.slices.removeValue(n)})),n.visible=this.visible,t.itemsFocusable()?(v(this.component.role)||(this.component.role="menu"),v(n.role)||(n.role="menuitem"),n.focusable=!0):(v(this.component.role)||(this.component.role="list"),v(n.role)||(n.role="listitem"),n.focusable=!1),n.focusable&&(n.events.on("focus",function(r){n.readerTitle=t.populateString(t.itemReaderText,e)},void 0,!1),n.events.on("blur",function(r){n.readerTitle=""},void 0,!1)),n.hoverable&&(n.events.on("over",function(r){n.readerTitle=t.populateString(t.itemReaderText,e)},void 0,!1),n.events.on("out",function(r){n.readerTitle=""},void 0,!1))}return this._slice},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hiddenInLegend",{get:function(){return this.properties.hiddenInLegend},set:function(e){this.setProperty("hiddenInLegend",e)},enumerable:!0,configurable:!0}),i}(Yn),Qn=function(s){function i(){var e=s.call(this)||this;e.className="PercentSeries",e._addAllDataItems=!1,e.colors=new $i,e.colors.step=1,e.isMeasured=!0,e.calculatePercent=!0;var t=e.createChild(W);t.shouldClone=!1,t.isMeasured=!1,e.slicesContainer=t;var n=e.createChild(W);n.shouldClone=!1,n.isMeasured=!1,n.layout="none",e.ticksContainer=n;var r=e.createChild(W);return r.shouldClone=!1,r.isMeasured=!1,r.layout="none",e.labelsContainer=r,e.alignLabels=!1,e.bulletsContainer.toFront(),e.skipFocusThreshold=50,e.defaultState.transitionEasing=Sa,e.itemReaderText="{category}: {value.percent.formatNumber('#.#p')}",e.applyTheme(),e}return w(i,s),i.prototype.createSlice=function(){return new $},i.prototype.createTick=function(){return new en},i.prototype.createLabel=function(){return new $e},Object.defineProperty(i.prototype,"slices",{get:function(){if(!this._slices){var e=this.createSlice();e.applyOnClones=!0,this._disposers.push(e),this.initSlice(e),this._slices=new Oe(e),this._disposers.push(new fe(this._slices))}return this._slices},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"ticks",{get:function(){if(!this._ticks){var e=this.createTick();e.applyOnClones=!0,this._disposers.push(e),this.initTick(e),this._ticks=new Oe(e),this._disposers.push(new fe(this._ticks))}return this._ticks},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"labels",{get:function(){if(!this._labels){var e=this.createLabel();e.applyOnClones=!0,this._disposers.push(e),this.initLabel(e),this._labels=new Oe(e),this._disposers.push(new fe(this._labels))}return this._labels},enumerable:!0,configurable:!0}),i.prototype.createDataItem=function(){return new ns},i.prototype.initSlice=function(e){},i.prototype.initLabel=function(e){e.text="{category}: {value.percent.formatNumber('#.0p')}",e.isMeasured=!1,e.padding(5,5,5,5)},i.prototype.initTick=function(e){},i.prototype.validateDataItems=function(){this.colors.reset(),this.patterns&&this.patterns.reset(),s.prototype.validateDataItems.call(this)},i.prototype.validateDataElement=function(e){var t=e.slice;t&&(t.fill==null?this.patterns?(v(t.stroke)||(t.stroke=this.colors.next()),t.fill=this.patterns.next(),v(t.fillOpacity)&&(t.fill.backgroundOpacity=t.fillOpacity),t.stroke instanceof se&&(t.fill.stroke=t.stroke,t.fill.fill=t.stroke)):t.fill=this.colors.next():this.colors.currentStep+=this.colors.step,t.stroke==null&&(t.stroke=t.fill)),s.prototype.validateDataElement.call(this,e),t&&e.bullets.each(function(n,r){r.fill==null&&(r.fill=t.fill),r.stroke==null&&(r.stroke=t.stroke)}),this.updateLegendValue(e)},i.prototype.validateData=function(){s.prototype.validateData.call(this),this.chart&&this.chart.feedLegend()},i.prototype.arrangeLabels=function(e){for(var t=0,n=e.length;t=0;n--){var r=e[n].label;if(r){r.invalid&&r.validate();var a=r.measuredHeight;r.visible||(a=0),n==e.length-1&&(t+=a/2),r.pixelY+a>t&&(r.y=t-a,t=r.y)}}},i.prototype.getNextLabel=function(e,t){if(t.length>=e){var n=t[e];if(n)return n.label&&n.visible?n.label:this.getNextLabel(e+1,t)}},Object.defineProperty(i.prototype,"colors",{get:function(){return this.getPropertyValue("colors")},set:function(e){this.setPropertyValue("colors",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"patterns",{get:function(){return this.getPropertyValue("patterns")},set:function(e){this.setPropertyValue("patterns",e,!0)},enumerable:!0,configurable:!0}),i.prototype.createLegendMarker=function(e,t){A(e.children.iterator(),function(n){var r=t.slice;n.defaultState.properties.fill=r.fill,n.defaultState.properties.stroke=r.stroke,n.defaultState.properties.fillOpacity=r.fillOpacity,n.defaultState.properties.strokeOpacity=r.strokeOpacity,n.fill=r.fill,n.stroke=r.stroke,n.fillOpacity=r.fillOpacity,n.strokeOpacity=r.strokeOpacity,n.fill==null&&(n.__disabled=!0);var a=e.dataItem;a.color=r.fill,a.colorOrig=r.fill,n.addDisposer(r.events.on("propertychanged",function(o){o.property=="fill"&&(n.__disabled=!1,n.isActive||(n.fill=r.fill),n.defaultState.properties.fill=r.fill,a.color=r.fill,a.colorOrig=r.fill),o.property=="stroke"&&(n.isActive||(n.stroke=r.stroke),n.defaultState.properties.stroke=r.stroke),o.property=="strokeOpacity"&&(n.isActive||(n.strokeOpacity=r.strokeOpacity),n.defaultState.properties.strokeOpacity=r.strokeOpacity)},void 0,!1))})},i.prototype.handleSliceScale=function(e){var t=this,n=e.target.dataItem;n&&n.bullets&&A(n.bullets.iterator(),function(r){var a=r[1];t.positionBullet(a)})},i.prototype.handleSliceMove=function(e){},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.slices.template.copyFrom(e.slices.template),this.labels.template.copyFrom(e.labels.template),this.ticks.template.copyFrom(e.ticks.template),this.colors=e.colors.clone()},Object.defineProperty(i.prototype,"alignLabels",{get:function(){return this.getPropertyValue("alignLabels")},set:function(e){this.setAlignLabels(e)},enumerable:!0,configurable:!0}),i.prototype.setAlignLabels=function(e){this.setPropertyValue("alignLabels",e,!0)},Object.defineProperty(i.prototype,"ignoreZeroValues",{get:function(){return this.getPropertyValue("ignoreZeroValues")},set:function(e){this.setPropertyValue("ignoreZeroValues",e,!0)},enumerable:!0,configurable:!0}),i.prototype.updateLegendValue=function(e){if(e){var t=e.legendDataItem,n=e.legendSettings;t&&n&&n&&(n.labelText&&(t.label.text=n.labelText),n.itemLabelText&&(t.label.text=n.itemLabelText),n.valueText&&(t.valueLabel.text=n.valueText),n.itemValueText&&(t.valueLabel.text=n.itemValueText))}},i}(zn);_.registeredClasses.PercentSeries=Qn,_.registeredClasses.PercentSeriesDataItem=ns,Ne.push({relevant:Ue.maybeXS,state:function(s,i){if(s instanceof Qn){var e=s.states.create(i);return s.labels.template.states.create(i).properties.disabled=!0,s.ticks.template.states.create(i).properties.disabled=!0,e}return null}});var Oo=function(s){function i(){var e=s.call(this)||this;return e.className="PercentChartDataItem",e.applyTheme(),e}return w(i,s),i}(ho),So=function(s){function i(){var e=s.call(this)||this;return e.className="PercentChart",e.align="none",e.valign="none",e.chartContainer.minHeight=50,e.chartContainer.minWidth=50,e.applyTheme(),e}return w(i,s),i.prototype.validateData=function(){s.prototype.validateData.call(this),this.feedLegend()},i.prototype.feedLegend=function(){var e=this.legend;if(e){var t=[];A(this.series.iterator(),function(n){n.hiddenInLegend||A(n.dataItems.iterator(),function(r){r.hiddenInLegend||(t.push(r),r.legendSettings||(r.legendSettings=n.legendSettings))})}),e.data=t,e.dataFields.name="category"}},i.prototype.createSeries=function(){return new Qn},i.prototype.setLegend=function(e){s.prototype.setLegend.call(this,e),e&&(e.labels.template.text="{category}",e.valueLabels.template.text="{value.percent.formatNumber('#.0p')}",e.itemContainers.template.events.on("over",function(t){var n=t.target.dataItem.dataContext;if(n.visible&&!n.isHiding){var r=n.slice;r.dispatchImmediately("over"),r.isHover=!0,r.interactions.isRealHover=!0}}),e.itemContainers.template.events.on("out",function(t){var n=t.target.dataItem.dataContext.slice;n.dispatchImmediately("out"),n.isHover=!1}))},i}(Zr);_.registeredClasses.PercentChart=So,_.registeredClasses.PercentChartDataItem=Oo;var Io=function(s){function i(){var e=s.call(this)||this;return e._label=new Me,e._slice=new Me,e.className="PieTick",e.element=e.paper.add("polyline"),e._disposers.push(e._label),e._disposers.push(e._slice),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.slice,t=this.label,n=e.dataItem.component;if(e&&e.radius>0&&t&&t.text){var r=e.dx+e.slice.dx+e.pixelX+e.ix*e.radius*e.scale,a=e.dy+e.slice.dy+e.pixelY+e.iy*e.radiusY*e.scale,o=void 0,l=void 0,h=void 0,p=void 0;if(n.alignLabels)o=t.pixelX-this.length,l=t.pixelY,h=t.pixelX,p=l,t.horizontalCenter=="right"&&(h=(o+=2*this.length)-this.length);else{var u=t.pixelRadius(e.radius);h=o=r+u*e.ix,p=l=a+u*e.iy}this.element.attr({points:[r,a,o,l,h,p]})}},Object.defineProperty(i.prototype,"slice",{get:function(){return this._slice.get()},set:function(e){this._slice.set(e,new _e([e.events.on("transformed",this.invalidate,this),e.events.on("validated",this.invalidate,this)]))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"label",{get:function(){return this._label.get()},set:function(e){this._label.set(e,e.events.on("transformed",this.invalidate,this,!1))},enumerable:!0,configurable:!0}),i}(en);_.registeredClasses.PieTick=Io;var rs=function(s){function i(){var e=s.call(this)||this;return e.className="PieSeriesDataItem",e.values.radiusValue={},e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"radiusValue",{get:function(){return this.values.radiusValue.value},set:function(e){this.setValue("radiusValue",e)},enumerable:!0,configurable:!0}),i.prototype.hide=function(e,t,n,r){return s.prototype.hide.call(this,e,t,0,["value","radiusValue"])},i.prototype.show=function(e,t,n){return s.prototype.show.call(this,e,t,["value","radiusValue"])},i}(ns),ss=function(s){function i(){var e=s.call(this)||this;return e.className="PieSeries",e.alignLabels=!0,e.layout="none",e.labels.template.radius=F(5),e.addDisposer(e.labels.template.events.on("enabled",e.invalidate,e,!1)),e.applyTheme(),e}return w(i,s),i.prototype.createSlice=function(){return new ri},i.prototype.createTick=function(){return new Io},i.prototype.createLabel=function(){return new Jn},i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Pie Slice Series"))},i.prototype.createDataItem=function(){return new rs},i.prototype.initSlice=function(e){e.isMeasured=!1,e.defaultState.properties.scale=1,e.observe("scale",this.handleSliceScale,this),e.observe(["dx","dy","x","y","shiftRadius"],this.handleSliceMove,this),e.tooltipText="{category}: {value.percent.formatNumber('#.#p')} ({value.value})",e.states.create("hover").properties.scale=1.05,e.defaultState.properties.shiftRadius=0,e.togglable=!0,e.events.on("toggled",function(t){t.target.hideTooltip(),t.target.interactions.lastHitPointer&&t.target.interactions.lastHitPointer.touch&&!t.target.isActive&&(t.target.isHover=!1)}),e.states.create("active").properties.shiftRadius=.1},i.prototype.validate=function(){this._leftItems=[],this._rightItems=[],this._currentStartAngle=this.startAngle,this._arcRect=xt(this.startAngle,this.endAngle),this._maxRadiusPercent=0;for(var e=this.startIndex;ethis._maxRadiusPercent&&(this._maxRadiusPercent=t)}s.prototype.validate.call(this),this.alignLabels&&(this.startAngle>this.endAngle?this._rightItems.reverse():this._leftItems.reverse(),this._rightItems.sort(function(n,r){var a=(n.slice.middleAngle+360)%360,o=(r.slice.middleAngle+360)%360;return a>270&&(a-=360),o>270&&(o-=360),ao?1:0}),this._leftItems.sort(function(n,r){var a=(n.slice.middleAngle+360)%360,o=(r.slice.middleAngle+360)%360;return ao?-1:0}),this.arrangeLabels(this._rightItems),this.arrangeLabels2(this._rightItems),this.arrangeLabels(this._leftItems),this.arrangeLabels2(this._leftItems))},i.prototype.validateDataElement=function(e){if(this.pixelRadius>0){!this.ignoreZeroValues||e.value!=0&&e.value!=null?e.__disabled=!1:e.__disabled=!0;var t=e.slice;if(t.radius=this.pixelRadius,y(e.radiusValue)&&(t.radius=this.pixelInnerRadius+(this.pixelRadius-this.pixelInnerRadius)*e.values.radiusValue.percent/this._maxRadiusPercent),t.innerRadius instanceof te||(t.innerRadius=this.pixelInnerRadius),t.startAngle=this._currentStartAngle,t.arc=Math.abs(e.values.value.percent)*(this.endAngle-this.startAngle)/100,!this.labels.template.disabled){var n=e.label,r=e.tick;r.slice=t,r.label=n;var a=(t.middleAngle+360)%360,o=void 0;if(this.alignLabels){var l=n.pixelRadius(t.radius),h=r.length+l;n.dx=0,n.dy=0,n.verticalCenter="middle";var p=this._arcRect;a>270||a<=90?(h+=(p.width+p.x)*this.pixelRadius,n.horizontalCenter="left",this._rightItems.push(e)):(h-=p.x*this.pixelRadius,n.horizontalCenter="right",this._leftItems.push(e),h*=-1);var u=t.radius+r.length+l;o={x:h,y:t.iy*u},n.moveTo(o)}else{var d=t.depth;y(d)||(d=0),n.fixPosition(t.middleAngle,t.radius,t.radiusY,0,-d)}}this._currentStartAngle+=t.arc,s.prototype.validateDataElement.call(this,e)}},Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPercentProperty("radius",e,!0,!1,10,!1)&&this.invalidateDataItems()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelRadius",{get:function(){return this._pixelRadius},set:function(e){this._pixelRadius!=e&&(this._pixelRadius=e,this.invalidateDataItems())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pixelInnerRadius",{get:function(){return this._pixelInnerRadius},set:function(e){this._pixelInnerRadius!=e&&(this._pixelInnerRadius=e,this.invalidateDataItems())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(e){this.setPercentProperty("innerRadius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startAngle",{get:function(){var e=this.getPropertyValue("startAngle");return y(e)?e:this._startAngleInternal},set:function(e){this.setPropertyValue("startAngle",Zt(e),!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endAngle",{get:function(){var e=this.getPropertyValue("endAngle");return y(e)?e:this._endAngleInternal},set:function(e){this.setPropertyValue("endAngle",e,!0)},enumerable:!0,configurable:!0}),i.prototype.positionBullet=function(e){s.prototype.positionBullet.call(this,e);var t=e.dataItem.slice,n=e.locationX;y(n)||(n=.5);var r=e.locationY;y(r)||(r=1);var a=t.startAngle+t.arc*n;e.x=r*t.radius*L(a),e.y=r*t.radiusY*M(a)},i.prototype.handleSliceMove=function(e){if(!this.alignLabels){var t=e.target,n=t.dataItem;if(n){var r=n.label;r&&(r.dx=r.fdx+t.dx+t.pixelX,r.dy=r.fdy+t.dy+t.pixelY)}}},Object.defineProperty(i.prototype,"bbox",{get:function(){if(this.definedBBox)return this.definedBBox;var e=this.chart;return e?xt(e.startAngle,e.endAngle,this.pixelRadius):xt(this.startAngle,this.endAngle,this.pixelRadius)},enumerable:!0,configurable:!0}),i}(Qn);_.registeredClasses.PieSeries=ss,_.registeredClasses.PieSeriesDataItem=rs;var Do=function(s){function i(){var e=s.call(this)||this;return e.className="PieChartDataItem",e.applyTheme(),e}return w(i,s),i}(Oo),To=function(s){function i(){var e=s.call(this)||this;e.className="PieChart",e.innerRadius=0,e.radius=F(80),e.align="none",e.valign="none",e.startAngle=-90,e.endAngle=270;var t=e.seriesContainer;return t.isMeasured=!0,t.valign="middle",t.align="center",t.layout="absolute",t.width=void 0,t.height=void 0,e.chartContainer.minHeight=50,e.chartContainer.minWidth=50,e.chartContainer.events.on("maxsizechanged",e.updateRadius,e,!1),e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Pie chart"))},i.prototype.validateLayout=function(){s.prototype.validateLayout.call(this),this.updateRadius()},i.prototype.handleSeriesAdded=function(e){s.prototype.handleSeriesAdded.call(this,e),this._chartPixelRadius=void 0,this.updateSeriesAngles()},i.prototype.updateSeriesAngles=function(){var e=this;this.series.each(function(t){t._startAngleInternal=e.startAngle,t._endAngleInternal=e.endAngle})},i.prototype.updateRadius=function(){var e=this.chartContainer,t=xt(this.startAngle,this.endAngle,1),n={x:0,y:0,width:0,height:0},r=this.innerRadius;r instanceof te&&(n=xt(this.startAngle,this.endAngle,r.value)),t=Mi([t,n]);var a=Math.min(e.innerWidth/t.width,e.innerHeight/t.height);y(a)||(a=0);var o=Re(this.radius,a),l=Re(this.innerRadius,a),h=(o-l)/this.series.length;o==this._chartPixelRadius&&l==this._chartPixelInnerRadius||(this._chartPixelRadius=o,this._chartPixelInnerRadius=l,A($t(this.series.iterator()),function(p){var u=p[0],d=p[1],c=l+Re(d.radius,o-l),f=l+Re(d.innerRadius,o-l);y(c)||(c=l+h*(u+1)),y(f)||(f=l+h*u),d.pixelRadius=c,d.pixelInnerRadius=f}),this.seriesContainer.definedBBox={x:o*t.x,y:o*t.y,width:o*t.width,height:o*t.height},this.seriesContainer.invalidateLayout(),this.bulletsContainer.x=this.seriesContainer.x,this.bulletsContainer.y=this.seriesContainer.y)},Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPercentProperty("radius",e,!0,!1,10,!1)&&this.invalidateLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(e){this.setPercentProperty("innerRadius",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),i.prototype.createSeries=function(){return new ss},Object.defineProperty(i.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(e){this.setPropertyValue("startAngle",e)&&(this.updateRadius(),this.updateSeriesAngles())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(e){this.setPropertyValue("endAngle",e)&&(this.updateRadius(),this.updateSeriesAngles())},enumerable:!0,configurable:!0}),i}(So);_.registeredClasses.PieChart=To,_.registeredClasses.PieChartDataItem=Do;var ko=function(s){function i(){var e=s.call(this)||this;return e.className="PieSeries3DDataItem",e.values.depthValue={},e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"depthValue",{get:function(){return this.values.depthValue.value},set:function(e){this.setValue("depthValue",e)},enumerable:!0,configurable:!0}),i}(rs),Ao=function(s){function i(){var e=s.call(this)||this;return e.className="PieSeries3D",e.applyTheme(),e}return w(i,s),i.prototype.createDataItem=function(){return new ko},i.prototype.createSlice=function(){return new Cp},i.prototype.validateDataElement=function(e){var t=e.slice,n=this.depth;y(n)||(n=this.chart.depth);var r=e.values.depthValue.percent;y(r)||(r=100),t.depth=r*n/100;var a=this.angle;y(a)||(a=this.chart.angle),t.angle=a,s.prototype.validateDataElement.call(this,e)},i.prototype.validate=function(){s.prototype.validate.call(this);for(var e=this._workingStartIndex;e=-90&&n<90?t.toFront():n>=90&&t.toBack()}},Object.defineProperty(i.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(e){this.setPropertyValue("depth",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"angle",{get:function(){return this.getPropertyValue("angle")},set:function(e){this.setPropertyValue("angle",e)},enumerable:!0,configurable:!0}),i.prototype.positionBullet=function(e){s.prototype.positionBullet.call(this,e);var t=e.dataItem.slice;e.y=e.pixelY-t.depth},i}(ss);_.registeredClasses.PieSeries3D=Ao,_.registeredClasses.PieSeries3DDataItem=ko;var Sd=function(s){function i(){var e=s.call(this)||this;return e.className="PieChart3DDataItem",e.applyTheme(),e}return w(i,s),i}(Do),Rp=function(s){function i(){var e=s.call(this)||this;return e.className="PieChart3D",e.depth=20,e.angle=10,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(e){this.setPropertyValue("depth",e)&&this.invalidateDataUsers()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"angle",{get:function(){return this.getPropertyValue("angle")},set:function(e){e=R(e,0,90),this.setPropertyValue("angle",e)&&this.invalidateDataUsers()},enumerable:!0,configurable:!0}),i.prototype.createSeries=function(){return new Ao},i}(To);_.registeredClasses.PieChart3D=Rp;var Bp=function(s){function i(){var e=s.call(this)||this;return e.className="SlicedChartDataItem",e.applyTheme(),e}return w(i,s),i}(Oo),Hp=function(s){function i(){var e=s.call(this)||this;return e.className="SlicedChart",e.seriesContainer.layout="horizontal",e.padding(15,15,15,15),e.applyTheme(),e}return w(i,s),i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Sliced chart"))},i.prototype.validate=function(){s.prototype.validate.call(this)},i}(So);_.registeredClasses.SlicedChart=Hp,_.registeredClasses.SlicedChartDataItem=Bp;var er=function(s){function i(){var e=s.call(this)||this;return e.legendSettings=new lo,e.className="FlowDiagramNode",e.isMeasured=!1,new ae,e.draggable=!0,e.inert=!0,e.setStateOnChildren=!0,e.events.on("positionchanged",e.invalidateLinks,e,!1),e.events.on("sizechanged",e.invalidateLinks,e,!1),e}return w(i,s),i.prototype.handleHit=function(e){this.isHidden||this.isHiding?this.show():this.hide()},i.prototype.show=function(e){var t=s.prototype.show.call(this,e);return this.outgoingDataItems.each(function(n){(!n.toNode||n.toNode&&!n.toNode.isHidden)&&(n.setWorkingValue("value",n.getValue("value"),e),n.link.show())}),this.incomingDataItems.each(function(n){(!n.fromNode||n.fromNode&&!n.fromNode.isHidden)&&(n.setWorkingValue("value",n.getValue("value"),e),n.link.show())}),t},i.prototype.hide=function(e){var t=s.prototype.hide.call(this,e);return this.outgoingDataItems.each(function(n){n.setWorkingValue("value",0,e),n.link.hide()}),this.incomingDataItems.each(function(n){n.setWorkingValue("value",0,e),n.link.hide()}),t},i.prototype.validate=function(){this.isDisposed()||(s.prototype.validate.call(this),this.invalidateLinks())},i.prototype.invalidateLinks=function(){var e=this;this.outgoingDataItems.each(function(t){var n=t.link;if(n.colorMode=="fromNode"&&(n.fill=n.dataItem.fromNode.color),n.colorMode=="gradient"){n.fill=n.gradient,n.stroke=n.gradient;var r=n.gradient.stops.getIndex(0);r&&(r.color=e.color,n.gradient.validate())}}),this.incomingDataItems.each(function(t){var n=t.link;if(n.colorMode=="toNode"&&(n.fill=n.dataItem.toNode.color),n.colorMode=="gradient"){n.fill=n.gradient,n.stroke=n.gradient;var r=n.gradient.stops.getIndex(1);r&&(r.color=e.color,n.gradient.validate())}})},Object.defineProperty(i.prototype,"incomingDataItems",{get:function(){var e=this;if(!this._incomingDataItems){var t=new re;t.events.on("inserted",function(){e.chart.sortBy=="name"?e._incomingSorted=yi(e._incomingDataItems.iterator(),function(n,r){return fr(n.fromName,r.fromName)}):e.chart.sortBy=="value"?e._incomingSorted=yi(e._incomingDataItems.iterator(),function(n,r){return yr(Pt(n.value,r.value))}):e._incomingSorted=e._incomingDataItems.iterator()},void 0,!1),this._incomingDataItems=t}return this._incomingDataItems},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"outgoingDataItems",{get:function(){var e=this;if(!this._outgoingDataItems){var t=new re;t.events.on("inserted",function(){e.chart.sortBy=="name"?e._outgoingSorted=yi(e._outgoingDataItems.iterator(),function(n,r){return fr(n.fromName,r.fromName)}):e.chart.sortBy=="value"?e._outgoingSorted=yi(e._outgoingDataItems.iterator(),function(n,r){return yr(Pt(n.value,r.value))}):e._outgoingSorted=e._outgoingDataItems.iterator()},void 0,!1),this._outgoingDataItems=t}return this._outgoingDataItems},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"name",{get:function(){return this.getPropertyValue("name")},set:function(e){this.setPropertyValue("name",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"total",{get:function(){return this.getPropertyValue("total")},set:function(e){this.setPropertyValue("total",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"totalIncoming",{get:function(){return this.getPropertyValue("totalIncoming")},set:function(e){this.setPropertyValue("totalIncoming",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"totalOutgoing",{get:function(){return this.getPropertyValue("totalOutgoing")},set:function(e){this.setPropertyValue("totalOutgoing",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"color",{get:function(){return this.getPropertyValue("color")},set:function(e){this.setColorProperty("color",e),this._background&&(this._background.fill=e),this.fill=e},enumerable:!0,configurable:!0}),i.prototype.createLegendMarker=function(e){var t=e.pixelWidth,n=e.pixelHeight;e.removeChildren();var r=e.createChild(St);r.shouldClone=!1,De(this,r,Ie),r.stroke=this.fill,r.copyFrom(this),r.padding(0,0,0,0),r.width=t,r.height=n;var a=e.dataItem;a.color=r.fill,a.colorOrig=r.fill},Object.defineProperty(i.prototype,"legendDataItem",{get:function(){return this._legendDataItem},set:function(e){this._legendDataItem=e,this._legendDataItem.itemContainer.deepInvalidate()},enumerable:!0,configurable:!0}),i}(W);_.registeredClasses.FlowDiagramNode=er;var tr=function(s){function i(){var e=s.call(this)||this;e.className="FlowDiagramLink";var t=new ae;return e.maskBullets=!1,e.colorMode="fromNode",e.layout="none",e.isMeasured=!1,e.startAngle=0,e.endAngle=0,e.strokeOpacity=0,e.verticalCenter="none",e.horizontalCenter="none",e.tooltipText="{fromName}\u2192{toName}:{value.value}",e.tooltipLocation=.5,e.link=e.createChild($),e.link.shouldClone=!1,e.link.setElement(e.paper.add("path")),e.link.isMeasured=!1,e.fillOpacity=.2,e.fill=t.getFor("alternativeBackground"),e.applyTheme(),e}return w(i,s),i.prototype.positionBullets=function(){var e=this;A(this.bullets.iterator(),function(t){t.parent=e.bulletsContainer,t.maxWidth=e.maxWidth,t.maxHeight=e.maxHeight,e.positionBullet(t)})},Object.defineProperty(i.prototype,"bulletsContainer",{get:function(){if(!this._bulletsContainer){var e=this.createChild(W);e.shouldClone=!1,e.layout="none",this._bulletsContainer=e}return this._bulletsContainer},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bulletsMask",{get:function(){if(!this._bulletsMask){var e=this.createChild($);e.shouldClone=!1,e.setElement(this.paper.add("path")),e.isMeasured=!1,this._bulletsMask=e}return this._bulletsMask},enumerable:!0,configurable:!0}),i.prototype.positionBullet=function(e){var t=e.locationX;y(t)||(t=e.locationY),y(t)||(t=.5);var n=this.middleLine.positionToPoint(t);e.moveTo(n);var r,a=e.propertyFields.rotation;e.dataItem&&(r=e.dataItem.dataContext[a]),y(r)||(r=n.angle),e.rotation=r},Object.defineProperty(i.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(e){this.setPropertyValue("startAngle",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(e){this.setPropertyValue("endAngle",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"colorMode",{get:function(){return this.getPropertyValue("colorMode")},set:function(e){if(e=="gradient"){var t=this.fill;this.gradient.stops.clear(),t instanceof se&&(this.gradient.addColor(t),this.gradient.addColor(t)),this.fill=this.gradient,this.stroke=this.gradient}this.setPropertyValue("colorMode",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maskBullets",{get:function(){return this.getPropertyValue("maskBullets")},set:function(e){this.setPropertyValue("maskBullets",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltipLocation",{get:function(){return this.getPropertyValue("tooltipLocation")},set:function(e){this.setPropertyValue("tooltipLocation",e,!0)},enumerable:!0,configurable:!0}),i.prototype.setFill=function(e){s.prototype.setFill.call(this,e);var t=this._gradient;t&&e instanceof se&&(t.stops.clear(),t.addColor(e),t.addColor(e))},i.prototype.measureElement=function(){},Object.defineProperty(i.prototype,"bullets",{get:function(){var e=this;return this._bullets||(this._bullets=new Oe(new It),this._disposers.push(new fe(this._bullets)),this._disposers.push(this._bullets.template),this._bullets.events.on("inserted",function(t){t.newValue.events.on("propertychanged",function(n){n.property!="locationX"&&n.property!="locationY"||e.positionBullet(n.target)},void 0,!1)},void 0,!1)),this._bullets},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.bullets.copyFrom(e.bullets);var t=this.middleLine;t&&(t instanceof yt&&e.middleLine instanceof yt&&t.copyFrom(e.middleLine),t instanceof qi&&e.middleLine instanceof qi&&t.copyFrom(e.middleLine)),this.link.copyFrom(e.link)},i.prototype.getTooltipX=function(){if(this.middleLine)return this.middleLine.positionToPoint(this.tooltipLocation).x},i.prototype.getTooltipY=function(){if(this.middleLine)return this.middleLine.positionToPoint(this.tooltipLocation).y},Object.defineProperty(i.prototype,"gradient",{get:function(){return this._gradient||(this._gradient=new dt),this._gradient},enumerable:!0,configurable:!0}),i}(W);_.registeredClasses.FlowDiagramLink=tr;var as=function(s){function i(){var e=s.call(this)||this;return e.className="FlowDiagramDataItem",e.values.value={},e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"fromName",{get:function(){return this.properties.fromName},set:function(e){this.setProperty("fromName",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"toName",{get:function(){return this.properties.toName},set:function(e){this.setProperty("toName",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"color",{get:function(){return this.properties.color},set:function(e){this.setProperty("color",ft(e))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"value",{get:function(){return this.values.value.value},set:function(e){this.setValue("value",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"link",{get:function(){var e=this;if(!this._link){var t=this.component.links.create();this._link=t,this.addSprite(t),this._disposers.push(new le(function(){e.component&&e.component.links.removeValue(t)}))}return this._link},enumerable:!0,configurable:!0}),i}(oo),os=function(s){function i(){var e=s.call(this)||this;e.colors=new $i,e.className="FlowDiagram",e.nodePadding=20,e.sortBy="none",e.sequencedInterpolation=!0,e.colors.step=2,e.minNodeSize=.02;var t=e.chartContainer.createChild(W);t.shouldClone=!1,t.layout="none",t.isMeasured=!1,e.linksContainer=t;var n=e.chartContainer.createChild(W);return n.shouldClone=!1,n.layout="none",n.isMeasured=!1,e.nodesContainer=n,e.dataItem=e.createDataItem(),e.dataItem.component=e,e.applyTheme(),e}return w(i,s),i.prototype.dispose=function(){s.prototype.dispose.call(this),this.dataItem.dispose()},i.prototype.validateData=function(){var e=this;this._parseDataFrom==0&&this.nodes.clear(),this.sortNodes(),this.colors.reset(),s.prototype.validateData.call(this);var t,n,r=0,a=0;A(this.dataItems.iterator(),function(l){var h=l.fromName;h&&((p=e.nodes.getKey(h))||((p=e.nodes.create(h)).name=h,p.chart=e,p.dataItem=l),l.fromNode=p,l.fromNode.outgoingDataItems.push(l));var p,u=l.toName;if(u&&((p=e.nodes.getKey(u))||((p=e.nodes.create(u)).name=u,p.chart=e,p.dataItem=l),l.toNode=p,l.toNode.incomingDataItems.push(l)),!l.fromNode){var d=new Nn;d.opacities=[0,1],l.link.strokeModifier=d}if(!l.toNode){var c=new Nn;c.opacities=[1,0],l.link.strokeModifier=c}var f=l.value;y(f)&&(r+=f,a++,(t>f||!y(t))&&(t=f),(nthis.dataItems.length||A(e.incomingDataItems.iterator(),function(n){t.checkLoop(n.fromNode)})},i.prototype.calculateValueHeight=function(){var e=this;this._levelSum={},this._levelNodesCount={},this.maxSum=0;var t,n,r,a=this.dataItem.values.value.sum;A(this._sorted,function(u){var d=u[1];e.getNodeValue(d)}),this.nodes.each(function(u,d){var c=d.level,f=Math.max(d.totalIncoming,d.totalOutgoing);f/ag||!y(r))&&(r=g,e.maxSum=c,n=ce(u))}),this._maxSumLevel=n;var o=this._levelNodesCount[this._maxSumLevel],l=(t-(o-1)*this.nodePadding)/this.maxSum;if(l==1/0&&(l=0),y(this.valueHeight)){var h=void 0;try{h=this._heightAnimation.animationOptions[0].to}catch{}if(h!=l){var p=this.interpolationDuration;try{p=this.nodes.template.states.getKey("active").transitionDuration}catch{}this._heightAnimation=new gt(this,{property:"valueHeight",from:this.valueHeight,to:l},p,this.interpolationEasing).start(),this._disposers.push(this._heightAnimation)}}else this.valueHeight=l},i.prototype.validate=function(){var e=this;s.prototype.validate.call(this),this.calculateValueHeight();var t,n=this.nodesContainer,r={},a=this._levelNodesCount[this._maxSumLevel],o=this.dataItem.values.value.sum;t=this.orientation=="horizontal"?this.chartContainer.maxHeight-1:this.chartContainer.maxWidth-1,A(this._sorted,function(l){var h,p,u,d=l[1],c=d.level,f=0,g=e._levelNodesCount[c];switch(e.nodeAlign){case"bottom":f=(e.maxSum-e._levelSum[c])*e.valueHeight-(g-a)*e.nodePadding;break;case"middle":f=(e.maxSum-e._levelSum[c])*e.valueHeight/2-(g-a)*e.nodePadding/2}if(e.maxSum==0)switch(e.nodeAlign){case"bottom":f=t-g*(e.minNodeSize*t+e.nodePadding);break;case"middle":f=t/2-g/2*(e.minNodeSize*t+e.nodePadding)}d.parent=n;var m=Math.max(d.totalIncoming,d.totalOutgoing);if(m/o0){var n=this.nodesContainer,r=0;A(this.links.iterator(),function(a){a.hide(0)}),A(this._sorted,function(a){var o,l=a[1];t.orientation=="horizontal"?(l.dx=-(n.pixelWidth-l.pixelWidth)/Math.max(t._levelCount,1),o="dx"):(l.dy=-(n.pixelHeight-l.pixelHeight)/Math.max(t._levelCount,1),o="dy");var h=0,p=t.interpolationDuration;t.sequencedInterpolation&&(h=t.sequencedInterpolationDelay*r+p*r/Sl(t.nodes.iterator())),l.opacity=0,l.invalidateLinks(),l.animate([{property:"opacity",from:0,to:1},{property:o,to:0}],t.interpolationDuration,t.interpolationEasing).delay(h),A(l.outgoingDataItems.iterator(),function(u){var d=u.link.show(t.interpolationDuration);d&&!d.isFinished()&&d.delay(h)}),A(l.incomingDataItems.iterator(),function(u){if(!u.fromNode){var d=u.link.show(t.interpolationDuration);d&&!d.isFinished()&&d.delay(h)}}),r++})}return s.prototype.showReal.call(this)}},i.prototype.changeSorting=function(){var e=this;this.sortNodes();var t={};A(this._sorted,function(n){var r,a,o=n[1],l=o.level,h=(e.maxSum-e._levelSum[l])*e.valueHeight/2;e.orientation=="horizontal"?(r="y",a=o.pixelHeight):(r="x",a=o.pixelWidth),o.animate({property:r,to:t[l]||h},e.interpolationDuration,e.interpolationEasing),t[l]=(t[l]||h)+a+e.nodePadding,o.invalidateLinks()})},i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Sankey diagram"))},i.prototype.createDataItem=function(){return new Np},Object.defineProperty(i.prototype,"nodeAlign",{get:function(){return this.getPropertyValue("nodeAlign")},set:function(e){this.setPropertyValue("nodeAlign",e),this.changeSorting()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(e){this.setPropertyValue("orientation",e,!0);var t=this.nodes.template.nameLabel;e=="vertical"?(this.nodes.template.width=void 0,t.label.horizontalCenter="middle",t.locationX=.5):(this.nodes.template.height=void 0,t.label.horizontalCenter="left",t.locationX=1)},enumerable:!0,configurable:!0}),i.prototype.createNode=function(){var e=new Vo;return this._disposers.push(e),e},i.prototype.createLink=function(){var e=new Fo;return this._disposers.push(e),e},Object.defineProperty(i.prototype,"valueHeight",{get:function(){return this._valueHeight},set:function(e){e!=this._valueHeight&&(this._valueHeight=e,this.invalidate())},enumerable:!0,configurable:!0}),i.prototype.disposeData=function(){s.prototype.disposeData.call(this),this._sorted=this.nodes.iterator()},i}(os);_.registeredClasses.SankeyDiagram=Wp;var Mo=function(s){function i(){var e=s.call(this)||this;e.className="ChordNode";var t=e.createChild(Jn);t.location=.5,t.radius=5,t.text="{name}",t.zIndex=1,t.shouldClone=!1,e.label=t,e.layout="none",e.events.on("positionchanged",e.updateRotation,e,!1),e.isMeasured=!1,e.slice=e.createChild(ri),e.slice.isMeasured=!1;var n=e.hiddenState;return n.properties.fill=new ae().getFor("disabledBackground"),n.properties.opacity=.5,n.properties.visible=!0,e.setStateOnChildren=!1,e.slice.hiddenState.properties.visible=!0,e.adapter.add("tooltipX",function(r,a){return a.slice.ix*(a.slice.radius-(a.slice.radius-a.slice.pixelInnerRadius)/2)}),e.adapter.add("tooltipY",function(r,a){return a.slice.iy*(a.slice.radius-(a.slice.radius-a.slice.pixelInnerRadius)/2)}),e}return w(i,s),i.prototype.invalidateLinks=function(){var e=this;s.prototype.invalidateLinks.call(this);var t=this.label,n=this.slice,r=this.chart;if(r&&n){var a=this.total,o=n.arc,l=n.startAngle;this.children.each(function(u){if(u instanceof It){var d=u.locationX;y(d)||(d=.5);var c=u.locationY;y(c)||(c=1);var f=l+o*d,g=c*n.radius;u.x=g*L(f),u.y=g*M(f)}});var h=l+o*t.location,p=l+(1-a/this.adjustedTotal)*o*.5;Fe(p)&&(p=l),t.fixPosition(h,n.radius),this.nextAngle=p,this._outgoingSorted&&A(this._outgoingSorted,function(u){var d=u.link;d.parent=e.chart.linksContainer;var c=u.getWorkingValue("value");if(y(c)){if(r.nonRibbon){var f=d.percentWidth;y(f)||(f=5),f/=100,d.startAngle=l+o/2-o/2*f,d.arc=o*f}else d.arc=c*r.valueAngle,d.startAngle=e.nextAngle,e.nextAngle+=d.arc;u.toNode||(d.endAngle=d.startAngle),d.radius=n.pixelInnerRadius}}),this._incomingSorted&&A(this._incomingSorted,function(u){var d=u.link;if(d.radius=n.pixelInnerRadius,r.nonRibbon){var c=d.percentWidth;y(c)||(c=5),c/=100,d.endAngle=l+o/2-o/2*c,d.arc=o*c}else{d.endAngle=e.nextAngle;var f=u.getWorkingValue("value");y(f)&&(d.arc=f*r.valueAngle,e.nextAngle+=d.arc)}u.fromNode||(d.startAngle=d.endAngle)})}},i.prototype.updateRotation=function(){var e=this.slice,t=this.trueStartAngle+e.arc/2,n=e.radius,r=n*L(t),a=n*M(t),o=Ee({x:r+this.pixelX,y:a+this.pixelY});e.startAngle=this.trueStartAngle+(o-t),this.dx=-this.pixelX,this.dy=-this.pixelY},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.label.copyFrom(e.label),this.slice.copyFrom(e.slice)},i}(er);_.registeredClasses.ChordNode=Mo;var Id=function(s){function i(){var e=s.call(this)||this;return e.className="QuadraticCurve",e.element=e.paper.add("path"),e.pixelPerfect=!1,e.fill=B(),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){if(y(this.x1+this.x2+this.y1+this.y2+this.cpx+this.cpy)){var e={x:this.x1,y:this.y1},t={x:this.x2,y:this.y2},n={x:this.cpx,y:this.cpy},r=E(e)+ni(t,n);this.path=r}},Object.defineProperty(i.prototype,"cpx",{get:function(){return this.getPropertyValue("cpx")},set:function(e){this.setPropertyValue("cpx",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cpy",{get:function(){return this.getPropertyValue("cpy")},set:function(e){this.setPropertyValue("cpy",e,!0)},enumerable:!0,configurable:!0}),i.prototype.positionToPoint=function(e){var t={x:this.x1,y:this.y1},n={x:this.cpx,y:this.cpy},r={x:this.x2,y:this.y2},a=Xs(t,r,n,e),o=Xs(t,r,n,e+.001);return{x:a.x,y:a.y,angle:Ee(a,o)}},i}(yt),Lo=function(s){function i(){var e=s.call(this)||this;return e.className="ChordLink",e.middleLine=e.createChild(Id),e.middleLine.shouldClone=!1,e.middleLine.strokeOpacity=0,e.applyTheme(),e}return w(i,s),i.prototype.validate=function(){if(s.prototype.validate.call(this),!this.isTemplate){var e=this.startAngle,t=this.endAngle,n=this.arc,r=this.radius,a=this.dataItem.fromNode,o=this.dataItem.toNode,l=0,h=0;a&&(l=a.pixelX+a.dx,h=a.pixelY+a.dy);var p=0,u=0;if(o&&(p=o.pixelX+o.dx,u=o.pixelY+o.dy),r>0){var d=r*L(e)+l,c=r*M(e)+h,f=r*L(t)+p,g=r*M(t)+u,m={x:0,y:0},x=E({x:d,y:c});x+=Le(e,n,r),x+=ni({x:f,y:g},m),x+=Le(t,n,r),x+=ni({x:d,y:c},m),this.link.path=n>0?x:"",this.maskBullets&&(this.bulletsMask.path=x,this.bulletsContainer.mask=this.bulletsMask);var b=e+n/2,C=t+n/2,S=this.middleLine;S.x1=r*L(b)+l,S.y1=r*M(b)+h,S.x2=r*L(C)+p,S.y2=r*M(C)+u,S.cpx=0,S.cpy=0,S.stroke=this.fill,this.positionBullets()}}},Object.defineProperty(i.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(e){this.setPropertyValue("radius",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"arc",{get:function(){return this.getPropertyValue("arc")},set:function(e){this.setPropertyValue("arc",e,!0)},enumerable:!0,configurable:!0}),i}(tr);_.registeredClasses.ChordLink=Lo;var Xp=function(s){function i(){var e=s.call(this)||this;return e.className="ChordDiagramDataItem",e.applyTheme(),e}return w(i,s),i}(as),Yp=function(s){function i(){var e=s.call(this)||this;e.valueAngle=0,e.className="ChordDiagram",e.startAngle=-90,e.endAngle=270,e.radius=F(80),e.innerRadius=-15,e.nodePadding=5;var t=e.chartContainer.createChild(W);return t.align="center",t.valign="middle",t.shouldClone=!1,t.layout="absolute",e.chordContainer=t,e.nodesContainer.parent=t,e.linksContainer.parent=t,e.chartContainer.events.on("maxsizechanged",e.invalidate,e,!1),e.applyTheme(),e}return w(i,s),i.prototype.validate=function(){var e=this,t=this.chartContainer,n=this.endAngle,r=this.startAngle+this.nodePadding/2,a=xt(this.startAngle,this.endAngle,1);a=Mi([a,{x:0,y:0,width:0,height:0}]);var o=Math.min(t.innerWidth/a.width,t.innerHeight/a.height);y(o)||(o=0);var l=Re(this.radius,o),h=Re(this.innerRadius,l,!0),p=this.dataItem.values.value.sum,u=0,d=0;A(this._sorted,function(c){var f=c[1];e.getNodeValue(f),u++;var g=f.total;f.total/pthis.endIndex;c--)f=this.dataItems.getIndex(c),this.disableUnusedColumns(f);this._propertiesChanged=!1},i.prototype.sortCategoryAxis=function(e,t){var n=this;this.dataItems.values.sort(function(a,o){return o.values[t].workingValue-a.values[t].workingValue});var r=0;this.dataItems.each(function(a){a._index=r,r++}),e.dataItems.each(function(a){var o=a.component,l=o.categoryToPosition(a.category)-a.deltaPosition,h=o.getSeriesDataItemByCategory(a.category,n);if(h){var p=n.dataItems.indexOf(h);a._index=p;var u=V((p+.5)/n.dataItems.length-l,3);a.deltaAnimation&&!a.deltaAnimation.isDisposed()&&a.deltaAnimation.animationOptions[0].to==u||u!=V(a.deltaPosition,3)&&(a.deltaAnimation&&a.deltaAnimation.stop(),a.deltaAnimation=a.animate({property:"deltaPosition",from:-u,to:0},o.interpolationDuration,o.interpolationEasing),n._disposers.push(a.deltaAnimation))}}),e.dataItems.values.sort(function(a,o){return a.index-o.index})},i.prototype.validateDataElement=function(e){this.chart&&this.xAxis&&this.yAxis&&(this.validateDataElementReal(e),s.prototype.validateDataElement.call(this,e))},i.prototype.getStartLocation=function(e){var t=this._startLocation;return this.baseAxis==this.xAxis?t+=e.locations[this.xOpenField]-.5:t+=e.locations[this.yOpenField]-.5,t},i.prototype.getEndLocation=function(e){var t=this._endLocation;return this.baseAxis==this.xAxis?t+=e.locations[this.xField]-.5:t+=e.locations[this.yField]-.5,t},i.prototype.validateDataElementReal=function(e){var t,n,r,a,o=this,l=this.getStartLocation(e),h=this.getEndLocation(e),p=this.xField,u=this.xOpenField,d=this.yField,c=this.yOpenField,f=this.columns.template,g=f.percentWidth,m=f.percentHeight,x=f.pixelWidth,b=f.pixelHeight,C=f.maxWidth,S=f.maxHeight,P=f.pixelPaddingLeft,O=f.pixelPaddingRight,I=f.pixelPaddingTop,k=f.pixelPaddingBottom,D=!1,G=e.width;v(G)&&(y(G)&&(x=G),G instanceof te&&(g=100*G.value));var H=e.height;if(v(H)&&(y(H)&&(b=H),H instanceof te&&(m=100*H.value)),this.xAxis instanceof Ve&&this.yAxis instanceof Ve){if(!e.hasValue(this._xValueFields)||!e.hasValue(this._yValueFields))return;l=0,h=1,Fe(g)||(l+=he=V((h-l)*(1-g/100)/2,5),h-=he),t=this.xAxis.getX(e,u,l),n=this.xAxis.getX(e,p,h),Fe(g)&&(t+=he=(n-t-x)/2,n-=he),!Fe(C)&&CGe&&a>Ge)&&(D=!0),r=this.fixVerticalCoordinate(r),a=this.fixVerticalCoordinate(a),Math.abs(n-t)-P-O==0&&(D=!0)}else{if(!e.hasValue(this._xValueFields))return;var he;Fe(m)||(l+=he=V((h-l)*(1-m/100)/2,5),h-=he),r=this.yAxis.getY(e,c,l),a=this.yAxis.getY(e,d,h),Fe(m)&&(a-=he=(a-r-b)/2,r+=he),!Fe(S)&&SGe&&t>Ge)&&(D=!0),n=this.fixHorizontalCoordinate(n),t=this.fixHorizontalCoordinate(t),Math.abs(r-a)-I-k==0&&(D=!0)}var U,nt=Math.abs(n-t),qe=Math.abs(a-r),Y=Math.min(t,n),We=Math.min(r,a);D?this.disableUnusedColumns(e):(e.column?(U=e.column,this._propertiesChanged&&(De(this,U,Ie),De(this.columns.template,U,Ie),j(Ie,function(ge){U[ge]=U[ge]}))):(De(this,U=this.columns.create(),Ie),De(this.columns.template,U,Ie),e.addSprite(U),e.column=U,U.paper=this.paper,this.itemsFocusable()?(v(this.role)||(this.role="menu"),v(U.role)||(U.role="menuitem"),U.focusable=!0):(v(this.role)||(this.role="list"),v(U.role)||(U.role="listitem"),U.focusable=!1),U.focusable&&(U.events.on("focus",function(ge){U.readerTitle=o.populateString(o.itemReaderText,e)},void 0,!1),U.events.on("blur",function(ge){U.readerTitle=""},void 0,!1)),U.hoverable&&(U.events.on("over",function(ge){U.readerTitle=o.populateString(o.itemReaderText,e)},void 0,!1),U.events.on("out",function(ge){U.readerTitle=""},void 0,!1)),U.parent=this.columnsContainer,U.virtualParent=this),U.width=nt,U.height=qe,U.x=Y,U.y=We,U.realX=t,U.realY=r,U.realWidth=n-t,U.realHeight=a-r,this.setColumnStates(U),U.invalid&&U.validate(),U.__disabled=!1,A(this.axisRanges.iterator(),function(ge){var ke=e.rangesColumns.getKey(ge.uid);ke||(ke=o.columns.create(),De(ge.contents,ke,Ie),e.addSprite(ke),e.rangesColumns.setKey(ge.uid,ke),ke.paper=o.paper),ke.parent=ge.contents,ke.width=nt,ke.height=qe,ke.x=Y,ke.y=We,o.setColumnStates(ke),ke.invalid&&ke.validate(),ke.__disabled=!1})),e.itemWidth=nt,e.itemHeight=qe},i.prototype.disableUnusedColumns=function(e){e&&(e.column&&(e.column.width=0,e.column.height=0,e.column.__disabled=!0),A(this.axisRanges.iterator(),function(t){var n=e.rangesColumns.getKey(t.uid);n&&(n.width=0,n.height=0,n.__disabled=!0)}))},i.prototype.setColumnStates=function(e){if(this._dropFromOpenState||this._dropFromPreviousState||this._riseFromOpenState||this._riseFromPreviousState){var t=e.dataItem;if(this.xAxis instanceof ee||this.yAxis instanceof ee){var n,r=void 0,a=void 0;this.baseAxis==this.yAxis?(this.xOpenField&&this.xField&&this.xAxis instanceof ee&&(n=t.getValue(this.xOpenField),r=t.getValue(this.xField)),a=t.getValue(this.xAxis.axisFieldName+"X","previousChange")):(this.yOpenField&&this.yField&&this.yAxis instanceof ee&&(n=t.getValue(this.yOpenField),r=t.getValue(this.yField)),a=t.getValue(this.yAxis.axisFieldName+"Y","previousChange")),rthis.currentLevel||e.children&&e.children.length>0)&&(n.columns.template.cursorOverStyle=He.pointer,this.zoomable&&n.columns.template.events.on("hit",function(l){var h=l.target.dataItem;e.level>t.currentLevel?t.zoomToChartDataItem(h.treeMapDataItem.parent):t.zoomToSeriesDataItem(h)},this,void 0))}this._tempSeries.push(e.series)},i.prototype.toggleBullets=function(e){var t=this;A(this.series.iterator(),function(n){t._tempSeries.indexOf(n)==-1?(n.columnsContainer.hide(),n.bulletsContainer.hide(e)):(n.columnsContainer.show(),n.bulletsContainer.show(e),n.dataItems.each(function(r){r.bullets.each(function(a,o){o.show()})}),n.level1&&n.dataItems.each(function(r){r.treeMapDataItem.children&&r.bullets.each(function(a,o){o.hide()})}))})},i.prototype.zoomToSeriesDataItem=function(e){this.zoomToChartDataItem(e.treeMapDataItem)},i.prototype.zoomToChartDataItem=function(e){var t=this;e||(e=this._homeDataItem);var n=this.zoomOutButton;if(n&&(e!=this._homeDataItem?n.show():n.hide()),e&&e.children){this.xAxis.zoomToValues(e.x0,e.x1),this.yAxis.zoomToValues(e.y0,e.y1),this.currentLevel=e.level,this.currentlyZoomed=e,this.createTreeSeries(e);var r=this.xAxis.rangeChangeAnimation||this.yAxis.rangeChangeAnimation;!r||r.isDisposed()||r.isFinished()?this.toggleBullets():(this._dataDisposers.push(r),r.events.once("animationended",function(){t.toggleBullets()}))}},i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("TreeMap chart"))},i.prototype.createDataItem=function(){return new zp},Object.defineProperty(i.prototype,"maxLevels",{get:function(){return this.getPropertyValue("maxLevels")},set:function(e){this.setPropertyValue("maxLevels",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"currentLevel",{get:function(){return this.getPropertyValue("currentLevel")},set:function(e){this.setPropertyValue("currentLevel",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hideParentColumns",{get:function(){return this.getPropertyValue("hideParentColumns")},set:function(e){this.setPropertyValue("hideParentColumns",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sorting",{get:function(){return this.getPropertyValue("sorting")},set:function(e){this.setPropertyValue("sorting",e,!0)},enumerable:!0,configurable:!0}),i.prototype.createSeries=function(){return new hs},Object.defineProperty(i.prototype,"homeText",{get:function(){return this._homeText},set:function(e){this._homeText=e,this._homeDataItem&&(this._homeDataItem.name=this._homeText)},enumerable:!0,configurable:!0}),i.prototype.processConfig=function(e){if(e){if(v(e.layoutAlgorithm)&&J(e.layoutAlgorithm))switch(e.layoutAlgorithm){case"squarify":e.layoutAlgorithm=this.squarify;break;case"binaryTree":e.layoutAlgorithm=this.binaryTree;break;case"slice":e.layoutAlgorithm=this.slice;break;case"dice":e.layoutAlgorithm=this.dice;break;case"sliceDice":e.layoutAlgorithm=this.sliceDice;break;default:delete e.layoutAlgorithm}v(e.navigationBar)&&!v(e.navigationBar.type)&&(e.navigationBar.type="NavigationBar"),s.prototype.processConfig.call(this,e)}},i.prototype.validateLayout=function(){s.prototype.validateLayout.call(this),this.layoutItems(this.currentlyZoomed)},i.prototype.validateDataItems=function(){s.prototype.validateDataItems.call(this),this.layoutItems(this._homeDataItem),A(this.series.iterator(),function(e){e.validateRawData()}),this.zoomToChartDataItem(this._homeDataItem)},i.prototype.binaryTree=function(e){var t,n,r=e.children,a=r.length,o=new Array(a+1);for(o[0]=n=t=0;t0&&function l(h,p,u,d,c,f,g){if(h>=p-1)return(P=r.getIndex(h)).x0=d,P.y0=c,P.x1=f,void(P.y1=g);for(var m=o[h],x=u/2+m,b=h+1,C=p-1;b>>1;o[S]g-c){var k=(d*I+f*O)/u;l(h,b,O,d,c,k,g),l(b,p,I,k,c,f,g)}else{var D=(c*I+g*O)/u;l(h,b,O,d,c,f,D),l(b,p,I,d,D,f,g)}}(0,a,e.value,e.x0,e.y0,e.x1,e.y1)},i.prototype.slice=function(e){for(var t,n=e.x0,r=e.x1,a=e.y0,o=e.y1,l=e.children,h=-1,p=l.length,u=e.value&&(o-a)/e.value;++hl&&(l=t),d=a*a*u,(h=Math.max(l/d,d/o))>p){a-=t;break}p=h}var I=this.dataItems.template.clone();I.value=a,I.dice=n1)return e;if(e.children.length==1){var t=e.children.getIndex(0);return t.children?this.getLegendLevel(t):e}return e}},i.prototype.handleLegendSeriesAdded=function(e){},Object.defineProperty(i.prototype,"homeDataItem",{get:function(){return this._homeDataItem},enumerable:!0,configurable:!0}),i.prototype.feedLegend=function(){var e=this.legend;if(e){e.dataFields.name="name";var t=this.getLegendLevel(this._homeDataItem);if(t){var n=[];t.children.each(function(r){n.push(r)}),e.data=n}}},i.prototype.disposeData=function(){s.prototype.disposeData.call(this),this._homeDataItem=void 0,this.series.clear(),this.navigationBar&&this.navigationBar.disposeData(),this.xAxis.disposeData(),this.yAxis.disposeData()},i.prototype.getExporting=function(){var e=this,t=s.prototype.getExporting.call(this);return t.adapter.add("formatDataFields",function(n){return n.format!="csv"&&n.format!="xlsx"||v(e.dataFields.children)&&delete n.dataFields[e.dataFields.children],n}),t},i}(Ut);_.registeredClasses.TreeMap=Up;var Eo=function(s){function i(){var e=s.call(this)||this;return e._chart=new Me,e.className="AxisRendererX3D",e._disposers.push(e._chart),e.applyTheme(),e}return w(i,s),i.prototype.updateGridElement=function(e,t,n){t+=(n-t)*e.location;var r=this.positionToPoint(t);if(e.element){var a=this.chart.dx3D||0,o=this.chart.dy3D||0,l=this.getHeight();e.path=E({x:a,y:o})+T({x:a,y:l+o})+T({x:0,y:l})}this.positionItem(e,r),this.toggleVisibility(e,t,0,1)},i.prototype.updateBaseGridElement=function(){s.prototype.updateBaseGridElement.call(this);var e=this.getHeight(),t=this.chart.dx3D||0,n=this.chart.dy3D||0;this.baseGrid.path=E({x:t,y:n})+T({x:0,y:0})+T({x:0,y:e})},Object.defineProperty(i.prototype,"chart",{get:function(){return this._chart.get()},set:function(e){e&&this._chart.set(e,e.events.on("propertychanged",this.handle3DChanged,this,!1))},enumerable:!0,configurable:!0}),i.prototype.handle3DChanged=function(e){e.property!="depth"&&e.property!="angle"||this.invalidate()},i}(Mt);_.registeredClasses.AxisRendererX3D=Eo;var Gp=function(s){function i(){var e=s.call(this)||this;return e._chart=new Me,e.className="AxisRendererY3D",e._disposers.push(e._chart),e.applyTheme(),e}return w(i,s),i.prototype.updateGridElement=function(e,t,n){t+=(n-t)*e.location;var r=this.positionToPoint(t);if(e.element){var a=this.chart.dx3D||0,o=this.chart.dy3D||0,l=this.getWidth();e.path=E({x:0,y:0})+T({x:a,y:o})+T({x:l+a,y:o})}this.positionItem(e,r),this.toggleVisibility(e,t,0,1)},i.prototype.updateBaseGridElement=function(){s.prototype.updateBaseGridElement.call(this);var e=this.chart.dx3D||0,t=this.chart.dy3D||0,n=this.getWidth();this.baseGrid.path=E({x:0,y:0})+T({x:n,y:0})+T({x:n+e,y:t})},Object.defineProperty(i.prototype,"chart",{get:function(){return this._chart.get()},set:function(e){e&&this._chart.set(e,e.events.on("propertychanged",this.handle3DChanged,this,!1))},enumerable:!0,configurable:!0}),i.prototype.handle3DChanged=function(e){e.property!="depth"&&e.property!="angle"||this.invalidate()},i}(mt),Ro=function(s){function i(){var e=s.call(this)||this;return e.className="Column3D",e}return w(i,s),i.prototype.createAssets=function(){this.column3D=this.createChild(wp),this.column3D.shouldClone=!1,this.column3D.strokeOpacity=0,this.column=this.column3D},i.prototype.validate=function(){s.prototype.validate.call(this),this.column3D&&(this.column3D.width=this.pixelWidth,this.column3D.height=this.pixelHeight,this.column3D.invalid&&this.column3D.validate())},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.column3D&&this.column3D.copyFrom(e.column3D)},i.prototype.setFill=function(e){s.prototype.setFill.call(this,e),this.column.fill=e},i}(hi);_.registeredClasses.Column3D=Ro;var Kp=function(s){function i(){var e=s.call(this)||this;return e.className="ColumnSeries3DDataItem",e.applyTheme(),e}return w(i,s),i}(Gt),ps=function(s){function i(){var e=s.call(this)||this;return e.className="ColumnSeries3D",e.columns.template.column3D.applyOnClones=!0,e.columns.template.hiddenState.properties.visible=!0,e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"columnsContainer",{get:function(){var e=this.chart;return e&&e.columnsContainer&&e.leftAxesContainer.layout!="vertical"&&e.rightAxesContainer.layout!="vertical"&&e.bottomAxesContainer.layout!="horizontal"&&e.topAxesContainer.layout!="horizontal"?e.columnsContainer:this._columnsContainer},enumerable:!0,configurable:!0}),i.prototype.validateDataElementReal=function(e){s.prototype.validateDataElementReal.call(this,e),e.column&&(e.column.dx=this.dx,e.column.dy=this.dy,e.column.visible=this.visible)},i.prototype.validateDataElements=function(){s.prototype.validateDataElements.call(this),this.chart&&this.chart.invalidateLayout()},i.prototype.createColumnTemplate=function(){return new Ro},Object.defineProperty(i.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(e){this.setPropertyValue("depth",e,!0),this.columns.template.column3D.depth=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"angle",{get:function(){return this.getPropertyValue("angle")},set:function(e){this.setPropertyValue("angle",e),this.columns.template.column3D.angle=e},enumerable:!0,configurable:!0}),i}(pi);_.registeredClasses.ColumnSeries3D=ps,_.registeredClasses.ColumnSeries3DDataItem=Kp;var Dd=function(s){function i(){var e=s.call(this)||this;return e.className="XYChart3DDataItem",e.applyTheme(),e}return w(i,s),i}(Qr),Zp=function(s){function i(){var e=s.call(this)||this;e._axisRendererX=Eo,e._axisRendererY=Gp,e.className="XYChart3D",e.depth=30,e.angle=30;var t=e.seriesContainer.createChild(W);return t.shouldClone=!1,t.isMeasured=!1,t.layout="none",e.columnsContainer=t,e.columnsContainer.mask=e.createChild($),e.applyTheme(),e}return w(i,s),i.prototype.updateSeriesMasks=function(){if(s.prototype.updateSeriesMasks.call(this),Xi()){var e=this.columnsContainer,t=e.mask;e.mask=void 0,e.mask=t}},Object.defineProperty(i.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(e){this.setPropertyValue("depth",e),this.fixLayout(),this.invalidateDataUsers()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"angle",{get:function(){return this.getPropertyValue("angle")},set:function(e){this.setPropertyValue("angle",e),this.fixLayout(),this.invalidateDataUsers()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dx3D",{get:function(){return L(this.angle)*this.depth},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dy3D",{get:function(){return-M(this.angle)*this.depth},enumerable:!0,configurable:!0}),i.prototype.validateLayout=function(){s.prototype.validateLayout.call(this),this.fixColumns()},i.prototype.fixLayout=function(){this.chartContainer.paddingTop=-this.dy3D,this.chartContainer.paddingRight=this.dx3D,this.scrollbarX&&(this.scrollbarX.dy=this.dy3D,this.scrollbarX.dx=this.dx3D),this.scrollbarY&&(this.scrollbarY.dy=this.dy3D,this.scrollbarY.dx=this.dx3D),this.fixColumns(),s.prototype.fixLayout.call(this)},i.prototype.fixColumns=function(){var e=this,t=1,n=0;A(this.series.iterator(),function(a){a instanceof ps&&(!a.clustered&&n>0&&t++,a.depthIndex=t-1,n++)});var r=0;A(this.series.iterator(),function(a){if(a instanceof ps){a.depth=e.depth/t,a.angle=e.angle,a.columnsContainer==e.columnsContainer&&(a.dx=e.depth/t*L(e.angle)*a.depthIndex,a.dy=-e.depth/t*M(e.angle)*a.depthIndex);var o=!1;(a.baseAxis==a.xAxis&&a.xAxis.renderer.inversed||a.baseAxis==a.yAxis&&a.yAxis.renderer.inversed)&&(o=!0);var l=1;a.dataItems.each(function(h){var p=h.column;p&&(p.zIndex=o?1e3*(1e3-l)+r-100*a.depthIndex:1e3*l+r-100*a.depthIndex),l++}),o?r--:r++}}),this.maskColumns()},i.prototype.processConfig=function(e){if(e&&v(e.series)&&Ae(e.series))for(var t=0,n=e.series.length;t1&&(this.orientation=="horizontal"?P.minGridDistance=this.measuredWidth/this.markerCount:P.minGridDistance=this.measuredHeight/this.markerCount),this.valueAxis.invalidate(),d=this.markerCount;for(var O=this.markers.length;d0&&t.length>0)if(a){var l=E(e[0]);if(e.length>0)for(var h=1;h0||this.fillSprite.fillOpacity>0)&&(l=E(e[0])+Zi(e),l+=T(t[0])+Zi(t),l+=T(e[0]),l+=" Z",this.fillSprite.path=l)}else l=E(e[0])+Zi(e),this.strokeSprite.path=l,(this.fillOpacity>0||this.fillSprite.fillOpacity>0)&&(l+=T(t[0])+Zi(t),l+=T(e[0]),l+=" Z",this.fillSprite.path=l);else this.strokeSprite.path="",this.fillSprite.path=""},i}(es);_.registeredClasses.StepLineSeriesSegment=Jp;var No=function(s){function i(){var e=s.call(this)||this;return e.className="StepLineSeriesDataItem",e.applyTheme(),e}return w(i,s),i}($n),Qp=function(s){function i(){var e=s.call(this)||this;return e.className="StepLineSeries",e.applyTheme(),e.startLocation=0,e.endLocation=1,e}return w(i,s),i.prototype.createDataItem=function(){return new No},i.prototype.addPoints=function(e,t,n,r,a){var o,l,h,p;this.baseAxis==this.xAxis&&(o=this.startLocation,l=this.endLocation,h=this.getAdjustedXLocation(t,this.yOpenField),p=this.getAdjustedXLocation(t,this.yField)),this.baseAxis==this.yAxis&&(h=this.startLocation,p=this.endLocation,o=this.getAdjustedXLocation(t,this.xOpenField),l=this.getAdjustedXLocation(t,this.xField));var u=this.xAxis.getX(t,n,o),d=this.yAxis.getY(t,r,h),c=this.xAxis.getX(t,n,l),f=this.yAxis.getY(t,r,p);if(u=R(u,-1e5,1e5),d=R(d,-1e5,1e5),c=R(c,-1e5,1e5),f=R(f,-1e5,1e5),!this.noRisers&&e.length>1){var g=e[e.length-1];this.baseAxis==this.xAxis&&(a?e.push({x:g.x,y:f}):e.push({x:u,y:g.y})),this.baseAxis==this.yAxis&&(a?e.push({x:c,y:g.y}):e.push({x:g.x,y:d}))}var m={x:u,y:d},x={x:c,y:f};a?e.push(x,m):e.push(m,x)},i.prototype.drawSegment=function(e,t,n){var r=!1;this.yAxis==this.baseAxis&&(r=!0),e.drawSegment(t,n,this.tensionX,this.tensionY,this.noRisers,r)},i.prototype.createSegment=function(){return new Jp},Object.defineProperty(i.prototype,"noRisers",{get:function(){return this.getPropertyValue("noRisers")},set:function(e){this.setPropertyValue("noRisers",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startLocation",{get:function(){return this.getPropertyValue("startLocation")},set:function(e){this.setPropertyValue("startLocation",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endLocation",{get:function(){return this.getPropertyValue("endLocation")},set:function(e){this.setPropertyValue("endLocation",e,!0)},enumerable:!0,configurable:!0}),i}(is);_.registeredClasses.StepLineSeries=Qp,_.registeredClasses.StepLineSeriesDataItem=No;var Wo=function(s){function i(){var e=s.call(this)||this;return e.className="RadarColumn",e}return w(i,s),i.prototype.createAssets=function(){this.radarColumn=this.createChild(ri),this.radarColumn.shouldClone=!1,this.radarColumn.strokeOpacity=void 0,this.column=this.radarColumn},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.radarColumn&&this.radarColumn.copyFrom(e.radarColumn)},i.prototype.getTooltipX=function(){var e=this.getPropertyValue("tooltipX");return y(e)?e:this.radarColumn.getTooltipX()},i.prototype.getTooltipY=function(){var e=this.getPropertyValue("tooltipX");return y(e)?e:this.radarColumn.getTooltipY()},i}(hi);_.registeredClasses.RadarColumn=Wo;var eu=function(s){function i(){var e=s.call(this)||this;return e.className="ColumnSeriesDataItem",e.applyTheme(),e}return w(i,s),i}(Gt),tu=function(s){function i(){var e=s.call(this)||this;return e.className="RadarColumnSeries",e.applyTheme(),e}return w(i,s),i.prototype.createColumnTemplate=function(){return new Wo},i.prototype.validate=function(){this.chart.invalid&&this.chart.validate(),s.prototype.validate.call(this)},i.prototype.disableUnusedColumns=function(e){e&&(e.column&&(e.column.__disabled=!0),A(this.axisRanges.iterator(),function(t){var n=e.rangesColumns.getKey(t.uid);n&&(n.__disabled=!0)}))},i.prototype.validateDataElementReal=function(e){var t,n,r,a,o=this,l=this.chart.startAngle,h=this.chart.endAngle,p=this.yField,u=this.yOpenField,d=this.xField,c=this.xOpenField,f=this.getStartLocation(e),g=this.getEndLocation(e),m=(h-l)/(this.dataItems.length*(this.end-this.start)),x=e.column;x||(x=this.columns.create(),e.column=x,De(this,x,Ie),De(this.columns.template,x,Ie),e.addSprite(x),x.paper=this.paper,this.setColumnStates(x));var b=x.width,C=100;b instanceof te&&(C=b.percent);var S=V((g-f)*(1-C/100)/2,5);if(f+=S,g-=S,this.xAxis instanceof Ve&&this.yAxis instanceof Ve)r=oe({x:this.yAxis.getX(e,p,0,"valueY"),y:this.yAxis.getY(e,p,0,"valueY")}),a=oe({x:this.yAxis.getX(e,u,1,"valueY"),y:this.yAxis.getY(e,u,1,"valueY")}),t=this.xAxis.getAngle(e,c,0,"valueX"),n=this.xAxis.getAngle(e,d,1,"valueX"),l+=f*m,h-=(1-g)*m;else if(this.baseAxis==this.xAxis)r=oe({x:this.yAxis.getX(e,p,e.locations[p],"valueY"),y:this.yAxis.getY(e,p,e.locations[p],"valueY")}),a=oe({x:this.yAxis.getX(e,u,e.locations[u],"valueY"),y:this.yAxis.getY(e,u,e.locations[u],"valueY")}),t=this.xAxis.getAngle(e,c,f,"valueX"),n=this.xAxis.getAngle(e,d,g,"valueX"),l+=f*m,h-=(1-g)*m;else{if(r=oe({x:this.yAxis.getX(e,p,f,"valueY"),y:this.yAxis.getY(e,p,f,"valueY")}),a=oe({x:this.yAxis.getX(e,u,g,"valueY"),y:this.yAxis.getY(e,u,g,"valueY")}),y(b)){var P=Math.abs(r-a);if(P>b){var O=(P-b)/2;r+=O,a-=O}}t=this.xAxis.getAngle(e,d,e.locations[d],"valueX"),n=this.xAxis.getAngle(e,c,e.locations[c],"valueX")}if(n0?(k.arc=D,k.radius=r,k.innerRadius=a,x.__disabled=!1,x.parent=this.columnsContainer,A(this.axisRanges.iterator(),function(G){var H=e.rangesColumns.getKey(G.uid);H||(H=o.columns.create(),Ol(o.columns.template,H,Ie),De(G.contents,H,Ie),H.dataItem&&z(H.dataItem.sprites,H),e.addSprite(H),H.paper=o.paper,o.setColumnStates(H),e.rangesColumns.setKey(G.uid,H));var ne=H.radarColumn;ne.startAngle=t,ne.arc=D,ne.radius=r,ne.innerRadius=a,ne.invalid&&(ne.paper=o.paper,ne.validate()),H.__disabled=!1,H.parent=G.contents})):this.disableUnusedColumns(e)},i.prototype.getPoint=function(e,t,n,r,a,o,l){o||(o="valueX"),l||(l="valueY");var h=oe({x:this.yAxis.getX(e,n,a,l),y:this.yAxis.getY(e,n,a,l)});h==0&&(h=1e-5);var p=this.xAxis.getAngle(e,t,r,o);return{x:h*L(p),y:h*M(p)}},i.prototype.getMaskPath=function(){var e=this.yAxis.renderer;return Pi(e.startAngle,e.endAngle-e.startAngle,e.pixelRadius,e.pixelInnerRadius)},i.prototype.positionBulletReal=function(e,t,n){var r=this.xAxis,a=this.yAxis;(tr.end||na.end)&&(e.visible=!1),e.moveTo(this.xAxis.renderer.positionToPoint(t,n))},i.prototype.setXAxis=function(e){s.prototype.setXAxis.call(this,e),this.updateRendererRefs()},i.prototype.setYAxis=function(e){s.prototype.setYAxis.call(this,e),this.updateRendererRefs()},i.prototype.updateRendererRefs=function(){var e=this.xAxis.renderer,t=this.yAxis.renderer;e.axisRendererY=t},i}(pi);_.registeredClasses.RadarColumnSeries=tu,_.registeredClasses.RadarColumnSeriesDataItem=eu;var cs=function(s){function i(){var e=s.call(this)||this;return e.slice=e.createChild($),e.slice.shouldClone=!1,e.slice.setElement(e.paper.add("path")),e.slice.isMeasured=!1,e.orientation="vertical",e.bottomWidth=F(100),e.topWidth=F(100),e.isMeasured=!1,e.width=10,e.height=10,e.expandDistance=0,e.className="FunnelSlice",e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.pixelPaddingTop,t=this.pixelPaddingBottom,n=this.pixelPaddingRight,r=this.pixelPaddingLeft,a=this.pixelWidth-n-r,o=this.pixelHeight-e-t,l=this.expandDistance,h="";if(this.orientation=="vertical"){var p={x:(a-(b=xe(this.topWidth,a)))/2+r,y:e},u={x:(a+b)/2+r,y:e},d={x:(a+(C=xe(this.bottomWidth,a)))/2+r,y:e+o},c={x:(a-C)/2+r,y:e+o},f={x:u.x+(d.x-u.x)/2+l*o,y:u.y+.5*o},g={x:p.x+(c.x-p.x)/2-l*o,y:p.y+.5*o},m=T(d),x=T(p);l!=0&&(m=ni(d,f),x=ni(p,g)),h=E(p)+T(u)+m+T(c)+x,this.tickPoint={x:u.x+(d.x-u.x)/2,y:u.y+(d.y-u.y)/2}}else{var b,C,S={x:r,y:(o-(b=xe(this.topWidth,o)))/2+e},P={x:r,y:(o+b)/2+e},O={x:r+a,y:(o-(C=xe(this.bottomWidth,o)))/2+e},I={x:r+a,y:(o+C)/2+e};f={y:S.y+(O.y-S.y)/2-l*a,x:S.x+.5*a},g={y:P.y+(I.y-P.y)/2+l*a,x:P.x+.5*a},m=T(O),x=T(P),l!=0&&(m=ni(O,f),x=ni(P,g)),h=E(P)+T(S)+m+T(I)+x,this.tickPoint={y:P.y+(I.y-P.y)/2,x:P.x+(I.x-P.x)/2}}this.slice.path=h,this.invalidateLayout()},i.prototype.getPoint=function(e,t){var n=this.pixelPaddingTop,r=this.pixelPaddingBottom,a=this.pixelPaddingRight,o=this.pixelPaddingLeft,l=this.pixelWidth-a-o,h=this.pixelHeight-n-r;if(this.orientation=="vertical"){var p={x:(l-(f=xe(this.topWidth,l)))/2+o,y:n},u={x:(l+f)/2+o,y:n},d={x:(l+(g=xe(this.bottomWidth,l)))/2+o,y:n+h},c=p.x+((l-g)/2+o-p.x)*t;return{x:c+(u.x+(d.x-u.x)*t-c)*e,y:u.y+(d.y-u.y)*t}}var f,g,m=o,x=(h-(f=xe(this.topWidth,h)))/2+n,b=(h+f)/2+n,C=o+l,S=x+((h-(g=xe(this.bottomWidth,h)))/2+n-x)*e;return{y:S+(b+((h+g)/2+n-b)*e-S)*t,x:m+(C-m)*e}},Object.defineProperty(i.prototype,"bottomWidth",{get:function(){return this.getPropertyValue("bottomWidth")},set:function(e){this.setPercentProperty("bottomWidth",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"topWidth",{get:function(){return this.getPropertyValue("topWidth")},set:function(e){this.setPercentProperty("topWidth",e,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(e){this.setPropertyValue("orientation",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"expandDistance",{get:function(){return this.getPropertyValue("expandDistance")},set:function(e){this.setPropertyValue("expandDistance",e,!0)},enumerable:!0,configurable:!0}),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.slice&&this.slice.copyFrom(e.slice)},i}(W);_.registeredClasses.FunnelSlice=cs;var iu=function(s){function i(){var e=s.call(this)||this;return e._label=new Me,e._slice=new Me,e.className="FunnelTick",e.element=e.paper.add("path"),e._disposers.push(e._label),e._disposers.push(e._slice),e.setPropertyValue("locationX",0),e.setPropertyValue("locationY",0),e.applyTheme(),e}return w(i,s),i.prototype.draw=function(){s.prototype.draw.call(this);var e=this.slice,t=e.getPoint(this.locationX,this.locationY);if(t){var n=this.label,r=e.dataItem.component,a=void 0,o=void 0,l=void 0;if(r.orientation=="vertical"){var h=n.pixelX,p=n.pixelY;r.labelsOpposite||(h+=n.maxRight),a=Qe(t,e,this.parent),l=Qe({x:h,y:p},n.parent,this.parent),o={x:n.parent.pixelX-this.length,y:l.y},r.labelsOpposite||(o.x=n.parent.measuredWidth+this.length)}else h=n.pixelX,p=n.pixelY,r.labelsOpposite||(p+=n.maxBottom),a=Qe(t,e,this.parent),o={x:(l=Qe({x:h,y:p},n.parent,this.parent)).x,y:n.parent.pixelY-this.length},r.labelsOpposite||(o.y=n.parent.measuredHeight+this.length);this.path=E(a)+T(o)+T(l)}},Object.defineProperty(i.prototype,"slice",{get:function(){return this._slice.get()},set:function(e){this._slice.set(e,new _e([e.events.on("transformed",this.invalidate,this,!1),e.events.on("validated",this.invalidate,this,!1)]))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"label",{get:function(){return this._label.get()},set:function(e){this._label.set(e,e.events.on("transformed",this.invalidate,this,!1))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"locationX",{get:function(){return this.getPropertyValue("locationX")},set:function(e){this.setPropertyValue("locationX",e,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"locationY",{get:function(){return this.getPropertyValue("locationY")},set:function(e){this.setPropertyValue("locationY",e,!1,!0)},enumerable:!0,configurable:!0}),i}(en);_.registeredClasses.FunnelTick=iu;var fs=function(s){function i(){var e=s.call(this)||this;return e.className="FunnelSeriesDataItem",e.events.on("visibilitychanged",function(){e.component&&e.component.invalidateDataItems()},e,!1),e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"sliceLink",{get:function(){var e=this;if(!this._sliceLink){var t=this.component.sliceLinks.create();this._sliceLink=t,this._disposers.push(t),t.parent=this.component.slicesContainer,this._disposers.push(new le(function(){e.component&&e.component.sliceLinks.removeValue(t)})),this.addSprite(t),t.visible=this.visible}return this._sliceLink},enumerable:!0,configurable:!0}),i}(ns),Xo=function(s){function i(){var e=s.call(this)||this;return e._nextY=0,e.className="FunnelSeries",e.orientation="vertical",e.width=F(100),e.height=F(100),e.slicesContainer.width=F(100),e.slicesContainer.height=F(100),e._disposers.push(e.slicesContainer.events.on("maxsizechanged",e.invalidateDataItems,e,!1)),e.labelsOpposite=!0,e.labelsContainer.layout="absolute",e.bottomRatio=0,e.applyTheme(),e}return w(i,s),i.prototype.createSlice=function(){return new cs},i.prototype.createTick=function(){return new iu},i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Funnel Series"))},i.prototype.createDataItem=function(){return new fs},i.prototype.initSlice=function(e){e.isMeasured=!1,e.defaultState.properties.scale=1,e.observe("scale",this.handleSliceScale,this),e.observe(["dx","dy","x","y"],this.handleSliceMove,this),e.tooltipText="{category}: {value.percent.formatNumber('#.#p')} ({value.value})",e.states.create("hover").properties.expandDistance=.2},i.prototype.initLabel=function(e){s.prototype.initLabel.call(this,e),e.verticalCenter="middle",e.horizontalCenter="middle",e.isMeasured=!0,e.padding(5,5,5,5)},i.prototype.validate=function(){s.prototype.validate.call(this),this._nextY=0},i.prototype.validateDataElements=function(){var e=this,t=this.slicesContainer,n=this.labelsContainer,r=this.labels.template;this.alignLabels?(r.interactionsEnabled=!0,t.isMeasured=!0,n.isMeasured=!0):(r.interactionsEnabled=!1,t.isMeasured=!1,n.isMeasured=!1);var a=0,o=0;this.dataItems.each(function(l){v(l.value)&&(o++,l.value>0?a+=Math.abs(l.getWorkingValue("value")/l.value):e.ignoreZeroValues||!l.visible||l.__disabled||l.isHiding?o--:a+=1)}),this._total=1/o*a,this._count=o,s.prototype.validateDataElements.call(this),this.arrangeLabels()},i.prototype.getNextValue=function(e){var t=e.index,n=e.getWorkingValue("value");if(t0){var t=this.labels.getIndex(e);return t.__disabled||!t.visible?this.getLastLabel(e-1):t}},i.prototype.arrangeLabels=function(){if(this.alignLabels){var e=this.labels.length;if(e>1){var t=this.getLastLabel(e-1);if(t){var n=t.pixelY,r=t.pixelX;if(e>1){for(var a=e-2;a>=0;a--)(o=this.labels.getIndex(a)).visible&&!o.__disabled&&(o.invalid&&o.validate(),this.orientation=="vertical"?o.pixelY+o.measuredHeight>n&&(o.y=Math.min(1e6,n-o.measuredHeight)):o.pixelX+o.measuredWidth>r&&(o.x=Math.min(1e6,r-o.measuredWidth)),n=o.pixelY,r=o.pixelX);for(n=0,r=0,a=0;a0){var l=o.getWorkingValue("value")/o.value,h=o.sliceLink;e.orientation=="vertical"?n-=h.pixelHeight*l:t-=h.pixelWidth*l}}),this._pyramidHeight=xe(this.pyramidHeight,n),this._pyramidWidth=xe(this.pyramidHeight,t),this.orientation=="vertical"){var r=(n-this._pyramidHeight)/2;this.slicesContainer.y=r,this.labelsContainer.y=r,this.ticksContainer.y=r}else{var a=(t-this._pyramidWidth)/2;this.slicesContainer.x=a,this.labelsContainer.x=a,this.ticksContainer.x=a}s.prototype.validateDataElements.call(this)},i.prototype.decorateSlice=function(e){var t=this.dataItem.values.value.absoluteSum;if(t!=0){var n=e.slice,r=e.sliceLink,a=e.label,o=e.tick;this.getNextValue(e);var l=Math.abs(e.getWorkingValue("value")),h=this._pyramidWidth,p=this._pyramidHeight,u=this.slicesContainer.innerWidth,d=this.slicesContainer.innerHeight,c=r.pixelWidth,f=r.pixelHeight;if(e.value!=0&&e.value!=null||!this.ignoreZeroValues?e.__disabled=!1:e.__disabled=!0,this.orientation=="vertical"){var g=xe(this.topWidth,u);y(this._nextWidth)||(this._nextWidth=g);var m=xe(this.bottomWidth,u),x=this._nextWidth,b=Math.atan2(p,g-m);(I=Math.tan(Math.PI/2-b))==0&&(I=1e-8);var C=void 0,S=void 0;if(this.valueIs=="area"){var P=(g+m)/2*p*l/t,O=Math.abs(x*x-2*P*I);S=(C=(x-Math.sqrt(O))/I)>0?(2*P-C*x)/C:x}else S=x-(C=p*l/t)*I;n.height=C,n.width=u,n.bottomWidth=S,n.topWidth=x,r.topWidth=n.bottomWidth,r.bottomWidth=n.bottomWidth,n.y=this._nextY,this.alignLabels?a.x=0:a.x=u/2,a.y=n.pixelY+n.pixelHeight*o.locationY+n.dy,this._nextY+=n.pixelHeight+f*l/Math.max(Math.abs(e.value),1e-8),r.y=this._nextY-f,r.x=u/2}else{var I;g=xe(this.topWidth,d),y(this._nextWidth)||(this._nextWidth=g),m=xe(this.bottomWidth,d),x=this._nextWidth,b=Math.atan2(h,g-m),(I=Math.tan(Math.PI/2-b))==0&&(I=1e-8);var k=void 0;S=void 0,S=this.valueIs=="area"?(2*(P=(g+m)/2*h*l/t)-(k=(x-Math.sqrt(x*x-2*P*I))/I)*x)/k:x-(k=h*l/t)*I,n.width=k,n.height=d,n.bottomWidth=S,n.topWidth=x,r.topWidth=n.bottomWidth,r.bottomWidth=n.bottomWidth,n.x=this._nextY,this.alignLabels?a.y=this.labelsContainer.measuredHeight:a.y=d/2,a.x=n.pixelX+n.pixelWidth*o.locationX+n.dx,this._nextY+=n.pixelWidth+c*l/Math.max(Math.abs(e.value),1e-8),r.x=this._nextY-c,r.y=d/2}this._nextWidth=n.bottomWidth}},Object.defineProperty(i.prototype,"topWidth",{get:function(){return this.getPropertyValue("topWidth")},set:function(e){this.setPercentProperty("topWidth",e,!1,!1,10,!1)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pyramidHeight",{get:function(){return this.getPropertyValue("pyramidHeight")},set:function(e){this.setPercentProperty("pyramidHeight",e,!1,!1,10,!1)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bottomWidth",{get:function(){return this.getPropertyValue("bottomWidth")},set:function(e){this.setPercentProperty("bottomWidth",e,!1,!1,10,!1)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"valueIs",{get:function(){return this.getPropertyValue("valueIs")},set:function(e){this.setPropertyValue("valueIs",e)&&this.invalidate()},enumerable:!0,configurable:!0}),i}(Xo);_.registeredClasses.PyramidSeries=Yo,_.registeredClasses.PyramidSeriesDataItem=gs;var zo=function(s){function i(){var e=s.call(this)||this;return e.className="PictorialStackedSeriesDataItem",e.applyTheme(),e}return w(i,s),i}(gs),nu=function(s){function i(){var e=s.call(this)||this;return e.className="PictorialStackedSeries",e.topWidth=F(100),e.bottomWidth=F(100),e.valueIs="height",e.applyTheme(),e.startLocation=0,e.endLocation=1,e.align="center",e.valign="middle",e._maskSprite=e.slicesContainer.createChild($),e._maskSprite.visible=!1,e._maskSprite.zIndex=100,e._maskSprite.shouldClone=!1,e}return w(i,s),i.prototype.validateDataElements=function(){var e=this.slicesContainer.maxWidth,t=this.slicesContainer.maxHeight,n=this._maskSprite,r=n.measuredWidth/n.scale,a=n.measuredHeight/n.scale,o=ie(t/a,e/r);o==1/0&&(o=1),o=q(.001,o);var l,h,p=this.startLocation,u=this.endLocation,d=ie(e,r*o),c=ie(t,a*o);n.scale=o,this.orientation=="vertical"?(this.topWidth=d+4,this.bottomWidth=d+4,this.pyramidHeight=c*(u-p),n.x=e/2,n.y=c/2):(this.topWidth=c+4,this.bottomWidth=c+4,this.pyramidHeight=d*(u-p),n.valign="middle",n.x=d/2,n.y=t/2),n.verticalCenter="middle",n.horizontalCenter="middle",s.prototype.validateDataElements.call(this),this.orientation=="vertical"?(this.valign=="bottom"&&(l=t-c),this.valign=="middle"&&(l=(t-c)/2),this.valign=="top"&&(l=0),this.align=="left"&&(h=-(e-d)/2),this.align=="center"&&(h=0),this.align=="right"&&(h=(e-d)/2),this.slices.template.dy=p*c,this.alignLabels&&(this.slicesContainer.dx=h)):(this.valign=="bottom"&&(l=(t-c)/2),this.valign=="middle"&&(l=0),this.valign=="top"&&(l=-(t-c)/2),this.align=="left"&&(h=0),this.align=="center"&&(h=(e-d)/2),this.align=="right"&&(h=e-d),this.slices.template.dx=p*d,this.alignLabels&&(this.slicesContainer.dy=l)),this.slicesContainer.x=h,this.labelsContainer.x=h,this.ticksContainer.x=h,this.slicesContainer.y=l,this.labelsContainer.y=l,this.ticksContainer.y=l,d>0&&c>0&&(this.slicesContainer.mask=n)},i.prototype.applyInternalDefaults=function(){s.prototype.applyInternalDefaults.call(this),v(this.readerTitle)||(this.readerTitle=this.language.translate("Pyramid Series"))},i.prototype.createDataItem=function(){return new zo},Object.defineProperty(i.prototype,"maskSprite",{get:function(){return this._maskSprite},enumerable:!0,configurable:!0}),i.prototype.initSlice=function(e){s.prototype.initSlice.call(this,e);var t=e.states.getKey("hover");t&&(t.properties.expandDistance=0)},Object.defineProperty(i.prototype,"startLocation",{get:function(){return this.getPropertyValue("startLocation")},set:function(e){this.setPropertyValue("startLocation",e)&&this.invalidateDataItems()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endLocation",{get:function(){return this.getPropertyValue("endLocation")},set:function(e){this.setPropertyValue("endLocation",e)&&this.invalidateDataItems()},enumerable:!0,configurable:!0}),i}(Yo);_.registeredClasses.PictorialStackedSeries=nu,_.registeredClasses.PictorialStackedSeriesDataItem=zo;var Uo=function(s){function i(){var e=s.call(this)||this;return e.className="ConeColumn",e}return w(i,s),i.prototype.createAssets=function(){this.coneColumn=this.createChild(Pp),this.coneColumn.shouldClone=!1,this.column=this.coneColumn},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.coneColumn&&this.coneColumn.copyFrom(e.coneColumn)},i}(hi);_.registeredClasses.ConeColumn=Uo;var ru=function(s){function i(){var e=s.call(this)||this;return e.className="ConeSeriesDataItem",e.applyTheme(),e}return w(i,s),i}(Gt),su=function(s){function i(){var e=s.call(this)||this;return e.className="ConeSeries",e.applyTheme(),e}return w(i,s),i.prototype.createColumnTemplate=function(){return new Uo},i.prototype.getMaskPath=function(){var e=0,t=0,n=this.columns.getIndex(0);if(n)return this.baseAxis==this.xAxis?t=n.coneColumn.innerWidth/2+1:e=n.coneColumn.innerHeight/2+1,Yt({x:-e,y:0,width:this.xAxis.axisLength+e,height:this.yAxis.axisLength+t})},i.prototype.validateDataElementReal=function(e){if(s.prototype.validateDataElementReal.call(this,e),e.column){var t=e.column.coneColumn;t.fill=e.column.fill,this.baseAxis==this.yAxis?t.orientation="horizontal":t.orientation="vertical"}},i}(pi);_.registeredClasses.ConeSeries=su,_.registeredClasses.ConeSeriesDataItem=ru;var Go=function(s){function i(){var e=s.call(this)||this;return e.className="CurvedColumn",e}return w(i,s),i.prototype.createAssets=function(){this.curvedColumn=this.createChild($),this.curvedColumn.shouldClone=!1,this.setPropertyValue("tension",.7),this.width=F(120),this.height=F(120),this.column=this.curvedColumn},i.prototype.draw=function(){s.prototype.draw.call(this);var e,t=this.realWidth,n=this.realHeight,r=this.realX-this.pixelX,a=this.realY-this.pixelY;this.width;var o=1,l=1;this.orientation=="vertical"?(o=this.tension,e=[{x:0,y:n+a},{x:t/2,y:a},{x:t,y:n+a}]):(l=this.tension,e=[{x:r,y:n=Math.abs(n)},{x:r+t,y:n/2},{x:r,y:0}]);var h=E(e[0])+new zt(o,l).smooth(e);this.column.path=h},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.curvedColumn&&this.curvedColumn.copyFrom(e.curvedColumn)},Object.defineProperty(i.prototype,"tension",{get:function(){return this.getPropertyValue("tension")},set:function(e){this.setPropertyValue("tension",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(e){this.setPropertyValue("orientation",e,!0)},enumerable:!0,configurable:!0}),i}(hi);_.registeredClasses.CurvedColumn=Go;var au=function(s){function i(){var e=s.call(this)||this;return e.className="CurvedColumnSeriesDataItem",e.applyTheme(),e}return w(i,s),i}(Gt),ou=function(s){function i(){var e=s.call(this)||this;return e.className="CurvedColumnSeries",e.applyTheme(),e}return w(i,s),i.prototype.createColumnTemplate=function(){return new Go},i.prototype.validateDataElementReal=function(e){s.prototype.validateDataElementReal.call(this,e);var t=e.column;(t=e.column)&&(e.column.curvedColumn.fill=e.column.fill,this.baseAxis==this.yAxis?t.orientation="horizontal":t.orientation="vertical")},i}(pi);_.registeredClasses.CurvedColumnSeries=ou,_.registeredClasses.CurvedColumnSeriesDataItem=au;var lu=function(s){function i(){var e=s.call(this)||this;e.className="CircleBullet";var t=e.createChild(ii);return t.shouldClone=!1,t.radius=5,t.isMeasured=!1,e.circle=t,e.applyTheme(),e}return w(i,s),i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.circle.copyFrom(e.circle)},i}(It);_.registeredClasses.CircleBullet=lu;var hu=function(s){function i(){var e=s.call(this)||this;return e.className="ErrorBullet",e.errorLine=e.createChild($),e.errorLine.shouldClone=!1,e.width=20,e.height=20,e.strokeOpacity=1,e.isDynamic=!0,e}return w(i,s),i.prototype.validatePosition=function(){s.prototype.validatePosition.call(this);var e=this.pixelWidth/2,t=this.pixelHeight/2;this.errorLine.path=E({x:-e,y:-t})+T({x:e,y:-t})+E({x:0,y:-t})+T({x:0,y:t})+E({x:-e,y:t})+T({x:e,y:t})},i.prototype.copyFrom=function(e){s.prototype.copyFrom.call(this,e),this.errorLine.copyFrom(e.errorLine)},i}(It);_.registeredClasses.ErrorBullet=hu;var pu=function(s){function i(){var e=s.call(this)||this;return e.className="NavigationBarDataItem",e.applyTheme(),e}return w(i,s),Object.defineProperty(i.prototype,"name",{get:function(){return this.properties.name},set:function(e){this.setProperty("name",e)},enumerable:!0,configurable:!0}),i}(ei),uu=function(s){function i(){var e=s.call(this)||this;e.className="NavigationBar";var t=new ae,n=new zr;n.valign="middle",n.paddingTop=8,n.paddingBottom=8,e.paddingBottom=2,e.links=new Oe(n),e._disposers.push(new fe(e.links)),e._disposers.push(n),e._linksIterator=new fn(e.links,function(){return e.links.create()}),e._linksIterator.createNewItems=!0;var r=new Ur;r.direction="right",r.width=8,r.height=12,r.fill=t.getFor("alternativeBackground"),r.fillOpacity=.5,r.valign="middle",r.marginLeft=10,r.marginRight=10,e.separators=new Oe(r),e._disposers.push(new fe(e.separators)),e._disposers.push(r);var a=new zr;return e.activeLink=a,a.copyFrom(n),a.valign="middle",a.fontWeight="bold",e.width=F(100),e.layout="grid",e.dataFields.name="name",e.applyTheme(),e}return w(i,s),i.prototype.validateDataElements=function(){this.removeChildren(),this._linksIterator.reset(),s.prototype.validateDataElements.call(this)},i.prototype.validateDataElement=function(e){var t;if(s.prototype.validateDataElement.call(this,e),e.indext.getHitOption(this.interactions,"hitTolerance")){switch(this._generalBehavior){case"zoom":this.dispatch("zoomended");break;case"select":this.dispatch("selectended");break;case"pan":this.dispatch("panended"),t.setGlobalStyle(He.default)}this.downPoint=void 0,this.updateSelection()}},i.prototype.updateSelection=function(){},i.prototype.getPositions=function(){this.xPosition=this.point.x/this.innerWidth,this.yPosition=1-this.point.y/this.innerHeight},i.prototype.handleCursorDown=function(e){if(!(!this.interactionsEnabled||this.interactions.isTouchProtected&&e.touch)&&K().isLocalElement(e.pointer,this.paper.svg,this.uid)){kn();var t=vi(e.pointer.point,this);this._stick=="hard"&&this._stickPoint&&(t=this._stickPoint),this._adapterO&&this._adapterO.apply("cursorPoint",t),this.fitsToBounds(t)&&(this._downPointOrig={x:t.x,y:t.y},e.event.cancelable&&this.shouldPreventGestures(e.touch)&&this.fitsToBounds(t)&&e.event.preventDefault(),this.triggerMove(t),this.triggerDown(t))}},i.prototype.shouldPreventGestures=function(e){return!0},i.prototype.updatePoint=function(e){},i.prototype.handleCursorUp=function(e){if(this.interactionsEnabled&&(this.downPoint||K().isLocalElement(e.pointer,this.paper.svg,this.uid))){var t=vi(e.pointer.point,this);this._adapterO&&this._adapterO.apply("cursorPoint",t),this.downPoint&&this.fitsToBounds(this.downPoint)&&(this._stick=="hard"&&this._stickPoint&&(t=this._stickPoint),this._upPointOrig={x:t.x,y:t.y},this.triggerMove(t),this.triggerUp(t))}},Object.defineProperty(i.prototype,"chart",{get:function(){return this._chart},set:function(e){this._chart=e,v(this._chart.plotContainer)&&K().lockElement(this._chart.plotContainer.interactions)},enumerable:!0,configurable:!0}),i}(W);_.registeredClasses.Cursor=Ko;var Zo=function(s){function i(){var e=s.call(this)||this;e._lineX=new Me,e._lineY=new Me,e._xAxis=new Me,e._yAxis=new Me,e._snapToDisposers=[],e.className="XYCursor",e.behavior="zoomX",e.maxPanOut=.1;var t=new ae;e.snapOnPan=!0;var n=e.createChild($);n.shouldClone=!1,n.fillOpacity=.2,n.fill=t.getFor("alternativeBackground"),n.isMeasured=!1,n.visible=!1,n.interactionsEnabled=!1,e.selection=n,e._disposers.push(e.selection);var r=e.createChild($);r.shouldClone=!1,r.stroke=t.getFor("grid"),r.fill=B(),r.strokeDasharray="3,3",r.isMeasured=!1,r.strokeOpacity=.4,r.interactionsEnabled=!1,r.y=0,e.lineX=r,e._disposers.push(e.lineX);var a=e.createChild($);return a.shouldClone=!1,a.stroke=t.getFor("grid"),a.fill=B(),a.strokeDasharray="3,3",a.isMeasured=!1,a.strokeOpacity=.4,a.interactionsEnabled=!1,a.x=0,e.lineY=a,e._disposers.push(e.lineY),e.events.on("sizechanged",e.updateSize,e,!1),e._disposers.push(e._lineX),e._disposers.push(e._lineY),e._disposers.push(e._xAxis),e._disposers.push(e._yAxis),e.mask=e,e.hideSeriesTooltipsOnSelection=!0,e.applyTheme(),e}return w(i,s),i.prototype.updateSize=function(){this.lineX&&(this.lineX.path=E({x:0,y:0})+T({x:0,y:this.innerHeight})),this.lineY&&(this.lineY.path=E({x:0,y:0})+T({x:this.innerWidth,y:0}))},i.prototype.updateSelection=function(){if(this._usesSelection){var e=this.downPoint,t=this.behavior;if(e){var n=this.point;this.lineX&&(n.x=this.lineX.pixelX),this.lineY&&(n.y=this.lineY.pixelY);var r=this.selection,a=Math.min(n.x,e.x),o=Math.min(n.y,e.y),l=V(Math.abs(e.x-n.x),this._positionPrecision),h=V(Math.abs(e.y-n.y),this._positionPrecision);switch(t){case"zoomX":case"selectX":o=0,h=this.pixelHeight;break;case"zoomY":case"selectY":a=0,l=this.pixelWidth}r.x=a,r.y=o,r.path=Xr(l,h),r.validatePosition()}else this._generalBehavior!="select"&&this.selection.hide()}},i.prototype.fixPoint=function(e){return e.x=Math.max(0,e.x),e.y=Math.max(0,e.y),e.x=Math.min(this.pixelWidth,e.x),e.y=Math.min(this.pixelHeight,e.y),e},i.prototype.triggerMoveReal=function(e,t){s.prototype.triggerMoveReal.call(this,e,t);var n=this.snapToSeries;if(n&&!this.downPoint)if(n instanceof oi)n.isHidden&&this.updateLinePositions(e);else{var r=!0;j(n,function(a){a.isHidden||(r=!1)}),r&&this.updateLinePositions(e)}else this.updateLinePositions(e);this.downPoint&&oe(this.downPoint,e)>3&&this._generalBehavior=="pan"&&(this.getPanningRanges(),this.dispatch("panning"))},i.prototype.updateLinePositions=function(e){e=this.fixPoint(this.point),this.lineX&&this.lineX.visible&&!this.xAxis&&(this.lineX.x=e.x),this.lineY&&this.lineY.visible&&!this.yAxis&&(this.lineY.y=e.y),this.updateSelection()},i.prototype.triggerDownReal=function(e){if(this.visible&&!this.isHiding)if(this._generalBehavior=="select"&&(this.selection.parent=this.parent),this.fitsToBounds(e)){this.downPoint={x:e.x,y:e.y},this.updatePoint(e),this.point.x=this.downPoint.x,this.point.y=this.downPoint.y;var t=this.selection,n=this.downPoint.x,r=this.downPoint.y;this._usesSelection&&(t.x=n,t.y=r,t.path="",t.show()),s.prototype.triggerDownReal.call(this,e)}else this.downPoint=void 0;else this.downPoint=void 0},i.prototype.updatePoint=function(e){this.lineX&&(e.x=this.lineX.pixelX),this.lineY&&(e.y=this.lineY.pixelY)},i.prototype.triggerUpReal=function(e){this.hasMoved()?this.downPoint&&(this.upPoint=e,this.updatePoint(this.upPoint),this._generalBehavior!="pan"&&this.getRanges(),this._generalBehavior!="select"&&this.selection.hide(),s.prototype.triggerUpReal.call(this,e)):(this._generalBehavior!="select"?this.selection.hide(0):(this.xRange=void 0,this.yRange=void 0,this.dispatchImmediately("selectended")),this._generalBehavior=="pan"&&K().setGlobalStyle(He.default),this.dispatchImmediately("behaviorcanceled")),this.downPoint=void 0,this.dispatch("cursorpositionchanged")},i.prototype.hasMoved=function(){return(this.behavior=="zoomX"||this.behavior=="panX"?ll(this._upPointOrig,this._downPointOrig):this.behavior=="zoomY"||this.behavior=="panY"?hl(this._upPointOrig,this._downPointOrig):oe(this._upPointOrig,this._downPointOrig))>K().getHitOption(this.interactions,"hitTolerance")},i.prototype.getPanningRanges=function(){var e=V(this.downPoint.x/this.innerWidth,5),t=1-V(this.downPoint.y/this.innerHeight,5),n=e-V(this.point.x/this.innerWidth,5),r=t-(1-V(this.point.y/this.innerHeight,5));this.xRange={start:n,end:1+n},this.yRange={start:r,end:1+r},this.behavior=="panX"&&(this.yRange.start=0,this.yRange.end=1),this.behavior=="panY"&&(this.xRange.start=0,this.xRange.end=1)},i.prototype.getRanges=function(){this.lineX&&(this.upPoint.x=this.lineX.pixelX),this.lineY&&(this.upPoint.y=this.lineY.pixelY),this.selection;var e=V(this.downPoint.x/this.innerWidth,5),t=V(this.upPoint.x/this.innerWidth,5),n=1-V(this.downPoint.y/this.innerHeight,5),r=1-V(this.upPoint.y/this.innerHeight,5);this.xRange={start:ie(e,t),end:q(e,t)},this.yRange={start:ie(n,r),end:q(n,r)}},Object.defineProperty(i.prototype,"behavior",{get:function(){return this.getPropertyValue("behavior")},set:function(e){this.setPropertyValue("behavior",e,!0),this._usesSelection=!1,e.indexOf("zoom")!=-1&&(this._generalBehavior="zoom",this._usesSelection=!0),e.indexOf("select")!=-1&&(this._generalBehavior="select",this._usesSelection=!0),e.indexOf("pan")!=-1&&(this._generalBehavior="pan",this._usesSelection=!1)},enumerable:!0,configurable:!0}),i.prototype.shouldPreventGestures=function(e){return!(this.interactions.isTouchProtected&&e||this.behavior=="none")},Object.defineProperty(i.prototype,"fullWidthLineX",{get:function(){return this.getPropertyValue("fullWidthLineX")},set:function(e){this.setPropertyValue("fullWidthLineX",e),e||this.updateSize()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fullWidthLineY",{get:function(){return this.getPropertyValue("fullWidthLineY")},set:function(e){this.setPropertyValue("fullWidthLineY",e),e||this.updateSize()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hideSeriesTooltipsOnSelection",{get:function(){return this.getPropertyValue("hideSeriesTooltipsOnSelection")},set:function(e){this.setPropertyValue("hideSeriesTooltipsOnSelection",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxTooltipDistance",{get:function(){return this.getPropertyValue("maxTooltipDistance")},set:function(e){this.setPropertyValue("maxTooltipDistance",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxPanOut",{get:function(){return this.getPropertyValue("maxPanOut")},set:function(e){this.setPropertyValue("maxPanOut",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"xAxis",{get:function(){return this._xAxis.get()},set:function(e){var t=this;this._xAxis.get()!=e&&this._xAxis.set(e,new _e([e.tooltip.events.on("positionchanged",this.handleXTooltipPosition,this,!1),e.events.on("rangechangestarted",function(n){t.hide(0),t.preventShow=!0},void 0,!1),e.events.on("rangechangeended",function(n){t.preventShow=!1,t.hide(0),t.dispatch("cursorpositionchanged")},void 0,!1)]))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"yAxis",{get:function(){return this._yAxis.get()},set:function(e){var t=this;this._yAxis.get()!=e&&this._yAxis.set(e,new _e([e.tooltip.events.on("positionchanged",this.handleYTooltipPosition,this,!1),e.events.on("rangechangestarted",function(n){t.hide(0),t.__disabled=!0},void 0,!1),e.events.on("rangechangeended",function(n){t.__disabled=!1,t.hide(0),t.dispatch("cursorpositionchanged")},void 0,!1)]))},enumerable:!0,configurable:!0}),i.prototype.handleXTooltipPosition=function(e){var t=this.xAxis.tooltip,n=at({x:t.pixelX,y:t.pixelY},this),r=n.x;if(n.y=1,this.lineX&&(this.lineX.x=r,this.fitsToBounds(n)||this.hide()),this.xAxis&&this.fullWidthLineX){var a=this.xAxis.currentItemStartPoint,o=this.xAxis.currentItemEndPoint;if(a&&o){this.lineX.x=r;var l=o.x-a.x;this.lineX.path=Xr(l,this.innerHeight,-l/2)}}},i.prototype.handleYTooltipPosition=function(e){var t=this.yAxis.tooltip,n=at({x:t.pixelX,y:t.pixelY},this),r=n.y;if(n.x=1,this.lineY&&(this.lineY.y=r,this.fitsToBounds(n)||this.hide()),this.yAxis&&this.fullWidthLineY){var a=this.yAxis.currentItemStartPoint,o=this.yAxis.currentItemEndPoint;if(a&&o){this.lineY.y=r;var l=o.y-a.y;this.lineY.path=Xr(this.innerWidth,l,0,-l/2)}}},Object.defineProperty(i.prototype,"lineX",{get:function(){return this._lineX.get()},set:function(e){e?(e.setElement(this.paper.add("path")),this._lineX.set(e,e.events.on("positionchanged",this.updateSelection,this,!1)),e.interactionsEnabled=!1,e.parent=this):this._lineX.reset()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"lineY",{get:function(){return this._lineY.get()},set:function(e){e?(e.setElement(this.paper.add("path")),this._lineY.set(e,e.events.on("positionchanged",this.updateSelection,this,!1)),e.parent=this,e.interactionsEnabled=!1):this._lineY.reset()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selection",{get:function(){return this._selection},set:function(e){this._selection=e,e&&(e.element=this.paper.add("path"),e.parent=this)},enumerable:!0,configurable:!0}),i.prototype.processConfig=function(e){var t=this;if(e&&(v(e.xAxis)&&J(e.xAxis)&&(this.map.hasKey(e.xAxis)?e.xAxis=this.map.getKey(e.xAxis):(this.processingErrors.push('[XYCursor] No axis with id "'+e.xAxis+'" found for `xAxis`'),delete e.xAxis)),v(e.yAxis)&&J(e.yAxis)&&(this.map.hasKey(e.yAxis)?e.yAxis=this.map.getKey(e.yAxis):(this.processingErrors.push('[XYCursor] No axis with id "'+e.yAxis+'" found for `yAxis`'),delete e.yAxis)),v(e.snapToSeries))){var n=Ae(e.snapToSeries)?e.snapToSeries:[e.snapToSeries],r=!1;j(n,function(a,o){J(a)&&(t.map.hasKey(a)?n[o]=t.map.getKey(a):(t.processingErrors.push('[XYCursor] No series with id "'+a+'" found for `series`'),r=!0))}),r?delete e.snapToSeries:e.snapToSeries=n}s.prototype.processConfig.call(this,e)},Object.defineProperty(i.prototype,"snapToSeries",{get:function(){return this.getPropertyValue("snapToSeries")},set:function(e){var t=this;this.setPropertyValue("snapToSeries",e)&&(e instanceof oi&&(e=[e]),this._snapToDisposers&&j(this._snapToDisposers,function(n){n.dispose()}),this._snapToDisposers=[],e&&j(e,function(n){t._snapToDisposers.push(n.events.on("tooltipshownat",function(){t.handleSnap(n)},void 0,!1))}))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"snapOnPan",{get:function(){return this.getPropertyValue("snapOnPan")},set:function(e){this.setPropertyValue("snapOnPan",e)},enumerable:!0,configurable:!0}),i.prototype.handleSnap=function(e){if(!this.downPoint){var t=e.getTooltipX()+e.xAxis.pixelX,n=e.getTooltipY()+e.yAxis.pixelY,r=e.xAxis,a=e.yAxis;r&&r.renderer.opposite&&(n-=this.pixelHeight),this.point={x:t,y:n},this.getPositions();var o=t,l=n;t-=this.pixelWidth,a&&a.renderer.opposite&&(t+=this.pixelWidth);var h=e.tooltip,p=h.animationDuration,u=h.animationEasing;r instanceof ee&&!(r instanceof Pe)&&a instanceof ee&&!(a instanceof Pe)?(e.yAxis.showTooltipAtPosition(this.yPosition),e.xAxis.showTooltipAtPosition(this.xPosition)):(e.baseAxis==e.xAxis&&e.yAxis.showTooltipAtPosition(this.yPosition),e.baseAxis==e.yAxis&&e.xAxis.showTooltipAtPosition(this.xPosition)),this.lineY.x=t,this.lineX.y=n,this.xAxis||this.lineX.animate([{property:"x",to:o}],p,u),this.yAxis||this.lineY.animate([{property:"y",to:l}],p,u)}},i.prototype.dispose=function(){this.hide(0),s.prototype.dispose.call(this)},i}(Ko);_.registeredClasses.XYCursor=Zo;var du=function(s){function i(){var e=s.call(this)||this;return e.className="RadarCursor",e.radius=F(100),e.innerRadius=F(0),e.applyTheme(),e.mask=void 0,e}return w(i,s),i.prototype.fitsToBounds=function(e){var t=oe(e);return tthis.pixelInnerRadius-1},Object.defineProperty(i.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(e){this.setPropertyValue("startAngle",e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(e){this.setPropertyValue("endAngle",e,!0)},enumerable:!0,configurable:!0}),i.prototype.triggerMoveReal=function(e,t){this.xAxis&&(!this.xAxis||this.xAxis.cursorTooltipEnabled&&!this.xAxis.tooltip.disabled)||this.updateLineX(this.point),this.yAxis&&(!this.yAxis||this.yAxis.cursorTooltipEnabled&&!this.yAxis.tooltip.disabled)||this.updateLineY(this.point),this.updateSelection(),s.prototype.triggerMoveReal.call(this,e,t)},i.prototype.updateLineX=function(e){var t=this.pixelRadius,n=this.startAngle,r=this.endAngle,a=this.pixelInnerRadius;if(t>0&&y(n)&&y(r)&&y(a)){var o=bt(Ee(e),n,r),l=void 0;if(this.lineX&&this.lineX.visible){if(this.lineX.moveTo({x:0,y:0}),this.xAxis&&this.fullWidthLineX){var h=this.xAxis.currentItemStartPoint,p=this.xAxis.currentItemEndPoint;if(h&&p){var u=bt(Ee(h),n,r),d=bt(Ee(p),n,r)-u;n0&&(d-=360),l=E({x:a*L(o-=d/2),y:a*M(o)})+T({x:t*L(o),y:t*M(o)})+Le(o,d,t)+T({x:a*L(o+d),y:a*M(o+d)})+Le(o+d,-d,a)}}l||(l=E({x:a*L(o),y:a*M(o)})+T({x:t*L(o),y:t*M(o)})),this.lineX.path=l}}},i.prototype.updateLineY=function(e){if(this.lineY&&this.lineY.visible){var t=this.startAngle,n=this.endAngle,r=this.truePixelRadius,a=R(oe(e),0,this.truePixelRadius);if(y(a)&&y(t)){this.lineY.moveTo({x:0,y:0});var o=void 0,l=n-t;if(this.yAxis&&this.fullWidthLineY){var h=this.yAxis.currentItemStartPoint,p=this.yAxis.currentItemEndPoint;if(h&&p){var u=R(oe(h),0,r);o=E({x:(a=R(oe(p),0,r))*L(t),y:a*M(t)})+Le(t,l,a),o+=E({x:u*L(n),y:u*M(n)})+Le(n,-l,u)}}o||(o=E({x:a*L(t),y:a*M(t)})+Le(t,n-t,a)),this.lineY.path=o}}},i.prototype.updateSelection=function(){if(this._usesSelection){var e=this.downPoint;if(e){var t=this.point,n=this.pixelRadius,r=this.truePixelRadius,a=this.pixelInnerRadius,o=Math.min(this.startAngle,this.endAngle),l=Math.max(this.startAngle,this.endAngle),h=bt(Ee(e),o,l),p=bt(Ee(t),o,l),u=oe(e);if(u