jmgraph 3.2.12 → 3.2.13
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.core.min.js +1 -1
- package/dist/jmgraph.core.min.js.map +1 -1
- package/dist/jmgraph.js +38 -5
- package/dist/jmgraph.min.js +1 -1
- package/package.json +1 -1
- package/src/core/jmControl.js +34 -2
package/dist/jmgraph.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(i=>{var t;t=function(t,e,r){var n=function n(i,o,s){function a(e,t){if(!o[e]){if(!i[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(u)return u(e,!0);throw(t=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",t}r=o[e]={exports:{}},i[e][0].call(r.exports,function(t){return a(i[e][1][t]||t)},r,r.exports,n,i,o,s)}return o[e].exports}for(var u="function"==typeof require&&require,t=0;t<s.length;t++)a(s[t]);return a}({1:[function(t,e,r){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(r,"__esModule",{value:!0}),r.default=r.create=void 0,Object.defineProperty(r,"jmArc",{enumerable:!0,get:function(){return n.jmArc}}),Object.defineProperty(r,"jmArrow",{enumerable:!0,get:function(){return o.jmArrow}}),Object.defineProperty(r,"jmArrowLine",{enumerable:!0,get:function(){return f.jmArrowLine}}),Object.defineProperty(r,"jmBezier",{enumerable:!0,get:function(){return s.jmBezier}}),Object.defineProperty(r,"jmCircle",{enumerable:!0,get:function(){return a.jmCircle}}),Object.defineProperty(r,"jmControl",{enumerable:!0,get:function(){return m.jmControl}}),Object.defineProperty(r,"jmGradient",{enumerable:!0,get:function(){return m.jmGradient}}),r.jmGraph=void 0,Object.defineProperty(r,"jmHArc",{enumerable:!0,get:function(){return u.jmHArc}}),Object.defineProperty(r,"jmImage",{enumerable:!0,get:function(){return p.jmImage}}),Object.defineProperty(r,"jmLabel",{enumerable:!0,get:function(){return y.jmLabel}}),Object.defineProperty(r,"jmLine",{enumerable:!0,get:function(){return l.jmLine}}),Object.defineProperty(r,"jmList",{enumerable:!0,get:function(){return m.jmList}}),Object.defineProperty(r,"jmPath",{enumerable:!0,get:function(){return m.jmPath}}),Object.defineProperty(r,"jmPrismatic",{enumerable:!0,get:function(){return c.jmPrismatic}}),Object.defineProperty(r,"jmRect",{enumerable:!0,get:function(){return h.jmRect}}),Object.defineProperty(r,"jmResize",{enumerable:!0,get:function(){return d.jmResize}}),Object.defineProperty(r,"jmShadow",{enumerable:!0,get:function(){return m.jmShadow}}),Object.defineProperty(r,"jmUtils",{enumerable:!0,get:function(){return m.jmUtils}});var n=t("./src/shapes/jmArc.js"),o=t("./src/shapes/jmArrow.js"),s=t("./src/shapes/jmBezier.js"),a=t("./src/shapes/jmCircle.js"),u=t("./src/shapes/jmHArc.js"),l=t("./src/shapes/jmLine.js"),c=t("./src/shapes/jmPrismatic.js"),h=t("./src/shapes/jmRect.js"),f=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){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function b(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");e=t;if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(g=function(){return!!t})()}function x(t){return(x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function j(t,e){return(j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var w={arc:n.jmArc,arrow:o.jmArrow,bezier:s.jmBezier,circle:a.jmCircle,harc:u.jmHArc,line:l.jmLine,prismatic:c.jmPrismatic,rect:h.jmRect,arrowline:f.jmArrowLine,image:p.jmImage,img:p.jmImage,label:y.jmLabel,resize:d.jmResize},_=r.jmGraph=r.default=(t=>{function s(n,i,o){var t,e,r;if(this instanceof s)return t=this instanceof s?this.constructor:void 0,(i=Object.assign({},i)).shapes=Object.assign(w,i.shapes||{}),t&&t.prototype instanceof m.jmGraph?("function"==typeof i&&(o=i,i={}),t=this,r=[n,i,o],e=x(e=s),b(t,g()?Reflect.construct(e,r||[],x(t).constructor):e.apply(t,r))):b(void 0,new Promise(function(t,e){var r=new s(n,i,o);t&&t(r)}));throw new TypeError("Cannot call a class as a function")}var e,r=s;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&j(r,t),r=s,t=[{key:"create",value:function(){return P.apply(void 0,arguments)}}],(e=null)&&v(r.prototype,e),t&&v(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(m.jmGraph),P=r.create=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t,e,r){var n;return g()?Reflect.construct.apply(null,arguments):((n=[null]).push.apply(n,e),e=new(t.bind.apply(t,n)),r&&j(e,r.prototype),e)}(_,e)}},{"./src/core/jmGraph.js":5,"./src/shapes/jmArc.js":22,"./src/shapes/jmArrow.js":23,"./src/shapes/jmArrowLine.js":24,"./src/shapes/jmBezier.js":25,"./src/shapes/jmCircle.js":26,"./src/shapes/jmHArc.js":27,"./src/shapes/jmImage.js":28,"./src/shapes/jmLabel.js":29,"./src/shapes/jmLine.js":30,"./src/shapes/jmPrismatic.js":31,"./src/shapes/jmRect.js":32,"./src/shapes/jmResize.js":33}],2:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.jmControl=r.default=void 0;var l=t("./jmUtils.js"),o=t("./jmList.js"),u=t("./jmGradient.js"),c=t("./jmShadow.js"),n=t("./jmProperty.js"),i=(t=t("../lib/webgl/path.js"))&&t.__esModule?t:{default:t};function s(t){throw new TypeError('"'+t+'" is read-only')}function a(t){return(t=>{if(Array.isArray(t))return d(t)})(t)||(t=>{if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)})(t)||y(t)||(()=>{throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function h(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}function f(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?h(Object(i),!0).forEach(function(t){var e,r;e=n,r=i[t=t],(t=b(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):h(Object(i)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(i,t))})}return n}function p(t,e){var r,n,i,o,s="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(s)return i=!(n=!0),{s:function(){s=s.call(t)},n:function(){var t=s.next();return n=t.done,t},e:function(t){i=!0,r=t},f:function(){try{n||null==s.return||s.return()}finally{if(i)throw r}}};if(Array.isArray(t)||(s=y(t))||e&&t&&"number"==typeof t.length)return s&&(t=s),o=0,{s:e=function(){},n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},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.")}function y(t,e){var r;if(t)return"string"==typeof t?d(t,e):"Map"===(r="Object"===(r={}.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(t,e):void 0}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function m(t){return(m="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 v(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,b(n.key),n)}}function b(t){t=((t,e)=>{if("object"!=m(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=m(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string");return"symbol"==m(t)?t:t+""}function g(t,e,r){e=j(e);var n=t,e=x()?Reflect.construct(e,r||[],j(t).constructor):e.apply(t,r);if(!e||"object"!=m(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function x(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(x=function(){return!!t})()}function j(t){return(j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function w(t,e){return(w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var _={fill:"fillStyle",fillImage:"fillImage",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"};r.jmControl=r.default=(t=>{function n(t,e){var r;if(this instanceof n)return(r=g(this,n,[t=t||{}])).property("type",e||(this instanceof n?this.constructor:void 0).name),r.style=t&&t.style?t.style:{},r.width=t.width||0,r.height=t.height||0,t.position&&(r.position=t.position),r.graph=t.graph||null,r.zIndex=t.zIndex||0,r.interactive=void 0!==t.interactive&&t.interactive,"webgl"===r.mode&&(r.webglControl=new i.default(r.graph,{style:r.style,control:r,isRegular:t.isRegular,needCut:t.needCut})),r.initializing(),r.on=r.bind,r.option=t,r;throw new TypeError("Cannot call a class as a function")}var e,r=n;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&w(r,t),r=n,(t=[{key:"type",get:function(){return this.property("type")}},{key:"context",get:function(){var t=this.property("context");return t||(this.is("jmGraph")&&this.canvas&&this.canvas.getContext?this.context=this.canvas.getContext(this.mode||"2d"):(t=this.graph)?t.context:t.canvas.getContext(this.mode||"2d"))},set:function(t){return this.property("context",t)}},{key:"style",get:function(){return this.property("style")||this.property("style",{})},set:function(t){return this.needUpdate=!0,this.property("style",t)}},{key:"visible",get:function(){var t=this.property("visible");return t=void 0===t?this.property("visible",!0):t},set:function(t){return this.needUpdate=!0,this.property("visible",t)}},{key:"interactive",get:function(){return this.property("interactive")},set:function(t){return this.property("interactive",t)}},{key:"children",get:function(){return this.property("children")||this.property("children",new o.jmList)},set:function(t){return this.needUpdate=!0,this.property("children",t)}},{key:"width",get:function(){var t=this.property("width");return t=void 0===t?this.property("width",0):t},set:function(t){return this.needUpdate=!0,this.property("width",t)}},{key:"height",get:function(){var t=this.property("height");return t=void 0===t?this.property("height",0):t},set:function(t){return this.needUpdate=!0,this.property("height",t)}},{key:"zIndex",get:function(){return this.property("zIndex")||this.property("zIndex",0)},set:function(t){return this.property("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,r=(this.children=this.children||new o.jmList,this.children.add);this.children.add=function(t){if("object"===m(t))return t.parent&&t.parent!=e&&t.parent.children&&t.parent.children.remove(t),t.parent=e,this.contain(t)&&this.oremove(t),r.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"===m(t)&&(t.parent=null,t.graph=null,t.remove(!0),this.oremove(t),e.needUpdate=!0)},this.children.sort=function(){var t,n={};for(t in this.each(function(t,e){var r;e&&(!(r=e.zIndex)&&e.style&&e.style.zIndex&&(r=Number(e.style.zIndex),isNaN(r))&&(r=e.style.zIndex||0),(n[r]||(n[r]=[])).push(e))}),this.splice(0,this.length),n)r.call(this,n[t])},this.children.clear=function(){this.each(function(t,e){this.remove(e)},!0)},this.needUpdate=!0}},{key:"setStyle",value:function(t){var s=this;if(t=t||l.jmUtils.clone(this.style,!0)){var e,r,a=function(t,e,r){if(t){var n=t;if("function"==typeof n)try{n=n.call(s)}catch(t){return void console.warn(t)}var i=m(n),t=_[r||e];if(n instanceof u.jmGradient||"string"==i&&-1<n.indexOf("-gradient"))"string"==i&&-1<n.indexOf("-gradient")&&(n=new u.jmGradient(n)),a(n.toGradient(s),t||e);else if(t)s.webglControl?s.webglControl.setStyle(t,n):("string"==i&&-1<["fillStyle","strokeStyle","shadowColor"].indexOf(t)&&(n=l.jmUtils.toColor(n)),s.context[t]=n);else switch(e){case"shadow":if("string"==i)a(new c.jmShadow(n),e);else for(var o in n)a(n[o],o,e+"."+o);break;case"translate":break;case"rotation":void 0===n.angle||isNaN(n.angle)||(n=s.getRotation(n),s.__translateAbsolutePosition=s.toAbsolutePoint({x:n.x,y:n.y}),s.context.translate&&s.context.translate(s.__translateAbsolutePosition.x,s.__translateAbsolutePosition.y),s.context.rotate&&s.context.rotate(n.angle),s.context.translate&&s.context.translate(-s.__translateAbsolutePosition.x,-s.__translateAbsolutePosition.y));break;case"transform":s.context.transform&&(Array.isArray(n)?s.context.transform.apply(s.context,n):"object"==m(n)&&s.context.transform(n.scaleX||1,n.skewX||0,n.skewY||0,n.scaleY||1,n.offsetX||0,n.offsetY||0));break;case"cursor":s.cursor=n}}};for(e in this.translate&&a(this.translate,"translate"),this.transform&&a(this.transform,"transform"),t)"constructor"!==e&&("string"==(r=m(t[e]))&&-1<t[e].indexOf("-gradient")?t[e]=new u.jmGradient(t[e]):"string"==r&&"shadow"==e&&(t[e]=new c.jmShadow(t[e])),a(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){var r,n=p(this.points);try{for(n.s();!(r=n.n()).done;){var i=r.value;(void 0===e.left||e.left>i.x)&&(e.left=i.x),(void 0===e.top||e.top>i.y)&&(e.top=i.y),(void 0===e.right||e.right<i.x)&&(e.right=i.x),(void 0===e.bottom||e.bottom<i.y)&&(e.bottom=i.y)}}catch(t){n.e(t)}finally{n.f()}}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:"getRotationBounds",value:function(){var t=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:null)||this.getRotation(),e=this.getBounds();if(!t||!t.angle)return e;var r,n,i={width:0,height:0,oldBounds:e},o=[],s=(this.points&&0<this.points.length?o=l.jmUtils.clone(this.points,!0):this.getLocation&&(r=this.getLocation())&&o.push({x:r.left,y:r.top},{x:r.left+r.width,y:r.top},{x:r.left+r.width,y:r.top+r.height},{x:r.left,y:r.top+r.height}),p(o=l.jmUtils.rotatePoints(o,{x:t.x+e.left,y:t.y+e.top},t.angle)));try{for(s.s();!(n=s.n()).done;){var a=n.value;(void 0===i.left||i.left>a.x)&&(i.left=a.x),(void 0===i.top||i.top>a.y)&&(i.top=a.y),(void 0===i.right||i.right<a.x)&&(i.right=a.x),(void 0===i.bottom||i.bottom<a.y)&&(i.bottom=a.y)}}catch(t){s.e(t)}finally{s.f()}return i.left||(i.left=0),i.top||(i.top=0),i.right||(i.right=0),i.bottom||(i.bottom=0),i.width=i.right-i.left,i.height=i.bottom-i.top,i}},{key:"getLocation",value:function(){var t=this.location={left:0,top:0,width:0,height:0},e=(t.position="function"==typeof this.position?this.position():l.jmUtils.clone(this.position),t.center=this.center&&"function"==typeof this.center?this.center():l.jmUtils.clone(this.center),t.start=this.start&&"function"==typeof this.start?this.start():l.jmUtils.clone(this.start),t.end=this.end&&"function"==typeof this.end?this.end():l.jmUtils.clone(this.end),t.radius=this.radius,t.width=this.width,t.height=this.height,l.jmUtils.clone(this.style.margin,{}));return 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&&(e=this.parent.getBounds(),l.jmUtils.checkPercent(t.left)&&(t.left=l.jmUtils.percentToNumber(t.left)*e.width),l.jmUtils.checkPercent(t.top)&&(t.top=l.jmUtils.percentToNumber(t.top)*e.height),l.jmUtils.checkPercent(t.width)&&(t.width=l.jmUtils.percentToNumber(t.width)*e.width),l.jmUtils.checkPercent(t.height)&&(t.height=l.jmUtils.percentToNumber(t.height)*e.height),t.center&&(l.jmUtils.checkPercent(t.center.x)&&(t.center.x=l.jmUtils.percentToNumber(t.center.x)*e.width),l.jmUtils.checkPercent(t.center.y))&&(t.center.y=l.jmUtils.percentToNumber(t.center.y)*e.height),t.radius)&&l.jmUtils.checkPercent(t.radius)&&(t.radius=l.jmUtils.percentToNumber(t.radius)*Math.min(e.width,e.height)),t}},{key:"getRotation",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return(t=t||l.jmUtils.clone(this.style.rotation))?(e=e||this.getBounds(),void 0===t.x&&(t.x="50%"),void 0===t.y&&(t.y="50%"),l.jmUtils.checkPercent(t.x)&&(t.x=l.jmUtils.percentToNumber(t.x)*e.width),l.jmUtils.checkPercent(t.y)&&(t.y=l.jmUtils.percentToNumber(t.y)*e.height)):(t=this.parent&&this.parent.getRotation?this.parent.getRotation():null)&&(e=e||this.getBounds(),t.x-=e.left,t.y-=e.top),f(f({},t),{},{bounds:e})}},{key:"getTranslate",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return(t=t||this.style.translate)?(t={x:t.x||0,y:t.y||0},l.jmUtils.checkPercent(t.x)&&(!e&&this.parent&&(e=this.parent.getBounds()),t.x=l.jmUtils.percentToNumber(t.x)*e.width),l.jmUtils.checkPercent(t.y)&&(!e&&this.parent&&(e=this.parent.getBounds()),t.y=l.jmUtils.percentToNumber(t.y)*e.height),t):{x:0,y:0}}},{key:"remove",value:function(){this.parent&&this.parent.children.remove(this)}},{key:"offset",value:function(t,e,r,n){r=!1!==r;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"==m(i.start)&&(this.start.x=i.start.x+t,this.start.y=i.start.y+e,o=!0),i.end&&"object"==m(i.end)&&(this.end.x=i.end.x+t,this.end.y=i.end.y+e,o=!0),0==o&&this.cpoints){this.cpoints;var s=this.cpoints;if(s){for(var a=s.length,u=0;u<a;u++)s[u].x+=t,s[u].y+=e;o=!0}}if(0==o&&this.points){for(var l=this.points.length,c=0;c<l;c++)this.points[c].x+=t,this.points[c].y+=e;o=!0}this.emit("move",{offsetX:t,offsetY:e,trans:r,evt:n}),this.needUpdate=!0}},{key:"getAbsoluteBounds",value:function(){var t,e=this.getBounds();return this.parent&&this.parent.absoluteBounds?{left:(t=this.parent.absoluteBounds||this.parent.getAbsoluteBounds()).left+e.left,top:t.top+e.top,right:t.left+e.right,bottom:t.top+e.bottom,width:e.width,height:e.height}:e}},{key:"toAbsolutePoint",value:function(t){var e;return(t.x||t.y)&&(e=this.absoluteBounds||this.getAbsoluteBounds(),t.x=(t.x||0)+e.left,t.y=(t.y||0)+e.top),t}},{key:"toLocalPosition",value:function(t){var e=this.absoluteBounds||this.getAbsoluteBounds();return!!e&&{x:t.x-e.left,y:t.y-e.top}}},{key:"beginDraw",value:function(){this.getLocation(!0),this.context.beginPath&&this.context.beginPath(),this.webglControl&&this.webglControl.beginDraw&&this.webglControl.beginDraw()}},{key:"endDraw",value:function(){this.style.close&&(this.webglControl&&this.webglControl.closePath(),this.context.closePath)&&this.context.closePath();var t,e=this.style.fill||this.style.fillStyle;e&&(this.webglControl&&(t=this.getBounds(),this.webglControl.fill(t)),this.context.fill)&&this.context.fill(),(this.style.stroke||!e&&!this.is("jmGraph"))&&(this.webglControl&&this.webglControl.stroke(),this.context.stroke)&&this.context.stroke(),this.webglControl&&this.webglControl.endDraw&&this.webglControl.endDraw(),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;if(this.webglControl)this.webglControl.setParentBounds(t),this.webglControl.draw(a(this.points));else if(this.context&&this.context.moveTo){this.context.moveTo(this.points[0].x+t.left,this.points[0].y+t.top);for(var e=this.points.length,r=1;r<e;r++){var n=this.points[r];n.m?this.context.moveTo(n.x+t.left,n.y+t.top):this.context.lineTo(n.x+t.left,n.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.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.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 r,n=p(t=t.split(" "));try{for(n.s();!(r=n.n()).done;){var i=r.value;i&&this.bind(i,e)}}catch(t){n.e(t)}finally{n.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 r,n=p(t=t.split(" "));try{for(n.s();!(r=n.n()).done;){var i=r.value;i&&this.unbind(i,e)}}catch(t){n.e(t)}finally{n.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),r=0;r<t;r++)e[r]=arguments[r];return this.runEventHandle(e[0],e.slice(1)),this}},{key:"runEventHandle",value:function(t,r){var n,t=this.getEvent(t);return t&&(n=this,Array.isArray(r)||(r=[r]),t.each(function(t,e){!1===e.apply(n,r)&&(r.cancel=!0)})),r.cancel}},{key:"checkPoint",value:function(t,e){var r;if("jmGraph"==this.type)return n=(r=this.getPosition()).left+this.width,o=r.top+this.height,!(t.x>n||t.x<r.left||o<t.y||t.y<r.top);var n=this.getBounds(),i=this.points;if(i&&i.length||((i=[]).push({x:n.left,y:n.top}),i.push({x:n.right,y:n.top}),i.push({x:n.right,y:n.bottom}),i.push({x:n.left,y:n.bottom}),i.push({x:n.left,y:n.top})),e=Number(e||this.style.touchPadding||this.style.lineWidth||1),i&&i.length){var o=this.getRotation(null,n);if(o&&o.angle&&(i=l.jmUtils.clone(i,!0),i=l.jmUtils.rotatePoints(i,{x:o.x+n.left,y:o.y+n.top},o.angle||0)),2<i.length&&(!this.style.fill||this.style.stroke)){for(var s=0,a=i.length,u=s+1;u<=a;u=++s+1)if(u==a){if(this.style.close)if(l.jmUtils.pointInPolygon(t,[i[s],i[0]],e))return!0}else if(l.jmUtils.pointInPolygon(t,[i[s],i[u]],e))return!0;if(!this.style.fill)return!1}return l.jmUtils.pointInPolygon(t,i,e)}return!(t.x>n.right||t.x<n.left||t.y>n.bottom||t.y<n.top)}},{key:"raiseEvent",value:function(r,n){if(!1!==this.visible){n.position||(t=this.graph,n.isWXMiniApp=t.isWXMiniApp,o=n.srcElement||n.target,e=l.jmUtils.getEventPosition(n),n={position:e,button:0==n.button||e.isTouch?1:n.button,keyCode:n.keyCode||n.charCode||n.which,ctrlKey:n.ctrlKey,cancel:!1,event:n,srcElement:o,isWXMiniApp:t.isWXMiniApp}),n.path=n.path||[];var t,i=!1;if(this.children&&this.children.each(function(t,e){if(!0!==n.cancel&&(i=!1===e.raiseEvent(r,n)||i))return!1},!0),i)return!1;var e=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds;if(!e)return!1;n.position.x=n.position.offsetX-e.left,n.position.y=n.position.offsetY-e.top;var o=!1!==this.interactive&&this.checkPoint(n.position);return o?(n.target||(n.target=this),this.runEventAndPopEvent(r,n),this.focused||"mousemove"!==r&&"touchmove"!==r||(this.focused=!0,this.raiseEvent("mousemove"===r?"mouseover":"touchover",n))):!1===this.interactive||o||!this.focused||"mousemove"!==r&&"touchmove"!==r||(this.focused=!1,this.runEventHandle("mousemove"===r?"mouseleave":"touchleave",n)),!1===n.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 o;return this.__mvMonitor||(this.__mvMonitor={},this.__mvMonitor.mouseDown=!1,this.__mvMonitor.curposition={x:0,y:0},(o=this).__mvMonitor.mv=function(t){var e,r,n,i=o;if(i.__mvMonitor.mouseDown)return i.parent.bounds=null,e=t.position.offsetX-i.__mvMonitor.curposition.x,r=t.position.offsetY-i.__mvMonitor.curposition.y,i.option.lockSide&&(n=i.bounds||i.getAbsoluteBounds(),((n=l.jmUtils.checkOutSide(i.option.lockSide,n,{x:e,y:r})).left<0||0<n.right)&&s("offsetx"),n.top<0||0<n.bottom)&&s("offsety"),(e||r)&&(i.offset(e,r,!0,t),e&&(i.__mvMonitor.curposition.x=t.position.offsetX),r)&&(i.__mvMonitor.curposition.y=t.position.offsetY),!1},this.__mvMonitor.mu=function(t){var e=o;e.__mvMonitor.mouseDown&&(e.__mvMonitor.mouseDown=!1,e.emit("moveend",{position:e.__mvMonitor.curposition}))},this.__mvMonitor.ml=function(){var t=o;if(t.__mvMonitor.mouseDown)return t.__mvMonitor.mouseDown=!1,t.emit("moveend",{position:t.__mvMonitor.curposition}),!1},this.__mvMonitor.md=function(t){return!this.__mvMonitor.mouseDown&&(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.interactive=!0,this}}])&&v(r.prototype,t),e&&v(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(n.jmProperty)},{"../lib/webgl/path.js":21,"./jmGradient.js":4,"./jmList.js":6,"./jmProperty.js":9,"./jmShadow.js":10,"./jmUtils.js":11}],3:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.jmEvents=r.default=void 0;var o=t("./jmUtils.js");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)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function a(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}r.jmEvents=r.default=(()=>a(function t(e,r){s(this,t),this.container=e,this.target=r||e,this.mouseHandler=new u(this,e,r),this.keyHandler=new l(this,e,r)},[{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()}}]))();var u=(()=>a(function t(e,r,n){s(this,t),this.instance=e,this.container=r,this.target=n||r,this.eventEvents={},this.init(e,r,n)},[{key:"init",value:function(e,r,t){var n=this.target,i="undefined"!=typeof document?document:null;this.eventEvents.mousedown=o.jmUtils.bindEvent(this.target,"mousedown",function(t){(t=t||window.event).eventName="mousedown";r.raiseEvent("mousedown",t)}),this.eventEvents.mousemove=o.jmUtils.bindEvent(this.target,"mousemove",function(t){if((t=t||window.event).eventName="mousemove",(t.target||t.srcElement)==n)return r.raiseEvent("mousemove",t),t.preventDefault&&t.preventDefault(),!1}),this.eventEvents.mouseover=o.jmUtils.bindEvent(this.target,"mouseover",function(t){(t=t||window.event).eventName="mouseover",r.raiseEvent("mouseover",t)}),this.eventEvents.mouseleave=o.jmUtils.bindEvent(this.target,"mouseleave",function(t){(t=t||window.event).eventName="mouseleave",r.raiseEvent("mouseleave",t)}),this.eventEvents.mouseout=o.jmUtils.bindEvent(this.target,"mouseout",function(t){(t=t||window.event).eventName="mouseout",r.raiseEvent("mouseout",t)}),i&&(this.eventEvents.mouseup=o.jmUtils.bindEvent(i,"mouseup",function(t){if(!((t=t||window.event).eventName="mouseup")===r.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",r.raiseEvent("dblclick",t)}),this.eventEvents.click=o.jmUtils.bindEvent(this.target,"click",function(t){(t=t||window.event).eventName="click",r.raiseEvent("click",t)}),i&&(this.eventEvents.resize=o.jmUtils.bindEvent(i,"resize",function(t){return(t=t||window.event).eventName="resize",r.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)}}}]))(),l=(()=>a(function t(e,r,n){s(this,t),this.instance=e,this.container=r,this.target=n||r,this.eventEvents={},this.init(r,n)},[{key:"init",value:function(r,t){function n(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="undefined"!=typeof document?document:null;e&&(this.eventEvents.keypress=o.jmUtils.bindEvent(e,"keypress",function(t){var e;if(t=t||window.event,n(t))return!1===(e=r.raiseEvent("keypress",t))&&t.preventDefault&&t.preventDefault(),e})),e&&(this.eventEvents.keydown=o.jmUtils.bindEvent(e,"keydown",function(t){var e;if(t=t||window.event,n(t))return!1===(e=r.raiseEvent("keydown",t))&&t.preventDefault&&t.preventDefault(),e})),e&&(this.eventEvents.keyup=o.jmUtils.bindEvent(e,"keyup",function(t){var e;if(t=t||window.event,n(t))return!1===(e=r.raiseEvent("keyup",t))&&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)}}}]))()},{"./jmUtils.js":11}],4:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.jmGradient=r.default=void 0;var d=t("./jmUtils.js"),i=t("./jmList.js");function o(t){return(t=>{if(Array.isArray(t))return n(t)})(t)||(t=>{if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)})(t)||((t,e)=>{var r;if(t)return"string"==typeof t?n(t,e):"Map"===(r="Object"===(r={}.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0})(t)||(()=>{throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}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 a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=s(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=s(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==s(t)?t:t+""))(n.key),n)}}r.jmGradient=r.default=(()=>{function n(t){var e;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");if(this.stops=new i.jmList,t&&"object"==s(t)){for(var r in t)"stops"!==r&&(this[r]=t[r]);t.stops&&Array.isArray(t.stops)&&(e=this.stops).push.apply(e,o(t.stops))}else"string"==typeof t&&this.fromString(t)}return t=n,(e=[{key:"addStop",value:function(t,e){this.stops.add({offset:Number(t),color:e})}},{key:"toGradient",value:function(t){var n,e,r,i=t.context||t,o=t.absoluteBounds||t.getAbsoluteBounds(),s=this.x1||0,a=this.y1||0,u=this.x2,l=this.y2,c=t.getLocation(),h=0,c=(h=(h=c.radius?2*c.radius:h)||Math.min(c.width,c.height),d.jmUtils.checkPercent(s)&&(s=d.jmUtils.percentToNumber(s)*(o.width||h)),d.jmUtils.checkPercent(u)&&(u=d.jmUtils.percentToNumber(u)*(o.width||h)),d.jmUtils.checkPercent(a)&&(a=d.jmUtils.percentToNumber(a)*(o.height||h)),d.jmUtils.checkPercent(l)&&(l=d.jmUtils.percentToNumber(l)*(o.height||h)),Number(s)+o.left),f=Number(a)+o.top,p=Number(u)+o.left,y=Number(l)+o.top;return"linear"===this.type?"webgl"===t.mode&&t.webglControl?(n=t.webglControl.createLinearGradient(s,a,u,l,o)).key=this.toString():i.createLinearGradient&&(n=i.createLinearGradient(c,f,p,y)):"radial"===this.type&&(e=this.r1||0,r=this.r2,d.jmUtils.checkPercent(e)&&(e=d.jmUtils.percentToNumber(e),e*=h),d.jmUtils.checkPercent(r)&&(r=d.jmUtils.percentToNumber(r),r*=h),"webgl"===t.mode&&t.webglControl?(n=t.webglControl.createRadialGradient(s,a,e,u,l,r,o)).key=this.toString():i.createRadialGradient?n=i.createRadialGradient(c,f,e,p,y,r):i.createCircularGradient&&(n=i.createCircularGradient(c,f,r))),n?(this.stops.each(function(t,e){var r=d.jmUtils.toColor(e.color);n&&n.addColorStop(e.offset,r)}),n):(h=this.stops.get(0))&&h.color||"#000"}},{key:"fromString",value:function(t){if(t){t=t.match(/(linear|radial)-gradient\s*\(\s*([^,]+)\s*,\s*((.|\s)+)\)/i);if(t&&!(t.length<3)){this.type=t[1].toLowerCase();var e=d.jmUtils.trim(t[2]).split(/\s+/),r=("linear"==this.type?e.length<=2?(this.x2=e[0],this.y2=e[1]||0):(this.x1=e[0],this.y1=e[1],this.x2=e[2],this.y2=e[3]):e.length<=3?(this.x2=e[0],this.y2=e[1]||0,this.r2=e[2]||0):(this.x1=e[0],this.y1=e[1],this.r1=e[2],this.x2=e[3],this.y2=e[3],this.r2=e[3]),t[3].match(/((rgb(a)?\s*\([\d,\.\s]+\))|(#[a-zA-Z\d]+))\s+([\d\.]+)/gi));if(r&&r.length)for(var n=0;n<r.length;n++){var i,o=d.jmUtils.trim(r[n]),s=o.lastIndexOf(" ");-1<s&&(i=Number(o.substr(s+1)),o=d.jmUtils.trim(o.substr(0,s)),!isNaN(i))&&o&&this.addStop(i,o)}}}}},{key:"toString",value:function(){var r=this.type+"-gradient(";return"linear"==this.type?r+=this.x1+" "+this.y1+" "+this.x2+" "+this.y2:r+=this.x1+" "+this.y1+" "+this.r1+" "+this.x2+" "+this.y2+" "+this.r2,this.stops.each(function(t,e){r+=","+e.color+" "+e.offset}),r+")"}}])&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r})()},{"./jmList.js":6,"./jmUtils.js":11}],5:[function(t,e,r){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(r,"__esModule",{value:!0}),r.default=void 0,Object.defineProperty(r,"jmControl",{enumerable:!0,get:function(){return c.jmControl}}),Object.defineProperty(r,"jmEvents",{enumerable:!0,get:function(){return l.jmEvents}}),Object.defineProperty(r,"jmGradient",{enumerable:!0,get:function(){return u.jmGradient}}),r.jmGraph=void 0,Object.defineProperty(r,"jmList",{enumerable:!0,get:function(){return n.jmList}}),Object.defineProperty(r,"jmPath",{enumerable:!0,get:function(){return h.jmPath}}),Object.defineProperty(r,"jmProperty",{enumerable:!0,get:function(){return o.jmProperty}}),Object.defineProperty(r,"jmShadow",{enumerable:!0,get:function(){return a.jmShadow}}),Object.defineProperty(r,"jmUtils",{enumerable:!0,get:function(){return s.jmUtils}});var s=t("./jmUtils.js"),n=t("./jmList.js"),o=t("./jmProperty.js"),a=t("./jmShadow.js"),u=t("./jmGradient.js"),l=t("./jmEvents.js"),c=t("./jmControl.js"),h=t("./jmPath.js");function f(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}function p(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?f(Object(i),!0).forEach(function(t){var e,r;e=n,r=i[t=t],(t=d(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):f(Object(i)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(i,t))})}return n}function y(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,d(n.key),n)}}function d(t){t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string");return"symbol"==i(t)?t:t+""}function m(t,e,r){e=b(e);var n=t,e=v()?Reflect.construct(e,r||[],b(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function v(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(v=function(){return!!t})()}function b(t){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function g(t,e){return(g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmGraph=r.default=(t=>{function o(t,e,r){var n,i;if(this instanceof o)return"function"==typeof e&&(r=e,e={}),(e=e||{}).interactive=!0,e.isRegular=!0,(n=m(this,o,[e,"jmGraph"])).option=e||{},n.devicePixelRatio=1,n.util=n.utils=s.jmUtils,n.mode=e.mode||"2d","undefined"!=typeof wx&&wx.canIUse&&wx.canIUse("canvas")?("string"==typeof t&&(t=wx.createSelectorQuery().select("#"+t)),n.isWXMiniApp=!0,n.container=t):("string"==typeof t&&"undefined"!=typeof document?t=document.getElementById(t):t.length&&(t=t[0]),t.getContext||"undefined"==typeof document?n.container=t.parentElement:(n.container=t,i=document.createElement("canvas"),t.appendChild(i),i.width=t.offsetWidth||t.clientWidth,i.height=t.offsetHeight||t.clientHeight,t=i)),n.canvas=t,n.context=t.getContext(n.mode),n.textureCanvas=e.textureCanvas||null,"webgl"===n.mode&&(n.context.enable(n.context.BLEND),n.context.blendFunc(n.context.SRC_ALPHA,n.context.ONE_MINUS_SRC_ALPHA),s.jmUtils.bindEvent(t,"webglcontextlost",function(t){console.log("canvas webglcontextlost",t),n.emit("webglcontextlost",t)}),s.jmUtils.bindEvent(t,"webglcontextrestored",function(t){console.log("canvas webglcontextrestored",t),n.emit("webglcontextrestored",t)})),n.__init(r),n;throw new TypeError("Cannot call a class as a function")}var e,r=o;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&g(r,t),r=o,t=[{key:"create",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t,e,r){var n;return v()?Reflect.construct.apply(null,arguments):((n=[null]).push.apply(n,e),e=new(t.bind.apply(t,n)),r&&g(e,r.prototype),e)}(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&&this.context.translate(.5,.5)}),this.on("endDraw",function(){this.context.translate&&this.context.translate(-.5,-.5)});var e="undefined"!=typeof window&&1<window.devicePixelRatio?window.devicePixelRatio:1;this.isWXMiniApp&&(e=wx.getWindowInfo().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 l.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"),"2d"===this.mode?(this.canvas.height=e*this.dprScaleSize,this.canvas.width=t*this.dprScaleSize,1!==this.dprScaleSize&&this.context.scale&&this.context.scale(this.dprScaleSize,this.dprScaleSize)):(this.canvas.width=t,this.canvas.height=e),this.context.viewport&&this.context.viewport(0,0,t,e),this.needUpdate=!0)}},{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=this.isWXMiniApp?{left:0,top:0}: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,r,n){return new a.jmShadow(t,e,r,n)}},{key:"createLinearGradient",value:function(t,e,r,n){return new u.jmGradient({type:"linear",x1:t,y1:e,x2:r,y2:n,stops:4<arguments.length&&void 0!==arguments[4]?arguments[4]:[]})}},{key:"createRadialGradient",value:function(t,e,r,n,i,o){return new u.jmGradient({type:"radial",x1:t,y1:e,r1:r,x2:n,y2:i,r2:o,stops:6<arguments.length&&void 0!==arguments[6]?arguments[6]:[]})}},{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.context.clearRect?(this.style&&this.style.fill&&(this.points=[{x:0,y:0},{x:t,y:0},{x:t,y:e},{x:0,y:e}],this.style.close=!0),this.context.clearRect(0,0,t,e)):"webgl"===this.mode&&this.context.clear&&(t=this.style&&this.style.fill?this.utils.hexToRGBA(this.style.fill):{r:0,g:0,b:0,a:0},this.context.clearColor(t.r,t.g,t.b,t.a),this.context.clear(this.context.COLOR_BUFFER_BIT))}},{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",p({points:t,style:e},2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}))}},{key:"createLine",value:function(t,e,r){return this.createShape("line",{start:t,end:e,style:r})}},{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.scaleSize?this.scaleSize={x:t*this.scaleSize.x,y:e*this.scaleSize.y}:this.scaleSize={x:1,y:1},this.canvas.style&&(this.canvas.style.transform="scale(".concat(this.scaleSize.x,", ").concat(this.scaleSize.y,")"))}},{key:"toDataURL",value:function(){return this.canvas.toDataURL?this.canvas.toDataURL():""}},{key:"autoRefresh",value:function(r){var n,i;if(!this.___isAutoRefreshing)return(n=this).___isAutoRefreshing=!0,i=Date.now(),n.__requestAnimationFrameFunHandler&&this.cancelAnimationFrame(n.__requestAnimationFrameFunHandler),n.__requestAnimationFrameFunHandler=this.requestAnimationFrame(function t(){var e;n.destroyed?n.___isAutoRefreshing=!1:(n.needUpdate&&n.redraw(),e=Date.now()-i,n.emit("update",e),n.__requestAnimationFrameFunHandler&&n.cancelAnimationFrame(n.__requestAnimationFrameFunHandler),n.__requestAnimationFrameFunHandler=n.requestAnimationFrame(t),r&&r())}),this}},{key:"destroy",value:function(){this.eventHandler.destroy(),this.destroyed=!0}}])&&y(r.prototype,e),t&&y(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(c.jmControl)},{"./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,r){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)}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function l(t,e,r){e=u(e);var n=t,e=s()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r);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 c(n)}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function o(t){var r="function"==typeof Map?new Map:void 0;return function(t){if(null===t||!(e=>{try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}})(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,e)}function e(){return function(t,e,r){var n;return s()?Reflect.construct.apply(null,arguments):((n=[null]).push.apply(n,e),e=new(t.bind.apply(t,n)),r&&a(e,r.prototype),e)}(t,arguments,u(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),a(e,t)}(t)}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(s=function(){return!!t})()}function a(t,e){return(a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.jmList=r.default=void 0;r.jmList=r.default=(t=>{function u(){var t,e=this,r=u;if(!(e instanceof r))throw new TypeError("Cannot call a class as a function");for(var n=[],i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];if(o&&o.length&&Array.isArray(o[0])){for(var a=0;a<o[0].length;a++)n.push(o[0][a]);t=l(this,u,[].concat(n))}else t=l(this,u);return t.option={},t.type="jmList",c(t)}var e,r=u;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&a(r,t),r=u,(t=[{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]);else"object"==i(t)&&this.includes(t)||this.push(t);return 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 r=this.length-1;0<=r;r--)if(!1===t.call(this,r,this[r]))break}else for(var n=this.length,i=0;i<n;i++)if(!1===t.call(this,i,this[i]))break}},{key:"count",value:function(t){if(t&&"function"==typeof t){for(var e=0,r=this.length,n=0;n<r;n++)t(this[n])&&e++;return e}return this.length}},{key:"clear",value:function(){this.splice(0,this.length)}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(o(Array))},{}],7:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.jmObject=r.default=void 0;var 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 r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=o(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==o(t)?t:t+""))(n.key),n)}}var a=0;r.jmObject=r.default=(()=>{function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");t&&"jmGraph"==t.type&&(this.graph=t),this.id=++a}return t=e,(r=[{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(r){r=r||o;var t,n=[],i=(new Date).getTime();for(t in r.animateHandles.each(function(t,e){try{e&&e.handle&&(!e.times||i-e.times>=e.millisec)&&(!1===e.handle.apply(r,e.params)&&n.push(e),e.times=i)}catch(t){window.console&&window.console.info&&window.console.info(t.toString()),e&&n.push(e)}}),n)r.animateHandles.remove(n[t]);r.animate()},10,this))}else{var r=this.graph;r&&r.animate.apply(r,arguments)}}}])&&s(t.prototype,r),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n})()},{"./jmList.js":6}],8:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmPath=r.default=void 0;t=t("./jmControl.js");function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function o(t,e,r){e=a(e);var n=t,e=s()?Reflect.construct(e,r||[],a(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(s=function(){return!!t})()}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmPath=r.default=(t=>{function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmPath",r=this,n=i;if(r instanceof n)return(r=o(this,i,[t,e])).points=t&&t.points?t.points:[],r;throw new TypeError("Cannot call a class as a function")}var e,r=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&u(r,t),r=i,(t=[{key:"points",get:function(){return this.property("points")},set:function(t){return this.needUpdate=!0,this.property("points",t)}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(t.jmControl)},{"./jmControl.js":2}],9:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmProperty=r.default=void 0;var o=t("./jmUtils.js"),t=t("./jmObject.js");function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function a(t,e,r){e=l(e);var n=t,e=u()?Reflect.construct(e,r||[],l(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(u=function(){return!!t})()}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var h=Symbol("properties");r.jmProperty=r.default=(t=>{function r(t){var e;if(this instanceof r)return(e=a(this,r))[h]={},t&&t.mode&&(e.mode=t.mode),e;throw new TypeError("Cannot call a class as a function")}var e,n=r;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&c(n,t),n=r,(t=[{key:"property",value:function(){for(var t,e,r,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];if(i)return t=this[h],e=i[0],1<i.length?(r=i[1],r={oldValue:t[e],newValue:r},t[e]=i[1],this.emit&&this.emit("propertyChange",e,r),i[1]):e?t[e]:void 0}},{key:"needUpdate",get:function(){return this.property("needUpdate")},set:function(t){this.property("needUpdate",t),t&&!this.is("jmGraph")&&this.graph&&(this.graph.needUpdate=!0)}},{key:"graph",get:function(){return this.property("graph")||this.property("graph",this.findParent("jmGraph"))},set:function(t){return this.property("graph",t)}},{key:"mode",get:function(){var t=this.property("mode");return t||(this.is("jmGraph")?this.property("mode"):this.graph.mode)},set:function(t){return this.property("mode",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)}}])&&s(n.prototype,t),e&&s(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n})(t.jmObject)},{"./jmObject.js":7,"./jmUtils.js":11}],10:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.jmShadow=r.default=void 0;var n=t("./jmUtils.js");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)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}r.jmShadow=r.default=(()=>{function i(t,e,r,n){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");"string"!=typeof t||e||r||n?(this.x=t,this.y=e,this.blur=r,this.color=n):this.fromString(t)}return t=i,(e=[{key:"fromString",value:function(t){if(t)return(t=t.match(/\s*([^,]+)\s*,\s*([^,]+)\s*(,[^,]+)?\s*(,[\s\S]+)?\s*/i))&&(this.x=t[1]||0,this.y=t[2]||0,t[3]&&(t[3]=n.jmUtils.trim(t[3],", "),0===t[3].indexOf("#")||/^rgb/i.test(t[3])?this.color=t[3]:this.blur=n.jmUtils.trim(t[3],", ")),t[4])&&(this.color=n.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),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r})()},{"./jmUtils.js":11}],11:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.jmUtils=r.default=void 0;var c=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 r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=h(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=h(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==h(t)?t:t+""))(n.key),n)}}var o={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",transparent:"rgba(0,0,0,0)"};r.jmUtils=r.default=(()=>{function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function")}return e=t,n=[{key:"clone",value:function(t,e){var r,n=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,n,o);if(s)return s}if("boolean"==typeof e&&(n=e,e=void 0),100<++o)return e;if(t&&"object"===h(t)){if(e=e||{},this.isType(t,c.jmList))return new c.jmList(t);if(Array.isArray(t)){if(n){for(var a=[],u=0;u<t.length;u++)a.push(this.clone(t[u],e[u],n,i,o));return a}return t.slice(0)}for(var l in t.__proto__&&(e.__proto__=t.__proto__),t)"constructor"!==l&&((r=t[l])&&(r.tagName||r.getContext)?e[l]=r:"object"!==h(e[l])&&void 0!==e[l]||(e[l]=this.clone(r,e[l],n,i,o)));return e}return void 0!==e?e:t}},{key:"bindEvent",value:function(t,e,r,n){if(e&&e.indexOf&&-1!=e.indexOf(" "))for(var i=e.split(" "),o=0;o<i.length;o++)this.bindEvent(t,i[o],r,n);return t.attachEvent?t.attachEvent("on"+e,r,n):t.addEventListener&&t.addEventListener(e,r,n),{name:e,target:t,fun:r}}},{key:"removeEvent",value:function(t,e,r){return t.removeEventListener?t.removeEventListener(e,r,!1):t.detachEvent?(t.detachEvent("on"+e,r),!0):void(t["on"+e]=null)}},{key:"getElementPosition",value:function(t){var e={top:0,left:0};if(t)if(t.offsetParent)for(;t.offsetParent;)e.top+=t.offsetTop,e.left+=t.offsetLeft,t=t.offsetParent;else t.x&&(e.left+=t.x);return e}},{key:"getEventPosition",value:function(t,e){var r=(t=t||event).isWXMiniApp,n=!1,i=t.changedTouches||t.targetTouches||t.touches,o=t.target||t.srcElement,s=(i&&i.length&&((t=i[0]).target||(t.target=o),n=!0),t.pageX||t.x),a=(void 0===s&&(s=t.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)),t.pageY||t.y),u=(void 0===a&&(a=t.clientY+(document.documentElement.scrollTop||document.body.scrollTop)),t.offsetX),l=t.offsetY;return void 0===u&&void 0===l&&(l=r?(u=t.x,t.y):(u=s-(o=this.getElementPosition(o)).left,a-o.top)),e&&(e.x&&(u/=e.x),e.y)&&(l/=e.y),{pageX:s,pageY:a,clientX:t.clientX,clientY:t.clientY,offsetX:u,offsetY:l,layerX:t.layerX,layerY:t.layerY,screenX:t.screenX,screenY:t.screenY,x:u,y:l,isTouch:n,touches:i,isWXMiniApp:r}}},{key:"isType",value:function(t,e){return!(!t||"object"!==h(t))&&t.constructor===e}},{key:"pointInPolygon",value:function(t,e,r){r=r||1,r/=2;var n,i,o,s=e.length,a=!1,u=!0;if(!e||0==s)return 0;if(1==s)return Math.abs(e[0].x-t.x)<=r&&Math.abs(e[0].y-t.y)<=r;if(2==s)return Math.min(e[0].x,e[1].x)-t.x>r||t.x-Math.max(e[0].x,e[1].x)>r||Math.min(e[0].y,e[1].y)-t.y>r||t.y-Math.max(e[0].y,e[1].y)>r?0:e[0].x==e[1].x?Math.abs(e[0].x-t.x)<=r&&(t.y-e[0].y)*(t.y-e[1].y)<=0?1:0:e[0].y==e[1].y?Math.abs(e[0].y-t.y)<=r&&(t.x-e[0].x)*(t.x-e[1].x)<=0?1:0:Math.abs(e[0].x-t.x)<r&&Math.abs(e[0].y-t.y)<r||Math.abs(e[1].x-t.x)<r&&Math.abs(e[1].y-t.y)<r||t.y!=e[0].y&&t.y!=e[1].y&&(o=(e[1].x-e[0].x)/(e[1].y-e[0].y)*(t.y-e[0].y),o=(t.y-e[0].y)/Math.sqrt(o*o+(t.y-e[0].y)*(t.y-e[0].y))*(t.x-e[0].x-o),Math.abs(o)<=r)?1:0;for(n=0;n<s;++n)if(e[n].x==t.x&&e[n].y==t.y)return 1;for(;u;)for(a=u=!1,n=0,i=s-1;n<s;i=n++)if(e[n].y<t.y&&t.y<e[i].y||e[i].y<t.y&&t.y<e[n].y){if(t.x<=e[n].x||t.x<=e[i].x){var l=(t.y-e[n].y)*(e[i].x-e[n].x)/(e[i].y-e[n].y)+e[n].x;if(t.x<l)a=!a;else if(t.x==l)return 1}}else if(t.y==e[n].y){if(t.x<e[n].x){e[n].y>e[i].y?--t.y:++t.y,u=!0;break}}else if(e[n].y==e[i].y&&t.y==e[n].y&&(e[n].x<t.x&&t.x<e[i].x||e[i].x<t.x&&t.x<e[n].x)){a=!0;break}return a?2:0}},{key:"checkOutSide",value:function(t,e,r){var n={left:0,right:0,top:0,bottom:0};return r.x<0?n.left=e.left+r.x-t.left:0<r.x&&(n.right=e.right+r.x-t.right),r.y<0?n.top=e.top+r.y-t.top:0<r.y&&(n.bottom=e.bottom+r.y-t.bottom),n}},{key:"rotatePoints",value:function(t,e,r){if(r&&t){var n=Math.cos(r),i=Math.sin(r);if(Array.isArray(t))for(var o,s,a=0;a<t.length;a++)t[a]&&(o=t[a].x-e.x,s=t[a].y-e.y,t[a].x=o*n-s*i+e.x,t[a].y=o*i+s*n+e.y);else{var r=t.x-e.x,u=t.y-e.y;t.x=r*n-u*i+e.x,t.y=r*i+u*n+e.y}}return t}},{key:"trimStart",value:function(t,e){if(e=e||" ",t&&0<t.length){var r=t[0];if(r===e||0<=e.indexOf(r))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 r=t[t.length-1];if(r===e||0<=e.indexOf(r))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,r=(t=t.toLowerCase()).length,n=0;n<r;n++){var i="0123456789abcdef".indexOf(t[n]);if(0!=i){for(var o=1;o<r-n;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){var e,r;return"string"!=typeof t?t:(t=this.trim(t),this.__hexToRGBA_Cache=this.__hexToRGBA_Cache||{},this.__hexToRGBA_Cache[t]||("#"==(r=o[r=t]?o[r]:r)[0]&&(e={a:1},8<=r.length?(e.a=r.substr(1,2),e.g=r.substr(5,2),e.b=r.substr(7,2),e.r=r.substr(3,2),e.a=Number((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),r=e):7===r.length||4===r.length?(4===r.length?(e.g=r.substr(2,1),e.g=e.g+e.g,e.b=r.substr(3,1),e.b=e.b+e.b,e.r=r.substr(1,1),e.r=e.r+e.r):(e.g=r.substr(3,2),e.b=r.substr(5,2),e.r=r.substr(1,2)),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),r=e):5===r.length&&(e.a=r.substr(1,1),e.g=r.substr(3,1),e.b=r.substr(4,1),e.r=r.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=Number((this.hexToNumber(e.a)/255).toFixed(4)),r=e)),"string"==typeof r&&(e=r.match(/rgb(a)?\s*\(\s*([\d\.]+)\s*,\s*([\d\.]+)\s*,\s*([\d\.]+)\s*(,\s*[\d\.]+)?\s*\)/i))&&6===e.length&&(r={r:Number(e[2]),g:Number(e[3]),b:Number(e[4]),a:Number(this.trimStart(e[5]||"1",","))}),this.__hexToRGBA_Cache[t]=r))}},{key:"rgbToDecimal",value:function(t){return(t=this.clone(t)).r=this.byteToDecimal(t.r),t.g=this.byteToDecimal(t.g),t.b=this.byteToDecimal(t.b),t}},{key:"byteToDecimal",value:function(t){return t/255}},{key:"toColor",value:function(t,e,r,n){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=void 0!==i.r?i.r:t,e=void 0!==i.g?i.g:e,r=void 0!==i.b?i.b:r,n=void 0!==i.a?i.a:n}return t&&"object"===h(t)&&(e=t.g,r=t.b,n=t.a||1,t=t.r),void 0!==t&&void 0!==e&&void 0!==r?void 0!==n?"rgba("+t+","+e+","+r+","+n+")":"rgb("+t+","+e+","+r+")":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)}}],(r=null)&&i(e.prototype,r),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n})()},{"./jmList.js":6}],12:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=n;function n(t,e,r){r=r||2;var n,i,o,s,a,u=e&&e.length,l=u?e[0]*r:t.length,c=d(t,0,l,r,!0),h=[];if(c&&c.next!==c.prev){if(u&&(c=((t,e,r,n)=>{var i,o,s,a,u=[];for(i=0,o=e.length;i<o;i++)a=e[i]*n,s=i<o-1?e[i+1]*n:t.length,(a=d(t,a,s,n,!1))===a.next&&(a.steiner=!0),u.push((t=>{for(var e=t,r=t;(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),(e=e.next)!==t;);return r})(a));for(u.sort(m),i=0;i<u.length;i++)r=((t,e)=>{var r=((t,e)=>{var r,n=e,i=t.x,o=t.y,s=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var a=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=i&&s<a&&(s=a,r=n.x<n.next.x?n:n.next,a===i))return r}}while((n=n.next)!==e);if(!r)return null;var u,l=r,c=r.x,h=r.y,f=1/0;for(n=r;i>=n.x&&n.x>=c&&i!==n.x&&A(o<h?i:s,o,c,h,o<h?s:i,o,n.x,n.y)&&(u=Math.abs(o-n.y)/(i-n.x),R(n,t))&&(u<f||u===f&&(n.x>r.x||n.x===r.x&&((t,e)=>E(t.prev,t,e.prev)<0&&E(e.next,t,t.next)<0)(r,n)))&&(r=n,f=u),(n=n.next)!==l;);return r})(t,e);return r?(O(t=U(r,t),t.next),O(r,r.next)):e})(u[i],r);return r})(t,e,c,r)),t.length>80*r){for(var f=n=t[0],p=i=t[1],y=r;y<l;y+=r)(o=t[y])<f&&(f=o),(s=t[y+1])<p&&(p=s),n<o&&(n=o),i<s&&(i=s);a=0!==(a=Math.max(n-f,i-p))?32767/a:0}S(c,h,r,f,p,a,0)}return h}function d(t,e,r,n,i){var o,s;if(i===0<v(t,e,r,n))for(o=e;o<r;o+=n)s=a(o,t[o],t[o+1],s);else for(o=r-n;e<=o;o-=n)s=a(o,t[o],t[o+1],s);return s&&T(s,s.next)&&(B(s),s=s.next),s}function O(t,e){if(!t)return t;e=e||t;var r,n=t;do{if(r=!1,n.steiner||!T(n,n.next)&&0!==E(n.prev,n,n.next))n=n.next;else{if(B(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function S(t,e,r,n,i,o,s){if(t){if(!s&&o){for(var a=t,u=n,l=i,c=o,h=a;0===h.z&&(h.z=k(h.x,h.y,u,l,c)),h.prevZ=h.prev,h.nextZ=h.next,(h=h.next)!==a;);h.prevZ.nextZ=null,h.prevZ=null;var f,p,y,d,m,v,b,g,x=h,j=1;do{for(p=x,m=x=null,v=0;p;){for(v++,y=p,f=b=0;f<j&&(b++,y=y.nextZ);f++);for(g=j;0<b||0<g&&y;)0!==b&&(0===g||!y||p.z<=y.z)?(p=(d=p).nextZ,b--):(y=(d=y).nextZ,g--),m?m.nextZ=d:x=d,d.prevZ=m,m=d;p=y}}while(m.nextZ=null,j*=2,1<v)}for(var w,_,P=t;t.prev!==t.next;)if(w=t.prev,_=t.next,o?((t,e,r,n)=>{var i=t.prev,o=t,s=t.next;if(!(0<=E(i,o,s))){for(var a=i.x,u=o.x,l=s.x,c=i.y,h=o.y,f=s.y,p=a<u?a<l?a:l:u<l?u:l,y=c<h?c<f?c:f:h<f?h:f,d=u<a?l<a?a:l:l<u?u:l,m=h<c?f<c?c:f:f<h?h:f,v=k(p,y,e,r,n),b=k(d,m,e,r,n),g=t.prevZ,x=t.nextZ;g&&g.z>=v&&x&&x.z<=b;){if(g.x>=p&&g.x<=d&&g.y>=y&&g.y<=m&&g!==i&&g!==s&&A(a,c,u,h,l,f,g.x,g.y)&&0<=E(g.prev,g,g.next))return;if(g=g.prevZ,x.x>=p&&x.x<=d&&x.y>=y&&x.y<=m&&x!==i&&x!==s&&A(a,c,u,h,l,f,x.x,x.y)&&0<=E(x.prev,x,x.next))return;x=x.nextZ}for(;g&&g.z>=v;){if(g.x>=p&&g.x<=d&&g.y>=y&&g.y<=m&&g!==i&&g!==s&&A(a,c,u,h,l,f,g.x,g.y)&&0<=E(g.prev,g,g.next))return;g=g.prevZ}for(;x&&x.z<=b;){if(x.x>=p&&x.x<=d&&x.y>=y&&x.y<=m&&x!==i&&x!==s&&A(a,c,u,h,l,f,x.x,x.y)&&0<=E(x.prev,x,x.next))return;x=x.nextZ}return 1}})(t,n,i,o):(t=>{var e=t.prev,r=t,t=t.next;if(!(0<=E(e,r,t))){for(var n=e.x,i=r.x,o=t.x,s=e.y,a=r.y,u=t.y,l=n<i?n<o?n:o:i<o?i:o,c=s<a?s<u?s:u:a<u?a:u,h=i<n?o<n?n:o:o<i?i:o,f=a<s?u<s?s:u:u<a?a:u,p=t.next;p!==e;){if(p.x>=l&&p.x<=h&&p.y>=c&&p.y<=f&&A(n,s,i,a,o,u,p.x,p.y)&&0<=E(p.prev,p,p.next))return;p=p.next}return 1}})(t))e.push(w.i/r|0),e.push(t.i/r|0),e.push(_.i/r|0),B(t),t=_.next,P=_.next;else if((t=_)===P){s?1===s?S(t=((t,e,r)=>{var n=t;do{var i=n.prev,o=n.next.next}while(!T(i,o)&&C(i,n,n.next,o)&&R(i,o)&&R(o,i)&&(e.push(i.i/r|0),e.push(n.i/r|0),e.push(o.i/r|0),B(n),B(n.next),n=t=o),(n=n.next)!==t);return O(n)})(O(t),e,r),e,r,n,i,o,2):2===s&&((t,e,r,n,i,o)=>{var s=t;do{for(var a,u=s.next.next;u!==s.prev;){if(s.i!==u.i&&((t,e)=>t.next.i!==e.i&&t.prev.i!==e.i&&!((t,e)=>{var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&C(r,r.next,t,e))return 1}while((r=r.next)!==t)})(t,e)&&(R(t,e)&&R(e,t)&&((t,e)=>{for(var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),(r=r.next)!==t;);return n})(t,e)&&(E(t.prev,t,e.prev)||E(t,e.prev,e))||T(t,e)&&0<E(t.prev,t,t.next)&&0<E(e.prev,e,e.next)))(s,u))return a=U(s,u),s=O(s,s.next),a=O(a,a.next),S(s,e,r,n,i,o,0),S(a,e,r,n,i,o,0);u=u.next}}while((s=s.next)!==t)})(t,e,r,n,i,o):S(O(t),e,r,n,i,o,1);break}}}function m(t,e){return t.x-e.x}function k(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function A(t,e,r,n,i,o,s,a){return(t-s)*(o-a)<=(i-s)*(e-a)&&(r-s)*(e-a)<=(t-s)*(n-a)&&(i-s)*(n-a)<=(r-s)*(o-a)}function E(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function T(t,e){return t.x===e.x&&t.y===e.y}function C(t,e,r,n){var i=l(E(t,e,r)),o=l(E(t,e,n)),s=l(E(r,n,t)),a=l(E(r,n,e));return i!==o&&s!==a||0===i&&u(t,r,e)||0===o&&u(t,n,e)||0===s&&u(r,t,n)||!(0!==a||!u(r,e,n))}function u(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function l(t){return 0<t?1:t<0?-1:0}function R(t,e){return E(t.prev,t,t.next)<0?0<=E(t,e,t.next)&&0<=E(t,t.prev,e):E(t,e,t.prev)<0||E(t,t.next,e)<0}function U(t,e){var r=new s(t.i,t.x,t.y),n=new s(e.i,e.x,e.y),i=t.next,o=e.prev;return(t.next=e).prev=t,(r.next=i).prev=r,n.next=r,(o.next=r.prev=n).prev=o,n}function a(t,e,r,n){t=new s(t,e,r);return n?(t.next=n.next,(t.prev=n).next.prev=t,n.next=t):(t.prev=t).next=t,t}function B(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function s(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function v(t,e,r,n){for(var i=0,o=e,s=r-n;o<r;o+=n)i+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return i}n.deviation=function(t,e,r,n){var i=e&&e.length,o=i?e[0]*r:t.length,s=Math.abs(v(t,0,o,r));if(i)for(var a=0,u=e.length;a<u;a++){var l=e[a]*r,c=a<u-1?e[a+1]*r:t.length;s-=Math.abs(v(t,l,c,r))}for(var h=0,a=0;a<n.length;a+=3){var f=n[a]*r,p=n[a+1]*r,y=n[a+2]*r;h+=Math.abs((t[f]-t[y])*(t[1+p]-t[1+f])-(t[f]-t[p])*(t[1+y]-t[1+f]))}return 0===s&&0===h?0:Math.abs((h-s)/s)},n.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var s=0;s<e;s++)r.vertices.push(t[i][o][s]);0<i&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],13:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=n(t("../earcut.js")),a=n(t("./gradient.js")),s=t("./core/program.js"),o=t("./core/buffer.js"),u=t("./core/texture.js");function n(t){return t&&t.__esModule?t:{default:t}}function l(t){return(l="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){return(t=>{if(Array.isArray(t))return f(t)})(t)||(t=>{if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)})(t)||h(t)||(()=>{throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function h(t,e){var r;if(t)return"string"==typeof t?f(t,e):"Map"===(r="Object"===(r={}.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,e):void 0}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function p(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}function y(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?p(Object(i),!0).forEach(function(t){var e,r;e=n,r=i[t=t],(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):p(Object(i)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(i,t))})}return n}function d(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,m(n.key),n)}}function m(t){t=((t,e)=>{if("object"!=l(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=l(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string");return"symbol"==l(t)?t:t+""}var v="\n attribute vec4 a_position;\n attribute vec4 a_color;\n attribute vec2 a_text_coord;\n uniform vec2 a_center_point; // 当前canvas的中心位置\n uniform float a_point_size; // 点的大小\n uniform int a_type;\n varying vec4 v_color;\n varying vec2 v_text_coord;\n varying float v_type;\n\n ".concat("\n vec4 translatePosition(vec4 point, float x, float y) {\n point.x = (point.x-x)/x;\n point.y = (y-point.y)/y;\n return point;\n }","\n\n void main() {\n gl_PointSize = a_point_size == 0.0? 1.0 : a_point_size;\n v_type = float(a_type);\n vec4 pos = translatePosition(a_position, a_center_point.x, a_center_point.y);\n gl_Position = pos;\n v_color = a_color;\n if(a_type == 2) {\n v_text_coord = a_text_coord;\n }\n }\n"),b="\n precision mediump float;\n uniform sampler2D u_sample;\n uniform vec4 v_texture_bounds; // 纹理的左上坐标和大小 x,y,z,w\n uniform vec4 v_single_color;\n varying float v_type;\n varying vec4 v_color;\n varying vec2 v_text_coord;\n\n ".concat("\n vec2 translateTexturePosition(in vec2 point, vec4 bounds) {\n point.x = (point.x-bounds.x)/bounds.z; // 离左上角位置的X长比上纹理宽 0-1\n point.y = 1.0-(point.y-bounds.y)/bounds.w; // 离左上角位置的Y长比上高,因为纹理坐标是左下角起,所以要用1-\n return point;\n }","\n\n void main() {\n // 如果是fill,则直接填充颜色\n if(v_type == 1.0) {\n gl_FragColor = v_single_color;\n }\n // 渐变色\n else if(v_type == 3.0) {\n gl_FragColor = v_color;\n }\n else if(v_type == 2.0) {\n vec2 pos = translateTexturePosition(v_text_coord, v_texture_bounds);\n gl_FragColor = texture2D(u_sample, pos);\n }\n else {\n float r = distance(gl_PointCoord, vec2(0.5, 0.5));\n //根据距离设置片元\n if(r <= 0.5){\n // 方形区域片元距离几何中心半径小于0.5,像素颜色设置红色\n gl_FragColor = v_single_color;\n }else {\n // 方形区域距离几何中心半径不小于0.5的片元剪裁舍弃掉:\n discard;\n }\n }\n }\n"),t=(()=>{function r(t,e){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");this.graph=t,this.option=e||{},this.style={globalAlpha:1}}return t=r,(e=[{key:"context",get:function(){if(this.graph)return this.graph.context}},{key:"textureCanvas",get:function(){var t=this.graph.textureCanvas;if(!t){if("undefined"==typeof document)return null;t=this.graph.textureCanvas=document.createElement("canvas")}return t}},{key:"textureContext",get:function(){return this.textureCanvas.ctx||(this.textureCanvas.ctx=this.textureCanvas.getContext("2d",{willReadFrequently:!0}))}},{key:"program",get:function(){return this.graph.context.pathProgram||(this.graph.context.pathProgram=this.createProgram(v,b))}},{key:"setStyle",value:function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.style;"string"==typeof e&&((t={})[e]=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",e=t),this.style=y(y({},this.style),e)}},{key:"convertColor",value:function(t){return this.isGradient(t)?t:("string"==typeof t&&(t=this.graph.utils.hexToRGBA(t)),this.graph.utils.rgbToDecimal(t))}},{key:"setTextureStyle",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";if("string"==typeof t)-1<["fillStyle","strokeStyle","shadowColor"].indexOf(t)&&(e=this.graph.utils.toColor(e)),this.textureContext[t]=e;else for(var r in t)"constructor"!==r&&this.setTextureStyle(r,t[r])}},{key:"createProgram",value:function(t,e){return this.context.lineWidth(1),(0,s.createProgram)(this.context,t,e)}},{key:"useProgram",value:function(){var t=(t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.program).program||t;return this.context.__curent_program!==t&&((0,s.useProgram)(this.context,t.program||t),this.context.__curent_program=t),t}},{key:"getAttribLocation",value:function(t){return this.context.getAttribLocation(this.program.program,t)}},{key:"getUniformLocation",value:function(t){return this.context.getUniformLocation(this.program.program,t)}},{key:"writeVertexAttrib",value:function(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:2,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:this.context.FLOAT;return t.attr=e,(0,s.writeVertexAttrib)(this.context,t,e,r,n,i,o)}},{key:"disableVertexAttribArray",value:function(t){try{return t?(0,s.disableVertexAttribArray)(this.context,t):t}catch(t){console.error(t)}return t}},{key:"createFloat32Buffer",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.context.ARRAY_BUFFER,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.context.STATIC_DRAW;return y({data:t},(0,o.createFloat32Buffer)(this.context,t,e,r))}},{key:"createUint16Buffer",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.context.ARRAY_BUFFER,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.context.STATIC_DRAW;return y({data:t},(0,o.createUint16Buffer)(this.context,t,e,r))}},{key:"deleteBuffer",value:function(e){try{if(!e)return;var t=e.buffer||e;if(t)return(0,o.deleteBuffer)(this.context,t)}catch(t){console.log(e),console.error(t)}return e}},{key:"create2DTexture",value:function(){return(0,u.create2DTexture)(this.context)}},{key:"createImgTexture",value:function(t){return(0,u.createImgTexture)(this.context,t)}},{key:"createDataTexture",value:function(t){return(0,u.createDataTexture)(this.context,t)}},{key:"deleteTexture",value:function(t){try{return(0,u.deleteTexture)(this.context,t.texture||t)}catch(t){console.error(t)}return t}},{key:"earCutPoints",value:function(t){t=this.pointsToArray(t);return(0,i.default)(t)}},{key:"earCutPointsToTriangles",value:function(t){for(var e=this.earCutPoints(t),r=[],n=0;n<e.length;n+=3){var i=t[e[n]],o=t[e[n+1]],s=t[e[n+2]];r.push([i,o,s])}return r}},{key:"pointsToArray",value:function(t){var e;return(e=[]).concat.apply(e,c(t.map(function(t){return[t.x,t.y]})))}},{key:"arrayToPoints",value:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push({x:t[r],y:t[r+1]});return e}},{key:"createLinearGradient",value:function(t,e,r,n,i){return new a.default("linear",{x1:t,y1:e,x2:r,y2:n,bounds:i,control:this})}},{key:"createRadialGradient",value:function(t,e,r,n,i,o,s){return new a.default("radial",{x1:t,y1:e,r1:r,x2:n,y2:i,r2:o,bounds:s,control:this})}},{key:"isGradient",value:function(t){return t&&t instanceof a.default}},{key:"testSize",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.style,e=(this.textureContext.save&&this.textureContext.save(),(e.font||e.fontSize)&&(this.textureContext.font=e.font||e.fontSize+"px "+e.fontFamily),this.textureContext.measureText?this.textureContext.measureText(t):{width:15});return this.textureContext.restore&&this.textureContext.restore(),e.height=this.style.fontSize||15,e}},{key:"toFillTexture",value:function(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,n=this.textureCanvas;if(!n)return t;if(n.width=e.width,n.height=e.height,!n.width||!n.height)return t;if(this.textureContext.clearRect(0,0,n.width,n.height),this.textureContext.fillStyle=t,this.textureContext.beginPath(),r&&r.length||((r=[]).push({x:e.left,y:e.top}),r.push({x:e.left+e.width,y:e.top}),r.push({x:e.left+e.width,y:e.top+e.height}),r.push({x:e.left,y:e.top+e.height}),r.push({x:e.left,y:e.top})),r&&r.length){var i,o=((t,e)=>{var r,n,i,o,s="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(s)return i=!(n=!0),{s:function(){s=s.call(t)},n:function(){var t=s.next();return n=t.done,t},e:function(t){i=!0,r=t},f:function(){try{n||null==s.return||s.return()}finally{if(i)throw r}}};if(Array.isArray(t)||(s=h(t))||e&&t&&"number"==typeof t.length)return s&&(t=s),o=0,{s:e=function(){},n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},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.")})(r);try{for(o.s();!(i=o.n()).done;){var s=i.value;s.m?this.textureContext.moveTo(s.x-e.left,s.y-e.top):this.textureContext.lineTo(s.x-e.left,s.y-e.top)}}catch(t){o.e(t)}finally{o.f()}}else this.textureContext.moveTo(0,0),this.textureContext.lineTo(e.width,0),this.textureContext.lineTo(e.width,e.height),this.textureContext.lineTo(0,e.height),this.textureContext.lineTo(0,0);return this.textureContext.closePath(),this.textureContext.fill(),{data:this.textureContext.getImageData(0,0,n.width,n.height),points:r}}}])&&d(t.prototype,e),n&&d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n})();r.default=t},{"../earcut.js":12,"./core/buffer.js":14,"./core/program.js":17,"./core/texture.js":19,"./gradient.js":20}],14:[function(t,e,r){function i(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.ARRAY_BUFFER,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.STATIC_DRAW,i=t.createBuffer();if(i)return t.bindBuffer(r,i),t.bufferData(r,e.buffer||e,n),{type:r,drawType:n,buffer:i,unitSize:e.BYTES_PER_ELEMENT};throw Error("创建缓冲区对象失败")}Object.defineProperty(r,"__esModule",{value:!0}),r.createBuffer=i,r.createFloat32Buffer=function(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.ARRAY_BUFFER,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.STATIC_DRAW,e=new Float32Array(e);return i(t,e,r,n)},r.createUint16Buffer=function(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.ARRAY_BUFFER,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.STATIC_DRAW,e=new Uint16Array(e);return i(t,e,r,n)},r.deleteBuffer=function(t,e){t.deleteBuffer(e.buffer||e)}},{}],15:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.mapSize=void 0;var n={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};r.mapSize=function(t){return n[t]}},{}],16:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.mapType=void 0;var o=null,s={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D"};r.mapType=function(t,e){if(!o){var r=Object.keys(s);o={};for(var n=0;n<r.length;++n){var i=r[n];o[t[i]]=s[i]}}return o[e]}},{}],17:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createProgram=function(t,e,r){var e=(0,i.createShader)(t,t.VERTEX_SHADER,e),r=(0,i.createShader)(t,t.FRAGMENT_SHADER,r),n=t.createProgram();t.attachShader(n,e),t.attachShader(n,r),t.linkProgram(n),t.getProgramParameter(n,t.LINK_STATUS)||(console.error("PError: Could not initialize shader."),console.error("gl.VALIDATE_STATUS",t.getProgramParameter(n,t.VALIDATE_STATUS)),console.error("gl.getError()",t.getError()),""!==t.getProgramInfoLog(n)&&console.warn("Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(n)),t.deleteProgram(n));o(t,n),t.deleteShader(e),t.deleteShader(r);e=s(t,n),r=l(t,n);return{program:n,attrs:e,uniforms:r}},r.disableVertexAttribArray=function(t,e){return t.disableVertexAttribArray(e.location)},r.extractAttributes=s,r.extractUniforms=l,r.getAttribLocation=function(t,e,r){return t.getAttribLocation(e,r)},r.getUniformLocation=function(t,e,r){return t.getUniformLocation(e,r)},r.useProgram=o,r.writeVertexAttrib=function(t,e,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:2,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,s=6<arguments.length&&void 0!==arguments[6]?arguments[6]:t.FLOAT;return t.bindBuffer(e.type,e.buffer),t.vertexAttribPointer(r.location,n,s,!1,i*e.unitSize,o),t.enableVertexAttribArray(r.location),e};var i=t("./shader.js"),a=t("./mapSize.js"),u=t("./mapType.js");function o(t,e){return t.useProgram(e)}function s(t,e){for(var r={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<n;i++){var o=t.getActiveAttrib(e,i),s=(0,u.mapType)(t,o.type);r[o.name]={attribData:o,size:(0,a.mapSize)(s),type:s,location:t.getAttribLocation(e,o.name)}}return r}function l(t,e){for(var r={},n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<n;i++){var o=t.getActiveUniform(e,i),s=o.name.replace(/\[.*?\]/,""),a=(0,u.mapType)(t,o.type);r[s]={uniformData:o,type:a,size:o.size,location:t.getUniformLocation(e,s)}}return r}},{"./mapSize.js":15,"./mapType.js":16,"./shader.js":18}],18:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createShader=function(t,e,r){e=t.createShader(e);return t.shaderSource(e,r),t.compileShader(e),e}},{}],19:[function(t,e,r){function i(t){var e=t.createTexture();return t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,1),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.texParameterf(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameterf(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameterf(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameterf(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}Object.defineProperty(r,"__esModule",{value:!0}),r.create2DTexture=i,r.createDataTexture=function(t,e){var r=new Uint8Array(e.data||e),n=i(t);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e.width||1,e.height||1,0,t.RGBA,t.UNSIGNED_BYTE,r),{texture:n}},r.createImgTexture=function(t,e){var r=i(t);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),{texture:r}},r.deleteTexture=function(t,e){return t.deleteTexture(e)}},{}],20:[function(t,e,r){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)}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=(()=>{return t=function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"linear",r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=this,i=t;if(!(n instanceof i))throw new TypeError("Cannot call a class as a function");this.type=e||"linear",this.x1=r.x1||0,this.y1=r.y1||0,this.r1=r.r1||0,this.x2=r.x2||0,this.y2=r.y2||0,this.r2=r.r2||0,this.bounds=r.bounds||{left:0,top:0,width:0,height:0},this.control=r.control,this.stops=[],this.init()},(e=[{key:"init",value:function(){var t=this.x2-this.x1,e=this.y2-this.y1;"radial"===this.type?this.length=this.r2-this.r1:0==t&&0==e?this.length=0:(this.length=Math.sqrt(Math.pow(t,2),Math.pow(e,2)),this.sin=e/this.length,this.cos=t/this.length)}},{key:"addColorStop",value:function(t,e){this.stops.push({offset:t,color:e})}},{key:"toImageData",value:function(n,t){var i,e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return n.textureContext?(i=null,i="linear"===this.type?n.textureContext.createLinearGradient(this.x1,this.y1,this.x2,this.y2):n.textureContext.createRadialGradient(this.x1,this.y1,this.r1,this.x2,this.y2,this.r2),this.stops.forEach(function(t,e){var r=n.graph.utils.toColor(t.color);i&&i.addColorStop(t.offset,r)}),n.toFillTexture(i,t,e)):null}},{key:"toString",value:function(){var e=this.type+"-gradient(";return"linear"==this.type?e+=this.x1+" "+this.y1+" "+this.x2+" "+this.y2:e+=this.x1+" "+this.y1+" "+this.r1+" "+this.x2+" "+this.y2+" "+this.r2,this.stops.forEach(function(t){e+=","+t.color+" "+t.offset}),e+")"}}])&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r})();r.default=o},{}],21:[function(t,e,r){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)}function u(t){return(t=>{if(Array.isArray(t))return n(t)})(t)||(t=>{if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)})(t)||a(t)||(()=>{throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function s(t,e){var r,n,i,o,s="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(s)return i=!(n=!0),{s:function(){s=s.call(t)},n:function(){var t=s.next();return n=t.done,t},e:function(t){i=!0,r=t},f:function(){try{n||null==s.return||s.return()}finally{if(i)throw r}}};if(Array.isArray(t)||(s=a(t))||e&&t&&"number"==typeof t.length)return s&&(t=s),o=0,{s:e=function(){},n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},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.")}function a(t,e){var r;if(t)return"string"==typeof t?n(t,e):"Map"===(r="Object"===(r={}.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function l(t,e,r){e=h(e);var n=t,e=c()?Reflect.construct(e,r||[],h(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=(t=>{function r(t,e){if(this instanceof r)return(t=l(this,r,[t,e])).isRegular=e.isRegular||!1,t.needCut=e.needCut||!1,t.control=e.control,t.points=[],t;throw new TypeError("Cannot call a class as a function")}var e,n=r;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&f(n,t),n=r,(t=[{key:"setParentBounds",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.parentAbsoluteBounds;t&&(this.parentAbsoluteBounds=t),this.context.uniform2f(this.program.uniforms.a_center_point.location,this.graph.width/2,this.graph.height/2)}},{key:"setFragColor",value:function(t){if(!Array.isArray(t))return void 0===(t=this.convertColor(t)).a&&(t.a=1),this.context.uniform4f(this.program.uniforms.v_single_color.location,t.r,t.g,t.b,t.a*this.style.globalAlpha),null;var e,r=[],n=s(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;void 0===(i=this.convertColor(i)).a&&(i.a=1),r.push(i.r,i.g,i.b,i.a*this.style.globalAlpha)}}catch(t){n.e(t)}finally{n.f()}t=this.createFloat32Buffer(r);return this.writeVertexAttrib(t,this.program.attrs.a_color,4,0,0),t.attr=this.program.attrs.a_color,t}},{key:"beginDraw",value:function(){this.useProgram()}},{key:"draw",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.parentAbsoluteBounds;this.setParentBounds(e),this.points=t}},{key:"endDraw",value:function(){this.points&&delete this.points,this.pathPoints&&delete this.pathPoints}},{key:"closePath",value:function(){var t,e;this.points&&2<this.points.length&&this.points[0]!==this.points[this.points.length-1]&&((t=this.points[0])==(e=this.points[this.points.length-1])||t.x===e.x&&t.y===e.y||this.points.push(t))}},{key:"writePoints",value:function(t){var e,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.program.attrs.a_position,n=[],i=s(t);try{for(i.s();!(e=i.n()).done;){var o=e.value;n.push(o.x+this.parentAbsoluteBounds.left,o.y+this.parentAbsoluteBounds.top)}}catch(t){i.e(t)}finally{i.f()}t=this.createFloat32Buffer(n);return this.writeVertexAttrib(t,r,2,0,0),t.attr=r,t}},{key:"genLinePoints",value:function(t,e){var r=[t],n=e.x-t.x,i=e.y-t.y;if(0!=n||0!=i)for(var o=Math.sqrt(Math.pow(n,2)+Math.pow(i,2)),s=n/o,a=i/o,u=.5;u<o;u+=.5){var l=t.x+s*u;r.push({x:l,y:t.y+a*u})}return r.push(e),r}},{key:"pathToPoints",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.points,e=null,r=[],n=0;n<t.length;n++){var i,o=t[n];e&&!o.m?(i=this.genLinePoints(e,o),r.push.apply(r,u(i))):e&&!r.includes(e)&&r.push(e),e=o}return r.includes(e)||r.push(e),r}},{key:"equalPoint",value:function(t,e){return t.x===e.x&&t.y===e.y}},{key:"pathToLines",value:function(t){for(var e=null,r=[],n=0;n<t.length;n++){var i=t[n];!e||i.m||e.x==i.x&&e.y==i.y||r.push({start:e,end:i}),e=i}return r}},{key:"cutLines",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;if(!(t&&t.length<3))for(r=Math.max(e+1,r);e<t.length;){for(var n=t[e];r<t.length;){var i=t[r];if(this.equalPoint(n.start,i.start)||this.equalPoint(n.end,i.end)||this.equalPoint(n.start,i.end)||this.equalPoint(n.end,i.start))r++;else{var o,s,a=!1,u=this.getIntersection(n,i);if(u&&(this.equalPoint(n.start,u)||this.equalPoint(n.end,u)||(o={start:n.start,end:u},s={start:u,end:n.end},t.splice(e,1,o,s),a=!0,r++),this.equalPoint(i.start,u)||this.equalPoint(i.end,u)||(o={start:i.start,end:u},s={start:u,end:i.end},t.splice(r,1,o,s),r++)),r++,a)return this.cutLines(t,e,r)}}r=++e+1}return t}},{key:"getIntersection",value:function(t,e){var r,n;return this.equalPoint(t.start,e.start)||this.equalPoint(t.start,e.end)?t.start:this.equalPoint(t.end,e.start)||this.equalPoint(t.end,e.end)?t.end:0<(n=(t.start.x-e.start.x)*(t.end.y-e.start.y)-(t.start.y-e.start.y)*(t.end.x-e.start.x))*(r=(t.start.x-e.end.x)*(t.end.y-e.end.y)-(t.start.y-e.end.y)*(t.end.x-e.end.x))||0<(e=(e.start.x-t.start.x)*(e.end.y-t.start.y)-(e.start.y-t.start.y)*(e.end.x-t.start.x))*(e+n-r)||r==n?null:(r=(e=e/(r-n))*(t.end.x-t.start.x),n=e*(t.end.y-t.start.y),{x:t.start.x+r,y:t.start.y+n})}},{key:"getIntersectionLines",value:function(t,e,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.end,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:[],o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:null,s={line:t,polygons:[]};if(i.push(n),o&&this.equalPoint(o.line.start,n))i.unshift(o.line.start),o.polygons.push(i);else for(;r<e.length;r++){var a=e[r];this.equalPoint(n,a.start)?i.includes(a.end)||this.getIntersectionLines(a,e,r+1,a.end,u(i),o||s):this.equalPoint(n,a.end)&&!i.includes(a.start)&&this.getIntersectionLines(a,e,r+1,a.start,u(i),o||s)}return s}},{key:"getPolygon",value:function(t){var e=[];if((r=this.pathToLines(t))&&2<r.length)for(var r=this.cutLines(r),n=0;n<r.length-1;n++){var i=r[n],i=this.getIntersectionLines(i,r,n+1);i.polygons.length&&e.push.apply(e,u(i.polygons))}return e}},{key:"getTriangles",value:function(t){var e=[],t=this.getPolygon(t);if(t.length){var r,n=s(t);try{for(n.s();!(r=n.n()).done;){var i=r.value,o=this.earCutPointsToTriangles(i);e.push.apply(e,u(o))}}catch(t){n.e(t)}finally{n.f()}}return e}},{key:"stroke",value:function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.points,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.style.strokeStyle,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.style.lineWidth;e&&e.length&&(t=null,r&&(t=this.setFragColor(r)),n&&this.context.uniform1f(this.program.uniforms.a_point_size.location,n),this.program.uniforms.a_type&&this.context.uniform1i(this.program.uniforms.a_type.location,1===e.length?4:1),e&&e.length&&(e=(r=n<=1.2)?e:this.pathToPoints(e),n=this.writePoints(e),this.context.drawArrays(r?this.context.LINE_LOOP:this.context.POINTS,0,e.length),this.deleteBuffer(n)),t&&this.deleteBuffer(t),t)&&this.disableVertexAttribArray(t.attr)}},{key:"fill",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{left:0,top:0,width:0,height:0},e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;this.points&&this.points.length&&(this.style.fillStyle&&this.fillColor(this.style.fillStyle,this.points,t,e),this.style.fillImage)&&this.fillImage(this.style.fillImage,this.points,t,e)}},{key:"fillColor",value:function(t,e,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1;if(this.isGradient(t))return i=t.toImageData(this,r,e),this.fillImage(i.data,i.points,r);this.context.uniform1i(this.program.uniforms.a_type.location,n);var i=this.setFragColor(t);this.fillPolygons(e),i&&this.deleteBuffer(i),i&&this.disableVertexAttribArray(i.attr)}},{key:"fillImage",value:function(t,e,r){t&&(t=t instanceof ImageData?this.createDataTexture(t):this.createImgTexture(t),this.context.uniform1i(this.program.uniforms.u_sample.location,0),this.context.uniform4f(this.program.uniforms.v_texture_bounds.location,r.left+this.parentAbsoluteBounds.left,r.top+this.parentAbsoluteBounds.top,r.width,r.height),this.fillTexture(e),this.deleteTexture(t))}},{key:"fillTexture",value:function(t){t&&t.length&&(this.context.uniform1i(this.program.uniforms.a_type.location,2),this.fillPolygons(t,!0),this.disableVertexAttribArray(this.program.attrs.a_text_coord))}},{key:"fillPolygons",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],r=this.writePoints(t),e=e?this.writePoints(t,this.program.attrs.a_text_coord):null;this.context.drawArrays(this.context.TRIANGLE_FAN,0,t.length),this.deleteBuffer(r),e&&this.deleteBuffer(e)}},{key:"drawImage",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.width,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:t.height,n=n||t.width,i=i||t.height;this.fillImage(t,this.points,{left:e,top:r,width:n,height:i})}},{key:"drawText",value:function(t,e,r,n){var i=this.textureCanvas;if(!i)return null;if(i.width=n.width,i.height=n.height,!i.width||!i.height)return null;this.textureContext.clearRect(0,0,i.width,i.height),this.textureContext.font=this.style.font||this.style.fontSize+"px "+this.style.fontFamily,e-=n.left,r-=n.top,this.setTextureStyle(this.style),this.style.fillStyle&&this.textureContext.fillText&&(this.style.maxWidth?this.textureContext.fillText(t,e,r,this.style.maxWidth):this.textureContext.fillText(t,e,r)),this.textureContext.strokeText&&(this.style.maxWidth?this.textureContext.strokeText(t,e,r,this.style.maxWidth):this.textureContext.strokeText(t,e,r));t=this.textureContext.getImageData(0,0,i.width,i.height);this.fillImage(t,this.points,n)}}])&&o(n.prototype,t),e&&o(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n})(((t=t("./base.js"))&&t.__esModule?t:{default:t}).default);r.default=t},{"./base.js":13}],22:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmArc=r.default=void 0;t=t("../core/jmPath.js");function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function o(t,e,r){e=a(e);var n=t,e=s()?Reflect.construct(e,r||[],a(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(s=function(){return!!t})()}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmArc=r.default=(t=>{function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmArc",r=this,n=i;if(r instanceof n)return(t=t||{}).isRegular=!1!==t.isRegular,t.needCut=!0===t.needCut,(r=o(this,i,[t,e])).center=t.center||{x:0,y:0},r.radius=t.radius||0,r.startAngle=t.start||t.startAngle||0,r.endAngle=t.end||t.endAngle||2*Math.PI,r.anticlockwise=t.anticlockwise||0,r.isFan=!!t.isFan,r;throw new TypeError("Cannot call a class as a function")}var e,r=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&u(r,t),r=i,(t=[{key:"center",get:function(){return this.property("center")},set:function(t){return this.needUpdate=!0,this.property("center",t)}},{key:"radius",get:function(){return this.property("radius")},set:function(t){return this.needUpdate=!0,this.property("radius",t)}},{key:"startAngle",get:function(){return this.property("startAngle")},set:function(t){return this.needUpdate=!0,this.property("startAngle",t)}},{key:"endAngle",get:function(){return this.property("endAngle")},set:function(t){return this.needUpdate=!0,this.property("endAngle",t)}},{key:"anticlockwise",get:function(){return this.property("anticlockwise")},set:function(t){return this.needUpdate=!0,this.property("anticlockwise",t)}},{key:"initPoints",value:function(){var t=this.getLocation(),e=0,r=0,n=t.center.x,i=t.center.y,o=(t.radius?e=r=t.radius:(e=t.width/2,r=t.height/2),this.startAngle),s=this.endAngle;if((0!=e||0!=r)&&o!=s){var a=this.anticlockwise,u=(this.points=[],1/Math.max(e,r));a&&(o=(a=2*Math.PI)-o,s=a-s),s<o&&(u=-u),this.isFan&&this.points.push(t.center);for(var l=o;;l+=u){(0<u&&s<l||u<0&&l<s)&&(l=s);var c={x:Math.cos(l)*e+n,y:Math.sin(l)*r+i};if(this.points.push(c),l==s)break}return this.points}}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(t.jmPath)},{"../core/jmPath.js":8}],23:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmArrow=r.default=void 0;var n=t("../core/jmPath.js"),u=t("../core/jmUtils.js");function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function s(t,e,r){e=l(e);var n=t,e=a()?Reflect.construct(e,r||[],l(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(a=function(){return!!t})()}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmArrow=r.default=(t=>{function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmArrow",r=this,n=i;if(r instanceof n)return(r=s(this,i,[t,e])).style.lineJoin="miter",r.style.lineCap="square",r.angle=t.angle||0,r.start=t.start||{x:0,y:0},r.end=t.end||{x:0,y:0},r.offsetX=t.offsetX||5,r.offsetY=t.offsetY||8,r;throw new TypeError("Cannot call a class as a function")}var e,r=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&c(r,t),r=i,(t=[{key:"start",get:function(){return this.property("start")},set:function(t){return this.needUpdate=!0,this.property("start",t)}},{key:"end",get:function(){return this.property("end")},set:function(t){return this.needUpdate=!0,this.property("end",t)}},{key:"angle",get:function(){return this.property("angle")},set:function(t){return this.needUpdate=!0,this.property("angle",t)}},{key:"offsetX",get:function(){return this.property("offsetX")},set:function(t){return this.needUpdate=!0,this.property("offsetX",t)}},{key:"offsetY",get:function(){return this.property("offsetY")},set:function(t){return this.needUpdate=!0,this.property("offsetY",t)}},{key:"initPoints",value:function(t){var e,r,n,i,o=this.angle,s=this.start,a=this.end;if(a)return o=o||Math.atan2(a.y-s.y,a.x-s.x),this.points=[],s=this.offsetX,e=this.offsetY,n=o+(i=Math.atan2(s,e)),r=Math.sin(n),n=Math.cos(n),s=Math.sqrt(s*s+e*e),e={x:a.x-n*s,y:a.y-r*s},o=o-i,r=Math.sin(o),n=Math.cos(o),i={x:a.x-n*s,y:a.y-r*s},(o=u.jmUtils.clone(a)).m=!0,this.points.push(o),this.points.push(e),t||this.style.fill?(this.points.push(i),this.points.push(a)):(this.points.push(o),this.points.push(i)),this.points}}])&&o(r.prototype,t),e&&o(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(n.jmPath)},{"../core/jmPath.js":8,"../core/jmUtils.js":11}],24:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmArrowLine=r.default=void 0;var n=t("./jmLine.js"),s=t("./jmArrow.js");function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function u(t,e,r){e=c(e);var n=t,e=o()?Reflect.construct(e,r||[],c(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(o=function(){return!!t})()}function l(){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=((t,e)=>{for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=c(t)););return t})(t,e);if(n)return(n=Object.getOwnPropertyDescriptor(n,e)).get?n.get.call(arguments.length<3?t:r):n.value}).apply(null,arguments)}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(t,e){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmArrowLine=r.default=(t=>{function o(t,e){if(this instanceof o)return t.start=t.start||{x:0,y:0},t.end=t.end||{x:0,y:0},(e=u(this,o,[t,e||"jmArrowLine"])).style.lineJoin=e.style.lineJoin||"miter",e.arrow=new s.jmArrow(t),e;throw new TypeError("Cannot call a class as a function")}var e,r=o;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&h(r,t),r=o,(t=[{key:"initPoints",value:function(){var t,e,r,n,i;return this.points=(t=o,e="initPoints",r=this,i=l(c(1&(n=3)?t.prototype:t),e,r),(2&n&&"function"==typeof i?function(t){return i.apply(r,t)}:i)([])),!1!==this.arrowVisible&&(this.points=this.points.concat(this.arrow.initPoints())),this.points}}])&&a(r.prototype,t),e&&a(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(n.jmLine)},{"./jmArrow.js":23,"./jmLine.js":30}],25:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.jmBezier=r.default=void 0;t=t("../core/jmPath.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 n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=o(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==o(t)?t:t+""))(n.key),n)}}function s(t,e,r){e=a(e);var n=t,e=i()?Reflect.construct(e,r||[],a(t).constructor):e.apply(t,r);if(!e||"object"!=o(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(i=function(){return!!t})()}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmBezier=r.default=(t=>{function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmBezier",r=this,n=i;if(r instanceof n)return t.style&&!0!==o(t.style.close)&&(t.style.close=!1),(r=s(this,i,[t,e])).cpoints=t.points||[],r;throw new TypeError("Cannot call a class as a function")}var e,r=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&u(r,t),r=i,(t=[{key:"cpoints",get:function(){return this.property("cpoints")},set:function(t){return this.needUpdate=!0,this.property("cpoints",t)}},{key:"initPoints",value:function(){this.points=[];for(var t=this.cpoints,e=0;e<=1;e+=.01){var r=this.getPoint(t,e);this.points.push(r)}return this.points.push(t[t.length-1]),this.points}},{key:"getPoint",value:function(t,e){if(1==t.length)return t[0];var r;if(2==t.length)return(r={}).x=(t[1].x-t[0].x)*e+t[0].x,r.y=(t[1].y-t[0].y)*e+t[0].y,r;if(2<t.length){for(var n=[],i=0;i<t.length-1;i++){var o=this.getPoint([t[i],t[i+1]],e);o&&n.push(o)}return this.getPoint(n,e)}}},{key:"offset",value:function(t,e,r){var n=this.cpoints;if(n){for(var i=n.length,o=0;o<i;o++)n[o].x+=t,n[o].y+=e;this.emit("move",{offsetX:t,offsetY:e,trans:r}),this.getLocation(!0)}}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(t.jmPath)},{"../core/jmPath.js":8}],26:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmCircle=r.default=void 0;t=t("./jmArc.js");function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function s(t,e,r){e=l(e);var n=t,e=o()?Reflect.construct(e,r||[],l(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(o=function(){return!!t})()}function a(t,e,r,n){var i=u(l(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof i?function(t){return i.apply(r,t)}:i}function u(){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=((t,e)=>{for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t})(t,e);if(n)return(n=Object.getOwnPropertyDescriptor(n,e)).get?n.get.call(arguments.length<3?t:r):n.value}).apply(null,arguments)}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmCircle=r.default=(t=>{function o(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmCircle",r=this,n=o;if(r instanceof n)return t.isRegular=!0,s(this,o,[t,e]);throw new TypeError("Cannot call a class as a function")}var e,r=o;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&c(r,t),r=o,(t=[{key:"initPoints",value:function(){if("webgl"===this.graph.mode)return a(o,"initPoints",this,3)([]);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(){if("webgl"===this.graph.mode)return a(o,"draw",this,3)([]);var t=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds,e=this.getLocation(),r=(e.radius||(e.radius=Math.min(e.width,e.height)/2),this.startAngle),n=this.endAngle,i=this.anticlockwise;this.context.arc(e.center.x+t.left,e.center.y+t.top,e.radius,r,n,i)}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(t.jmArc)},{"./jmArc.js":22}],27:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmHArc=r.default=void 0;t=t("./jmArc.js");function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function o(t,e,r){e=a(e);var n=t,e=s()?Reflect.construct(e,r||[],a(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(s=function(){return!!t})()}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmHArc=r.default=(t=>{function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmHArc",r=this,n=i;if(r instanceof n)return t.isRegular=!0,t.needCut=!0,(r=o(this,i,[t,e])).minRadius=t.minRadius||r.style.minRadius||0,r.maxRadius=t.maxRadius||r.style.maxRadius||0,r;throw new TypeError("Cannot call a class as a function")}var e,r=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&u(r,t),r=i,(t=[{key:"minRadius",get:function(){return this.property("minRadius")},set:function(t){return this.needUpdate=!0,this.property("minRadius",t)}},{key:"maxRadius",get:function(){return this.property("maxRadius")},set:function(t){return this.needUpdate=!0,this.property("maxRadius",t)}},{key:"initPoints",value:function(){for(var t,e=this.getLocation(),r=this.minRadius,n=this.maxRadius,i=this.startAngle,o=this.endAngle,s=(this.anticlockwise&&(i=(t=2*Math.PI)-i,o=t-o),.1),a=(o<i&&(s=-s),[]),u=[],l=i;;l+=s){(0<s&&o<l||s<0&&l<o)&&(l=o);var c=Math.cos(l),h=Math.sin(l),f={x:c*r+e.center.x,y:h*r+e.center.y},c={x:c*n+e.center.x,y:h*n+e.center.y};if(a.push(f),u.push(c),l===o)break}u.reverse(),this.style&&this.style.close||(u[0].m=!0),this.points=a.concat(u)}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(t.jmArc)},{"./jmArc.js":22}],28:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmImage=r.default=void 0;t=t("../core/jmControl.js");function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function o(t,e,r){e=u(e);var n=t,e=s()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(s=function(){return!!t})()}function a(){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=((t,e)=>{for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=u(t)););return t})(t,e);if(n)return(n=Object.getOwnPropertyDescriptor(n,e)).get?n.get.call(arguments.length<3?t:r):n.value}).apply(null,arguments)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmImage=r.default=(t=>{function s(t,e){if(this instanceof s)return(t=t||{}).isRegular=!0,(e=o(this,s,[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;throw new TypeError("Cannot call a class as a function")}var e,r=s;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&l(r,t),r=s,(t=[{key:"sourcePosition",get:function(){return this.property("sourcePosition")},set:function(t){return this.property("sourcePosition",t)}},{key:"sourceWidth",get:function(){return this.property("sourceWidth")},set:function(t){return this.needUpdate=!0,this.property("sourceWidth",t)}},{key:"sourceHeight",get:function(){return this.property("sourceHeight")},set:function(t){return this.needUpdate=!0,this.property("sourceHeight",t)}},{key:"image",get:function(){return this.property("image")},set:function(t){return this.needUpdate=!0,this.property("image",t)}},{key:"draw",value:function(){try{var t=this.getImage();this.drawImg(t)}catch(t){console.error&&console.error(t)}}},{key:"drawImg",value:function(t){var e,r,n,i,o,s,a;t&&t.complete?(e=(e=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds)||(this.parent&&this.parent.getAbsoluteBounds?this.parent:this).getAbsoluteBounds(),r=this.getLocation(),n=this.sourcePosition,i=this.sourceWidth,o=this.sourceHeight,s=this.webglControl||this.context,this.webglControl?(s.setParentBounds&&s.setParentBounds(e),a=this.getBounds(),s.draw([{x:a.left,y:a.top},{x:a.left+a.width,y:a.top},{x:a.left+a.width,y:a.top+a.height},{x:a.left,y:a.top+a.height}],e),s.drawImage(t,a.left,a.top,a.width,a.height)):(r.left+=e.left,r.top+=e.top,n||void 0!==i||void 0!==o?(void 0===i&&(i=r.width||t.width||0),void 0===o&&(o=r.height||t.height||0),n=n||{x:0,y:0},r.width&&r.height?s.drawImage(t,n.x,n.y,i,o,r.left,r.top,r.width,r.height):r.width?s.drawImage(t,n.x,n.y,i,o,r.left,r.top,r.width,o):r.height?s.drawImage(t,n.x,n.y,i,o,r.left,r.top,i,r.height):s.drawImage(t,n.x,n.y,i,o,r.left,r.top,i,o)):r?r.width&&r.height?s.drawImage(t,r.left,r.top,r.width,r.height):r.width?s.drawImage(t,r.left,r.top,r.width,t.height):r.height?s.drawImage(t,r.left,r.top,t.width,r.height):s.drawImage(t,r.left,r.top):s.drawImage(t))):console.warn("image is empty")}},{key:"getBounds",value:function(t){var e,r,n;return this.bounds&&!t?this.bounds:(t={},n=this.getImage()||{width:0,height:0},r=(e=this.getLocation()).width||n.width,n=e.height||n.height,t.left=e.left,t.top=e.top,t.right=e.left+r,t.bottom=e.top+n,t.width=r,t.height=n,this.bounds=t)}},{key:"getLocation",value:function(){var t,e,r,n,i=this.getImage(),o=(o=s,t="getLocation",e=this,n=a(u(1&(r=3)?o.prototype:o),t,e),(2&r&&"function"==typeof n?function(t){return n.apply(e,t)}:n)([]));return o.width&&!o.height?o.height=o.width/i.width*i.height:o.height&&!o.width&&(o.width=o.height/i.height*i.width),o}},{key:"getImage",value:function(){var t=this,e=this.image||this.style.src||this.style.image;return this.__img&&this.__img.src&&-1!=this.__img.src.indexOf(e)||(e&&e.src?this.__img=e:"undefined"!=typeof document&&document.createElement?(this.__img=document.createElement("img"),this.__img.onload=function(){t.needUpdate=!0},e&&"string"==typeof e&&(this.__img.src=e)):this.graph.isWXMiniApp&&this.graph.canvas&&"string"==typeof e?(this.__img=this.graph.canvas.createImage(),this.__img.onload=function(){t.needUpdate=!0},this.__img.src=e):this.__img=e,this.__img&&(this.image=this.__img.src)),this.__img}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(t.jmControl)},{"../core/jmControl.js":2}],29:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmLabel=r.default=void 0;t=t("../core/jmControl.js");function o(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}function s(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?o(Object(i),!0).forEach(function(t){var e,r;e=n,r=i[t=t],(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(i,t))})}return n}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string");return"symbol"==i(t)?t:t+""}function l(t,e,r){e=p(e);var n=t,e=c()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function h(t,e,r,n){var i=f(p(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof i?function(t){return i.apply(r,t)}:i}function f(){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=((t,e)=>{for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t})(t,e);if(n)return(n=Object.getOwnPropertyDescriptor(n,e)).get?n.get.call(arguments.length<3?t:r):n.value}).apply(null,arguments)}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function y(t,e){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmLabel=r.default=(t=>{function r(t,e){if(this instanceof r)return(t=t||{}).isRegular=!0,(e=l(this,r,[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;throw new TypeError("Cannot call a class as a function")}var e,n=r;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&y(n,t),n=r,(t=[{key:"text",get:function(){return this.property("text")},set:function(t){return this.needUpdate=!0,this.property("text",t)}},{key:"center",get:function(){return this.property("center")},set:function(t){return this.needUpdate=!0,this.property("center",t)}},{key:"position",get:function(){return this.property("position")},set:function(t){return this.needUpdate=!0,this.property("position",t)}},{key:"getLocation",value:function(){var t=h(r,"getLocation",this,3)([]),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.webglControl?this.__size=this.webglControl.testSize(this.text,this.style):(this.context.save&&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.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),r=e.left+t.left,n=e.top+t.top;switch(this.style.textAlign){case"right":r+=e.width;break;case"center":r+=e.width/2}switch(this.style.textBaseline){case"bottom":n+=e.height;break;case"hanging":case"alphabetic":case"middle":n+=e.height/2}var i=this.text;void 0!==i&&(this.webglControl?(this.webglControl.draw(this.points,t),this.webglControl.drawText(i,r,n,e)):this.style.fill&&this.context.fillText?this.style.maxWidth?this.context.fillText(i,r,n,this.style.maxWidth):this.context.fillText(i,r,n):this.context.strokeText&&(this.style.maxWidth?this.context.strokeText(i,r,n,this.style.maxWidth):this.context.strokeText(i,r,n))),this.style.border&&(this.style.border.style&&(this.context.save&&this.context.save(),this.setStyle(this.style.border.style)),"2d"===this.mode?(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))):(i=[],this.style.border.top&&(i.push(this.points[0]),i.push(this.points[1])),this.style.border.right&&(i.push(s(s({},this.points[1]),{},{m:!0})),i.push(this.points[2])),this.style.border.bottom&&(i.push(s(s({},this.points[2]),{},{m:!0})),i.push(this.points[3])),this.style.border.left&&(i.push(s(s({},this.points[3]),{},{m:!0})),i.push(this.points[0])),i.length&&this.webglControl&&this.webglControl.stroke(i)))}},{key:"endDraw",value:function(){"2d"===this.mode&&h(r,"endDraw",this,3)([])}}])&&a(n.prototype,t),e&&a(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n})(t.jmControl)},{"../core/jmControl.js":2}],30:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmLine=r.default=void 0;t=t("../core/jmPath.js");function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function o(t,e,r){e=a(e);var n=t,e=s()?Reflect.construct(e,r||[],a(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(s=function(){return!!t})()}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmLine=r.default=(t=>{function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmLine",r=this,n=i;if(r instanceof n)return t.isRegular=!0,(r=o(this,i,[t,e])).start=t.start||{x:0,y:0},r.end=t.end||{x:0,y:0},r.style.lineType=r.style.lineType||"solid",r.style.dashLength=r.style.dashLength||4,r.style.close=!1,r;throw new TypeError("Cannot call a class as a function")}var e,r=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&u(r,t),r=i,(t=[{key:"start",get:function(){return this.property("start")},set:function(t){return this.needUpdate=!0,this.property("start",t)}},{key:"end",get:function(){return this.property("end")},set:function(t){return this.needUpdate=!0,this.property("end",t)}},{key:"initPoints",value:function(){var t=this.start,e=this.end;if(this.points=[],this.points.push(t),"dotted"===this.style.lineType)for(var r=e.x-t.x,n=e.y-t.y,i=Math.sqrt(r*r+n*n),o=(r/=i,n/=i,!1),s=this.style.dashLength||5,a=s/2,u=s;u<=i;){var l={x:t.x+r*u,y:t.y+n*u};!1===o?u+=a:(l.m=!0,u+=s),this.points.push(l),o=!o}return this.points.push(e),this.points}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(t.jmPath)},{"../core/jmPath.js":8}],31:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmPrismatic=r.default=void 0;t=t("../core/jmPath.js");function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function o(t,e,r){e=a(e);var n=t,e=s()?Reflect.construct(e,r||[],a(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(s=function(){return!!t})()}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmPrismatic=r.default=(t=>{function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmPrismatic",r=this,n=i;if(r instanceof n)return t.isRegular=!0,(r=o(this,i,[t,e])).style.close=void 0===r.style.close||r.style.close,r.center=t.center||{x:0,y:0},r.width=t.width||0,r.height=t.height||0,r;throw new TypeError("Cannot call a class as a function")}var e,r=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&u(r,t),r=i,(t=[{key:"center",get:function(){return this.property("center")},set:function(t){return this.needUpdate=!0,this.property("center",t)}},{key:"initPoints",value:function(){var t=this.getLocation(),e=t.width/2,r=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+r}),this.points.push({x:t.center.x+e,y:t.center.y}),this.points.push({x:t.center.x,y:t.center.y-r})}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(t.jmPath)},{"../core/jmPath.js":8}],32:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmRect=r.default=void 0;var n=t("../core/jmPath.js"),c=t("./jmArc.js"),h=t("./jmLine.js");function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function s(t,e,r){e=u(e);var n=t,e=a()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(a=function(){return!!t})()}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmRect=r.default=(t=>{function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmRect",r=this,n=i;if(r instanceof n)return(t=t||{}).isRegular=!0,(r=s(this,i,[t,e])).style.close=!0,r.radius=t.radius||r.style.radius||0,r;throw new TypeError("Cannot call a class as a function")}var e,r=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&l(r,t),r=i,(t=[{key:"radius",get:function(){return this.property("radius")},set:function(t){return this.needUpdate=!0,this.property("radius",t)}},{key:"position",get:function(){return this.property("position")},set:function(t){return this.needUpdate=!0,this.property("position",t)}},{key:"getBounds",value:function(t){var e;return this.bounds&&!t?this.bounds:(t={},this.initPoints(),e=this.getLocation(),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,this.bounds=t)}},{key:"initPoints",value:function(){var t,e,r,n,i,o=this.getLocation(),s={x:o.left,y:o.top},a={x:o.left+o.width,y:o.top},u={x:o.left+o.width,y:o.top+o.height},l={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,(r=this.graph.createShape(c.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:o.left+o.radius,y:o.top+o.radius},r.startAngle=Math.PI,r.endAngle=Math.PI+t,e=r.initPoints(),(r=this.graph.createShape(c.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:a.x-o.radius,y:a.y+o.radius},r.startAngle=Math.PI+t,r.endAngle=2*Math.PI,n=r.initPoints(),(r=this.graph.createShape(c.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:u.x-o.radius,y:u.y-o.radius},r.startAngle=0,r.endAngle=t,i=r.initPoints(),(r=this.graph.createShape(c.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:l.x+o.radius,y:l.y-o.radius},r.startAngle=t,r.endAngle=Math.PI,o=r.initPoints(),this.points=e.concat(n,i,o)):(this.points=[],this.points.push(s),this.dottedLine&&(this.dottedLine.start=s,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=u,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(u),this.dottedLine&&(this.dottedLine.start=u,this.dottedLine.end=l,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(l),this.dottedLine&&(this.dottedLine.start=l,this.dottedLine.end=s,this.points=this.points.concat(this.dottedLine.initPoints()))),this.points}}])&&o(r.prototype,t),e&&o(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(n.jmPath)},{"../core/jmPath.js":8,"./jmArc.js":22,"./jmLine.js":30}],33:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmResize=r.default=void 0;var o=t("./jmRect.js");function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function s(t,e,r){e=u(e);var n=t,e=a()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(a=function(){return!!t})()}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmResize=r.default=(t=>{function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmResize",r=this,n=i;if(r instanceof n)return(t=t||{}).isRegular=!0,(r=s(this,i,[t,e])).resizable=!1!==t.resizable,r.movable=t.movable,r.rectSize=t.rectSize||8,r.style.close=r.style.close||!0,r.rectCursors=["w-resize","nw-resize","n-resize","ne-resize","e-resize","se-resize","s-resize","sw-resize"],r.init(t),r;throw new TypeError("Cannot call a class as a function")}var e,r=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&l(r,t),r=i,(t=[{key:"rectSize",get:function(){return this.property("rectSize")},set:function(t){return this.property("rectSize",t)}},{key:"resizable",get:function(){return this.property("resizable")},set:function(t){return this.property("resizable",t)}},{key:"init",value:function(t){if(!1!==this.resizable){this.resizeRects=[];var e=this.rectSize,r=this.style.rectStyle||{stroke:"red",fill:"transparent",lineWidth:2,close:!0,zIndex:100};r.close=!0,r.fill=r.fill||"transparent";for(var n=0;n<8;n++){var i=(this.graph||t.graph).createShape(o.jmRect,{position:{x:0,y:0},width:e,height:e,style:r,interactive:!0});i.index=n,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,r=0,n=0,i=0;0==this.index?(n=-t.offsetX,e=t.offsetX):1==this.index?(n=-t.offsetX,e=t.offsetX,i=-t.offsetY,r=t.offsetY):2==this.index?(i=-t.offsetY,r=t.offsetY):3==this.index?(n=t.offsetX,i=-t.offsetY,r=t.offsetY):4==this.index?n=t.offsetX:5==this.index?(n=t.offsetX,i=t.offsetY):6==this.index?i=t.offsetY:7==this.index&&(n=-t.offsetX,n=-t.offsetX,e=t.offsetX,i=t.offsetY),this.parent.reset(e,r,n,i),this.needUpdate=!0}),e.bind("mousemove",function(){var t=this.parent.getRotation(),e=this.parent.rectCursors[this.index],t=t&&t.angle?this.graph.utils.rotatePoints(this.graph.utils.clone(this.position),t,t.angle):this.position,r=this.parent.width/2,n=this.parent.height/2,n=(this.rotationAngleByCenter=Math.atan((t.y-n)/(t.x-r)),Math.atan(n/r)/2),i=2*n+Math.PI/4;t.x<r?this.rotationAngleByCenter>=-n&&this.rotationAngleByCenter<=n?e=this.parent.rectCursors[0]:this.rotationAngleByCenter>n&&this.rotationAngleByCenter<i?e=this.parent.rectCursors[1]:this.rotationAngleByCenter>=i?e=this.parent.rectCursors[2]:this.rotationAngleByCenter<=-n&&this.rotationAngleByCenter>-i?e=this.parent.rectCursors[7]:this.rotationAngleByCenter<=-i&&(e=this.parent.rectCursors[6]):this.rotationAngleByCenter>=-n&&this.rotationAngleByCenter<=n?e=this.parent.rectCursors[4]:this.rotationAngleByCenter>n&&this.rotationAngleByCenter<i?e=this.parent.rectCursors[5]:this.rotationAngleByCenter>=i?e=this.parent.rectCursors[6]:this.rotationAngleByCenter<=-n&&this.rotationAngleByCenter>-i?e=this.parent.rectCursors[3]:this.rotationAngleByCenter<=-i&&(e=this.parent.rectCursors[2]),this.cursor=e}),e.bind("mouseleave",function(){this.cursor="default"})}}},{key:"reset",value:function(t,e,r,n){var i,o,s,a=void 0===this.style.minWidth?5:this.style.minWidth,u=void 0===this.style.minHeight?5:this.style.minHeight,l=this.getLocation();for(s in(0!=r||0!=n)&&(i=l.width+r,o=l.height+n,a<=i||u<=o)&&(a<=i?this.width=i:r=t=0,u<=o?this.height=o:n=e=0,!1!==this.movable&&(t||e)&&((a=this.position).x=l.left+t,a.y=l.top+e,this.position=a),this.emit("resize",t,e,r,n)),this.resizeRects){var c=this.resizeRects[s];switch(c.index){case 0:c.position.x=-c.width/2,c.position.y=(l.height-c.height)/2;break;case 1:c.position.x=-c.width/2,c.position.y=-c.height/2;break;case 2:c.position.x=(l.width-c.width)/2,c.position.y=-c.height/2;break;case 3:c.position.x=l.width-c.width/2,c.position.y=-c.height/2;break;case 4:c.position.x=l.width-c.width/2,c.position.y=(l.height-c.height)/2;break;case 5:c.position.x=l.width-c.width/2,c.position.y=l.height-c.height/2;break;case 6:c.position.x=(l.width-c.height)/2,c.position.y=l.height-c.height/2;break;case 7:c.position.x=-c.width/2,c.position.y=l.height-c.height/2}}}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(o.jmRect)},{"./jmRect.js":32}]},{},[1])(1);return i.jmGraph=n},"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
|
+
(i=>{var t;t=function(t,e,r){var n=function n(i,o,s){function a(e,t){if(!o[e]){if(!i[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(u)return u(e,!0);throw(t=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",t}r=o[e]={exports:{}},i[e][0].call(r.exports,function(t){return a(i[e][1][t]||t)},r,r.exports,n,i,o,s)}return o[e].exports}for(var u="function"==typeof require&&require,t=0;t<s.length;t++)a(s[t]);return a}({1:[function(t,e,r){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(r,"__esModule",{value:!0}),r.default=r.create=void 0,Object.defineProperty(r,"jmArc",{enumerable:!0,get:function(){return n.jmArc}}),Object.defineProperty(r,"jmArrow",{enumerable:!0,get:function(){return o.jmArrow}}),Object.defineProperty(r,"jmArrowLine",{enumerable:!0,get:function(){return f.jmArrowLine}}),Object.defineProperty(r,"jmBezier",{enumerable:!0,get:function(){return s.jmBezier}}),Object.defineProperty(r,"jmCircle",{enumerable:!0,get:function(){return a.jmCircle}}),Object.defineProperty(r,"jmControl",{enumerable:!0,get:function(){return m.jmControl}}),Object.defineProperty(r,"jmGradient",{enumerable:!0,get:function(){return m.jmGradient}}),r.jmGraph=void 0,Object.defineProperty(r,"jmHArc",{enumerable:!0,get:function(){return u.jmHArc}}),Object.defineProperty(r,"jmImage",{enumerable:!0,get:function(){return p.jmImage}}),Object.defineProperty(r,"jmLabel",{enumerable:!0,get:function(){return y.jmLabel}}),Object.defineProperty(r,"jmLine",{enumerable:!0,get:function(){return l.jmLine}}),Object.defineProperty(r,"jmList",{enumerable:!0,get:function(){return m.jmList}}),Object.defineProperty(r,"jmPath",{enumerable:!0,get:function(){return m.jmPath}}),Object.defineProperty(r,"jmPrismatic",{enumerable:!0,get:function(){return c.jmPrismatic}}),Object.defineProperty(r,"jmRect",{enumerable:!0,get:function(){return h.jmRect}}),Object.defineProperty(r,"jmResize",{enumerable:!0,get:function(){return d.jmResize}}),Object.defineProperty(r,"jmShadow",{enumerable:!0,get:function(){return m.jmShadow}}),Object.defineProperty(r,"jmUtils",{enumerable:!0,get:function(){return m.jmUtils}});var n=t("./src/shapes/jmArc.js"),o=t("./src/shapes/jmArrow.js"),s=t("./src/shapes/jmBezier.js"),a=t("./src/shapes/jmCircle.js"),u=t("./src/shapes/jmHArc.js"),l=t("./src/shapes/jmLine.js"),c=t("./src/shapes/jmPrismatic.js"),h=t("./src/shapes/jmRect.js"),f=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){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function b(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");e=t;if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(g=function(){return!!t})()}function x(t){return(x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function j(t,e){return(j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var w={arc:n.jmArc,arrow:o.jmArrow,bezier:s.jmBezier,circle:a.jmCircle,harc:u.jmHArc,line:l.jmLine,prismatic:c.jmPrismatic,rect:h.jmRect,arrowline:f.jmArrowLine,image:p.jmImage,img:p.jmImage,label:y.jmLabel,resize:d.jmResize},_=r.jmGraph=r.default=(t=>{function s(n,i,o){var t,e,r;if(this instanceof s)return t=this instanceof s?this.constructor:void 0,(i=Object.assign({},i)).shapes=Object.assign(w,i.shapes||{}),t&&t.prototype instanceof m.jmGraph?("function"==typeof i&&(o=i,i={}),t=this,r=[n,i,o],e=x(e=s),b(t,g()?Reflect.construct(e,r||[],x(t).constructor):e.apply(t,r))):b(void 0,new Promise(function(t,e){var r=new s(n,i,o);t&&t(r)}));throw new TypeError("Cannot call a class as a function")}var e,r=s;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&j(r,t),r=s,t=[{key:"create",value:function(){return P.apply(void 0,arguments)}}],(e=null)&&v(r.prototype,e),t&&v(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(m.jmGraph),P=r.create=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t,e,r){var n;return g()?Reflect.construct.apply(null,arguments):((n=[null]).push.apply(n,e),e=new(t.bind.apply(t,n)),r&&j(e,r.prototype),e)}(_,e)}},{"./src/core/jmGraph.js":5,"./src/shapes/jmArc.js":22,"./src/shapes/jmArrow.js":23,"./src/shapes/jmArrowLine.js":24,"./src/shapes/jmBezier.js":25,"./src/shapes/jmCircle.js":26,"./src/shapes/jmHArc.js":27,"./src/shapes/jmImage.js":28,"./src/shapes/jmLabel.js":29,"./src/shapes/jmLine.js":30,"./src/shapes/jmPrismatic.js":31,"./src/shapes/jmRect.js":32,"./src/shapes/jmResize.js":33}],2:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.jmControl=r.default=void 0;var h=t("./jmUtils.js"),o=t("./jmList.js"),u=t("./jmGradient.js"),l=t("./jmShadow.js"),n=t("./jmProperty.js"),i=(t=t("../lib/webgl/path.js"))&&t.__esModule?t:{default:t};function s(t){return(t=>{if(Array.isArray(t))return y(t)})(t)||(t=>{if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)})(t)||p(t)||(()=>{throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function a(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}function c(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?a(Object(i),!0).forEach(function(t){var e,r;e=n,r=i[t=t],(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(i,t))})}return n}function f(t,e){var r,n,i,o,s="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(s)return i=!(n=!0),{s:function(){s=s.call(t)},n:function(){var t=s.next();return n=t.done,t},e:function(t){i=!0,r=t},f:function(){try{n||null==s.return||s.return()}finally{if(i)throw r}}};if(Array.isArray(t)||(s=p(t))||e&&t&&"number"==typeof t.length)return s&&(t=s),o=0,{s:e=function(){},n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},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.")}function p(t,e){var r;if(t)return"string"==typeof t?y(t,e):"Map"===(r="Object"===(r={}.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(t,e):void 0}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function d(t){return(d="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 m(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,v(n.key),n)}}function v(t){t=((t,e)=>{if("object"!=d(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=d(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string");return"symbol"==d(t)?t:t+""}function b(t,e,r){e=x(e);var n=t,e=g()?Reflect.construct(e,r||[],x(t).constructor):e.apply(t,r);if(!e||"object"!=d(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function g(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(g=function(){return!!t})()}function x(t){return(x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function j(t,e){return(j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var w={fill:"fillStyle",fillImage:"fillImage",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"};r.jmControl=r.default=(t=>{function n(t,e){var r;if(this instanceof n)return(r=b(this,n,[t=t||{}])).property("type",e||(this instanceof n?this.constructor:void 0).name),r.style=t&&t.style?t.style:{},r.width=t.width||0,r.height=t.height||0,r.hitArea=t.hitArea||null,t.position&&(r.position=t.position),r.graph=t.graph||null,r.zIndex=t.zIndex||0,r.interactive=void 0!==t.interactive&&t.interactive,"webgl"===r.mode&&(r.webglControl=new i.default(r.graph,{style:r.style,control:r,isRegular:t.isRegular,needCut:t.needCut})),r.initializing(),r.on=r.bind,r.option=t,r;throw new TypeError("Cannot call a class as a function")}var e,r=n;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&j(r,t),r=n,(t=[{key:"type",get:function(){return this.property("type")}},{key:"context",get:function(){var t=this.property("context");return t||(this.is("jmGraph")&&this.canvas&&this.canvas.getContext?this.context=this.canvas.getContext(this.mode||"2d"):(t=this.graph)?t.context:t.canvas.getContext(this.mode||"2d"))},set:function(t){return this.property("context",t)}},{key:"style",get:function(){return this.property("style")||this.property("style",{})},set:function(t){return this.needUpdate=!0,this.property("style",t)}},{key:"visible",get:function(){var t=this.property("visible");return t=void 0===t?this.property("visible",!0):t},set:function(t){return this.needUpdate=!0,this.property("visible",t)}},{key:"interactive",get:function(){return this.property("interactive")},set:function(t){return this.property("interactive",t)}},{key:"hitArea",get:function(){return this.property("hitArea")},set:function(t){return this.property("hitArea",t)}},{key:"children",get:function(){return this.property("children")||this.property("children",new o.jmList)},set:function(t){return this.needUpdate=!0,this.property("children",t)}},{key:"width",get:function(){var t=this.property("width");return t=void 0===t?this.property("width",0):t},set:function(t){return this.needUpdate=!0,this.property("width",t)}},{key:"height",get:function(){var t=this.property("height");return t=void 0===t?this.property("height",0):t},set:function(t){return this.needUpdate=!0,this.property("height",t)}},{key:"zIndex",get:function(){return this.property("zIndex")||this.property("zIndex",0)},set:function(t){return this.property("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,r=(this.children=this.children||new o.jmList,this.children.add);this.children.add=function(t){if("object"===d(t))return t.parent&&t.parent!=e&&t.parent.children&&t.parent.children.remove(t),t.parent=e,this.contain(t)&&this.oremove(t),r.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"===d(t)&&(t.parent=null,t.graph=null,t.remove(!0),this.oremove(t),e.needUpdate=!0)},this.children.sort=function(){var t,n={};for(t in this.each(function(t,e){var r;e&&(!(r=e.zIndex)&&e.style&&e.style.zIndex&&(r=Number(e.style.zIndex),isNaN(r))&&(r=e.style.zIndex||0),(n[r]||(n[r]=[])).push(e))}),this.splice(0,this.length),n)r.call(this,n[t])},this.children.clear=function(){this.each(function(t,e){this.remove(e)},!0)},this.needUpdate=!0}},{key:"setStyle",value:function(t){var s=this;if(t=t||h.jmUtils.clone(this.style,!0)){var e,r,a=function(t,e,r){if(t){var n=t;if("function"==typeof n)try{n=n.call(s)}catch(t){return void console.warn(t)}var i=d(n),t=w[r||e];if(n instanceof u.jmGradient||"string"==i&&-1<n.indexOf("-gradient"))"string"==i&&-1<n.indexOf("-gradient")&&(n=new u.jmGradient(n)),a(n.toGradient(s),t||e);else if(t)s.webglControl?s.webglControl.setStyle(t,n):("string"==i&&-1<["fillStyle","strokeStyle","shadowColor"].indexOf(t)&&(n=h.jmUtils.toColor(n)),s.context[t]=n);else switch(e){case"shadow":if("string"==i)a(new l.jmShadow(n),e);else for(var o in n)a(n[o],o,e+"."+o);break;case"translate":break;case"rotation":void 0===n.angle||isNaN(n.angle)||(n=s.getRotation(n),s.__translateAbsolutePosition=s.toAbsolutePoint({x:n.x,y:n.y}),s.context.translate&&s.context.translate(s.__translateAbsolutePosition.x,s.__translateAbsolutePosition.y),s.context.rotate&&s.context.rotate(n.angle),s.context.translate&&s.context.translate(-s.__translateAbsolutePosition.x,-s.__translateAbsolutePosition.y));break;case"transform":s.context.transform&&(Array.isArray(n)?s.context.transform.apply(s.context,n):"object"==d(n)&&s.context.transform(n.scaleX||1,n.skewX||0,n.skewY||0,n.scaleY||1,n.offsetX||0,n.offsetY||0));break;case"cursor":s.cursor=n}}};for(e in this.translate&&a(this.translate,"translate"),this.transform&&a(this.transform,"transform"),t)"constructor"!==e&&("string"==(r=d(t[e]))&&-1<t[e].indexOf("-gradient")?t[e]=new u.jmGradient(t[e]):"string"==r&&"shadow"==e&&(t[e]=new l.jmShadow(t[e])),a(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){var r,n=f(this.points);try{for(n.s();!(r=n.n()).done;){var i=r.value;(void 0===e.left||e.left>i.x)&&(e.left=i.x),(void 0===e.top||e.top>i.y)&&(e.top=i.y),(void 0===e.right||e.right<i.x)&&(e.right=i.x),(void 0===e.bottom||e.bottom<i.y)&&(e.bottom=i.y)}}catch(t){n.e(t)}finally{n.f()}}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:"getRotationBounds",value:function(){var t=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:null)||this.getRotation(),e=this.getBounds();if(!t||!t.angle)return e;var r,n,i={width:0,height:0,oldBounds:e},o=[],s=(this.points&&0<this.points.length?o=h.jmUtils.clone(this.points,!0):this.getLocation&&(r=this.getLocation())&&o.push({x:r.left,y:r.top},{x:r.left+r.width,y:r.top},{x:r.left+r.width,y:r.top+r.height},{x:r.left,y:r.top+r.height}),f(o=h.jmUtils.rotatePoints(o,{x:t.x+e.left,y:t.y+e.top},t.angle)));try{for(s.s();!(n=s.n()).done;){var a=n.value;(void 0===i.left||i.left>a.x)&&(i.left=a.x),(void 0===i.top||i.top>a.y)&&(i.top=a.y),(void 0===i.right||i.right<a.x)&&(i.right=a.x),(void 0===i.bottom||i.bottom<a.y)&&(i.bottom=a.y)}}catch(t){s.e(t)}finally{s.f()}return i.left||(i.left=0),i.top||(i.top=0),i.right||(i.right=0),i.bottom||(i.bottom=0),i.width=i.right-i.left,i.height=i.bottom-i.top,i}},{key:"getLocation",value:function(){var t=this.location={left:0,top:0,width:0,height:0},e=(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,h.jmUtils.clone(this.style.margin,{}));return 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&&(e=this.parent.getBounds(),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=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return(t=t||h.jmUtils.clone(this.style.rotation))?(e=e||this.getBounds(),void 0===t.x&&(t.x="50%"),void 0===t.y&&(t.y="50%"),h.jmUtils.checkPercent(t.x)&&(t.x=h.jmUtils.percentToNumber(t.x)*e.width),h.jmUtils.checkPercent(t.y)&&(t.y=h.jmUtils.percentToNumber(t.y)*e.height)):(t=this.parent&&this.parent.getRotation?this.parent.getRotation():null)&&(e=e||this.getBounds(),t.x-=e.left,t.y-=e.top),c(c({},t),{},{bounds:e})}},{key:"getTranslate",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return(t=t||this.style.translate)?(t={x:t.x||0,y:t.y||0},h.jmUtils.checkPercent(t.x)&&(!e&&this.parent&&(e=this.parent.getBounds()),t.x=h.jmUtils.percentToNumber(t.x)*e.width),h.jmUtils.checkPercent(t.y)&&(!e&&this.parent&&(e=this.parent.getBounds()),t.y=h.jmUtils.percentToNumber(t.y)*e.height),t):{x:0,y:0}}},{key:"remove",value:function(){this.parent&&this.parent.children.remove(this)}},{key:"offset",value:function(t,e,r,n){r=!1!==r;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"==d(i.start)&&(this.start.x=i.start.x+t,this.start.y=i.start.y+e,o=!0),i.end&&"object"==d(i.end)&&(this.end.x=i.end.x+t,this.end.y=i.end.y+e,o=!0),0==o&&this.cpoints){this.cpoints;var s=this.cpoints;if(s){for(var a=s.length,u=0;u<a;u++)s[u].x+=t,s[u].y+=e;o=!0}}if(0==o&&this.points){for(var l=this.points.length,c=0;c<l;c++)this.points[c].x+=t,this.points[c].y+=e;o=!0}this.emit("move",{offsetX:t,offsetY:e,trans:r,evt:n}),this.needUpdate=!0}},{key:"getAbsoluteBounds",value:function(){var t,e=this.getBounds();return this.parent&&this.parent.absoluteBounds?{left:(t=this.parent.absoluteBounds||this.parent.getAbsoluteBounds()).left+e.left,top:t.top+e.top,right:t.left+e.right,bottom:t.top+e.bottom,width:e.width,height:e.height}:e}},{key:"toAbsolutePoint",value:function(t){var e;return(t.x||t.y)&&(e=this.absoluteBounds||this.getAbsoluteBounds(),t.x=(t.x||0)+e.left,t.y=(t.y||0)+e.top),t}},{key:"toLocalPosition",value:function(t){var e=this.absoluteBounds||this.getAbsoluteBounds();return!!e&&{x:t.x-e.left,y:t.y-e.top}}},{key:"beginDraw",value:function(){this.getLocation(!0),this.context.beginPath&&this.context.beginPath(),this.webglControl&&this.webglControl.beginDraw&&this.webglControl.beginDraw()}},{key:"endDraw",value:function(){this.style.close&&(this.webglControl&&this.webglControl.closePath(),this.context.closePath)&&this.context.closePath();var t,e=this.style.fill||this.style.fillStyle;e&&(this.webglControl&&(t=this.getBounds(),this.webglControl.fill(t)),this.context.fill)&&this.context.fill(),(this.style.stroke||!e&&!this.is("jmGraph"))&&(this.webglControl&&this.webglControl.stroke(),this.context.stroke)&&this.context.stroke(),this.webglControl&&this.webglControl.endDraw&&this.webglControl.endDraw(),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;if(this.webglControl)this.webglControl.setParentBounds(t),this.webglControl.draw(s(this.points));else if(this.context&&this.context.moveTo){this.context.moveTo(this.points[0].x+t.left,this.points[0].y+t.top);for(var e=this.points.length,r=1;r<e;r++){var n=this.points[r];n.m?this.context.moveTo(n.x+t.left,n.y+t.top):this.context.lineTo(n.x+t.left,n.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.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.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 r,n=f(t=t.split(" "));try{for(n.s();!(r=n.n()).done;){var i=r.value;i&&this.bind(i,e)}}catch(t){n.e(t)}finally{n.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 r,n=f(t=t.split(" "));try{for(n.s();!(r=n.n()).done;){var i=r.value;i&&this.unbind(i,e)}}catch(t){n.e(t)}finally{n.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),r=0;r<t;r++)e[r]=arguments[r];return this.runEventHandle(e[0],e.slice(1)),this}},{key:"runEventHandle",value:function(t,r){var n,t=this.getEvent(t);return t&&(n=this,Array.isArray(r)||(r=[r]),t.each(function(t,e){!1===e.apply(n,r)&&(r.cancel=!0)})),r.cancel}},{key:"checkPoint",value:function(t,e){if("jmGraph"==this.type)return o=(n=this.getPosition()).left+this.width,r=n.top+this.height,!(t.x>o||t.x<n.left||r<t.y||t.y<n.top);var r,n,i,o=this.getBounds();if(this.hitArea)return r=this.hitArea.x+o.left,n=this.hitArea.y+o.top,a=this.hitArea.width+o.left,i=this.hitArea.height+o.top,!(t.x>a||t.x<r||i<t.y||t.y<n);var s=this.points;if(s&&s.length||((s=[]).push({x:o.left,y:o.top}),s.push({x:o.right,y:o.top}),s.push({x:o.right,y:o.bottom}),s.push({x:o.left,y:o.bottom}),s.push({x:o.left,y:o.top})),e=Number(e||this.style.touchPadding||this.style.lineWidth||1),s&&s.length){var a=this.getRotation(null,o);if(a&&a.angle&&(s=h.jmUtils.clone(s,!0),s=h.jmUtils.rotatePoints(s,{x:a.x+o.left,y:a.y+o.top},a.angle||0)),2<s.length&&(!this.style.fill||this.style.stroke)){for(var u=0,l=s.length,c=u+1;c<=l;c=++u+1)if(c==l){if(this.style.close)if(h.jmUtils.pointInPolygon(t,[s[u],s[0]],e))return!0}else if(h.jmUtils.pointInPolygon(t,[s[u],s[c]],e))return!0;if(!this.style.fill)return!1}return h.jmUtils.pointInPolygon(t,s,e)}return!(t.x>o.right||t.x<o.left||t.y>o.bottom||t.y<o.top)}},{key:"raiseEvent",value:function(r,n){if(!1!==this.visible){n.position||(t=this.graph,n.isWXMiniApp=t.isWXMiniApp,o=n.srcElement||n.target,e=h.jmUtils.getEventPosition(n),n={position:e,button:0==n.button||e.isTouch?1:n.button,keyCode:n.keyCode||n.charCode||n.which,ctrlKey:n.ctrlKey,cancel:!1,event:n,srcElement:o,isWXMiniApp:t.isWXMiniApp}),n.path=n.path||[];var t,i=!1;if(this.children&&this.children.each(function(t,e){if(!0!==n.cancel&&(i=!1===e.raiseEvent(r,n)||i))return!1},!0),i)return!1;var e=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds;if(!e)return!1;n.position.x=n.position.offsetX-e.left,n.position.y=n.position.offsetY-e.top;var o=!1!==this.interactive&&this.checkPoint(n.position);return o?(n.target||(n.target=this),this.runEventAndPopEvent(r,n),this.focused||"mousemove"!==r&&"touchmove"!==r||(this.focused=!0,this.raiseEvent("mousemove"===r?"mouseover":"touchover",n))):!1===this.interactive||o||!this.focused||"mousemove"!==r&&"touchmove"!==r||(this.focused=!1,this.runEventHandle("mousemove"===r?"mouseleave":"touchleave",n)),!1===n.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 o;return this.__mvMonitor||(this.__mvMonitor={},this.__mvMonitor.mouseDown=!1,this.__mvMonitor.curposition={x:0,y:0},(o=this).__mvMonitor.mv=function(t){var e,r,n,i=o;if(i.__mvMonitor.mouseDown)return i.parent.bounds=null,e=t.position.offsetX-i.__mvMonitor.curposition.x,r=t.position.offsetY-i.__mvMonitor.curposition.y,i.option.lockSide&&(n=i.bounds||i.getAbsoluteBounds(),((n=h.jmUtils.checkOutSide(i.option.lockSide,n,{x:e,y:r})).left<0||0<n.right)&&(e=0),n.top<0||0<n.bottom)&&(r=0),(e||r)&&(i.offset(e,r,!0,t),e&&(i.__mvMonitor.curposition.x=t.position.offsetX),r)&&(i.__mvMonitor.curposition.y=t.position.offsetY),!1},this.__mvMonitor.mu=function(t){var e=o;e.__mvMonitor.mouseDown&&(e.__mvMonitor.mouseDown=!1,e.emit("moveend",{position:e.__mvMonitor.curposition}))},this.__mvMonitor.ml=function(){var t=o;if(t.__mvMonitor.mouseDown)return t.__mvMonitor.mouseDown=!1,t.emit("moveend",{position:t.__mvMonitor.curposition}),!1},this.__mvMonitor.md=function(t){return!this.__mvMonitor.mouseDown&&(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.interactive=!0,this}}])&&m(r.prototype,t),e&&m(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(n.jmProperty)},{"../lib/webgl/path.js":21,"./jmGradient.js":4,"./jmList.js":6,"./jmProperty.js":9,"./jmShadow.js":10,"./jmUtils.js":11}],3:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.jmEvents=r.default=void 0;var o=t("./jmUtils.js");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)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function a(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}r.jmEvents=r.default=(()=>a(function t(e,r){s(this,t),this.container=e,this.target=r||e,this.mouseHandler=new u(this,e,r),this.keyHandler=new l(this,e,r)},[{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()}}]))();var u=(()=>a(function t(e,r,n){s(this,t),this.instance=e,this.container=r,this.target=n||r,this.eventEvents={},this.init(e,r,n)},[{key:"init",value:function(e,r,t){var n=this.target,i="undefined"!=typeof document?document:null;this.eventEvents.mousedown=o.jmUtils.bindEvent(this.target,"mousedown",function(t){(t=t||window.event).eventName="mousedown";r.raiseEvent("mousedown",t)}),this.eventEvents.mousemove=o.jmUtils.bindEvent(this.target,"mousemove",function(t){if((t=t||window.event).eventName="mousemove",(t.target||t.srcElement)==n)return r.raiseEvent("mousemove",t),t.preventDefault&&t.preventDefault(),!1}),this.eventEvents.mouseover=o.jmUtils.bindEvent(this.target,"mouseover",function(t){(t=t||window.event).eventName="mouseover",r.raiseEvent("mouseover",t)}),this.eventEvents.mouseleave=o.jmUtils.bindEvent(this.target,"mouseleave",function(t){(t=t||window.event).eventName="mouseleave",r.raiseEvent("mouseleave",t)}),this.eventEvents.mouseout=o.jmUtils.bindEvent(this.target,"mouseout",function(t){(t=t||window.event).eventName="mouseout",r.raiseEvent("mouseout",t)}),i&&(this.eventEvents.mouseup=o.jmUtils.bindEvent(i,"mouseup",function(t){if(!((t=t||window.event).eventName="mouseup")===r.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",r.raiseEvent("dblclick",t)}),this.eventEvents.click=o.jmUtils.bindEvent(this.target,"click",function(t){(t=t||window.event).eventName="click",r.raiseEvent("click",t)}),i&&(this.eventEvents.resize=o.jmUtils.bindEvent(i,"resize",function(t){return(t=t||window.event).eventName="resize",r.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)}}}]))(),l=(()=>a(function t(e,r,n){s(this,t),this.instance=e,this.container=r,this.target=n||r,this.eventEvents={},this.init(r,n)},[{key:"init",value:function(r,t){function n(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="undefined"!=typeof document?document:null;e&&(this.eventEvents.keypress=o.jmUtils.bindEvent(e,"keypress",function(t){var e;if(t=t||window.event,n(t))return!1===(e=r.raiseEvent("keypress",t))&&t.preventDefault&&t.preventDefault(),e})),e&&(this.eventEvents.keydown=o.jmUtils.bindEvent(e,"keydown",function(t){var e;if(t=t||window.event,n(t))return!1===(e=r.raiseEvent("keydown",t))&&t.preventDefault&&t.preventDefault(),e})),e&&(this.eventEvents.keyup=o.jmUtils.bindEvent(e,"keyup",function(t){var e;if(t=t||window.event,n(t))return!1===(e=r.raiseEvent("keyup",t))&&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)}}}]))()},{"./jmUtils.js":11}],4:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.jmGradient=r.default=void 0;var d=t("./jmUtils.js"),i=t("./jmList.js");function o(t){return(t=>{if(Array.isArray(t))return n(t)})(t)||(t=>{if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)})(t)||((t,e)=>{var r;if(t)return"string"==typeof t?n(t,e):"Map"===(r="Object"===(r={}.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0})(t)||(()=>{throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}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 a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=s(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=s(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==s(t)?t:t+""))(n.key),n)}}r.jmGradient=r.default=(()=>{function n(t){var e;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");if(this.stops=new i.jmList,t&&"object"==s(t)){for(var r in t)"stops"!==r&&(this[r]=t[r]);t.stops&&Array.isArray(t.stops)&&(e=this.stops).push.apply(e,o(t.stops))}else"string"==typeof t&&this.fromString(t)}return t=n,(e=[{key:"addStop",value:function(t,e){this.stops.add({offset:Number(t),color:e})}},{key:"toGradient",value:function(t){var n,e,r,i=t.context||t,o=t.absoluteBounds||t.getAbsoluteBounds(),s=this.x1||0,a=this.y1||0,u=this.x2,l=this.y2,c=t.getLocation(),h=0,c=(h=(h=c.radius?2*c.radius:h)||Math.min(c.width,c.height),d.jmUtils.checkPercent(s)&&(s=d.jmUtils.percentToNumber(s)*(o.width||h)),d.jmUtils.checkPercent(u)&&(u=d.jmUtils.percentToNumber(u)*(o.width||h)),d.jmUtils.checkPercent(a)&&(a=d.jmUtils.percentToNumber(a)*(o.height||h)),d.jmUtils.checkPercent(l)&&(l=d.jmUtils.percentToNumber(l)*(o.height||h)),Number(s)+o.left),f=Number(a)+o.top,p=Number(u)+o.left,y=Number(l)+o.top;return"linear"===this.type?"webgl"===t.mode&&t.webglControl?(n=t.webglControl.createLinearGradient(s,a,u,l,o)).key=this.toString():i.createLinearGradient&&(n=i.createLinearGradient(c,f,p,y)):"radial"===this.type&&(e=this.r1||0,r=this.r2,d.jmUtils.checkPercent(e)&&(e=d.jmUtils.percentToNumber(e),e*=h),d.jmUtils.checkPercent(r)&&(r=d.jmUtils.percentToNumber(r),r*=h),"webgl"===t.mode&&t.webglControl?(n=t.webglControl.createRadialGradient(s,a,e,u,l,r,o)).key=this.toString():i.createRadialGradient?n=i.createRadialGradient(c,f,e,p,y,r):i.createCircularGradient&&(n=i.createCircularGradient(c,f,r))),n?(this.stops.each(function(t,e){var r=d.jmUtils.toColor(e.color);n&&n.addColorStop(e.offset,r)}),n):(h=this.stops.get(0))&&h.color||"#000"}},{key:"fromString",value:function(t){if(t){t=t.match(/(linear|radial)-gradient\s*\(\s*([^,]+)\s*,\s*((.|\s)+)\)/i);if(t&&!(t.length<3)){this.type=t[1].toLowerCase();var e=d.jmUtils.trim(t[2]).split(/\s+/),r=("linear"==this.type?e.length<=2?(this.x2=e[0],this.y2=e[1]||0):(this.x1=e[0],this.y1=e[1],this.x2=e[2],this.y2=e[3]):e.length<=3?(this.x2=e[0],this.y2=e[1]||0,this.r2=e[2]||0):(this.x1=e[0],this.y1=e[1],this.r1=e[2],this.x2=e[3],this.y2=e[3],this.r2=e[3]),t[3].match(/((rgb(a)?\s*\([\d,\.\s]+\))|(#[a-zA-Z\d]+))\s+([\d\.]+)/gi));if(r&&r.length)for(var n=0;n<r.length;n++){var i,o=d.jmUtils.trim(r[n]),s=o.lastIndexOf(" ");-1<s&&(i=Number(o.substr(s+1)),o=d.jmUtils.trim(o.substr(0,s)),!isNaN(i))&&o&&this.addStop(i,o)}}}}},{key:"toString",value:function(){var r=this.type+"-gradient(";return"linear"==this.type?r+=this.x1+" "+this.y1+" "+this.x2+" "+this.y2:r+=this.x1+" "+this.y1+" "+this.r1+" "+this.x2+" "+this.y2+" "+this.r2,this.stops.each(function(t,e){r+=","+e.color+" "+e.offset}),r+")"}}])&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r})()},{"./jmList.js":6,"./jmUtils.js":11}],5:[function(t,e,r){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(r,"__esModule",{value:!0}),r.default=void 0,Object.defineProperty(r,"jmControl",{enumerable:!0,get:function(){return c.jmControl}}),Object.defineProperty(r,"jmEvents",{enumerable:!0,get:function(){return l.jmEvents}}),Object.defineProperty(r,"jmGradient",{enumerable:!0,get:function(){return u.jmGradient}}),r.jmGraph=void 0,Object.defineProperty(r,"jmList",{enumerable:!0,get:function(){return n.jmList}}),Object.defineProperty(r,"jmPath",{enumerable:!0,get:function(){return h.jmPath}}),Object.defineProperty(r,"jmProperty",{enumerable:!0,get:function(){return o.jmProperty}}),Object.defineProperty(r,"jmShadow",{enumerable:!0,get:function(){return a.jmShadow}}),Object.defineProperty(r,"jmUtils",{enumerable:!0,get:function(){return s.jmUtils}});var s=t("./jmUtils.js"),n=t("./jmList.js"),o=t("./jmProperty.js"),a=t("./jmShadow.js"),u=t("./jmGradient.js"),l=t("./jmEvents.js"),c=t("./jmControl.js"),h=t("./jmPath.js");function f(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}function p(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?f(Object(i),!0).forEach(function(t){var e,r;e=n,r=i[t=t],(t=d(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):f(Object(i)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(i,t))})}return n}function y(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,d(n.key),n)}}function d(t){t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string");return"symbol"==i(t)?t:t+""}function m(t,e,r){e=b(e);var n=t,e=v()?Reflect.construct(e,r||[],b(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function v(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(v=function(){return!!t})()}function b(t){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function g(t,e){return(g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmGraph=r.default=(t=>{function o(t,e,r){var n,i;if(this instanceof o)return"function"==typeof e&&(r=e,e={}),(e=e||{}).interactive=!0,e.isRegular=!0,(n=m(this,o,[e,"jmGraph"])).option=e||{},n.devicePixelRatio=1,n.util=n.utils=s.jmUtils,n.mode=e.mode||"2d","undefined"!=typeof wx&&wx.canIUse&&wx.canIUse("canvas")?("string"==typeof t&&(t=wx.createSelectorQuery().select("#"+t)),n.isWXMiniApp=!0,n.container=t):("string"==typeof t&&"undefined"!=typeof document?t=document.getElementById(t):t.length&&(t=t[0]),t.getContext||"undefined"==typeof document?n.container=t.parentElement:(n.container=t,i=document.createElement("canvas"),t.appendChild(i),i.width=t.offsetWidth||t.clientWidth,i.height=t.offsetHeight||t.clientHeight,t=i)),n.canvas=t,n.context=t.getContext(n.mode),n.textureCanvas=e.textureCanvas||null,"webgl"===n.mode&&(n.context.enable(n.context.BLEND),n.context.blendFunc(n.context.SRC_ALPHA,n.context.ONE_MINUS_SRC_ALPHA),s.jmUtils.bindEvent(t,"webglcontextlost",function(t){console.log("canvas webglcontextlost",t),n.emit("webglcontextlost",t)}),s.jmUtils.bindEvent(t,"webglcontextrestored",function(t){console.log("canvas webglcontextrestored",t),n.emit("webglcontextrestored",t)})),n.__init(r),n;throw new TypeError("Cannot call a class as a function")}var e,r=o;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&g(r,t),r=o,t=[{key:"create",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t,e,r){var n;return v()?Reflect.construct.apply(null,arguments):((n=[null]).push.apply(n,e),e=new(t.bind.apply(t,n)),r&&g(e,r.prototype),e)}(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&&this.context.translate(.5,.5)}),this.on("endDraw",function(){this.context.translate&&this.context.translate(-.5,-.5)});var e="undefined"!=typeof window&&1<window.devicePixelRatio?window.devicePixelRatio:1;this.isWXMiniApp&&(e=wx.getWindowInfo().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 l.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"),"2d"===this.mode?(this.canvas.height=e*this.dprScaleSize,this.canvas.width=t*this.dprScaleSize,1!==this.dprScaleSize&&this.context.scale&&this.context.scale(this.dprScaleSize,this.dprScaleSize)):(this.canvas.width=t,this.canvas.height=e),this.context.viewport&&this.context.viewport(0,0,t,e),this.needUpdate=!0)}},{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=this.isWXMiniApp?{left:0,top:0}: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,r,n){return new a.jmShadow(t,e,r,n)}},{key:"createLinearGradient",value:function(t,e,r,n){return new u.jmGradient({type:"linear",x1:t,y1:e,x2:r,y2:n,stops:4<arguments.length&&void 0!==arguments[4]?arguments[4]:[]})}},{key:"createRadialGradient",value:function(t,e,r,n,i,o){return new u.jmGradient({type:"radial",x1:t,y1:e,r1:r,x2:n,y2:i,r2:o,stops:6<arguments.length&&void 0!==arguments[6]?arguments[6]:[]})}},{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.context.clearRect?(this.style&&this.style.fill&&(this.points=[{x:0,y:0},{x:t,y:0},{x:t,y:e},{x:0,y:e}],this.style.close=!0),this.context.clearRect(0,0,t,e)):"webgl"===this.mode&&this.context.clear&&(t=this.style&&this.style.fill?this.utils.hexToRGBA(this.style.fill):{r:0,g:0,b:0,a:0},this.context.clearColor(t.r,t.g,t.b,t.a),this.context.clear(this.context.COLOR_BUFFER_BIT))}},{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",p({points:t,style:e},2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}))}},{key:"createLine",value:function(t,e,r){return this.createShape("line",{start:t,end:e,style:r})}},{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.scaleSize?this.scaleSize={x:t*this.scaleSize.x,y:e*this.scaleSize.y}:this.scaleSize={x:1,y:1},this.canvas.style&&(this.canvas.style.transform="scale(".concat(this.scaleSize.x,", ").concat(this.scaleSize.y,")"))}},{key:"toDataURL",value:function(){return this.canvas.toDataURL?this.canvas.toDataURL():""}},{key:"autoRefresh",value:function(r){var n,i;if(!this.___isAutoRefreshing)return(n=this).___isAutoRefreshing=!0,i=Date.now(),n.__requestAnimationFrameFunHandler&&this.cancelAnimationFrame(n.__requestAnimationFrameFunHandler),n.__requestAnimationFrameFunHandler=this.requestAnimationFrame(function t(){var e;n.destroyed?n.___isAutoRefreshing=!1:(n.needUpdate&&n.redraw(),e=Date.now()-i,n.emit("update",e),n.__requestAnimationFrameFunHandler&&n.cancelAnimationFrame(n.__requestAnimationFrameFunHandler),n.__requestAnimationFrameFunHandler=n.requestAnimationFrame(t),r&&r())}),this}},{key:"destroy",value:function(){this.eventHandler.destroy(),this.destroyed=!0}}])&&y(r.prototype,e),t&&y(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r})(c.jmControl)},{"./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,r){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)}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function l(t,e,r){e=u(e);var n=t,e=s()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r);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 c(n)}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function o(t){var r="function"==typeof Map?new Map:void 0;return function(t){if(null===t||!(e=>{try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}})(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,e)}function e(){return function(t,e,r){var n;return s()?Reflect.construct.apply(null,arguments):((n=[null]).push.apply(n,e),e=new(t.bind.apply(t,n)),r&&a(e,r.prototype),e)}(t,arguments,u(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),a(e,t)}(t)}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(s=function(){return!!t})()}function a(t,e){return(a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.jmList=r.default=void 0;r.jmList=r.default=(t=>{function u(){var t,e=this,r=u;if(!(e instanceof r))throw new TypeError("Cannot call a class as a function");for(var n=[],i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];if(o&&o.length&&Array.isArray(o[0])){for(var a=0;a<o[0].length;a++)n.push(o[0][a]);t=l(this,u,[].concat(n))}else t=l(this,u);return t.option={},t.type="jmList",c(t)}var e,r=u;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&a(r,t),r=u,(t=[{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]);else"object"==i(t)&&this.includes(t)||this.push(t);return 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 r=this.length-1;0<=r;r--)if(!1===t.call(this,r,this[r]))break}else for(var n=this.length,i=0;i<n;i++)if(!1===t.call(this,i,this[i]))break}},{key:"count",value:function(t){if(t&&"function"==typeof t){for(var e=0,r=this.length,n=0;n<r;n++)t(this[n])&&e++;return e}return this.length}},{key:"clear",value:function(){this.splice(0,this.length)}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(o(Array))},{}],7:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.jmObject=r.default=void 0;var 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 r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=o(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==o(t)?t:t+""))(n.key),n)}}var a=0;r.jmObject=r.default=(()=>{function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");t&&"jmGraph"==t.type&&(this.graph=t),this.id=++a}return t=e,(r=[{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(r){r=r||o;var t,n=[],i=(new Date).getTime();for(t in r.animateHandles.each(function(t,e){try{e&&e.handle&&(!e.times||i-e.times>=e.millisec)&&(!1===e.handle.apply(r,e.params)&&n.push(e),e.times=i)}catch(t){window.console&&window.console.info&&window.console.info(t.toString()),e&&n.push(e)}}),n)r.animateHandles.remove(n[t]);r.animate()},10,this))}else{var r=this.graph;r&&r.animate.apply(r,arguments)}}}])&&s(t.prototype,r),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n})()},{"./jmList.js":6}],8:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmPath=r.default=void 0;t=t("./jmControl.js");function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function o(t,e,r){e=a(e);var n=t,e=s()?Reflect.construct(e,r||[],a(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(s=function(){return!!t})()}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmPath=r.default=(t=>{function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmPath",r=this,n=i;if(r instanceof n)return(r=o(this,i,[t,e])).points=t&&t.points?t.points:[],r;throw new TypeError("Cannot call a class as a function")}var e,r=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&u(r,t),r=i,(t=[{key:"points",get:function(){return this.property("points")},set:function(t){return this.needUpdate=!0,this.property("points",t)}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(t.jmControl)},{"./jmControl.js":2}],9:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmProperty=r.default=void 0;var o=t("./jmUtils.js"),t=t("./jmObject.js");function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function a(t,e,r){e=l(e);var n=t,e=u()?Reflect.construct(e,r||[],l(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(u=function(){return!!t})()}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var h=Symbol("properties");r.jmProperty=r.default=(t=>{function r(t){var e;if(this instanceof r)return(e=a(this,r))[h]={},t&&t.mode&&(e.mode=t.mode),e;throw new TypeError("Cannot call a class as a function")}var e,n=r;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&c(n,t),n=r,(t=[{key:"property",value:function(){for(var t,e,r,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];if(i)return t=this[h],e=i[0],1<i.length?(r=i[1],r={oldValue:t[e],newValue:r},t[e]=i[1],this.emit&&this.emit("propertyChange",e,r),i[1]):e?t[e]:void 0}},{key:"needUpdate",get:function(){return this.property("needUpdate")},set:function(t){this.property("needUpdate",t),t&&!this.is("jmGraph")&&this.graph&&(this.graph.needUpdate=!0)}},{key:"graph",get:function(){return this.property("graph")||this.property("graph",this.findParent("jmGraph"))},set:function(t){return this.property("graph",t)}},{key:"mode",get:function(){var t=this.property("mode");return t||(this.is("jmGraph")?this.property("mode"):this.graph.mode)},set:function(t){return this.property("mode",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)}}])&&s(n.prototype,t),e&&s(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n})(t.jmObject)},{"./jmObject.js":7,"./jmUtils.js":11}],10:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.jmShadow=r.default=void 0;var n=t("./jmUtils.js");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)}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}r.jmShadow=r.default=(()=>{function i(t,e,r,n){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");"string"!=typeof t||e||r||n?(this.x=t,this.y=e,this.blur=r,this.color=n):this.fromString(t)}return t=i,(e=[{key:"fromString",value:function(t){if(t)return(t=t.match(/\s*([^,]+)\s*,\s*([^,]+)\s*(,[^,]+)?\s*(,[\s\S]+)?\s*/i))&&(this.x=t[1]||0,this.y=t[2]||0,t[3]&&(t[3]=n.jmUtils.trim(t[3],", "),0===t[3].indexOf("#")||/^rgb/i.test(t[3])?this.color=t[3]:this.blur=n.jmUtils.trim(t[3],", ")),t[4])&&(this.color=n.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),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r})()},{"./jmUtils.js":11}],11:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.jmUtils=r.default=void 0;var c=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 r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=h(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=h(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==h(t)?t:t+""))(n.key),n)}}var o={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",transparent:"rgba(0,0,0,0)"};r.jmUtils=r.default=(()=>{function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function")}return e=t,n=[{key:"clone",value:function(t,e){var r,n=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,n,o);if(s)return s}if("boolean"==typeof e&&(n=e,e=void 0),100<++o)return e;if(t&&"object"===h(t)){if(e=e||{},this.isType(t,c.jmList))return new c.jmList(t);if(Array.isArray(t)){if(n){for(var a=[],u=0;u<t.length;u++)a.push(this.clone(t[u],e[u],n,i,o));return a}return t.slice(0)}for(var l in t.__proto__&&(e.__proto__=t.__proto__),t)"constructor"!==l&&((r=t[l])&&(r.tagName||r.getContext)?e[l]=r:"object"!==h(e[l])&&void 0!==e[l]||(e[l]=this.clone(r,e[l],n,i,o)));return e}return void 0!==e?e:t}},{key:"bindEvent",value:function(t,e,r,n){if(e&&e.indexOf&&-1!=e.indexOf(" "))for(var i=e.split(" "),o=0;o<i.length;o++)this.bindEvent(t,i[o],r,n);return t.attachEvent?t.attachEvent("on"+e,r,n):t.addEventListener&&t.addEventListener(e,r,n),{name:e,target:t,fun:r}}},{key:"removeEvent",value:function(t,e,r){return t.removeEventListener?t.removeEventListener(e,r,!1):t.detachEvent?(t.detachEvent("on"+e,r),!0):void(t["on"+e]=null)}},{key:"getElementPosition",value:function(t){var e={top:0,left:0};if(t)if(t.offsetParent)for(;t.offsetParent;)e.top+=t.offsetTop,e.left+=t.offsetLeft,t=t.offsetParent;else t.x&&(e.left+=t.x);return e}},{key:"getEventPosition",value:function(t,e){var r=(t=t||event).isWXMiniApp,n=!1,i=t.changedTouches||t.targetTouches||t.touches,o=t.target||t.srcElement,s=(i&&i.length&&((t=i[0]).target||(t.target=o),n=!0),t.pageX||t.x),a=(void 0===s&&(s=t.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)),t.pageY||t.y),u=(void 0===a&&(a=t.clientY+(document.documentElement.scrollTop||document.body.scrollTop)),t.offsetX),l=t.offsetY;return void 0===u&&void 0===l&&(l=r?(u=t.x,t.y):(u=s-(o=this.getElementPosition(o)).left,a-o.top)),e&&(e.x&&(u/=e.x),e.y)&&(l/=e.y),{pageX:s,pageY:a,clientX:t.clientX,clientY:t.clientY,offsetX:u,offsetY:l,layerX:t.layerX,layerY:t.layerY,screenX:t.screenX,screenY:t.screenY,x:u,y:l,isTouch:n,touches:i,isWXMiniApp:r}}},{key:"isType",value:function(t,e){return!(!t||"object"!==h(t))&&t.constructor===e}},{key:"pointInPolygon",value:function(t,e,r){r=r||1,r/=2;var n,i,o,s=e.length,a=!1,u=!0;if(!e||0==s)return 0;if(1==s)return Math.abs(e[0].x-t.x)<=r&&Math.abs(e[0].y-t.y)<=r;if(2==s)return Math.min(e[0].x,e[1].x)-t.x>r||t.x-Math.max(e[0].x,e[1].x)>r||Math.min(e[0].y,e[1].y)-t.y>r||t.y-Math.max(e[0].y,e[1].y)>r?0:e[0].x==e[1].x?Math.abs(e[0].x-t.x)<=r&&(t.y-e[0].y)*(t.y-e[1].y)<=0?1:0:e[0].y==e[1].y?Math.abs(e[0].y-t.y)<=r&&(t.x-e[0].x)*(t.x-e[1].x)<=0?1:0:Math.abs(e[0].x-t.x)<r&&Math.abs(e[0].y-t.y)<r||Math.abs(e[1].x-t.x)<r&&Math.abs(e[1].y-t.y)<r||t.y!=e[0].y&&t.y!=e[1].y&&(o=(e[1].x-e[0].x)/(e[1].y-e[0].y)*(t.y-e[0].y),o=(t.y-e[0].y)/Math.sqrt(o*o+(t.y-e[0].y)*(t.y-e[0].y))*(t.x-e[0].x-o),Math.abs(o)<=r)?1:0;for(n=0;n<s;++n)if(e[n].x==t.x&&e[n].y==t.y)return 1;for(;u;)for(a=u=!1,n=0,i=s-1;n<s;i=n++)if(e[n].y<t.y&&t.y<e[i].y||e[i].y<t.y&&t.y<e[n].y){if(t.x<=e[n].x||t.x<=e[i].x){var l=(t.y-e[n].y)*(e[i].x-e[n].x)/(e[i].y-e[n].y)+e[n].x;if(t.x<l)a=!a;else if(t.x==l)return 1}}else if(t.y==e[n].y){if(t.x<e[n].x){e[n].y>e[i].y?--t.y:++t.y,u=!0;break}}else if(e[n].y==e[i].y&&t.y==e[n].y&&(e[n].x<t.x&&t.x<e[i].x||e[i].x<t.x&&t.x<e[n].x)){a=!0;break}return a?2:0}},{key:"checkOutSide",value:function(t,e,r){var n={left:0,right:0,top:0,bottom:0};return r.x<0?n.left=e.left+r.x-t.left:0<r.x&&(n.right=e.right+r.x-t.right),r.y<0?n.top=e.top+r.y-t.top:0<r.y&&(n.bottom=e.bottom+r.y-t.bottom),n}},{key:"rotatePoints",value:function(t,e,r){if(r&&t){var n=Math.cos(r),i=Math.sin(r);if(Array.isArray(t))for(var o,s,a=0;a<t.length;a++)t[a]&&(o=t[a].x-e.x,s=t[a].y-e.y,t[a].x=o*n-s*i+e.x,t[a].y=o*i+s*n+e.y);else{var r=t.x-e.x,u=t.y-e.y;t.x=r*n-u*i+e.x,t.y=r*i+u*n+e.y}}return t}},{key:"trimStart",value:function(t,e){if(e=e||" ",t&&0<t.length){var r=t[0];if(r===e||0<=e.indexOf(r))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 r=t[t.length-1];if(r===e||0<=e.indexOf(r))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,r=(t=t.toLowerCase()).length,n=0;n<r;n++){var i="0123456789abcdef".indexOf(t[n]);if(0!=i){for(var o=1;o<r-n;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){var e,r;return"string"!=typeof t?t:(t=this.trim(t),this.__hexToRGBA_Cache=this.__hexToRGBA_Cache||{},this.__hexToRGBA_Cache[t]||("#"==(r=o[r=t]?o[r]:r)[0]&&(e={a:1},8<=r.length?(e.a=r.substr(1,2),e.g=r.substr(5,2),e.b=r.substr(7,2),e.r=r.substr(3,2),e.a=Number((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),r=e):7===r.length||4===r.length?(4===r.length?(e.g=r.substr(2,1),e.g=e.g+e.g,e.b=r.substr(3,1),e.b=e.b+e.b,e.r=r.substr(1,1),e.r=e.r+e.r):(e.g=r.substr(3,2),e.b=r.substr(5,2),e.r=r.substr(1,2)),e.r=this.hexToNumber(e.r||0),e.g=this.hexToNumber(e.g||0),e.b=this.hexToNumber(e.b||0),r=e):5===r.length&&(e.a=r.substr(1,1),e.g=r.substr(3,1),e.b=r.substr(4,1),e.r=r.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=Number((this.hexToNumber(e.a)/255).toFixed(4)),r=e)),"string"==typeof r&&(e=r.match(/rgb(a)?\s*\(\s*([\d\.]+)\s*,\s*([\d\.]+)\s*,\s*([\d\.]+)\s*(,\s*[\d\.]+)?\s*\)/i))&&6===e.length&&(r={r:Number(e[2]),g:Number(e[3]),b:Number(e[4]),a:Number(this.trimStart(e[5]||"1",","))}),this.__hexToRGBA_Cache[t]=r))}},{key:"rgbToDecimal",value:function(t){return(t=this.clone(t)).r=this.byteToDecimal(t.r),t.g=this.byteToDecimal(t.g),t.b=this.byteToDecimal(t.b),t}},{key:"byteToDecimal",value:function(t){return t/255}},{key:"toColor",value:function(t,e,r,n){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=void 0!==i.r?i.r:t,e=void 0!==i.g?i.g:e,r=void 0!==i.b?i.b:r,n=void 0!==i.a?i.a:n}return t&&"object"===h(t)&&(e=t.g,r=t.b,n=t.a||1,t=t.r),void 0!==t&&void 0!==e&&void 0!==r?void 0!==n?"rgba("+t+","+e+","+r+","+n+")":"rgb("+t+","+e+","+r+")":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)}}],(r=null)&&i(e.prototype,r),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n})()},{"./jmList.js":6}],12:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=n;function n(t,e,r){r=r||2;var n,i,o,s,a,u=e&&e.length,l=u?e[0]*r:t.length,c=d(t,0,l,r,!0),h=[];if(c&&c.next!==c.prev){if(u&&(c=((t,e,r,n)=>{var i,o,s,a,u=[];for(i=0,o=e.length;i<o;i++)a=e[i]*n,s=i<o-1?e[i+1]*n:t.length,(a=d(t,a,s,n,!1))===a.next&&(a.steiner=!0),u.push((t=>{for(var e=t,r=t;(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),(e=e.next)!==t;);return r})(a));for(u.sort(m),i=0;i<u.length;i++)r=((t,e)=>{var r=((t,e)=>{var r,n=e,i=t.x,o=t.y,s=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var a=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=i&&s<a&&(s=a,r=n.x<n.next.x?n:n.next,a===i))return r}}while((n=n.next)!==e);if(!r)return null;var u,l=r,c=r.x,h=r.y,f=1/0;for(n=r;i>=n.x&&n.x>=c&&i!==n.x&&A(o<h?i:s,o,c,h,o<h?s:i,o,n.x,n.y)&&(u=Math.abs(o-n.y)/(i-n.x),R(n,t))&&(u<f||u===f&&(n.x>r.x||n.x===r.x&&((t,e)=>E(t.prev,t,e.prev)<0&&E(e.next,t,t.next)<0)(r,n)))&&(r=n,f=u),(n=n.next)!==l;);return r})(t,e);return r?(O(t=U(r,t),t.next),O(r,r.next)):e})(u[i],r);return r})(t,e,c,r)),t.length>80*r){for(var f=n=t[0],p=i=t[1],y=r;y<l;y+=r)(o=t[y])<f&&(f=o),(s=t[y+1])<p&&(p=s),n<o&&(n=o),i<s&&(i=s);a=0!==(a=Math.max(n-f,i-p))?32767/a:0}S(c,h,r,f,p,a,0)}return h}function d(t,e,r,n,i){var o,s;if(i===0<v(t,e,r,n))for(o=e;o<r;o+=n)s=a(o,t[o],t[o+1],s);else for(o=r-n;e<=o;o-=n)s=a(o,t[o],t[o+1],s);return s&&T(s,s.next)&&(B(s),s=s.next),s}function O(t,e){if(!t)return t;e=e||t;var r,n=t;do{if(r=!1,n.steiner||!T(n,n.next)&&0!==E(n.prev,n,n.next))n=n.next;else{if(B(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function S(t,e,r,n,i,o,s){if(t){if(!s&&o){for(var a=t,u=n,l=i,c=o,h=a;0===h.z&&(h.z=k(h.x,h.y,u,l,c)),h.prevZ=h.prev,h.nextZ=h.next,(h=h.next)!==a;);h.prevZ.nextZ=null,h.prevZ=null;var f,p,y,d,m,v,b,g,x=h,j=1;do{for(p=x,m=x=null,v=0;p;){for(v++,y=p,f=b=0;f<j&&(b++,y=y.nextZ);f++);for(g=j;0<b||0<g&&y;)0!==b&&(0===g||!y||p.z<=y.z)?(p=(d=p).nextZ,b--):(y=(d=y).nextZ,g--),m?m.nextZ=d:x=d,d.prevZ=m,m=d;p=y}}while(m.nextZ=null,j*=2,1<v)}for(var w,_,P=t;t.prev!==t.next;)if(w=t.prev,_=t.next,o?((t,e,r,n)=>{var i=t.prev,o=t,s=t.next;if(!(0<=E(i,o,s))){for(var a=i.x,u=o.x,l=s.x,c=i.y,h=o.y,f=s.y,p=a<u?a<l?a:l:u<l?u:l,y=c<h?c<f?c:f:h<f?h:f,d=u<a?l<a?a:l:l<u?u:l,m=h<c?f<c?c:f:f<h?h:f,v=k(p,y,e,r,n),b=k(d,m,e,r,n),g=t.prevZ,x=t.nextZ;g&&g.z>=v&&x&&x.z<=b;){if(g.x>=p&&g.x<=d&&g.y>=y&&g.y<=m&&g!==i&&g!==s&&A(a,c,u,h,l,f,g.x,g.y)&&0<=E(g.prev,g,g.next))return;if(g=g.prevZ,x.x>=p&&x.x<=d&&x.y>=y&&x.y<=m&&x!==i&&x!==s&&A(a,c,u,h,l,f,x.x,x.y)&&0<=E(x.prev,x,x.next))return;x=x.nextZ}for(;g&&g.z>=v;){if(g.x>=p&&g.x<=d&&g.y>=y&&g.y<=m&&g!==i&&g!==s&&A(a,c,u,h,l,f,g.x,g.y)&&0<=E(g.prev,g,g.next))return;g=g.prevZ}for(;x&&x.z<=b;){if(x.x>=p&&x.x<=d&&x.y>=y&&x.y<=m&&x!==i&&x!==s&&A(a,c,u,h,l,f,x.x,x.y)&&0<=E(x.prev,x,x.next))return;x=x.nextZ}return 1}})(t,n,i,o):(t=>{var e=t.prev,r=t,t=t.next;if(!(0<=E(e,r,t))){for(var n=e.x,i=r.x,o=t.x,s=e.y,a=r.y,u=t.y,l=n<i?n<o?n:o:i<o?i:o,c=s<a?s<u?s:u:a<u?a:u,h=i<n?o<n?n:o:o<i?i:o,f=a<s?u<s?s:u:u<a?a:u,p=t.next;p!==e;){if(p.x>=l&&p.x<=h&&p.y>=c&&p.y<=f&&A(n,s,i,a,o,u,p.x,p.y)&&0<=E(p.prev,p,p.next))return;p=p.next}return 1}})(t))e.push(w.i/r|0),e.push(t.i/r|0),e.push(_.i/r|0),B(t),t=_.next,P=_.next;else if((t=_)===P){s?1===s?S(t=((t,e,r)=>{var n=t;do{var i=n.prev,o=n.next.next}while(!T(i,o)&&C(i,n,n.next,o)&&R(i,o)&&R(o,i)&&(e.push(i.i/r|0),e.push(n.i/r|0),e.push(o.i/r|0),B(n),B(n.next),n=t=o),(n=n.next)!==t);return O(n)})(O(t),e,r),e,r,n,i,o,2):2===s&&((t,e,r,n,i,o)=>{var s=t;do{for(var a,u=s.next.next;u!==s.prev;){if(s.i!==u.i&&((t,e)=>t.next.i!==e.i&&t.prev.i!==e.i&&!((t,e)=>{var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&C(r,r.next,t,e))return 1}while((r=r.next)!==t)})(t,e)&&(R(t,e)&&R(e,t)&&((t,e)=>{for(var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),(r=r.next)!==t;);return n})(t,e)&&(E(t.prev,t,e.prev)||E(t,e.prev,e))||T(t,e)&&0<E(t.prev,t,t.next)&&0<E(e.prev,e,e.next)))(s,u))return a=U(s,u),s=O(s,s.next),a=O(a,a.next),S(s,e,r,n,i,o,0),S(a,e,r,n,i,o,0);u=u.next}}while((s=s.next)!==t)})(t,e,r,n,i,o):S(O(t),e,r,n,i,o,1);break}}}function m(t,e){return t.x-e.x}function k(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function A(t,e,r,n,i,o,s,a){return(t-s)*(o-a)<=(i-s)*(e-a)&&(r-s)*(e-a)<=(t-s)*(n-a)&&(i-s)*(n-a)<=(r-s)*(o-a)}function E(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function T(t,e){return t.x===e.x&&t.y===e.y}function C(t,e,r,n){var i=l(E(t,e,r)),o=l(E(t,e,n)),s=l(E(r,n,t)),a=l(E(r,n,e));return i!==o&&s!==a||0===i&&u(t,r,e)||0===o&&u(t,n,e)||0===s&&u(r,t,n)||!(0!==a||!u(r,e,n))}function u(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function l(t){return 0<t?1:t<0?-1:0}function R(t,e){return E(t.prev,t,t.next)<0?0<=E(t,e,t.next)&&0<=E(t,t.prev,e):E(t,e,t.prev)<0||E(t,t.next,e)<0}function U(t,e){var r=new s(t.i,t.x,t.y),n=new s(e.i,e.x,e.y),i=t.next,o=e.prev;return(t.next=e).prev=t,(r.next=i).prev=r,n.next=r,(o.next=r.prev=n).prev=o,n}function a(t,e,r,n){t=new s(t,e,r);return n?(t.next=n.next,(t.prev=n).next.prev=t,n.next=t):(t.prev=t).next=t,t}function B(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function s(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function v(t,e,r,n){for(var i=0,o=e,s=r-n;o<r;o+=n)i+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return i}n.deviation=function(t,e,r,n){var i=e&&e.length,o=i?e[0]*r:t.length,s=Math.abs(v(t,0,o,r));if(i)for(var a=0,u=e.length;a<u;a++){var l=e[a]*r,c=a<u-1?e[a+1]*r:t.length;s-=Math.abs(v(t,l,c,r))}for(var h=0,a=0;a<n.length;a+=3){var f=n[a]*r,p=n[a+1]*r,y=n[a+2]*r;h+=Math.abs((t[f]-t[y])*(t[1+p]-t[1+f])-(t[f]-t[p])*(t[1+y]-t[1+f]))}return 0===s&&0===h?0:Math.abs((h-s)/s)},n.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var s=0;s<e;s++)r.vertices.push(t[i][o][s]);0<i&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],13:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=n(t("../earcut.js")),a=n(t("./gradient.js")),s=t("./core/program.js"),o=t("./core/buffer.js"),u=t("./core/texture.js");function n(t){return t&&t.__esModule?t:{default:t}}function l(t){return(l="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){return(t=>{if(Array.isArray(t))return f(t)})(t)||(t=>{if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)})(t)||h(t)||(()=>{throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function h(t,e){var r;if(t)return"string"==typeof t?f(t,e):"Map"===(r="Object"===(r={}.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,e):void 0}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function p(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}function y(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?p(Object(i),!0).forEach(function(t){var e,r;e=n,r=i[t=t],(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):p(Object(i)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(i,t))})}return n}function d(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,m(n.key),n)}}function m(t){t=((t,e)=>{if("object"!=l(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=l(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string");return"symbol"==l(t)?t:t+""}var v="\n attribute vec4 a_position;\n attribute vec4 a_color;\n attribute vec2 a_text_coord;\n uniform vec2 a_center_point; // 当前canvas的中心位置\n uniform float a_point_size; // 点的大小\n uniform int a_type;\n varying vec4 v_color;\n varying vec2 v_text_coord;\n varying float v_type;\n\n ".concat("\n vec4 translatePosition(vec4 point, float x, float y) {\n point.x = (point.x-x)/x;\n point.y = (y-point.y)/y;\n return point;\n }","\n\n void main() {\n gl_PointSize = a_point_size == 0.0? 1.0 : a_point_size;\n v_type = float(a_type);\n vec4 pos = translatePosition(a_position, a_center_point.x, a_center_point.y);\n gl_Position = pos;\n v_color = a_color;\n if(a_type == 2) {\n v_text_coord = a_text_coord;\n }\n }\n"),b="\n precision mediump float;\n uniform sampler2D u_sample;\n uniform vec4 v_texture_bounds; // 纹理的左上坐标和大小 x,y,z,w\n uniform vec4 v_single_color;\n varying float v_type;\n varying vec4 v_color;\n varying vec2 v_text_coord;\n\n ".concat("\n vec2 translateTexturePosition(in vec2 point, vec4 bounds) {\n point.x = (point.x-bounds.x)/bounds.z; // 离左上角位置的X长比上纹理宽 0-1\n point.y = 1.0-(point.y-bounds.y)/bounds.w; // 离左上角位置的Y长比上高,因为纹理坐标是左下角起,所以要用1-\n return point;\n }","\n\n void main() {\n // 如果是fill,则直接填充颜色\n if(v_type == 1.0) {\n gl_FragColor = v_single_color;\n }\n // 渐变色\n else if(v_type == 3.0) {\n gl_FragColor = v_color;\n }\n else if(v_type == 2.0) {\n vec2 pos = translateTexturePosition(v_text_coord, v_texture_bounds);\n gl_FragColor = texture2D(u_sample, pos);\n }\n else {\n float r = distance(gl_PointCoord, vec2(0.5, 0.5));\n //根据距离设置片元\n if(r <= 0.5){\n // 方形区域片元距离几何中心半径小于0.5,像素颜色设置红色\n gl_FragColor = v_single_color;\n }else {\n // 方形区域距离几何中心半径不小于0.5的片元剪裁舍弃掉:\n discard;\n }\n }\n }\n"),t=(()=>{function r(t,e){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");this.graph=t,this.option=e||{},this.style={globalAlpha:1}}return t=r,(e=[{key:"context",get:function(){if(this.graph)return this.graph.context}},{key:"textureCanvas",get:function(){var t=this.graph.textureCanvas;if(!t){if("undefined"==typeof document)return null;t=this.graph.textureCanvas=document.createElement("canvas")}return t}},{key:"textureContext",get:function(){return this.textureCanvas.ctx||(this.textureCanvas.ctx=this.textureCanvas.getContext("2d",{willReadFrequently:!0}))}},{key:"program",get:function(){return this.graph.context.pathProgram||(this.graph.context.pathProgram=this.createProgram(v,b))}},{key:"setStyle",value:function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.style;"string"==typeof e&&((t={})[e]=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",e=t),this.style=y(y({},this.style),e)}},{key:"convertColor",value:function(t){return this.isGradient(t)?t:("string"==typeof t&&(t=this.graph.utils.hexToRGBA(t)),this.graph.utils.rgbToDecimal(t))}},{key:"setTextureStyle",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";if("string"==typeof t)-1<["fillStyle","strokeStyle","shadowColor"].indexOf(t)&&(e=this.graph.utils.toColor(e)),this.textureContext[t]=e;else for(var r in t)"constructor"!==r&&this.setTextureStyle(r,t[r])}},{key:"createProgram",value:function(t,e){return this.context.lineWidth(1),(0,s.createProgram)(this.context,t,e)}},{key:"useProgram",value:function(){var t=(t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.program).program||t;return this.context.__curent_program!==t&&((0,s.useProgram)(this.context,t.program||t),this.context.__curent_program=t),t}},{key:"getAttribLocation",value:function(t){return this.context.getAttribLocation(this.program.program,t)}},{key:"getUniformLocation",value:function(t){return this.context.getUniformLocation(this.program.program,t)}},{key:"writeVertexAttrib",value:function(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:2,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:this.context.FLOAT;return t.attr=e,(0,s.writeVertexAttrib)(this.context,t,e,r,n,i,o)}},{key:"disableVertexAttribArray",value:function(t){try{return t?(0,s.disableVertexAttribArray)(this.context,t):t}catch(t){console.error(t)}return t}},{key:"createFloat32Buffer",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.context.ARRAY_BUFFER,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.context.STATIC_DRAW;return y({data:t},(0,o.createFloat32Buffer)(this.context,t,e,r))}},{key:"createUint16Buffer",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.context.ARRAY_BUFFER,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.context.STATIC_DRAW;return y({data:t},(0,o.createUint16Buffer)(this.context,t,e,r))}},{key:"deleteBuffer",value:function(e){try{if(!e)return;var t=e.buffer||e;if(t)return(0,o.deleteBuffer)(this.context,t)}catch(t){console.log(e),console.error(t)}return e}},{key:"create2DTexture",value:function(){return(0,u.create2DTexture)(this.context)}},{key:"createImgTexture",value:function(t){return(0,u.createImgTexture)(this.context,t)}},{key:"createDataTexture",value:function(t){return(0,u.createDataTexture)(this.context,t)}},{key:"deleteTexture",value:function(t){try{return(0,u.deleteTexture)(this.context,t.texture||t)}catch(t){console.error(t)}return t}},{key:"earCutPoints",value:function(t){t=this.pointsToArray(t);return(0,i.default)(t)}},{key:"earCutPointsToTriangles",value:function(t){for(var e=this.earCutPoints(t),r=[],n=0;n<e.length;n+=3){var i=t[e[n]],o=t[e[n+1]],s=t[e[n+2]];r.push([i,o,s])}return r}},{key:"pointsToArray",value:function(t){var e;return(e=[]).concat.apply(e,c(t.map(function(t){return[t.x,t.y]})))}},{key:"arrayToPoints",value:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push({x:t[r],y:t[r+1]});return e}},{key:"createLinearGradient",value:function(t,e,r,n,i){return new a.default("linear",{x1:t,y1:e,x2:r,y2:n,bounds:i,control:this})}},{key:"createRadialGradient",value:function(t,e,r,n,i,o,s){return new a.default("radial",{x1:t,y1:e,r1:r,x2:n,y2:i,r2:o,bounds:s,control:this})}},{key:"isGradient",value:function(t){return t&&t instanceof a.default}},{key:"testSize",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.style,e=(this.textureContext.save&&this.textureContext.save(),(e.font||e.fontSize)&&(this.textureContext.font=e.font||e.fontSize+"px "+e.fontFamily),this.textureContext.measureText?this.textureContext.measureText(t):{width:15});return this.textureContext.restore&&this.textureContext.restore(),e.height=this.style.fontSize||15,e}},{key:"toFillTexture",value:function(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,n=this.textureCanvas;if(!n)return t;if(n.width=e.width,n.height=e.height,!n.width||!n.height)return t;if(this.textureContext.clearRect(0,0,n.width,n.height),this.textureContext.fillStyle=t,this.textureContext.beginPath(),r&&r.length||((r=[]).push({x:e.left,y:e.top}),r.push({x:e.left+e.width,y:e.top}),r.push({x:e.left+e.width,y:e.top+e.height}),r.push({x:e.left,y:e.top+e.height}),r.push({x:e.left,y:e.top})),r&&r.length){var i,o=((t,e)=>{var r,n,i,o,s="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(s)return i=!(n=!0),{s:function(){s=s.call(t)},n:function(){var t=s.next();return n=t.done,t},e:function(t){i=!0,r=t},f:function(){try{n||null==s.return||s.return()}finally{if(i)throw r}}};if(Array.isArray(t)||(s=h(t))||e&&t&&"number"==typeof t.length)return s&&(t=s),o=0,{s:e=function(){},n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},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.")})(r);try{for(o.s();!(i=o.n()).done;){var s=i.value;s.m?this.textureContext.moveTo(s.x-e.left,s.y-e.top):this.textureContext.lineTo(s.x-e.left,s.y-e.top)}}catch(t){o.e(t)}finally{o.f()}}else this.textureContext.moveTo(0,0),this.textureContext.lineTo(e.width,0),this.textureContext.lineTo(e.width,e.height),this.textureContext.lineTo(0,e.height),this.textureContext.lineTo(0,0);return this.textureContext.closePath(),this.textureContext.fill(),{data:this.textureContext.getImageData(0,0,n.width,n.height),points:r}}}])&&d(t.prototype,e),n&&d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n})();r.default=t},{"../earcut.js":12,"./core/buffer.js":14,"./core/program.js":17,"./core/texture.js":19,"./gradient.js":20}],14:[function(t,e,r){function i(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.ARRAY_BUFFER,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.STATIC_DRAW,i=t.createBuffer();if(i)return t.bindBuffer(r,i),t.bufferData(r,e.buffer||e,n),{type:r,drawType:n,buffer:i,unitSize:e.BYTES_PER_ELEMENT};throw Error("创建缓冲区对象失败")}Object.defineProperty(r,"__esModule",{value:!0}),r.createBuffer=i,r.createFloat32Buffer=function(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.ARRAY_BUFFER,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.STATIC_DRAW,e=new Float32Array(e);return i(t,e,r,n)},r.createUint16Buffer=function(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.ARRAY_BUFFER,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.STATIC_DRAW,e=new Uint16Array(e);return i(t,e,r,n)},r.deleteBuffer=function(t,e){t.deleteBuffer(e.buffer||e)}},{}],15:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.mapSize=void 0;var n={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};r.mapSize=function(t){return n[t]}},{}],16:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.mapType=void 0;var o=null,s={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D"};r.mapType=function(t,e){if(!o){var r=Object.keys(s);o={};for(var n=0;n<r.length;++n){var i=r[n];o[t[i]]=s[i]}}return o[e]}},{}],17:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createProgram=function(t,e,r){var e=(0,i.createShader)(t,t.VERTEX_SHADER,e),r=(0,i.createShader)(t,t.FRAGMENT_SHADER,r),n=t.createProgram();t.attachShader(n,e),t.attachShader(n,r),t.linkProgram(n),t.getProgramParameter(n,t.LINK_STATUS)||(console.error("PError: Could not initialize shader."),console.error("gl.VALIDATE_STATUS",t.getProgramParameter(n,t.VALIDATE_STATUS)),console.error("gl.getError()",t.getError()),""!==t.getProgramInfoLog(n)&&console.warn("Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(n)),t.deleteProgram(n));o(t,n),t.deleteShader(e),t.deleteShader(r);e=s(t,n),r=l(t,n);return{program:n,attrs:e,uniforms:r}},r.disableVertexAttribArray=function(t,e){return t.disableVertexAttribArray(e.location)},r.extractAttributes=s,r.extractUniforms=l,r.getAttribLocation=function(t,e,r){return t.getAttribLocation(e,r)},r.getUniformLocation=function(t,e,r){return t.getUniformLocation(e,r)},r.useProgram=o,r.writeVertexAttrib=function(t,e,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:2,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,s=6<arguments.length&&void 0!==arguments[6]?arguments[6]:t.FLOAT;return t.bindBuffer(e.type,e.buffer),t.vertexAttribPointer(r.location,n,s,!1,i*e.unitSize,o),t.enableVertexAttribArray(r.location),e};var i=t("./shader.js"),a=t("./mapSize.js"),u=t("./mapType.js");function o(t,e){return t.useProgram(e)}function s(t,e){for(var r={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<n;i++){var o=t.getActiveAttrib(e,i),s=(0,u.mapType)(t,o.type);r[o.name]={attribData:o,size:(0,a.mapSize)(s),type:s,location:t.getAttribLocation(e,o.name)}}return r}function l(t,e){for(var r={},n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<n;i++){var o=t.getActiveUniform(e,i),s=o.name.replace(/\[.*?\]/,""),a=(0,u.mapType)(t,o.type);r[s]={uniformData:o,type:a,size:o.size,location:t.getUniformLocation(e,s)}}return r}},{"./mapSize.js":15,"./mapType.js":16,"./shader.js":18}],18:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createShader=function(t,e,r){e=t.createShader(e);return t.shaderSource(e,r),t.compileShader(e),e}},{}],19:[function(t,e,r){function i(t){var e=t.createTexture();return t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,1),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.texParameterf(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameterf(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameterf(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameterf(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}Object.defineProperty(r,"__esModule",{value:!0}),r.create2DTexture=i,r.createDataTexture=function(t,e){var r=new Uint8Array(e.data||e),n=i(t);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e.width||1,e.height||1,0,t.RGBA,t.UNSIGNED_BYTE,r),{texture:n}},r.createImgTexture=function(t,e){var r=i(t);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),{texture:r}},r.deleteTexture=function(t,e){return t.deleteTexture(e)}},{}],20:[function(t,e,r){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)}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=(()=>{return t=function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"linear",r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=this,i=t;if(!(n instanceof i))throw new TypeError("Cannot call a class as a function");this.type=e||"linear",this.x1=r.x1||0,this.y1=r.y1||0,this.r1=r.r1||0,this.x2=r.x2||0,this.y2=r.y2||0,this.r2=r.r2||0,this.bounds=r.bounds||{left:0,top:0,width:0,height:0},this.control=r.control,this.stops=[],this.init()},(e=[{key:"init",value:function(){var t=this.x2-this.x1,e=this.y2-this.y1;"radial"===this.type?this.length=this.r2-this.r1:0==t&&0==e?this.length=0:(this.length=Math.sqrt(Math.pow(t,2),Math.pow(e,2)),this.sin=e/this.length,this.cos=t/this.length)}},{key:"addColorStop",value:function(t,e){this.stops.push({offset:t,color:e})}},{key:"toImageData",value:function(n,t){var i,e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return n.textureContext?(i=null,i="linear"===this.type?n.textureContext.createLinearGradient(this.x1,this.y1,this.x2,this.y2):n.textureContext.createRadialGradient(this.x1,this.y1,this.r1,this.x2,this.y2,this.r2),this.stops.forEach(function(t,e){var r=n.graph.utils.toColor(t.color);i&&i.addColorStop(t.offset,r)}),n.toFillTexture(i,t,e)):null}},{key:"toString",value:function(){var e=this.type+"-gradient(";return"linear"==this.type?e+=this.x1+" "+this.y1+" "+this.x2+" "+this.y2:e+=this.x1+" "+this.y1+" "+this.r1+" "+this.x2+" "+this.y2+" "+this.r2,this.stops.forEach(function(t){e+=","+t.color+" "+t.offset}),e+")"}}])&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r})();r.default=o},{}],21:[function(t,e,r){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)}function u(t){return(t=>{if(Array.isArray(t))return n(t)})(t)||(t=>{if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)})(t)||a(t)||(()=>{throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function s(t,e){var r,n,i,o,s="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(s)return i=!(n=!0),{s:function(){s=s.call(t)},n:function(){var t=s.next();return n=t.done,t},e:function(t){i=!0,r=t},f:function(){try{n||null==s.return||s.return()}finally{if(i)throw r}}};if(Array.isArray(t)||(s=a(t))||e&&t&&"number"==typeof t.length)return s&&(t=s),o=0,{s:e=function(){},n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},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.")}function a(t,e){var r;if(t)return"string"==typeof t?n(t,e):"Map"===(r="Object"===(r={}.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function l(t,e,r){e=h(e);var n=t,e=c()?Reflect.construct(e,r||[],h(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=(t=>{function r(t,e){if(this instanceof r)return(t=l(this,r,[t,e])).isRegular=e.isRegular||!1,t.needCut=e.needCut||!1,t.control=e.control,t.points=[],t;throw new TypeError("Cannot call a class as a function")}var e,n=r;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&f(n,t),n=r,(t=[{key:"setParentBounds",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.parentAbsoluteBounds;t&&(this.parentAbsoluteBounds=t),this.context.uniform2f(this.program.uniforms.a_center_point.location,this.graph.width/2,this.graph.height/2)}},{key:"setFragColor",value:function(t){if(!Array.isArray(t))return void 0===(t=this.convertColor(t)).a&&(t.a=1),this.context.uniform4f(this.program.uniforms.v_single_color.location,t.r,t.g,t.b,t.a*this.style.globalAlpha),null;var e,r=[],n=s(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;void 0===(i=this.convertColor(i)).a&&(i.a=1),r.push(i.r,i.g,i.b,i.a*this.style.globalAlpha)}}catch(t){n.e(t)}finally{n.f()}t=this.createFloat32Buffer(r);return this.writeVertexAttrib(t,this.program.attrs.a_color,4,0,0),t.attr=this.program.attrs.a_color,t}},{key:"beginDraw",value:function(){this.useProgram()}},{key:"draw",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.parentAbsoluteBounds;this.setParentBounds(e),this.points=t}},{key:"endDraw",value:function(){this.points&&delete this.points,this.pathPoints&&delete this.pathPoints}},{key:"closePath",value:function(){var t,e;this.points&&2<this.points.length&&this.points[0]!==this.points[this.points.length-1]&&((t=this.points[0])==(e=this.points[this.points.length-1])||t.x===e.x&&t.y===e.y||this.points.push(t))}},{key:"writePoints",value:function(t){var e,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.program.attrs.a_position,n=[],i=s(t);try{for(i.s();!(e=i.n()).done;){var o=e.value;n.push(o.x+this.parentAbsoluteBounds.left,o.y+this.parentAbsoluteBounds.top)}}catch(t){i.e(t)}finally{i.f()}t=this.createFloat32Buffer(n);return this.writeVertexAttrib(t,r,2,0,0),t.attr=r,t}},{key:"genLinePoints",value:function(t,e){var r=[t],n=e.x-t.x,i=e.y-t.y;if(0!=n||0!=i)for(var o=Math.sqrt(Math.pow(n,2)+Math.pow(i,2)),s=n/o,a=i/o,u=.5;u<o;u+=.5){var l=t.x+s*u;r.push({x:l,y:t.y+a*u})}return r.push(e),r}},{key:"pathToPoints",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.points,e=null,r=[],n=0;n<t.length;n++){var i,o=t[n];e&&!o.m?(i=this.genLinePoints(e,o),r.push.apply(r,u(i))):e&&!r.includes(e)&&r.push(e),e=o}return r.includes(e)||r.push(e),r}},{key:"equalPoint",value:function(t,e){return t.x===e.x&&t.y===e.y}},{key:"pathToLines",value:function(t){for(var e=null,r=[],n=0;n<t.length;n++){var i=t[n];!e||i.m||e.x==i.x&&e.y==i.y||r.push({start:e,end:i}),e=i}return r}},{key:"cutLines",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;if(!(t&&t.length<3))for(r=Math.max(e+1,r);e<t.length;){for(var n=t[e];r<t.length;){var i=t[r];if(this.equalPoint(n.start,i.start)||this.equalPoint(n.end,i.end)||this.equalPoint(n.start,i.end)||this.equalPoint(n.end,i.start))r++;else{var o,s,a=!1,u=this.getIntersection(n,i);if(u&&(this.equalPoint(n.start,u)||this.equalPoint(n.end,u)||(o={start:n.start,end:u},s={start:u,end:n.end},t.splice(e,1,o,s),a=!0,r++),this.equalPoint(i.start,u)||this.equalPoint(i.end,u)||(o={start:i.start,end:u},s={start:u,end:i.end},t.splice(r,1,o,s),r++)),r++,a)return this.cutLines(t,e,r)}}r=++e+1}return t}},{key:"getIntersection",value:function(t,e){var r,n;return this.equalPoint(t.start,e.start)||this.equalPoint(t.start,e.end)?t.start:this.equalPoint(t.end,e.start)||this.equalPoint(t.end,e.end)?t.end:0<(n=(t.start.x-e.start.x)*(t.end.y-e.start.y)-(t.start.y-e.start.y)*(t.end.x-e.start.x))*(r=(t.start.x-e.end.x)*(t.end.y-e.end.y)-(t.start.y-e.end.y)*(t.end.x-e.end.x))||0<(e=(e.start.x-t.start.x)*(e.end.y-t.start.y)-(e.start.y-t.start.y)*(e.end.x-t.start.x))*(e+n-r)||r==n?null:(r=(e=e/(r-n))*(t.end.x-t.start.x),n=e*(t.end.y-t.start.y),{x:t.start.x+r,y:t.start.y+n})}},{key:"getIntersectionLines",value:function(t,e,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.end,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:[],o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:null,s={line:t,polygons:[]};if(i.push(n),o&&this.equalPoint(o.line.start,n))i.unshift(o.line.start),o.polygons.push(i);else for(;r<e.length;r++){var a=e[r];this.equalPoint(n,a.start)?i.includes(a.end)||this.getIntersectionLines(a,e,r+1,a.end,u(i),o||s):this.equalPoint(n,a.end)&&!i.includes(a.start)&&this.getIntersectionLines(a,e,r+1,a.start,u(i),o||s)}return s}},{key:"getPolygon",value:function(t){var e=[];if((r=this.pathToLines(t))&&2<r.length)for(var r=this.cutLines(r),n=0;n<r.length-1;n++){var i=r[n],i=this.getIntersectionLines(i,r,n+1);i.polygons.length&&e.push.apply(e,u(i.polygons))}return e}},{key:"getTriangles",value:function(t){var e=[],t=this.getPolygon(t);if(t.length){var r,n=s(t);try{for(n.s();!(r=n.n()).done;){var i=r.value,o=this.earCutPointsToTriangles(i);e.push.apply(e,u(o))}}catch(t){n.e(t)}finally{n.f()}}return e}},{key:"stroke",value:function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.points,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.style.strokeStyle,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.style.lineWidth;e&&e.length&&(t=null,r&&(t=this.setFragColor(r)),n&&this.context.uniform1f(this.program.uniforms.a_point_size.location,n),this.program.uniforms.a_type&&this.context.uniform1i(this.program.uniforms.a_type.location,1===e.length?4:1),e&&e.length&&(e=(r=n<=1.2)?e:this.pathToPoints(e),n=this.writePoints(e),this.context.drawArrays(r?this.context.LINE_LOOP:this.context.POINTS,0,e.length),this.deleteBuffer(n)),t&&this.deleteBuffer(t),t)&&this.disableVertexAttribArray(t.attr)}},{key:"fill",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{left:0,top:0,width:0,height:0},e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;this.points&&this.points.length&&(this.style.fillStyle&&this.fillColor(this.style.fillStyle,this.points,t,e),this.style.fillImage)&&this.fillImage(this.style.fillImage,this.points,t,e)}},{key:"fillColor",value:function(t,e,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1;if(this.isGradient(t))return i=t.toImageData(this,r,e),this.fillImage(i.data,i.points,r);this.context.uniform1i(this.program.uniforms.a_type.location,n);var i=this.setFragColor(t);this.fillPolygons(e),i&&this.deleteBuffer(i),i&&this.disableVertexAttribArray(i.attr)}},{key:"fillImage",value:function(t,e,r){t&&(t=t instanceof ImageData?this.createDataTexture(t):this.createImgTexture(t),this.context.uniform1i(this.program.uniforms.u_sample.location,0),this.context.uniform4f(this.program.uniforms.v_texture_bounds.location,r.left+this.parentAbsoluteBounds.left,r.top+this.parentAbsoluteBounds.top,r.width,r.height),this.fillTexture(e),this.deleteTexture(t))}},{key:"fillTexture",value:function(t){t&&t.length&&(this.context.uniform1i(this.program.uniforms.a_type.location,2),this.fillPolygons(t,!0),this.disableVertexAttribArray(this.program.attrs.a_text_coord))}},{key:"fillPolygons",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],r=this.writePoints(t),e=e?this.writePoints(t,this.program.attrs.a_text_coord):null;this.context.drawArrays(this.context.TRIANGLE_FAN,0,t.length),this.deleteBuffer(r),e&&this.deleteBuffer(e)}},{key:"drawImage",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.width,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:t.height,n=n||t.width,i=i||t.height;this.fillImage(t,this.points,{left:e,top:r,width:n,height:i})}},{key:"drawText",value:function(t,e,r,n){var i=this.textureCanvas;if(!i)return null;if(i.width=n.width,i.height=n.height,!i.width||!i.height)return null;this.textureContext.clearRect(0,0,i.width,i.height),this.textureContext.font=this.style.font||this.style.fontSize+"px "+this.style.fontFamily,e-=n.left,r-=n.top,this.setTextureStyle(this.style),this.style.fillStyle&&this.textureContext.fillText&&(this.style.maxWidth?this.textureContext.fillText(t,e,r,this.style.maxWidth):this.textureContext.fillText(t,e,r)),this.textureContext.strokeText&&(this.style.maxWidth?this.textureContext.strokeText(t,e,r,this.style.maxWidth):this.textureContext.strokeText(t,e,r));t=this.textureContext.getImageData(0,0,i.width,i.height);this.fillImage(t,this.points,n)}}])&&o(n.prototype,t),e&&o(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n})(((t=t("./base.js"))&&t.__esModule?t:{default:t}).default);r.default=t},{"./base.js":13}],22:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmArc=r.default=void 0;t=t("../core/jmPath.js");function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function o(t,e,r){e=a(e);var n=t,e=s()?Reflect.construct(e,r||[],a(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(s=function(){return!!t})()}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmArc=r.default=(t=>{function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmArc",r=this,n=i;if(r instanceof n)return(t=t||{}).isRegular=!1!==t.isRegular,t.needCut=!0===t.needCut,(r=o(this,i,[t,e])).center=t.center||{x:0,y:0},r.radius=t.radius||0,r.startAngle=t.start||t.startAngle||0,r.endAngle=t.end||t.endAngle||2*Math.PI,r.anticlockwise=t.anticlockwise||0,r.isFan=!!t.isFan,r;throw new TypeError("Cannot call a class as a function")}var e,r=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&u(r,t),r=i,(t=[{key:"center",get:function(){return this.property("center")},set:function(t){return this.needUpdate=!0,this.property("center",t)}},{key:"radius",get:function(){return this.property("radius")},set:function(t){return this.needUpdate=!0,this.property("radius",t)}},{key:"startAngle",get:function(){return this.property("startAngle")},set:function(t){return this.needUpdate=!0,this.property("startAngle",t)}},{key:"endAngle",get:function(){return this.property("endAngle")},set:function(t){return this.needUpdate=!0,this.property("endAngle",t)}},{key:"anticlockwise",get:function(){return this.property("anticlockwise")},set:function(t){return this.needUpdate=!0,this.property("anticlockwise",t)}},{key:"initPoints",value:function(){var t=this.getLocation(),e=0,r=0,n=t.center.x,i=t.center.y,o=(t.radius?e=r=t.radius:(e=t.width/2,r=t.height/2),this.startAngle),s=this.endAngle;if((0!=e||0!=r)&&o!=s){var a=this.anticlockwise,u=(this.points=[],1/Math.max(e,r));a&&(o=(a=2*Math.PI)-o,s=a-s),s<o&&(u=-u),this.isFan&&this.points.push(t.center);for(var l=o;;l+=u){(0<u&&s<l||u<0&&l<s)&&(l=s);var c={x:Math.cos(l)*e+n,y:Math.sin(l)*r+i};if(this.points.push(c),l==s)break}return this.points}}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(t.jmPath)},{"../core/jmPath.js":8}],23:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmArrow=r.default=void 0;var n=t("../core/jmPath.js"),u=t("../core/jmUtils.js");function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function s(t,e,r){e=l(e);var n=t,e=a()?Reflect.construct(e,r||[],l(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(a=function(){return!!t})()}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmArrow=r.default=(t=>{function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmArrow",r=this,n=i;if(r instanceof n)return(r=s(this,i,[t,e])).style.lineJoin="miter",r.style.lineCap="square",r.angle=t.angle||0,r.start=t.start||{x:0,y:0},r.end=t.end||{x:0,y:0},r.offsetX=t.offsetX||5,r.offsetY=t.offsetY||8,r;throw new TypeError("Cannot call a class as a function")}var e,r=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&c(r,t),r=i,(t=[{key:"start",get:function(){return this.property("start")},set:function(t){return this.needUpdate=!0,this.property("start",t)}},{key:"end",get:function(){return this.property("end")},set:function(t){return this.needUpdate=!0,this.property("end",t)}},{key:"angle",get:function(){return this.property("angle")},set:function(t){return this.needUpdate=!0,this.property("angle",t)}},{key:"offsetX",get:function(){return this.property("offsetX")},set:function(t){return this.needUpdate=!0,this.property("offsetX",t)}},{key:"offsetY",get:function(){return this.property("offsetY")},set:function(t){return this.needUpdate=!0,this.property("offsetY",t)}},{key:"initPoints",value:function(t){var e,r,n,i,o=this.angle,s=this.start,a=this.end;if(a)return o=o||Math.atan2(a.y-s.y,a.x-s.x),this.points=[],s=this.offsetX,e=this.offsetY,n=o+(i=Math.atan2(s,e)),r=Math.sin(n),n=Math.cos(n),s=Math.sqrt(s*s+e*e),e={x:a.x-n*s,y:a.y-r*s},o=o-i,r=Math.sin(o),n=Math.cos(o),i={x:a.x-n*s,y:a.y-r*s},(o=u.jmUtils.clone(a)).m=!0,this.points.push(o),this.points.push(e),t||this.style.fill?(this.points.push(i),this.points.push(a)):(this.points.push(o),this.points.push(i)),this.points}}])&&o(r.prototype,t),e&&o(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(n.jmPath)},{"../core/jmPath.js":8,"../core/jmUtils.js":11}],24:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmArrowLine=r.default=void 0;var n=t("./jmLine.js"),s=t("./jmArrow.js");function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function u(t,e,r){e=c(e);var n=t,e=o()?Reflect.construct(e,r||[],c(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(o=function(){return!!t})()}function l(){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=((t,e)=>{for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=c(t)););return t})(t,e);if(n)return(n=Object.getOwnPropertyDescriptor(n,e)).get?n.get.call(arguments.length<3?t:r):n.value}).apply(null,arguments)}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(t,e){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmArrowLine=r.default=(t=>{function o(t,e){if(this instanceof o)return t.start=t.start||{x:0,y:0},t.end=t.end||{x:0,y:0},(e=u(this,o,[t,e||"jmArrowLine"])).style.lineJoin=e.style.lineJoin||"miter",e.arrow=new s.jmArrow(t),e;throw new TypeError("Cannot call a class as a function")}var e,r=o;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&h(r,t),r=o,(t=[{key:"initPoints",value:function(){var t,e,r,n,i;return this.points=(t=o,e="initPoints",r=this,i=l(c(1&(n=3)?t.prototype:t),e,r),(2&n&&"function"==typeof i?function(t){return i.apply(r,t)}:i)([])),!1!==this.arrowVisible&&(this.points=this.points.concat(this.arrow.initPoints())),this.points}}])&&a(r.prototype,t),e&&a(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(n.jmLine)},{"./jmArrow.js":23,"./jmLine.js":30}],25:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.jmBezier=r.default=void 0;t=t("../core/jmPath.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 n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=o(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==o(t)?t:t+""))(n.key),n)}}function s(t,e,r){e=a(e);var n=t,e=i()?Reflect.construct(e,r||[],a(t).constructor):e.apply(t,r);if(!e||"object"!=o(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(i=function(){return!!t})()}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmBezier=r.default=(t=>{function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmBezier",r=this,n=i;if(r instanceof n)return t.style&&!0!==o(t.style.close)&&(t.style.close=!1),(r=s(this,i,[t,e])).cpoints=t.points||[],r;throw new TypeError("Cannot call a class as a function")}var e,r=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&u(r,t),r=i,(t=[{key:"cpoints",get:function(){return this.property("cpoints")},set:function(t){return this.needUpdate=!0,this.property("cpoints",t)}},{key:"initPoints",value:function(){this.points=[];for(var t=this.cpoints,e=0;e<=1;e+=.01){var r=this.getPoint(t,e);this.points.push(r)}return this.points.push(t[t.length-1]),this.points}},{key:"getPoint",value:function(t,e){if(1==t.length)return t[0];var r;if(2==t.length)return(r={}).x=(t[1].x-t[0].x)*e+t[0].x,r.y=(t[1].y-t[0].y)*e+t[0].y,r;if(2<t.length){for(var n=[],i=0;i<t.length-1;i++){var o=this.getPoint([t[i],t[i+1]],e);o&&n.push(o)}return this.getPoint(n,e)}}},{key:"offset",value:function(t,e,r){var n=this.cpoints;if(n){for(var i=n.length,o=0;o<i;o++)n[o].x+=t,n[o].y+=e;this.emit("move",{offsetX:t,offsetY:e,trans:r}),this.getLocation(!0)}}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(t.jmPath)},{"../core/jmPath.js":8}],26:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmCircle=r.default=void 0;t=t("./jmArc.js");function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function s(t,e,r){e=l(e);var n=t,e=o()?Reflect.construct(e,r||[],l(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(o=function(){return!!t})()}function a(t,e,r,n){var i=u(l(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof i?function(t){return i.apply(r,t)}:i}function u(){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=((t,e)=>{for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t})(t,e);if(n)return(n=Object.getOwnPropertyDescriptor(n,e)).get?n.get.call(arguments.length<3?t:r):n.value}).apply(null,arguments)}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmCircle=r.default=(t=>{function o(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmCircle",r=this,n=o;if(r instanceof n)return t.isRegular=!0,s(this,o,[t,e]);throw new TypeError("Cannot call a class as a function")}var e,r=o;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&c(r,t),r=o,(t=[{key:"initPoints",value:function(){if("webgl"===this.graph.mode)return a(o,"initPoints",this,3)([]);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(){if("webgl"===this.graph.mode)return a(o,"draw",this,3)([]);var t=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds,e=this.getLocation(),r=(e.radius||(e.radius=Math.min(e.width,e.height)/2),this.startAngle),n=this.endAngle,i=this.anticlockwise;this.context.arc(e.center.x+t.left,e.center.y+t.top,e.radius,r,n,i)}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(t.jmArc)},{"./jmArc.js":22}],27:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmHArc=r.default=void 0;t=t("./jmArc.js");function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function o(t,e,r){e=a(e);var n=t,e=s()?Reflect.construct(e,r||[],a(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(s=function(){return!!t})()}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmHArc=r.default=(t=>{function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmHArc",r=this,n=i;if(r instanceof n)return t.isRegular=!0,t.needCut=!0,(r=o(this,i,[t,e])).minRadius=t.minRadius||r.style.minRadius||0,r.maxRadius=t.maxRadius||r.style.maxRadius||0,r;throw new TypeError("Cannot call a class as a function")}var e,r=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&u(r,t),r=i,(t=[{key:"minRadius",get:function(){return this.property("minRadius")},set:function(t){return this.needUpdate=!0,this.property("minRadius",t)}},{key:"maxRadius",get:function(){return this.property("maxRadius")},set:function(t){return this.needUpdate=!0,this.property("maxRadius",t)}},{key:"initPoints",value:function(){for(var t,e=this.getLocation(),r=this.minRadius,n=this.maxRadius,i=this.startAngle,o=this.endAngle,s=(this.anticlockwise&&(i=(t=2*Math.PI)-i,o=t-o),.1),a=(o<i&&(s=-s),[]),u=[],l=i;;l+=s){(0<s&&o<l||s<0&&l<o)&&(l=o);var c=Math.cos(l),h=Math.sin(l),f={x:c*r+e.center.x,y:h*r+e.center.y},c={x:c*n+e.center.x,y:h*n+e.center.y};if(a.push(f),u.push(c),l===o)break}u.reverse(),this.style&&this.style.close||(u[0].m=!0),this.points=a.concat(u)}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(t.jmArc)},{"./jmArc.js":22}],28:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmImage=r.default=void 0;t=t("../core/jmControl.js");function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function o(t,e,r){e=u(e);var n=t,e=s()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(s=function(){return!!t})()}function a(){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=((t,e)=>{for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=u(t)););return t})(t,e);if(n)return(n=Object.getOwnPropertyDescriptor(n,e)).get?n.get.call(arguments.length<3?t:r):n.value}).apply(null,arguments)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmImage=r.default=(t=>{function s(t,e){if(this instanceof s)return(t=t||{}).isRegular=!0,(e=o(this,s,[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;throw new TypeError("Cannot call a class as a function")}var e,r=s;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&l(r,t),r=s,(t=[{key:"sourcePosition",get:function(){return this.property("sourcePosition")},set:function(t){return this.property("sourcePosition",t)}},{key:"sourceWidth",get:function(){return this.property("sourceWidth")},set:function(t){return this.needUpdate=!0,this.property("sourceWidth",t)}},{key:"sourceHeight",get:function(){return this.property("sourceHeight")},set:function(t){return this.needUpdate=!0,this.property("sourceHeight",t)}},{key:"image",get:function(){return this.property("image")},set:function(t){return this.needUpdate=!0,this.property("image",t)}},{key:"draw",value:function(){try{var t=this.getImage();this.drawImg(t)}catch(t){console.error&&console.error(t)}}},{key:"drawImg",value:function(t){var e,r,n,i,o,s,a;t&&t.complete?(e=(e=(this.parent&&this.parent.absoluteBounds?this.parent:this).absoluteBounds)||(this.parent&&this.parent.getAbsoluteBounds?this.parent:this).getAbsoluteBounds(),r=this.getLocation(),n=this.sourcePosition,i=this.sourceWidth,o=this.sourceHeight,s=this.webglControl||this.context,this.webglControl?(s.setParentBounds&&s.setParentBounds(e),a=this.getBounds(),s.draw([{x:a.left,y:a.top},{x:a.left+a.width,y:a.top},{x:a.left+a.width,y:a.top+a.height},{x:a.left,y:a.top+a.height}],e),s.drawImage(t,a.left,a.top,a.width,a.height)):(r.left+=e.left,r.top+=e.top,n||void 0!==i||void 0!==o?(void 0===i&&(i=r.width||t.width||0),void 0===o&&(o=r.height||t.height||0),n=n||{x:0,y:0},r.width&&r.height?s.drawImage(t,n.x,n.y,i,o,r.left,r.top,r.width,r.height):r.width?s.drawImage(t,n.x,n.y,i,o,r.left,r.top,r.width,o):r.height?s.drawImage(t,n.x,n.y,i,o,r.left,r.top,i,r.height):s.drawImage(t,n.x,n.y,i,o,r.left,r.top,i,o)):r?r.width&&r.height?s.drawImage(t,r.left,r.top,r.width,r.height):r.width?s.drawImage(t,r.left,r.top,r.width,t.height):r.height?s.drawImage(t,r.left,r.top,t.width,r.height):s.drawImage(t,r.left,r.top):s.drawImage(t))):console.warn("image is empty")}},{key:"getBounds",value:function(t){var e,r,n;return this.bounds&&!t?this.bounds:(t={},n=this.getImage()||{width:0,height:0},r=(e=this.getLocation()).width||n.width,n=e.height||n.height,t.left=e.left,t.top=e.top,t.right=e.left+r,t.bottom=e.top+n,t.width=r,t.height=n,this.bounds=t)}},{key:"getLocation",value:function(){var t,e,r,n,i=this.getImage(),o=(o=s,t="getLocation",e=this,n=a(u(1&(r=3)?o.prototype:o),t,e),(2&r&&"function"==typeof n?function(t){return n.apply(e,t)}:n)([]));return o.width&&!o.height?o.height=o.width/i.width*i.height:o.height&&!o.width&&(o.width=o.height/i.height*i.width),o}},{key:"getImage",value:function(){var t=this,e=this.image||this.style.src||this.style.image;return this.__img&&this.__img.src&&-1!=this.__img.src.indexOf(e)||(e&&e.src?this.__img=e:"undefined"!=typeof document&&document.createElement?(this.__img=document.createElement("img"),this.__img.onload=function(){t.needUpdate=!0},e&&"string"==typeof e&&(this.__img.src=e)):this.graph.isWXMiniApp&&this.graph.canvas&&"string"==typeof e?(this.__img=this.graph.canvas.createImage(),this.__img.onload=function(){t.needUpdate=!0},this.__img.src=e):this.__img=e,this.__img&&(this.image=this.__img.src)),this.__img}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(t.jmControl)},{"../core/jmControl.js":2}],29:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmLabel=r.default=void 0;t=t("../core/jmControl.js");function o(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}function s(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?o(Object(i),!0).forEach(function(t){var e,r;e=n,r=i[t=t],(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(i,t))})}return n}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string");return"symbol"==i(t)?t:t+""}function l(t,e,r){e=p(e);var n=t,e=c()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function h(t,e,r,n){var i=f(p(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof i?function(t){return i.apply(r,t)}:i}function f(){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=((t,e)=>{for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t})(t,e);if(n)return(n=Object.getOwnPropertyDescriptor(n,e)).get?n.get.call(arguments.length<3?t:r):n.value}).apply(null,arguments)}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function y(t,e){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmLabel=r.default=(t=>{function r(t,e){if(this instanceof r)return(t=t||{}).isRegular=!0,(e=l(this,r,[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;throw new TypeError("Cannot call a class as a function")}var e,n=r;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&y(n,t),n=r,(t=[{key:"text",get:function(){return this.property("text")},set:function(t){return this.needUpdate=!0,this.property("text",t)}},{key:"center",get:function(){return this.property("center")},set:function(t){return this.needUpdate=!0,this.property("center",t)}},{key:"position",get:function(){return this.property("position")},set:function(t){return this.needUpdate=!0,this.property("position",t)}},{key:"getLocation",value:function(){var t=h(r,"getLocation",this,3)([]),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.webglControl?this.__size=this.webglControl.testSize(this.text,this.style):(this.context.save&&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.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),r=e.left+t.left,n=e.top+t.top;switch(this.style.textAlign){case"right":r+=e.width;break;case"center":r+=e.width/2}switch(this.style.textBaseline){case"bottom":n+=e.height;break;case"hanging":case"alphabetic":case"middle":n+=e.height/2}var i=this.text;void 0!==i&&(this.webglControl?(this.webglControl.draw(this.points,t),this.webglControl.drawText(i,r,n,e)):this.style.fill&&this.context.fillText?this.style.maxWidth?this.context.fillText(i,r,n,this.style.maxWidth):this.context.fillText(i,r,n):this.context.strokeText&&(this.style.maxWidth?this.context.strokeText(i,r,n,this.style.maxWidth):this.context.strokeText(i,r,n))),this.style.border&&(this.style.border.style&&(this.context.save&&this.context.save(),this.setStyle(this.style.border.style)),"2d"===this.mode?(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))):(i=[],this.style.border.top&&(i.push(this.points[0]),i.push(this.points[1])),this.style.border.right&&(i.push(s(s({},this.points[1]),{},{m:!0})),i.push(this.points[2])),this.style.border.bottom&&(i.push(s(s({},this.points[2]),{},{m:!0})),i.push(this.points[3])),this.style.border.left&&(i.push(s(s({},this.points[3]),{},{m:!0})),i.push(this.points[0])),i.length&&this.webglControl&&this.webglControl.stroke(i)))}},{key:"endDraw",value:function(){"2d"===this.mode&&h(r,"endDraw",this,3)([])}}])&&a(n.prototype,t),e&&a(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n})(t.jmControl)},{"../core/jmControl.js":2}],30:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmLine=r.default=void 0;t=t("../core/jmPath.js");function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function o(t,e,r){e=a(e);var n=t,e=s()?Reflect.construct(e,r||[],a(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(s=function(){return!!t})()}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmLine=r.default=(t=>{function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmLine",r=this,n=i;if(r instanceof n)return t.isRegular=!0,(r=o(this,i,[t,e])).start=t.start||{x:0,y:0},r.end=t.end||{x:0,y:0},r.style.lineType=r.style.lineType||"solid",r.style.dashLength=r.style.dashLength||4,r.style.close=!1,r;throw new TypeError("Cannot call a class as a function")}var e,r=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&u(r,t),r=i,(t=[{key:"start",get:function(){return this.property("start")},set:function(t){return this.needUpdate=!0,this.property("start",t)}},{key:"end",get:function(){return this.property("end")},set:function(t){return this.needUpdate=!0,this.property("end",t)}},{key:"initPoints",value:function(){var t=this.start,e=this.end;if(this.points=[],this.points.push(t),"dotted"===this.style.lineType)for(var r=e.x-t.x,n=e.y-t.y,i=Math.sqrt(r*r+n*n),o=(r/=i,n/=i,!1),s=this.style.dashLength||5,a=s/2,u=s;u<=i;){var l={x:t.x+r*u,y:t.y+n*u};!1===o?u+=a:(l.m=!0,u+=s),this.points.push(l),o=!o}return this.points.push(e),this.points}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(t.jmPath)},{"../core/jmPath.js":8}],31:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmPrismatic=r.default=void 0;t=t("../core/jmPath.js");function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function o(t,e,r){e=a(e);var n=t,e=s()?Reflect.construct(e,r||[],a(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(s=function(){return!!t})()}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmPrismatic=r.default=(t=>{function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmPrismatic",r=this,n=i;if(r instanceof n)return t.isRegular=!0,(r=o(this,i,[t,e])).style.close=void 0===r.style.close||r.style.close,r.center=t.center||{x:0,y:0},r.width=t.width||0,r.height=t.height||0,r;throw new TypeError("Cannot call a class as a function")}var e,r=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&u(r,t),r=i,(t=[{key:"center",get:function(){return this.property("center")},set:function(t){return this.needUpdate=!0,this.property("center",t)}},{key:"initPoints",value:function(){var t=this.getLocation(),e=t.width/2,r=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+r}),this.points.push({x:t.center.x+e,y:t.center.y}),this.points.push({x:t.center.x,y:t.center.y-r})}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(t.jmPath)},{"../core/jmPath.js":8}],32:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmRect=r.default=void 0;var n=t("../core/jmPath.js"),c=t("./jmArc.js"),h=t("./jmLine.js");function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function s(t,e,r){e=u(e);var n=t,e=a()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(a=function(){return!!t})()}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmRect=r.default=(t=>{function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmRect",r=this,n=i;if(r instanceof n)return(t=t||{}).isRegular=!0,(r=s(this,i,[t,e])).style.close=!0,r.radius=t.radius||r.style.radius||0,r;throw new TypeError("Cannot call a class as a function")}var e,r=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&l(r,t),r=i,(t=[{key:"radius",get:function(){return this.property("radius")},set:function(t){return this.needUpdate=!0,this.property("radius",t)}},{key:"position",get:function(){return this.property("position")},set:function(t){return this.needUpdate=!0,this.property("position",t)}},{key:"getBounds",value:function(t){var e;return this.bounds&&!t?this.bounds:(t={},this.initPoints(),e=this.getLocation(),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,this.bounds=t)}},{key:"initPoints",value:function(){var t,e,r,n,i,o=this.getLocation(),s={x:o.left,y:o.top},a={x:o.left+o.width,y:o.top},u={x:o.left+o.width,y:o.top+o.height},l={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,(r=this.graph.createShape(c.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:o.left+o.radius,y:o.top+o.radius},r.startAngle=Math.PI,r.endAngle=Math.PI+t,e=r.initPoints(),(r=this.graph.createShape(c.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:a.x-o.radius,y:a.y+o.radius},r.startAngle=Math.PI+t,r.endAngle=2*Math.PI,n=r.initPoints(),(r=this.graph.createShape(c.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:u.x-o.radius,y:u.y-o.radius},r.startAngle=0,r.endAngle=t,i=r.initPoints(),(r=this.graph.createShape(c.jmArc,{radius:o.radius,anticlockwise:!1})).center={x:l.x+o.radius,y:l.y-o.radius},r.startAngle=t,r.endAngle=Math.PI,o=r.initPoints(),this.points=e.concat(n,i,o)):(this.points=[],this.points.push(s),this.dottedLine&&(this.dottedLine.start=s,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=u,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(u),this.dottedLine&&(this.dottedLine.start=u,this.dottedLine.end=l,this.points=this.points.concat(this.dottedLine.initPoints())),this.points.push(l),this.dottedLine&&(this.dottedLine.start=l,this.dottedLine.end=s,this.points=this.points.concat(this.dottedLine.initPoints()))),this.points}}])&&o(r.prototype,t),e&&o(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(n.jmPath)},{"../core/jmPath.js":8,"./jmArc.js":22,"./jmLine.js":30}],33:[function(t,e,r){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(r,"__esModule",{value:!0}),r.jmResize=r.default=void 0;var o=t("./jmRect.js");function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(t=>(t=((t,e)=>{if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=i(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==i(t)?t:t+""))(n.key),n)}}function s(t,e,r){e=u(e);var n=t,e=a()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r);if(!e||"object"!=i(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=n))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(a=function(){return!!t})()}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r.jmResize=r.default=(t=>{function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"jmResize",r=this,n=i;if(r instanceof n)return(t=t||{}).isRegular=!0,(r=s(this,i,[t,e])).resizable=!1!==t.resizable,r.movable=t.movable,r.rectSize=t.rectSize||8,r.style.close=r.style.close||!0,r.rectCursors=["w-resize","nw-resize","n-resize","ne-resize","e-resize","se-resize","s-resize","sw-resize"],r.init(t),r;throw new TypeError("Cannot call a class as a function")}var e,r=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&l(r,t),r=i,(t=[{key:"rectSize",get:function(){return this.property("rectSize")},set:function(t){return this.property("rectSize",t)}},{key:"resizable",get:function(){return this.property("resizable")},set:function(t){return this.property("resizable",t)}},{key:"init",value:function(t){if(!1!==this.resizable){this.resizeRects=[];var e=this.rectSize,r=this.style.rectStyle||{stroke:"red",fill:"transparent",lineWidth:2,close:!0,zIndex:100};r.close=!0,r.fill=r.fill||"transparent";for(var n=0;n<8;n++){var i=(this.graph||t.graph).createShape(o.jmRect,{position:{x:0,y:0},width:e,height:e,style:r,interactive:!0});i.index=n,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,r=0,n=0,i=0;0==this.index?(n=-t.offsetX,e=t.offsetX):1==this.index?(n=-t.offsetX,e=t.offsetX,i=-t.offsetY,r=t.offsetY):2==this.index?(i=-t.offsetY,r=t.offsetY):3==this.index?(n=t.offsetX,i=-t.offsetY,r=t.offsetY):4==this.index?n=t.offsetX:5==this.index?(n=t.offsetX,i=t.offsetY):6==this.index?i=t.offsetY:7==this.index&&(n=-t.offsetX,n=-t.offsetX,e=t.offsetX,i=t.offsetY),this.parent.reset(e,r,n,i),this.needUpdate=!0}),e.bind("mousemove",function(){var t=this.parent.getRotation(),e=this.parent.rectCursors[this.index],t=t&&t.angle?this.graph.utils.rotatePoints(this.graph.utils.clone(this.position),t,t.angle):this.position,r=this.parent.width/2,n=this.parent.height/2,n=(this.rotationAngleByCenter=Math.atan((t.y-n)/(t.x-r)),Math.atan(n/r)/2),i=2*n+Math.PI/4;t.x<r?this.rotationAngleByCenter>=-n&&this.rotationAngleByCenter<=n?e=this.parent.rectCursors[0]:this.rotationAngleByCenter>n&&this.rotationAngleByCenter<i?e=this.parent.rectCursors[1]:this.rotationAngleByCenter>=i?e=this.parent.rectCursors[2]:this.rotationAngleByCenter<=-n&&this.rotationAngleByCenter>-i?e=this.parent.rectCursors[7]:this.rotationAngleByCenter<=-i&&(e=this.parent.rectCursors[6]):this.rotationAngleByCenter>=-n&&this.rotationAngleByCenter<=n?e=this.parent.rectCursors[4]:this.rotationAngleByCenter>n&&this.rotationAngleByCenter<i?e=this.parent.rectCursors[5]:this.rotationAngleByCenter>=i?e=this.parent.rectCursors[6]:this.rotationAngleByCenter<=-n&&this.rotationAngleByCenter>-i?e=this.parent.rectCursors[3]:this.rotationAngleByCenter<=-i&&(e=this.parent.rectCursors[2]),this.cursor=e}),e.bind("mouseleave",function(){this.cursor="default"})}}},{key:"reset",value:function(t,e,r,n){var i,o,s,a=void 0===this.style.minWidth?5:this.style.minWidth,u=void 0===this.style.minHeight?5:this.style.minHeight,l=this.getLocation();for(s in(0!=r||0!=n)&&(i=l.width+r,o=l.height+n,a<=i||u<=o)&&(a<=i?this.width=i:r=t=0,u<=o?this.height=o:n=e=0,!1!==this.movable&&(t||e)&&((a=this.position).x=l.left+t,a.y=l.top+e,this.position=a),this.emit("resize",t,e,r,n)),this.resizeRects){var c=this.resizeRects[s];switch(c.index){case 0:c.position.x=-c.width/2,c.position.y=(l.height-c.height)/2;break;case 1:c.position.x=-c.width/2,c.position.y=-c.height/2;break;case 2:c.position.x=(l.width-c.width)/2,c.position.y=-c.height/2;break;case 3:c.position.x=l.width-c.width/2,c.position.y=-c.height/2;break;case 4:c.position.x=l.width-c.width/2,c.position.y=(l.height-c.height)/2;break;case 5:c.position.x=l.width-c.width/2,c.position.y=l.height-c.height/2;break;case 6:c.position.x=(l.width-c.height)/2,c.position.y=l.height-c.height/2;break;case 7:c.position.x=-c.width/2,c.position.y=l.height-c.height/2}}}}])&&n(r.prototype,t),e&&n(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r})(o.jmRect)},{"./jmRect.js":32}]},{},[1])(1);return i.jmGraph=n},"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);
|