UNPKG

@progress/kendo-ui

Version:

This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.

1 lines 593 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("kendo.drawing.cmn.chunk.js")):"function"==typeof define&&define.amd?define(["exports","kendo.drawing.cmn.chunk"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).kendo=t.kendo||{},t.kendo._globals=t.kendo._globals||{},t.kendo._globals.ChartsCmnChunk={}),t.kendo._globals.DrawingCmnChunk)}(this,(function(t,e){var o="arc",i="ArrowUp",r="ArrowDown",n="ArrowLeft",s="ArrowRight",a="aria-activedescendant",p="axisLabelClick",l="#000",h="bottom",c="center",u="circle",d="cross",f="date",g="12px sans-serif",y=10,v=600,m="end",x="Enter",_="Escape",b=/\{\d+:?/,w="height",k="inside",A="inherit",S="left",C=Number.MAX_VALUE,T=-Number.MAX_VALUE,P="none",O="noteClick",M="noteHover",E="noteLeave",L="object",I="outside",R="right",B="roundedRect",V="start",j="string",D="top",z="triangle",F="square",H="rect",N="value",U="#fff",G="width",W="x",X="y",Y="pointer",q="horizontal",Z="vertical",Q=Object.freeze({__proto__:null,ARC:o,ARIA_ACTIVE_DESCENDANT:a,ARROW_DOWN:r,ARROW_LEFT:n,ARROW_RIGHT:s,ARROW_UP:i,AXIS_LABEL_CLICK:p,BLACK:l,BOTTOM:h,CENTER:c,CIRCLE:u,COORD_PRECISION:3,CROSS:d,DATE:f,DEFAULT_FONT:g,DEFAULT_HEIGHT:400,DEFAULT_PRECISION:y,DEFAULT_SERIES_OPACITY:1,DEFAULT_WIDTH:v,END:m,ENTER:x,ESCAPE:_,FORMAT_REGEX:b,HEIGHT:w,HIGHLIGHT_ZINDEX:100,HORIZONTAL:q,INHERIT:A,INSIDE:k,LEFT:S,MAX_VALUE:C,MIN_VALUE:T,NONE:P,NOTE_CLICK:O,NOTE_HOVER:M,NOTE_LEAVE:E,OBJECT:L,OUTSIDE:I,POINTER:Y,RECT:H,RIGHT:R,ROUNDED_RECT:B,SQUARE:F,START:V,STRING:j,TAB:"Tab",TOP:D,TRIANGLE:z,VALUE:N,VERTICAL:Z,WHITE:U,WIDTH:G,X:W,Y:X});function K(t){return Array.isArray(t)}function $(t,e){for(var o=K(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var J=/\s+/g;function tt(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(J," "))}function et(t){var o=.5;t.options.stroke&&e.d(t.options.stroke.width)&&t.options.stroke.width%2==0&&(o=0);for(var i=0;i<t.segments.length;i++)t.segments[i].anchor().round(0).translate(o,o);return t}function ot(t,e){return-t.x*e.y+t.y*e.x<0}function it(t){return"number"==typeof t&&!isNaN(t)}function rt(t){return typeof t===j}function nt(t){return it(t)||rt(t)&&isFinite(t)}function st(t,e){return(t+1)%e}function at(t,e){var o=t-1;return o<0?e-1:o}function pt(t,e){return 1===e||t%e==0?0:t<0?e+t%e:t>=e?t%e:t}function lt(t){return"function"==typeof t}var ht="object";function ct(t,e){for(var o in e)if("__proto__"!==o&&"constructor"!==o){var i=e[o],r=typeof i,n=void 0;if((n=r===ht&&null!==i?i.constructor:null)&&n!==Array)if(i instanceof Date)t[o]=new Date(i.getTime());else if(lt(i.clone))t[o]=i.clone();else{var s=t[o];t[o]=typeof s===ht&&s||{},ct(t[o],i)}else"undefined"!==r&&(t[o]=i)}return t}function ut(t){for(var e=arguments,o=arguments.length,i=1;i<o;i++)ct(t,e[i]);return t}function dt(t){return"object"==typeof t}function ft(t){return it(t)?t+"px":t}var gt=/width|height|top|left|bottom|right/i;function yt(t){return gt.test(t)}function vt(t,e){var o=rt(e)?[e]:e;if(K(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=yt(s)?parseFloat(r[s]):r[s]}return i}if(dt(e))for(var a in e)t.style[a]=ft(e[a])}function mt(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o[D]=o[R]=o[h]=o[S]=t:(o[D]=t[D]||e,o[R]=t[R]||e,o[h]=t[h]||e,o[S]=t[S]||e),o}var xt={compile:function(t){return t}},_t=function(){};function bt(t){var e;return void 0===t&&(t={}),t.template?t.template=e=_t.compile(t.template):lt(t.content)&&(e=t.content),e}function wt(t){var e;return void 0===t&&(t={}),t.ariaTemplate?t.ariaTemplate=e=_t.compile(t.ariaTemplate):lt(t.ariaContent)&&(e=t.ariaContent),e}_t.register=function(t){xt=t},_t.compile=function(t,e){return xt.compile(t,e)};var kt=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,At={};function St(t){if(At[t])return At[t];var o=[];return t.replace(kt,(function(t,i,r,n){o.push(e.d(i)?i:r||n)})),At[t]=function(t){for(var e=t,i=0;i<o.length&&e;i++)e=e[o[i]];return e},At[t]}function Ct(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function Tt(t,e){if(t.className)for(var o=e.split(" "),i=0;i<o.length;i++)if(t.className.indexOf&&-1!==t.className.indexOf(o[i]))return!0}At[void 0]=function(t){return t};var Pt=function(){this._map=new Map};function Ot(t,e){if(e)return-1!==e.indexOf(t)}function Mt(t,o,i){return e.r(t+(o-t)*i,3)}Pt.prototype.get=function(t){return this._map.get(t)},Pt.prototype.set=function(t,e){this._map.set(t,e)};var Et="trigger",Lt=function(t,e){this.observer=t,this.handlerMap=ut({},this.handlerMap,e)};function It(t){return"[object Object]"===Object.prototype.toString.call(t)}function Rt(t,o){for(var i=t.length,r=[],n=0;n<i;n++){var s=o(t[n]);e.d(s)&&r.push(s)}return r}Lt.prototype.trigger=function(t,e){var o,i=this.observer,r=this.handlerMap;return r[t]?o=this.callObserver(r[t],e):i[Et]&&(o=this.callObserver(Et,t,e)),o},Lt.prototype.callObserver=function(t){for(var e=[],o=arguments.length-1;o-- >0;)e[o]=arguments[o+1];return this.observer[t].apply(this.observer,e)},Lt.prototype.requiresHandlers=function(t){if(this.observer.requiresHandlers)return this.observer.requiresHandlers(t);for(var e=0;e<t.length;e++)if(this.handlerMap[t[e]])return!0};var Bt=e.s.browser||{};function Vt(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,Bt.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),e=e>0?Math.ceil(e):Math.floor(e)}var jt=e.u,Dt=jt.append,zt=jt.bindEvents,Ft=jt.defined,Ht=jt.deg,Nt=jt.elementOffset,Ut=jt.elementSize,Gt=jt.eventCoordinates,Wt=jt.eventElement,Xt=jt.hashKey,Yt=jt.last,qt=jt.limitValue,Zt=jt.objectKey,Qt=jt.rad,Kt=jt.round,$t=jt.unbindEvents,Jt=jt.valueOrDefault,te=function(){};function ee(t,e){var o=t.prototype;o.options?o.options=ut({},o.options,e):o.options=e}te.fetchFonts=function(t,e,o){void 0===o&&(o={depth:0});!t||o.depth>5||!document.fonts||Object.keys(t).forEach((function(i){var r=t[i];"dataSource"!==i&&"$"!==i[0]&&r&&("font"===i?e.push(r):"object"==typeof r&&(o.depth++,te.fetchFonts(r,e,o),o.depth--))}))},te.loadFonts=function(t,o){var i=[];if(t.length>0&&document.fonts){try{i=t.map((function(t){return document.fonts.load(t)}))}catch(t){e.l(t)}Promise.all(i).then(o,o)}else o()},te.preloadFonts=function(t,e){var o=[];te.fetchFonts(t,o),te.loadFonts(o,e)};var oe="k-i-",ie="k-svg-i-",re=function(t,e){this.element=t,this.options=ut({},this.options,e),this.wrapper()};re.prototype.wrapper=function(){this.addClasses()},re.prototype.addClasses=function(){},re.prototype.html=function(){return this.element.outerHTML},ee(re,{name:"",size:"none",themeColor:"none",flip:"default",iconClass:"",stylingOptions:["size","themeColor","fill"]});var ne=function(t){function e(e,o){t.call(this,e,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.wrapper=function(){var e=this.element.className.split(" ").find((function(t){return t.startsWith(oe)})),o=this.options.icon?""+(this.options.icon.startsWith(oe)?"":oe)+this.options.icon:"";this._className=o,$(this.element,"k-icon"),$(this.element,"k-font-icon"),tt(this.element,e),$(this.element,o),$(this.element,this.options.iconClass||""),t.prototype.wrapper.call(this)},e}(re);ee(ne,{name:"HTMLFontIcon",icon:null});var se=function(t){function e(e,o){e.innerHTML="",t.call(this,e,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.wrapper=function(){var e=this.options.icon,o=this.options.iconClass,i=this.element.className.split(" ").find((function(t){return t.startsWith(ie)}));if(!e&&o){var r=o.match(/k-i-(\w+(?:-\w+)*)/);r&&(e=r[1],o=o.replace(r[0],""))}rt(e)&&(e=e.replace("k-i-","").replace(/-./g,(function(t){return t[1].toUpperCase()})),e=this.options.svgIcons[e]||this.options.svgIcons[e+"Icon"]);var n=e&&e.name?""+ie+e.name:"";if(this._className=n,$(this.element,"k-svg-icon"),tt(this.element,i),$(this.element,n),$(this.element,o||""),this.element.setAttribute("aria-hidden","true"),e&&It(e)){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("viewBox",e.viewBox||""),s.setAttribute("focusable","false"),s.innerHTML=e.content||"",this.element.appendChild(s)}t.prototype.wrapper.call(this)},e}(re);ee(se,{name:"HTMLSvgIcon",icon:null,svgIcons:{}});var ae={svg:se,font:ne};function pe(t,e){var o=t,i=e;return o&&(!dt(o)||o instanceof HTMLElement)&&!rt(o)||(i=o,o=document.createElement("span")),rt(i)&&(i={icon:i}),i.type||(i.type="svg"),ae[i.type]?new ae[i.type](o,i).html():null}function le(t){for(var e=C,o=T,i=0,r=t.length;i<r;i++){var n=t[i];null!==n&&isFinite(n)&&(e=Math.min(e,n),o=Math.max(o,n))}return{min:e===C?void 0:e,max:o===T?void 0:o}}function he(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var ce=e.M,ue=/matrix\((.*)\)/;function de(t){var e=getComputedStyle(t).transform;return"none"===e?ce.unit():function(t){var e=t.match(ue);if(null===e||2!==e.length)return ce.unit();var o=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(ce,[null].concat(o)))}(e)}function fe(t){if(!t)return ce.unit();for(var e=de(t),o=t.parentElement;o;){var i=de(o);e=e.multiplyCopy(i),o=o.parentElement}return e.b=e.c=e.e=e.f=0,e}function ge(t){return new e.C(t).isDark()?U:l}var ye={},ve=function(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e},me={size:{configurable:!0}};ve.prototype.values=function(){return this._values.filter((function(t){return t!==ye}))},ve.prototype.has=function(t){return void 0!==this._index[t]},ve.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},ve.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=ye,delete this._index[t])},ve.prototype.clear=function(){this._index={},this._values=[]},me.size.get=function(){return this._values.length},Object.defineProperties(ve.prototype,me);var xe=function(t){this._set=new Set(t)},_e={size:{configurable:!0}};xe.prototype.values=function(){return Array.from(this._set)},xe.prototype.has=function(t){return this._set.has(t)},xe.prototype.add=function(t){this._set.add(t)},xe.prototype.delete=function(t){this._set.delete(t)},xe.prototype.clear=function(){this._set.clear()},_e.size.get=function(){return this._set.size},Object.defineProperties(xe.prototype,_e);function be(t){return e=!1,"function"==typeof Set&&(e=new Set([1]).has(1)),e?new xe(t):new ve(t);var e}function we(t){throw t}var ke={INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110};function Ae(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Se=function(){this.height=0,this.width=0,this.data=[]};Se.prototype.clone=function(){var t=new Se;return t.height=this.height,t.width=this.width,t.data=this.data.map((function(t){return t.slice()})),t},Se.prototype.get=function(t,e){var o=this.data[t];return o?o[e]:null},Se.prototype.set=function(t,e,o){var i=this.data[t];null==i&&(i=this.data[t]=[]),i[e]=o,t>=this.height&&(this.height=t+1),e>=this.width&&(this.width=e+1)},Se.prototype.each=function(t,e){for(var o=0;o<this.height;++o)for(var i=0;i<this.width;++i){var r=this.get(o,i);if((e||null!=r)&&void 0!==(r=t(r,o,i)))return r}},Se.prototype.map=function(t,e){var o=new Se;return this.each((function(e,i,r){o.set(i,r,t(e,i,r))}),e),o},Se.prototype.transpose=function(){var t=new Se;return this.each((function(e,o,i){t.set(i,o,e)})),t},Se.prototype.unit=function(t){this.width=this.height=t;for(var e=this.data=new Array(t),o=t;--o>=0;)for(var i=e[o]=new Array(t),r=t;--r>=0;)i[r]=o===r?1:0;return this},Se.prototype.multiply=function(t){for(var e=this,o=new Se,i=0;i<e.height;++i)for(var r=0;r<t.width;++r){for(var n=0,s=0;s<e.width;++s){var a=e.get(i,s),p=t.get(s,r);"number"==typeof a&&"number"==typeof p&&(n+=a*p)}o.set(i,r,n)}return o},Se.prototype.inverse=function(){for(var t=this.width,e=this.augment((new Se).unit(t)),o=e.data,i=function(e){var i=function(t,e,o){for(var i=o(t),r=t,n=t+1;n<e;n++){var s=o(t);s>i&&(i=s,r=t)}return r}(e,t,(function(t){return o[t][e]}));if(!o[i][e])return{v:null};if(e!==i){var r=o[e];o[e]=o[i],o[i]=r}for(var n=e+1;n<t;++n){for(var s=e+1;s<2*t;++s)o[n][s]-=o[e][s]*o[n][e]/o[e][e];o[n][e]=0}},r=0;r<t;++r){var n=i(r);if(n)return n.v}for(var s=0;s<t;++s)for(var a=o[s][s],p=0;p<2*t;++p)o[s][p]/=a;for(var l=t;--l>=0;)for(var h=l;--h>=0;)if(o[h][l])for(var c=2*t;--c>=t;)o[h][c]-=o[l][c]*o[h][l];return e.slice(0,t,t,t)},Se.prototype.augment=function(t){var e=this.clone(),o=e.width;return t.each((function(t,i,r){e.set(i,r+o,t)})),e},Se.prototype.slice=function(t,e,o,i){for(var r=new Se,n=0;n<o;++n)for(var s=0;s<i;++s)r.set(n,s,this.get(t+n,e+s));return r};var Ce={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"};function Te(t){return Ce[t]||t}var Pe=function(t){return t.replace(/([^ ]+)/g,Te)};function Oe(){var t,e,o="";for(t=0;t<32;t++)e=16*Math.random()|0,8!==t&&12!==t&&16!==t&&20!==t||(o+="-"),o+=(12===t?4:16===t?3&e|8:e).toString(16);return o}var Me=new WeakMap,Ee=Symbol("id");function Le(t,e,o,i,r){!function(t,e,o,i,r){var n=K(e)?e:(e||"").split(" ");n.forEach((function(e){!function(t,e,o,i,r){var n,s=i;o&&lt(o)&&!i?s=o:o&&function(t){return"string"==typeof t}(o)&&lt(s)&&(n=o);var a=function(e){var o=e.target?e.target.closest(n):null;if(!n||n&&e.target&&o){var i=n?o:e.currentTarget;Object.defineProperty(e,"currentTarget",{value:i}),Object.defineProperty(e,"delegateTarget",{value:t}),s(e)}};s[Ee]=Oe();var p=Me.get(t);p||(p=new Map,Me.set(t,p));p.set(s[Ee],a),t.addEventListener(e,a,Boolean(r))}(t,e,o,i,r)}))}(t,e,o,i,r)}function Ie(t,e,o,i,r){!function(t,e,o,i){var r=K(e)?e:(e||"").split(" ");r.forEach((function(e){!function(t,e,o,i){var r=Me.get(t);if(r&&o&&o[Ee]){var n=o[Ee],s=r.get(n);r.delete(n),s&&t.removeEventListener(e,s,Boolean(i))}}(t,e,o,i)}))}(t,e,o,i)}function Re(){var t=function(t){var e=!1,o={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.?(\d+(\.\d+)?)?/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i},i={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i};for(var r in o){if(t.match(o[r])){if("windows"===r&&"plugins"in navigator)return!1;(e={}).device=r,e.name=Be(r,i),e[e.name]=!0;break}}return e}(navigator.userAgent),e={};return e.mobileOS=t,e}function Be(t,e,o){for(var i in e)if(e[i].test(t))return i;return void 0!==o?o:t}function Ve(){}function je(){return(new Date).getTime()}var De="string",ze="function",Fe=function(){this._defaultPrevented=!0},He=function(){return!0===this._defaultPrevented},Ne=function(t){function e(){t.call(this),this._events={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.unbind()},e.prototype.bind=function(t,e,o){var i,r,n,s,a=this,p=typeof t===De?[t]:t||[],l=typeof e===ze;if(void 0===e){for(i in t)a.bind(i,t[i]);return a}var h=function(){var t=p[i];(s=l?e:e[t])&&(o&&(n=s,s=function(){a.unbind(t,s),n.apply(a,arguments)},s.original=n),(a._events[t]=a._events[t]||[]).push(s))};for(i=0,r=p.length;i<r;i++)h();return a},e.prototype.one=function(t,e){return this.bind(t,e,!0)},e.prototype.first=function(t,e){var o,i,r,n=this,s=typeof t===De?[t]:t,a=typeof e===ze;for(o=0,i=s.length;o<i;o++){var p=s[o];(r=a?e:e[p])&&(n._events[p]=n._events[p]||[]).unshift(r)}return n},e.prototype.trigger=function(t,e){var o,i,r=this,n=r._events[t];if(n){var s=e||{};for(s.sender=r,s._defaultPrevented=!1,s.preventDefault=Fe,s.isDefaultPrevented=He,o=0,i=(n=n.slice()).length;o<i;o++)n[o].call(r,s);return!0===s._defaultPrevented}return!1},e.prototype.unbind=function(t,e){var o,i=this,r=i._events[t];if(void 0===t)i._events={};else if(r)if(e)for(o=r.length-1;o>=0;o--)r[o]!==e&&r[o].original!==e||r.splice(o,1);else i._events[t]=[];return i},e.prototype._setEvents=function(t){for(var e=this,o=(this.events||[]).length,i=0;i<o;i++){var r=e.events[i];e.options[r]&&t[r]&&(e.unbind(r,e.options[r]),e._events&&e._events[r]&&delete e._events[r])}this.bind(this.events,t)},e}(e.a),Ue=Object.assign,Ge=function(t){t.preventDefault()},We=800,Xe=0,Ye="press",qe="hold",Ze="select",Qe="start",Ke="move",$e="end",Je="cancel",to="tap",eo="doubleTap",oo="release",io="gesturechange",ro="gestureend",no="gesturetap",so={api:0,touch:0,mouse:9,pointer:9};function ao(t){var e=[],o=t.originalEvent||t,i=t.currentTarget;return t.api?e.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"}):e.push({location:o,event:t,target:t.target,currentTarget:i,id:o.pointerId,type:"pointer"}),e}var po=function(t){function e(e,o){t.call(this);var i=this;i.support=Re(),i.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,i.axis=e,i._updateLocationData(o),i.startLocation=i.location,i.velocity=i.delta=0,i.timeStamp=je()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.move=function(t){var e=this,o=t["page"+e.axis],i=je(),r=i-e.timeStamp||1;!o&&this.invalidZeroEvents||(e.delta=o-e.location,e._updateLocationData(t),e.initialDelta=o-e.startLocation,e.velocity=e.delta/r,e.timeStamp=i)},e.prototype._updateLocationData=function(t){var e=this,o=e.axis;e.location=t["page"+o],e.client=t["client"+o],e.screen=t["screen"+o]},e}(e.a),lo=function(t){function e(e,o,i){t.call(this),Ue(this,{x:new po("X",i.location),y:new po("Y",i.location),type:i.type,threshold:e.threshold||so[i.type],userEvents:e,target:o,currentTarget:i.currentTarget,initialTouch:i.target,id:i.id,pressEvent:i,_clicks:e._clicks,supportDoubleTap:e.supportDoubleTap,_moved:!1,_finished:!1})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.press=function(){var t=this;this._holdTimeout=setTimeout((function(){return t._hold()}),this.userEvents.minHold),this._trigger(Ye,this.pressEvent)},e.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout((function(){1===e.userEvents._clicks?e._trigger(to,t):e._trigger(eo,t),e.userEvents._clicks=0}),300))},e.prototype._hold=function(){this._trigger(qe,this.pressEvent)},e.prototype.move=function(t){var e=this,o="api"!==t.type&&e.userEvents._shouldNotMove;if(!e._finished&&!o){if(e.x.move(t.location),e.y.move(t.location),!e._moved){if(e._withinIgnoreThreshold())return;if(co.current&&co.current!==e.userEvents)return e.dispose();e._start(t)}e._finished||e._trigger(Ke,t)}},e.prototype.end=function(t){this.endTime=je(),this._finished||(this._finished=!0,this._trigger(oo,t),this._moved?this._trigger($e,t):this.supportDoubleTap?this._tap(t):this._trigger(to,t),clearTimeout(this._holdTimeout),this.dispose())},e.prototype.dispose=function(){var t=this.userEvents.touches||[];this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout);var e=t.indexOf(this);t.splice(e,1)},e.prototype.skip=function(){this.dispose()},e.prototype.cancel=function(){this.dispose()},e.prototype.isMoved=function(){return this._moved},e.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=je(),this._moved=!0,this._trigger(Qe,t)},e.prototype._trigger=function(t,e){var o=e.event,i={touch:this,x:this.x,y:this.y,target:this.target,event:o};this.userEvents.notify(t,i)&&o.preventDefault()},e.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},e}(e.a);function ho(t){for(var e=Ce.up.split(" "),o=0,i=e.length;o<i;o++)t(e[o])}var co=function(t){function e(e,o){t.call(this);var i,r=this,n=Re();if(this.support=n,o=o||{},this.options=o,i=r.filter=o.filter,r.threshold=o.threshold||Xe,r.minHold=o.minHold||We,r.touches=[],r._maxTouches=o.multiTouch?2:1,r.allowSelection=o.allowSelection,r.captureUpIfMoved=o.captureUpIfMoved,r._clicks=0,r.supportDoubleTap=o.supportDoubleTap,Ue(r,{element:e,surface:o.surface||e,stopPropagation:o.stopPropagation,pressed:!1}),this._surfaceMoveHandler=this._move.bind(this),Le(r.surface,Pe("move"),this._surfaceMoveHandler),this._surfaceEndHandler=this._end.bind(this),Le(r.surface,Pe("up cancel"),this._surfaceEndHandler),this._elementStartHandler=this._start.bind(this),Le(e,Pe("down"),i,this._elementStartHandler),e.style["touch-action"]=o.touchAction||"none",o.preventDragEvent&&(this._elementDragStartHandler=Ge,Le(e,Pe("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=this._select.bind(this),Le(e,Pe("mousedown"),i,this._elementSelectHandler),r.captureUpIfMoved){var s=r.surface,a=r.preventIfMoving.bind(r);ho((function(t){s.addEventListener(t,a,!0)}))}r.bind([Ye,qe,to,eo,Qe,Ke,$e,oo,Je,"gesturestart",io,ro,no,Ze],o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},e.prototype.destroy=function(){var t=this,e=this.options,o=this.element;if(!t._destroyed){if(t._destroyed=!0,t.captureUpIfMoved){var i=t.surface;ho((function(e){i.removeEventListener(e,t.preventIfMoving)}))}Ie(t.surface,Pe("move"),this._surfaceMoveHandler),Ie(t.surface,Pe("up cancel"),this._surfaceEndHandler),Ie(o,Pe("down"),this._elementStartHandler),e.preventDragEvent&&Ie(o,Pe("dragstart"),this._elementDragStartHandler),Ie(o,Pe("mousedown"),this._elementSelectHandler),t._disposeAll(),t.unbind(),delete t.surface,delete t.element,delete t.currentTarget}},e.prototype.capture=function(){e.current=this},e.prototype.cancel=function(){this._disposeAll(),this.trigger(Je)},e.prototype.notify=function(t,e){var o,i,r,n,s,a,p,l,h=this.touches,c=t;if(this._isMultiTouch()){switch(c){case Ke:c=io;break;case $e:c=ro;break;case to:c=no}Ue(e,{touches:h},(o=h[0],i=h[1],r=o.x.location,n=o.y.location,s=i.x.location,a=i.y.location,p=r-s,l=n-a,{center:{x:(r+s)/2,y:(n+a)/2},distance:Math.sqrt(p*p+l*l)}))}return this.trigger(c,Ue(e,{type:c}))},e.prototype.press=function(t,e,o){this._apiCall("_start",t,e,o)},e.prototype.move=function(t,e){this._apiCall("_move",t,e)},e.prototype.end=function(t,e){this._apiCall("_end",t,e)},e.prototype._isMultiTouch=function(){return this.touches.length>1},e.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},e.prototype._disposeAll=function(){for(var t=this.touches;t.length>0;)t.pop().dispose()},e.prototype._isMoved=function(){return Ct(this.touches,(function(t){return t.isMoved()})).length},e.prototype._select=function(t){this.allowSelection&&!this.trigger(Ze,{event:t})||t.preventDefault()},e.prototype._start=function(t){var o=this;if(!(t.which&&t.which>1||this._maxTouchesReached())){var i;e.current=null,this.currentTarget=t.currentTarget,this.stopPropagation&&t.stopPropagation();for(var r=ao(t),n=0;n<r.length&&!o._maxTouchesReached();n++){var s=r[n];if(!(i=o.filter?s.currentTarget:o.element)||0!==i.length){var a=new lo(o,i,s);o.touches.push(a),a.press(),o._isMultiTouch()&&o.notify("gesturestart",{})}}}},e.prototype._move=function(t){this._eachTouch("move",t)},e.prototype._end=function(t){this._eachTouch("end",t)},e.prototype._eachTouch=function(t,e){var o,i,r,n,s={},a=ao(e),p=this.touches;for(o=0;o<p.length;o++)s[(i=p[o]).id]=i;for(o=0;o<a.length;o++){if(n=s[(r=a[o]).id])"move"===t&&"pointer"===r.type&&!this.surface.hasPointerCapture(r.id)&&this.surface.setPointerCapture(r.id),n[t](r)}},e.prototype._apiCall=function(t,e,o,i){this[t]({api:!0,pageX:e,pageY:o,clientX:e,clientY:o,target:i||this.element,stopPropagation:Ve,preventDefault:Ve})},e.defaultThreshold=function(t){Xe=t},e.minHold=function(t){We=t},e}(Ne);function uo(t,e){var o=Kt(e-t,9);if(0===o){if(0===e)return.1;o=Math.abs(e)}var i=Math.pow(10,Math.floor(Math.log(o)/Math.log(10))),r=Kt(o/i,y);return Kt(i*(r<1.904762?.2:r<4.761904?.5:r<9.523809?1:2),y)}var fo=function(t){function e(e,o){t.call(this),this.x=e||0,this.y=o||0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},e.prototype.rotate=function(t,e){var o=Qt(e),i=Math.cos(o),r=Math.sin(o),n=t.x,s=t.y,a=this.x,p=this.y;return this.x=Kt(n+(a-n)*i+(p-s)*r,3),this.y=Kt(s+(p-s)*i-(a-n)*r,3),this},e.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},e.prototype.distanceTo=function(t){var e=this.x-t.x,o=this.y-t.y;return Math.sqrt(e*e+o*o)},e.onCircle=function(t,o,i){var r=Qt(o);return new e(t.x-i*Math.cos(r),t.y-i*Math.sin(r))},e}(e.a),go=function(t){function o(e,o,i,r){t.call(this),this.x1=e||0,this.y1=o||0,this.x2=i||0,this.y2=r||0}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},o.prototype.width=function(){return this.x2-this.x1},o.prototype.height=function(){return this.y2-this.y1},o.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},o.prototype.move=function(t,e){var o=this.height(),i=this.width();return Ft(t)&&(this.x1=t,this.x2=this.x1+i),Ft(e)&&(this.y1=e,this.y2=this.y1+o),this},o.prototype.wrap=function(t){return this.x1=Math.min(this.x1,t.x1),this.y1=Math.min(this.y1,t.y1),this.x2=Math.max(this.x2,t.x2),this.y2=Math.max(this.y2,t.y2),this},o.prototype.wrapPoint=function(t){var e=K(t),i=e?t[0]:t.x,r=e?t[1]:t.y;return this.wrap(new o(i,r,i,r)),this},o.prototype.snapTo=function(t,e){return e!==W&&e||(this.x1=t.x1,this.x2=t.x2),e!==X&&e||(this.y1=t.y1,this.y2=t.y2),this},o.prototype.alignTo=function(t,e){var o=this.height(),i=this.width(),r=e===D||e===h?X:W,n=r===X?o:i;if(e===c){var s=t.center(),a=this.center();this.x1+=s.x-a.x,this.y1+=s.y-a.y}else this[r+1]=e===D||e===S?t[r+1]-n:t[r+2];return this.x2=this.x1+i,this.y2=this.y1+o,this},o.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},o.prototype.expand=function(t,e){return this.shrink(-t,-e),this},o.prototype.pad=function(t){var e=mt(t);return this.x1-=e.left,this.x2+=e.right,this.y1-=e.top,this.y2+=e.bottom,this},o.prototype.unpad=function(t){var e=mt(t);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,this.pad(e)},o.prototype.clone=function(){return new o(this.x1,this.y1,this.x2,this.y2)},o.prototype.center=function(){return new fo(this.x1+this.width()/2,this.y1+this.height()/2)},o.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},o.prototype.points=function(){return[new fo(this.x1,this.y1),new fo(this.x2,this.y1),new fo(this.x2,this.y2),new fo(this.x1,this.y2)]},o.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},o.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},o.prototype.rotate=function(t){var e=this.width(),o=this.height(),i=this.center(),r=i.x,n=i.y,s=yo(0,0,r,n,t),a=yo(e,0,r,n,t),p=yo(e,o,r,n,t),l=yo(0,o,r,n,t);return e=Math.max(s.x,a.x,p.x,l.x)-Math.min(s.x,a.x,p.x,l.x),o=Math.max(s.y,a.y,p.y,l.y)-Math.min(s.y,a.y,p.y,l.y),this.x2=this.x1+e,this.y2=this.y1+o,this},o.prototype.toRect=function(){return new e.R([this.x1,this.y1],[this.width(),this.height()])},o.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},o.prototype.align=function(t,e,o){var i=e+1,r=e+2,n=e===W?G:w,s=this[n]();Ot(o,[S,D])?(this[i]=t[i],this[r]=this[i]+s):Ot(o,[R,h])?(this[r]=t[r],this[i]=this[r]-s):o===c&&(this[i]=t[i]+(t[n]()-s)/2,this[r]=this[i]+s)},o}(e.a);function yo(t,e,o,i,r){var n=Qt(r);return new fo(o+(t-o)*Math.cos(n)+(e-i)*Math.sin(n),i-(t-o)*Math.sin(n)+(e-i)*Math.cos(n))}var vo=function(t){function e(e,o,i,r,n){t.call(this),this.center=e,this.innerRadius=o,this.radius=i,this.startAngle=r,this.angle=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},e.prototype.middle=function(){return this.startAngle+this.angle/2},e.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},e.prototype.point=function(t,e){var o=Qt(t),i=Math.cos(o),r=Math.sin(o),n=e?this.innerRadius:this.radius,s=Kt(this.center.x-i*n,3),a=Kt(this.center.y-r*n,3);return new fo(s,a)},e.prototype.adjacentBox=function(t,e,o){var i=this.clone().expand(t),r=i.middle(),n=i.point(r),s=e/2,a=o/2,p=Math.sin(Qt(r)),l=Math.cos(Qt(r)),h=n.x-s,c=n.y-a;return Math.abs(p)<.9&&(h+=s*-l/Math.abs(l)),Math.abs(l)<.9&&(c+=a*-p/Math.abs(p)),new go(h,c,h+e,c+o)},e.prototype.containsPoint=function(t){var e=this.center,o=this.innerRadius,i=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,a=t.y-e.y,p=new fo(s,a),l=this.point(r),h=new fo(l.x-e.x,l.y-e.y),c=this.point(n),u=new fo(c.x-e.x,c.y-e.y),d=Kt(s*s+a*a,3);return(h.equals(p)||ot(h,p))&&!ot(u,p)&&d>=o*o&&d<=i*i},e.prototype.getBBox=function(){var t,e=new go(C,C,T,T),o=Kt(this.startAngle%360),i=Kt((o+this.angle)%360),r=this.innerRadius,n=[0,90,180,270,o,i].sort(mo),s=n.indexOf(o),a=n.indexOf(i);t=o===i?n:s<a?n.slice(s,a+1):[].concat(n.slice(0,a+1),n.slice(s,n.length));for(var p=0;p<t.length;p++){var l=this.point(t[p]);e.wrapPoint(l),e.wrapPoint(l,r)}return r||e.wrapPoint(this.center),e},e.prototype.expand=function(t){return this.radius+=t,this},e}(e.a);function mo(t,e){return t-e}var xo=function(t){function e(e,o,i,r){t.call(this,e,0,o,i,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.expand=function(e){return t.prototype.expand.call(this,e)},e.prototype.clone=function(){return new e(this.center,this.radius,this.startAngle,this.angle)},e.prototype.setRadius=function(t){return this.radius=t,this},e}(vo),_o=function(t){function o(){t.apply(this,arguments)}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.createRing=function(t,o){var i=t.startAngle+180,r=t.angle+i;(0===t.angle||t.angle>0&&i===r)&&(r+=.001);var n=new e.P(t.center.x,t.center.y),s=Math.max(t.radius,0),a=Math.max(t.innerRadius,0),p=new e.A(n,{startAngle:i,endAngle:r,radiusX:s,radiusY:s}),l=e.b.fromArc(p,o).close();if(a){p.radiusX=p.radiusY=a;var h=p.pointAt(r);l.lineTo(h.x,h.y),l.arc(r,i,a,a,!0)}else l.lineTo(n.x,n.y);return l},o}(e.a);_o.current=new _o;var bo=function(t){function o(e){t.call(this),this.children=[],this.options=ut({},this.options,this.initUserOptions(e))}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.initUserOptions=function(t){return t},o.prototype.reflow=function(t){for(var e,o=this.children,i=0;i<o.length;i++){var r=o[i];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},o.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},o.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},o.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},o.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},o.prototype.translateChildren=function(t,e){for(var o=this.children,i=o.length,r=0;r<i;r++)o[r].box.translate(t,e)},o.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var o=t[e];this.children.push(o),o.parent=this}},o.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},o.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this,this.parent&&this.parent.appendVisual(this.visual))},o.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},o.prototype.createVisual=function(){this.visual=new e.G({zIndex:this.options.zIndex,visible:Jt(this.options.visible,!0)})},o.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=e.c.create(this.visual,this.options.animation))},o.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):Ft(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},o.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},o.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},o.prototype.stackVisual=function(t){var e,o=t.options.zIndex||0,i=this.visual.children,r=i.length;for(e=0;e<r;e++){var n=i[e];if(Jt(n.options.zIndex,0)>o)break}this.visual.insert(e,t)},o.prototype.traverse=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++){var r=e[i];t(r),r.traverse&&r.traverse(t)}},o.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},o.prototype.renderComplete=function(){},o.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible||!1===this.visible)},o.prototype.toggleHighlight=function(t,e){var o=this,i=(this.options||{}).highlight||{},r=i.visual,n=this._highlight;if(!n){var s={fill:{color:U,opacity:e||.2},stroke:{color:U,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return o.createHighlight(s)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total}))))return}else n=this._highlight=this.createHighlight(s);Ft(n.options.zIndex)||(n.options.zIndex=Jt(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},o.prototype.toggleFocusHighlight=function(t){var e=(this.options||{}).focusHighlight||{},o=this._focusHighlight;if(t||o){if(!o){var i=ge(this.getRoot().options.background),r={fill:{opacity:e.opacity,color:e.color},stroke:Object.assign({},{color:i},e.border),zIndex:e.zIndex};o=this._focusHighlight=this.createFocusHighlight(r),this.appendVisual(o)}o.visible(t)}},o.prototype.createGradientOverlay=function(t,o,i){var r=new e.b(Object.assign({stroke:{color:"none"},fill:this.createGradient(i),closed:t.options.closed},o));return r.segments.elements(t.segments.elements()),r},o.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},o.prototype.supportsPointInactiveOpacity=function(){return!0},o}(e.a);bo.prototype.options={};var wo={dots:e.e,verticalStripes:e.v,crosshatch:e.f,diagonalStripes:e.g,grid:e.h};function ko(t,e,o){var i=function(t,e){return lt(t)?t(e):t}(t,o),r=i&&wo[i.type];return r?r(Object.assign({},e,i)):e}var Ao=function(t){function o(e){t.call(this,e),this.options.margin=mt(this.options.margin),this.options.padding=mt(this.options.padding)}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.reflow=function(e){var o,i=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,p=n&&s,l=r.margin,h=r.padding,c=r.border.width,u=function(){i.align(e,W,r.align),i.align(e,X,r.vAlign),i.paddingBox=o.clone().unpad(l).unpad(c)},d=e.clone();p&&(d.x2=d.x1+n,d.y2=d.y1+s),a&&d.unpad(l).unpad(c).unpad(h),t.prototype.reflow.call(this,d),o=p?this.box=new go(0,0,n,s):this.box,a&&p?(u(),d=this.contentBox=this.paddingBox.clone().unpad(h)):(d=this.contentBox=o.clone(),o.pad(h).pad(c).pad(l),u()),this.translateChildren(o.x1-d.x1+l.left+c+h.left,o.y1-d.y1+l.top+c+h.top);for(var f=this.children,g=0;g<f.length;g++){var y=f[g];y.reflow(y.box)}},o.prototype.align=function(t,e,o){this.box.align(t,e,o)},o.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},o.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(e.b.fromRect(this.paddingBox.toRect(),this.visualStyle()))},o.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:Jt(e.opacity,t.opacity),dashType:e.dashType},fill:ko(t.pattern,{color:t.background,opacity:t.opacity},void 0),cursor:t.cursor}},o}(bo);function So(t,e){e&&(t.options.className=e.className,t.options.role=e.role,t.options.ariaLabel=e.ariaLabel,t.options.ariaRoleDescription=e.ariaRoleDescription,t.options.ariaChecked=e.ariaChecked)}ee(Ao,{align:S,vAlign:D,margin:{},padding:{},border:{color:l,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var Co=function(t){function o(e,o){t.call(this,e),this.pointData=o}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.getElement=function(){var t=this.options,o=this.paddingBox,i=t.type,r=t.rotation,n=o.center(),s=o.width()/2,a=o.height()/2;if(!t.visible||!this.hasBox())return null;var p,l=this.visualStyle();if(i===u)p=new e.i(new e.j([Kt(o.x1+s,3),Kt(o.y1+a,3)],Math.min(s,a)),l);else if(i===z)p=e.b.fromPoints([[o.x1+s,o.y1],[o.x1,o.y2],[o.x2,o.y2]],l).close();else if(i===d)(p=new e.k(l)).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),p.moveTo(o.x1,o.y2).lineTo(o.x2,o.y1);else{var h=o.toRect();if(i===B){var c=Jt(t.borderRadius,h.width()/5);h.setCornerRadius(c)}p=e.b.fromRect(h,l)}return r&&p.transform(e.t().rotate(-r,[n.x,n.y])),p.options.zIndex=t.zIndex,p},o.prototype.createElement=function(){var t=this,e=this.options.visual,o=this.pointData||{};return e?e({value:o.value,dataItem:o.dataItem,sender:this.getSender(),series:o.series,category:o.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},o.prototype.visualOptions=function(){var t=this.options;return{background:t.background,border:t.border,margin:t.margin,padding:t.padding,type:t.type,size:t.width,visible:t.visible}},o.prototype.createVisual=function(){this.visual=this.createElement(),So(this.visual,this.options.accessibilityOptions)},o}(Ao);ee(Co,{type:u,align:c,vAlign:c});var To="radial",Po={glass:{type:"linear",rotation:0,stops:[{offset:0,color:U,opacity:0},{offset:.25,color:U,opacity:.3},{offset:1,color:U,opacity:0}]},sharpBevel:{type:To,stops:[{offset:0,color:U,opacity:.55},{offset:.65,color:U,opacity:0},{offset:.95,color:U,opacity:.25}]},roundedBevel:{type:To,stops:[{offset:.33,color:U,opacity:.06},{offset:.83,color:U,opacity:.2},{offset:.95,color:U,opacity:0}]},roundedGlass:{type:To,supportVML:!1,stops:[{offset:0,color:U,opacity:0},{offset:.5,color:U,opacity:.3},{offset:.99,color:U,opacity:0}]},sharpGlass:{type:To,supportVML:!1,stops:[{offset:0,color:U,opacity:.2},{offset:.15,color:U,opacity:.15},{offset:.17,color:U,opacity:.35},{offset:.85,color:U,opacity:.05},{offset:.87,color:U,opacity:.15},{offset:.99,color:U,opacity:0}]},bubbleShadow:{type:To,center:[.5,.5],radius:.5}};function Oo(t,e){if(t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2)return e;var o=Math.min(t.x1,e.x1),i=Math.max(t.x1,e.x1),r=Math.min(t.x2,e.x2),n=Math.max(t.x2,e.x2),s=Math.min(t.y1,e.y1),a=Math.max(t.y1,e.y1),p=Math.min(t.y2,e.y2),l=Math.max(t.y2,e.y2),h=[];return h[0]=new go(i,s,r,a),h[1]=new go(o,a,i,p),h[2]=new go(r,a,n,p),h[3]=new go(i,p,r,l),t.x1===o&&t.y1===s||e.x1===o&&e.y1===s?(h[4]=new go(o,s,i,a),h[5]=new go(r,p,n,l)):(h[4]=new go(r,s,n,a),h[5]=new go(o,p,i,l)),Ct(h,(function(t){return t.height()>0&&t.width()>0}))[0]}var Mo=function(t){function o(e){t.call(this,e);var o=this.options;o.width=parseInt(o.width,10),o.height=parseInt(o.height,10),this.gradients={}}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.reflow=function(){var t=this.options,e=this.children,o=new go(0,0,t.width,t.height);this.box=o.unpad(t.margin);for(var i=0;i<e.length;i++)e[i].reflow(o),o=Oo(o,e[i].box)||new go},o.prototype.createVisual=function(){this.visual=new e.G,this.createBackground()},o.prototype.createBackground=function(){var t=this.options,o=t.border||{},i=this.box.clone().pad(t.margin).unpad(o.width),r=e.b.fromRect(i.toRect(),{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(r)},o.prototype.getRoot=function(){return this},o.prototype.createGradient=function(t){var o,i=this.gradients,r=Zt(t),n=Po[t.gradient];if(i[r])o=i[r];else{var s=Object.assign({},n,t);"linear"===n.type?o=new e.L(s):(t.innerRadius&&(s.stops=function(t){for(var e=t.stops,o=t.innerRadius/t.radius*100,i=e.length,r=[],n=0;n<i;n++){var s=Object.assign({},e[n]);s.offset=(s.offset*(100-o)+o)/100,r.push(s)}return r}(s)),(o=new e.m(s)).supportVML=!1!==n.supportVML),i[r]=o}return o},o.prototype.cleanGradients=function(){var t=this.gradients;for(var e in t)t[e]._observers=[]},o.prototype.size=function(){var t=this.options;return new go(0,0,t.width,t.height)},o}(bo);ee(Mo,{width:v,height:400,background:U,border:{color:l,width:0},margin:mt(5),zIndex:-2});var Eo=function(t){function e(e){t.call(this,e),this._initDirection()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=W,this.elementAxis=X,this.groupSizeField=G,this.elementSizeField=w,this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=X,this.elementAxis=W,this.groupSizeField=w,this.elementSizeField=G,this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},e.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},e.prototype.reflowChildren=function(){var t=this,e=this,o=e.box,i=e.elementAxis,r=e.groupAxis,n=e.elementSizeField,s=e.groupSizeField,a=this.groupOptions(),p=a.groups,l=a.groupsSize,h=a.maxGroupElementsSize,c=p.length,u=o[r+1]+this.alignStart(l,o[s]());if(c){for(var d=u,f=0;f<c;f++){for(var g=p[f],y=g.groupElements,v=o[i+1],m=y.length,x=0;x<m;x++){var _=y[x],b=t.elementSize(_),w=d+t.alignStart(b[s],g.groupSize),k=new go;k[r+1]=w,k[r+2]=w+b[s],k[i+1]=v,k[i+2]=v+b[n],_.reflow(k),v+=b[n]+t.elementSpacing}d+=g.groupSize+t.groupSpacing}o[r+1]=u,o[r+2]=u+l,o[i+2]=o[i+1]+h}},e.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===R||i===h?o=e-t:i===c&&(o=(e-t)/2),o},e.prototype.groupOptions=function(){for(var t=this,e=t.box,o=t.children,i=t.elementSizeField,r=t.groupSizeField,n=t.elementSpacing,s=t.groupSpacing,a=Kt(e[i]()),p=o.length,l=[],h=0,c=0,u=0,d=0,f=[],g=0;g<p;g++){var y=o[g];y.box||y.reflow(e);var v=this.elementSize(y);this.options.wrap&&Kt(c+n+v[i])>a&&(l.push({groupElements:f,groupSize:h,groupElementsSize:c}),d=Math.max(d,c),u+=s+h,h=0,c=0,f=[]),h=Math.max(h,v[r]),c>0&&(c+=n),c+=v[i],f.push(y)}return l.push({groupElements:f,groupSize:h,groupElementsSize:c}),{groups:l,groupsSize:u+=h,maxGroupElementsSize:d=Math.max(d,c)}},e.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},e.prototype.createVisual=function(){},e}(bo);ee(Eo,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var Lo=e.T,Io=function(t){function o(e,o){t.call(this,o),this.content=e,this.reflow(new go)}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.reflow=function(t){var o=this.options,i=o.size=e.n(this.content,{font:o.font});this.baseline=i.baseline,this.box=new go(t.x1,t.y1,t.x1+i.width,t.y1+i.height)},o.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,i=t.opacity,r=t.cursor,n=t.stroke,s=t.paintOrder;this.visual=new Lo(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:r,stroke:n,paintOrder:s})},o}(bo);function Ro(t){var e=t.origin,o=t.bottomRight();return new go(e.x,e.y,o.x,o.y)}ee(Io,{font:g,color:l});var Bo=/\n/m,Vo=function(t){function o(e,o,i){t.call(this,o),this.content=e,this.data=i,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new go)}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Bo),o=new Eo({vertical:!0,align:t.align,wrap:!1}),i=ut({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var r=0;r<e.length;r++){var n=new Io(e[r].trim(),i);o.append(n)}},o.prototype.reflow=function(o){var i=this.options,r=i.visual;if(this.container.options.align=i.align,r&&!this._boxReflow){var n=o;n.hasSize()||(this._boxReflow=!0,this.reflow(n),this._boxReflow=!1,n=this.box);var s=this.visual=r(this.visualContext(n));s&&(n=Ro(s.clippedBBox()||new e.R),s.options.zIndex=i.zIndex),this.box=this.contentBox=this.paddingBox=n}else if(t.prototype.reflow.call(this,o),i.rotation){var a=mt(i.margin),p=this.box.unpad(a);this.targetBox=o,this.normalBox=p.clone(),(p=this.rotate()).translate(a.left-a.right,a.top-a.bottom),this.rotatedBox=p.clone(),p.pad(a)}},o.prototype.createVisual=function(){var t=this.options;if(this.visual=new e.G({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()){var o=e.b.fromRect(this.paddingBox.toRect(),this.visualStyle());this.visual.append(o)}},o.prototype.renderVisual=function(){if(this.options.visible)if(this.options.visual){var e=this.visual;e&&!Ft(e.options.noclip)&&(e.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()}else t.prototype.renderVisual.call(this)},o.prototype.visualContext=function(t){var e=this,o={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(o,this.data),o},o.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},o.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,W,t.align),this.align(this.targetBox,X,t.vAlign),this.box},o.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var o=this.normalBox.center(),i=o.x,r=o.y,n=this.rotatedBox.center();return e.t().translate(n.x-i,n.y-r).rotate(t,[i,r])},o}(Ao),jo=function(t){function e(e){t.call(this,e),this._textBox=new Vo(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})),this.append(this._textBox)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(e){t.prototype.reflow.call(this,e),this.box.snapTo(e,W)},e.buildTitle=function(t,o){var i,r=t;return"string"==typeof t&&(r={text:t}),(r=Object.assign({visible:!0},o,r))&&r.visible&&r.text&&(i=new e(r)),i},e.orderTitles=function(t){var e=[].concat(t),o=e.filter((function(t){return t&&t.options.position!==h})),i=e.filter((function(t){return t&&t.options.position===h}));return Do(o),Do(i),i.reverse(),o.concat(i)},e}(bo);function Do(t){for(var e=1;e<t.length;e++){var o=t[e]._textBox,i=t[e-1]._textBox;i.options.margin=Object.assign(mt(i.options.margin),{bottom:0}),o.options.margin=Object.assign(mt(o.options.margin),{top:0})}}ee(jo,{color:l,position:D,align:c,margin:mt(5),padding:mt(5)});var zo=function(t){function o(e,o,i,r,n){t.call(this,o,n),this.text=o,this.value=e,this.index=i,this.dataItem=r,this.reflow(new go)}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.visualContext=function(e){var o=t.prototype.visualContext.call(this,e);return o.value=this.value,o.dataItem=this.dataItem,o.format=this.options.format,o.culture=this.options.culture,o},o.prototype.click=function(t,e){t.trigger(p,{element:Wt(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},o.prototype.rotate=function(){if(this.options.alignRotation!==c){var e=this.normalBox.toRect(),o=this.rotationTransform();this.box=Ro(e.bbox(o.matrix()))}else t.prototype.rotate.call(this);return this.box},o.prototype.rotationTransform=function(){var o=this.options,i=o.rotation;if(!i)return null;if(o.alignRotation===c)return t.prototype.rotationTransform.call(this);var r=e.t().rotate(i).matrix(),n=this.normalBox.toRect(),s=this.targetBox.toRect(),a=o.rotationOrigin||D,p=a===D||a===h?W:X,l=a===D||a===h?X:W,u=a===D||a===S?s.origin:s.bottomRight(),d=n.topLeft().transformCopy(r),f=n.topRight().transformCopy(r),g=n.bottomRight().transformCopy(r),v=n.bottomLeft().transformCopy(r),m=e.R.fromPoints(d,f,g,v),x={};x[l]=s.origin[l]-m.origin[l];var _,b,w=Math.abs(d[l]+x[l]-u[l]),k=Math.abs(f[l]+x[l]-u[l]);Kt(w,y)===Kt(k,y)?(_=d,b=f):k<w?(_=f,b=g):(_=d,b=v);var A=_[p]+(b[p]-_[p])/2;return x[p]=s.center()[p]-A,e.t().translate(x.x,x.y).rotate(i)},o}(Vo);ee(zo,{_autoReflow:!1});var Fo=function(t){function o(e,o,i){t.call(this,o),this.fields=e,this.chartService=i,this.render()}return t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o,o.prototype.hide=function(){this.options.visible=!1},o.prototype.show=function(){this.options.visible=!0},o.prototype.render=function(){var t=this,e=this.options;if(e.visible){var o,i,r=e.label,n=e.icon,s=new go,a=function(){return t},p=n.size,l=this.fields.text;if(Ft(r)&&r.visible){var h=bt(r);h?l=h(this.fields):r.format&&(l=this.chartService.format.auto(r.format,l)),r.color||(r.color=r.position===k?"#fff":n.background),this.label=new Vo(l,ut({},r)),this.label.aliasFor=a,r.position!==k||Ft(p)||(n.type===u?p=Math.max(this.label.box.width(),this.label.box.height()):(o=this.label.box.width(),i=this.label.box.height()),s.wrap(this.label.box))}n.width=o||p||7,n.height=i||p||7;var c=new Co(ut({},