jmgraph 3.2.0 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/jmgraph.js CHANGED
@@ -2548,6 +2548,8 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
2548
2548
  if (typeof wx != 'undefined' && wx.canIUse && wx.canIUse('canvas')) {
2549
2549
  if (typeof canvas === 'string') canvas = wx.createSelectorQuery().select('#' + canvas);
2550
2550
  _this.isWXMiniApp = true; // 微信小程序平台
2551
+
2552
+ _this.container = canvas;
2551
2553
  } else {
2552
2554
  if (typeof canvas === 'string' && typeof document != 'undefined') {
2553
2555
  canvas = document.getElementById(canvas);
@@ -3892,10 +3894,13 @@ var jmUtils = /*#__PURE__*/function () {
3892
3894
  if (source.__proto__) target.__proto__ = source.__proto__;
3893
3895
 
3894
3896
  for (var k in source) {
3895
- if (k === 'constructor') continue; // 如果不是对象和空,则采用target的属性
3897
+ if (k === 'constructor') continue;
3898
+ var v = source[k]; // 不复制页面元素和class对象
3899
+
3900
+ if (v && (v.tagName || v.getContext)) continue; // 如果不是对象和空,则采用target的属性
3896
3901
 
3897
3902
  if (_typeof(target[k]) === 'object' || typeof target[k] === 'undefined') {
3898
- target[k] = this.clone(source[k], target[k], deep, copyHandler, deepIndex);
3903
+ target[k] = this.clone(v, target[k], deep, copyHandler, deepIndex);
3899
3904
  }
3900
3905
  }
3901
3906
 
@@ -1 +1 @@
1
- !function(i){var t;t=function(t,e,n){var r=function r(i,o,s){function u(e,t){if(!o[e]){if(!i[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(c)return c(e,!0);throw(n=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",n}n=o[e]={exports:{}},i[e][0].call(n.exports,function(t){return u(i[e][1][t]||t)},n,n.exports,r,i,o,s)}return o[e].exports}for(var c="function"==typeof require&&require,t=0;t<s.length;t++)u(s[t]);return u}({1:[function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"jmArc",{enumerable:!0,get:function(){return i.jmArc}}),Object.defineProperty(n,"jmArrow",{enumerable:!0,get:function(){return o.jmArrow}}),Object.defineProperty(n,"jmBezier",{enumerable:!0,get:function(){return s.jmBezier}}),Object.defineProperty(n,"jmCircle",{enumerable:!0,get:function(){return u.jmCircle}}),Object.defineProperty(n,"jmHArc",{enumerable:!0,get:function(){return c.jmHArc}}),Object.defineProperty(n,"jmLine",{enumerable:!0,get:function(){return a.jmLine}}),Object.defineProperty(n,"jmPrismatic",{enumerable:!0,get:function(){return f.jmPrismatic}}),Object.defineProperty(n,"jmRect",{enumerable:!0,get:function(){return h.jmRect}}),Object.defineProperty(n,"jmArrowLine",{enumerable:!0,get:function(){return l.jmArrowLine}}),Object.defineProperty(n,"jmImage",{enumerable:!0,get:function(){return p.jmImage}}),Object.defineProperty(n,"jmLabel",{enumerable:!0,get:function(){return y.jmLabel}}),Object.defineProperty(n,"jmResize",{enumerable:!0,get:function(){return d.jmResize}}),Object.defineProperty(n,"jmUtils",{enumerable:!0,get:function(){return m.jmUtils}}),Object.defineProperty(n,"jmList",{enumerable:!0,get:function(){return m.jmList}}),Object.defineProperty(n,"jmShadow",{enumerable:!0,get:function(){return m.jmShadow}}),Object.defineProperty(n,"jmGradient",{enumerable:!0,get:function(){return m.jmGradient}}),Object.defineProperty(n,"jmControl",{enumerable:!0,get:function(){return m.jmControl}}),Object.defineProperty(n,"jmPath",{enumerable:!0,get:function(){return m.jmPath}}),n.create=n.jmGraph=n.default=void 0;var i=t("./src/shapes/jmArc.js"),o=t("./src/shapes/jmArrow.js"),s=t("./src/shapes/jmBezier.js"),u=t("./src/shapes/jmCircle.js"),c=t("./src/shapes/jmHArc.js"),a=t("./src/shapes/jmLine.js"),f=t("./src/shapes/jmPrismatic.js"),h=t("./src/shapes/jmRect.js"),l=t("./src/shapes/jmArrowLine.js"),p=t("./src/shapes/jmImage.js"),y=t("./src/shapes/jmLabel.js"),d=t("./src/shapes/jmResize.js"),m=t("./src/core/jmGraph.js");function v(t,e,n){return(v=j()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);r=new(Function.bind.apply(t,r));return n&&b(r,n.prototype),r}).apply(null,arguments)}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function g(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}function j(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function w(t){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var _={arc:i.jmArc,arrow:o.jmArrow,bezier:s.jmBezier,circle:u.jmCircle,harc:c.jmHArc,line:a.jmLine,prismatic:f.jmPrismatic,rect:h.jmRect,arrowline:l.jmArrowLine,image:p.jmImage,img:p.jmImage,label:y.jmLabel,resize:d.jmResize},x=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}(s,m.jmGraph);var n,r,e=(n=s,r=j(),function(){var t,e=w(n);return g(this,r?(t=w(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))});function s(r,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s);var t=this instanceof s?this.constructor:void 0;return(i=Object.assign({},i)).shapes=Object.assign(_,i.shapes||{}),t&&t.prototype instanceof m.jmGraph?("function"==typeof i&&(o=i,i={}),e.call(this,r,i,o)):g(void 0,new Promise(function(t,e){var n=new s(r,i,o);t&&t(n)}))}return s}();n.jmGraph=n.default=x;n.create=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return v(x,e)}},{"./src/core/jmGraph.js":5,"./src/shapes/jmArc.js":12,"./src/shapes/jmArrow.js":13,"./src/shapes/jmArrowLine.js":14,"./src/shapes/jmBezier.js":15,"./src/shapes/jmCircle.js":16,"./src/shapes/jmHArc.js":17,"./src/shapes/jmImage.js":18,"./src/shapes/jmLabel.js":19,"./src/shapes/jmLine.js":20,"./src/shapes/jmPrismatic.js":21,"./src/shapes/jmRect.js":22,"./src/shapes/jmResize.js":23}],2:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmControl=n.default=void 0;var h=t("./jmUtils.js"),o=t("./jmList.js"),l=t("./jmGradient.js"),p=t("./jmShadow.js"),s=t("./jmProperty.js");function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,e=function(){};return{s:e,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=i(n);return function(t,e){{if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=i(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var m={fill:"fillStyle",stroke:"strokeStyle","shadow.blur":"shadowBlur","shadow.x":"shadowOffsetX","shadow.y":"shadowOffsetY","shadow.color":"shadowColor",lineWidth:"lineWidth",miterLimit:"miterLimit",fillStyle:"fillStyle",strokeStyle:"strokeStyle",font:"font",opacity:"globalAlpha",textAlign:"textAlign",textBaseline:"textBaseline",shadowBlur:"shadowBlur",shadowOffsetX:"shadowOffsetX",shadowOffsetY:"shadowOffsetY",shadowColor:"shadowColor",lineJoin:"lineJoin",lineCap:"lineCap"},t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(i,s.jmProperty);var t,e,n,r=d(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t=t||{},(n=r.call(this)).__pro("type",e||(this instanceof i?this.constructor:void 0).name),n.style=t&&t.style?t.style:{},n.width=t.width||0,n.height=t.height||0,t.position&&(n.position=t.position),n.graph=t.graph||null,n.zIndex=t.zIndex||0,n.interactive=void 0===t.interactive||t.interactive,n.initializing(),n.on=n.bind,n.option=t,n}return t=i,(e=[{key:"type",get:function(){return this.__pro("type")}},{key:"context",get:function(){var t=this.__pro("context");if(t)return t;if(this.is("jmGraph")&&this.canvas&&this.canvas.getContext)return this.context=this.canvas.getContext("2d");t=this.graph;return t?t.context:t.canvas.getContext("2d")},set:function(t){return this.__pro("context",t)}},{key:"style",get:function(){return this.__pro("style")||this.__pro("style",{})},set:function(t){return this.needUpdate=!0,this.__pro("style",t)}},{key:"visible",get:function(){var t=this.__pro("visible");return t=void 0===t?this.__pro("visible",!0):t},set:function(t){return this.needUpdate=!0,this.__pro("visible",t)}},{key:"interactive",get:function(){return this.__pro("interactive")},set:function(t){return this.__pro("interactive",t)}},{key:"children",get:function(){return this.__pro("children")||this.__pro("children",new o.jmList)},set:function(t){return this.needUpdate=!0,this.__pro("children",t)}},{key:"width",get:function(){var t=this.__pro("width");return t=void 0===t?this.__pro("width",0):t},set:function(t){return this.needUpdate=!0,this.__pro("width",t)}},{key:"height",get:function(){var t=this.__pro("height");return t=void 0===t?this.__pro("height",0):t},set:function(t){return this.needUpdate=!0,this.__pro("height",t)}},{key:"zIndex",get:function(){return this.__pro("zIndex")||this.__pro("zIndex",0)},set:function(t){return this.needUpdate=!0,this.__pro("zIndex",t),this.children.sort(),this.needUpdate=!0,t}},{key:"cursor",get:function(){var t=this.graph;if(t)return t.css("cursor")},set:function(t){var e=this.graph;e&&e.css("cursor",t)}},{key:"initializing",value:function(){var e=this;this.children=this.children||new o.jmList;var n=this.children.add;this.children.add=function(t){if("object"===y(t))return t.parent&&t.parent!=e&&t.parent.children&&t.parent.children.remove(t),t.parent=e,this.contain(t)&&this.oremove(t),n.call(this,t),t.emit("add",t),e.needUpdate=!0,e.graph&&(t.graph=e.graph),this.sort(),t},this.children.oremove=this.children.remove,this.children.remove=function(t){"object"===y(t)&&(t.parent=null,t.graph=null,t.remove(!0),this.oremove(t),e.needUpdate=!0)},this.children.sort=function(){var t,r={};for(t in this.each(function(t,e){var n;e&&(!(n=e.zIndex)&&e.style&&e.style.zIndex&&(n=Number(e.style.zIndex),isNaN(n)&&(n=e.style.zIndex||0)),(r[n]||(r[n]=[])).push(e))}),this.splice(0,this.length),r)n.call(this,r[t])},this.children.clear=function(){this.each(function(t,e){this.remove(e)},!0)},this.needUpdate=!0}},{key:"setStyle",value:function(t){var f=this;if(t=t||h.jmUtils.clone(this.style,!0)){var e,n,r=function t(e,n,r){if(e){if("function"==typeof(u=e))try{u=u.call(f)}catch(t){return void console.warn(t)}var i=y(u),r=m[r||n];if(u instanceof l.jmGradient||"string"==i&&-1<u.indexOf("-gradient"))t((u="string"==i&&-1<u.indexOf("-gradient")?new l.jmGradient(u):u).toGradient(f),r||n);else if(r)"string"==i&&-1<["fillStyle","strokeStyle","shadowColor"].indexOf(r)&&(u=h.jmUtils.toColor(u)),f.context[r]=u;else switch(n){case"shadow":if("string"==i){t(new p.jmShadow(u),n);break}for(var o in u)t(u[o],o,n+"."+o);break;case"translate":f.context.translate(u.x,u.y);break;case"rotation":if(!u.angle)break;var s,u,c=0,a=0;u.point&&(s=f.absoluteBounds||f.getAbsoluteBounds(),c=(u=f.getRotation(u)).rotateX+s.left,a=u.rotateY+s.top),0==c&&0==a||f.context.translate(c,a),f.context.rotate(u.angle),0==c&&0==a||f.context.translate(-c,-a);break;case"transform":Array.isArray(u)?f.context.transform.apply(f.context,u):"object"==y(u)&&f.context.transform(u.scaleX,u.skewX,u.skewY,u.scaleY,u.offsetX,u.offsetY);break;case"cursor":f.cursor=u}}};for(e in this.translate&&r(this.translate,"translate"),this.transform&&r(this.transform,"transform"),t)"constructor"!==e&&("string"==(n=y(t[e]))&&-1<t[e].indexOf("-gradient")?t[e]=new l.jmGradient(t[e]):"string"==n&&"shadow"==e&&(t[e]=new p.jmShadow(t[e])),r(t[e],e))}}},{key:"getBounds",value:function(t){if(this.bounds&&!t)return this.bounds;var e={};if("jmGraph"==this.type&&this.canvas)"function"==typeof this.canvas.width?e.right=this.canvas.width():this.width&&(e.right=this.width),"function"==typeof this.canvas.height?e.bottom=this.canvas.height():this.height&&(e.bottom=this.height);else if(this.points&&0<this.points.length)for(var n in this.points){n=this.points[n];(void 0===e.left||e.left>n.x)&&(e.left=n.x),(void 0===e.top||e.top>n.y)&&(e.top=n.y),(void 0===e.right||e.right<n.x)&&(e.right=n.x),(void 0===e.bottom||e.bottom<n.y)&&(e.bottom=n.y)}else!this.getLocation||(t=this.getLocation())&&(e.left=t.left,e.top=t.top,e.right=t.left+t.width,e.bottom=t.top+t.height);return e.left||(e.left=0),e.top||(e.top=0),e.right||(e.right=0),e.bottom||(e.bottom=0),e.width=e.right-e.left,e.height=e.bottom-e.top,this.bounds=e}},{key:"getLocation",value:function(){var t=this.location={left:0,top:0,width:0,height:0};t.position="function"==typeof this.position?this.position():h.jmUtils.clone(this.position),t.center=this.center&&"function"==typeof this.center?this.center():h.jmUtils.clone(this.center),t.start=this.start&&"function"==typeof this.start?this.start():h.jmUtils.clone(this.start),t.end=this.end&&"function"==typeof this.end?this.end():h.jmUtils.clone(this.end),t.radius=this.radius,t.width=this.width,t.height=this.height;var e=h.jmUtils.clone(this.style.margin,{});if(e.left=e.left||0,e.top=e.top||0,e.right=e.right||0,e.bottom=e.bottom||0,t.position?(t.left=t.position.x,t.top=t.position.y):(t.left=e.left,t.top=e.top),!this.parent)return t;e=this.parent.getBounds();return h.jmUtils.checkPercent(t.left)&&(t.left=h.jmUtils.percentToNumber(t.left)*e.width),h.jmUtils.checkPercent(t.top)&&(t.top=h.jmUtils.percentToNumber(t.top)*e.height),h.jmUtils.checkPercent(t.width)&&(t.width=h.jmUtils.percentToNumber(t.width)*e.width),h.jmUtils.checkPercent(t.height)&&(t.height=h.jmUtils.percentToNumber(t.height)*e.height),t.center&&(h.jmUtils.checkPercent(t.center.x)&&(t.center.x=h.jmUtils.percentToNumber(t.center.x)*e.width),h.jmUtils.checkPercent(t.center.y)&&(t.center.y=h.jmUtils.percentToNumber(t.center.y)*e.height)),t.radius&&h.jmUtils.checkPercent(t.radius)&&(t.radius=h.jmUtils.percentToNumber(t.radius)*Math.min(e.width,e.height)),t}},{key:"getRotation",value:function(t){var e;return(t=t||this.style.rotation)?(e=this.getBounds(),t.rotateX=t.point.x,h.jmUtils.checkPercent(t.rotateX)&&(t.rotateX=h.jmUtils.percentToNumber(t.rotateX)*e.width),t.rotateY=t.point.y,h.jmUtils.checkPercent(t.rotateY)&&(t.rotateY=h.jmUtils.percentToNumber(t.rotateY)*e.height)):(t=this.parent&&this.parent.getRotation?this.parent.getRotation():null)&&(e=this.getBounds(),t.rotateX-=e.left,t.rotateY-=e.top),t}},{key:"remove",value:function(){this.parent&&this.parent.children.remove(this)}},{key:"offset",value:function(t,e,n,r){n=!1!==n;var i=this.getLocation(!0),o=!1;if(i.position&&(i.left+=t,i.top+=e,this.position.x=i.left,this.position.y=i.top,o=!0),i.center&&(this.center.x=i.center.x+t,this.center.y=i.center.y+e,o=!0),i.start&&"object"==y(i.start)&&(this.start.x=i.start.x+t,this.start.y=i.start.y+e,o=!0),i.end&&"object"==y(i.end)&&(this.end.x=i.end.x+t,this.end.y=i.end.y+e,o=!0),0==o&&this.cpoints){var s=(this.cpoints,this.cpoints);if(s){for(var u=s.length,c=0;c<u;c++)s[c].x+=t,s[c].y+=e;o=!0}}if(0==o&&this.points){for(var a=this.points.length,f=0;f<a;f++)this.points[f].x+=t,this.points[f].y+=e;o=!0}this.emit("move",{offsetX:t,offsetY:e,trans:n,evt:r}),this.needUpdate=!0}},{key:"rotate",value:function(t,e){this.style.rotation={angle:t,point:e},this.needUpdate=!0}},{key:"getAbsoluteBounds",value:function(){var t=this.getBounds();if(this.parent&&this.parent.absoluteBounds){var e=this.parent.absoluteBounds||this.parent.getAbsoluteBounds();return{left:e.left+t.left,top:e.top+t.top,right:e.left+t.right,bottom:e.top+t.bottom,width:t.width,height:t.height}}return t}},{key:"beginDraw",value:function(){this.getLocation(!0),this.context.beginPath()}},{key:"endDraw",value:function(){this.style.close&&this.context.closePath(),this.style.fill&&this.context.fill(),!this.style.stroke&&this.style.fill||this.context.stroke(),this.needUpdate=!1}},{key:"draw",value:function(){if(this.points&&0<this.points.length){var t=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds;this.context.moveTo(this.points[0].x+t.left,this.points[0].y+t.top);for(var e=this.points.length,n=1;n<e;n++){var r=this.points[n];r.m?this.context.moveTo(r.x+t.left,r.y+t.top):this.context.lineTo(r.x+t.left,r.y+t.top)}}}},{key:"paint",value:function(t){!1!==t&&!1!==this.visible&&(this.initPoints&&this.initPoints(),this.bounds=null,this.absoluteBounds=this.getAbsoluteBounds(),t=!0,!this.is("jmGraph")&&this.graph&&(this.absoluteBounds.left>=this.graph.width||this.absoluteBounds.top>=this.graph.height||this.absoluteBounds.right<=0||this.absoluteBounds.bottom<=0)&&(t=!1),this.context.save(),this.emit("beginDraw",this),this.setStyle(),t&&this.beginDraw&&this.beginDraw(),t&&this.draw&&this.draw(),t&&this.endDraw&&this.endDraw(),this.children&&this.children.each(function(t,e){e&&e.paint&&e.paint()}),this.emit("endDraw",this),this.context.restore(),this.needUpdate=!1)}},{key:"getEvent",value:function(t){return this.__events?this.__events[t]:null}},{key:"bind",value:function(t,e){if(t&&-1<t.indexOf(" ")){var n,r=u(t=t.split(" "));try{for(r.s();!(n=r.n()).done;){var i=n.value;i&&this.bind(i,e)}}catch(t){r.e(t)}finally{r.f()}}else{t=this.getEvent(t)||function(t,e){return this.__events||(this.__events={}),this.__events[t]=e}.call(this,t,new o.jmList);t.contain(e)||t.add(e)}}},{key:"unbind",value:function(t,e){if(t&&-1<t.indexOf(" ")){var n,r=u(t=t.split(" "));try{for(r.s();!(n=r.n()).done;){var i=n.value;i&&this.unbind(i,e)}}catch(t){r.e(t)}finally{r.f()}}else{t=this.getEvent(t);t&&(e?t.remove(e):t.clear())}}},{key:"emit",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.runEventHandle(e[0],e.slice(1)),this}},{key:"runEventHandle",value:function(t,n){var r,t=this.getEvent(t);return t&&(r=this,Array.isArray(n)||(n=[n]),t.each(function(t,e){!1===e.apply(r,n)&&(n.cancel=!0)})),n.cancel}},{key:"checkPoint",value:function(t,e){if("jmGraph"==this.type){var n=this.getPosition(),r=n.left+this.width,i=n.top+this.height;return t.pageX>r||t.pageX<n.left?!1:!(t.pageY>i||t.pageY<n.top)}var i=this.getBounds(),n=this.getRotation(),o=this.points;if(o&&o.length||((o=[]).push({x:i.left,y:i.top}),o.push({x:i.right,y:i.top}),o.push({x:i.right,y:i.bottom}),o.push({x:i.left,y:i.bottom}),o.push({x:i.left,y:i.top})),e=Number(e||this.style.touchPadding||this.style.lineWidth||1),o&&o.length){if(n&&0!=n.angle&&(o=h.jmUtils.clone(o,!0),o=h.jmUtils.rotatePoints(o,{x:n.rotateX+i.left,y:n.rotateY+i.top},n.angle)),2<o.length&&(!this.style.fill||this.style.stroke)){for(var s=0,u=o.length,c=s+1;c<=u;c=++s+1)if(c==u){if(this.style.close)if(h.jmUtils.pointInPolygon(t,[o[s],o[0]],e))return!0}else if(h.jmUtils.pointInPolygon(t,[o[s],o[c]],e))return!0;if(!this.style.fill)return!1}return h.jmUtils.pointInPolygon(t,o,e)}return!(t.x>i.right||t.x<i.left)&&!(t.y>i.bottom||t.y<i.top)}},{key:"raiseEvent",value:function(n,r){if(!1!==this.visible){var t;r.position||(t=this.graph,e=r.srcElement||r.target,t=h.jmUtils.getEventPosition(r,t.scaleSize),r={position:t,button:0==r.button||t.isTouch?1:r.button,keyCode:r.keyCode||r.charCode||r.which,ctrlKey:r.ctrlKey,cancel:!1,event:r,srcElement:e}),r.path=r.path||[];var i=!1;if(this.children&&this.children.each(function(t,e){if(!0!==r.cancel&&(i=!1===e.raiseEvent(n,r)||i))return!1},!0),i)return!1;var e=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds;if(!e)return!1;r.position.x=r.position.offsetX-e.left,r.position.y=r.position.offsetY-e.top;e=!1!==this.interactive&&this.checkPoint(r.position);return e?(r.target||(r.target=this),this.runEventAndPopEvent(n,r),this.focused||"mousemove"!==n&&"touchmove"!==n||(this.focused=!0,this.raiseEvent("mousemove"===n?"mouseover":"touchover",r))):!1===this.interactive||e||!this.focused||"mousemove"!==n&&"touchmove"!==n||(this.focused=!1,this.runEventHandle("mousemove"===n?"mouseleave":"touchleave",r)),!1===r.cancel}}},{key:"runEventAndPopEvent",value:function(t,e){!0!==e.cancel&&(e.path.push(this),this.runEventHandle(t,e))}},{key:"clearEvents",value:function(t){t=this.getEvent(t);t&&t.clear}},{key:"findParent",value:function(t){if("string"==typeof t){if(this.type==t)return this}else if(this.is(t))return this;return this.parent?this.parent.findParent(t):null}},{key:"canMove",value:function(t,e){var s;return this.__mvMonitor||(this.__mvMonitor={},this.__mvMonitor.mouseDown=!1,this.__mvMonitor.curposition={x:0,y:0},(s=this).__mvMonitor.mv=function(t){var e=s;if(e.__mvMonitor.mouseDown){e.parent.bounds=null;var n,r=e.parent.getAbsoluteBounds(),i=t.position.offsetX-e.__mvMonitor.curposition.x,o=t.position.offsetY-e.__mvMonitor.curposition.y;return e.lockSide&&(n=e.bounds||e.getAbsoluteBounds(),(n=h.jmUtils.checkOutSide(r,n,{x:i,y:o})).left<0?e.lockSide.left&&(i-=n.left):0<n.right&&e.lockSide.right&&(i-=n.right),n.top<0?e.lockSide.top&&(o-=n.top):0<n.bottom&&e.lockSide.bottom&&(o-=n.bottom)),(i||o)&&(e.offset(i,o,!0,t),e.__mvMonitor.curposition.x=t.position.offsetX,e.__mvMonitor.curposition.y=t.position.offsetY),!1}},this.__mvMonitor.mu=function(t){var e=s;e.__mvMonitor.mouseDown&&(e.__mvMonitor.mouseDown=!1,e.emit("moveend",{position:e.__mvMonitor.curposition}))},this.__mvMonitor.ml=function(){var t=s;if(t.__mvMonitor.mouseDown)return t.__mvMonitor.mouseDown=!1,t.emit("moveend",{position:t.__mvMonitor.curposition}),!1},this.__mvMonitor.md=function(t){if(!this.__mvMonitor.mouseDown)return 0==t.button||1==t.button?(this.__mvMonitor.mouseDown=!0,this.__mvMonitor.curposition.x=t.position.offsetX,this.__mvMonitor.curposition.y=t.position.offsetY,this.emit("movestart",{position:this.__mvMonitor.curposition}),!(t.cancel=!0)):void 0}),e=e||this.graph,!1!==t?(e.bind("mousemove",this.__mvMonitor.mv),e.bind("mouseup",this.__mvMonitor.mu),e.bind("mouseleave",this.__mvMonitor.ml),this.bind("mousedown",this.__mvMonitor.md),e.bind("touchmove",this.__mvMonitor.mv),e.bind("touchend",this.__mvMonitor.mu),this.bind("touchstart",this.__mvMonitor.md)):(e.unbind("mousemove",this.__mvMonitor.mv),e.unbind("mouseup",this.__mvMonitor.mu),e.unbind("mouseleave",this.__mvMonitor.ml),this.unbind("mousedown",this.__mvMonitor.md),e.unbind("touchmove",this.__mvMonitor.mv),e.unbind("touchend",this.__mvMonitor.mu),this.unbind("touchstart",this.__mvMonitor.md)),this}}])&&a(t.prototype,e),n&&a(t,n),i}();n.jmControl=n.default=t},{"./jmGradient.js":4,"./jmList.js":6,"./jmProperty.js":9,"./jmShadow.js":10,"./jmUtils.js":11}],3:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmEvents=n.default=void 0;var o=t("./jmUtils.js");function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}t=function(){function n(t,e){i(this,n),this.container=t,this.target=e||t,this.mouseHandler=new c(this,t,e),this.keyHandler=new a(this,t,e)}return u(n,[{key:"touchStart",value:function(t){if((t=t||window.event).eventName="touchstart",this.container.raiseEvent("touchstart",t),(t.target||t.srcElement)==this.target)return!1}},{key:"touchMove",value:function(t){if((t=t||window.event).eventName="touchmove",this.container.raiseEvent("touchmove",t),(t.target||t.srcElement)==this.target)return!1}},{key:"touchEnd",value:function(t){if((t=t||window.event).eventName="touchend",this.container.raiseEvent("touchend",t),(t.target||t.srcElement)==this.target)return!1}},{key:"touchCancel",value:function(t){if((t=t||window.event).eventName="touchcancel",this.container.raiseEvent("touchcancel",t),(t.target||t.srcElement)==this.target)return!1}},{key:"destroy",value:function(){this.mouseHandler.destroy(),this.keyHandler.destroy()}}]),n}();n.jmEvents=n.default=t;var c=function(){function r(t,e,n){i(this,r),this.instance=t,this.container=e,this.target=n||e,this.eventEvents={},this.init(t,e,n)}return u(r,[{key:"init",value:function(e,n,t){var r=this.target,i=void 0!==("undefined"==typeof document?"undefined":s(document))?document:null;this.eventEvents.mousedown=o.jmUtils.bindEvent(this.target,"mousedown",function(t){(t=t||window.event).eventName="mousedown";n.raiseEvent("mousedown",t)}),this.eventEvents.mousedown=o.jmUtils.bindEvent(this.target,"mousemove",function(t){if((t=t||window.event).eventName="mousemove",(t.target||t.srcElement)==r){n.raiseEvent("mousemove",t);return t.preventDefault&&t.preventDefault(),!1}}),this.eventEvents.mousedown=o.jmUtils.bindEvent(this.target,"mouseover",function(t){(t=t||window.event).eventName="mouseover",n.raiseEvent("mouseover",t)}),this.eventEvents.mouseleave=o.jmUtils.bindEvent(this.target,"mouseleave",function(t){(t=t||window.event).eventName="mouseleave",n.raiseEvent("mouseleave",t)}),this.eventEvents.mouseout=o.jmUtils.bindEvent(this.target,"mouseout",function(t){(t=t||window.event).eventName="mouseout",n.raiseEvent("mouseout",t)}),i&&(this.eventEvents.mouseup=o.jmUtils.bindEvent(i,"mouseup",function(t){if(!((t=t||window.event).eventName="mouseup")===n.raiseEvent("mouseup",t))return t.preventDefault&&t.preventDefault(),!1})),this.eventEvents.dblclick=o.jmUtils.bindEvent(this.target,"dblclick",function(t){(t=t||window.event).eventName="dblclick",n.raiseEvent("dblclick",t)}),this.eventEvents.click=o.jmUtils.bindEvent(this.target,"click",function(t){(t=t||window.event).eventName="click",n.raiseEvent("click",t)}),i&&(this.eventEvents.resize=o.jmUtils.bindEvent(i,"resize",function(t){return(t=t||window.event).eventName="resize",n.raiseEvent("resize",t)})),this.eventEvents.touchstart=o.jmUtils.bindEvent(this.target,"touchstart",function(t){return t.eventName="touchstart",e.touchStart(t)},{passive:!1}),this.eventEvents.touchmove=o.jmUtils.bindEvent(this.target,"touchmove",function(t){return t.eventName="touchmove",e.touchMove(t)},{passive:!1}),i&&(this.eventEvents.touchend=o.jmUtils.bindEvent(i,"touchend",function(t){return t.eventName="touchend",e.touchEnd(t)},{passive:!1})),i&&(this.eventEvents.touchcancel=o.jmUtils.bindEvent(i,"touchcancel",function(t){return t.eventName="touchcancel",e.touchCancel(t)},{passive:!1}))}},{key:"destroy",value:function(){for(var t in this.eventEvents){var e=this.eventEvents[t];e&&e.fun&&o.jmUtils.removeEvent(e.target,t,e.fun)}}}]),r}(),a=function(){function r(t,e,n){i(this,r),this.instance=t,this.container=e,this.target=n||e,this.eventEvents={},this.init(e,n)}return u(r,[{key:"init",value:function(n,t){function r(t){return!(t=t.srcElement||t.target)||"INPUT"!=t.tagName&&"TEXTAREA"!=t.tagName&&"ANCHOR"!=t.tagName&&"FORM"!=t.tagName&&"FILE"!=t.tagName&&"IMG"!=t.tagName&&"HIDDEN"!=t.tagName&&"RADIO"!=t.tagName&&"TEXT"!=t.tagName}var e=void 0!==("undefined"==typeof document?"undefined":s(document))?document:null;e&&(this.eventEvents.keypress=o.jmUtils.bindEvent(e,"keypress",function(t){if(t=t||window.event,r(t)){var e=n.raiseEvent("keypress",t);return!1===e&&t.preventDefault&&t.preventDefault(),e}})),e&&(this.eventEvents.keydown=o.jmUtils.bindEvent(e,"keydown",function(t){if(t=t||window.event,r(t)){var e=n.raiseEvent("keydown",t);return!1===e&&t.preventDefault&&t.preventDefault(),e}})),e&&(this.eventEvents.keyup=o.jmUtils.bindEvent(e,"keyup",function(t){if(t=t||window.event,r(t)){var e=n.raiseEvent("keyup",t);return!1===e&&t.preventDefault&&t.preventDefault(),e}}))}},{key:"destroy",value:function(){for(var t in this.eventEvents){var e=this.eventEvents[t];e&&e.fun&&o.jmUtils.removeEvent(e.target,t,e.fun)}}}]),r}()},{"./jmUtils.js":11}],4:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmGradient=n.default=void 0;var a=t("./jmUtils.js"),i=t("./jmList.js");function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t=function(){function n(t){if(!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.stops=new i.jmList,t&&"object"==o(t))for(var e in t)this[e]=t[e];else"string"==typeof t&&this.fromString(t)}var t,e,r;return t=n,(e=[{key:"addStop",value:function(t,e){this.stops.add({offset:Number(t),color:e})}},{key:"toGradient",value:function(t){var r,e=t.context||t,n=t.absoluteBounds||t.getAbsoluteBounds(),i=this.x1||0,o=this.y1||0,s=this.x2,u=this.y2,c=t.getLocation(),t=0,t=(t=c.radius?2*c.radius:t)||Math.min(c.width,c.height);a.jmUtils.checkPercent(i)&&(i=a.jmUtils.percentToNumber(i)*(n.width||t)),a.jmUtils.checkPercent(s)&&(s=a.jmUtils.percentToNumber(s)*(n.width||t)),a.jmUtils.checkPercent(o)&&(o=a.jmUtils.percentToNumber(o)*(n.height||t)),a.jmUtils.checkPercent(u)&&(u=a.jmUtils.percentToNumber(u)*(n.height||t));c=Number(i)+n.left,i=Number(o)+n.top,o=Number(s)+n.left,s=Number(u)+n.top;return"linear"===this.type?r=e.createLinearGradient(c,i,o,s):"radial"===this.type&&(u=this.r1||0,n=this.r2,a.jmUtils.checkPercent(u)&&(u=a.jmUtils.percentToNumber(u),u*=t),a.jmUtils.checkPercent(n)&&(n=a.jmUtils.percentToNumber(n),n*=t),r=e.createCircularGradient?e.createCircularGradient(c,i,n):e.createRadialGradient(c,i,u,o,s,n)),this.stops.each(function(t,e){var n=a.jmUtils.toColor(e.color);r.addColorStop(e.offset,n)}),r}},{key:"fromString",value:function(t){if(t){var e=t.match(/(linear|radial)-gradient\s*\(\s*([^,]+)\s*,\s*((.|\s)+)\)/i);if(e&&!(e.length<3)){this.type=e[1].toLowerCase();t=a.jmUtils.trim(e[2]).split(/\s+/);"linear"==this.type?t.length<=2?(this.x2=t[0],this.y2=t[1]||0):(this.x1=t[0],this.y1=t[1],this.x2=t[2],this.y2=t[3]):t.length<=3?(this.x2=t[0],this.y2=t[1]||0,this.r2=t[2]||0):(this.x1=t[0],this.y1=t[1],this.r1=t[2],this.x2=t[3],this.y2=t[3],this.r2=t[3]);var n=e[3].match(/((rgb(a)?\s*\([\d,\.\s]+\))|(#[a-zA-Z\d]+))\s+([\d\.]+)/gi);if(n&&n.length)for(var r=0;r<n.length;r++){var i,o=a.jmUtils.trim(n[r]),s=o.lastIndexOf(" ");-1<s&&(i=Number(o.substr(s+1)),s=a.jmUtils.trim(o.substr(0,s)),!isNaN(i)&&s&&this.addStop(i,s))}}}}},{key:"toString",value:function(){var n=this.type+"-gradient(";return"linear"==this.type?n+=this.x1+" "+this.y1+" "+this.x2+" "+this.y2:n+=this.x1+" "+this.y1+" "+this.r1+" "+this.x2+" "+this.y2+" "+this.r2,this.stops.each(function(t,e){n+=","+e.color+" "+e.offset}),n+")"}}])&&s(t.prototype,e),r&&s(t,r),n}();n.jmGradient=n.default=t},{"./jmList.js":6,"./jmUtils.js":11}],5:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"jmUtils",{enumerable:!0,get:function(){return s.jmUtils}}),Object.defineProperty(n,"jmList",{enumerable:!0,get:function(){return r.jmList}}),Object.defineProperty(n,"jmProperty",{enumerable:!0,get:function(){return o.jmProperty}}),Object.defineProperty(n,"jmShadow",{enumerable:!0,get:function(){return u.jmShadow}}),Object.defineProperty(n,"jmGradient",{enumerable:!0,get:function(){return c.jmGradient}}),Object.defineProperty(n,"jmEvents",{enumerable:!0,get:function(){return a.jmEvents}}),Object.defineProperty(n,"jmControl",{enumerable:!0,get:function(){return f.jmControl}}),Object.defineProperty(n,"jmPath",{enumerable:!0,get:function(){return h.jmPath}}),n.jmGraph=n.default=void 0;var s=t("./jmUtils.js"),r=t("./jmList.js"),o=t("./jmProperty.js"),u=t("./jmShadow.js"),c=t("./jmGradient.js"),a=t("./jmEvents.js"),f=t("./jmControl.js"),h=t("./jmPath.js");function l(t,e,n){return(l=m()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);r=new(Function.bind.apply(t,r));return n&&y(r,n.prototype),r}).apply(null,arguments)}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(n){var r=m();return function(){var t,e=v(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=v(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}(o,f.jmControl);var t,e,n,i=d(o);function o(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),"function"==typeof e&&(n=e,e={}),(e=e||{}).mode=e.mode||"2d",e.interactive=!0,(r=i.call(this,e,"jmGraph")).option=e||{},r.devicePixelRatio=1,r.util=r.utils=s.jmUtils,"undefined"!=typeof wx&&wx.canIUse&&wx.canIUse("canvas")?("string"==typeof t&&(t=wx.createSelectorQuery().select("#"+t)),r.isWXMiniApp=!0):("string"==typeof t&&"undefined"!=typeof document?t=document.getElementById(t):t.length&&(t=t[0]),"CANVAS"!=t.tagName?(r.container=t,e=document.createElement("canvas"),t.appendChild(e),e.width=t.offsetWidth||t.clientWidth,e.height=t.offsetHeight||t.clientHeight,t=e):r.container=t.parentElement),r.canvas=t,r.context=t.getContext("2d"),r.__init(n),r}return t=o,n=[{key:"create",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return l(o,e)}}],(e=[{key:"__init",value:function(t){this.shapes=Object.assign({path:h.jmPath},this.option.shapes),this.on("beginDraw",function(){this.context.translate(.5,.5)}),this.on("endDraw",function(){this.context.translate(-.5,-.5)});var e="undefined"!=typeof window&&1<window.devicePixelRatio?window.devicePixelRatio:1;this.isWXMiniApp&&(e=wx.getSystemInfoSync().pixelRatio||1),this.devicePixelRatio=e,this.dprScaleSize=1<this.devicePixelRatio?this.devicePixelRatio:2,0<this.option.width&&(this.width=this.option.width),0<this.option.height&&(this.height=this.option.height),this.resize(),this.eventHandler=new a.jmEvents(this,this.canvas.canvas||this.canvas),this.option.autoRefresh&&this.autoRefresh(),t&&t(this)}},{key:"resize",value:function(t,e){this.canvas&&(this.__normalSize=this.__normalSize||{width:0,height:0},t=t||this.__normalSize.width||this.width,e=e||this.__normalSize.height||this.height,t&&(this.__normalSize.width=t),e&&(this.__normalSize.height=e),this.css("width",t+"px"),this.css("height",e+"px"),this.canvas.height=e*this.dprScaleSize,this.canvas.width=t*this.dprScaleSize,this.context.scale(this.dprScaleSize,this.dprScaleSize))}},{key:"pointToPixes",value:function(t){return t=this.dprScaleSize&&1!==this.dprScaleSize?Object.assign({},t,{x:t.x/this.dprScaleSize,y:t.y/this.dprScaleSize}):t}},{key:"width",get:function(){return this.__normalSize&&this.__normalSize.width?this.__normalSize.width:this.canvas?this.canvas.width:0},set:function(t){return this.needUpdate=!0,this.canvas&&this.resize(t),t}},{key:"height",get:function(){return this.__normalSize&&this.__normalSize.height?this.__normalSize.height:this.canvas?this.canvas.height:0},set:function(t){return this.needUpdate=!0,this.canvas&&this.resize(0,t),t}},{key:"getPosition",value:function(){var t=s.jmUtils.getElementPosition(this.canvas.canvas||this.canvas);return t.width=this.width,t.height=this.height,t.right=t.left+t.width,t.bottom=t.top+t.height,t}},{key:"registerShape",value:function(t,e){this.shapes[t]=e}},{key:"createShape",value:function(t,e){if(t="string"==typeof t?this.shapes[t]:t)return(e=e||{}).graph=this,new t(e)}},{key:"createShadow",value:function(t,e,n,r){return new u.jmShadow(t,e,n,r)}},{key:"createLinearGradient",value:function(t,e,n,r){return new c.jmGradient({type:"linear",x1:t,y1:e,x2:n,y2:r})}},{key:"createRadialGradient",value:function(t,e,n,r,i,o){return new c.jmGradient({type:"radial",x1:t,y1:e,r1:n,x2:r,y2:i,r2:o})}},{key:"refresh",value:function(){this.redraw()}},{key:"redraw",value:function(t,e){this.clear(t||this.width,e||this.height),this.paint()}},{key:"clear",value:function(t,e){t&&e||(t=this.width,e=this.height),this.style&&this.style.fill?this.points=[{x:0,y:0},{x:t,y:0},{x:t,y:e},{x:0,y:e}]:this.context.clearRect&&this.context.clearRect(0,0,t,e)}},{key:"css",value:function(t,e){if(this.canvas&&this.canvas.style)return void 0!==e&&(this.canvas.style[t]=e),this.canvas.style[t]}},{key:"createPath",value:function(t,e){return this.createShape("path",{points:t,style:e})}},{key:"createLine",value:function(t,e,n){return this.createShape("line",{start:t,end:e,style:n})}},{key:"zoomOut",value:function(){this.scale(.9,.9)}},{key:"zoomIn",value:function(){this.scale(1.1,1.1)}},{key:"zoomActual",value:function(){this.scaleSize?this.scale(1/this.scaleSize.x,1/this.scaleSize.y):this.scale(1,1)}},{key:"scale",value:function(t,e){this.normalSize||(this.normalSize={width:this.canvas.width,height:this.canvas.height}),this.context.scale(t,e),this.scaleSize?this.scaleSize={x:t*this.scaleSize.x,y:e*this.scaleSize.y}:this.scaleSize={x:t,y:e},this.refresh()}},{key:"toDataURL",value:function(){return this.canvas.toDataURL?this.canvas.toDataURL():""}},{key:"autoRefresh",value:function(e){if(!this.___isAutoRefreshing){var n=this;return this.___isAutoRefreshing=!0,n.__requestAnimationFrameFunHandler&&this.cancelAnimationFrame(n.__requestAnimationFrameFunHandler),n.__requestAnimationFrameFunHandler=this.requestAnimationFrame(function t(){n.destroyed?n.___isAutoRefreshing=!1:(n.needUpdate&&n.redraw(),n.emit("update"),n.__requestAnimationFrameFunHandler&&n.cancelAnimationFrame(n.__requestAnimationFrameFunHandler),n.__requestAnimationFrameFunHandler=n.requestAnimationFrame(t),e&&e())}),this}}},{key:"destroy",value:function(){this.eventHandler.destroy(),this.destroyed=!0}}])&&p(t.prototype,e),n&&p(t,n),o}();n.jmGraph=n.default=t},{"./jmControl.js":2,"./jmEvents.js":3,"./jmGradient.js":4,"./jmList.js":6,"./jmPath.js":8,"./jmProperty.js":9,"./jmShadow.js":10,"./jmUtils.js":11}],6:[function(t,e,n){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}function f(t){var n="function"==typeof Map?new Map:void 0;return function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,e)}function e(){return r(t,arguments,p(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),l(e,t)}(t)}function r(t,e,n){return(r=h()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);r=new(Function.bind.apply(t,r));return n&&l(r,n.prototype),r}).apply(null,arguments)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmList=n.default=void 0;var i=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(u,f(Array));var n,r,t,e,i,s=(n=u,r=h(),function(){var t,e=p(n);return a(this,r?(t=p(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=[],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];if(r&&r.length&&Array.isArray(r[0])){for(var o=0;o<r[0].length;o++)e.push(r[0][o]);t=s.call.apply(s,[this].concat(e))}else t=s.call(this);return t.option={},t.type="jmList",a(t)}return t=u,(e=[{key:"add",value:function(t){if(t&&Array.isArray(t)){for(var e=0;e<t.length;e++)this.includes(t[e])||this.push(t[e]);return t}return"object"==o(t)&&this.includes(t)||this.push(t),t}},{key:"remove",value:function(t){for(var e=this.length-1;0<=e;e--)this[e]==t&&this.removeAt(e)}},{key:"removeAt",value:function(t){var e;this.length>t&&(e=this[t],this.splice(t,1),this.option.removeHandler&&this.option.removeHandler.call(this,e,t))}},{key:"contain",value:function(t){return this.includes(t)}},{key:"get",value:function(t){return"function"==typeof t?this.find(t):this[t]}},{key:"each",value:function(t,e){if(t&&"function"==typeof t)if(e){for(var n=this.length-1;0<=n;n--)if(!1===t.call(this,n,this[n]))break}else for(var r=this.length,i=0;i<r;i++)if(!1===t.call(this,i,this[i]))break}},{key:"count",value:function(t){if(t&&"function"==typeof t){for(var e=0,n=this.length,r=0;r<n;r++)t(this[r])&&e++;return e}return this.length}},{key:"clear",value:function(){this.splice(0,this.length)}}])&&c(t.prototype,e),i&&c(t,i),u}();n.jmList=n.default=i},{}],7:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmObject=n.default=void 0;var i=t("./jmList.js");function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}Symbol("jmchart#animate#counter");t=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t&&"jmGraph"==t.type&&(this.graph=t)}var t,n,r;return t=e,(n=[{key:"is",value:function(t){return"string"==typeof t?this.type==t:this instanceof t}},{key:"animate",value:function(){if(this.is("jmGraph")){if(1<arguments.length){this.animateHandles||(this.animateHandles=new i.jmList);var t=[];if(2<arguments.length)for(var e=2;e<arguments.length;e++)t.push(e<0||arguments.length<=e?void 0:arguments[e]);this.animateHandles.add({millisec:(arguments.length<=1?void 0:arguments[1])||20,handle:arguments.length<=0?void 0:arguments[0],params:t})}var o;this.animateHandles&&0<this.animateHandles.count()&&((o=this).dispatcher=setTimeout(function(n){n=n||o;var t,r=[],i=(new Date).getTime();for(t in n.animateHandles.each(function(t,e){try{e&&e.handle&&(!e.times||i-e.times>=e.millisec)&&(!1===e.handle.apply(n,e.params)&&r.push(e),e.times=i)}catch(t){window.console&&window.console.info&&window.console.info(t.toString()),e&&r.push(e)}}),r)n.animateHandles.remove(r[t]);n.animate()},10,this))}else{var n=this.graph;n&&n.animate.apply(n,arguments)}}}])&&o(t.prototype,n),r&&o(t,r),e}();n.jmObject=n.default=t},{"./jmList.js":6}],8:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmPath=n.default=void 0;var o=t("./jmControl.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmControl);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmPath";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t,e)).points=t&&t.points?t.points:[],e}return t=i,(e=[{key:"points",get:function(){return this.__pro("points")},set:function(t){return this.needUpdate=!0,this.__pro("points",t)}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmPath=n.default=t},{"./jmControl.js":2}],9:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmProperty=n.default=void 0;var o=t("./jmUtils.js"),s=t("./jmObject.js");function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=f(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=f(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var h=Symbol("properties"),t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(i,s.jmObject);var t,e,n,r=a(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=r.call(this))[h]={},t}return t=i,(e=[{key:"__pro",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(e){var r=this[h],i=e[0];if(1<e.length){var o=e[1],o={oldValue:r[i],newValue:o};return r[i]=e[1],this.emit&&this.emit("propertyChange",i,o),e[1]}if(1==e.length)return r[i]}}},{key:"needUpdate",get:function(){return this.__pro("needUpdate")},set:function(t){this.__pro("needUpdate",t),t&&!this.is("jmGraph")&&this.graph&&(this.graph.needUpdate=!0)}},{key:"graph",get:function(){return this.__pro("graph")||this.__pro("graph",this.findParent("jmGraph"))},set:function(t){return this.__pro("graph",t)}},{key:"requestAnimationFrame",value:function(t){return o.jmUtils.requestAnimationFrame(t,this.graph?this.graph.canvas:null)}},{key:"cancelAnimationFrame",value:function(t){return o.jmUtils.cancelAnimationFrame(t,this.graph?this.graph.canvas:null)}}])&&u(t.prototype,e),n&&u(t,n),i}();n.jmProperty=n.default=t},{"./jmObject.js":7,"./jmUtils.js":11}],10:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmShadow=n.default=void 0;var r=t("./jmUtils.js");function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.jmShadow=n.default=function(){function i(t,e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),"string"!=typeof t||e||n||r?(this.x=t,this.y=e,this.blur=n,this.color=r):this.fromString(t)}var t,e,n;return t=i,(e=[{key:"fromString",value:function(t){if(t){t=t.match(/\s*([^,]+)\s*,\s*([^,]+)\s*(,[^,]+)?\s*(,[\s\S]+)?\s*/i);return t&&(this.x=t[1]||0,this.y=t[2]||0,t[3]&&(t[3]=r.jmUtils.trim(t[3],", "),0===t[3].indexOf("#")||/^rgb/i.test(t[3])?this.color=t[3]:this.blur=r.jmUtils.trim(t[3],", ")),t[4]&&(this.color=r.jmUtils.trim(t[4],", "))),this}}},{key:"toString",value:function(){var t=this.x+","+this.y;return this.blur&&(t+=","+this.blur),this.color&&(t+=","+this.color),t}}])&&o(t.prototype,e),n&&o(t,n),i}()},{"./jmUtils.js":11}],11:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmUtils=n.default=void 0;var a=t("./jmList.js");function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r;return e=t,r=[{key:"clone",value:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0;if("function"==typeof r){var o=r(t,n,i);if(o)return o}if("boolean"==typeof e&&(n=e,e=void 0),100<++i)return e;if(t&&"object"===f(t)){if(e=e||{},this.isType(t,a.jmList))return new a.jmList(t);if(Array.isArray(t)){if(n){for(var s=[],u=0;u<t.length;u++)s.push(this.clone(t[u],e[u],n,r,i));return s}return t.slice(0)}for(var c in t.__proto__&&(e.__proto__=t.__proto__),t)"constructor"!==c&&("object"!==f(e[c])&&void 0!==e[c]||(e[c]=this.clone(t[c],e[c],n,r,i)));return e}return void 0!==e?e:t}},{key:"bindEvent",value:function(t,e,n,r){if(e&&e.indexOf&&-1!=e.indexOf(" "))for(var i=e.split(" "),o=0;o<i.length;o++)this.bindEvent(t,i[o],n,r);return t.attachEvent?t.attachEvent("on"+e,n,r):t.addEventListener&&t.addEventListener(e,n,r),{name:e,target:t,fun:n}}},{key:"removeEvent",value:function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent?(t.detachEvent("on"+e,n),!0):void(t["on"+e]=null)}},{key:"getElementPosition",value:function(t){var e={top:0,left:0};if(!t)return e;if(t.offsetParent)for(;t.offsetParent;)e.top+=t.offsetTop,e.left+=t.offsetLeft,t=t.offsetParent;else t.x?e.left+=t.x:t.x&&(e.top+=t.y);return e}},{key:"getEventPosition",value:function(t,e){var n=!1,r=(t=t||event).changedTouches||t.targetTouches||t.touches,i=t.target||t.srcElement;r&&r.length&&((t=r[0]).target||(t.target=i),n=!0);var o=t.pageX||t.x;void 0===o&&(o=t.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));var s=t.pageY||t.y;void 0===s&&(s=t.clientY+(document.documentElement.scrollTop||document.body.scrollTop));var u=t.offsetX,c=t.offsetY;return void 0===u&&void 0===c&&(u=o-(i=this.getElementPosition(i)).left,c=s-i.top),e&&(e.x&&(u/=e.x),e.y&&(c/=e.y)),{pageX:o,pageY:s,clientX:t.clientX,clientY:t.clientY,offsetX:u,offsetY:c,layerX:t.layerX,layerY:t.layerY,screenX:t.screenX,screenY:t.screenY,x:u,y:c,isTouch:n,touches:r}}},{key:"isType",value:function(t,e){return!(!t||"object"!==f(t))&&t.constructor===e}},{key:"pointInPolygon",value:function(t,e,n){n=n||1,n/=2;var r,i,o=e.length,s=!1,u=!0;if(!e||0==o)return 0;if(1==o)return Math.abs(e[0].x-t.x)<=n&&Math.abs(e[0].y-t.y)<=n;if(2==o){if(Math.min(e[0].x,e[1].x)-t.x>n||t.x-Math.max(e[0].x,e[1].x)>n)return 0;if(Math.min(e[0].y,e[1].y)-t.y>n||t.y-Math.max(e[0].y,e[1].y)>n)return 0;if(e[0].x==e[1].x)return Math.abs(e[0].x-t.x)<=n&&(t.y-e[0].y)*(t.y-e[1].y)<=0?1:0;if(e[0].y==e[1].y)return Math.abs(e[0].y-t.y)<=n&&(t.x-e[0].x)*(t.x-e[1].x)<=0?1:0;if(Math.abs(e[0].x-t.x)<n&&Math.abs(e[0].y-t.y)<n)return 1;if(Math.abs(e[1].x-t.x)<n&&Math.abs(e[1].y-t.y)<n)return 1;if(t.y==e[0].y||t.y==e[1].y)return 0;var c=(e[1].x-e[0].x)/(e[1].y-e[0].y)*(t.y-e[0].y),c=(t.y-e[0].y)/Math.sqrt(c*c+(t.y-e[0].y)*(t.y-e[0].y))*(t.x-e[0].x-c);return Math.abs(c)<=n?1:0}for(r=0;r<o;++r)if(e[r].x==t.x&&e[r].y==t.y)return 1;for(;u;)for(s=u=!1,r=0,i=o-1;r<o;i=r++)if(e[r].y<t.y&&t.y<e[i].y||e[i].y<t.y&&t.y<e[r].y){if(t.x<=e[r].x||t.x<=e[i].x){var a=(t.y-e[r].y)*(e[i].x-e[r].x)/(e[i].y-e[r].y)+e[r].x;if(t.x<a)s=!s;else if(t.x==a)return 1}}else if(t.y==e[r].y){if(t.x<e[r].x){e[r].y>e[i].y?--t.y:++t.y,u=!0;break}}else if(e[r].y==e[i].y&&t.y==e[r].y&&(e[r].x<t.x&&t.x<e[i].x||e[i].x<t.x&&t.x<e[r].x)){s=!0;break}return s?2:0}},{key:"checkOutSide",value:function(t,e,n){var r={left:0,right:0,top:0,bottom:0};return n.x<0?r.left=e.left+n.x-t.left:0<n.x&&(r.right=e.right+n.x-t.right),n.y<0?r.top=e.top+n.y-t.top:0<n.y&&(r.bottom=e.bottom+n.y-t.bottom),r}},{key:"rotatePoints",value:function(t,e,n){if(!n||!t)return t;var r=Math.cos(n),i=Math.sin(n);if(t.length)for(var o,s,u=0;u<t.length;u++)t[u]&&(o=t[u].x-e.x,s=t[u].y-e.y,t[u].x=o*r-s*i+e.x,t[u].y=o*i+s*r+e.y);else{var c=t.x-e.x,n=t.y-e.y;t.x=c*r-n*i+e.x,t.y=c*i+n*r+e.y}return t}},{key:"trimStart",value:function(t,e){if(e=e||" ",t&&0<t.length){var n=t[0];if(n===e||0<=e.indexOf(n))return t=t.substring(1),this.trimStart(t,e)}return t}},{key:"trimEnd",value:function(t,e){if(e=e||" ",t&&0<t.length){var n=t[t.length-1];if(n===e||0<=e.indexOf(n))return t=t.substring(0,t.length-1),this.trimStart(t,e)}return t}},{key:"trim",value:function(t,e){return this.trimEnd(this.trimStart(t,e),e)}},{key:"checkPercent",value:function(t){if("string"==typeof t&&"%"==(t=this.trim(t))[t.length-1])return t}},{key:"percentToNumber",value:function(t){var e;return"string"!=typeof t||(e=this.checkPercent(t))&&(t=this.trim(e,"% "),t/=100),t}},{key:"hexToNumber",value:function(t){if("string"!=typeof t)return t;for(var e=0,n=(t=t.toLowerCase()).length,r=0;r<n;r++){var i="0123456789abcdef".indexOf(t[r]);if(0!=i){for(var o=1;o<n-r;o++)i*=16;e+=i}}return e}},{key:"numberToHex",value:function(t){for(var e="";0<t;){e="0123456789abcdef"[t%16]+e;t=Math.floor(t/16)}return e}},{key:"hexToRGBA",value:function(t){if("#"==(t=this.trim(t))[0]){var e={a:1};if(8<=t.length)return e.a=t.substr(1,2),e.g=t.substr(5,2),e.b=t.substr(7,2),e.r=t.substr(3,2),e.a=(this.hexToNumber(e.a)/255).toFixed(4),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),e;if(7===t.length||4===t.length)return 4===t.length?(e.g=t.substr(2,1),e.g=e.g+e.g,e.b=t.substr(3,1),e.b=e.b+e.b,e.r=t.substr(1,1),e.r=e.r+e.r):(e.g=t.substr(3,2),e.b=t.substr(5,2),e.r=t.substr(1,2)),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),e;if(5===t.length)return e.a=t.substr(1,1),e.g=t.substr(3,1),e.b=t.substr(4,1),e.r=t.substr(2,1),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),e.a=(this.hexToNumber(e.a)/255).toFixed(4),e}return t}},{key:"toColor",value:function(t,e,n,r){if("string"==typeof t&&t){if("#"===(t=this.trim(t))[0]&&(4===t.length||7===t.length))return t;var i=this.hexToRGBA(t);if("string"==typeof i)return i;t=i.r||t,e=i.g||e,n=i.b||n,r=i.a||r}return void 0!==t&&void 0!==e&&void 0!==n?void 0!==r?"rgba("+t+","+e+","+n+","+r+")":"rgb("+t+","+e+","+n+")":t}},{key:"requestAnimationFrame",value:function(t,e){return(e&&e.requestAnimationFrame?e.requestAnimationFrame:"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:setTimeout)(t,20)}},{key:"cancelAnimationFrame",value:function(t,e){return(e&&e.cancelAnimationFrame?e.cancelAnimationFrame:"undefined"!=typeof window&&window.cancelAnimationFrame?window.cancelAnimationFrame:clearTimeout)(t)}}],(n=null)&&i(e.prototype,n),r&&i(e,r),t}();n.jmUtils=n.default=t},{"./jmList.js":6}],12:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmArc=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmPath);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmArc";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t=t||{},e)).center=t.center||{x:0,y:0},e.radius=t.radius||0,e.startAngle=t.start||t.startAngle||0,e.endAngle=t.end||t.endAngle||2*Math.PI,e.anticlockwise=t.anticlockwise||0,e.isFan=!!t.isFan,e}return t=i,(e=[{key:"center",get:function(){return this.__pro("center")},set:function(t){return this.needUpdate=!0,this.__pro("center",t)}},{key:"radius",get:function(){return this.__pro("radius")},set:function(t){return this.needUpdate=!0,this.__pro("radius",t)}},{key:"startAngle",get:function(){return this.__pro("startAngle")},set:function(t){return this.needUpdate=!0,this.__pro("startAngle",t)}},{key:"endAngle",get:function(){return this.__pro("endAngle")},set:function(t){return this.needUpdate=!0,this.__pro("endAngle",t)}},{key:"anticlockwise",get:function(){return this.__pro("anticlockwise")},set:function(t){return this.needUpdate=!0,this.__pro("anticlockwise",t)}},{key:"initPoints",value:function(){var t=this.getLocation(),e=0,n=0,r=t.center.x,i=t.center.y;t.radius?e=n=t.radius:(e=t.width/2,n=t.height/2);var o=this.startAngle,s=this.endAngle;if((0!=e||0!=n)&&o!=s){var u=this.anticlockwise;this.points=[];var c=1/Math.max(e,n);u&&(o=(u=2*Math.PI)-o,s=u-s),s<o&&(c=-c),this.isFan&&this.points.push(t.center);for(var a=o;;a+=c){(0<c&&s<a||c<0&&a<s)&&(a=s);var f={x:Math.cos(a)*e+r,y:Math.sin(a)*n+i};if(this.points.push(f),a==s)break}return this.points}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmArc=n.default=t},{"../core/jmPath.js":8}],13:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmArrow=n.default=void 0;var o=t("../core/jmPath.js"),c=t("../core/jmUtils.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=f(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=f(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmPath);var t,e,n,r=a(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmArrow";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t,e)).style.lineJoin="miter",e.style.lineCap="square",e.angle=t.angle||0,e.start=t.start||{x:0,y:0},e.end=t.end||{x:0,y:0},e.offsetX=t.offsetX||5,e.offsetY=t.offsetY||8,e}return t=i,(e=[{key:"start",get:function(){return this.__pro("start")},set:function(t){return this.needUpdate=!0,this.__pro("start",t)}},{key:"end",get:function(){return this.__pro("end")},set:function(t){return this.needUpdate=!0,this.__pro("end",t)}},{key:"angle",get:function(){return this.__pro("angle")},set:function(t){return this.needUpdate=!0,this.__pro("angle",t)}},{key:"offsetX",get:function(){return this.__pro("offsetX")},set:function(t){return this.needUpdate=!0,this.__pro("offsetX",t)}},{key:"offsetY",get:function(){return this.__pro("offsetY")},set:function(t){return this.needUpdate=!0,this.__pro("offsetY",t)}},{key:"initPoints",value:function(t){var e=this.angle,n=this.start,r=this.end;if(r){e=e||Math.atan2(r.y-n.y,r.x-n.x),this.points=[];var i=this.offsetX,o=this.offsetY,s=Math.atan2(i,o),u=e+s,n=Math.sin(u),u=Math.cos(u),i=Math.sqrt(i*i+o*o),o={x:r.x-u*i,y:r.y-n*i},s=e-s,n=Math.sin(s),u=Math.cos(s),n={x:r.x-u*i,y:r.y-n*i},i=c.jmUtils.clone(r);return i.m=!0,this.points.push(i),this.points.push(o),t||this.style.fill?(this.points.push(n),this.points.push(r)):(this.points.push(i),this.points.push(n)),this.points}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmArrow=n.default=t},{"../core/jmPath.js":8,"../core/jmUtils.js":11}],14:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmArrowLine=n.default=void 0;var o=t("./jmLine.js"),s=t("./jmArrow.js");function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e,n){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){t=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(n):e.value}})(t,e,n||t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=h(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=h(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmLine);var t,e,n,r=f(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t.start=t.start||{x:0,y:0},t.end=t.end||{x:0,y:0},(e=r.call(this,t,e||"jmArrowLine")).style.lineJoin=e.style.lineJoin||"miter",e.arrow=new s.jmArrow(t),e}return t=i,(e=[{key:"initPoints",value:function(){return this.points=c(h(i.prototype),"initPoints",this).call(this),!1!==this.arrowVisible&&(this.points=this.points.concat(this.arrow.initPoints())),this.points}}])&&u(t.prototype,e),n&&u(t,n),i}();n.jmArrowLine=n.default=t},{"./jmArrow.js":13,"./jmLine.js":20}],15:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmBezier=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmPath);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmBezier";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t.style&&!0!==typeof t.style.close&&(t.style.close=!1),(e=r.call(this,t,e)).cpoints=t.points||[],e}return t=i,(e=[{key:"cpoints",get:function(){return this.__pro("cpoints")},set:function(t){return this.needUpdate=!0,this.__pro("cpoints",t)}},{key:"initPoints",value:function(){this.points=[];for(var t=this.cpoints,e=0;e<=1;e+=.01){var n=this.getPoint(t,e);this.points.push(n)}return this.points.push(t[t.length-1]),this.points}},{key:"getPoint",value:function(t,e){if(1==t.length)return t[0];if(2==t.length){var n={};return n.x=(t[1].x-t[0].x)*e+t[0].x,n.y=(t[1].y-t[0].y)*e+t[0].y,n}if(2<t.length){for(var r=[],i=0;i<t.length-1;i++){var o=this.getPoint([t[i],t[i+1]],e);o&&r.push(o)}return this.getPoint(r,e)}}},{key:"offset",value:function(t,e,n){var r=this.cpoints;if(r){for(var i=r.length,o=0;o<i;o++)r[o].x+=t,r[o].y+=e;this.emit("move",{offsetX:t,offsetY:e,trans:n}),this.getLocation(!0)}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmBezier=n.default=t},{"../core/jmPath.js":8}],16:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmCircle=n.default=void 0;var o=t("./jmArc.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmArc);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmCircle";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,t,e)}return t=i,(e=[{key:"initPoints",value:function(){var t=this.getLocation();t.radius||(t.radius=Math.min(t.width,t.height)/2),this.points=[],this.points.push({x:t.center.x-t.radius,y:t.center.y-t.radius}),this.points.push({x:t.center.x+t.radius,y:t.center.y-t.radius}),this.points.push({x:t.center.x+t.radius,y:t.center.y+t.radius}),this.points.push({x:t.center.x-t.radius,y:t.center.y+t.radius})}},{key:"draw",value:function(){var t=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds,e=this.getLocation();e.radius||(e.radius=Math.min(e.width,e.height)/2);var n=this.startAngle,r=this.endAngle,i=this.anticlockwise;this.context.arc(e.center.x+t.left,e.center.y+t.top,e.radius,n,r,i)}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmCircle=n.default=t},{"./jmArc.js":12}],17:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmHArc=n.default=void 0;var o=t("./jmArc.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmArc);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmHArc";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t,e)).minRadius=t.minRadius||e.style.minRadius||0,e.maxRadius=t.maxRadius||e.style.maxRadius||0,e}return t=i,(e=[{key:"minRadius",get:function(){return this.__pro("minRadius")},set:function(t){return this.needUpdate=!0,this.__pro("minRadius",t)}},{key:"maxRadius",get:function(){return this.__pro("maxRadius")},set:function(t){return this.needUpdate=!0,this.__pro("maxRadius",t)}},{key:"initPoints",value:function(){var t,e=this.getLocation(),n=this.minRadius,r=this.maxRadius,i=this.startAngle,o=this.endAngle;this.anticlockwise&&(i=(t=2*Math.PI)-i,o=t-o);var s=.1;o<i&&(s=-s);for(var u=[],c=[],a=i;;a+=s){(0<s&&o<a||s<0&&a<o)&&(a=o);var f=Math.cos(a),h=Math.sin(a),l={x:f*n+e.center.x,y:h*n+e.center.y},h={x:f*r+e.center.x,y:h*r+e.center.y};if(u.push(l),c.push(h),a===o)break}c.reverse(),this.style&&this.style.close||(c[0].m=!0),this.points=u.concat(c)}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmHArc=n.default=t},{"./jmArc.js":12}],18:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmImage=n.default=void 0;var o=t("../core/jmControl.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmControl);var t,e,n,r=c(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t=t||{},e||"jmImage")).style.fill=e.fill||"transparent",e.sourceWidth=t.sourceWidth,e.sourceHeight=t.sourceHeight,e.sourcePosition=t.sourcePosition,e.image=t.image||e.style.image,e}return t=i,(e=[{key:"sourcePosition",get:function(){return this.__pro("sourcePosition")},set:function(t){return this.__pro("sourcePosition",t)}},{key:"sourceWidth",get:function(){return this.__pro("sourceWidth")},set:function(t){return this.needUpdate=!0,this.__pro("sourceWidth",t)}},{key:"sourceHeight",get:function(){return this.__pro("sourceHeight")},set:function(t){return this.needUpdate=!0,this.__pro("sourceHeight",t)}},{key:"image",get:function(){return this.__pro("image")},set:function(t){return this.needUpdate=!0,this.__pro("image",t)}},{key:"draw",value:function(){var t=this;try{var e,n=this.getImage();this.graph.isWXMiniApp&&this.graph.canvas&&"string"==typeof n?((e=this.graph.canvas.createImage()).onload=function(){t.drawImg(e)},e.src=n):this.drawImg(n)}catch(t){console.error&&console.error(t)}}},{key:"drawImg",value:function(t){var e,n,r,i;t?(i=(i=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds)||(this.parent&&this.parent.getAbsoluteBounds?this.parent:this).getAbsoluteBounds(),(e=this.getLocation()).left+=i.left,e.top+=i.top,n=this.sourcePosition,r=this.sourceWidth,i=this.sourceHeight,n||void 0!==r||void 0!==i?(void 0===r&&(r=e.width||t.width||0),void 0===i&&(i=e.height||t.height||0),n=n||{x:0,y:0},e.width&&e.height?this.context.drawImage(t,n.x,n.y,r,i,e.left,e.top,e.width,e.height):e.width?this.context.drawImage(t,n.x,n.y,r,i,e.left,e.top,e.width,i):e.height?this.context.drawImage(t,n.x,n.y,r,i,e.left,e.top,r,e.height):this.context.drawImage(t,n.x,n.y,r,i,e.left,e.top,r,i)):e?e.width&&e.height?this.context.drawImage(t,e.left,e.top,e.width,e.height):e.width?this.context.drawImage(t,e.left,e.top,e.width,t.height):e.height?this.context.drawImage(t,e.left,e.top,t.width,e.height):this.context.drawImage(t,e.left,e.top):this.context.drawImage(t)):console.warn("image is empty")}},{key:"getBounds",value:function(){var t={},e=this.getImage(),n=this.getLocation(),r=n.width||e.width,e=n.height||e.height;return t.left=n.left,t.top=n.top,t.right=n.left+r,t.bottom=n.top+e,t.width=r,t.height=e,t}},{key:"getImage",value:function(){var t=this.image||this.style.src||this.style.image;return this.__img&&this.__img.src&&-1!=this.__img.src.indexOf(t)||((!t||!t.src)&&"undefined"!=typeof document&&document.createElement?(this.__img=document.createElement("img"),t&&"string"==typeof t&&(this.__img.src=t)):this.__img=t),this.__img}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmImage=n.default=t},{"../core/jmControl.js":2}],19:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmLabel=n.default=void 0;var o=t("../core/jmControl.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){t=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(n):e.value}})(t,e,n||t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=f(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=f(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(i,o.jmControl);var t,e,n,r=a(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t=t||{},e||"jmLabel")).style.font=e.style.font||"15px Arial",e.style.fontFamily=e.style.fontFamily||"Arial",e.style.fontSize=e.style.fontSize||15,e.style.textAlign=e.style.textAlign||"left",e.style.textBaseline=e.style.textBaseline||"middle",e.text=t.text||"",e.center=t.center||null,e}return t=i,(e=[{key:"text",get:function(){return this.__pro("text")},set:function(t){return this.needUpdate=!0,this.__pro("text",t)}},{key:"center",get:function(){return this.__pro("center")},set:function(t){return this.needUpdate=!0,this.__pro("center",t)}},{key:"position",get:function(){return this.__pro("position")},set:function(t){return this.needUpdate=!0,this.__pro("position",t)}},{key:"getLocation",value:function(){var t=u(f(i.prototype),"getLocation",this).call(this),e=this.testSize();return t.width=t.width||e.width,t.height=t.height||e.height,t.left||t.top||!t.center||(t.left=t.center.x-t.width/2,t.top=t.center.y-t.height/2),t}},{key:"initPoints",value:function(){this.__size=null;var t=this.getLocation();return this.points=[{x:t.left,y:t.top}],this.points.push({x:t.left+t.width,y:t.top}),this.points.push({x:t.left+t.width,y:t.top+t.height}),this.points.push({x:t.left,y:t.top+t.height}),this.points}},{key:"testSize",value:function(){return this.__size||(this.context.save(),this.setStyle({font:this.style.font||this.style.fontSize+"px "+this.style.fontFamily}),this.__size=this.context.measureText?this.context.measureText(this.text):{width:15},this.context.restore(),this.__size.height=this.style.fontSize||15,this.width||(this.width=this.__size.width),this.height||(this.height=this.__size.height),this.__size)}},{key:"draw",value:function(){var t=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds,e=(this.testSize(),this.location),n=e.left+t.left,r=e.top+t.top;switch(this.style.textAlign){case"right":n+=e.width;break;case"center":n+=e.width/2}switch(this.style.textBaseline){case"bottom":r+=e.height;break;case"hanging":case"alphabetic":case"middle":r+=e.height/2}var i=this.text;void 0!==i&&(this.style.fill&&this.context.fillText?this.style.maxWidth?this.context.fillText(i,n,r,this.style.maxWidth):this.context.fillText(i,n,r):this.context.strokeText&&(this.style.maxWidth?this.context.strokeText(i,n,r,this.style.maxWidth):this.context.strokeText(i,n,r))),this.style.border&&(this.style.border.style&&(this.context.save(),this.setStyle(this.style.border.style)),this.context.moveTo(this.points[0].x+t.left,this.points[0].y+t.top),this.style.border.top&&this.context.lineTo(this.points[1].x+t.left,this.points[1].y+t.top),this.style.border.right&&(this.context.moveTo(this.points[1].x+t.left,this.points[1].y+t.top),this.context.lineTo(this.points[2].x+t.left,this.points[2].y+t.top)),this.style.border.bottom&&(this.context.moveTo(this.points[2].x+t.left,this.points[2].y+t.top),this.context.lineTo(this.points[3].x+t.left,this.points[3].y+t.top)),this.style.border.left&&(this.context.moveTo(this.points[3].x+t.left,this.points[3].y+t.top),this.context.lineTo(this.points[0].x+t.left,this.points[0].y+t.top)),this.style.border.style&&this.context.restore())}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmLabel=n.default=t},{"../core/jmControl.js":2}],20:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmLine=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmPath);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmLine";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t,e)).start=t.start||{x:0,y:0},e.end=t.end||{x:0,y:0},e.style.lineType=e.style.lineType||"solid",e.style.dashLength=e.style.dashLength||4,e}return t=i,(e=[{key:"start",get:function(){return this.__pro("start")},set:function(t){return this.needUpdate=!0,this.__pro("start",t)}},{key:"end",get:function(){return this.__pro("end")},set:function(t){return this.needUpdate=!0,this.__pro("end",t)}},{key:"initPoints",value:function(){var t=this.start,e=this.end;if(this.points=[],this.points.push(t),"dotted"===this.style.lineType){var n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r);n/=i,r/=i;for(var o=!1,s=this.style.dashLength||5,u=s/2,c=s;c<=i;)0==o?(this.points.push({x:t.x+n*c,y:t.y+r*c}),c+=u):(this.points.push({x:t.x+n*c,y:t.y+r*c,m:!0}),c+=s),o=!o}return this.points.push(e),this.points}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmLine=n.default=t},{"../core/jmPath.js":8}],21:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmPrismatic=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmPath);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmPrismatic";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t,e)).style.close=void 0===e.style.close||e.style.close,e.center=t.center||{x:0,y:0},e.width=t.width||0,e.height=t.height||0,e}return t=i,(e=[{key:"center",get:function(){return this.__pro("center")},set:function(t){return this.needUpdate=!0,this.__pro("center",t)}},{key:"initPoints",value:function(){var t=this.getLocation(),e=t.width/2,n=t.height/2;this.points=[],this.points.push({x:t.center.x-e,y:t.center.y}),this.points.push({x:t.center.x,y:t.center.y+n}),this.points.push({x:t.center.x+e,y:t.center.y}),this.points.push({x:t.center.x,y:t.center.y-n})}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmPrismatic=n.default=t},{"../core/jmPath.js":8}],22:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmRect=n.default=void 0;var o=t("../core/jmPath.js"),f=t("./jmArc.js"),h=t("./jmLine.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmPath);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmRect";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t=t||{},e)).style.close=!0,e.radius=t.radius||e.style.radius||0,e}return t=i,(e=[{key:"radius",get:function(){return this.__pro("radius")},set:function(t){return this.needUpdate=!0,this.__pro("radius",t)}},{key:"position",get:function(){return this.__pro("position")},set:function(t){return this.needUpdate=!0,this.__pro("position",t)}},{key:"getBounds",value:function(){var t={};this.initPoints();var e=this.getLocation();return t.left=e.left,t.top=e.top,t.right=e.left+e.width,t.bottom=e.top+e.height,t.width=t.right-t.left,t.height=t.bottom-t.top,t}},{key:"initPoints",value:function(){var t,e,n,r,i,o=this.getLocation(),s={x:o.left,y:o.top},u={x:o.left+o.width,y:o.top},c={x:o.left+o.width,y:o.top+o.height},a={x:o.left,y:o.top+o.height};return"dotted"!==this.style.lineType||this.dottedLine||(this.dottedLine=this.graph.createShape(h.jmLine,{style:this.style})),o.radius&&o.radius<o.width/2&&o.radius<o.height/2?(t=Math.PI/2,(i=this.graph.createShape(f.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:o.left+o.radius,y:o.top+o.radius},i.startAngle=Math.PI,i.endAngle=Math.PI+t,e=i.initPoints(),(i=this.graph.createShape(f.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:u.x-o.radius,y:u.y+o.radius},i.startAngle=Math.PI+t,i.endAngle=2*Math.PI,n=i.initPoints(),(i=this.graph.createShape(f.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:c.x-o.radius,y:c.y-o.radius},i.startAngle=0,i.endAngle=t,r=i.initPoints(),(i=this.graph.createShape(f.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:a.x+o.radius,y:a.y-o.radius},i.startAngle=t,i.endAngle=Math.PI,i=i.initPoints(),this.points=e.concat(n,r,i)):(this.points=[],this.points.push(s),this.dottedLine&&(this.dottedLine.start=s,this.dottedLine.end=u,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(u),this.dottedLine&&(this.dottedLine.start=u,this.dottedLine.end=c,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(c),this.dottedLine&&(this.dottedLine.start=c,this.dottedLine.end=a,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(a),this.dottedLine&&(this.dottedLine.start=a,this.dottedLine.end=s,this.points=this.points.concat(this.dottedLine.initPoints()))),this.points}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmRect=n.default=t},{"../core/jmPath.js":8,"./jmArc.js":12,"./jmLine.js":20}],23:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmResize=n.default=void 0;var o=t("./jmRect.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmRect);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmResize";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t=t||{},e)).resizable=!1!==t.resizable,e.movable=t.movable,e.rectSize=t.rectSize||8,e.style.close=e.style.close||!0,e.init(t),e}return t=i,(e=[{key:"rectSize",get:function(){return this.__pro("rectSize")},set:function(t){return this.__pro("rectSize",t)}},{key:"resizable",get:function(){return this.__pro("resizable")},set:function(t){return this.__pro("resizable",t)}},{key:"init",value:function(t){if(!1!==this.resizable){this.resizeRects=[];var e=this.rectSize,n=this.style.rectStyle||{stroke:"red",fill:"transparent",lineWidth:2,close:!0,zIndex:100};n.close=!0,n.fill=n.fill||"transparent";for(var r=0;r<8;r++){var i=(this.graph||t.graph).createShape(o.jmRect,{position:{x:0,y:0},width:e,height:e,style:n,interactive:!0});i.index=r,i.visible=!0,this.resizeRects.push(i),this.children.add(i),i.canMove(!0,this.graph)}this.reset(0,0,0,0),this.bindRectEvents()}}},{key:"bindRectEvents",value:function(){for(var t=0;t<this.resizeRects.length;t++){var e=this.resizeRects[t];e.on("move",function(t){var e=0,n=0,r=0,i=0;0==this.index?(r=-t.offsetX,e=t.offsetX):1==this.index?(r=-t.offsetX,e=t.offsetX,i=-t.offsetY,n=t.offsetY):2==this.index?(i=-t.offsetY,n=t.offsetY):3==this.index?(r=t.offsetX,i=-t.offsetY,n=t.offsetY):4==this.index?r=t.offsetX:5==this.index?(r=t.offsetX,i=t.offsetY):6==this.index?i=t.offsetY:7==this.index&&(r=-t.offsetX,r=-t.offsetX,e=t.offsetX,i=t.offsetY),this.parent.reset(e,n,r,i),this.needUpdate=!0}),e.bind("mousemove",function(){this.cursor=["w-resize","nw-resize","n-resize","ne-resize","e-resize","se-resize","s-resize","sw-resize"][this.index]}),e.bind("mouseleave",function(){this.cursor="default"})}}},{key:"reset",value:function(t,e,n,r){var i,o,s,u=void 0===this.style.minWidth?5:this.style.minWidth,c=void 0===this.style.minHeight?5:this.style.minHeight,a=this.getLocation();for(s in 0==n&&0==r||(i=a.width+n,o=a.height+r,(u<=i||c<=o)&&(u<=i?this.width=i:n=t=0,c<=o?this.height=o:r=e=0,!1!==this.movable&&(t||e)&&((o=this.position).x=a.left+t,o.y=a.top+e,this.position=o),this.emit("resize",t,e,n,r))),this.resizeRects){var f=this.resizeRects[s];switch(f.index){case 0:f.position.x=-f.width/2,f.position.y=(a.height-f.height)/2;break;case 1:f.position.x=-f.width/2,f.position.y=-f.height/2;break;case 2:f.position.x=(a.width-f.width)/2,f.position.y=-f.height/2;break;case 3:f.position.x=a.width-f.width/2,f.position.y=-f.height/2;break;case 4:f.position.x=a.width-f.width/2,f.position.y=(a.height-f.height)/2;break;case 5:f.position.x=a.width-f.width/2,f.position.y=a.height-f.height/2;break;case 6:f.position.x=(a.width-f.height)/2,f.position.y=a.height-f.height/2;break;case 7:f.position.x=-f.width/2,f.position.y=a.height-f.height/2}}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmResize=n.default=t},{"./jmRect.js":22}]},{},[1])(1);return i.jmGraph=r},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t.bind(i)):t()}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
1
+ !function(i){var t;t=function(t,e,n){var r=function r(i,o,s){function u(e,t){if(!o[e]){if(!i[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(c)return c(e,!0);throw(n=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",n}n=o[e]={exports:{}},i[e][0].call(n.exports,function(t){return u(i[e][1][t]||t)},n,n.exports,r,i,o,s)}return o[e].exports}for(var c="function"==typeof require&&require,t=0;t<s.length;t++)u(s[t]);return u}({1:[function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"jmArc",{enumerable:!0,get:function(){return i.jmArc}}),Object.defineProperty(n,"jmArrow",{enumerable:!0,get:function(){return o.jmArrow}}),Object.defineProperty(n,"jmBezier",{enumerable:!0,get:function(){return s.jmBezier}}),Object.defineProperty(n,"jmCircle",{enumerable:!0,get:function(){return u.jmCircle}}),Object.defineProperty(n,"jmHArc",{enumerable:!0,get:function(){return c.jmHArc}}),Object.defineProperty(n,"jmLine",{enumerable:!0,get:function(){return a.jmLine}}),Object.defineProperty(n,"jmPrismatic",{enumerable:!0,get:function(){return f.jmPrismatic}}),Object.defineProperty(n,"jmRect",{enumerable:!0,get:function(){return h.jmRect}}),Object.defineProperty(n,"jmArrowLine",{enumerable:!0,get:function(){return l.jmArrowLine}}),Object.defineProperty(n,"jmImage",{enumerable:!0,get:function(){return p.jmImage}}),Object.defineProperty(n,"jmLabel",{enumerable:!0,get:function(){return y.jmLabel}}),Object.defineProperty(n,"jmResize",{enumerable:!0,get:function(){return d.jmResize}}),Object.defineProperty(n,"jmUtils",{enumerable:!0,get:function(){return m.jmUtils}}),Object.defineProperty(n,"jmList",{enumerable:!0,get:function(){return m.jmList}}),Object.defineProperty(n,"jmShadow",{enumerable:!0,get:function(){return m.jmShadow}}),Object.defineProperty(n,"jmGradient",{enumerable:!0,get:function(){return m.jmGradient}}),Object.defineProperty(n,"jmControl",{enumerable:!0,get:function(){return m.jmControl}}),Object.defineProperty(n,"jmPath",{enumerable:!0,get:function(){return m.jmPath}}),n.create=n.jmGraph=n.default=void 0;var i=t("./src/shapes/jmArc.js"),o=t("./src/shapes/jmArrow.js"),s=t("./src/shapes/jmBezier.js"),u=t("./src/shapes/jmCircle.js"),c=t("./src/shapes/jmHArc.js"),a=t("./src/shapes/jmLine.js"),f=t("./src/shapes/jmPrismatic.js"),h=t("./src/shapes/jmRect.js"),l=t("./src/shapes/jmArrowLine.js"),p=t("./src/shapes/jmImage.js"),y=t("./src/shapes/jmLabel.js"),d=t("./src/shapes/jmResize.js"),m=t("./src/core/jmGraph.js");function v(t,e,n){return(v=j()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);r=new(Function.bind.apply(t,r));return n&&b(r,n.prototype),r}).apply(null,arguments)}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function g(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}function j(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function w(t){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var _={arc:i.jmArc,arrow:o.jmArrow,bezier:s.jmBezier,circle:u.jmCircle,harc:c.jmHArc,line:a.jmLine,prismatic:f.jmPrismatic,rect:h.jmRect,arrowline:l.jmArrowLine,image:p.jmImage,img:p.jmImage,label:y.jmLabel,resize:d.jmResize},x=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}(s,m.jmGraph);var n,r,e=(n=s,r=j(),function(){var t,e=w(n);return g(this,r?(t=w(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))});function s(r,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s);var t=this instanceof s?this.constructor:void 0;return(i=Object.assign({},i)).shapes=Object.assign(_,i.shapes||{}),t&&t.prototype instanceof m.jmGraph?("function"==typeof i&&(o=i,i={}),e.call(this,r,i,o)):g(void 0,new Promise(function(t,e){var n=new s(r,i,o);t&&t(n)}))}return s}();n.jmGraph=n.default=x;n.create=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return v(x,e)}},{"./src/core/jmGraph.js":5,"./src/shapes/jmArc.js":12,"./src/shapes/jmArrow.js":13,"./src/shapes/jmArrowLine.js":14,"./src/shapes/jmBezier.js":15,"./src/shapes/jmCircle.js":16,"./src/shapes/jmHArc.js":17,"./src/shapes/jmImage.js":18,"./src/shapes/jmLabel.js":19,"./src/shapes/jmLine.js":20,"./src/shapes/jmPrismatic.js":21,"./src/shapes/jmRect.js":22,"./src/shapes/jmResize.js":23}],2:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmControl=n.default=void 0;var h=t("./jmUtils.js"),o=t("./jmList.js"),l=t("./jmGradient.js"),p=t("./jmShadow.js"),s=t("./jmProperty.js");function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,e=function(){};return{s:e,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=i(n);return function(t,e){{if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=i(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var m={fill:"fillStyle",stroke:"strokeStyle","shadow.blur":"shadowBlur","shadow.x":"shadowOffsetX","shadow.y":"shadowOffsetY","shadow.color":"shadowColor",lineWidth:"lineWidth",miterLimit:"miterLimit",fillStyle:"fillStyle",strokeStyle:"strokeStyle",font:"font",opacity:"globalAlpha",textAlign:"textAlign",textBaseline:"textBaseline",shadowBlur:"shadowBlur",shadowOffsetX:"shadowOffsetX",shadowOffsetY:"shadowOffsetY",shadowColor:"shadowColor",lineJoin:"lineJoin",lineCap:"lineCap"},t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(i,s.jmProperty);var t,e,n,r=d(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t=t||{},(n=r.call(this)).__pro("type",e||(this instanceof i?this.constructor:void 0).name),n.style=t&&t.style?t.style:{},n.width=t.width||0,n.height=t.height||0,t.position&&(n.position=t.position),n.graph=t.graph||null,n.zIndex=t.zIndex||0,n.interactive=void 0===t.interactive||t.interactive,n.initializing(),n.on=n.bind,n.option=t,n}return t=i,(e=[{key:"type",get:function(){return this.__pro("type")}},{key:"context",get:function(){var t=this.__pro("context");if(t)return t;if(this.is("jmGraph")&&this.canvas&&this.canvas.getContext)return this.context=this.canvas.getContext("2d");t=this.graph;return t?t.context:t.canvas.getContext("2d")},set:function(t){return this.__pro("context",t)}},{key:"style",get:function(){return this.__pro("style")||this.__pro("style",{})},set:function(t){return this.needUpdate=!0,this.__pro("style",t)}},{key:"visible",get:function(){var t=this.__pro("visible");return t=void 0===t?this.__pro("visible",!0):t},set:function(t){return this.needUpdate=!0,this.__pro("visible",t)}},{key:"interactive",get:function(){return this.__pro("interactive")},set:function(t){return this.__pro("interactive",t)}},{key:"children",get:function(){return this.__pro("children")||this.__pro("children",new o.jmList)},set:function(t){return this.needUpdate=!0,this.__pro("children",t)}},{key:"width",get:function(){var t=this.__pro("width");return t=void 0===t?this.__pro("width",0):t},set:function(t){return this.needUpdate=!0,this.__pro("width",t)}},{key:"height",get:function(){var t=this.__pro("height");return t=void 0===t?this.__pro("height",0):t},set:function(t){return this.needUpdate=!0,this.__pro("height",t)}},{key:"zIndex",get:function(){return this.__pro("zIndex")||this.__pro("zIndex",0)},set:function(t){return this.needUpdate=!0,this.__pro("zIndex",t),this.children.sort(),this.needUpdate=!0,t}},{key:"cursor",get:function(){var t=this.graph;if(t)return t.css("cursor")},set:function(t){var e=this.graph;e&&e.css("cursor",t)}},{key:"initializing",value:function(){var e=this;this.children=this.children||new o.jmList;var n=this.children.add;this.children.add=function(t){if("object"===y(t))return t.parent&&t.parent!=e&&t.parent.children&&t.parent.children.remove(t),t.parent=e,this.contain(t)&&this.oremove(t),n.call(this,t),t.emit("add",t),e.needUpdate=!0,e.graph&&(t.graph=e.graph),this.sort(),t},this.children.oremove=this.children.remove,this.children.remove=function(t){"object"===y(t)&&(t.parent=null,t.graph=null,t.remove(!0),this.oremove(t),e.needUpdate=!0)},this.children.sort=function(){var t,r={};for(t in this.each(function(t,e){var n;e&&(!(n=e.zIndex)&&e.style&&e.style.zIndex&&(n=Number(e.style.zIndex),isNaN(n)&&(n=e.style.zIndex||0)),(r[n]||(r[n]=[])).push(e))}),this.splice(0,this.length),r)n.call(this,r[t])},this.children.clear=function(){this.each(function(t,e){this.remove(e)},!0)},this.needUpdate=!0}},{key:"setStyle",value:function(t){var f=this;if(t=t||h.jmUtils.clone(this.style,!0)){var e,n,r=function t(e,n,r){if(e){if("function"==typeof(u=e))try{u=u.call(f)}catch(t){return void console.warn(t)}var i=y(u),r=m[r||n];if(u instanceof l.jmGradient||"string"==i&&-1<u.indexOf("-gradient"))t((u="string"==i&&-1<u.indexOf("-gradient")?new l.jmGradient(u):u).toGradient(f),r||n);else if(r)"string"==i&&-1<["fillStyle","strokeStyle","shadowColor"].indexOf(r)&&(u=h.jmUtils.toColor(u)),f.context[r]=u;else switch(n){case"shadow":if("string"==i){t(new p.jmShadow(u),n);break}for(var o in u)t(u[o],o,n+"."+o);break;case"translate":f.context.translate(u.x,u.y);break;case"rotation":if(!u.angle)break;var s,u,c=0,a=0;u.point&&(s=f.absoluteBounds||f.getAbsoluteBounds(),c=(u=f.getRotation(u)).rotateX+s.left,a=u.rotateY+s.top),0==c&&0==a||f.context.translate(c,a),f.context.rotate(u.angle),0==c&&0==a||f.context.translate(-c,-a);break;case"transform":Array.isArray(u)?f.context.transform.apply(f.context,u):"object"==y(u)&&f.context.transform(u.scaleX,u.skewX,u.skewY,u.scaleY,u.offsetX,u.offsetY);break;case"cursor":f.cursor=u}}};for(e in this.translate&&r(this.translate,"translate"),this.transform&&r(this.transform,"transform"),t)"constructor"!==e&&("string"==(n=y(t[e]))&&-1<t[e].indexOf("-gradient")?t[e]=new l.jmGradient(t[e]):"string"==n&&"shadow"==e&&(t[e]=new p.jmShadow(t[e])),r(t[e],e))}}},{key:"getBounds",value:function(t){if(this.bounds&&!t)return this.bounds;var e={};if("jmGraph"==this.type&&this.canvas)"function"==typeof this.canvas.width?e.right=this.canvas.width():this.width&&(e.right=this.width),"function"==typeof this.canvas.height?e.bottom=this.canvas.height():this.height&&(e.bottom=this.height);else if(this.points&&0<this.points.length)for(var n in this.points){n=this.points[n];(void 0===e.left||e.left>n.x)&&(e.left=n.x),(void 0===e.top||e.top>n.y)&&(e.top=n.y),(void 0===e.right||e.right<n.x)&&(e.right=n.x),(void 0===e.bottom||e.bottom<n.y)&&(e.bottom=n.y)}else!this.getLocation||(t=this.getLocation())&&(e.left=t.left,e.top=t.top,e.right=t.left+t.width,e.bottom=t.top+t.height);return e.left||(e.left=0),e.top||(e.top=0),e.right||(e.right=0),e.bottom||(e.bottom=0),e.width=e.right-e.left,e.height=e.bottom-e.top,this.bounds=e}},{key:"getLocation",value:function(){var t=this.location={left:0,top:0,width:0,height:0};t.position="function"==typeof this.position?this.position():h.jmUtils.clone(this.position),t.center=this.center&&"function"==typeof this.center?this.center():h.jmUtils.clone(this.center),t.start=this.start&&"function"==typeof this.start?this.start():h.jmUtils.clone(this.start),t.end=this.end&&"function"==typeof this.end?this.end():h.jmUtils.clone(this.end),t.radius=this.radius,t.width=this.width,t.height=this.height;var e=h.jmUtils.clone(this.style.margin,{});if(e.left=e.left||0,e.top=e.top||0,e.right=e.right||0,e.bottom=e.bottom||0,t.position?(t.left=t.position.x,t.top=t.position.y):(t.left=e.left,t.top=e.top),!this.parent)return t;e=this.parent.getBounds();return h.jmUtils.checkPercent(t.left)&&(t.left=h.jmUtils.percentToNumber(t.left)*e.width),h.jmUtils.checkPercent(t.top)&&(t.top=h.jmUtils.percentToNumber(t.top)*e.height),h.jmUtils.checkPercent(t.width)&&(t.width=h.jmUtils.percentToNumber(t.width)*e.width),h.jmUtils.checkPercent(t.height)&&(t.height=h.jmUtils.percentToNumber(t.height)*e.height),t.center&&(h.jmUtils.checkPercent(t.center.x)&&(t.center.x=h.jmUtils.percentToNumber(t.center.x)*e.width),h.jmUtils.checkPercent(t.center.y)&&(t.center.y=h.jmUtils.percentToNumber(t.center.y)*e.height)),t.radius&&h.jmUtils.checkPercent(t.radius)&&(t.radius=h.jmUtils.percentToNumber(t.radius)*Math.min(e.width,e.height)),t}},{key:"getRotation",value:function(t){var e;return(t=t||this.style.rotation)?(e=this.getBounds(),t.rotateX=t.point.x,h.jmUtils.checkPercent(t.rotateX)&&(t.rotateX=h.jmUtils.percentToNumber(t.rotateX)*e.width),t.rotateY=t.point.y,h.jmUtils.checkPercent(t.rotateY)&&(t.rotateY=h.jmUtils.percentToNumber(t.rotateY)*e.height)):(t=this.parent&&this.parent.getRotation?this.parent.getRotation():null)&&(e=this.getBounds(),t.rotateX-=e.left,t.rotateY-=e.top),t}},{key:"remove",value:function(){this.parent&&this.parent.children.remove(this)}},{key:"offset",value:function(t,e,n,r){n=!1!==n;var i=this.getLocation(!0),o=!1;if(i.position&&(i.left+=t,i.top+=e,this.position.x=i.left,this.position.y=i.top,o=!0),i.center&&(this.center.x=i.center.x+t,this.center.y=i.center.y+e,o=!0),i.start&&"object"==y(i.start)&&(this.start.x=i.start.x+t,this.start.y=i.start.y+e,o=!0),i.end&&"object"==y(i.end)&&(this.end.x=i.end.x+t,this.end.y=i.end.y+e,o=!0),0==o&&this.cpoints){var s=(this.cpoints,this.cpoints);if(s){for(var u=s.length,c=0;c<u;c++)s[c].x+=t,s[c].y+=e;o=!0}}if(0==o&&this.points){for(var a=this.points.length,f=0;f<a;f++)this.points[f].x+=t,this.points[f].y+=e;o=!0}this.emit("move",{offsetX:t,offsetY:e,trans:n,evt:r}),this.needUpdate=!0}},{key:"rotate",value:function(t,e){this.style.rotation={angle:t,point:e},this.needUpdate=!0}},{key:"getAbsoluteBounds",value:function(){var t=this.getBounds();if(this.parent&&this.parent.absoluteBounds){var e=this.parent.absoluteBounds||this.parent.getAbsoluteBounds();return{left:e.left+t.left,top:e.top+t.top,right:e.left+t.right,bottom:e.top+t.bottom,width:t.width,height:t.height}}return t}},{key:"beginDraw",value:function(){this.getLocation(!0),this.context.beginPath()}},{key:"endDraw",value:function(){this.style.close&&this.context.closePath(),this.style.fill&&this.context.fill(),!this.style.stroke&&this.style.fill||this.context.stroke(),this.needUpdate=!1}},{key:"draw",value:function(){if(this.points&&0<this.points.length){var t=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds;this.context.moveTo(this.points[0].x+t.left,this.points[0].y+t.top);for(var e=this.points.length,n=1;n<e;n++){var r=this.points[n];r.m?this.context.moveTo(r.x+t.left,r.y+t.top):this.context.lineTo(r.x+t.left,r.y+t.top)}}}},{key:"paint",value:function(t){!1!==t&&!1!==this.visible&&(this.initPoints&&this.initPoints(),this.bounds=null,this.absoluteBounds=this.getAbsoluteBounds(),t=!0,!this.is("jmGraph")&&this.graph&&(this.absoluteBounds.left>=this.graph.width||this.absoluteBounds.top>=this.graph.height||this.absoluteBounds.right<=0||this.absoluteBounds.bottom<=0)&&(t=!1),this.context.save(),this.emit("beginDraw",this),this.setStyle(),t&&this.beginDraw&&this.beginDraw(),t&&this.draw&&this.draw(),t&&this.endDraw&&this.endDraw(),this.children&&this.children.each(function(t,e){e&&e.paint&&e.paint()}),this.emit("endDraw",this),this.context.restore(),this.needUpdate=!1)}},{key:"getEvent",value:function(t){return this.__events?this.__events[t]:null}},{key:"bind",value:function(t,e){if(t&&-1<t.indexOf(" ")){var n,r=u(t=t.split(" "));try{for(r.s();!(n=r.n()).done;){var i=n.value;i&&this.bind(i,e)}}catch(t){r.e(t)}finally{r.f()}}else{t=this.getEvent(t)||function(t,e){return this.__events||(this.__events={}),this.__events[t]=e}.call(this,t,new o.jmList);t.contain(e)||t.add(e)}}},{key:"unbind",value:function(t,e){if(t&&-1<t.indexOf(" ")){var n,r=u(t=t.split(" "));try{for(r.s();!(n=r.n()).done;){var i=n.value;i&&this.unbind(i,e)}}catch(t){r.e(t)}finally{r.f()}}else{t=this.getEvent(t);t&&(e?t.remove(e):t.clear())}}},{key:"emit",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.runEventHandle(e[0],e.slice(1)),this}},{key:"runEventHandle",value:function(t,n){var r,t=this.getEvent(t);return t&&(r=this,Array.isArray(n)||(n=[n]),t.each(function(t,e){!1===e.apply(r,n)&&(n.cancel=!0)})),n.cancel}},{key:"checkPoint",value:function(t,e){if("jmGraph"==this.type){var n=this.getPosition(),r=n.left+this.width,i=n.top+this.height;return t.pageX>r||t.pageX<n.left?!1:!(t.pageY>i||t.pageY<n.top)}var i=this.getBounds(),n=this.getRotation(),o=this.points;if(o&&o.length||((o=[]).push({x:i.left,y:i.top}),o.push({x:i.right,y:i.top}),o.push({x:i.right,y:i.bottom}),o.push({x:i.left,y:i.bottom}),o.push({x:i.left,y:i.top})),e=Number(e||this.style.touchPadding||this.style.lineWidth||1),o&&o.length){if(n&&0!=n.angle&&(o=h.jmUtils.clone(o,!0),o=h.jmUtils.rotatePoints(o,{x:n.rotateX+i.left,y:n.rotateY+i.top},n.angle)),2<o.length&&(!this.style.fill||this.style.stroke)){for(var s=0,u=o.length,c=s+1;c<=u;c=++s+1)if(c==u){if(this.style.close)if(h.jmUtils.pointInPolygon(t,[o[s],o[0]],e))return!0}else if(h.jmUtils.pointInPolygon(t,[o[s],o[c]],e))return!0;if(!this.style.fill)return!1}return h.jmUtils.pointInPolygon(t,o,e)}return!(t.x>i.right||t.x<i.left)&&!(t.y>i.bottom||t.y<i.top)}},{key:"raiseEvent",value:function(n,r){if(!1!==this.visible){var t;r.position||(t=this.graph,e=r.srcElement||r.target,t=h.jmUtils.getEventPosition(r,t.scaleSize),r={position:t,button:0==r.button||t.isTouch?1:r.button,keyCode:r.keyCode||r.charCode||r.which,ctrlKey:r.ctrlKey,cancel:!1,event:r,srcElement:e}),r.path=r.path||[];var i=!1;if(this.children&&this.children.each(function(t,e){if(!0!==r.cancel&&(i=!1===e.raiseEvent(n,r)||i))return!1},!0),i)return!1;var e=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds;if(!e)return!1;r.position.x=r.position.offsetX-e.left,r.position.y=r.position.offsetY-e.top;e=!1!==this.interactive&&this.checkPoint(r.position);return e?(r.target||(r.target=this),this.runEventAndPopEvent(n,r),this.focused||"mousemove"!==n&&"touchmove"!==n||(this.focused=!0,this.raiseEvent("mousemove"===n?"mouseover":"touchover",r))):!1===this.interactive||e||!this.focused||"mousemove"!==n&&"touchmove"!==n||(this.focused=!1,this.runEventHandle("mousemove"===n?"mouseleave":"touchleave",r)),!1===r.cancel}}},{key:"runEventAndPopEvent",value:function(t,e){!0!==e.cancel&&(e.path.push(this),this.runEventHandle(t,e))}},{key:"clearEvents",value:function(t){t=this.getEvent(t);t&&t.clear}},{key:"findParent",value:function(t){if("string"==typeof t){if(this.type==t)return this}else if(this.is(t))return this;return this.parent?this.parent.findParent(t):null}},{key:"canMove",value:function(t,e){var s;return this.__mvMonitor||(this.__mvMonitor={},this.__mvMonitor.mouseDown=!1,this.__mvMonitor.curposition={x:0,y:0},(s=this).__mvMonitor.mv=function(t){var e=s;if(e.__mvMonitor.mouseDown){e.parent.bounds=null;var n,r=e.parent.getAbsoluteBounds(),i=t.position.offsetX-e.__mvMonitor.curposition.x,o=t.position.offsetY-e.__mvMonitor.curposition.y;return e.lockSide&&(n=e.bounds||e.getAbsoluteBounds(),(n=h.jmUtils.checkOutSide(r,n,{x:i,y:o})).left<0?e.lockSide.left&&(i-=n.left):0<n.right&&e.lockSide.right&&(i-=n.right),n.top<0?e.lockSide.top&&(o-=n.top):0<n.bottom&&e.lockSide.bottom&&(o-=n.bottom)),(i||o)&&(e.offset(i,o,!0,t),e.__mvMonitor.curposition.x=t.position.offsetX,e.__mvMonitor.curposition.y=t.position.offsetY),!1}},this.__mvMonitor.mu=function(t){var e=s;e.__mvMonitor.mouseDown&&(e.__mvMonitor.mouseDown=!1,e.emit("moveend",{position:e.__mvMonitor.curposition}))},this.__mvMonitor.ml=function(){var t=s;if(t.__mvMonitor.mouseDown)return t.__mvMonitor.mouseDown=!1,t.emit("moveend",{position:t.__mvMonitor.curposition}),!1},this.__mvMonitor.md=function(t){if(!this.__mvMonitor.mouseDown)return 0==t.button||1==t.button?(this.__mvMonitor.mouseDown=!0,this.__mvMonitor.curposition.x=t.position.offsetX,this.__mvMonitor.curposition.y=t.position.offsetY,this.emit("movestart",{position:this.__mvMonitor.curposition}),!(t.cancel=!0)):void 0}),e=e||this.graph,!1!==t?(e.bind("mousemove",this.__mvMonitor.mv),e.bind("mouseup",this.__mvMonitor.mu),e.bind("mouseleave",this.__mvMonitor.ml),this.bind("mousedown",this.__mvMonitor.md),e.bind("touchmove",this.__mvMonitor.mv),e.bind("touchend",this.__mvMonitor.mu),this.bind("touchstart",this.__mvMonitor.md)):(e.unbind("mousemove",this.__mvMonitor.mv),e.unbind("mouseup",this.__mvMonitor.mu),e.unbind("mouseleave",this.__mvMonitor.ml),this.unbind("mousedown",this.__mvMonitor.md),e.unbind("touchmove",this.__mvMonitor.mv),e.unbind("touchend",this.__mvMonitor.mu),this.unbind("touchstart",this.__mvMonitor.md)),this}}])&&a(t.prototype,e),n&&a(t,n),i}();n.jmControl=n.default=t},{"./jmGradient.js":4,"./jmList.js":6,"./jmProperty.js":9,"./jmShadow.js":10,"./jmUtils.js":11}],3:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmEvents=n.default=void 0;var o=t("./jmUtils.js");function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}t=function(){function n(t,e){i(this,n),this.container=t,this.target=e||t,this.mouseHandler=new c(this,t,e),this.keyHandler=new a(this,t,e)}return u(n,[{key:"touchStart",value:function(t){if((t=t||window.event).eventName="touchstart",this.container.raiseEvent("touchstart",t),(t.target||t.srcElement)==this.target)return!1}},{key:"touchMove",value:function(t){if((t=t||window.event).eventName="touchmove",this.container.raiseEvent("touchmove",t),(t.target||t.srcElement)==this.target)return!1}},{key:"touchEnd",value:function(t){if((t=t||window.event).eventName="touchend",this.container.raiseEvent("touchend",t),(t.target||t.srcElement)==this.target)return!1}},{key:"touchCancel",value:function(t){if((t=t||window.event).eventName="touchcancel",this.container.raiseEvent("touchcancel",t),(t.target||t.srcElement)==this.target)return!1}},{key:"destroy",value:function(){this.mouseHandler.destroy(),this.keyHandler.destroy()}}]),n}();n.jmEvents=n.default=t;var c=function(){function r(t,e,n){i(this,r),this.instance=t,this.container=e,this.target=n||e,this.eventEvents={},this.init(t,e,n)}return u(r,[{key:"init",value:function(e,n,t){var r=this.target,i=void 0!==("undefined"==typeof document?"undefined":s(document))?document:null;this.eventEvents.mousedown=o.jmUtils.bindEvent(this.target,"mousedown",function(t){(t=t||window.event).eventName="mousedown";n.raiseEvent("mousedown",t)}),this.eventEvents.mousedown=o.jmUtils.bindEvent(this.target,"mousemove",function(t){if((t=t||window.event).eventName="mousemove",(t.target||t.srcElement)==r){n.raiseEvent("mousemove",t);return t.preventDefault&&t.preventDefault(),!1}}),this.eventEvents.mousedown=o.jmUtils.bindEvent(this.target,"mouseover",function(t){(t=t||window.event).eventName="mouseover",n.raiseEvent("mouseover",t)}),this.eventEvents.mouseleave=o.jmUtils.bindEvent(this.target,"mouseleave",function(t){(t=t||window.event).eventName="mouseleave",n.raiseEvent("mouseleave",t)}),this.eventEvents.mouseout=o.jmUtils.bindEvent(this.target,"mouseout",function(t){(t=t||window.event).eventName="mouseout",n.raiseEvent("mouseout",t)}),i&&(this.eventEvents.mouseup=o.jmUtils.bindEvent(i,"mouseup",function(t){if(!((t=t||window.event).eventName="mouseup")===n.raiseEvent("mouseup",t))return t.preventDefault&&t.preventDefault(),!1})),this.eventEvents.dblclick=o.jmUtils.bindEvent(this.target,"dblclick",function(t){(t=t||window.event).eventName="dblclick",n.raiseEvent("dblclick",t)}),this.eventEvents.click=o.jmUtils.bindEvent(this.target,"click",function(t){(t=t||window.event).eventName="click",n.raiseEvent("click",t)}),i&&(this.eventEvents.resize=o.jmUtils.bindEvent(i,"resize",function(t){return(t=t||window.event).eventName="resize",n.raiseEvent("resize",t)})),this.eventEvents.touchstart=o.jmUtils.bindEvent(this.target,"touchstart",function(t){return t.eventName="touchstart",e.touchStart(t)},{passive:!1}),this.eventEvents.touchmove=o.jmUtils.bindEvent(this.target,"touchmove",function(t){return t.eventName="touchmove",e.touchMove(t)},{passive:!1}),i&&(this.eventEvents.touchend=o.jmUtils.bindEvent(i,"touchend",function(t){return t.eventName="touchend",e.touchEnd(t)},{passive:!1})),i&&(this.eventEvents.touchcancel=o.jmUtils.bindEvent(i,"touchcancel",function(t){return t.eventName="touchcancel",e.touchCancel(t)},{passive:!1}))}},{key:"destroy",value:function(){for(var t in this.eventEvents){var e=this.eventEvents[t];e&&e.fun&&o.jmUtils.removeEvent(e.target,t,e.fun)}}}]),r}(),a=function(){function r(t,e,n){i(this,r),this.instance=t,this.container=e,this.target=n||e,this.eventEvents={},this.init(e,n)}return u(r,[{key:"init",value:function(n,t){function r(t){return!(t=t.srcElement||t.target)||"INPUT"!=t.tagName&&"TEXTAREA"!=t.tagName&&"ANCHOR"!=t.tagName&&"FORM"!=t.tagName&&"FILE"!=t.tagName&&"IMG"!=t.tagName&&"HIDDEN"!=t.tagName&&"RADIO"!=t.tagName&&"TEXT"!=t.tagName}var e=void 0!==("undefined"==typeof document?"undefined":s(document))?document:null;e&&(this.eventEvents.keypress=o.jmUtils.bindEvent(e,"keypress",function(t){if(t=t||window.event,r(t)){var e=n.raiseEvent("keypress",t);return!1===e&&t.preventDefault&&t.preventDefault(),e}})),e&&(this.eventEvents.keydown=o.jmUtils.bindEvent(e,"keydown",function(t){if(t=t||window.event,r(t)){var e=n.raiseEvent("keydown",t);return!1===e&&t.preventDefault&&t.preventDefault(),e}})),e&&(this.eventEvents.keyup=o.jmUtils.bindEvent(e,"keyup",function(t){if(t=t||window.event,r(t)){var e=n.raiseEvent("keyup",t);return!1===e&&t.preventDefault&&t.preventDefault(),e}}))}},{key:"destroy",value:function(){for(var t in this.eventEvents){var e=this.eventEvents[t];e&&e.fun&&o.jmUtils.removeEvent(e.target,t,e.fun)}}}]),r}()},{"./jmUtils.js":11}],4:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmGradient=n.default=void 0;var a=t("./jmUtils.js"),i=t("./jmList.js");function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t=function(){function n(t){if(!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.stops=new i.jmList,t&&"object"==o(t))for(var e in t)this[e]=t[e];else"string"==typeof t&&this.fromString(t)}var t,e,r;return t=n,(e=[{key:"addStop",value:function(t,e){this.stops.add({offset:Number(t),color:e})}},{key:"toGradient",value:function(t){var r,e=t.context||t,n=t.absoluteBounds||t.getAbsoluteBounds(),i=this.x1||0,o=this.y1||0,s=this.x2,u=this.y2,c=t.getLocation(),t=0,t=(t=c.radius?2*c.radius:t)||Math.min(c.width,c.height);a.jmUtils.checkPercent(i)&&(i=a.jmUtils.percentToNumber(i)*(n.width||t)),a.jmUtils.checkPercent(s)&&(s=a.jmUtils.percentToNumber(s)*(n.width||t)),a.jmUtils.checkPercent(o)&&(o=a.jmUtils.percentToNumber(o)*(n.height||t)),a.jmUtils.checkPercent(u)&&(u=a.jmUtils.percentToNumber(u)*(n.height||t));c=Number(i)+n.left,i=Number(o)+n.top,o=Number(s)+n.left,s=Number(u)+n.top;return"linear"===this.type?r=e.createLinearGradient(c,i,o,s):"radial"===this.type&&(u=this.r1||0,n=this.r2,a.jmUtils.checkPercent(u)&&(u=a.jmUtils.percentToNumber(u),u*=t),a.jmUtils.checkPercent(n)&&(n=a.jmUtils.percentToNumber(n),n*=t),r=e.createCircularGradient?e.createCircularGradient(c,i,n):e.createRadialGradient(c,i,u,o,s,n)),this.stops.each(function(t,e){var n=a.jmUtils.toColor(e.color);r.addColorStop(e.offset,n)}),r}},{key:"fromString",value:function(t){if(t){var e=t.match(/(linear|radial)-gradient\s*\(\s*([^,]+)\s*,\s*((.|\s)+)\)/i);if(e&&!(e.length<3)){this.type=e[1].toLowerCase();t=a.jmUtils.trim(e[2]).split(/\s+/);"linear"==this.type?t.length<=2?(this.x2=t[0],this.y2=t[1]||0):(this.x1=t[0],this.y1=t[1],this.x2=t[2],this.y2=t[3]):t.length<=3?(this.x2=t[0],this.y2=t[1]||0,this.r2=t[2]||0):(this.x1=t[0],this.y1=t[1],this.r1=t[2],this.x2=t[3],this.y2=t[3],this.r2=t[3]);var n=e[3].match(/((rgb(a)?\s*\([\d,\.\s]+\))|(#[a-zA-Z\d]+))\s+([\d\.]+)/gi);if(n&&n.length)for(var r=0;r<n.length;r++){var i,o=a.jmUtils.trim(n[r]),s=o.lastIndexOf(" ");-1<s&&(i=Number(o.substr(s+1)),s=a.jmUtils.trim(o.substr(0,s)),!isNaN(i)&&s&&this.addStop(i,s))}}}}},{key:"toString",value:function(){var n=this.type+"-gradient(";return"linear"==this.type?n+=this.x1+" "+this.y1+" "+this.x2+" "+this.y2:n+=this.x1+" "+this.y1+" "+this.r1+" "+this.x2+" "+this.y2+" "+this.r2,this.stops.each(function(t,e){n+=","+e.color+" "+e.offset}),n+")"}}])&&s(t.prototype,e),r&&s(t,r),n}();n.jmGradient=n.default=t},{"./jmList.js":6,"./jmUtils.js":11}],5:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"jmUtils",{enumerable:!0,get:function(){return s.jmUtils}}),Object.defineProperty(n,"jmList",{enumerable:!0,get:function(){return r.jmList}}),Object.defineProperty(n,"jmProperty",{enumerable:!0,get:function(){return o.jmProperty}}),Object.defineProperty(n,"jmShadow",{enumerable:!0,get:function(){return u.jmShadow}}),Object.defineProperty(n,"jmGradient",{enumerable:!0,get:function(){return c.jmGradient}}),Object.defineProperty(n,"jmEvents",{enumerable:!0,get:function(){return a.jmEvents}}),Object.defineProperty(n,"jmControl",{enumerable:!0,get:function(){return f.jmControl}}),Object.defineProperty(n,"jmPath",{enumerable:!0,get:function(){return h.jmPath}}),n.jmGraph=n.default=void 0;var s=t("./jmUtils.js"),r=t("./jmList.js"),o=t("./jmProperty.js"),u=t("./jmShadow.js"),c=t("./jmGradient.js"),a=t("./jmEvents.js"),f=t("./jmControl.js"),h=t("./jmPath.js");function l(t,e,n){return(l=m()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);r=new(Function.bind.apply(t,r));return n&&y(r,n.prototype),r}).apply(null,arguments)}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(n){var r=m();return function(){var t,e=v(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=v(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}(o,f.jmControl);var t,e,n,i=d(o);function o(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),"function"==typeof e&&(n=e,e={}),(e=e||{}).mode=e.mode||"2d",e.interactive=!0,(r=i.call(this,e,"jmGraph")).option=e||{},r.devicePixelRatio=1,r.util=r.utils=s.jmUtils,"undefined"!=typeof wx&&wx.canIUse&&wx.canIUse("canvas")?("string"==typeof t&&(t=wx.createSelectorQuery().select("#"+t)),r.isWXMiniApp=!0,r.container=t):("string"==typeof t&&"undefined"!=typeof document?t=document.getElementById(t):t.length&&(t=t[0]),"CANVAS"!=t.tagName?(r.container=t,e=document.createElement("canvas"),t.appendChild(e),e.width=t.offsetWidth||t.clientWidth,e.height=t.offsetHeight||t.clientHeight,t=e):r.container=t.parentElement),r.canvas=t,r.context=t.getContext("2d"),r.__init(n),r}return t=o,n=[{key:"create",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return l(o,e)}}],(e=[{key:"__init",value:function(t){this.shapes=Object.assign({path:h.jmPath},this.option.shapes),this.on("beginDraw",function(){this.context.translate(.5,.5)}),this.on("endDraw",function(){this.context.translate(-.5,-.5)});var e="undefined"!=typeof window&&1<window.devicePixelRatio?window.devicePixelRatio:1;this.isWXMiniApp&&(e=wx.getSystemInfoSync().pixelRatio||1),this.devicePixelRatio=e,this.dprScaleSize=1<this.devicePixelRatio?this.devicePixelRatio:2,0<this.option.width&&(this.width=this.option.width),0<this.option.height&&(this.height=this.option.height),this.resize(),this.eventHandler=new a.jmEvents(this,this.canvas.canvas||this.canvas),this.option.autoRefresh&&this.autoRefresh(),t&&t(this)}},{key:"resize",value:function(t,e){this.canvas&&(this.__normalSize=this.__normalSize||{width:0,height:0},t=t||this.__normalSize.width||this.width,e=e||this.__normalSize.height||this.height,t&&(this.__normalSize.width=t),e&&(this.__normalSize.height=e),this.css("width",t+"px"),this.css("height",e+"px"),this.canvas.height=e*this.dprScaleSize,this.canvas.width=t*this.dprScaleSize,this.context.scale(this.dprScaleSize,this.dprScaleSize))}},{key:"pointToPixes",value:function(t){return t=this.dprScaleSize&&1!==this.dprScaleSize?Object.assign({},t,{x:t.x/this.dprScaleSize,y:t.y/this.dprScaleSize}):t}},{key:"width",get:function(){return this.__normalSize&&this.__normalSize.width?this.__normalSize.width:this.canvas?this.canvas.width:0},set:function(t){return this.needUpdate=!0,this.canvas&&this.resize(t),t}},{key:"height",get:function(){return this.__normalSize&&this.__normalSize.height?this.__normalSize.height:this.canvas?this.canvas.height:0},set:function(t){return this.needUpdate=!0,this.canvas&&this.resize(0,t),t}},{key:"getPosition",value:function(){var t=s.jmUtils.getElementPosition(this.canvas.canvas||this.canvas);return t.width=this.width,t.height=this.height,t.right=t.left+t.width,t.bottom=t.top+t.height,t}},{key:"registerShape",value:function(t,e){this.shapes[t]=e}},{key:"createShape",value:function(t,e){if(t="string"==typeof t?this.shapes[t]:t)return(e=e||{}).graph=this,new t(e)}},{key:"createShadow",value:function(t,e,n,r){return new u.jmShadow(t,e,n,r)}},{key:"createLinearGradient",value:function(t,e,n,r){return new c.jmGradient({type:"linear",x1:t,y1:e,x2:n,y2:r})}},{key:"createRadialGradient",value:function(t,e,n,r,i,o){return new c.jmGradient({type:"radial",x1:t,y1:e,r1:n,x2:r,y2:i,r2:o})}},{key:"refresh",value:function(){this.redraw()}},{key:"redraw",value:function(t,e){this.clear(t||this.width,e||this.height),this.paint()}},{key:"clear",value:function(t,e){t&&e||(t=this.width,e=this.height),this.style&&this.style.fill?this.points=[{x:0,y:0},{x:t,y:0},{x:t,y:e},{x:0,y:e}]:this.context.clearRect&&this.context.clearRect(0,0,t,e)}},{key:"css",value:function(t,e){if(this.canvas&&this.canvas.style)return void 0!==e&&(this.canvas.style[t]=e),this.canvas.style[t]}},{key:"createPath",value:function(t,e){return this.createShape("path",{points:t,style:e})}},{key:"createLine",value:function(t,e,n){return this.createShape("line",{start:t,end:e,style:n})}},{key:"zoomOut",value:function(){this.scale(.9,.9)}},{key:"zoomIn",value:function(){this.scale(1.1,1.1)}},{key:"zoomActual",value:function(){this.scaleSize?this.scale(1/this.scaleSize.x,1/this.scaleSize.y):this.scale(1,1)}},{key:"scale",value:function(t,e){this.normalSize||(this.normalSize={width:this.canvas.width,height:this.canvas.height}),this.context.scale(t,e),this.scaleSize?this.scaleSize={x:t*this.scaleSize.x,y:e*this.scaleSize.y}:this.scaleSize={x:t,y:e},this.refresh()}},{key:"toDataURL",value:function(){return this.canvas.toDataURL?this.canvas.toDataURL():""}},{key:"autoRefresh",value:function(e){if(!this.___isAutoRefreshing){var n=this;return this.___isAutoRefreshing=!0,n.__requestAnimationFrameFunHandler&&this.cancelAnimationFrame(n.__requestAnimationFrameFunHandler),n.__requestAnimationFrameFunHandler=this.requestAnimationFrame(function t(){n.destroyed?n.___isAutoRefreshing=!1:(n.needUpdate&&n.redraw(),n.emit("update"),n.__requestAnimationFrameFunHandler&&n.cancelAnimationFrame(n.__requestAnimationFrameFunHandler),n.__requestAnimationFrameFunHandler=n.requestAnimationFrame(t),e&&e())}),this}}},{key:"destroy",value:function(){this.eventHandler.destroy(),this.destroyed=!0}}])&&p(t.prototype,e),n&&p(t,n),o}();n.jmGraph=n.default=t},{"./jmControl.js":2,"./jmEvents.js":3,"./jmGradient.js":4,"./jmList.js":6,"./jmPath.js":8,"./jmProperty.js":9,"./jmShadow.js":10,"./jmUtils.js":11}],6:[function(t,e,n){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}function f(t){var n="function"==typeof Map?new Map:void 0;return function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,e)}function e(){return r(t,arguments,p(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),l(e,t)}(t)}function r(t,e,n){return(r=h()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);r=new(Function.bind.apply(t,r));return n&&l(r,n.prototype),r}).apply(null,arguments)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmList=n.default=void 0;var i=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(u,f(Array));var n,r,t,e,i,s=(n=u,r=h(),function(){var t,e=p(n);return a(this,r?(t=p(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))});function u(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);for(var e=[],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];if(r&&r.length&&Array.isArray(r[0])){for(var o=0;o<r[0].length;o++)e.push(r[0][o]);t=s.call.apply(s,[this].concat(e))}else t=s.call(this);return t.option={},t.type="jmList",a(t)}return t=u,(e=[{key:"add",value:function(t){if(t&&Array.isArray(t)){for(var e=0;e<t.length;e++)this.includes(t[e])||this.push(t[e]);return t}return"object"==o(t)&&this.includes(t)||this.push(t),t}},{key:"remove",value:function(t){for(var e=this.length-1;0<=e;e--)this[e]==t&&this.removeAt(e)}},{key:"removeAt",value:function(t){var e;this.length>t&&(e=this[t],this.splice(t,1),this.option.removeHandler&&this.option.removeHandler.call(this,e,t))}},{key:"contain",value:function(t){return this.includes(t)}},{key:"get",value:function(t){return"function"==typeof t?this.find(t):this[t]}},{key:"each",value:function(t,e){if(t&&"function"==typeof t)if(e){for(var n=this.length-1;0<=n;n--)if(!1===t.call(this,n,this[n]))break}else for(var r=this.length,i=0;i<r;i++)if(!1===t.call(this,i,this[i]))break}},{key:"count",value:function(t){if(t&&"function"==typeof t){for(var e=0,n=this.length,r=0;r<n;r++)t(this[r])&&e++;return e}return this.length}},{key:"clear",value:function(){this.splice(0,this.length)}}])&&c(t.prototype,e),i&&c(t,i),u}();n.jmList=n.default=i},{}],7:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmObject=n.default=void 0;var i=t("./jmList.js");function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}Symbol("jmchart#animate#counter");t=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t&&"jmGraph"==t.type&&(this.graph=t)}var t,n,r;return t=e,(n=[{key:"is",value:function(t){return"string"==typeof t?this.type==t:this instanceof t}},{key:"animate",value:function(){if(this.is("jmGraph")){if(1<arguments.length){this.animateHandles||(this.animateHandles=new i.jmList);var t=[];if(2<arguments.length)for(var e=2;e<arguments.length;e++)t.push(e<0||arguments.length<=e?void 0:arguments[e]);this.animateHandles.add({millisec:(arguments.length<=1?void 0:arguments[1])||20,handle:arguments.length<=0?void 0:arguments[0],params:t})}var o;this.animateHandles&&0<this.animateHandles.count()&&((o=this).dispatcher=setTimeout(function(n){n=n||o;var t,r=[],i=(new Date).getTime();for(t in n.animateHandles.each(function(t,e){try{e&&e.handle&&(!e.times||i-e.times>=e.millisec)&&(!1===e.handle.apply(n,e.params)&&r.push(e),e.times=i)}catch(t){window.console&&window.console.info&&window.console.info(t.toString()),e&&r.push(e)}}),r)n.animateHandles.remove(r[t]);n.animate()},10,this))}else{var n=this.graph;n&&n.animate.apply(n,arguments)}}}])&&o(t.prototype,n),r&&o(t,r),e}();n.jmObject=n.default=t},{"./jmList.js":6}],8:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmPath=n.default=void 0;var o=t("./jmControl.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmControl);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmPath";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t,e)).points=t&&t.points?t.points:[],e}return t=i,(e=[{key:"points",get:function(){return this.__pro("points")},set:function(t){return this.needUpdate=!0,this.__pro("points",t)}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmPath=n.default=t},{"./jmControl.js":2}],9:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmProperty=n.default=void 0;var o=t("./jmUtils.js"),s=t("./jmObject.js");function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=f(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=f(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var h=Symbol("properties"),t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(i,s.jmObject);var t,e,n,r=a(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=r.call(this))[h]={},t}return t=i,(e=[{key:"__pro",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(e){var r=this[h],i=e[0];if(1<e.length){var o=e[1],o={oldValue:r[i],newValue:o};return r[i]=e[1],this.emit&&this.emit("propertyChange",i,o),e[1]}if(1==e.length)return r[i]}}},{key:"needUpdate",get:function(){return this.__pro("needUpdate")},set:function(t){this.__pro("needUpdate",t),t&&!this.is("jmGraph")&&this.graph&&(this.graph.needUpdate=!0)}},{key:"graph",get:function(){return this.__pro("graph")||this.__pro("graph",this.findParent("jmGraph"))},set:function(t){return this.__pro("graph",t)}},{key:"requestAnimationFrame",value:function(t){return o.jmUtils.requestAnimationFrame(t,this.graph?this.graph.canvas:null)}},{key:"cancelAnimationFrame",value:function(t){return o.jmUtils.cancelAnimationFrame(t,this.graph?this.graph.canvas:null)}}])&&u(t.prototype,e),n&&u(t,n),i}();n.jmProperty=n.default=t},{"./jmObject.js":7,"./jmUtils.js":11}],10:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmShadow=n.default=void 0;var r=t("./jmUtils.js");function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.jmShadow=n.default=function(){function i(t,e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),"string"!=typeof t||e||n||r?(this.x=t,this.y=e,this.blur=n,this.color=r):this.fromString(t)}var t,e,n;return t=i,(e=[{key:"fromString",value:function(t){if(t){t=t.match(/\s*([^,]+)\s*,\s*([^,]+)\s*(,[^,]+)?\s*(,[\s\S]+)?\s*/i);return t&&(this.x=t[1]||0,this.y=t[2]||0,t[3]&&(t[3]=r.jmUtils.trim(t[3],", "),0===t[3].indexOf("#")||/^rgb/i.test(t[3])?this.color=t[3]:this.blur=r.jmUtils.trim(t[3],", ")),t[4]&&(this.color=r.jmUtils.trim(t[4],", "))),this}}},{key:"toString",value:function(){var t=this.x+","+this.y;return this.blur&&(t+=","+this.blur),this.color&&(t+=","+this.color),t}}])&&o(t.prototype,e),n&&o(t,n),i}()},{"./jmUtils.js":11}],11:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jmUtils=n.default=void 0;var f=t("./jmList.js");function h(t){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r;return e=t,r=[{key:"clone",value:function(t,e){var n,r=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0;if("function"==typeof i){var s=i(t,r,o);if(s)return s}if("boolean"==typeof e&&(r=e,e=void 0),100<++o)return e;if(t&&"object"===h(t)){if(e=e||{},this.isType(t,f.jmList))return new f.jmList(t);if(Array.isArray(t)){if(r){for(var u=[],c=0;c<t.length;c++)u.push(this.clone(t[c],e[c],r,i,o));return u}return t.slice(0)}for(var a in t.__proto__&&(e.__proto__=t.__proto__),t)"constructor"!==a&&((n=t[a])&&(n.tagName||n.getContext)||"object"!==h(e[a])&&void 0!==e[a]||(e[a]=this.clone(n,e[a],r,i,o)));return e}return void 0!==e?e:t}},{key:"bindEvent",value:function(t,e,n,r){if(e&&e.indexOf&&-1!=e.indexOf(" "))for(var i=e.split(" "),o=0;o<i.length;o++)this.bindEvent(t,i[o],n,r);return t.attachEvent?t.attachEvent("on"+e,n,r):t.addEventListener&&t.addEventListener(e,n,r),{name:e,target:t,fun:n}}},{key:"removeEvent",value:function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent?(t.detachEvent("on"+e,n),!0):void(t["on"+e]=null)}},{key:"getElementPosition",value:function(t){var e={top:0,left:0};if(!t)return e;if(t.offsetParent)for(;t.offsetParent;)e.top+=t.offsetTop,e.left+=t.offsetLeft,t=t.offsetParent;else t.x?e.left+=t.x:t.x&&(e.top+=t.y);return e}},{key:"getEventPosition",value:function(t,e){var n=!1,r=(t=t||event).changedTouches||t.targetTouches||t.touches,i=t.target||t.srcElement;r&&r.length&&((t=r[0]).target||(t.target=i),n=!0);var o=t.pageX||t.x;void 0===o&&(o=t.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));var s=t.pageY||t.y;void 0===s&&(s=t.clientY+(document.documentElement.scrollTop||document.body.scrollTop));var u=t.offsetX,c=t.offsetY;return void 0===u&&void 0===c&&(u=o-(i=this.getElementPosition(i)).left,c=s-i.top),e&&(e.x&&(u/=e.x),e.y&&(c/=e.y)),{pageX:o,pageY:s,clientX:t.clientX,clientY:t.clientY,offsetX:u,offsetY:c,layerX:t.layerX,layerY:t.layerY,screenX:t.screenX,screenY:t.screenY,x:u,y:c,isTouch:n,touches:r}}},{key:"isType",value:function(t,e){return!(!t||"object"!==h(t))&&t.constructor===e}},{key:"pointInPolygon",value:function(t,e,n){n=n||1,n/=2;var r,i,o=e.length,s=!1,u=!0;if(!e||0==o)return 0;if(1==o)return Math.abs(e[0].x-t.x)<=n&&Math.abs(e[0].y-t.y)<=n;if(2==o){if(Math.min(e[0].x,e[1].x)-t.x>n||t.x-Math.max(e[0].x,e[1].x)>n)return 0;if(Math.min(e[0].y,e[1].y)-t.y>n||t.y-Math.max(e[0].y,e[1].y)>n)return 0;if(e[0].x==e[1].x)return Math.abs(e[0].x-t.x)<=n&&(t.y-e[0].y)*(t.y-e[1].y)<=0?1:0;if(e[0].y==e[1].y)return Math.abs(e[0].y-t.y)<=n&&(t.x-e[0].x)*(t.x-e[1].x)<=0?1:0;if(Math.abs(e[0].x-t.x)<n&&Math.abs(e[0].y-t.y)<n)return 1;if(Math.abs(e[1].x-t.x)<n&&Math.abs(e[1].y-t.y)<n)return 1;if(t.y==e[0].y||t.y==e[1].y)return 0;var c=(e[1].x-e[0].x)/(e[1].y-e[0].y)*(t.y-e[0].y),c=(t.y-e[0].y)/Math.sqrt(c*c+(t.y-e[0].y)*(t.y-e[0].y))*(t.x-e[0].x-c);return Math.abs(c)<=n?1:0}for(r=0;r<o;++r)if(e[r].x==t.x&&e[r].y==t.y)return 1;for(;u;)for(s=u=!1,r=0,i=o-1;r<o;i=r++)if(e[r].y<t.y&&t.y<e[i].y||e[i].y<t.y&&t.y<e[r].y){if(t.x<=e[r].x||t.x<=e[i].x){var a=(t.y-e[r].y)*(e[i].x-e[r].x)/(e[i].y-e[r].y)+e[r].x;if(t.x<a)s=!s;else if(t.x==a)return 1}}else if(t.y==e[r].y){if(t.x<e[r].x){e[r].y>e[i].y?--t.y:++t.y,u=!0;break}}else if(e[r].y==e[i].y&&t.y==e[r].y&&(e[r].x<t.x&&t.x<e[i].x||e[i].x<t.x&&t.x<e[r].x)){s=!0;break}return s?2:0}},{key:"checkOutSide",value:function(t,e,n){var r={left:0,right:0,top:0,bottom:0};return n.x<0?r.left=e.left+n.x-t.left:0<n.x&&(r.right=e.right+n.x-t.right),n.y<0?r.top=e.top+n.y-t.top:0<n.y&&(r.bottom=e.bottom+n.y-t.bottom),r}},{key:"rotatePoints",value:function(t,e,n){if(!n||!t)return t;var r=Math.cos(n),i=Math.sin(n);if(t.length)for(var o,s,u=0;u<t.length;u++)t[u]&&(o=t[u].x-e.x,s=t[u].y-e.y,t[u].x=o*r-s*i+e.x,t[u].y=o*i+s*r+e.y);else{var c=t.x-e.x,n=t.y-e.y;t.x=c*r-n*i+e.x,t.y=c*i+n*r+e.y}return t}},{key:"trimStart",value:function(t,e){if(e=e||" ",t&&0<t.length){var n=t[0];if(n===e||0<=e.indexOf(n))return t=t.substring(1),this.trimStart(t,e)}return t}},{key:"trimEnd",value:function(t,e){if(e=e||" ",t&&0<t.length){var n=t[t.length-1];if(n===e||0<=e.indexOf(n))return t=t.substring(0,t.length-1),this.trimStart(t,e)}return t}},{key:"trim",value:function(t,e){return this.trimEnd(this.trimStart(t,e),e)}},{key:"checkPercent",value:function(t){if("string"==typeof t&&"%"==(t=this.trim(t))[t.length-1])return t}},{key:"percentToNumber",value:function(t){var e;return"string"!=typeof t||(e=this.checkPercent(t))&&(t=this.trim(e,"% "),t/=100),t}},{key:"hexToNumber",value:function(t){if("string"!=typeof t)return t;for(var e=0,n=(t=t.toLowerCase()).length,r=0;r<n;r++){var i="0123456789abcdef".indexOf(t[r]);if(0!=i){for(var o=1;o<n-r;o++)i*=16;e+=i}}return e}},{key:"numberToHex",value:function(t){for(var e="";0<t;){e="0123456789abcdef"[t%16]+e;t=Math.floor(t/16)}return e}},{key:"hexToRGBA",value:function(t){if("#"==(t=this.trim(t))[0]){var e={a:1};if(8<=t.length)return e.a=t.substr(1,2),e.g=t.substr(5,2),e.b=t.substr(7,2),e.r=t.substr(3,2),e.a=(this.hexToNumber(e.a)/255).toFixed(4),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),e;if(7===t.length||4===t.length)return 4===t.length?(e.g=t.substr(2,1),e.g=e.g+e.g,e.b=t.substr(3,1),e.b=e.b+e.b,e.r=t.substr(1,1),e.r=e.r+e.r):(e.g=t.substr(3,2),e.b=t.substr(5,2),e.r=t.substr(1,2)),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),e;if(5===t.length)return e.a=t.substr(1,1),e.g=t.substr(3,1),e.b=t.substr(4,1),e.r=t.substr(2,1),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),e.a=(this.hexToNumber(e.a)/255).toFixed(4),e}return t}},{key:"toColor",value:function(t,e,n,r){if("string"==typeof t&&t){if("#"===(t=this.trim(t))[0]&&(4===t.length||7===t.length))return t;var i=this.hexToRGBA(t);if("string"==typeof i)return i;t=i.r||t,e=i.g||e,n=i.b||n,r=i.a||r}return void 0!==t&&void 0!==e&&void 0!==n?void 0!==r?"rgba("+t+","+e+","+n+","+r+")":"rgb("+t+","+e+","+n+")":t}},{key:"requestAnimationFrame",value:function(t,e){return(e&&e.requestAnimationFrame?e.requestAnimationFrame:"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:setTimeout)(t,20)}},{key:"cancelAnimationFrame",value:function(t,e){return(e&&e.cancelAnimationFrame?e.cancelAnimationFrame:"undefined"!=typeof window&&window.cancelAnimationFrame?window.cancelAnimationFrame:clearTimeout)(t)}}],(n=null)&&i(e.prototype,n),r&&i(e,r),t}();n.jmUtils=n.default=t},{"./jmList.js":6}],12:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmArc=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmPath);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmArc";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t=t||{},e)).center=t.center||{x:0,y:0},e.radius=t.radius||0,e.startAngle=t.start||t.startAngle||0,e.endAngle=t.end||t.endAngle||2*Math.PI,e.anticlockwise=t.anticlockwise||0,e.isFan=!!t.isFan,e}return t=i,(e=[{key:"center",get:function(){return this.__pro("center")},set:function(t){return this.needUpdate=!0,this.__pro("center",t)}},{key:"radius",get:function(){return this.__pro("radius")},set:function(t){return this.needUpdate=!0,this.__pro("radius",t)}},{key:"startAngle",get:function(){return this.__pro("startAngle")},set:function(t){return this.needUpdate=!0,this.__pro("startAngle",t)}},{key:"endAngle",get:function(){return this.__pro("endAngle")},set:function(t){return this.needUpdate=!0,this.__pro("endAngle",t)}},{key:"anticlockwise",get:function(){return this.__pro("anticlockwise")},set:function(t){return this.needUpdate=!0,this.__pro("anticlockwise",t)}},{key:"initPoints",value:function(){var t=this.getLocation(),e=0,n=0,r=t.center.x,i=t.center.y;t.radius?e=n=t.radius:(e=t.width/2,n=t.height/2);var o=this.startAngle,s=this.endAngle;if((0!=e||0!=n)&&o!=s){var u=this.anticlockwise;this.points=[];var c=1/Math.max(e,n);u&&(o=(u=2*Math.PI)-o,s=u-s),s<o&&(c=-c),this.isFan&&this.points.push(t.center);for(var a=o;;a+=c){(0<c&&s<a||c<0&&a<s)&&(a=s);var f={x:Math.cos(a)*e+r,y:Math.sin(a)*n+i};if(this.points.push(f),a==s)break}return this.points}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmArc=n.default=t},{"../core/jmPath.js":8}],13:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmArrow=n.default=void 0;var o=t("../core/jmPath.js"),c=t("../core/jmUtils.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=f(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=f(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmPath);var t,e,n,r=a(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmArrow";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t,e)).style.lineJoin="miter",e.style.lineCap="square",e.angle=t.angle||0,e.start=t.start||{x:0,y:0},e.end=t.end||{x:0,y:0},e.offsetX=t.offsetX||5,e.offsetY=t.offsetY||8,e}return t=i,(e=[{key:"start",get:function(){return this.__pro("start")},set:function(t){return this.needUpdate=!0,this.__pro("start",t)}},{key:"end",get:function(){return this.__pro("end")},set:function(t){return this.needUpdate=!0,this.__pro("end",t)}},{key:"angle",get:function(){return this.__pro("angle")},set:function(t){return this.needUpdate=!0,this.__pro("angle",t)}},{key:"offsetX",get:function(){return this.__pro("offsetX")},set:function(t){return this.needUpdate=!0,this.__pro("offsetX",t)}},{key:"offsetY",get:function(){return this.__pro("offsetY")},set:function(t){return this.needUpdate=!0,this.__pro("offsetY",t)}},{key:"initPoints",value:function(t){var e=this.angle,n=this.start,r=this.end;if(r){e=e||Math.atan2(r.y-n.y,r.x-n.x),this.points=[];var i=this.offsetX,o=this.offsetY,s=Math.atan2(i,o),u=e+s,n=Math.sin(u),u=Math.cos(u),i=Math.sqrt(i*i+o*o),o={x:r.x-u*i,y:r.y-n*i},s=e-s,n=Math.sin(s),u=Math.cos(s),n={x:r.x-u*i,y:r.y-n*i},i=c.jmUtils.clone(r);return i.m=!0,this.points.push(i),this.points.push(o),t||this.style.fill?(this.points.push(n),this.points.push(r)):(this.points.push(i),this.points.push(n)),this.points}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmArrow=n.default=t},{"../core/jmPath.js":8,"../core/jmUtils.js":11}],14:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmArrowLine=n.default=void 0;var o=t("./jmLine.js"),s=t("./jmArrow.js");function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e,n){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){t=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(n):e.value}})(t,e,n||t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=h(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=h(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(i,o.jmLine);var t,e,n,r=f(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t.start=t.start||{x:0,y:0},t.end=t.end||{x:0,y:0},(e=r.call(this,t,e||"jmArrowLine")).style.lineJoin=e.style.lineJoin||"miter",e.arrow=new s.jmArrow(t),e}return t=i,(e=[{key:"initPoints",value:function(){return this.points=c(h(i.prototype),"initPoints",this).call(this),!1!==this.arrowVisible&&(this.points=this.points.concat(this.arrow.initPoints())),this.points}}])&&u(t.prototype,e),n&&u(t,n),i}();n.jmArrowLine=n.default=t},{"./jmArrow.js":13,"./jmLine.js":20}],15:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmBezier=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmPath);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmBezier";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t.style&&!0!==typeof t.style.close&&(t.style.close=!1),(e=r.call(this,t,e)).cpoints=t.points||[],e}return t=i,(e=[{key:"cpoints",get:function(){return this.__pro("cpoints")},set:function(t){return this.needUpdate=!0,this.__pro("cpoints",t)}},{key:"initPoints",value:function(){this.points=[];for(var t=this.cpoints,e=0;e<=1;e+=.01){var n=this.getPoint(t,e);this.points.push(n)}return this.points.push(t[t.length-1]),this.points}},{key:"getPoint",value:function(t,e){if(1==t.length)return t[0];if(2==t.length){var n={};return n.x=(t[1].x-t[0].x)*e+t[0].x,n.y=(t[1].y-t[0].y)*e+t[0].y,n}if(2<t.length){for(var r=[],i=0;i<t.length-1;i++){var o=this.getPoint([t[i],t[i+1]],e);o&&r.push(o)}return this.getPoint(r,e)}}},{key:"offset",value:function(t,e,n){var r=this.cpoints;if(r){for(var i=r.length,o=0;o<i;o++)r[o].x+=t,r[o].y+=e;this.emit("move",{offsetX:t,offsetY:e,trans:n}),this.getLocation(!0)}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmBezier=n.default=t},{"../core/jmPath.js":8}],16:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmCircle=n.default=void 0;var o=t("./jmArc.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmArc);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmCircle";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,t,e)}return t=i,(e=[{key:"initPoints",value:function(){var t=this.getLocation();t.radius||(t.radius=Math.min(t.width,t.height)/2),this.points=[],this.points.push({x:t.center.x-t.radius,y:t.center.y-t.radius}),this.points.push({x:t.center.x+t.radius,y:t.center.y-t.radius}),this.points.push({x:t.center.x+t.radius,y:t.center.y+t.radius}),this.points.push({x:t.center.x-t.radius,y:t.center.y+t.radius})}},{key:"draw",value:function(){var t=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds,e=this.getLocation();e.radius||(e.radius=Math.min(e.width,e.height)/2);var n=this.startAngle,r=this.endAngle,i=this.anticlockwise;this.context.arc(e.center.x+t.left,e.center.y+t.top,e.radius,n,r,i)}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmCircle=n.default=t},{"./jmArc.js":12}],17:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmHArc=n.default=void 0;var o=t("./jmArc.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmArc);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmHArc";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t,e)).minRadius=t.minRadius||e.style.minRadius||0,e.maxRadius=t.maxRadius||e.style.maxRadius||0,e}return t=i,(e=[{key:"minRadius",get:function(){return this.__pro("minRadius")},set:function(t){return this.needUpdate=!0,this.__pro("minRadius",t)}},{key:"maxRadius",get:function(){return this.__pro("maxRadius")},set:function(t){return this.needUpdate=!0,this.__pro("maxRadius",t)}},{key:"initPoints",value:function(){var t,e=this.getLocation(),n=this.minRadius,r=this.maxRadius,i=this.startAngle,o=this.endAngle;this.anticlockwise&&(i=(t=2*Math.PI)-i,o=t-o);var s=.1;o<i&&(s=-s);for(var u=[],c=[],a=i;;a+=s){(0<s&&o<a||s<0&&a<o)&&(a=o);var f=Math.cos(a),h=Math.sin(a),l={x:f*n+e.center.x,y:h*n+e.center.y},h={x:f*r+e.center.x,y:h*r+e.center.y};if(u.push(l),c.push(h),a===o)break}c.reverse(),this.style&&this.style.close||(c[0].m=!0),this.points=u.concat(c)}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmHArc=n.default=t},{"./jmArc.js":12}],18:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmImage=n.default=void 0;var o=t("../core/jmControl.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmControl);var t,e,n,r=c(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t=t||{},e||"jmImage")).style.fill=e.fill||"transparent",e.sourceWidth=t.sourceWidth,e.sourceHeight=t.sourceHeight,e.sourcePosition=t.sourcePosition,e.image=t.image||e.style.image,e}return t=i,(e=[{key:"sourcePosition",get:function(){return this.__pro("sourcePosition")},set:function(t){return this.__pro("sourcePosition",t)}},{key:"sourceWidth",get:function(){return this.__pro("sourceWidth")},set:function(t){return this.needUpdate=!0,this.__pro("sourceWidth",t)}},{key:"sourceHeight",get:function(){return this.__pro("sourceHeight")},set:function(t){return this.needUpdate=!0,this.__pro("sourceHeight",t)}},{key:"image",get:function(){return this.__pro("image")},set:function(t){return this.needUpdate=!0,this.__pro("image",t)}},{key:"draw",value:function(){var t=this;try{var e,n=this.getImage();this.graph.isWXMiniApp&&this.graph.canvas&&"string"==typeof n?((e=this.graph.canvas.createImage()).onload=function(){t.drawImg(e)},e.src=n):this.drawImg(n)}catch(t){console.error&&console.error(t)}}},{key:"drawImg",value:function(t){var e,n,r,i;t?(i=(i=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds)||(this.parent&&this.parent.getAbsoluteBounds?this.parent:this).getAbsoluteBounds(),(e=this.getLocation()).left+=i.left,e.top+=i.top,n=this.sourcePosition,r=this.sourceWidth,i=this.sourceHeight,n||void 0!==r||void 0!==i?(void 0===r&&(r=e.width||t.width||0),void 0===i&&(i=e.height||t.height||0),n=n||{x:0,y:0},e.width&&e.height?this.context.drawImage(t,n.x,n.y,r,i,e.left,e.top,e.width,e.height):e.width?this.context.drawImage(t,n.x,n.y,r,i,e.left,e.top,e.width,i):e.height?this.context.drawImage(t,n.x,n.y,r,i,e.left,e.top,r,e.height):this.context.drawImage(t,n.x,n.y,r,i,e.left,e.top,r,i)):e?e.width&&e.height?this.context.drawImage(t,e.left,e.top,e.width,e.height):e.width?this.context.drawImage(t,e.left,e.top,e.width,t.height):e.height?this.context.drawImage(t,e.left,e.top,t.width,e.height):this.context.drawImage(t,e.left,e.top):this.context.drawImage(t)):console.warn("image is empty")}},{key:"getBounds",value:function(){var t={},e=this.getImage(),n=this.getLocation(),r=n.width||e.width,e=n.height||e.height;return t.left=n.left,t.top=n.top,t.right=n.left+r,t.bottom=n.top+e,t.width=r,t.height=e,t}},{key:"getImage",value:function(){var t=this.image||this.style.src||this.style.image;return this.__img&&this.__img.src&&-1!=this.__img.src.indexOf(t)||((!t||!t.src)&&"undefined"!=typeof document&&document.createElement?(this.__img=document.createElement("img"),t&&"string"==typeof t&&(this.__img.src=t)):this.__img=t),this.__img}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmImage=n.default=t},{"../core/jmControl.js":2}],19:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmLabel=n.default=void 0;var o=t("../core/jmControl.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){t=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(n):e.value}})(t,e,n||t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=f(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=f(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(i,o.jmControl);var t,e,n,r=a(i);function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t=t||{},e||"jmLabel")).style.font=e.style.font||"15px Arial",e.style.fontFamily=e.style.fontFamily||"Arial",e.style.fontSize=e.style.fontSize||15,e.style.textAlign=e.style.textAlign||"left",e.style.textBaseline=e.style.textBaseline||"middle",e.text=t.text||"",e.center=t.center||null,e}return t=i,(e=[{key:"text",get:function(){return this.__pro("text")},set:function(t){return this.needUpdate=!0,this.__pro("text",t)}},{key:"center",get:function(){return this.__pro("center")},set:function(t){return this.needUpdate=!0,this.__pro("center",t)}},{key:"position",get:function(){return this.__pro("position")},set:function(t){return this.needUpdate=!0,this.__pro("position",t)}},{key:"getLocation",value:function(){var t=u(f(i.prototype),"getLocation",this).call(this),e=this.testSize();return t.width=t.width||e.width,t.height=t.height||e.height,t.left||t.top||!t.center||(t.left=t.center.x-t.width/2,t.top=t.center.y-t.height/2),t}},{key:"initPoints",value:function(){this.__size=null;var t=this.getLocation();return this.points=[{x:t.left,y:t.top}],this.points.push({x:t.left+t.width,y:t.top}),this.points.push({x:t.left+t.width,y:t.top+t.height}),this.points.push({x:t.left,y:t.top+t.height}),this.points}},{key:"testSize",value:function(){return this.__size||(this.context.save(),this.setStyle({font:this.style.font||this.style.fontSize+"px "+this.style.fontFamily}),this.__size=this.context.measureText?this.context.measureText(this.text):{width:15},this.context.restore(),this.__size.height=this.style.fontSize||15,this.width||(this.width=this.__size.width),this.height||(this.height=this.__size.height),this.__size)}},{key:"draw",value:function(){var t=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds,e=(this.testSize(),this.location),n=e.left+t.left,r=e.top+t.top;switch(this.style.textAlign){case"right":n+=e.width;break;case"center":n+=e.width/2}switch(this.style.textBaseline){case"bottom":r+=e.height;break;case"hanging":case"alphabetic":case"middle":r+=e.height/2}var i=this.text;void 0!==i&&(this.style.fill&&this.context.fillText?this.style.maxWidth?this.context.fillText(i,n,r,this.style.maxWidth):this.context.fillText(i,n,r):this.context.strokeText&&(this.style.maxWidth?this.context.strokeText(i,n,r,this.style.maxWidth):this.context.strokeText(i,n,r))),this.style.border&&(this.style.border.style&&(this.context.save(),this.setStyle(this.style.border.style)),this.context.moveTo(this.points[0].x+t.left,this.points[0].y+t.top),this.style.border.top&&this.context.lineTo(this.points[1].x+t.left,this.points[1].y+t.top),this.style.border.right&&(this.context.moveTo(this.points[1].x+t.left,this.points[1].y+t.top),this.context.lineTo(this.points[2].x+t.left,this.points[2].y+t.top)),this.style.border.bottom&&(this.context.moveTo(this.points[2].x+t.left,this.points[2].y+t.top),this.context.lineTo(this.points[3].x+t.left,this.points[3].y+t.top)),this.style.border.left&&(this.context.moveTo(this.points[3].x+t.left,this.points[3].y+t.top),this.context.lineTo(this.points[0].x+t.left,this.points[0].y+t.top)),this.style.border.style&&this.context.restore())}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmLabel=n.default=t},{"../core/jmControl.js":2}],20:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmLine=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmPath);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmLine";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t,e)).start=t.start||{x:0,y:0},e.end=t.end||{x:0,y:0},e.style.lineType=e.style.lineType||"solid",e.style.dashLength=e.style.dashLength||4,e}return t=i,(e=[{key:"start",get:function(){return this.__pro("start")},set:function(t){return this.needUpdate=!0,this.__pro("start",t)}},{key:"end",get:function(){return this.__pro("end")},set:function(t){return this.needUpdate=!0,this.__pro("end",t)}},{key:"initPoints",value:function(){var t=this.start,e=this.end;if(this.points=[],this.points.push(t),"dotted"===this.style.lineType){var n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r);n/=i,r/=i;for(var o=!1,s=this.style.dashLength||5,u=s/2,c=s;c<=i;)0==o?(this.points.push({x:t.x+n*c,y:t.y+r*c}),c+=u):(this.points.push({x:t.x+n*c,y:t.y+r*c,m:!0}),c+=s),o=!o}return this.points.push(e),this.points}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmLine=n.default=t},{"../core/jmPath.js":8}],21:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmPrismatic=n.default=void 0;var o=t("../core/jmPath.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmPath);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmPrismatic";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t,e)).style.close=void 0===e.style.close||e.style.close,e.center=t.center||{x:0,y:0},e.width=t.width||0,e.height=t.height||0,e}return t=i,(e=[{key:"center",get:function(){return this.__pro("center")},set:function(t){return this.needUpdate=!0,this.__pro("center",t)}},{key:"initPoints",value:function(){var t=this.getLocation(),e=t.width/2,n=t.height/2;this.points=[],this.points.push({x:t.center.x-e,y:t.center.y}),this.points.push({x:t.center.x,y:t.center.y+n}),this.points.push({x:t.center.x+e,y:t.center.y}),this.points.push({x:t.center.x,y:t.center.y-n})}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmPrismatic=n.default=t},{"../core/jmPath.js":8}],22:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmRect=n.default=void 0;var o=t("../core/jmPath.js"),f=t("./jmArc.js"),h=t("./jmLine.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmPath);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmRect";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t=t||{},e)).style.close=!0,e.radius=t.radius||e.style.radius||0,e}return t=i,(e=[{key:"radius",get:function(){return this.__pro("radius")},set:function(t){return this.needUpdate=!0,this.__pro("radius",t)}},{key:"position",get:function(){return this.__pro("position")},set:function(t){return this.needUpdate=!0,this.__pro("position",t)}},{key:"getBounds",value:function(){var t={};this.initPoints();var e=this.getLocation();return t.left=e.left,t.top=e.top,t.right=e.left+e.width,t.bottom=e.top+e.height,t.width=t.right-t.left,t.height=t.bottom-t.top,t}},{key:"initPoints",value:function(){var t,e,n,r,i,o=this.getLocation(),s={x:o.left,y:o.top},u={x:o.left+o.width,y:o.top},c={x:o.left+o.width,y:o.top+o.height},a={x:o.left,y:o.top+o.height};return"dotted"!==this.style.lineType||this.dottedLine||(this.dottedLine=this.graph.createShape(h.jmLine,{style:this.style})),o.radius&&o.radius<o.width/2&&o.radius<o.height/2?(t=Math.PI/2,(i=this.graph.createShape(f.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:o.left+o.radius,y:o.top+o.radius},i.startAngle=Math.PI,i.endAngle=Math.PI+t,e=i.initPoints(),(i=this.graph.createShape(f.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:u.x-o.radius,y:u.y+o.radius},i.startAngle=Math.PI+t,i.endAngle=2*Math.PI,n=i.initPoints(),(i=this.graph.createShape(f.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:c.x-o.radius,y:c.y-o.radius},i.startAngle=0,i.endAngle=t,r=i.initPoints(),(i=this.graph.createShape(f.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:a.x+o.radius,y:a.y-o.radius},i.startAngle=t,i.endAngle=Math.PI,i=i.initPoints(),this.points=e.concat(n,r,i)):(this.points=[],this.points.push(s),this.dottedLine&&(this.dottedLine.start=s,this.dottedLine.end=u,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(u),this.dottedLine&&(this.dottedLine.start=u,this.dottedLine.end=c,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(c),this.dottedLine&&(this.dottedLine.start=c,this.dottedLine.end=a,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(a),this.dottedLine&&(this.dottedLine.start=a,this.dottedLine.end=s,this.points=this.points.concat(this.dottedLine.initPoints()))),this.points}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmRect=n.default=t},{"../core/jmPath.js":8,"./jmArc.js":12,"./jmLine.js":20}],23:[function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.jmResize=n.default=void 0;var o=t("./jmRect.js");function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=a(n);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,r?(t=a(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,o.jmRect);var t,e,n,r=c(i);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmResize";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this,t=t||{},e)).resizable=!1!==t.resizable,e.movable=t.movable,e.rectSize=t.rectSize||8,e.style.close=e.style.close||!0,e.init(t),e}return t=i,(e=[{key:"rectSize",get:function(){return this.__pro("rectSize")},set:function(t){return this.__pro("rectSize",t)}},{key:"resizable",get:function(){return this.__pro("resizable")},set:function(t){return this.__pro("resizable",t)}},{key:"init",value:function(t){if(!1!==this.resizable){this.resizeRects=[];var e=this.rectSize,n=this.style.rectStyle||{stroke:"red",fill:"transparent",lineWidth:2,close:!0,zIndex:100};n.close=!0,n.fill=n.fill||"transparent";for(var r=0;r<8;r++){var i=(this.graph||t.graph).createShape(o.jmRect,{position:{x:0,y:0},width:e,height:e,style:n,interactive:!0});i.index=r,i.visible=!0,this.resizeRects.push(i),this.children.add(i),i.canMove(!0,this.graph)}this.reset(0,0,0,0),this.bindRectEvents()}}},{key:"bindRectEvents",value:function(){for(var t=0;t<this.resizeRects.length;t++){var e=this.resizeRects[t];e.on("move",function(t){var e=0,n=0,r=0,i=0;0==this.index?(r=-t.offsetX,e=t.offsetX):1==this.index?(r=-t.offsetX,e=t.offsetX,i=-t.offsetY,n=t.offsetY):2==this.index?(i=-t.offsetY,n=t.offsetY):3==this.index?(r=t.offsetX,i=-t.offsetY,n=t.offsetY):4==this.index?r=t.offsetX:5==this.index?(r=t.offsetX,i=t.offsetY):6==this.index?i=t.offsetY:7==this.index&&(r=-t.offsetX,r=-t.offsetX,e=t.offsetX,i=t.offsetY),this.parent.reset(e,n,r,i),this.needUpdate=!0}),e.bind("mousemove",function(){this.cursor=["w-resize","nw-resize","n-resize","ne-resize","e-resize","se-resize","s-resize","sw-resize"][this.index]}),e.bind("mouseleave",function(){this.cursor="default"})}}},{key:"reset",value:function(t,e,n,r){var i,o,s,u=void 0===this.style.minWidth?5:this.style.minWidth,c=void 0===this.style.minHeight?5:this.style.minHeight,a=this.getLocation();for(s in 0==n&&0==r||(i=a.width+n,o=a.height+r,(u<=i||c<=o)&&(u<=i?this.width=i:n=t=0,c<=o?this.height=o:r=e=0,!1!==this.movable&&(t||e)&&((o=this.position).x=a.left+t,o.y=a.top+e,this.position=o),this.emit("resize",t,e,n,r))),this.resizeRects){var f=this.resizeRects[s];switch(f.index){case 0:f.position.x=-f.width/2,f.position.y=(a.height-f.height)/2;break;case 1:f.position.x=-f.width/2,f.position.y=-f.height/2;break;case 2:f.position.x=(a.width-f.width)/2,f.position.y=-f.height/2;break;case 3:f.position.x=a.width-f.width/2,f.position.y=-f.height/2;break;case 4:f.position.x=a.width-f.width/2,f.position.y=(a.height-f.height)/2;break;case 5:f.position.x=a.width-f.width/2,f.position.y=a.height-f.height/2;break;case 6:f.position.x=(a.width-f.height)/2,f.position.y=a.height-f.height/2;break;case 7:f.position.x=-f.width/2,f.position.y=a.height-f.height/2}}}}])&&s(t.prototype,e),n&&s(t,n),i}();n.jmResize=n.default=t},{"./jmRect.js":22}]},{},[1])(1);return i.jmGraph=r},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t.bind(i)):t()}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "family": "jmgraph",
3
3
  "name": "jmgraph",
4
- "version": "3.2.0",
4
+ "version": "3.2.2",
5
5
  "description": "一个简单的canvas画图库",
6
6
  "homepage": "http://graph.jm47.com/",
7
7
  "keywords": [
@@ -47,6 +47,7 @@ export default class jmGraph extends jmControl {
47
47
  if(typeof wx != 'undefined' && wx.canIUse && wx.canIUse('canvas')) {
48
48
  if(typeof canvas === 'string') canvas = wx.createSelectorQuery().select('#' + canvas);
49
49
  this.isWXMiniApp = true;// 微信小程序平台
50
+ this.container = canvas;
50
51
  }
51
52
  else {
52
53
  if(typeof canvas === 'string' && typeof document != 'undefined') {