UNPKG

@progress/kendo-ui

Version:

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

1 lines 589 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 i="arc",o="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",A="inside",k="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:i,ARIA_ACTIVE_DESCENDANT:a,ARROW_DOWN:r,ARROW_LEFT:n,ARROW_RIGHT:s,ARROW_UP:o,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:k,INSIDE:A,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 i=K(e)?e:[e],o=0;o<i.length;o++){var r=i[o];-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 i=.5;t.options.stroke&&e.d(t.options.stroke.width)&&t.options.stroke.width%2==0&&(i=0);for(var o=0;o<t.segments.length;o++)t.segments[o].anchor().round(0).translate(i,i);return t}function it(t,e){return-t.x*e.y+t.y*e.x<0}function ot(t){return"number"==typeof t&&!isNaN(t)}function rt(t){return typeof t===j}function nt(t){return ot(t)||rt(t)&&isFinite(t)}function st(t,e){return(t+1)%e}function at(t,e){var i=t-1;return i<0?e-1:i}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 i in e)if("__proto__"!==i&&"constructor"!==i){var o=e[i],r=typeof o,n=void 0;if((n=r===ht&&null!==o?o.constructor:null)&&n!==Array)if(o instanceof Date)t[i]=new Date(o.getTime());else if(lt(o.clone))t[i]=o.clone();else{var s=t[i];t[i]=typeof s===ht&&s||{},ct(t[i],o)}else"undefined"!==r&&(t[i]=o)}return t}function ut(t){for(var e=arguments,i=arguments.length,o=1;o<i;o++)ct(t,e[o]);return t}function dt(t){return"object"==typeof t}function ft(t){return ot(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 i=rt(e)?[e]:e;if(K(i)){for(var o={},r=window.getComputedStyle(t),n=0;n<i.length;n++){var s=i[n];o[s]=yt(s)?parseFloat(r[s]):r[s]}return o}if(dt(e))for(var a in e)t.style[a]=ft(e[a])}function mt(t,e){void 0===e&&(e=0);var i={top:0,right:0,bottom:0,left:0};return"number"==typeof t?i[D]=i[R]=i[h]=i[S]=t:(i[D]=t[D]||e,i[R]=t[R]||e,i[h]=t[h]||e,i[S]=t[S]||e),i}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 At=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,kt={};function St(t){if(kt[t])return kt[t];var i=[];return t.replace(At,(function(t,o,r,n){i.push(e.d(o)?o:r||n)})),kt[t]=function(t){for(var e=t,o=0;o<i.length&&e;o++)e=e[i[o]];return e},kt[t]}function Ct(t,e){for(var i=t.length,o=[],r=0;r<i;r++)e(t[r])&&o.push(t[r]);return o}function Tt(t,e){if(t.className)for(var i=e.split(" "),o=0;o<i.length;o++)if(t.className.indexOf&&-1!==t.className.indexOf(i[o]))return!0}kt[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,i,o){return e.r(t+(i-t)*o,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,i){for(var o=t.length,r=[],n=0;n<o;n++){var s=i(t[n]);e.d(s)&&r.push(s)}return r}Lt.prototype.trigger=function(t,e){var i,o=this.observer,r=this.handlerMap;return r[t]?i=this.callObserver(r[t],e):o[Et]&&(i=this.callObserver(Et,t,e)),i},Lt.prototype.callObserver=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+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 i=t.prototype;i.options?i.options=ut({},i.options,e):i.options=e}te.fetchFonts=function(t,e,i){void 0===i&&(i={depth:0});!t||i.depth>5||!document.fonts||Object.keys(t).forEach((function(o){var r=t[o];"dataSource"!==o&&"$"!==o[0]&&r&&("font"===o?e.push(r):"object"==typeof r&&(i.depth++,te.fetchFonts(r,e,i),i.depth--))}))},te.loadFonts=function(t,i){var o=[];if(t.length>0&&document.fonts){try{o=t.map((function(t){return document.fonts.load(t)}))}catch(t){e.l(t)}Promise.all(o).then(i,i)}else i()},te.preloadFonts=function(t,e){var i=[];te.fetchFonts(t,i),te.loadFonts(i,e)};var ie="k-i-",oe="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,i){t.call(this,e,i)}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(ie)})),i=this.options.icon?""+(this.options.icon.startsWith(ie)?"":ie)+this.options.icon:"";this._className=i,$(this.element,"k-icon"),$(this.element,"k-font-icon"),tt(this.element,e),$(this.element,i),$(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,i){e.innerHTML="",t.call(this,e,i)}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,i=this.options.iconClass,o=this.element.className.split(" ").find((function(t){return t.startsWith(oe)}));if(!e&&i){var r=i.match(/k-i-(\w+(?:-\w+)*)/);r&&(e=r[1],i=i.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?""+oe+e.name:"";if(this._className=n,$(this.element,"k-svg-icon"),tt(this.element,o),$(this.element,n),$(this.element,i||""),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 i=t,o=e;return i&&(!dt(i)||i instanceof HTMLElement)&&!rt(i)||(o=i,i=document.createElement("span")),rt(o)&&(o={icon:o}),o.type||(o.type="svg"),ae[o.type]?new ae[o.type](i,o).html():null}function le(t){for(var e=C,i=T,o=0,r=t.length;o<r;o++){var n=t[o];null!==n&&isFinite(n)&&(e=Math.min(e,n),i=Math.max(i,n))}return{min:e===C?void 0:e,max:i===T?void 0:i}}function he(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(e(o,i,t))return o}}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 i=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(ce,[null].concat(i)))}(e)}function fe(t){if(!t)return ce.unit();for(var e=de(t),i=t.parentElement;i;){var o=de(i);e=e.multiplyCopy(o),i=i.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 Ae={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 ke(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 i=this.data[t];return i?i[e]:null},Se.prototype.set=function(t,e,i){var o=this.data[t];null==o&&(o=this.data[t]=[]),o[e]=i,t>=this.height&&(this.height=t+1),e>=this.width&&(this.width=e+1)},Se.prototype.each=function(t,e){for(var i=0;i<this.height;++i)for(var o=0;o<this.width;++o){var r=this.get(i,o);if((e||null!=r)&&void 0!==(r=t(r,i,o)))return r}},Se.prototype.map=function(t,e){var i=new Se;return this.each((function(e,o,r){i.set(o,r,t(e,o,r))}),e),i},Se.prototype.transpose=function(){var t=new Se;return this.each((function(e,i,o){t.set(o,i,e)})),t},Se.prototype.unit=function(t){this.width=this.height=t;for(var e=this.data=new Array(t),i=t;--i>=0;)for(var o=e[i]=new Array(t),r=t;--r>=0;)o[r]=i===r?1:0;return this},Se.prototype.multiply=function(t){for(var e=this,i=new Se,o=0;o<e.height;++o)for(var r=0;r<t.width;++r){for(var n=0,s=0;s<e.width;++s){var a=e.get(o,s),p=t.get(s,r);"number"==typeof a&&"number"==typeof p&&(n+=a*p)}i.set(o,r,n)}return i},Se.prototype.inverse=function(){for(var t=this.width,e=this.augment((new Se).unit(t)),i=e.data,o=function(e){var o=function(t,e,i){for(var o=i(t),r=t,n=t+1;n<e;n++){var s=i(t);s>o&&(o=s,r=t)}return r}(e,t,(function(t){return i[t][e]}));if(!i[o][e])return{v:null};if(e!==o){var r=i[e];i[e]=i[o],i[o]=r}for(var n=e+1;n<t;++n){for(var s=e+1;s<2*t;++s)i[n][s]-=i[e][s]*i[n][e]/i[e][e];i[n][e]=0}},r=0;r<t;++r){var n=o(r);if(n)return n.v}for(var s=0;s<t;++s)for(var a=i[s][s],p=0;p<2*t;++p)i[s][p]/=a;for(var l=t;--l>=0;)for(var h=l;--h>=0;)if(i[h][l])for(var c=2*t;--c>=t;)i[h][c]-=i[l][c]*i[h][l];return e.slice(0,t,t,t)},Se.prototype.augment=function(t){var e=this.clone(),i=e.width;return t.each((function(t,o,r){e.set(o,r+i,t)})),e},Se.prototype.slice=function(t,e,i,o){for(var r=new Se,n=0;n<i;++n)for(var s=0;s<o;++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,i="";for(t=0;t<32;t++)e=16*Math.random()|0,8!==t&&12!==t&&16!==t&&20!==t||(i+="-"),i+=(12===t?4:16===t?3&e|8:e).toString(16);return i}var Me=new WeakMap,Ee=Symbol("id");function Le(t,e,i,o,r){!function(t,e,i,o,r){var n=K(e)?e:(e||"").split(" ");n.forEach((function(e){!function(t,e,i,o,r){var n,s=o;i&&lt(i)&&!o?s=i:i&&function(t){return"string"==typeof t}(i)&&lt(s)&&(n=i);var a=function(e){var i=e.target?e.target.closest(n):null;if(!n||n&&e.target&&i){var o=n?i:e.currentTarget;Object.defineProperty(e,"currentTarget",{value:o}),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,i,o,r)}))}(t,e,i,o,r)}function Ie(t,e,i,o,r){!function(t,e,i,o){var r=K(e)?e:(e||"").split(" ");r.forEach((function(e){!function(t,e,i,o){var r=Me.get(t);if(r&&i&&i[Ee]){var n=i[Ee],s=r.get(n);r.delete(n),s&&t.removeEventListener(e,s,Boolean(o))}}(t,e,i,o)}))}(t,e,i,o)}function Re(){var t=function(t){var e=!1,i={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},o={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i};for(var r in i){if(t.match(i[r])){if("windows"===r&&"plugins"in navigator)return!1;(e={}).device=r,e.name=Be(r,o),e[e.name]=!0;break}}return e}(navigator.userAgent),e={};return e.mobileOS=t,e}function Be(t,e,i){for(var o in e)if(e[o].test(t))return o;return void 0!==i?i: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,i){var o,r,n,s,a=this,p=typeof t===De?[t]:t||[],l=typeof e===ze;if(void 0===e){for(o in t)a.bind(o,t[o]);return a}var h=function(){var t=p[o];(s=l?e:e[t])&&(i&&(n=s,s=function(){a.unbind(t,s),n.apply(a,arguments)},s.original=n),(a._events[t]=a._events[t]||[]).push(s))};for(o=0,r=p.length;o<r;o++)h();return a},e.prototype.one=function(t,e){return this.bind(t,e,!0)},e.prototype.first=function(t,e){var i,o,r,n=this,s=typeof t===De?[t]:t,a=typeof e===ze;for(i=0,o=s.length;i<o;i++){var p=s[i];(r=a?e:e[p])&&(n._events[p]=n._events[p]||[]).unshift(r)}return n},e.prototype.trigger=function(t,e){var i,o,r=this,n=r._events[t];if(n){var s=e||{};for(s.sender=r,s._defaultPrevented=!1,s.preventDefault=Fe,s.isDefaultPrevented=He,i=0,o=(n=n.slice()).length;i<o;i++)n[i].call(r,s);return!0===s._defaultPrevented}return!1},e.prototype.unbind=function(t,e){var i,o=this,r=o._events[t];if(void 0===t)o._events={};else if(r)if(e)for(i=r.length-1;i>=0;i--)r[i]!==e&&r[i].original!==e||r.splice(i,1);else o._events[t]=[];return o},e.prototype._setEvents=function(t){for(var e=this,i=(this.events||[]).length,o=0;o<i;o++){var r=e.events[o];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",ti="tap",ei="doubleTap",ii="release",oi="gesturechange",ri="gestureend",ni="gesturetap",si={api:0,touch:0,mouse:9,pointer:9};function ai(t){var e=[],i=t.originalEvent||t,o=t.currentTarget;return t.api?e.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"}):e.push({location:i,event:t,target:t.target,currentTarget:o,id:i.pointerId,type:"pointer"}),e}var pi=function(t){function e(e,i){t.call(this);var o=this;o.support=Re(),o.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,o.axis=e,o._updateLocationData(i),o.startLocation=o.location,o.velocity=o.delta=0,o.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,i=t["page"+e.axis],o=je(),r=o-e.timeStamp||1;!i&&this.invalidZeroEvents||(e.delta=i-e.location,e._updateLocationData(t),e.initialDelta=i-e.startLocation,e.velocity=e.delta/r,e.timeStamp=o)},e.prototype._updateLocationData=function(t){var e=this,i=e.axis;e.location=t["page"+i],e.client=t["client"+i],e.screen=t["screen"+i]},e}(e.a),li=function(t){function e(e,i,o){t.call(this),Ue(this,{x:new pi("X",o.location),y:new pi("Y",o.location),type:o.type,threshold:e.threshold||si[o.type],userEvents:e,target:i,currentTarget:o.currentTarget,initialTouch:o.target,id:o.id,pressEvent:o,_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(ti,t):e._trigger(ei,t),e.userEvents._clicks=0}),300))},e.prototype._hold=function(){this._trigger(qe,this.pressEvent)},e.prototype.move=function(t){var e=this,i="api"!==t.type&&e.userEvents._shouldNotMove;if(!e._finished&&!i){if(e.x.move(t.location),e.y.move(t.location),!e._moved){if(e._withinIgnoreThreshold())return;if(ci.current&&ci.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(ii,t),this._moved?this._trigger($e,t):this.supportDoubleTap?this._tap(t):this._trigger(ti,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 i=e.event,o={touch:this,x:this.x,y:this.y,target:this.target,event:i};this.userEvents.notify(t,o)&&i.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 hi(t){for(var e=Ce.up.split(" "),i=0,o=e.length;i<o;i++)t(e[i])}var ci=function(t){function e(e,i){t.call(this);var o,r=this,n=Re();if(this.support=n,i=i||{},this.options=i,o=r.filter=i.filter,r.threshold=i.threshold||Xe,r.minHold=i.minHold||We,r.touches=[],r._maxTouches=i.multiTouch?2:1,r.allowSelection=i.allowSelection,r.captureUpIfMoved=i.captureUpIfMoved,r._clicks=0,r.supportDoubleTap=i.supportDoubleTap,Ue(r,{element:e,surface:i.surface||e,stopPropagation:i.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"),o,this._elementStartHandler),e.style["touch-action"]=i.touchAction||"none",i.preventDragEvent&&(this._elementDragStartHandler=Ge,Le(e,Pe("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=this._select.bind(this),Le(e,Pe("mousedown"),o,this._elementSelectHandler),r.captureUpIfMoved){var s=r.surface,a=r.preventIfMoving.bind(r);hi((function(t){s.addEventListener(t,a,!0)}))}r.bind([Ye,qe,ti,ei,Qe,Ke,$e,ii,Je,"gesturestart",oi,ri,ni,Ze],i)}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,i=this.element;if(!t._destroyed){if(t._destroyed=!0,t.captureUpIfMoved){var o=t.surface;hi((function(e){o.removeEventListener(e,t.preventIfMoving)}))}Ie(t.surface,Pe("move"),this._surfaceMoveHandler),Ie(t.surface,Pe("up cancel"),this._surfaceEndHandler),Ie(i,Pe("down"),this._elementStartHandler),e.preventDragEvent&&Ie(i,Pe("dragstart"),this._elementDragStartHandler),Ie(i,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 i,o,r,n,s,a,p,l,h=this.touches,c=t;if(this._isMultiTouch()){switch(c){case Ke:c=oi;break;case $e:c=ri;break;case ti:c=ni}Ue(e,{touches:h},(i=h[0],o=h[1],r=i.x.location,n=i.y.location,s=o.x.location,a=o.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,i){this._apiCall("_start",t,e,i)},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 i=this;if(!(t.which&&t.which>1||this._maxTouchesReached())){var o;e.current=null,this.currentTarget=t.currentTarget,this.stopPropagation&&t.stopPropagation();for(var r=ai(t),n=0;n<r.length&&!i._maxTouchesReached();n++){var s=r[n];if(!(o=i.filter?s.currentTarget:i.element)||0!==o.length){var a=new li(i,o,s);i.touches.push(a),a.press(),i._isMultiTouch()&&i.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 i,o,r,n,s={},a=ai(e),p=this.touches;for(i=0;i<p.length;i++)s[(o=p[i]).id]=o;for(i=0;i<a.length;i++){if(n=s[(r=a[i]).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,i,o){this[t]({api:!0,pageX:e,pageY:i,clientX:e,clientY:i,target:o||this.element,stopPropagation:Ve,preventDefault:Ve})},e.defaultThreshold=function(t){Xe=t},e.minHold=function(t){We=t},e}(Ne);function ui(t,e){var i=Kt(e-t,9);if(0===i){if(0===e)return.1;i=Math.abs(e)}var o=Math.pow(10,Math.floor(Math.log(i)/Math.log(10))),r=Kt(i/o,y);return Kt(o*(r<1.904762?.2:r<4.761904?.5:r<9.523809?1:2),y)}var di=function(t){function e(e,i){t.call(this),this.x=e||0,this.y=i||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 i=Qt(e),o=Math.cos(i),r=Math.sin(i),n=t.x,s=t.y,a=this.x,p=this.y;return this.x=Kt(n+(a-n)*o+(p-s)*r,3),this.y=Kt(s+(p-s)*o-(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,i=this.y-t.y;return Math.sqrt(e*e+i*i)},e.onCircle=function(t,i,o){var r=Qt(i);return new e(t.x-o*Math.cos(r),t.y-o*Math.sin(r))},e}(e.a),fi=function(t){function i(e,i,o,r){t.call(this),this.x1=e||0,this.y1=i||0,this.x2=o||0,this.y2=r||0}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},i.prototype.width=function(){return this.x2-this.x1},i.prototype.height=function(){return this.y2-this.y1},i.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},i.prototype.move=function(t,e){var i=this.height(),o=this.width();return Ft(t)&&(this.x1=t,this.x2=this.x1+o),Ft(e)&&(this.y1=e,this.y2=this.y1+i),this},i.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},i.prototype.wrapPoint=function(t){var e=K(t),o=e?t[0]:t.x,r=e?t[1]:t.y;return this.wrap(new i(o,r,o,r)),this},i.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},i.prototype.alignTo=function(t,e){var i=this.height(),o=this.width(),r=e===D||e===h?X:W,n=r===X?i:o;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+o,this.y2=this.y1+i,this},i.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},i.prototype.expand=function(t,e){return this.shrink(-t,-e),this},i.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},i.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)},i.prototype.clone=function(){return new i(this.x1,this.y1,this.x2,this.y2)},i.prototype.center=function(){return new di(this.x1+this.width()/2,this.y1+this.height()/2)},i.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},i.prototype.points=function(){return[new di(this.x1,this.y1),new di(this.x2,this.y1),new di(this.x2,this.y2),new di(this.x1,this.y2)]},i.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},i.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},i.prototype.rotate=function(t){var e=this.width(),i=this.height(),o=this.center(),r=o.x,n=o.y,s=gi(0,0,r,n,t),a=gi(e,0,r,n,t),p=gi(e,i,r,n,t),l=gi(0,i,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),i=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+i,this},i.prototype.toRect=function(){return new e.R([this.x1,this.y1],[this.width(),this.height()])},i.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},i.prototype.align=function(t,e,i){var o=e+1,r=e+2,n=e===W?G:w,s=this[n]();Ot(i,[S,D])?(this[o]=t[o],this[r]=this[o]+s):Ot(i,[R,h])?(this[r]=t[r],this[o]=this[r]-s):i===c&&(this[o]=t[o]+(t[n]()-s)/2,this[r]=this[o]+s)},i}(e.a);function gi(t,e,i,o,r){var n=Qt(r);return new di(i+(t-i)*Math.cos(n)+(e-o)*Math.sin(n),o-(t-i)*Math.sin(n)+(e-o)*Math.cos(n))}var yi=function(t){function e(e,i,o,r,n){t.call(this),this.center=e,this.innerRadius=i,this.radius=o,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 i=Qt(t),o=Math.cos(i),r=Math.sin(i),n=e?this.innerRadius:this.radius,s=Kt(this.center.x-o*n,3),a=Kt(this.center.y-r*n,3);return new di(s,a)},e.prototype.adjacentBox=function(t,e,i){var o=this.clone().expand(t),r=o.middle(),n=o.point(r),s=e/2,a=i/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 fi(h,c,h+e,c+i)},e.prototype.containsPoint=function(t){var e=this.center,i=this.innerRadius,o=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,a=t.y-e.y,p=new di(s,a),l=this.point(r),h=new di(l.x-e.x,l.y-e.y),c=this.point(n),u=new di(c.x-e.x,c.y-e.y),d=Kt(s*s+a*a,3);return(h.equals(p)||it(h,p))&&!it(u,p)&&d>=i*i&&d<=o*o},e.prototype.getBBox=function(){var t,e=new fi(C,C,T,T),i=Kt(this.startAngle%360),o=Kt((i+this.angle)%360),r=this.innerRadius,n=[0,90,180,270,i,o].sort(vi),s=n.indexOf(i),a=n.indexOf(o);t=i===o?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 vi(t,e){return t-e}var mi=function(t){function e(e,i,o,r){t.call(this,e,0,i,o,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}(yi),xi=function(t){function i(){t.apply(this,arguments)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.createRing=function(t,i){var o=t.startAngle+180,r=t.angle+o;(0===t.angle||t.angle>0&&o===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:o,endAngle:r,radiusX:s,radiusY:s}),l=e.b.fromArc(p,i).close();if(a){p.radiusX=p.radiusY=a;var h=p.pointAt(r);l.lineTo(h.x,h.y),l.arc(r,o,a,a,!0)}else l.lineTo(n.x,n.y);return l},i}(e.a);xi.current=new xi;var _i=function(t){function i(e){t.call(this),this.children=[],this.options=ut({},this.options,this.initUserOptions(e))}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.initUserOptions=function(t){return t},i.prototype.reflow=function(t){for(var e,i=this.children,o=0;o<i.length;o++){var r=i[o];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},i.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},i.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},i.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},i.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},i.prototype.translateChildren=function(t,e){for(var i=this.children,o=i.length,r=0;r<o;r++)i[r].box.translate(t,e)},i.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var i=t[e];this.children.push(i),i.parent=this}},i.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},i.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this,this.parent&&this.parent.appendVisual(this.visual))},i.prototype.renderChildren=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)t[i].renderVisual()},i.prototype.createVisual=function(){this.visual=new e.G({zIndex:this.options.zIndex,visible:Jt(this.options.visible,!0)})},i.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=e.c.create(this.visual,this.options.animation))},i.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)},i.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},i.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},i.prototype.stackVisual=function(t){var e,i=t.options.zIndex||0,o=this.visual.children,r=o.length;for(e=0;e<r;e++){var n=o[e];if(Jt(n.options.zIndex,0)>i)break}this.visual.insert(e,t)},i.prototype.traverse=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++){var r=e[o];t(r),r.traverse&&r.traverse(t)}},i.prototype.closest=function(t){for(var e=this,i=!1;e&&!i;)(i=t(e))||(e=e.parent);if(i)return e},i.prototype.renderComplete=function(){},i.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible||!1===this.visible)},i.prototype.toggleHighlight=function(t,e){var i=this,o=(this.options||{}).highlight||{},r=o.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 i.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(o.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},i.prototype.toggleFocusHighlight=function(t){var e=((this.options||{}).accessibility||{}).highlight||{},i=this._focusHighlight;if(t||i){if(!i){var o=ge(this.getRoot().options.background),r={fill:{opacity:e.opacity,color:e.color},stroke:Object.assign({},{color:o},e.border),zIndex:e.zIndex};i=this._focusHighlight=this.createFocusHighlight(r),this.appendVisual(i)}i.visible(t)}},i.prototype.createGradientOverlay=function(t,i,o){var r=new e.b(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},i));return r.segments.elements(t.segments.elements()),r},i.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},i.prototype.supportsPointInactiveOpacity=function(){return!0},i}(e.a);_i.prototype.options={};var bi={dots:e.e,verticalStripes:e.v,crosshatch:e.f,diagonalStripes:e.g,grid:e.h};function wi(t,e,i){var o=function(t,e){return lt(t)?t(e):t}(t,i),r=o&&bi[o.type];return r?r(Object.assign({},e,o)):e}var Ai=function(t){function i(e){t.call(this,e),this.options.margin=mt(this.options.margin),this.options.padding=mt(this.options.padding)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.reflow=function(e){var i,o=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(){o.align(e,W,r.align),o.align(e,X,r.vAlign),o.paddingBox=i.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),i=p?this.box=new fi(0,0,n,s):this.box,a&&p?(u(),d=this.contentBox=this.paddingBox.clone().unpad(h)):(d=this.contentBox=i.clone(),i.pad(h).pad(c).pad(l),u()),this.translateChildren(i.x1-d.x1+l.left+c+h.left,i.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)}},i.prototype.align=function(t,e,i){this.box.align(t,e,i)},i.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},i.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(e.b.fromRect(this.paddingBox.toRect(),this.visualStyle()))},i.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:wi(t.pattern,{color:t.background,opacity:t.opacity},void 0),cursor:t.cursor}},i}(_i);function ki(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(Ai,{align:S,vAlign:D,margin:{},padding:{},border:{color:l,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var Si=function(t){function i(e,i){t.call(this,e),this.pointData=i}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getElement=function(){var t=this.options,i=this.paddingBox,o=t.type,r=t.rotation,n=i.center(),s=i.width()/2,a=i.height()/2;if(!t.visible||!this.hasBox())return null;var p,l=this.visualStyle();if(o===u)p=new e.i(new e.j([Kt(i.x1+s,3),Kt(i.y1+a,3)],Math.min(s,a)),l);else if(o===z)p=e.b.fromPoints([[i.x1+s,i.y1],[i.x1,i.y2],[i.x2,i.y2]],l).close();else if(o===d)(p=new e.k(l)).moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),p.moveTo(i.x1,i.y2).lineTo(i.x2,i.y1);else{var h=i.toRect();if(o===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},i.prototype.createElement=function(){var t=this,e=this.options.visual,i=this.pointData||{};return e?e({value:i.value,dataItem:i.dataItem,sender:this.getSender(),series:i.series,category:i.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},i.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}},i.prototype.createVisual=function(){this.visual=this.createElement(),ki(this.visual,this.options.accessibilityOptions)},i}(Ai);ee(Si,{type:u,align:c,vAlign:c});var Ci="radial",Ti={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:Ci,stops:[{offset:0,color:U,opacity:.55},{offset:.65,color:U,opacity:0},{offset:.95,color:U,opacity:.25}]},roundedBevel:{type:Ci,stops:[{offset:.33,color:U,opacity:.06},{offset:.83,color:U,opacity:.2},{offset:.95,color:U,opacity:0}]},roundedGlass:{type:Ci,supportVML:!1,stops:[{offset:0,color:U,opacity:0},{offset:.5,color:U,opacity:.3},{offset:.99,color:U,opacity:0}]},sharpGlass:{type:Ci,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:Ci,center:[.5,.5],radius:.5}};function Pi(t,e){if(t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2)return e;var i=Math.min(t.x1,e.x1),o=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 fi(o,s,r,a),h[1]=new fi(i,a,o,p),h[2]=new fi(r,a,n,p),h[3]=new fi(o,p,r,l),t.x1===i&&t.y1===s||e.x1===i&&e.y1===s?(h[4]=new fi(i,s,o,a),h[5]=new fi(r,p,n,l)):(h[4]=new fi(r,s,n,a),h[5]=new fi(i,p,o,l)),Ct(h,(function(t){return t.height()>0&&t.width()>0}))[0]}var Oi=function(t){function i(e){t.call(this,e);var i=this.options;i.width=parseInt(i.width,10),i.height=parseInt(i.height,10),this.gradients={}}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.reflow=function(){var t=this.options,e=this.children,i=new fi(0,0,t.width,t.height);this.box=i.unpad(t.margin);for(var o=0;o<e.length;o++)e[o].reflow(i),i=Pi(i,e[o].box)||new fi},i.prototype.createVisual=function(){this.visual=new e.G,this.createBackground()},i.prototype.createBackground=function(){var t=this.options,i=t.border||{},o=this.box.clone().pad(t.margin).unpad(i.width),r=e.b.fromRect(o.toRect(),{stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(r)},i.prototype.getRoot=function(){return this},i.prototype.createGradient=function(t){var i,o=this.gradients,r=Zt(t),n=Ti[t.gradient];if(o[r])i=o[r];else{var s=Object.assign({},n,t);"linear"===n.type?i=new e.L(s):(t.innerRadius&&(s.stops=function(t){for(var e=t.stops,i=t.innerRadius/t.radius*100,o=e.length,r=[],n=0;n<o;n++){var s=Object.assign({},e[n]);s.offset=(s.offset*(100-i)+i)/100,r.push(s)}return r}(s)),(i=new e.m(s)).supportVML=!1!==n.supportVML),o[r]=i}return i},i.prototype.cleanGradients=function(){var t=this.gradients;for(var e in t)t[e]._observers=[]},i.prototype.size=function(){var t=this.options;return new fi(0,0,t.width,t.height)},i}(_i);ee(Oi,{width:v,height:400,background:U,border:{color:l,width:0},margin:mt(5),zIndex:-2});var Mi=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,i=e.box,o=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=i[r+1]+this.alignStart(l,i[s]());if(c){for(var d=u,f=0;f<c;f++){for(var g=p[f],y=g.groupElements,v=i[o+1],m=y.length,x=0;x<m;x++){var _=y[x],b=t.elementSize(_),w=d+t.alignStart(b[s],g.groupSize),A=new fi;A[r+1]=w,A[r+2]=w+b[s],A[o+1]=v,A[o+2]=v+b[n],_.reflow(A),v+=b[n]+t.elementSpacing}d+=g.groupSize+t.groupSpacing}i[r+1]=u,i[r+2]=u+l,i[o+2]=i[o+1]+h}},e.prototype.alignStart=function(t,e){var i=0,o=this.options.align;return o===R||o===h?i=e-t:o===c&&(i=(e-t)/2),i},e.prototype.groupOptions=function(){for(var t=this,e=t.box,i=t.children,o=t.elementSizeField,r=t.groupSizeField,n=t.elementSpacing,s=t.groupSpacing,a=Kt(e[o]()),p=i.length,l=[],h=0,c=0,u=0,d=0,f=[],g=0;g<p;g++){var y=i[g];y.box||y.reflow(e);var v=this.elementSize(y);this.options.wrap&&Kt(c+n+v[o])>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[o],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}(_i);ee(Mi,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var Ei=e.T,Li=function(t){function i(e,i){t.call(this,i),this.content=e,this.reflow(new fi)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.reflow=function(t){var i=this.options,o=i.size=e.n(this.content,{font:i.font});this.baseline=o.baseline,this.box=new fi(t.x1,t.y1,t.x1+o.width,t.y1+o.height)},i.prototype.createVisual=function(){var t=this.options,e=t.font,i=t.color,o=t.opacity,r=t.cursor,n=t.stroke,s=t.paintOrder;this.visual=new Ei(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:i,opacity:o},cursor:r,stroke:n,paintOrder:s})},i}(_i);function Ii(t){var e=t.origin,i=t.bottomRight();return new fi(e.x,e.y,i.x,i.y)}ee(Li,{font:g,color:l});var Ri=/\n/m,Bi=function(t){function i(e,i,o){t.call(this,i),this.content=e,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new fi)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Ri),i=new Mi({vertical:!0,align:t.align,wrap:!1}),o=ut({},t,{opacity:1,animation:null});this.container=i,this.append(i);for(var r=0;r<e.length;r++){var n=new Li(e[r].trim(),o);i.append(n)}},i.prototype.reflow=function(i){var o=this.options,r=o.visual;if(this.container.options.align=o.align,r&&!this._boxReflow){var n=i;n.hasSize()||(this._boxReflow=!0,this.reflow(n),this._boxReflow=!1,n=this.box);var s=this.visual=r(this.visualContext(n));s&&(n=Ii(s.clippedBBox()||new e.R),s.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=n}else if(t.prototype.reflow.call(this,i),o.rotation){var a=mt(o.margin),p=this.box.unpad(a);this.targetBox=i,this.normalBox=p.clone(),(p=this.rotate()).translate(a.left-a.right,a.top-a.bottom),this.rotatedBox=p.clone(),p.pad(a)}},i.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 i=e.b.fromRect(this.paddingBox.toRect(),this.visualStyle());this.visual.append(i)}},i.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)},i.prototype.visualContext=function(t){var e=this,i={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(i,this.data),i},i.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},i.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},i.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var i=this.normalBox.center(),o=i.x,r=i.y,n=this.rotatedBox.center();return e.t().translate(n.x-o,n.y-r).rotate(t,[o,r])},i}(Ai),Vi=function(t){function e(e){t.call(this,e),this._textBox=new Bi(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,i){var o,r=t;return"string"==typeof t&&(r={text:t}),(r=Object.assign({visible:!0},i,r))&&r.visible&&r.text&&(o=new e(r)),o},e.orderTitles=function(t){var e=[].concat(t),i=e.filter((function(t){return t&&t.options.position!==h})),o=e.filter((function(t){return t&&t.options.position===h}));return ji(i),ji(o),o.reverse(),i.concat(o)},e}(_i);function ji(t){for(var e=1;e<t.length;e++){var i=t[e]._textBox,o=t[e-1]._textBox;o.options.margin=Object.assign(mt(o.options.margin),{bottom:0}),i.options.margin=Object.assign(mt(i.options.margin),{top:0})}}ee(Vi,{color:l,position:D,align:c,margin:mt(5),padding:mt(5)});var Di=function(t){function i(e,i,o,r,n){t.call(this,i,n),this.text=i,this.value=e,this.index=o,this.dataItem=r,this.reflow(new fi)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.visualContext=function(e){var i=t.prototype.visualContext.call(this,e);return i.value=this.value,i.dataItem=this.dataItem,i.format=this.options.format,i.culture=this.options.culture,i},i.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})},i.prototype.rotate=function(){if(this.options.alignRotation!==c){var e=this.normalBox.toRect(),i=this.rotationTransform();this.box=Ii(e.bbox(i.matrix()))}else t.prototype.rotate.call(this);return this.box},i.prototype.rotationTransform=function(){var i=this.options,o=i.rotation;if(!o)return null;if(i.alignRotation===c)return t.prototype.rotationTransform.call(this);var r=e.t().rotate(o).matrix(),n=this.normalBox.toRect(),s=this.targetBox.toRect(),a=i.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]),A=Math.abs(f[l]+x[l]-u[l]);Kt(w,y)===Kt(A,y)?(_=d,b=f):A<w?(_=f,b=g):(_=d,b=v);var k=_[p]+(b[p]-_[p])/2;return x[p]=s.center()[p]-k,e.t().translate(x.x,x.y).rotate(o)},i}(Bi);ee(Di,{_autoReflow:!1});var zi=function(t){function i(e,i,o){t.call(this,i),this.fields=e,this.chartService=o,this.render()}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.hide=function(){this.options.visible=!1},i.prototype.show=function(){this.options.visible=!0},i.prototype.render=function(){var t=this,e=this.options;if(e.visible){var i,o,r=e.label,n=e.icon,s=new fi,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===A?"#fff":n.background),this.label=new Bi(l,ut({},r)),this.label.aliasFor=a,r.position!==A||Ft(p)||(n.type===u?p=Math.max(this.label.box.width(),this.label.box.height()):(i=this.label.box.width(),o=this.label.box.height()),s.wrap(this.label.box))}n.width=i||p||7,n.height=o||p||7;var