@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
1 lines • 217 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("kendo.common.cmn.chunk.js"),require("kendo.pako-esm.cmn.chunk.js")):"function"==typeof define&&define.amd?define(["exports","kendo.common.cmn.chunk","kendo.pako-esm.cmn.chunk"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).kendo=t.kendo||{},t.kendo._globals=t.kendo._globals||{},t.kendo._globals.DrawingCmnChunk={}),t.kendo._globals.CommonCmnChunk,t.kendo._globals.PakoEsmCmnChunk)}(this,(function(t,e,r){var o=function(){},n=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.bind=function(t,e,r){var o=arguments,n=this,a=s(t),h=i(e),p=a.length;if(void 0===e){for(var c in t)n.bind(c,t[c]);return this}for(var u=function(t){var i=a[t],s=h?e:e[i];if(s){if(r){var p=s;(s=function(){n.unbind(i,s),p.apply(n,o)}).original=p}(n._events[i]=n._events[i]||[]).push(s)}},l=0;l<p;l++)u(l);return this},e.prototype.one=function(t,e){return this.bind(t,e,!0)},e.prototype.first=function(t,e){for(var r=s(t),o=i(e),n=0,a=r.length;n<a;n++){var h=r[n],p=o?e:e[h];if(p)(this._events[h]=this._events[h]||[]).unshift(p)}return this},e.prototype.trigger=function(t,e){void 0===e&&(e={});var r=this._events[t];if(r){var o=r.length;e.sender=this,e._defaultPrevented=!1,e.preventDefault=a,e.isDefaultPrevented=h,r=r.slice();for(var n=0;n<o;n++)r[n].call(this,e);return!0===e._defaultPrevented}return!1},e.prototype.unbind=function(t,e){var r=this._events[t];if(void 0===t)this._events={};else if(r)if(e)for(var o=r.length-1;o>=0;o--)r[o]!==e&&r[o].original!==e||r.splice(o,1);else this._events[t]=[];return this},e}(o);function i(t){return"function"==typeof t}function s(t){return"string"==typeof t?[t]:t}function a(){this._defaultPrevented=!0}function h(){return!0===this._defaultPrevented}var p=function(t){var e="undefined"!=typeof window?window:{},r=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t){setTimeout(t,1e3/60)};p=function(t){return r.call(e,t)},p(t)},c=p,u=/&/g,l=/</g,f=/"/g,d=/'/g,y=/>/g;function g(t){return String(t).replace(u,"&").replace(l,"<").replace(y,">").replace(f,""").replace(d,"'")}function m(t){var e=window.console;void 0!==e&&e.log&&e.log(t)}function v(t){var e=t.dataURI,r=t.fileName,o=e;if("string"==typeof o&&window.Blob){for(var n=o.split(";base64,"),i=n[0],s=atob(n[1]),a=new Uint8Array(s.length),h=0;h<s.length;h++)a[h]=s.charCodeAt(h);o=new Blob([a.buffer],{type:i})}if(navigator.msSaveBlob)navigator.msSaveBlob(o,r);else{var p=document.createElement("a");p.download=r,o=p.href=URL.createObjectURL(o);var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),p.dispatchEvent(c),setTimeout((function(){URL.revokeObjectURL(o)}))}}var _=null,b={get browser(){return"undefined"==typeof window||_||(_=function(t){var e={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+))/i},r={};for(var o in e)if(e.hasOwnProperty(o)){var n=t.match(e[o]);if(n){r[o]=!0,r[n[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,r.version=parseInt(document.documentMode||n[2],10);break}}return r}(window.navigator.userAgent)),_}};var w=Date.now||function(){return(new Date).getTime()};function x(t,e){var r,o=0;if(!e||e<=0)return t;var n=function(){var n=w()-o,i=arguments,s=function(){t.apply(null,i),o=w()};if(!o)return s();r&&clearTimeout(r),n>e?s():r=setTimeout(s,e-n)};return n.cancel=function(){clearTimeout(r)},n}var S={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},C=b.browser,k=function(t){var e=Object.keys(S);e.push("transparent");var r=new RegExp("^("+e.join("|")+")(\\W|$)","i");return k=function(t){return r.exec(t)},r.exec(t)},T=function(t){function e(){t.call(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toHSV=function(){return this},e.prototype.toRGB=function(){return this},e.prototype.toHex=function(t){return this.toBytes().toHex(t)},e.prototype.toBytes=function(){return this},e.prototype.toCss=function(t){return"#"+this.toHex(t)},e.prototype.toCssRgba=function(){var t=this.toBytes();return"rgba("+t.r+", "+t.g+", "+t.b+", "+parseFloat(Number(this.a).toFixed(3))+")"},e.prototype.toDisplay=function(){return C.msie&&C.version<9?this.toCss():this.toCssRgba()},e.prototype.equals=function(t){return t===this||null!=t&&this.toCssRgba()===F(t).toCssRgba()},e.prototype.diff=function(t){if(null===t)return NaN;var e=this.toBytes(),r=t.toBytes();return Math.sqrt(Math.pow(.3*(e.r-r.r),2)+Math.pow(.59*(e.g-r.g),2)+Math.pow(.11*(e.b-r.b),2))},e.prototype.clone=function(){var t=this.toBytes();return t===this&&(t=new M(t.r,t.g,t.b,t.a)),t},e}(o),O=function(t){function e(e,r,o,n){t.call(this),this.r=e,this.g=r,this.b=o,this.a=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toHSV=function(){var t,e,r=this,o=r.r,n=r.g,i=r.b,s=Math.min(o,n,i),a=Math.max(o,n,i),h=a-s,p=a;return 0===h?new E(0,0,p,this.a):(0!==a?(e=h/a,t=o===a?(n-i)/h:n===a?2+(i-o)/h:4+(o-n)/h,(t*=60)<0&&(t+=360)):(e=0,t=-1),new E(t,e,p,this.a))},e.prototype.toHSL=function(){var t,e,r=this,o=r.r,n=r.g,i=r.b,s=Math.max(o,n,i),a=Math.min(o,n,i),h=(s+a)/2;if(s===a)t=e=0;else{var p=s-a;switch(e=h>.5?p/(2-s-a):p/(s+a),s){case o:t=(n-i)/p+(n<i?6:0);break;case n:t=(i-o)/p+2;break;case i:t=(o-n)/p+4}}return new P(60*t,100*e,100*h,this.a)},e.prototype.toBytes=function(){return new M(255*this.r,255*this.g,255*this.b,this.a)},e}(T),M=function(t){function e(e,r,o,n){t.call(this,Math.round(e),Math.round(r),Math.round(o),n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toRGB=function(){return new t(this.r/255,this.g/255,this.b/255,this.a)},e.prototype.toHSV=function(){return this.toRGB().toHSV()},e.prototype.toHSL=function(){return this.toRGB().toHSL()},e.prototype.toHex=function(t){var e=A(this.r,2)+A(this.g,2)+A(this.b,2);return t&&t.alpha&&(e+=A(Math.round(255*this.a),2)),e},e.prototype.toBytes=function(){return this},e}(O);function A(t,e,r){void 0===r&&(r="0");for(var o=t.toString(16);e>o.length;)o=r+o;return o}var E=function(t){function e(e,r,o,n){t.call(this),this.h=e,this.s=r,this.v=o,this.a=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toRGB=function(){var t,e,r,o=this,n=o.h,i=o.s,s=o.v;if(0===i)t=e=r=s;else{n/=60;var a=Math.floor(n),h=n-a,p=s*(1-i),c=s*(1-i*h),u=s*(1-i*(1-h));switch(a){case 0:t=s,e=u,r=p;break;case 1:t=c,e=s,r=p;break;case 2:t=p,e=s,r=u;break;case 3:t=p,e=c,r=s;break;case 4:t=u,e=p,r=s;break;default:t=s,e=p,r=c}}return new O(t,e,r,this.a)},e.prototype.toHSL=function(){return this.toRGB().toHSL()},e.prototype.toBytes=function(){return this.toRGB().toBytes()},e}(T),P=function(t){function e(e,r,o,n){t.call(this),this.h=e,this.s=r,this.l=o,this.a=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toRGB=function(){var t,e,r,o=this.h/360,n=this.s/100,i=this.l/100;if(0===n)t=e=r=i;else{var s=i<.5?i*(1+n):i+n-i*n,a=2*i-s;t=R(a,s,o+1/3),e=R(a,s,o),r=R(a,s,o-1/3)}return new O(t,e,r,this.a)},e.prototype.toHSV=function(){return this.toRGB().toHSV()},e.prototype.toBytes=function(){return this.toRGB().toBytes()},e}(T);function R(t,e,r){var o=r;return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+6*(e-t)*o:o<.5?e:o<2/3?t+(e-t)*(2/3-o)*6:t}function N(t){return parseFloat(parseFloat(parseInt(t,16)/255).toFixed(3))}function F(t,e){var r,o;if(!t||"none"===t)return null;if(t instanceof T)return t;var n=t.toLowerCase();if(r=k(n))return(n="transparent"===r[1]?new O(1,1,1,0):F(S[r[1]],e)).match=[r[1]],n;if((r=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(n))?o=new M(parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16),1):(r=/^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(n))?o=new M(parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16),1):(r=/^#?([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(n))?o=new M(parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16),N(r[4]+r[4])):(r=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(n))?o=new M(parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16),N(r[4])):(r=/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(n))?o=new M(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10),1):(r=/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(n))?o=new M(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10),parseFloat(r[4])):(r=/^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(n))?o=new O(parseFloat(r[1])/100,parseFloat(r[2])/100,parseFloat(r[3])/100,1):(r=/^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(n))?o=new O(parseFloat(r[1])/100,parseFloat(r[2])/100,parseFloat(r[3])/100,parseFloat(r[4])):(r=/^color\(\s*srgb\s*([0-9]*\.?[0-9]+)\s+([0-9]*\.?[0-9]+)\s+([0-9]*\.?[0-9]+)\s*(\/\s+([0-9]*\.?[0-9]+))?\)/.exec(n))&&(o=new O(parseFloat(r[1]),parseFloat(r[2]),parseFloat(r[3]),parseFloat(r[5]||"1"))),o)o.match=r;else if(!e)throw new Error("Cannot parse color: "+n);return o}var L=function(t){function e(r){var o=this;if(t.call(this),1===arguments.length)for(var n=e.formats,i=this.resolveColor(r),s=0;s<n.length;s++){var a=n[s].re,h=n[s].process,p=a.exec(i);if(p){var c=h(p);o.r=c[0],o.g=c[1],o.b=c[2]}}else this.r=arguments[0],this.g=arguments[1],this.b=arguments[2];this.r=this.normalizeByte(this.r),this.g=this.normalizeByte(this.g),this.b=this.normalizeByte(this.b)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toHex=function(){var t=this.padDigit,e=this.r.toString(16),r=this.g.toString(16),o=this.b.toString(16);return"#"+t(e)+t(r)+t(o)},e.prototype.resolveColor=function(t){var r=t||"black";return"#"===r.charAt(0)&&(r=r.substr(1,6)),r=(r=r.replace(/ /g,"")).toLowerCase(),r=e.namedColors[r]||r},e.prototype.normalizeByte=function(t){return t<0||isNaN(t)?0:t>255?255:t},e.prototype.padDigit=function(t){return 1===t.length?"0"+t:t},e.prototype.brightness=function(t){var e=Math.round;return this.r=e(this.normalizeByte(this.r*t)),this.g=e(this.normalizeByte(this.g*t)),this.b=e(this.normalizeByte(this.b*t)),this},e.prototype.percBrightness=function(){return Math.sqrt(.241*this.r*this.r+.691*this.g*this.g+.068*this.b*this.b)},e.prototype.isDark=function(){return this.percBrightness()<180},e.fromBytes=function(t,e,r,o){return new M(t,e,r,null!=o?o:1)},e.fromRGB=function(t,e,r,o){return new O(t,e,r,null!=o?o:1)},e.fromHSV=function(t,e,r,o){return new E(t,e,r,null!=o?o:1)},e.fromHSL=function(t,e,r,o){return new P(t,e,r,null!=o?o:1)},e}(o);L.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(t){return[parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],L.namedColors=S;var I=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.observers=function(){return this._observers=this._observers||[],this._observers},e.prototype.addObserver=function(t){return this._observers?this._observers.push(t):this._observers=[t],this},e.prototype.removeObserver=function(t){var e=this.observers(),r=e.indexOf(t);return-1!==r&&e.splice(r,1),this},e.prototype.trigger=function(t,e){var r=this._observers;if(r&&!this._suspended)for(var o=0;o<r.length;o++){var n=r[o];n[t]&&n[t](e)}return this},e.prototype.optionsChange=function(t){void 0===t&&(t={}),t.element=this,this.trigger("optionsChange",t)},e.prototype.geometryChange=function(){this.trigger("geometryChange",{element:this})},e.prototype.suspend=function(){return this._suspended=(this._suspended||0)+1,this},e.prototype.resume=function(){return this._suspended=Math.max((this._suspended||0)-1,0),this},e.prototype._observerField=function(t,e){this[t]&&this[t].removeObserver(this),this[t]=e,e.addObserver(this)},e}(o);function j(t,e){return t.push.apply(t,e),t}var z={1:"i",10:"x",100:"c",2:"ii",20:"xx",200:"cc",3:"iii",30:"xxx",300:"ccc",4:"iv",40:"xl",400:"cd",5:"v",50:"l",500:"d",6:"vi",60:"lx",600:"dc",7:"vii",70:"lxx",700:"dcc",8:"viii",80:"lxxx",800:"dccc",9:"ix",90:"xc",900:"cm",1e3:"m"};function B(t){for(var e=[1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],r="";t>0;)t<e[0]?e.shift():(r+=z[e[0]],t-=e[0]);return r}function D(){var t,e,r=new Promise((function(o,n){t=function(t){return r._state="resolved",o(t),r},e=function(t){return r._state="rejected",n(t),r}}));return r._state="pending",r.resolve=t,r.reject=e,r.state=function(){return r._state},r}function G(t){return void 0!==t}var q=1;function U(){return"kdef"+q++}var H=Math.PI/180,$=Number.MAX_VALUE,X=-Number.MAX_VALUE;function V(t){return t/H}var W=String.fromCharCode;function Y(t){return W(t>>8)+W(255&t)}var J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Z(t){for(var e="",r=0,o=function(t){for(var e="",r=0;r<t.length;r++){var o=t.charCodeAt(r);if(55296<=o&&o<=56319){var n=o,i=t.charCodeAt(++r);isNaN(i)||(o=1024*(n-55296)+(i-56320)+65536)}o<128?e+=W(o):o<2048?(e+=W(192|o>>>6),e+=W(128|63&o)):o<65536?(e+=W(224|o>>>12),e+=W(128|o>>>6&63),e+=W(128|63&o)):o<1114111&&(e+=W(240|o>>>18),e+=W(128|o>>>12&63),e+=W(128|o>>>6&63),e+=W(128|63&o))}return e}(t);r<o.length;){var n=o.charCodeAt(r++),i=o.charCodeAt(r++),s=o.charCodeAt(r++),a=n>>2,h=(3&n)<<4|i>>4,p=(15&i)<<2|s>>6,c=63&s;isNaN(i)?p=c=64:isNaN(s)&&(c=64),e=e+J.charAt(a)+J.charAt(h)+J.charAt(p)+J.charAt(c)}return e}function K(t){return G((t.x||{}).location)?{x:t.x.location,y:t.y.location}:{x:t.pageX||t.clientX||0,y:t.pageY||t.clientY||0}}function Q(t){return void 0===t&&(t={}),t.touch?t.touch.initialTouch:t.target}function tt(t){return""===t||null===t||"none"===t||"transparent"===t||!G(t)}function et(t){if(t)return t[t.length-1]}function rt(t,e,r){return Math.max(Math.min(t,r),e)}function ot(t,e){if(t.length<2)return t.slice();return function t(r){if(r.length<=1)return r;var o=Math.floor(r.length/2),n=r.slice(0,o),i=r.slice(o);return function(t,r){for(var o=[],n=0,i=0,s=0;n<t.length&&i<r.length;)e(t[n],r[i])<=0?o[s++]=t[n++]:o[s++]=r[i++];return n<t.length&&o.push.apply(o,t.slice(n)),i<r.length&&o.push.apply(o,r.slice(i)),o}(n=t(n),i=t(i))}(t)}function nt(t){return Promise.all(t)}function it(t){return t*H}function st(t,e){var r,o=(r=e)?Math.pow(10,r):1;return Math.round(t*o)/o}function at(t,e){return G(t)?t:e}function ht(t,e){for(var r in e)for(var o=r.trim().split(" "),n=0;n<o.length;n++)t.addEventListener(o[n],e[r],!1)}function pt(t){var e=t.getBoundingClientRect(),r=document.documentElement;return{top:e.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||0),left:e.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||0)}}function ct(t,e){for(var r={},o=window.getComputedStyle(t)||{},n=Array.isArray(e)?e:[e],i=0;i<n.length;i++){var s=n[i];r[s]=o[s]}return r}function ut(t){return isNaN(t)?t:t+"px"}function lt(t,e){if(!e){var r=ct(t,["width","height"]);return{width:parseInt(r.width,10),height:parseInt(r.height,10)}}var o=e.width,n=e.height;G(o)&&(t.style.width=ut(o)),G(n)&&(t.style.height=ut(n))}function ft(t,e){for(var r in void 0===e&&(e={}),e)for(var o=r.trim().split(" "),n=0;n<o.length;n++)t.removeEventListener(o[n],e[r],!1)}function dt(t){var e=ct(t,["paddingLeft","paddingTop"]),r=e.paddingLeft,o=e.paddingTop;return{top:parseFloat(o),left:parseFloat(r)}}var yt=function(t){function e(e,r,o,n,i,s){void 0===e&&(e=0),void 0===r&&(r=0),void 0===o&&(o=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===s&&(s=0),t.call(this),this.a=e,this.b=r,this.c=o,this.d=n,this.e=i,this.f=s}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.multiplyCopy=function(t){return new e(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)},e.prototype.invert=function(){var t=this,r=t.a,o=t.b,n=t.c,i=t.d,s=t.e,a=t.f,h=r*i-o*n;return 0===h?null:new e(i/h,-o/h,-n/h,r/h,(n*a-i*s)/h,(o*s-r*a)/h)},e.prototype.clone=function(){return new e(this.a,this.b,this.c,this.d,this.e,this.f)},e.prototype.equals=function(t){return!!t&&(this.a===t.a&&this.b===t.b&&this.c===t.c&&this.d===t.d&&this.e===t.e&&this.f===t.f)},e.prototype.round=function(t){return this.a=st(this.a,t),this.b=st(this.b,t),this.c=st(this.c,t),this.d=st(this.d,t),this.e=st(this.e,t),this.f=st(this.f,t),this},e.prototype.toArray=function(t){var e=[this.a,this.b,this.c,this.d,this.e,this.f];if(G(t))for(var r=0;r<e.length;r++)e[r]=st(e[r],t);return e},e.prototype.toString=function(t,e){return void 0===e&&(e=","),this.toArray(t).join(e)},e.translate=function(t,r){return new e(1,0,0,1,t,r)},e.unit=function(){return new e(1,0,0,1,0,0)},e.rotate=function(t,r,o){var n=new e;return n.a=Math.cos(it(t)),n.b=Math.sin(it(t)),n.c=-n.b,n.d=n.a,n.e=r-r*n.a+o*n.b||0,n.f=o-o*n.a-r*n.b||0,n},e.scale=function(t,r){return new e(t,0,0,r,0,0)},e}(o);yt.IDENTITY=yt.unit();var gt=/matrix\((.*)\)/;function mt(t){var e=getComputedStyle(t).transform;return"none"===e?yt.unit():function(t){var e=t.match(gt);if(null===e||2!==e.length)return yt.unit();var r=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(yt,[null].concat(r)))}(e)}function vt(t){if(!t)return yt.unit();for(var e=mt(t),r=t.parentElement;r;){var o=mt(r);e=e.multiplyCopy(o),r=r.parentElement}return e.b=e.c=e.e=e.f=0,e}var _t=function(t){function e(e){t.call(this),this._size=e,this._length=0,this._map={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.put=function(t,e){var r=this._map,o={key:t,value:e};r[t]=o,this._head?(this._tail.newer=o,o.older=this._tail,this._tail=o):this._head=this._tail=o,this._length>=this._size?(r[this._head.key]=null,this._head=this._head.newer,this._head.older=null):this._length++},e.prototype.get=function(t){var e=this._map[t];if(e)return e===this._head&&e!==this._tail&&(this._head=e.newer,this._head.older=null),e!==this._tail&&(e.older&&(e.older.newer=e.newer,e.newer.older=e.older),e.older=this._tail,e.newer=null,this._tail.newer=e,this._tail=e),e.value},e}(o),bt=/\r?\n|\r|\t/g;function wt(t){return String(t).replace(bt," ")}function xt(t){var e=[];for(var r in t)e.push(r+t[r]);return e.sort().join("")}function St(t){for(var e=2166136261,r=0;r<t.length;++r)e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24),e^=t.charCodeAt(r);return e>>>0}var Ct,kt={baselineMarkerSize:1};"undefined"!=typeof document&&((Ct=document.createElement("div")).style.setProperty("position","absolute","important"),Ct.style.setProperty("top","-4000px","important"),Ct.style.setProperty("width","auto","important"),Ct.style.setProperty("height","auto","important"),Ct.style.setProperty("padding","0","important"),Ct.style.setProperty("margin","0","important"),Ct.style.setProperty("border","0","important"),Ct.style.setProperty("line-height","normal","important"),Ct.style.setProperty("visibility","hidden","important"),Ct.style.setProperty("white-space","pre","important"));var Tt=function(t){function e(e){t.call(this),this._cache=new _t(1e3),this.options=Object.assign({},kt,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.measure=function(t,e,r){if(void 0===r&&(r={}),null==t)return{width:0,height:0,baseline:0};var o=St(t+xt(e)),n=this._cache.get(o);if(n)return n;var i={width:0,height:0,baseline:0},s=r.box||Ct,a=this._baselineMarker().cloneNode(!1);for(var h in e){var p=e[h];void 0!==p&&(s.style[h]=p)}var c=!1!==r.normalizeText?wt(t):String(t);return s.textContent=c,s.appendChild(a),document.body.appendChild(s),c.length&&(i.width=s.offsetWidth-this.options.baselineMarkerSize,i.height=s.offsetHeight,i.baseline=a.offsetTop+this.options.baselineMarkerSize),i.width>0&&i.height>0&&this._cache.put(o,i),s.parentNode.removeChild(s),i},e.prototype._baselineMarker=function(){var t=document.createElement("div");return t.style.display="inline-block",t.style.verticalAlign="baseline",t.style.width=this.options.baselineMarkerSize+"px",t.style.height=this.options.baselineMarkerSize+"px",t.style.overflow="hidden",t},e}(o);function Ot(t,e,r){return Tt.current.measure(t,e,r)}Tt.current=new Tt;var Mt=Object.freeze({__proto__:null,DEG_TO_RAD:H,LRUCache:_t,MAX_NUM:$,MIN_NUM:X,TextMetrics:Tt,append:j,arabicToRoman:B,bindEvents:ht,createPromise:D,defined:G,definitionId:U,deg:V,elementOffset:pt,elementPadding:dt,elementScale:vt,elementSize:lt,elementStyles:ct,encodeBase64:Z,eventCoordinates:K,eventElement:Q,hashKey:St,isTransparent:tt,last:et,limitValue:rt,measureText:Ot,mergeSort:ot,normalizeText:wt,now:w,objectKey:xt,promiseAll:nt,rad:it,round:st,unbindEvents:ft,valueOrDefault:at}),At={}.toString,Et=function(t){function e(e,r){for(var o in void 0===r&&(r=""),t.call(this),this.prefix=r,e){var n=e[o];n=this._wrap(n,o),this[o]=n}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){for(var e=t.split("."),r=this;e.length&&r;){r=r[e.shift()]}return r},e.prototype.set=function(t,e){this.get(t)!==e&&(this._set(t,this._wrap(e,t)),this.optionsChange({field:this.prefix+t,value:e}))},e.prototype._set=function(t,r){var o=t.indexOf(".")>=0,n=this,i=t;if(o){for(var s=i.split("."),a=this.prefix;s.length>1;){a+=(i=s.shift())+".";var h=n[i];h||((h=new e({},a)).addObserver(this),n[i]=h),n=h}i=s[0]}n._clear(i),n[i]=r},e.prototype._clear=function(t){var e=this[t];e&&e.removeObserver&&e.removeObserver(this)},e.prototype._wrap=function(t,r){var n=At.call(t),i=t;return null!==i&&G(i)&&"[object Object]"===n&&(t instanceof e||t instanceof o||(i=new e(i,this.prefix+r+".")),i.addObserver(this)),i},e}(I);function Pt(t){return function(e){return this[t]!==e&&(this[t]=e,this.geometryChange()),this}}function Rt(t){return function(){return this[t]}}var Nt=function(t,e){var r=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(t);return function(t,e){for(var r=0;r<e.length;r++){var o=e[r],n=o.charAt(0).toUpperCase()+o.substring(1,o.length);t["set"+n]=Pt(o),t["get"+n]=Rt(o)}}(r.prototype,e),r};function Ft(t){return t&&"function"==typeof t.matrix?t.matrix():t}var Lt=function(t){function e(e,r){t.call(this),this.x=e||0,this.y=r||0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={ZERO:{configurable:!0}};return e.prototype.equals=function(t){return t&&t.x===this.x&&t.y===this.y},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.rotate=function(t,r){var o=e.create(r)||e.ZERO;return this.transform(yt.rotate(t,o.x,o.y))},e.prototype.translate=function(t,e){return this.x+=t,this.y+=e,this.geometryChange(),this},e.prototype.translateWith=function(t){return this.translate(t.x,t.y)},e.prototype.move=function(t,e){return this.x=this.y=0,this.translate(t,e)},e.prototype.scale=function(t,e){return void 0===e&&(e=t),this.x*=t,this.y*=e,this.geometryChange(),this},e.prototype.scaleCopy=function(t,e){return this.clone().scale(t,e)},e.prototype.transform=function(t){var e=Ft(t),r=this.x,o=this.y;return this.x=e.a*r+e.c*o+e.e,this.y=e.b*r+e.d*o+e.f,this.geometryChange(),this},e.prototype.transformCopy=function(t){var e=this.clone();return t&&e.transform(t),e},e.prototype.distanceTo=function(t){var e=this.x-t.x,r=this.y-t.y;return Math.sqrt(e*e+r*r)},e.prototype.round=function(t){return this.x=st(this.x,t),this.y=st(this.y,t),this.geometryChange(),this},e.prototype.toArray=function(t){var e=G(t);return[e?st(this.x,t):this.x,e?st(this.y,t):this.y]},e.prototype.toString=function(t,e){void 0===e&&(e=" ");var r=this.x,o=this.y;return G(t)&&(r=st(r,t),o=st(o,t)),r+e+o},e.create=function(t,r){if(G(t))return t instanceof e?t:1===arguments.length&&2===t.length?new e(t[0],t[1]):new e(t,r)},e.min=function(){for(var t=arguments,r=$,o=$,n=0;n<arguments.length;n++){var i=t[n];r=Math.min(i.x,r),o=Math.min(i.y,o)}return new e(r,o)},e.max=function(){for(var t=arguments,r=X,o=X,n=0;n<arguments.length;n++){var i=t[n];r=Math.max(i.x,r),o=Math.max(i.y,o)}return new e(r,o)},e.minPoint=function(){return new e(X,X)},e.maxPoint=function(){return new e($,$)},r.ZERO.get=function(){return new e(0,0)},Object.defineProperties(e,r),e}(Nt(I,["x","y"])),It=function(t){function e(e,r){t.call(this),this.width=e||0,this.height=r||0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={ZERO:{configurable:!0}};return e.prototype.equals=function(t){return t&&t.width===this.width&&t.height===this.height},e.prototype.clone=function(){return new e(this.width,this.height)},e.prototype.toArray=function(t){var e=G(t);return[e?st(this.width,t):this.width,e?st(this.height,t):this.height]},e.create=function(t,r){if(G(t))return t instanceof e?t:1===arguments.length&&2===t.length?new e(t[0],t[1]):new e(t,r)},r.ZERO.get=function(){return new e(0,0)},Object.defineProperties(e,r),e}(Nt(I,["width","height"])),jt=function(t){function e(e,r,o){void 0===e&&(e=new Lt),void 0===r&&(r=new It),void 0===o&&(o=0),t.call(this),this.setOrigin(e),this.setSize(r),this.setCornerRadius(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.origin.clone(),this.size.clone())},e.prototype.equals=function(t){return t&&t.origin.equals(this.origin)&&t.size.equals(this.size)},e.prototype.setOrigin=function(t){return this._observerField("origin",Lt.create(t)),this.geometryChange(),this},e.prototype.getOrigin=function(){return this.origin},e.prototype.setCornerRadius=function(t){return this.cornerRadius=Array.isArray(t)?t:[t,t],this.geometryChange(),this},e.prototype.getCornerRadius=function(){return this.cornerRadius},e.prototype.setSize=function(t){return this._observerField("size",It.create(t)),this.geometryChange(),this},e.prototype.getSize=function(){return this.size},e.prototype.width=function(){return this.size.width},e.prototype.height=function(){return this.size.height},e.prototype.topLeft=function(){return this.origin.clone()},e.prototype.bottomRight=function(){return this.origin.clone().translate(this.width(),this.height())},e.prototype.topRight=function(){return this.origin.clone().translate(this.width(),0)},e.prototype.bottomLeft=function(){return this.origin.clone().translate(0,this.height())},e.prototype.center=function(){return this.origin.clone().translate(this.width()/2,this.height()/2)},e.prototype.bbox=function(t){var r=this.topLeft().transformCopy(t),o=this.topRight().transformCopy(t),n=this.bottomRight().transformCopy(t),i=this.bottomLeft().transformCopy(t);return e.fromPoints(r,o,n,i)},e.prototype.transformCopy=function(t){return e.fromPoints(this.topLeft().transform(t),this.bottomRight().transform(t))},e.prototype.expand=function(t,e){return void 0===e&&(e=t),this.size.width+=2*t,this.size.height+=2*e,this.origin.translate(-t,-e),this},e.prototype.expandCopy=function(t,e){return this.clone().expand(t,e)},e.prototype.containsPoint=function(t){var e=this.origin,r=this.bottomRight();return!(t.x<e.x||t.y<e.y||r.x<t.x||r.y<t.y)},e.prototype._isOnPath=function(t,e){var r=this.expandCopy(e,e),o=this.expandCopy(-e,-e);return r.containsPoint(t)&&!o.containsPoint(t)},e.fromPoints=function(){var t=Lt.min.apply(null,arguments),r=Lt.max.apply(null,arguments);return new e(t,new It(r.x-t.x,r.y-t.y))},e.union=function(t,r){return e.fromPoints(Lt.min(t.topLeft(),r.topLeft()),Lt.max(t.bottomRight(),r.bottomRight()))},e.intersect=function(t,r){var o={left:t.topLeft().x,top:t.topLeft().y,right:t.bottomRight().x,bottom:t.bottomRight().y},n={left:r.topLeft().x,top:r.topLeft().y,right:r.bottomRight().x,bottom:r.bottomRight().y};if(o.left<=n.right&&n.left<=o.right&&o.top<=n.bottom&&n.top<=o.bottom)return e.fromPoints(new Lt(Math.max(o.left,n.left),Math.max(o.top,n.top)),new Lt(Math.min(o.right,n.right),Math.min(o.bottom,n.bottom)))},e}(I),zt=function(t){function e(e){void 0===e&&(e=yt.unit()),t.call(this),this._matrix=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this._matrix.clone())},e.prototype.equals=function(t){return t&&t._matrix.equals(this._matrix)},e.prototype.translate=function(t,e){return this._matrix=this._matrix.multiplyCopy(yt.translate(t,e)),this._optionsChange(),this},e.prototype.scale=function(t,e,r){void 0===e&&(e=t),void 0===r&&(r=null);var o=r;return o&&(o=Lt.create(o),this._matrix=this._matrix.multiplyCopy(yt.translate(o.x,o.y))),this._matrix=this._matrix.multiplyCopy(yt.scale(t,e)),o&&(this._matrix=this._matrix.multiplyCopy(yt.translate(-o.x,-o.y))),this._optionsChange(),this},e.prototype.rotate=function(t,e){var r=Lt.create(e)||Lt.ZERO;return this._matrix=this._matrix.multiplyCopy(yt.rotate(t,r.x,r.y)),this._optionsChange(),this},e.prototype.multiply=function(t){var e=Ft(t);return this._matrix=this._matrix.multiplyCopy(e),this._optionsChange(),this},e.prototype.matrix=function(t){return t?(this._matrix=t,this._optionsChange(),this):this._matrix},e.prototype._optionsChange=function(){this.optionsChange({field:"transform",value:this})},e}(I);function Bt(t){return null===t?null:t instanceof zt?t:new zt(t)}var Dt={dot:[1.5,3.5],dash:[4,3.5],longdash:[8,3.5],dashdot:[3.5,3.5,1.5,3.5],longdashdot:[8,3.5,1.5,3.5],longdashdotdot:[8,3.5,1.5,3.5,1.5,3.5]},Gt="solid",qt="butt",Ut="Pattern",Ht=function(t){function e(e){t.call(this),this._initOptions(e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={nodeType:{configurable:!0}};return r.nodeType.get=function(){return"Rect"},e.prototype._initOptions=function(t){void 0===t&&(t={});var e=t.clip,r=t.transform;r&&(t.transform=Bt(r)),e&&!e.id&&(e.id=U()),this.options=new Et(t),this.options.addObserver(this)},e.prototype.transform=function(t){if(!G(t))return this.options.get("transform");this.options.set("transform",Bt(t))},e.prototype.parentTransform=function(){for(var t,e=this;e.parent;){var r=(e=e.parent).transform();r&&(t=r.matrix().multiplyCopy(t||yt.unit()))}if(t)return Bt(t)},e.prototype.currentTransform=function(t){void 0===t&&(t=this.parentTransform());var e,r=Ft(this.transform()),o=Ft(t);if(e=r&&o?o.multiplyCopy(r):r||o)return Bt(e)},e.prototype.visible=function(t){return G(t)?(this.options.set("visible",t),this):!1!==this.options.get("visible")},e.prototype.clip=function(t){var e=this.options;return G(t)?(t&&!t.id&&(t.id=U()),e.set("clip",t),this):e.get("clip")},e.prototype.opacity=function(t){return G(t)?(this.options.set("opacity",t),this):at(this.options.get("opacity"),1)},e.prototype.className=function(t){return G(t)?(this.options.set("className",t),this):this.options.get("className")},e.prototype.clippedBBox=function(t){var e=this._clippedBBox(t);if(e){var r=this.clip();return r?jt.intersect(e,r.bbox(t)):e}},e.prototype.containsPoint=function(t,e){if(this.visible()){var r=this.currentTransform(e),o=t;return r&&(o=t.transformCopy(r.matrix().invert())),this._hasFill()&&this._containsPoint(o)||this._isOnPath&&this._hasStroke()&&this._isOnPath(o)}return!1},e.prototype._hasFill=function(){var t=this.options.fill;return t&&(t.nodeType===Ut||!tt(t.color))},e.prototype._hasStroke=function(){var t=this.options.stroke;return t&&t.width>0&&!tt(t.color)},e.prototype._clippedBBox=function(t){return this.bbox(t)},Object.defineProperties(e.prototype,r),e}(I);function $t(t,e,r,o){var n=0,i=0;return o&&(n=Math.atan2(o.c*r,o.a*e),0!==o.b&&(i=Math.atan2(o.d*r,o.b*e))),{x:n,y:i}}var Xt=Math.PI/2,Vt=function(t){function e(e,r){void 0===e&&(e=new Lt),void 0===r&&(r=0),t.call(this),this.setCenter(e),this.setRadius(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setCenter=function(t){return this._observerField("center",Lt.create(t)),this.geometryChange(),this},e.prototype.getCenter=function(){return this.center},e.prototype.equals=function(t){return t&&t.center.equals(this.center)&&t.radius===this.radius},e.prototype.clone=function(){return new e(this.center.clone(),this.radius)},e.prototype.pointAt=function(t){return this._pointAt(it(t))},e.prototype.bbox=function(t){for(var e=$t(this.center,this.radius,this.radius,t),r=Lt.maxPoint(),o=Lt.minPoint(),n=0;n<4;n++){var i=this._pointAt(e.x+n*Xt).transformCopy(t),s=this._pointAt(e.y+n*Xt).transformCopy(t),a=new Lt(i.x,s.y);r=Lt.min(r,a),o=Lt.max(o,a)}return jt.fromPoints(r,o)},e.prototype._pointAt=function(t){var e=this.center,r=this.radius;return new Lt(e.x+r*Math.cos(t),e.y+r*Math.sin(t))},e.prototype.containsPoint=function(t){var e=this.center,r=this.radius;return Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)<=Math.pow(r,2)},e.prototype._isOnPath=function(t,e){var r=this.center,o=this.radius,n=r.distanceTo(t);return o-e<=n&&n<=o+e},e}(Nt(I,["radius"])),Wt=function(t){return function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fill=function(t,e){var r=this.options;if(G(t)){if(t&&"Gradient"!==t.nodeType){var o={color:t};G(e)&&(o.opacity=e),r.set("fill",o)}else r.set("fill",t);return this}return r.get("fill")},e.prototype.stroke=function(t,e,r){return G(t)?(this.options.set("stroke.color",t),G(e)&&this.options.set("stroke.width",e),G(r)&&this.options.set("stroke.opacity",r),this):this.options.get("stroke")},e}(t)},Yt=yt.IDENTITY.toString(),Jt=function(t){return function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bbox=function(t){var e,r=Ft(this.currentTransform(t)),o=r?r.toString():Yt;this._bboxCache&&this._matrixHash===o?e=this._bboxCache.clone():(e=this._bbox(r),this._bboxCache=e?e.clone():null,this._matrixHash=o);var n=this.options.get("stroke.width");return n&&e&&e.expand(n/2),e},e.prototype.geometryChange=function(){delete this._bboxCache,this.trigger("geometryChange",{element:this})},e}(t)};function Zt(t){var e="_"+t;return function(t){return G(t)?(this._observerField(e,t),this.geometryChange(),this):this[e]}}var Kt=function(t,e){void 0===e&&(e=["geometry"]);var r=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(t);return function(t,e){for(var r=0;r<e.length;r++)t[e[r]]=Zt(e[r])}(r.prototype,e),r},Qt=function(t){function e(e,r){void 0===e&&(e=new Vt),void 0===r&&(r={}),t.call(this,r),this.geometry(e),G(this.options.stroke)||this.stroke("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={nodeType:{configurable:!0}};return r.nodeType.get=function(){return"Circle"},e.prototype.rawBBox=function(){return this._geometry.bbox()},e.prototype._bbox=function(t){return this._geometry.bbox(t)},e.prototype._containsPoint=function(t){return this.geometry().containsPoint(t)},e.prototype._isOnPath=function(t){return this.geometry()._isOnPath(t,this.options.stroke.width/2)},Object.defineProperties(e.prototype,r),e}(Wt(Jt(Kt(Ht)))),te=10;function ee(t,e,r){return void 0===r&&(r=te),0===st(Math.abs(t-e),r)}function re(t,e,r){return t<e||ee(t,e,r)}var oe=Math.pow,ne=function(t){function e(e,r){void 0===e&&(e=new Lt),void 0===r&&(r={}),t.call(this),this.setCenter(e),this.radiusX=r.radiusX,this.radiusY=r.radiusY||r.radiusX,this.startAngle=r.startAngle,this.endAngle=r.endAngle,this.anticlockwise=r.anticlockwise||!1,this.xRotation=r.xRotation}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,{radiusX:this.radiusX,radiusY:this.radiusY,startAngle:this.startAngle,endAngle:this.endAngle,anticlockwise:this.anticlockwise})},e.prototype.setCenter=function(t){return this._observerField("center",Lt.create(t)),this.geometryChange(),this},e.prototype.getCenter=function(){return this.center},e.prototype.pointAt=function(t){var e=this.center,r=it(t);return new Lt(e.x+this.radiusX*Math.cos(r),e.y+this.radiusY*Math.sin(r))},e.prototype.curvePoints=function(){var t,e=this.startAngle,r=this.anticlockwise?-1:1,o=[this.pointAt(e)],n=this._arcInterval(),i=n.endAngle-n.startAngle,s=Math.ceil(i/45),a=i/s,h=e;this.xRotation&&(t=Bt().rotate(this.xRotation,this.center));for(var p=1;p<=s;p++){var c=h+r*a,u=this._intervalCurvePoints(h,c,t);o.push(u.cp1,u.cp2,u.p2),h=c}return o},e.prototype.bbox=function(t){for(var e=this._arcInterval(),r=e.startAngle,o=e.endAngle,n=$t(this.center,this.radiusX,this.radiusY,t),i=V(n.x),s=V(n.y),a=this.pointAt(o).transformCopy(t),h=se(i,r),p=se(s,r),c=this.pointAt(r).transformCopy(t),u=Lt.min(c,a),l=Lt.max(c,a);h<o||p<o;){var f=void 0;h<o&&(f=this.pointAt(h).transformCopy(t),h+=90);var d=void 0;p<o&&(d=this.pointAt(p).transformCopy(t),p+=90),c=new Lt(f.x,d.y),u=Lt.min(u,c),l=Lt.max(l,c)}return jt.fromPoints(u,l)},e.prototype._arcInterval=function(){var t=this,e=t.startAngle,r=t.endAngle,o=t.anticlockwise;if(o){var n=e;e=r,r=n}return(e>r||o&&e===r)&&(r+=360),{startAngle:e,endAngle:r}},e.prototype._intervalCurvePoints=function(t,e,r){var o=this.pointAt(t),n=this.pointAt(e),i=this._derivativeAt(t),s=this._derivativeAt(e),a=(it(e)-it(t))/3,h=new Lt(o.x+a*i.x,o.y+a*i.y),p=new Lt(n.x-a*s.x,n.y-a*s.y);return r&&(o.transform(r),n.transform(r),h.transform(r),p.transform(r)),{p1:o,cp1:h,cp2:p,p2:n}},e.prototype._derivativeAt=function(t){var e=it(t);return new Lt(-this.radiusX*Math.sin(e),this.radiusY*Math.cos(e))},e.prototype.containsPoint=function(t){var e,r=this._arcInterval(),o=r.endAngle-r.startAngle,n=this,i=n.center,s=n.radiusX,a=n.radiusY,h=i.distanceTo(t),p=Math.atan2(t.y-i.y,t.x-i.x),c=s*a/Math.sqrt(oe(s,2)*oe(Math.sin(p),2)+oe(a,2)*oe(Math.cos(p),2)),u=this.pointAt(this.startAngle).round(te),l=this.pointAt(this.endAngle).round(te),f=function(t,e,r,o){var n=e.x-t.x,i=o.x-r.x,s=e.y-t.y,a=o.y-r.y,h=t.x-r.x,p=t.y-r.y,c=n*a-i*s,u=(n*p-s*h)/c,l=(i*p-a*h)/c;if(u>=0&&u<=1&&l>=0&&l<=1)return new Lt(t.x+l*n,t.y+l*s)}(i,t.round(te),u,l);if(o<180)e=f&&re(i.distanceTo(f),h)&&re(h,c);else{var d=ie(i.x,i.y,s,a,t.x,t.y);360!==d&&(d=(360+d)%360);var y=r.startAngle<=d&&d<=r.endAngle;e=y&&re(h,c)||!y&&(!f||f.equals(t))}return e},e.prototype._isOnPath=function(t,e){var r=this._arcInterval(),o=this.center,n=ie(o.x,o.y,this.radiusX,this.radiusY,t.x,t.y);return 360!==n&&(n=(360+n)%360),r.startAngle<=n&&n<=r.endAngle&&this.pointAt(n).distanceTo(t)<=e},e.fromPoints=function(t,r,o,n,i,s,a){var h=function(t){var e=t.x1,r=t.y1,o=t.x2,n=t.y2,i=t.rx,s=t.ry,a=t.largeArc,h=t.swipe,p=t.rotation;void 0===p&&(p=0);var c=it(p),u=Math.cos(c),l=Math.sin(c),f=u*(e-o)/2+l*(r-n)/2,d=-l*(e-o)/2+u*(r-n)/2,y=a!==h?1:-1,g=Math.pow(f,2),m=Math.pow(d,2),v=Math.pow(i,2),_=Math.pow(s,2),b=g/v+m/_;b>1&&(i*=b=Math.sqrt(g/v+m/_),v=Math.pow(i,2),s*=b,_=Math.pow(s,2));var w=y*Math.sqrt((v*_-v*m-_*g)/(v*m+_*g));isNaN(w)&&(w=0);var x=w*(i*d)/s,S=s*f*-w/i,C=u*x-l*S+(e+o)/2,k=l*x+u*S+(r+n)/2,T=(f-x)/i,O=(d-S)/s,M=-(f+x)/i,A=-(d+S)/s,E=(O>=0?1:-1)*V(Math.acos(T/Math.sqrt(T*T+O*O))),P=st((T*M+O*A)/(Math.sqrt(T*T+O*O)*Math.sqrt(M*M+A*A)),10),R=(T*A-O*M>=0?1:-1)*V(Math.acos(P));!h&&R>0&&(R-=360);h&&R<0&&(R+=360);var N=E+R,F=N>=0?1:-1;return N=Math.abs(N)%360*F,{center:new Lt(C,k),startAngle:E,endAngle:N,radiusX:i,radiusY:s,xRotation:p}}({x1:t.x,y1:t.y,x2:r.x,y2:r.y,rx:o,ry:n,largeArc:i,swipe:s,rotation:a});return new e(h.center,{startAngle:h.startAngle,endAngle:h.endAngle,radiusX:h.radiusX,radiusY:h.radiusY,xRotation:h.xRotation,anticlockwise:0===s})},e}(Nt(I,["radiusX","radiusY","startAngle","endAngle","anticlockwise"]));function ie(t,e,r,o,n,i){var s=st((n-t)/r,3),a=st((i-e)/o,3);return st(V(Math.atan2(a,s)))}function se(t,e){for(var r=t;r<e;)r+=90;return r}var ae=[].push,he=[].pop,pe=[].splice,ce=[].shift,ue=[].slice,le=[].unshift,fe=function(t){function e(e){void 0===e&&(e=[]),t.call(this),this.length=0,this._splice(0,e.length,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.elements=function(t){return t?(this._splice(0,this.length,t),this._change(),this):this.slice(0)},e.prototype.push=function(){var t=arguments,e=ae.apply(this,t);return this._add(t),e},e.prototype.slice=function(){return ue.call(this)},e.prototype.pop=function(){var t=this.length,e=he.apply(this);return t&&this._remove([e]),e},e.prototype.splice=function(t,e){var r=ue.call(arguments,2),o=this._splice(t,e,r);return this._change(),o},e.prototype.shift=function(){var t=this.length,e=ce.apply(this);return t&&this._remove([e]),e},e.prototype.unshift=function(){var t=arguments,e=le.apply(this,t);return this._add(t),e},e.prototype.indexOf=function(t){for(var e=this.length,r=0;r<e;r++)if(this[r]===t)return r;return-1},e.prototype._splice=function(t,e,r){var o=pe.apply(this,[t,e].concat(r));return this._clearObserver(o),this._setObserver(r),o},e.prototype._add=function(t){this._setObserver(t),this._change()},e.prototype._remove=function(t){this._clearObserver(t),this._change()},e.prototype._setObserver=function(t){for(var e=0;e<t.length;e++)t[e].addObserver(this)},e.prototype._clearObserver=function(t){for(var e=0;e<t.length;e++)t[e].removeObserver(this)},e.prototype._change=function(){},e}(I),de=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._change=function(){this.geometryChange()},e}(fe);function ye(t,e,r){var o=V(Math.atan2(e.y-t.y,e.x-t.x));return r.transformCopy(Bt().rotate(-o,t)).x<t.x}function ge(t,e,r){var o=1-t;return Math.pow(o,3)*r[0][e]+3*Math.pow(o,2)*t*r[1][e]+3*Math.pow(t,2)*o*r[2][e]+Math.pow(t,3)*r[3][e]}function me(t,e){return[-t[0][e]+3*t[1][e]-3*t[2][e]+t[3][e],3*(t[0][e]-2*t[1][e]+t[2][e]),3*(-t[0][e]+t[1][e]),t[0][e]]}var ve=function(t){function e(e,r){void 0===e&&(e=0),void 0===r&&(r=0),t.call(this),this.real=e,this.img=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.add=function(t){return new e(st(this.real+t.real,te),st(this.img+t.img,te))},e.prototype.addConstant=function(t){return new e(this.real+t,this.img)},e.prototype.negate=function(){return new e(-this.real,-this.img)},e.prototype.multiply=function(t){return new e(this.real*t.real-this.img*t.img,this.real*t.img+this.img*t.real)},e.prototype.multiplyConstant=function(t){return new e(this.real*t,this.img*t)},e.prototype.nthRoot=function(t){var r=Math.atan2(this.img,this.real),o=Math.sqrt(Math.pow(this.img,2)+Math.pow(this.real,2)),n=Math.pow(o,1/t);return new e(n*Math.cos(r/t),n*Math.sin(r/t))},e.prototype.equals=function(t){return this.real===t.real&&this.img===t.img},e.prototype.isReal=function(){return 0===this.img},e}(o);function _e(t){return t<0?-1:1}function be(t,e,r,o){if(0===t)return function(t,e,r){var o=Math.sqrt(Math.pow(e,2)-4*t*r);return[(-e+o)/(2*t),(-e-o)/(2*t)]}(e,r,o);var n,i,s,a,h,p,c,u=(3*t*r-Math.pow(e,2))/(3*Math.pow(t,2)),l=(2*Math.pow(e,3)-9*t*e*r+27*Math.pow(t,2)*o)/(27*Math.pow(t,3)),f=Math.pow(u/3,3)+Math.pow(l/2,2),d=new ve(0,1),y=-e/(3*t);f<0?(n=new ve(-l/2,Math.sqrt(-f)).nthRoot(3),i=new ve(-l/2,-Math.sqrt(-f)).nthRoot(3)):(n=-l/2+Math.sqrt(f),n=new ve(_e(n)*Math.pow(Math.abs(n),1/3)),i=-l/2-Math.sqrt(f),i=new ve(_e(i)*Math.pow(Math.abs(i),1/3))),s=n.add(i),p=n.add(i).multiplyConstant(-.5),c=n.add(i.negate()).multiplyConstant(Math.sqrt(3)/2),a=p.add(d.multiply(c)),h=p.add(d.negate().multiply(c));var g=[];return s.isReal()&&g.push(st(s.real+y,te)),a.isReal()&&g.push(st(a.real+y,te)),h.isReal()&&g.push(st(h.real+y,te)),g}function we(t,e,r,o,n){for(var i,s=me(t,o),a=be(s[0],s[1],s[2],s[3]-e[o]),h=0;h<a.length;h++)if(0<=a[h]&&a[h]<=1&&(i=ge(a[h],r,t),Math.abs(i-e[r])<=n))return!0}function xe(t,e,r){var o;if(t.x!==e.x){var n=Math.min(t.x,e.x),i=Math.max(t.x,e.x),s=Math.min(t.y,e.y),a=Math.max(t.y,e.y),h=n<=r.x&&r.x<i;o=s===a?r.y<=s&&h:h&&(a-s)*((t.x-e.x)*(t.y-e.y)>0?r.x-n:i-r.x)/(i-n)+s-r.y>=0}return o?1:0}function Se(t){var e="_"+t;return function(t){return G(t)?(this._observerField(e,Lt.create(t)),this.geometryChange(),this):this[e]}}var Ce=function(t,e){var r=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(t);return function(t,e){for(var r=0;r<e.length;r++)t[e[r]]=Se(e[r])}(r.prototype,e),r},ke=function(t){function e(e,r,o){t.call(this),this.anchor(e||new Lt),this.controlIn(r),this.controlOut(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bboxTo=function(t,e){var r=this.anchor().transformCopy(e),o=t.anchor().transformCopy(e);return this.controlOut()&&t.controlIn()?this._curveBoundingBox(r,this.controlOut().transformCopy(e),t.controlIn().transformCopy(e),o):this._lineBoundingBox(r,o)},e.prototype._lineBoundingBox=function(t,e){return jt.fromPoints(t,e)},e.prototype._curveBoundingBox=function(t,e,r,o){var n=[t,e,r,o],i=this._curveExtremesFor(n,"x"),s=this._curveExtremesFor(n,"y"),a=Te([i.min,i.max,t.x,o.x]),h=Te([s.min,s.max,t.y,o.y]);return jt.fromPoints(new Lt(a.min,h.min),new Lt(a.max,h.max))},e.prototype._curveExtremesFor=function(t,e){var r=this._curveExtremes(t[0][e],t[1][e],t[2][e],t[3][e]);return{min:ge(r.min,e,t),max:ge(r.max,e,t)}},e.prototype._curveExtremes=function(t,e,r,o){var n=t-3*e+3*r-o,i=-2*(t-2*e+r),s=t-e,a=Math.sqrt(i*i-4*n*s),h=0,p=1;0===n?0!==i&&(h=p=-s/i):isNaN(a)||(h=(-i+a)/(2*n),p=(-i-a)/(2*n));var c=Math.max(Math.min(h,p),0);(c<0||c>1)&&(c=0);var u=Math.min(Math.max(h,p),1);return(u>1||u<0)&&(u=1),{min:c,max:u}},e.prototype._intersectionsTo=function(t,e){var r;return r=this.controlOut()&&t.controlIn()?function(t,e,r){for(var o,n=me(t,"x"),i=be(n[0],n[1],n[2],n[3]-e.x),s=0,a=0;a<i.length;a++)(ee(o=ge(i[a],"y",t),e.y)||o>e.y)&&((0===i[a]||1===i[a])&&r.bottomRight().x>e.x||0<i[a]&&i[a]<1)&&s++;return s}([this.anchor(),this.controlOut(),t.controlIn(),t.anchor()],e,this.bboxTo(t)):xe(this.anchor(),t.anchor(),e),r},e.prototype._isOnCurveTo=function(t,e,r,o){if(this.bboxTo(t).expand(r,r).containsPoint(e)){var n=this.anchor(),i=this.controlOut(),s=t.controlIn(),a=t.anchor();if("start"===o&&n.distanceTo(e)<=r)return!ye(n,i,e);if("end"===o&&a.distanceTo(e)<=r)return!ye(a,s,e);var h=[n,i,s,a];if(we(h,e,"x","y",r)||we(h,e,"y","x",r))return!0;var p=Bt().rotate(45,e),c=[n.transformCopy(p),i.transformCopy(p),s.transformCopy(p),a.transformCopy(p)];return we(c,e,"x","y",r)||we(c,e,"y","x",r)}},e.prototype._isOnLineTo=function(t,e,r){var o=this.anchor(),n=t.anchor(),i=V(Math.atan2(n.y-o.y,n.x-o.x));return new jt([o.x,o.y-r/2],[o.distanceTo(n),r]).containsPoint(e.transformCopy(Bt().rotate(-i,o