var lcjs=function(t){"use strict"; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var i=function(t,n){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])})(t,n)};function n(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}i(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}var e=function(){return(e=Object.assign||function(t){for(var i,n=1,e=arguments.length;n0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(t,i){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var e,r,s=n.call(t),o=[];try{for(;(void 0===i||i-- >0)&&!(e=s.next()).done;)o.push(e.value)}catch(t){r={error:t}}finally{try{e&&!e.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o}function u(t,i,n){if(n||2===arguments.length)for(var e,r=0,s=i.length;r0&&t.forEach((function(t){i.push(l(t.position,t.high)),n.push(l(t.position,t.low))})),[i,n]},b=function(t,i){return{min:t,max:i}},g=function(t,i,n,e){return{x:Math.ceil(t),y:Math.ceil(i),width:Math.ceil(n),height:Math.ceil(e)}},w=function(t,i){return void 0===i&&(i=!0),new f(t,i)},p=function(t,i,n,e){return void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===e&&(e=0),{left:t,top:i,right:n,bottom:e}},k=p,x=function(t,i){return{left:void 0!==i.left?i.left:t.left,top:void 0!==i.top?i.top:t.top,right:void 0!==i.right?i.right:t.right,bottom:void 0!==i.bottom?i.bottom:t.bottom}};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)}var A=32,F=31,T={};function C(t){t&&(t.value=!0)}function B(){}function L(t){return void 0===t.size&&(t.size=t._(O)),t.size}function I(t,i){if("number"!=typeof i){var n=i>>>0;if(""+n!==i||4294967295===n)return NaN;i=n}return i<0?L(t)+i:i}function O(){return!0}function P(t,i,n){return(0===t&&!z(t)||void 0!==n&&t<=-n)&&(void 0===i||void 0!==n&&i>=n)}function D(t,i){return R(t,i,0)}function _(t,i){return R(t,i,i)}function R(t,i,n){return void 0===t?n:z(t)?i===1/0?i:0|Math.max(0,i+t):void 0===i||i===t?t:0|Math.min(i,t)}function z(t){return t<0||0===t&&1/t==-1/0}var E="@@__IMMUTABLE_ITERABLE__@@";function N(t){return Boolean(t&&t[E])}var V="@@__IMMUTABLE_KEYED__@@";function G(t){return Boolean(t&&t[V])}var H="@@__IMMUTABLE_INDEXED__@@";function j(t){return Boolean(t&&t[H])}function W(t){return G(t)||j(t)}var U=function(t){return N(t)?t:vt(t)},Y=function(t){function i(t){return G(t)?t:yt(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i}(U),X=function(t){function i(t){return j(t)?t:St(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i}(U),Z=function(t){function i(t){return N(t)&&!W(t)?t:mt(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i}(U);U.Keyed=Y,U.Indexed=X,U.Set=Z;var K="@@__IMMUTABLE_SEQ__@@";function q(t){return Boolean(t&&t[K])}var J="@@__IMMUTABLE_RECORD__@@";function Q(t){return Boolean(t&&t[J])}function $(t){return N(t)||Q(t)}var tt="@@__IMMUTABLE_ORDERED__@@";function it(t){return Boolean(t&&t[tt])}var nt="function"==typeof Symbol&&Symbol.iterator,et="@@iterator",rt=nt||et,st=function(t){this.next=t};function ot(t,i,n,e){var r=0===t?i:1===t?n:[i,n];return e?e.value=r:e={value:r,done:!1},e}function ht(){return{value:void 0,done:!0}}function ut(t){return!!ct(t)}function at(t){return t&&"function"==typeof t.next}function ft(t){var i=ct(t);return i&&i.call(t)}function ct(t){var i=t&&(nt&&t[nt]||t["@@iterator"]);if("function"==typeof i)return i}st.prototype.toString=function(){return"[Iterator]"},st.KEYS=0,st.VALUES=1,st.ENTRIES=2,st.prototype.inspect=st.prototype.toSource=function(){return this.toString()},st.prototype[rt]=function(){return this};var lt=Object.prototype.hasOwnProperty;function dt(t){return!(!Array.isArray(t)&&"string"!=typeof t)||t&&"object"===M(t)&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var vt=function(t){function i(t){return null==t?kt():$(t)?t.toSeq():function(t){var i=At(t);if(i)return i;if("object"===M(t))return new gt(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.toSeq=function(){return this},i.prototype.toString=function(){return this.R("Seq {","}")},i.prototype.cacheResult=function(){return!this.N&&this.V&&(this.N=this.entrySeq().toArray(),this.size=this.N.length),this},i.prototype._=function(t,i){var n=this.N;if(n){for(var e=n.length,r=0;r!==e;){var s=n[i?e-++r:r++];if(!1===t(s[1],s[0],this))break}return r}return this.V(t,i)},i.prototype.G=function(t,i){var n=this.N;if(n){var e=n.length,r=0;return new st((function(){if(r===e)return{value:void 0,done:!0};var s=n[i?e-++r:r++];return ot(t,s[0],s[1])}))}return this.H(t,i)},i}(U),yt=function(t){function i(t){return null==t?kt().toKeyedSeq():N(t)?G(t)?t.toSeq():t.fromEntrySeq():Q(t)?t.toSeq():xt(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.toKeyedSeq=function(){return this},i}(vt),St=function(t){function i(t){return null==t?kt():N(t)?G(t)?t.entrySeq():t.toIndexedSeq():Q(t)?t.toSeq().entrySeq():Mt(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){return i(arguments)},i.prototype.toIndexedSeq=function(){return this},i.prototype.toString=function(){return this.R("Seq [","]")},i}(vt),mt=function(t){function i(t){return(N(t)&&!W(t)?t:St(t)).toSetSeq()}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){return i(arguments)},i.prototype.toSetSeq=function(){return this},i}(vt);vt.isSeq=q,vt.Keyed=yt,vt.Set=mt,vt.Indexed=St,vt.prototype[K]=!0;var bt=function(t){function i(t){this.j=t,this.size=t.length}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.get=function(t,i){return this.has(t)?this.j[I(this,t)]:i},i.prototype._=function(t,i){for(var n=this.j,e=n.length,r=0;r!==e;){var s=i?e-++r:r++;if(!1===t(n[s],s,this))break}return r},i.prototype.G=function(t,i){var n=this.j,e=n.length,r=0;return new st((function(){if(r===e)return{value:void 0,done:!0};var s=i?e-++r:r++;return ot(t,s,n[s])}))},i}(St),gt=function(t){function i(t){var i=Object.keys(t);this.W=t,this.U=i,this.size=i.length}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.get=function(t,i){return void 0===i||this.has(t)?this.W[t]:i},i.prototype.has=function(t){return lt.call(this.W,t)},i.prototype._=function(t,i){for(var n=this.W,e=this.U,r=e.length,s=0;s!==r;){var o=e[i?r-++s:s++];if(!1===t(n[o],o,this))break}return s},i.prototype.G=function(t,i){var n=this.W,e=this.U,r=e.length,s=0;return new st((function(){if(s===r)return{value:void 0,done:!0};var o=e[i?r-++s:s++];return ot(t,o,n[o])}))},i}(yt);gt.prototype[tt]=!0;var wt,pt=function(t){function i(t){this.Y=t,this.size=t.length||t.size}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.V=function(t,i){if(i)return this.cacheResult()._(t,i);var n=ft(this.Y),e=0;if(at(n))for(var r;!(r=n.next()).done&&!1!==t(r.value,e++,this););return e},i.prototype.H=function(t,i){if(i)return this.cacheResult().G(t,i);var n=ft(this.Y);if(!at(n))return new st(ht);var e=0;return new st((function(){var i=n.next();return i.done?i:ot(t,e++,i.value)}))},i}(St);function kt(){return wt||(wt=new bt([]))}function xt(t){var i=Array.isArray(t)?new bt(t):ut(t)?new pt(t):void 0;if(i)return i.fromEntrySeq();if("object"===M(t))return new gt(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function Mt(t){var i=At(t);if(i)return i;throw new TypeError("Expected Array or collection object of values: "+t)}function At(t){return dt(t)?new bt(t):ut(t)?new pt(t):void 0}var Ft="@@__IMMUTABLE_MAP__@@";function Tt(t){return Boolean(t&&t[Ft])}function Ct(t){return Tt(t)&&it(t)}function Bt(t){return Boolean(t&&"function"==typeof t.equals&&"function"==typeof t.hashCode)}function Lt(t,i){if(t===i||t!=t&&i!=i)return!0;if(!t||!i)return!1;if("function"==typeof t.valueOf&&"function"==typeof i.valueOf){if((t=t.valueOf())===(i=i.valueOf())||t!=t&&i!=i)return!0;if(!t||!i)return!1}return!!(Bt(t)&&Bt(i)&&t.equals(i))}var It="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,i){var n=65535&(t|=0),e=65535&(i|=0);return n*e+((t>>>16)*e+n*(i>>>16)<<16>>>0)|0};function Ot(t){return t>>>1&1073741824|3221225471&t}var Pt=Object.prototype.valueOf;function Dt(t){switch(M(t)){case"boolean":return t?1108378657:1108378656;case"number":return function(t){if(t!=t||t===1/0)return 0;var i=0|t;i!==t&&(i^=4294967295*t);for(;t>4294967295;)i^=t/=4294967295;return Ot(i)}(t);case"string":return t.length>Ht?function(t){var i=Ut[t];void 0===i&&(i=_t(t),Wt===jt&&(Wt=0,Ut={}),Wt++,Ut[t]=i);return i}(t):_t(t);case"object":case"function":return null===t?1108378658:"function"==typeof t.hashCode?Ot(t.hashCode(t)):(t.valueOf!==Pt&&"function"==typeof t.valueOf&&(t=t.valueOf(t)),function(t){var i;if(Nt&&void 0!==(i=Et.get(t)))return i;if(void 0!==(i=t[Gt]))return i;if(!zt){if(void 0!==(i=t.propertyIsEnumerable&&t.propertyIsEnumerable[Gt]))return i;if(void 0!==(i=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return i}i=++Vt,1073741824&Vt&&(Vt=0);if(Nt)Et.set(t,i);else{if(void 0!==Rt&&!1===Rt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(zt)Object.defineProperty(t,Gt,{enumerable:!1,configurable:!1,writable:!1,value:i});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[Gt]=i;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[Gt]=i}}return i}(t));case"undefined":return 1108378659;default:if("function"==typeof t.toString)return _t(t.toString());throw new Error("Value type "+M(t)+" cannot be hashed.")}}function _t(t){for(var i=0,n=0;n=0&&(a.get=function(i,n){return(i=I(this,i))>=0&&ih)return{value:void 0,done:!0};var t=r.next();return e||1===i||t.done?t:ot(i,u-1,0===i?void 0:t.value[1],t)}))},a}function ii(t,i,n,e){var r=ci(t);return r.V=function(r,s){var o=this;if(s)return this.cacheResult()._(r,s);var h=!0,u=0;return t._((function(t,s,a){if(!h||!(h=i.call(n,t,s,a)))return u++,r(t,e?s:u-1,o)})),u},r.H=function(r,s){var o=this;if(s)return this.cacheResult().G(r,s);var h=t.G(2,s),u=!0,a=0;return new st((function(){var t,s,f;do{if((t=h.next()).done)return e||1===r?t:ot(r,a++,0===r?void 0:t.value[1],t);var c=t.value;s=c[0],f=c[1],u&&(u=i.call(n,f,s,o))}while(u);return 2===r?t:ot(r,s,f,t)}))},r}function ni(t,i){var n=G(t),e=[t].concat(i).map((function(t){return N(t)?n&&(t=Y(t)):t=n?xt(t):Mt(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===e.length)return t;if(1===e.length){var r=e[0];if(r===t||n&&G(r)||j(t)&&j(r))return r}var s=new bt(e);return n?s=s.toKeyedSeq():j(t)||(s=s.toSetSeq()),(s=s.flatten(!0)).size=e.reduce((function(t,i){if(void 0!==t){var n=i.size;if(void 0!==n)return t+n}}),0),s}function ei(t,i,n){var e=ci(t);return e.V=function(r,s){if(s)return this.cacheResult()._(r,s);var o=0,h=!1;return function t(u,a){u._((function(s,u){return(!i||a0}function hi(t,i,n,e){var r=ci(t),s=new bt(n).map((function(t){return t.size}));return r.size=e?s.max():s.min(),r._=function(t,i){for(var n,e=this.G(1,i),r=0;!(n=e.next()).done&&!1!==t(n.value,r++,this););return r},r.H=function(t,r){var s=n.map((function(t){return t=U(t),ft(r?t.reverse():t)})),o=0,h=!1;return new st((function(){var n;return h||(n=s.map((function(t){return t.next()})),h=e?n.every((function(t){return t.done})):n.some((function(t){return t.done}))),h?{value:void 0,done:!0}:ot(t,o++,i.apply(null,n.map((function(t){return t.value}))))}))},r}function ui(t,i){return t===i?t:q(t)?i:t.constructor(i)}function ai(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function fi(t){return G(t)?Y:j(t)?X:Z}function ci(t){return Object.create((G(t)?yt:j(t)?St:mt).prototype)}function li(){return this.X.cacheResult?(this.X.cacheResult(),this.size=this.X.size,this):vt.prototype.cacheResult.call(this)}function di(t,i){return void 0===t&&void 0===i?0:void 0===t?1:void 0===i?-1:t>i?1:t0;)i[n]=arguments[n+1];if("function"!=typeof t)throw new TypeError("Invalid merger function: "+t);return Ii(this,i,t)}function Ii(t,i,n){for(var e=[],r=0;r0;)i[n]=arguments[n+1];return Oi(this,i,t)}function Ri(t){for(var i=[],n=arguments.length-1;n-- >0;)i[n]=arguments[n+1];return ki(this,t,tn(),(function(t){return Pi(t,i)}))}function zi(t){for(var i=[],n=arguments.length-1;n-- >0;)i[n]=arguments[n+1];return ki(this,t,tn(),(function(t){return Oi(t,i)}))}function Ei(t){var i=this.asMutable();return t(i),i.wasAltered()?i.q(this.K):this}function Ni(){return this.K?this:this.q(new B)}function Vi(){return this.q()}function Gi(){return this.J}Xt.prototype.cacheResult=Yt.prototype.cacheResult=Zt.prototype.cacheResult=Kt.prototype.cacheResult=li;var Hi=function(t){function i(i){return null==i?tn():Tt(i)&&!it(i)?i:tn().withMutations((function(n){var e=t(i);Si(e.size),e.forEach((function(t,i){return n.set(i,t)}))}))}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];return tn().withMutations((function(i){for(var n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);i.set(t[n],t[n+1])}}))},i.prototype.toString=function(){return this.R("Map {","}")},i.prototype.get=function(t,i){return this.$?this.$.get(0,void 0,t,i):i},i.prototype.set=function(t,i){return nn(this,t,i)},i.prototype.remove=function(t){return nn(this,t,T)},i.prototype.deleteAll=function(t){var i=U(t);return 0===i.size?this:this.withMutations((function(t){i.forEach((function(i){return t.remove(i)}))}))},i.prototype.clear=function(){return 0===this.size?this:this.K?(this.size=0,this.$=null,this.tt=void 0,this.J=!0,this):tn()},i.prototype.sort=function(t){return Tn(ri(this,t))},i.prototype.sortBy=function(t,i){return Tn(ri(this,i,t))},i.prototype.map=function(t,i){return this.withMutations((function(n){n.forEach((function(e,r){n.set(r,t.call(i,e,r,n))}))}))},i.prototype.G=function(t,i){return new qi(this,t,i)},i.prototype._=function(t,i){var n=this,e=0;return this.$&&this.$.iterate((function(i){return e++,t(i[1],i[0],n)}),i),e},i.prototype.q=function(t){return t===this.K?this:t?$i(this.size,this.$,t,this.tt):0===this.size?tn():(this.K=t,this.J=!1,this)},i}(Y);Hi.isMap=Tt;var ji=Hi.prototype;ji[Ft]=!0,ji.delete=ji.remove,ji.removeAll=ji.deleteAll,ji.setIn=Mi,ji.removeIn=ji.deleteIn=Ai,ji.update=Ti,ji.updateIn=Ci,ji.merge=ji.concat=Bi,ji.mergeWith=Li,ji.mergeDeep=Di,ji.mergeDeepWith=_i,ji.mergeIn=Ri,ji.mergeDeepIn=zi,ji.withMutations=Ei,ji.wasAltered=Gi,ji.asImmutable=Vi,ji["@@transducer/init"]=ji.asMutable=Ni,ji["@@transducer/step"]=function(t,i){return t.set(i[0],i[1])},ji["@@transducer/result"]=function(t){return t.asImmutable()};var Wi=function(t,i){this.ownerID=t,this.entries=i};Wi.prototype.get=function(t,i,n,e){for(var r=this.entries,s=0,o=r.length;s=un)return function(t,i,n,e){t||(t=new B);for(var r=new Zi(t,Dt(n),[n,e]),s=0;s>>t)&F),s=this.bitmap;return 0==(s&r)?e:this.nodes[on(s&r-1)].get(t+5,i,n,e)},Ui.prototype.update=function(t,i,n,e,r,s,o){void 0===n&&(n=Dt(e));var h=(0===i?n:n>>>i)&F,u=1<=an)return function(t,i,n,e,r){for(var s=0,o=new Array(A),h=0;0!==n;h++,n>>>=1)o[h]=1&n?i[s++]:void 0;return o[e]=r,new Yi(t,s+1,o)}(t,l,a,h,v);if(f&&!v&&2===l.length&&rn(l[1^c]))return l[1^c];if(f&&v&&1===l.length&&rn(v))return v;var y=t&&t===this.ownerID,S=f?v?a:a^u:a|u,m=f?v?hn(l,c,v,y):function(t,i,n){var e=t.length-1;if(n&&i===e)return t.pop(),t;for(var r=new Array(e),s=0,o=0;o>>t)&F,s=this.nodes[r];return s?s.get(t+5,i,n,e):e},Yi.prototype.update=function(t,i,n,e,r,s,o){void 0===n&&(n=Dt(e));var h=(0===i?n:n>>>i)&F,u=r===T,a=this.nodes,f=a[h];if(u&&!f)return this;var c=en(f,t,i+5,n,e,r,s,o);if(c===f)return this;var l=this.count;if(f){if(!c&&--l>>n)&F,h=(0===n?e:e>>>n)&F,u=o===h?[sn(t,i,n+5,e,r)]:(s=new Zi(i,e,r),o>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function hn(t,i,n,e){var r=e?t:vi(t);return r[i]=n,r}var un=8,an=16,fn=8,cn="@@__IMMUTABLE_LIST__@@";function ln(t){return Boolean(t&&t[cn])}var dn=function(t){function i(i){var n=wn();if(null==i)return n;if(ln(i))return i;var e=t(i),r=e.size;return 0===r?n:(Si(r),r>0&&r=0&&t=t.size||i<0)return t.withMutations((function(t){i<0?Mn(t,i).set(0,n):Mn(t,0,i+1).set(i,n)}));i+=t.st;var e=t.ot,r=t.$,s={value:!1};i>=An(t.ht)?e=pn(e,t.K,0,i,n,s):r=pn(r,t.K,t.ut,i,n,s);if(!s.value)return t;if(t.K)return t.$=r,t.ot=e,t.tt=void 0,t.J=!0,t;return gn(t.st,t.ht,t.ut,r,e)}(this,t,i)},i.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},i.prototype.insert=function(t,i){return this.splice(t,0,i)},i.prototype.clear=function(){return 0===this.size?this:this.K?(this.size=this.st=this.ht=0,this.ut=5,this.$=this.ot=null,this.tt=void 0,this.J=!0,this):wn()},i.prototype.push=function(){var t=arguments,i=this.size;return this.withMutations((function(n){Mn(n,0,i+t.length);for(var e=0;e>>i&F;if(e>=this.array.length)return new yn([],t);var r,s=0===e;if(i>0){var o=this.array[e];if((r=o&&o.removeBefore(t,i-5,n))===o&&s)return this}if(s&&!r)return this;var h=kn(this,t);if(!s)for(var u=0;u>>i&F;if(r>=this.array.length)return this;if(i>0){var s=this.array[r];if((e=s&&s.removeAfter(t,i-5,n))===s&&r===this.array.length-1)return this}var o=kn(this,t);return o.array.splice(r+1),e&&(o.array[r]=e),o};var Sn,mn={};function bn(t,i){var n=t.st,e=t.ht,r=An(e),s=t.ot;return o(t.$,t.ut,0);function o(t,h,u){return 0===h?function(t,o){var h=o===r?s&&s.array:t&&t.array,u=o>n?0:n-o,a=e-o;a>A&&(a=A);return function(){if(u===a)return mn;var t=i?--a:u++;return h&&h[t]}}(t,u):function(t,r,s){var h,u=t&&t.array,a=s>n?0:n-s>>r,f=1+(e-s>>r);f>A&&(f=A);return function(){for(;;){if(h){var t=h();if(t!==mn)return t;h=null}if(a===f)return mn;var n=i?--f:a++;h=o(u&&u[n],r-5,s+(n<>>n&F,u=t&&h0){var a=t&&t.array[h],f=pn(a,i,n-5,e,r,s);return f===a?t:((o=kn(t,i)).array[h]=f,o)}return u&&t.array[h]===r?t:(s&&C(s),o=kn(t,i),void 0===r&&h===o.array.length-1?o.array.pop():o.array[h]=r,o)}function kn(t,i){return i&&t&&i===t.ownerID?t:new yn(t?t.array.slice():[],i)}function xn(t,i){if(i>=An(t.ht))return t.ot;if(i<1<0;)n=n.array[i>>>e&F],e-=5;return n}}function Mn(t,i,n){void 0!==i&&(i|=0),void 0!==n&&(n|=0);var e=t.K||new B,r=t.st,s=t.ht,o=r+i,h=void 0===n?s:n<0?s+n:r+n;if(o===r&&h===s)return t;if(o>=h)return t.clear();for(var u=t.ut,a=t.$,f=0;o+f<0;)a=new yn(a&&a.array.length?[void 0,a]:[],e),f+=1<<(u+=5);f&&(o+=f,r+=f,h+=f,s+=f);for(var c=An(s),l=An(h);l>=1<c?new yn([],e):d;if(d&&l>c&&o5;S-=5){var m=c>>>S&F;y=y.array[m]=kn(y.array[m],e)}y.array[c>>>5&F]=d}if(h=l)o-=l,h-=l,u=5,a=null,v=v&&v.removeBefore(e,0,o);else if(o>r||l>>u&F;if(b!==l>>>u&F)break;b&&(f+=(1<r&&(a=a.removeBefore(e,u,o-f)),a&&l>>5<<5}var Fn,Tn=function(t){function i(t){return null==t?Bn():Ct(t)?t:Bn().withMutations((function(i){var n=Y(t);Si(n.size),n.forEach((function(t,n){return i.set(n,t)}))}))}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){return this(arguments)},i.prototype.toString=function(){return this.R("OrderedMap {","}")},i.prototype.get=function(t,i){var n=this.ft.get(t);return void 0!==n?this.ct.get(n)[1]:i},i.prototype.clear=function(){return 0===this.size?this:this.K?(this.size=0,this.ft.clear(),this.ct.clear(),this):Bn()},i.prototype.set=function(t,i){return Ln(this,t,i)},i.prototype.remove=function(t){return Ln(this,t,T)},i.prototype.wasAltered=function(){return this.ft.wasAltered()||this.ct.wasAltered()},i.prototype._=function(t,i){var n=this;return this.ct._((function(i){return i&&t(i[1],i[0],n)}),i)},i.prototype.G=function(t,i){return this.ct.fromEntrySeq().G(t,i)},i.prototype.q=function(t){if(t===this.K)return this;var i=this.ft.q(t),n=this.ct.q(t);return t?Cn(i,n,t,this.tt):0===this.size?Bn():(this.K=t,this.ft=i,this.ct=n,this)},i}(Hi);function Cn(t,i,n,e){var r=Object.create(Tn.prototype);return r.size=t?t.size:0,r.ft=t,r.ct=i,r.K=n,r.tt=e,r}function Bn(){return Fn||(Fn=Cn(tn(),wn()))}function Ln(t,i,n){var e,r,s=t.ft,o=t.ct,h=s.get(i),u=void 0!==h;if(n===T){if(!u)return t;o.size>=A&&o.size>=2*s.size?(e=(r=o.filter((function(t,i){return void 0!==t&&h!==i}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.K&&(e.K=r.K=t.K)):(e=s.remove(i),r=h===o.size-1?o.pop():o.set(h,void 0))}else if(u){if(n===o.get(h)[1])return t;e=s,r=o.set(h,[i,n])}else e=s.set(i,o.size),r=o.set(o.size,[i,n]);return t.K?(t.size=e.size,t.ft=e,t.ct=r,t.tt=void 0,t):Cn(e,r)}Tn.isOrderedMap=Ct,Tn.prototype[tt]=!0,Tn.prototype.delete=Tn.prototype.remove;var In="@@__IMMUTABLE_STACK__@@";function On(t){return Boolean(t&&t[In])}var Pn=function(t){function i(t){return null==t?zn():On(t)?t:zn().pushAll(t)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){return this(arguments)},i.prototype.toString=function(){return this.R("Stack [","]")},i.prototype.get=function(t,i){var n=this.dt;for(t=I(this,t);n&&t--;)n=n.next;return n?n.value:i},i.prototype.peek=function(){return this.dt&&this.dt.value},i.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var i=this.size+arguments.length,n=this.dt,e=arguments.length-1;e>=0;e--)n={value:t[e],next:n};return this.K?(this.size=i,this.dt=n,this.tt=void 0,this.J=!0,this):Rn(i,n)},i.prototype.pushAll=function(i){if(0===(i=t(i)).size)return this;if(0===this.size&&On(i))return i;Si(i.size);var n=this.size,e=this.dt;return i._((function(t){n++,e={value:t,next:e}}),!0),this.K?(this.size=n,this.dt=e,this.tt=void 0,this.J=!0,this):Rn(n,e)},i.prototype.pop=function(){return this.slice(1)},i.prototype.clear=function(){return 0===this.size?this:this.K?(this.size=0,this.dt=void 0,this.tt=void 0,this.J=!0,this):zn()},i.prototype.slice=function(i,n){if(P(i,n,this.size))return this;var e=D(i,this.size);if(_(n,this.size)!==this.size)return t.prototype.slice.call(this,i,n);for(var r=this.size-e,s=this.dt;e--;)s=s.next;return this.K?(this.size=r,this.dt=s,this.tt=void 0,this.J=!0,this):Rn(r,s)},i.prototype.q=function(t){return t===this.K?this:t?Rn(this.size,this.dt,t,this.tt):0===this.size?zn():(this.K=t,this.J=!1,this)},i.prototype._=function(t,i){var n=this;if(i)return new bt(this.toArray())._((function(i,e){return t(i,e,n)}),i);for(var e=0,r=this.dt;r&&!1!==t(r.value,e++,this);)r=r.next;return e},i.prototype.G=function(t,i){if(i)return new bt(this.toArray()).G(t,i);var n=0,e=this.dt;return new st((function(){if(e){var i=e.value;return e=e.next,ot(t,n++,i)}return{value:void 0,done:!0}}))},i}(X);Pn.isStack=On;var Dn,_n=Pn.prototype;function Rn(t,i,n,e){var r=Object.create(_n);return r.size=t,r.dt=i,r.K=n,r.tt=e,r.J=!1,r}function zn(){return Dn||(Dn=Rn(0))}_n[In]=!0,_n.shift=_n.pop,_n.unshift=_n.push,_n.unshiftAll=_n.pushAll,_n.withMutations=Ei,_n.wasAltered=Gi,_n.asImmutable=Vi,_n["@@transducer/init"]=_n.asMutable=Ni,_n["@@transducer/step"]=function(t,i){return t.unshift(i)},_n["@@transducer/result"]=function(t){return t.asImmutable()};var En="@@__IMMUTABLE_SET__@@";function Nn(t){return Boolean(t&&t[En])}function Vn(t){return Nn(t)&&it(t)}function Gn(t,i){if(t===i)return!0;if(!N(i)||void 0!==t.size&&void 0!==i.size&&t.size!==i.size||void 0!==t.tt&&void 0!==i.tt&&t.tt!==i.tt||G(t)!==G(i)||j(t)!==j(i)||it(t)!==it(i))return!1;if(0===t.size&&0===i.size)return!0;var n=!W(t);if(it(t)){var e=t.entries();return i.every((function(t,i){var r=e.next().value;return r&&Lt(r[1],t)&&(n||Lt(r[0],i))}))&&e.next().done}var r=!1;if(void 0===t.size)if(void 0===i.size)"function"==typeof t.cacheResult&&t.cacheResult();else{r=!0;var s=t;t=i,i=s}var o=!0,h=i._((function(i,e){if(n?!t.has(i):r?!Lt(i,t.get(e,T)):!Lt(t.get(e,T),i))return o=!1,!1}));return o&&t.size===h}function Hn(t,i){var n=function(n){t.prototype[n]=i[n]};return Object.keys(i).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(i).forEach(n),t}function jn(t){if(!t||"object"!==M(t))return t;if(!N(t)){if(!bi(t))return t;t=vt(t)}if(G(t)){var i={};return t._((function(t,n){i[n]=jn(t)})),i}var n=[];return t._((function(t){n.push(jn(t))})),n}var Wn=function(t){function i(i){return null==i?Kn():Nn(i)&&!it(i)?i:Kn().withMutations((function(n){var e=t(i);Si(e.size),e.forEach((function(t){return n.add(t)}))}))}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){return this(arguments)},i.fromKeys=function(t){return this(Y(t).keySeq())},i.intersect=function(t){return(t=U(t).toArray()).length?Yn.intersect.apply(i(t.pop()),t):Kn()},i.union=function(t){return(t=U(t).toArray()).length?Yn.union.apply(i(t.pop()),t):Kn()},i.prototype.toString=function(){return this.R("Set {","}")},i.prototype.has=function(t){return this.ft.has(t)},i.prototype.add=function(t){return Xn(this,this.ft.set(t,t))},i.prototype.remove=function(t){return Xn(this,this.ft.remove(t))},i.prototype.clear=function(){return Xn(this,this.ft.clear())},i.prototype.map=function(t,i){var n=this,e=[],r=[];return this.forEach((function(s){var o=t.call(i,s,s,n);o!==s&&(e.push(s),r.push(o))})),this.withMutations((function(t){e.forEach((function(i){return t.remove(i)})),r.forEach((function(i){return t.add(i)}))}))},i.prototype.union=function(){for(var i=[],n=arguments.length;n--;)i[n]=arguments[n];return 0===(i=i.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.K||1!==i.length?this.withMutations((function(n){for(var e=0;e=0&&i=0&&n>>-15,461845907),i=It(i<<13|i>>>-13,5),i=It((i=(i+3864292196|0)^t)^i>>>16,2246822507),i=Ot((i=It(i^i>>>13,3266489909))^i>>>16)}(t._(n?i?function(t,i){e=31*e+ce(Dt(t),Dt(i))|0}:function(t,i){e=e+ce(Dt(t),Dt(i))|0}:i?function(t){e=31*e+Dt(t)|0}:function(t){e=e+Dt(t)|0}),e)}(this))}});var ie=U.prototype;ie[E]=!0,ie[rt]=ie.values,ie.toJSON=ie.toArray,ie.kt=gi,ie.inspect=ie.toSource=function(){return this.toString()},ie.chain=ie.flatMap,ie.contains=ie.includes,Hn(Y,{flip:function(){return ui(this,qt(this))},mapEntries:function(t,i){var n=this,e=0;return ui(this,this.toSeq().map((function(r,s){return t.call(i,[s,r],e++,n)})).fromEntrySeq())},mapKeys:function(t,i){var n=this;return ui(this,this.toSeq().flip().map((function(e,r){return t.call(i,e,r,n)})).flip())}});var ne=Y.prototype;ne[V]=!0,ne[rt]=ie.entries,ne.toJSON=te,ne.kt=function(t,i){return gi(i)+": "+gi(t)},Hn(X,{toKeyedSeq:function(){return new Yt(this,!1)},filter:function(t,i){return ui(this,$t(this,t,i,!1))},findIndex:function(t,i){var n=this.findEntry(t,i);return n?n[0]:-1},indexOf:function(t){var i=this.keyOf(t);return void 0===i?-1:i},lastIndexOf:function(t){var i=this.lastKeyOf(t);return void 0===i?-1:i},reverse:function(){return ui(this,Qt(this,!1))},slice:function(t,i){return ui(this,ti(this,t,i,!1))},splice:function(t,i){var n=arguments.length;if(i=Math.max(i||0,0),0===n||2===n&&!i)return this;t=D(t,t<0?this.count():this.size);var e=this.slice(0,t);return ui(this,1===n?e:e.concat(vi(arguments,2),this.slice(t+i)))},findLastIndex:function(t,i){var n=this.findLastEntry(t,i);return n?n[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return ui(this,ei(this,t,!1))},get:function(t,i){return(t=I(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?i:this.find((function(i,n){return n===t}),void 0,i)},has:function(t){return(t=I(this,t))>=0&&(void 0!==this.size?this.size===1/0||ti?-1:0}function ce(t,i){return t^i+2654435769+(t<<6)+(t>>2)|0}ee[H]=!0,ee[tt]=!0,Hn(Z,{get:function(t,i){return this.has(t)?t:i},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),Z.prototype.has=ie.includes,Z.prototype.contains=Z.prototype.includes,Hn(yt,Y.prototype),Hn(St,X.prototype),Hn(mt,Z.prototype);var le=function(t){function i(t){return null==t?Se():Vn(t)?t:Se().withMutations((function(i){var n=Z(t);Si(n.size),n.forEach((function(t){return i.add(t)}))}))}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.of=function(){return this(arguments)},i.fromKeys=function(t){return this(Y(t).keySeq())},i.prototype.toString=function(){return this.R("OrderedSet {","}")},i}(Wn);le.isOrderedSet=Vn;var de,ve=le.prototype;function ye(t,i){var n=Object.create(ve);return n.size=t?t.size:0,n.ft=t,n.K=i,n}function Se(){return de||(de=ye(Bn()))}ve[tt]=!0,ve.zip=ee.zip,ve.zipWith=ee.zipWith,ve.yt=Se,ve.vt=ye;var me=function(t,i){var n,e=function(s){var o=this;if(s instanceof e)return s;if(!(this instanceof e))return new e(s);if(!n){n=!0;var h=Object.keys(t),u=r.xt={};r.Mt=i,r.U=h,r.At=t;for(var a=0;a0?[i[0].value,i[n-1].value]:[0,0],2),r=e[0],s=e[1],o=n>0?n-1:0,u=Array(o),a=0;a0&&r!==s}},De=function(t){function i(i){var n=Pe(i);return t.call(this,function(t,i){return{steps:t.steps,title:t.title,units:t.units,interpolate:t.interpolate,color:t.color,valueRangeMin:i.valueRangeMin,valueRangeMax:i.valueRangeMax,length:i.length,min:i.min,max:i.max,subranges:i.subranges,isValid:i.isValid}}(i,n))||this}return n(i,t),i.prototype.toString=function(){return"LUT:interpolate="+this.interpolate+",steps="+this.steps.map((function(t){return t.value+","+t.color.toString()})).join(",")},i.prototype.setSteps=function(t){return this.merge(Pe(e(e({},this),{steps:t})))},i.prototype.getSteps=function(){return this.get("steps")},i.prototype.setTitle=function(t){return this.set("title",t)},i.prototype.getTitle=function(){return this.get("title")},i.prototype.setUnits=function(t){return this.set("units",t)},i.prototype.getUnits=function(){return this.get("units")},i.prototype.setInterpolation=function(t){return this.set("interpolate",t)},i.prototype.getInterpolation=function(){return this.get("interpolate")},i.prototype.setFallbackColor=function(t){return this.set("color",t)},i.prototype.getFallbackColor=function(){return this.get("color")},i.prototype.getColors=function(t){if(Array.isArray(t)){if(Array.isArray(t[0])){for(var i=t,n=i.length,e=i[0].length,r=u([],h(Array(n))).map((function(){return Array(e)})),s=0;s=t.min.value&&e<=t.max.value})),u=h.min,a=h.max,f=this.isValid?(e-u.value)/(a.value-u.value):1;return this.interpolate?(r=u.color||this.color,s=a.color||this.color,o=f,new xe({r:r.r+(s.r-r.r)*o,g:r.g+(s.g-r.g)*o,b:r.b+(s.b-r.b)*o,a:r.a+(s.a-r.a)*o})):f>0?a.color||this.color:u.color||this.color},i}(Oe),_e=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.type="fillstyle",i}return n(i,t),i.prototype.getDefaultHighlightStyle=function(){return this},i.prototype.toString=function(){return"emptyFill"},i}(me({})),Re=new _e,ze=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.type="fillstyle",i}return n(i,t),i.prototype.getDefaultHighlightStyle=function(){return this.It||(this.It=this.createDefaultHighlightStyle()),this.It},i}(me({color:Ae(255,255,255)})),Ee=function(t){function i(i){return t.call(this,i)||this}return n(i,t),i.prototype.toString=function(){return"solidFill:"+this.color.toString()},i.prototype.setColor=function(t){return t instanceof xe?this.set("color",t):this.set("color",t(this.get("color")))},i.prototype.getColor=function(){return this.get("color")},i.prototype.setA=function(t){return this.setColor(this.getColor().setA(t))},i.prototype.setR=function(t){return this.setColor(this.getColor().setR(t))},i.prototype.setG=function(t){return this.setColor(this.getColor().setG(t))},i.prototype.setB=function(t){return this.setColor(this.getColor().setB(t))},i.prototype.createDefaultHighlightStyle=function(){return this.setColor(this.getColor().getHighlight())},i}(ze),Ne=function(t){function i(i){return t.call(this,i)||this}return n(i,t),i.prototype.toString=function(){return"individualPointFill:"+this.color.toString()},i.prototype.setFallbackColor=function(t){return t instanceof xe?this.set("color",t):this.set("color",t(this.get("color")))},i.prototype.getFallbackColor=function(){return this.get("color")},i.prototype.createDefaultHighlightStyle=function(){return this},i}(ze),Ve=function(t){function i(i){var n=t.call(this,i)||this;return n.type="fillstyle",n}return n(i,t),i.prototype.toString=function(){return"palettedFill:lut="+this.lut.toString()+",lookUpProperty="+this.lookUpProperty},i.prototype.getDefaultHighlightStyle=function(){return this},i.prototype.getPalette=function(){return this.get("lut")},i.prototype.setLookUpProperty=function(t){return"function"==typeof t?this.set("lookUpProperty",t(this.get("lookUpProperty"))):this.set("lookUpProperty",t)},i.prototype.getLookUpProperty=function(){return this.get("lookUpProperty")},i}(me({lut:new De({steps:[]}),lookUpProperty:"value"})),Ge=function(t,i){return(Ge=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])})(t,i)};function He(t){var i="function"==typeof Symbol&&t[Symbol.iterator],n=0;return i?i.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function je(t,i){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var e,r,s=n.call(t),o=[];try{for(;(void 0===i||i-- >0)&&!(e=s.next()).done;)o.push(e.value)}catch(t){r={error:t}}finally{try{e&&!e.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o}function We(){for(var t=[],i=0;ii?Math.min(Math.max(t,i),n):Math.min(Math.max(t,n),i)},Ir=function(t){return Array.prototype.concat.apply([],t)},Or=function(t,i){for(var n={x:t[0].length,y:t.length},e=n.x,r=n.y,s=i.column,o=i.row,h=Math.max(0,s.start),u=Math.min(e,s.end),a=Math.max(0,o.start),f=Math.min(r,o.end),c=u-h,l=f-a,d=Array.from(Array(l)).map((function(){return Array(c)})),v=a,y=0;v0){for(var s=r?e(r):void 0,o=0;o=0&&t.splice(n,1)}},vs=function(t){return function(i){t.indexOf(i)<0&&t.push(i)}},ys=function(t,i,n){var e=function(t,i){if(iOs&&tOs){var n=Math.abs(t/Math.pow(2,23)),e=Math.abs(i/Math.pow(2,23)),r=Math.min(n,e);return Math.pow(10,Math.floor(Math.log10(r)))}}(t,i);if(void 0!==e)return e*n},Ss=function(t){for(var i=t.length,n=0;n=0?e:n.length;rt.max.x||i.max.xt.max.y||i.max.yi[1].x||t[3].yi[3].y)},Es=function(t,i){return b(l(Math.max(Math.min(t[0].x,t[2].x),Math.min(i[0].x,i[2].x)),Math.max(Math.min(t[0].y,t[2].y),Math.min(i[0].y,i[2].y))),l(Math.min(Math.max(t[0].x,t[2].x),Math.max(i[0].x,i[2].x)),Math.min(Math.max(t[0].y,t[2].y),Math.max(i[0].y,i[2].y))))},Ns=function(t,i){return i+t},Vs=function(t,i,n){var e=co(i,t),r=e.x*e.x+e.y*e.y;if(0===r)return t;var s=co(n,t),o=(s.x*e.x+s.y*e.y)/r;return o<=0?t:o>=1?i:l(t.x+o*e.x,t.y+o*e.y)},Gs=function(t,i,n){return n>i?t>=i&&t<=n:t>=n&&t<=i},Hs=function(t,i){var n=t.x-i.x,e=t.y-i.y;return Math.sqrt(n*n+e*e)},js=function(t,i){var n=t.x-i.x,e=t.y-i.y;return n*n+e*e},Ws=function(t,i,n){var e=js(i,n);if(0===e)return[js(t,i),i];var r=So(co(t,i),co(n,i))/e;r=Math.max(0,Math.min(1,r));var s=l(i.x+r*(n.x-i.x),i.y+r*(n.y-i.y));return[js(t,s),s]},Us=function(t,i,n){return fo(t,ao(co(i,t),n))},Ys=function(t,i,n){return Ls.addVec(t,Ls.multiply(Ls.subtractVec(i,t),n))},Xs=function(t,i,n){for(var e=n.length,r=0;r0){for(var n=t[0].x,e=t[0].x,r=t[0].y,s=t[0].y,o=0;on&&(n=h.x),h.xr&&(r=h.y),h.y0){for(var n=t[0].x,e=t[0].x,r=t[0].y,s=t[0].y,o=t[0].z,h=t[0].z,u=0;un&&(n=a.x),a.xr&&(r=a.y),a.yo&&(o=a.z),a.zi.max.x?t.max.x:i.max.x,t.max.y>i.max.y?t.max.y:i.max.y))},Qs=function(t,i){return b(y(t.min.xi.max.x?t.max.x:i.max.x,t.max.y>i.max.y?t.max.y:i.max.y,t.max.z>i.max.z?t.max.z:i.max.z))};function $s(t,i,n,e){var r=t.x-e.x,s=t.y-e.y,o=e.x-n.x,h=n.y-e.y,u=h*r+o*s,a=(e.y-i.y)*r+(i.x-e.x)*s,f=h*(i.x-e.x)+o*(i.y-e.y);return f<0?u<=0&&a<=0&&u+a>=f:u>=0&&a>=0&&u+a<=f}function to(t,i,n){for(var e=fo(n,i[0]),r=i.length-2,s=0;sn.x){if(t.x>i.x)return!1;if(t.xn.x)return!1;if(t.xn.y){if(t.y>i.y)return!1;if(t.yn.y)return!1;if(t.yn.x)if(i.x>e.x){if(t.x>i.x)return!1;if(n.xe.x)return!1;if(t.xe.x){if(t.x>n.x)return!1;if(i.xe.x)return!1;if(i.xn.y)if(i.y>e.y){if(t.y>i.y)return!1;if(n.ye.y)return!1;if(t.ye.y){if(t.y>n.y)return!1;if(i.ye.y)return!1;if(i.yn.x)&&(!(t.y>n.y)&&(!(t.xn.x)if(i.x>e.x)if(i.x>r.x){if(t.x>i.x)return!1;if(r.xr.x)return!1;if(e.xr.x){if(t.x>e.x)return!1;if(r.xr.x)return!1;if(t.xe.x)if(n.x>r.x){if(t.x>n.x)return!1;if(r.xr.x)return!1;if(e.xr.x){if(t.x>e.x)return!1;if(r.xr.x)return!1;if(e.xn.y)if(i.y>e.y)if(i.y>r.y){if(t.y>i.y)return!1;if(r.yr.y)return!1;if(e.yr.y){if(t.y>e.y)return!1;if(r.yr.y)return!1;if(t.ye.y)if(n.y>r.y){if(t.y>n.y)return!1;if(r.yr.y)return!1;if(e.yr.y){if(t.y>e.y)return!1;if(r.yr.y)return!1;if(e.y0&&n<1&&e>0&&e<1?i=1:n<0&&n>-1&&e>0&&e<1?i=2:n<0&&n>-1&&e<0&&e>-1?i=3:n>0&&n<1&&e<0&&e>-1&&(i=4),i}var Mo=function(t,i,n,e){var r,s,o,h;if(i.x-t.x!=0||e.x-n.x!=0)return i.x-t.x==0?(o=i.x,h=(s=(e.y-n.y)/(e.x-n.x))*(o-n.x)+n.y):e.x-n.x==0?(o=e.x,h=(r=(i.y-t.y)/(i.x-t.x))*(o-t.x)+t.y):(r=(i.y-t.y)/(i.x-t.x),s=(e.y-n.y)/(e.x-n.x),h=r*((o=(n.y-s*n.x+r*t.x-t.y)/(r-s))-t.x)+t.y),l(o,h)},Ao=function(t,i){var n=t.length,e=i.length,r=new Uint16Array(n+e);return r.set(t,0),r.set(i,n),r},Fo=function(t,i){for(var n=[],e=Math.sin(i),r=Math.cos(i),s=0;s=i.ti?t:t+n}),0),this.Zt=t.reduce((function(t,n,e){return e>=i.ti&&eOo;return!s&&!o||!!r&&(i>t?{start:s?Io:t,end:o?Oo:i}:{start:o?Oo:t,end:s?Io:i})},i.prototype._t=function(t){var i=this.fi(),n=this.ci(),e=Math.max(t,Io);return i+(this.Mi.function(e)-this.Ai.scaleStartLog)/this.Ai.scaleIntervalLog*(n-i)},i.prototype.Dt=function(t){var i=this.fi(),n=(t-i)/(this.ci()-i),e=this.Ai.scaleStartLog+n*this.Ai.scaleIntervalLog;return Math.pow(this.Mi.number,e)},i.prototype.mi=function(){this.Mi&&this.Fi()},i.prototype.xi=function(i,n){return t.prototype.xi.call(this,i,n),this.Mi&&this.Fi(),this},i.prototype.ai=function(i){return t.prototype.ai.call(this,i),this.Mi&&this.Fi(),this},i.prototype.oi=function(i){return t.prototype.oi.call(this,i),this.Mi&&this.Fi(),this},i.prototype.Ci=function(t){return this.Mi={internal:t,function:Bo(t),number:Lo(t)},this},i.prototype.Bi=function(){return this.Mi.internal},i.prototype.Li=function(t,i){var n=this._t(t)+i;return this.Dt(n)},Object.defineProperty(i.prototype,"Ii",{get:function(){return this.Jt||this.wi||this.$t||this.qt},enumerable:!1,configurable:!0}),i.prototype.Fi=function(){var t=this.Mi.function(this.pi),i=this.Mi.function(this.ki)-t,n=2*this.fi()/this.hi-1,e=2*this.ci()/this.hi-1-n;return this.Ai={scaleStartLog:t,scaleIntervalLog:i,viewportStart:n,viewportSize:e},this.Ai},i.prototype.Oi=function(){return this.Ai},i}(To),Bo=function(t){return"e"===t?bs:ms(t)},Lo=function(t){return"e"===t?Math.E:t},Io=.9*Math.pow(10,-9),Oo=1.1*Math.pow(10,32),Po=["K","M","B","T"],Do=function(t,i,n){var e=Math.abs(n-i),r=Math.max(2-_s(e,10),0);return t.toFixed(r)},_o={Numeric:function(t,i){return Do(t,i.getInnerStart(),i.getInnerEnd())},NumericUnits:function(t,i){var n=Math.abs(i.getInnerEnd()-i.getInnerStart()),e=t<0;t=Math.abs(t);var r=_s(t,1e3),s=Math.pow(1e3,r),o="",h="";if(n>=1e3&&t>=1e3){for(var u=Math.pow(10,_s(n,10)-1),a=Math.round(t/u)*u/s,f=r;f>0;){var c=Math.min(f,Po.length)-1;h=Po[c]+h,f-=c+1}o=(e?"-":"")+a}else{for(a=String(Math.floor(t)),f=1;f<=r;f+=1){var l=a.length-(3*f+(f-1));a=a.substring(0,l)+" "+a.substring(l,a.length)}o=(e?"-":"")+a+(n<=10?function(t,i){if(0===i)return"";var n=(Math.abs(t)-Math.abs(Math.floor(t))).toString().substring(1);return n.length>i&&(n=n.substring(0,i+1)),n}(t,2-_s(n,10)):"")}return o+=h}},Ro=function(t,i){var n=Bo(i);return"e"===i?t?function(t,i){return Math.floor(n(t))+"e"}:function(){return""}:function(t,i){var e=t.toString();if(t>1)return e;var r=Math.floor(n(t));return t.toFixed(Math.abs(r))}},zo=function(t){function i(i,n,e,r){var s=t.call(this,i,n,e,r)||this;return s.Pi=!1,s.Ii=!1,s.Di=0,s.hi=1e3,s.xi(0,10),s._i(),s}return n(i,t),i.prototype.Ti=function(t,i,n,e,r){if(t===i)return!1;var s=Math.abs(e-n),o=Math.abs(i-t);if(!this.Pi){var h=ys(t,i,this.getCellSize());if(void 0===h)return!1;if(o>h)return!0;var u=(i+t)/2,a=(r?h/2:s/2)*(t>i?-1:1);return{start:u-a,end:u+a}}var f=Math.pow(10,-(12-Math.log10(Math.max(Math.abs(t),1))));if(o>f)return!0;var c=(i+t)/2,l=(r?f/2:s/2)*(t>i?-1:1);return{start:c-l,end:c+l}},i.prototype.mi=function(){this._i()},i.prototype._t=function(t){return this.fi()+(t-this.pi)/(this.ki-this.pi)*(this.ci()-this.fi())},i.prototype.Dt=function(t){return this.pi+(t-this.fi())/(this.ci()-this.fi())*(this.ki-this.pi)},i.prototype.xi=function(i,n){return t.prototype.xi.call(this,i,n),this._i(),this},i.prototype.ai=function(i){return t.prototype.ai.call(this,i),this._i(),this},i.prototype.oi=function(i){return t.prototype.oi.call(this,i),this.Ri=Eo(this.ki-this.pi,this.Qt,this.hi,this.Zt,this.Kt),this._i(),this},i.prototype.zi=function(){return this.Pi=!0,this},i.prototype.Ei=function(){return this.Pi},i.prototype.Ni=function(){return Math.abs(this.Vi)},i.prototype.Gi=function(){return this.Ni()/this.Ri},i.prototype.Hi=function(){return this.bt},i.prototype.ji=function(){return this.St},i.prototype.getPixelSize=function(){return this.Ri},i.prototype.Oi=function(){return this.Ai},i.prototype.gi=function(){return t.prototype.gi.call(this),this.Ii=!0,this},i.prototype.bi=function(){return t.prototype.bi.call(this),this.Ii=!1,this},i.prototype.Wi=function(t,i){return void 0===i&&(i=_o.Numeric),i(t,this)},i.prototype.Ui=function(){var t=Math.abs(this.getInnerEnd()).toString().length,i=Math.abs(this.getInnerStart()).toString().length;return t>i?t:i},i.prototype.Yi=function(t){return Eo(t,this.Qt,this.hi,this.Zt,this.Kt)},i.prototype._i=function(){var t=this.pi,i=this.ki,n=0;this.Pi&&(t=0,i=this.ki-this.pi,n=this.pi);var e=i-t,r=Eo(e,this.Qt,this.hi,this.Zt,this.Kt);this.St=t-this.Qt[0]*r,this.bt=i+this.Qt[1]*r;var s=this.bt-this.St,o=s-this.Vi,h=Math.abs(o/r),u=e-this.Di,a=Math.abs(u/r);(!this.Ai||h>=.4||a>=.4)&&(this.Di=e,this.Vi=s,this.Ri=r,this.Ii=!0);var f=this.Vi*this.Kt/(2*this.Zt),c=-(this.St-this.Vi*this.Xt/this.Zt)-f,l=2*this.fi()/this.hi-1,d=2*this.ci()/this.hi-1-l;this.Ai={displacement:c,scaling:f,highPrecisionOffset:n,viewportStart:l,viewportSize:d,scaleStartLog:0,scaleIntervalLog:0}},i.prototype.Li=function(t,i){return t+this.Ri*i},i}(To),Eo=function(t,i,n,e,r){return void 0===e&&(e=1),void 0===r&&(r=1),t/(n*e/r-(i[0]+i[1]))},No=function(){function t(){}return t.prototype.Xi=function(t,i){return"x"in t?(this.x=t.x,this.y=t.y):(this.x=t,this.y=i),this},t.prototype.bi=function(){return this.x.bi(),this.y.bi(),this},t.prototype.gi=function(){return this.x.gi(),this.y.gi(),this},t.prototype.oi=function(t,i){return"object"==typeof t?(this.x.oi(t.x),this.y.oi(t.y)):(this.x.oi(t),this.y.oi(i)),this},t.prototype.vi=function(){return l(this.x.vi(),this.y.vi())},t.prototype.Zi=function(t){return this.x.ai(t),this},t.prototype.Ki=function(t){return this.y.ai(t),this},t.prototype.di=function(){return l(this.x.di(),this.y.di())},t.prototype.qi=function(t,i){return this.x.xi(t,i),this},t.prototype.Ji=function(t,i){return this.y.xi(t,i),this},t.prototype.getInnerIntervalPixels=function(){var t=this.x.getCellSize(),i=this.y.getCellSize();return{x:t-this.x.di(),y:i-this.y.di()}},t.prototype.Qi=function(){return this.x.Ii||this.y.Ii},t}(),Vo=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.$i="LinearScaleXY",i}return n(i,t),i.prototype.Pt=function(t,i,n,e){return this.x=new zo(t.x,i.x,n.x,e?e.x:void 0),this.y=new zo(t.y,i.y,n.y,e?e.y:void 0),this},i.prototype.Ei=function(){return this.x.Ei()||this.y.Ei()},i.prototype.tn=function(){return l(this.x.getPixelSize(),this.y.getPixelSize())},i.prototype.Oi=function(){return{x:this.x.Oi(),y:this.y.Oi()}},i.prototype.Li=function(t,i){var n=this.tn();return{x:t.x+i.x*n.x,y:t.y+i.y*n.y}},i.prototype.nn=function(t,i,n,e){var r=this.tn(),s=ho(t,i);return s.x*=e,s.y*=e,{x:t.x+n*r.x*s.x,y:t.y+n*r.y*s.y}},i}(No),Go=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.$i="MixedScaleXY",i}return n(i,t),i.prototype.Ei=function(){return!1},i.prototype.Li=function(t,i){var n=this.x._t(t.x),e=this.y._t(t.y),r={x:n+i.x,y:e+i.y};return{x:this.x.Dt(r.x),y:this.y.Dt(r.y)}},i.prototype.nn=function(t,i,n,e){var r={x:this.x._t(t.x),y:this.y._t(t.y)},s={x:this.x._t(i.x),y:this.y._t(i.y)},o=oo(co(s,r)),h=ho(s,r),u={x:r.x+o.x*e+h.x*n,y:r.y+o.y*e+h.y*n};return{x:this.x.Dt(u.x),y:this.y.Dt(u.y)}},i.prototype.Oi=function(){var t=this.x.Oi(),i=this.y.Oi();return{uScaleStart:[this.x.pi,this.y.pi],uScaleInterval:[this.x.getInnerInterval(),this.y.getInnerInterval()],uScaleStartLog:[t.scaleStartLog,i.scaleStartLog],uScaleIntervalLog:[t.scaleIntervalLog,i.scaleIntervalLog],uViewportStart:[t.viewportStart,i.viewportStart],uViewportSize:[t.viewportSize,i.viewportSize]}},i}(No),Ho={fitting:{start:function(t,i,n,e){return i>=t?n:e},end:function(t,i,n,e){return i>=t?e:n}},expansion:{start:function(t,i,n,e){return i>=t?nt?e:t},end:function(t,i,n,e){return i>=t?e>i?e:i:nt?Ho.progressive.end(t,i,n,e)+(t-i):e>t?e:t},end:function(t,i,n,e){return i>t?e>i?e:i:Ho.progressive.start(t,i,n,e)+(i-t)}},regressive:{start:function(t,i,n,e){return i>t?nt?Ho.regressive.start(t,i,n,e)+(i-t):n1e3)throw new Error("Infinite loop in Axis tick key values logic.");return r.push(s),r},qo=function(t,i,n,e,r){return n&&(t=t.filter((function(t,i){return i>0}))),e&&(t=t.filter((function(i,n){return n0?i.length:t?1:0;return function(n,r,s,o,h,u){if(!(r>=e)){var a=i[r]||1,f=!1,c=!1,l=1;return t&&(f="ignore"in t?"first"===t.ignore||"both"===t.ignore:f,c="ignore"in t?"last"===t.ignore||"both"===t.ignore:c,l="offset"in t&&void 0!==t.offset?t.offset:l),qo(n,a,f,c,l)}}},Qo={linear:function(t,i,n){var e=i-t;return function(r){return r0){var i=this.hn[0];return t&&(this.an.listeners("allEnd").forEach((function(t,n){return i.onAllAnimationEnd(t,n)})),this.an.listeners("everyEnd").forEach((function(t,n){return i.onEveryAnimationEnd(t,n)}))),i.addNextAnimations(this.hn.slice(1)),i.start(),t&&(this.an.emit("end",i),this.an.emit("everyEnd",i)),i}t&&(this.an.emit("end",void 0),this.an.emit("everyEnd",void 0),this.an.emit("allEnd"))},t.prototype.finishAll=function(t){void 0===t&&(t=!0);for(var i=this;i;)i=i.finish(t)},t.prototype.getFinalValues=function(){return this.hn.length>0?this.hn[this.hn.length-1].Ft.map(Ar):this.Ft.map(Ar)},t.prototype.getTimeUntilFinish=function(){for(var t=this.duration-this.delta,i=0;i60&&console.log("Note: Animator FPS is usually capped at 60 by the browser!");var n,e,r=[],s=0,o=function(){n=void 0;var h=Date.now();(s=h-(e=e||h))/1e3>=1/i&&(e=Date.now()-s%(1e3/i),r.forEach((function(t){t.delta+=s-s%(1e3/i),t.delta>t.duration&&(t.delta=t.duration),t.action(t.eases.map((function(i){return i(t.delta)}))),t.delta===t.duration&&t.finish()})),t()),r.length>0?n=wr.requestAnimationFrame(o):(n=void 0,e=void 0)};return function(t,i){return void 0===t&&(t=1e3),void 0===i&&(i=Qo.linear),function(e,s,h){void 0===h&&(h=t);var u=new $o(e,s,h,i,r).start();return n||(n=wr.requestAnimationFrame(o)),u}}},ih=function(t,i){if(i.has(t))return i.get(t);var n=Ks(t.label.fn());return i.set(t,n),n},nh=function(t){var i,n,e,r,s=new Map;if(t!==Uo){try{for(var h=o(t.cn),u=h.next();!u.done;u=h.next()){var a=u.value;s.set(a,new Map)}}catch(t){i={error:t}}finally{try{u&&!u.done&&(n=h.return)&&n.call(h)}finally{if(i)throw i.error}}try{for(var f=o(t.ln),c=f.next();!c.done;c=f.next()){var l=c.value;s.set(l,new Map)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=f.return)&&r.call(f)}finally{if(e)throw e.error}}}return s},eh=function(){function t(t,i,n,e,r,s,u){var a=this;this.chart=t,this.dn=i,this.vn=e,this.yn=s,this.an=new qe,this.Sn=Uo,this.mn=jo.Empty,this.bn=new Map,this.gn=new Map,this.wn=Ho.fitting,this.pn=!0,this.kn=th((function(){return a.chart.engine.xn()}))(300,Qo.linear),this.Mn=!1,this.An=!1,this.Fn=Os,this.Tn=!1,this.Cn=!1,this.Bn=Os,this.Ln=Os,this.In=Os,this.release=function(){!1!==a.An&&(a.An=!1,a.Fn=wr.performance.now(),a.chart.engine.xn())},this.On={},this.Pn=function(t){var i=a.bn.get(t.tickLevel);i&&i.delete(t.value);var n=a.gn.get(t.tickLevel);n&&n.has(t.value)||n&&n.set(t.value,t)},this.Dn=Cr,this._n=function(t,i,n,e,r,s){var h,u,f=[],c=[];try{for(var l=o(t),d=l.next();!d.done;d=l.next()){var v=d.value;if(ve)f.push(v);else{var y=a.bn.get(i),S=(y?y.get(v):void 0)||a.Rn(v,i);S.label.restore(),S.zn(!1);var m=a.En(S,r);s.set(S,m),f.push(v),c.push(S)}}}catch(t){h={error:t}}finally{try{d&&!d.done&&(u=l.return)&&u.call(l)}finally{if(h)throw h.error}}return{displayedKeyValues:f,createdTicks:c}},this.Nn=function(t,i,n,e,r,s,o,h,u,f,c){for(var l=[],d=function(d){var v=t[d],y=i[d],S=void 0,m=void 0;if(a.Vn(v,n)){var b=ih(v,u);S=(m=[t[d-1],t[d+1]].concat(f).concat(c).filter((function(t){return void 0!==t})).filter((function(i){return i.tickLevel!==n||!!t.find((function(t){return t===i}))})).map((function(t){return Rs(b,ih(t,u))?t:void 0}))).some((function(t){return void 0!==t}))}else S=!1;if(S){var g=!0,w=m.filter((function(t){return void 0!==t}));return g&&n.Gn&&w.every((function(t){return Wo(t.tickLevel)}))&&(g=!1),g&&n.Gn&&n.Gn.Hn&&!1===n.Gn.Hn(y,e,r,s,o,h)&&(g=!1),!1===g?"continue":{value:!0}}l.push(v)},v=0;va)&&(u={start:(o=(i+t)/2)-(h=this.Sn.ae/2*(t>i?-1:1)),end:o+h});void 0!==this.Sn.fe&&this.Sn.fei?-1:1)),end:o+h});var f=this.Rt.Ti(u.start,u.end,this.Xn,this.Zn,!0);if(!1===f)return this;!0===f||(u=f);var c="interactionZoom"!==r;if(this.stop(),this.kn&&(!0===n||n>0)){var l=!0===n?void 0:n,d=!this.ce||this.ce.isOver()?this.kn:this.ce.NextAnimation.bind(this);this.ce=d([[this.Xn,u.start],[this.Zn,u.end]],this.jn,l),this.ce.onAnimationEnd((function(){s.ce=void 0,s.chart.le(),c&&(s.In=wr.performance.now())})),e||this.ce.onAnimationEnd(this.release)}else this.Wn(u.start,u.end),e||this.release(),c&&(this.In=wr.performance.now());return this},t.prototype.getInterval=function(){return{start:this.Xn,end:this.Zn}},t.prototype.stop=function(){return this.ce&&this.ce.finishAll(!1),this.ce=void 0,!0!==this.An&&(this.An=!0,this.Fn=wr.performance.now()),this.chart.le(),this.chart.engine.xn(),this},t.prototype.isStopped=function(){return this.An},t.prototype.fit=function(t,i){void 0===i&&(i=!1);var n=this.de(!1);if(n){var e=this.Zn>=this.Xn,r=e?n.min:n.max,s=e?n.max:n.min;this.ue(r,s,t,i,"userFit")}return this},t.prototype.setScrollStrategy=function(t){return this.wn=t,this.chart.engine.xn(),this},t.prototype.getScrollStrategy=function(){return this.wn},t.prototype.setAnimationScroll=function(t){return this.pn=Boolean(t),this.chart.engine.xn(),this},t.prototype.setAnimationZoom=function(t,i){var n=this;return void 0===i&&(i=300),this.ce&&(this.ce.finishAll(!1),this.ce=void 0),this.kn=t?th((function(){return n.chart.engine.xn()}))(i,t):void 0,this},t.prototype.setAnimationsEnabled=function(t){return this.Mn=!!t,t?(this.setAnimationScroll(!0),this.setAnimationZoom(Qo.ease,void 0)):(this.setAnimationScroll(void 0),this.setAnimationZoom(void 0)),this},t.prototype.getAnimationsEnabled=function(){return this.Mn},t.prototype.disableAnimations=function(){return this.setAnimationsEnabled(!1),this},t.prototype.onScaleChange=function(t){return this.an.on("scaleChange",t)},t.prototype.offScaleChange=function(t){return this.an.off(t,"scaleChange")},t.prototype.ve=function(t,i){var n,e,r,s,a,f,c=new Map;if(this.Sn===Uo)return this.re(),c;i=i||new Map;var l=this.ye(),d=l.min,v=l.max,y=v-d,S=t.physicalAxisSize;this.On.physicalAxisSize=S;var m=this.Se(this.Sn,d,v,this.Xn,this.Zn,S),b=[];if(this.me(),b.push.apply(b,u([],h(this.be(this.Sn,d,v,m,i,t,c)))),this.ge(this.Sn,d,v,m,i,t,b,c),this.we(),m)try{for(var g=o(this.gn),w=g.next();!w.done;w=g.next()){var p=h(w.value,2),k=p[0],x=p[1],M=m.get(k);if(void 0===M)return c;try{for(var A=(r=void 0,o(x)),F=A.next();!F.done;F=A.next()){var T=h(F.value,1)[0];try{for(var C=(a=void 0,o(M)),B=C.next();!B.done;B=C.next()){if(B.value===T)return c}}catch(t){a={error:t}}finally{try{B&&!B.done&&(f=C.return)&&f.call(C)}finally{if(a)throw a.error}}x.delete(T)}}catch(t){r={error:t}}finally{try{F&&!F.done&&(s=A.return)&&s.call(A)}finally{if(r)throw r.error}}}}catch(t){n={error:t}}finally{try{w&&!w.done&&(e=g.return)&&e.call(g)}finally{if(n)throw n.error}}return this.On.min=d,this.On.max=v,this.On.scaleInterval=y,this.On.physicalAxisSize=S,c},t.prototype.Se=function(t,i,n,e,r,s){var h,u,a,f,c,l=new Map;try{for(var d=o(t.cn),v=d.next();!v.done;v=d.next()){var y=(b=v.value).pe(i,n,e,r);y=this.ke(y),l.set(b,y)}}catch(t){h={error:t}}finally{try{v&&!v.done&&(u=d.return)&&u.call(d)}finally{if(h)throw h.error}}try{for(var S=o(t.ln),m=S.next();!m.done;m=S.next()){var b=m.value;y=void 0;if(void 0===c)y=b.pe(i,n,i,n);else{var g=[],w=s/(c.filter((function(t){return i<=t&&t<=n})).length-1);if(void 0!==b.xe&&b.xe>w)break;for(var p=0;pn)return"continue";var e=b.bn.get(y),o=(e?e.get(t):void 0)||b.Rn(t,y);o.label.restore();var u=b.En(o,s),a=ih(o,r);l.find((function(t){return Rs(a,ih(t,r))}))&&o.label.dispose(),o.zn(!1),h.set(o,u),l.push(o)},b=this;try{for(var g=(f=void 0,o(S)),w=g.next();!w.done;w=g.next()){m(w.value)}}catch(t){f={error:t}}finally{try{w&&!w.done&&(c=g.return)&&c.call(g)}finally{if(f)throw f.error}}}}catch(t){u={error:t}}finally{try{v&&!v.done&&(a=d.return)&&a.call(d)}finally{if(u)throw u.error}}return l},t.prototype.ge=function(t,i,n,e,r,s,h,u){var a,f,c,l=[],d=function(t){var a,f,d=e.get(t);if(!d)return"break";var y=void 0;if(void 0===c)y=[{start:i,end:n,keyValues:d}];else{y=[];for(var S=0;S=m&&k0){if(void 0===t.Gn)return B=!1,"break";var a=t.Gn.Oe;if(void 0===(u=a(u.slice(),x-1,s,o,i,n)))return"break"}var f=v.Nn(F.filter((function(t){return u.some((function(i){return Br(t.value,i)}))})),A,t,x,s,o,i,n,r,h,l);if(!0===f)return x+=1,M=-1,C=[],"continue";C=C.concat(f)};++Mthis.Rt.getInnerStart()?this.Rt.getInnerEnd():this.Rt.getInnerStart();return b(t,i)},t.prototype.Re=function(t,i,n){for(var e,r,s=[],h="left"===n?t.ze():t.Ee(),u=0;h&&u<2;){var a=h.value.value,f=0;try{for(var c=(e=void 0,o(a)),l=c.next();!l.done;l=c.next()){var d=l.value;this.Vn(d,i)&&(f+=1,s.push(d))}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}0!==a.length&&0!==f&&(u+=1),h="left"===n?h.ze():h.Ee()}return s},t.prototype.Vn=function(t,i){return!t._e()&&(0!==t.label.Kn().length&&(!Wo(i)||!0===i.Ne))},t.prototype.Ve=function(t,i){return this.Sn===Uo||(this.Sn.cn.forEach((function(n){i=t(i,n.Ce)})),this.Sn.ln.forEach((function(n){(function(t){return void 0!==t.Ae})(n)&&(i=t(i,n.Ce))}))),i},t.prototype.de=function(t){var i,n,e;try{for(var r=o(this.Ge()),s=r.next();!s.done;s=r.next()){var h=s.value;if(h.He()){var u=this.dn.je(h),a=this.dn.We(h);if(void 0!==u&&kr(u)&&void 0!==a&&kr(a)){if("logarithmic"===this.Un.type){var f=void 0;if(Math.sign(u)!==Math.sign(a)&&(f="Logarithmic series data range must be either > 0 or < 0 (encountered ["+u+", "+a+"])"),0!==u&&0!==a||(f="Logarithmic series data range is not defined at 0 (encountered ["+u+", "+a+"])"),f)throw wr.alert(f),new Error(f)}e?(e.min=Math.min(e.min,u),e.max=Math.max(e.max,a)):e=b(u,a)}}}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}if(e&&kr(e.min)&&kr(e.max)){if(Br(e.min,e.max)){if(t)return;return{min:e.min-1,max:e.max+1}}return e}},t.prototype.Ue=function(){var t,i,n=0;try{for(var e=o(this.Ge()),r=e.next();!r.done;r=e.next()){var s=r.value,h=this.dn.Ye(s);h&&(n=Math.max(n,h))}}catch(i){t={error:i}}finally{try{r&&!r.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}return n},t.prototype.Xe=function(){var t=this,i=this.Ge(),n=this.Tn,e=!1;if(0!==i.length&&this.wn&&!this.An){var r=this.de(!0);if(r){var s=this.Xn,o=this.Zn,h=this.wn.start(s,o,r.min,r.max),u=this.wn.end(s,o,r.min,r.max),a=!1===Br(s,h),f=!1===Br(o,u);if(h=a?h:s,u=f?u:o,a||f){var c=!1;if(this.pn)if(this.pn){c=!0;var l=a?this.Ze(s,h):s,d=f?this.Ze(o,u):o;if(!0===this.Wn(l,d,{allowClamping:!1})&&(a&&!1===Br(l,h)||f&&!1===Br(d,u))){this.chart.engine.xn(!0),e=!0;var v=Math.abs(u-h)/Math.abs(l-d);v<1&&(v=1/v),this.Cn=v>=1.4}}else c=!1;c||this.Wn(h,u)}}}e?(this.Tn!==e&&(this.Tn=e,this.Bn=wr.performance.now()),this.Ke&&(clearTimeout(this.Ke),this.Ke=void 0)):!0===n&&void 0===this.Ke&&(this.Cn=!1,this.Ke=setTimeout((function(){!1!==t.Tn&&(t.Tn=!1,t.Bn=wr.performance.now()),t.Ke=void 0,t.chart.engine.xn()}),200))},t.prototype.Wn=function(t,i,n){var e,r,s=!n||!("allowClamping"in n)||void 0===n.allowClamping||n.allowClamping,o={start:t,end:i},h=!0,u=Math.abs(i-t),a=Math.abs(this.Zn-this.Xn);void 0!==this.Sn.ae&&this.Sn.ae>u&&(o={start:(e=(i+t)/2)-(r=(s?this.Sn.ae/2:a/2)*(t>i?-1:1)),end:e+r},h=!1);void 0!==this.Sn.fe&&this.Sn.fei?-1:1)),end:e+r},h=!1);var f=this.Rt.Ti(o.start,o.end,this.Xn,this.Zn,s);if(!1===f)return!1;!0!==f&&(o=f);var c=this.Ue(),l=this.qe(Math.min(o.start,o.end),Math.max(o.start,o.end),c);return!!(f=this.Rt.Ti(o.end>o.start?l.min:l.max,o.end>o.start?l.max:l.min,this.Xn,this.Zn,!1))&&(!0===f?this.Rt.xi(o.end>o.start?l.min:l.max,o.end>o.start?l.max:l.min):this.Rt.xi(o.start,o.end),this.Xn=o.start,this.Zn=o.end,this.an.emit("scaleChange",o.start,o.end),this.Ln=wr.performance.now(),this.chart.engine.xn(),h)},t.prototype.Je=function(){return this.Tn},t.prototype.Qe=function(){return void 0!==this.ce},t}(),rh=function(){function t(t,i,n,e,r,s,o){void 0===o&&(o=r.$e(s).setMouseInteractions(!1)),this.tickLevel=t,this.value=i,this.tr=n,this.ir=e,this.nr=r,this.er=s,this.label=o,this.rr=!1}return t.prototype.restore=function(){return this.label.restore(),this.ir(this),this},t.prototype.dispose=function(){return this.label.dispose(),this.rr=!0,this.tr(this),this},t.prototype.zn=function(t){return this.rr=t,this},t.prototype._e=function(){return this.rr},t.prototype.isDisposed=function(){return this.label.isDisposed()},t}(),sh=function(t){function i(i){return t.call(this,i)||this}return n(i,t),i.prototype.setSize=function(t){return this.set("size",t)},i.prototype.setFamily=function(t){return this.set("family",t)},i.prototype.setWeight=function(t){return this.set("weight",t)},i.prototype.setStyle=function(t){return this.set("style",t)},i.prototype.setVariant=function(t){return this.set("variant",t)},i.prototype.getSize=function(){return this.get("size")},i.prototype.getFamily=function(){return this.get("family")},i.prototype.getWeight=function(){return this.get("weight")},i.prototype.getStyle=function(){return this.get("style")},i.prototype.getVariant=function(){return this.get("variant")},i}(me({size:14,family:"Arial",weight:"normal",style:"normal",variant:!1})),oh=new sh,hh=function(){},uh=new hh,ah=function(t){function i(i){return t.call(this,i)||this}return n(i,t),i.prototype.setSize=function(t){return this.set("size",t)},i.prototype.getSize=function(){return this.get("size")},i.prototype.setFillStyle=function(t){return"function"==typeof t?this.set("fillStyle",t(this.get("fillStyle"))):this.set("fillStyle",t)},i.prototype.getFillStyle=function(){return this.get("fillStyle")},i.prototype.setWireframeStyle=function(t){return"function"==typeof t?this.set("wireframeStyle",t(this.get("wireframeStyle"))):this.set("wireframeStyle",t)},i.prototype.getWireframeStyle=function(){return this.get("wireframeStyle")},i.prototype.setShape=function(t){return this.set("shape",t)},i.prototype.getShape=function(){return this.get("shape")},i.prototype.getDefaultHighlightStyle=function(){return this.It||(this.It=this.setFillStyle(this.getFillStyle().getDefaultHighlightStyle())),this.It},i}(me({shape:"sphere",size:10,fillStyle:new Ee,wireframeStyle:ir})),fh=function(t){function i(i){return t.call(this,i)||this}return n(i,t),i.prototype.setSize=function(t){return this.set("size",t)},i.prototype.getSize=function(){return this.get("size")},i.prototype.setFillStyle=function(t){return"function"==typeof t?this.set("fillStyle",t(this.get("fillStyle"))):this.set("fillStyle",t)},i.prototype.getFillStyle=function(){return this.get("fillStyle")},i.prototype.getDefaultHighlightStyle=function(){return this.It||(this.It=this.setFillStyle(this.getFillStyle().getDefaultHighlightStyle())),this.It},i}(me({size:5,fillStyle:new Ee})),ch={Triangulated:ah,Pixelated:fh},lh=new Map,dh=function(t){var i=t.getSize(),n=t.getFamily(),e=t.getWeight(),r=t.getStyle(),s=t.getVariant(),o=r+" "+(s?"small-caps":"normal")+" "+e+" "+i+"px "+n,h=lh.get(o);return h||(h=function(t,i){return{font:t,properties:i}}(o,{size:i,family:n,style:r,variant:s,weight:e}),lh.set(o,h)),h},vh=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i}(me({gridStrokeLength:1,gridStrokeStyle:new nr,tickLength:7,tickStyle:new nr,tickPadding:0,labelFont:new sh,labelFillStyle:new Ee,labelPadding:0,labelAlignment:0,labelRotation:0})),yh=function(t){function i(i){return t.call(this,i)||this}return n(i,t),i.prototype.setGridStrokeLength=function(t){return this.set("gridStrokeLength",t)},i.prototype.getGridStrokeLength=function(){return this.get("gridStrokeLength")},i.prototype.setGridStrokeStyle=function(t){return this.set("gridStrokeStyle","function"==typeof t?t(this.get("gridStrokeStyle")):t)},i.prototype.getGridStrokeStyle=function(){return this.get("gridStrokeStyle")},i.prototype.setTickLength=function(t){return this.set("tickLength",t)},i.prototype.getTickLength=function(){return this.get("tickLength")},i.prototype.setTickStyle=function(t){return this.set("tickStyle","function"==typeof t?t(this.get("tickStyle")):t)},i.prototype.getTickStyle=function(){return this.get("tickStyle")},i.prototype.setTickPadding=function(t){return this.set("tickPadding",t)},i.prototype.getTickPadding=function(){return this.get("tickPadding")},i.prototype.setLabelFillStyle=function(t){return this.set("labelFillStyle","function"==typeof t?t(this.get("labelFillStyle")):t)},i.prototype.getLabelFillStyle=function(){return this.get("labelFillStyle")},i.prototype.setLabelFont=function(t){return this.set("labelFont","function"==typeof t?t(this.get("labelFont")):t)},i.prototype.getLabelFont=function(){return this.get("labelFont")},i.prototype.setLabelPadding=function(t){return this.set("labelPadding",t)},i.prototype.getLabelPadding=function(){return this.get("labelPadding")},i.prototype.setLabelAlignment=function(t){return this.set("labelAlignment",t)},i.prototype.getLabelAlignment=function(){return this.get("labelAlignment")},i.prototype.setLabelRotation=function(t){return this.set("labelRotation",t)},i.prototype.getLabelRotation=function(){return this.get("labelRotation")},i}(vh),Sh=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i}(vh),mh=Object.assign(Object.create(new Sh),{}),bh=-1,gh=0,wh=1,ph=function(t,i,n,e,r){return function(s){return function(o){var h=new Date(o+s),u={year:h.getFullYear(),monthIndex:h.getMonth(),day:h.getDate(),hours:h.getHours(),minutes:h.getMinutes(),seconds:h.getSeconds(),millis:h.getMilliseconds()},a=e?e(u):void 0;if(t===gh&&!0===a)return o;var f=u[i];r.includes("year")&&(u.year=Math.floor(u.year/n)*n),r.includes("monthIndex")&&(u.monthIndex=0),r.includes("day")&&(u.day=1),r.includes("hours")&&(u.hours=0),r.includes("minutes")&&(u.minutes=0),r.includes("seconds")&&(u.seconds=0),r.includes("millis")&&(u.millis=0);var c=(t===gh?1:t)*n;return t===bh&&!1===a&&(c=0),0!==c&&(u[i]=n*(c>0?Math.floor((f+c)/n):Math.ceil((f+c)/n))),new Date(u.year,u.monthIndex,u.day,u.hours,u.minutes,u.seconds,u.millis).getTime()-s}}},kh=function(t,i,n){for(var e=[],r=3;r=2?r-1:r+6:o+=r>0?8-r:1),new Date(e.getFullYear(),e.getMonth(),o,0,0,0,0).getTime()-i}}},Th=[{label:"MilliSecond100",unit:100,irregular:!1,greatTicks:void 0,majorTicks:{fitFunction:Jo({ignore:"first"},2,5)},minorTicks:{amount:4,fitFunction:Jo(void 0,2)}},{label:"Second",unit:1e3,irregular:!1,greatTicks:{getReferenceKeyValue:kh("seconds",1,(function(t){return 0===t.millis}),"millis")},majorTicks:{fitFunction:Jo({ignore:"first"},5,10,15,30)},minorTicks:{amount:4,fitFunction:Jo(void 0,2)}},{label:"Minute",unit:6e4,irregular:!1,greatTicks:{getReferenceKeyValue:kh("minutes",1,(function(t){return 0===t.seconds&&0===t.millis}),"seconds","millis")},majorTicks:{fitFunction:Jo({ignore:"first"},5,10,15,30)},minorTicks:{amount:12,fitFunction:Jo(void 0,3,6)}},{label:"Hour",unit:36e5,irregular:!1,greatTicks:{getReferenceKeyValue:kh("hours",1,(function(t){return 0===t.minutes&&0===t.seconds&&0===t.millis}),"minutes","seconds","millis")},majorTicks:{fitFunction:Jo({ignore:"first"},3,6,12)},minorTicks:{amount:8,fitFunction:Jo(void 0,2,4)}},{label:"Day",unit:864e5,irregular:!1,greatTicks:{getReferenceKeyValue:kh("day",1,(function(t){return 0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"hours","minutes","seconds","millis")},majorTicks:{fitFunction:Jo({ignore:"last"},2,4)},minorTicks:{amount:7,fitFunction:Jo({ignore:"last"},2,3)}},{label:"Week",unit:6048e5,irregular:!0,getPrevKeyValue:Fh(bh),getNextKeyValueIncludingRef:Fh(gh),getNextKeyValue:Fh(wh),greatTicks:!0,majorTicks:{fitFunction:Jo(void 0,2)},minorTicks:{fitFunction:void 0}},{label:"Month",unit:2592e6,irregular:!0,getPrevKeyValue:xh("monthIndex",1,(function(t){return 1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"day","hours","minutes","seconds","millis"),getNextKeyValueIncludingRef:Mh("monthIndex",1,(function(t){return 1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"day","hours","minutes","seconds","millis"),getNextKeyValue:Ah("monthIndex",1,"day","hours","minutes","seconds","millis"),greatTicks:!0,majorTicks:{fitFunction:Jo(void 0,2,3)},minorTicks:{fitFunction:Jo(void 0,2,4,6)}},{label:"Year",unit:31536e6,irregular:!0,getPrevKeyValue:xh("year",1,(function(t){return 1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"monthIndex","day","hours","minutes","seconds","millis"),getNextKeyValueIncludingRef:Mh("year",1,(function(t){return 1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"monthIndex","day","hours","minutes","seconds","millis"),getNextKeyValue:Ah("year",1,"monthIndex","day","hours","minutes","seconds","millis"),greatTicks:!0,majorTicks:{fitFunction:Jo({ignore:"first"},2,5)},minorTicks:{fitFunction:Jo(void 0,2,5)}},{label:"Decade",unit:31536e7,irregular:!0,getPrevKeyValue:xh("year",10,(function(t){return t.year%10==0&&1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"year","monthIndex","day","hours","minutes","seconds","millis"),getNextKeyValueIncludingRef:Mh("year",10,(function(t){return t.year%10==0&&1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"year","monthIndex","day","hours","minutes","seconds","millis"),getNextKeyValue:Ah("year",10,"year","monthIndex","day","hours","minutes","seconds","millis"),greatTicks:!0,majorTicks:{fitFunction:Jo(void 0,2,4)},minorTicks:{fitFunction:Jo(void 0,2,5)}},{label:"Century",unit:316224e7,irregular:!0,getPrevKeyValue:xh("year",100,(function(t){return t.year%100==0&&1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"year","monthIndex","day","hours","minutes","seconds","millis"),getNextKeyValueIncludingRef:Mh("year",100,(function(t){return t.year%100==0&&1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"year","monthIndex","day","hours","minutes","seconds","millis"),getNextKeyValue:Ah("year",100,"year","monthIndex","day","hours","minutes","seconds","millis"),greatTicks:!0,majorTicks:{fitFunction:void 0},minorTicks:void 0},{label:"Millennium",unit:316224e8,irregular:!0,getPrevKeyValue:xh("year",1e3,(function(t){return t.year%1e3==0&&1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"year","monthIndex","day","hours","minutes","seconds","millis"),getNextKeyValueIncludingRef:Mh("year",1e3,(function(t){return t.year%1e3==0&&1===t.day&&0===t.hours&&0===t.minutes&&0===t.seconds&&0===t.millis}),"year","monthIndex","day","hours","minutes","seconds","millis"),getNextKeyValue:Ah("year",1e3,"year","monthIndex","day","hours","minutes","seconds","millis"),greatTicks:!0,majorTicks:{fitFunction:void 0},minorTicks:void 0}],Ch=function(t,i,n){var e=function(t,i,n,e,r){for(var s,o=i-t,h=r?0:Th.length-1;r?h=0;r?h+=1:h-=1){var u=o/Th[h].unit;if((void 0===n||u>=n)&&(void 0===e||u<=e)){s=Th[h];break}}return s}(i,n,void 0,1,!0);if(void 0!==e&&0===Th.indexOf(e)&&(e=Th[1]),void 0!==e){if("great"===t)return e;var r="major"===t?1:2,s=Th[Th.indexOf(e)-r];return void 0===s?Th[0]:s}},Bh=function(t,i){return function(n,e,r,s){var h=Ch("great",n,e);if(void 0===h)return[];if("Decade"===h.label||"Century"===h.label||"Millennium"===h.label)return[];var u,a=s>r?n:e,f=(n+e)/2,c=s>r?e:n;if(Th.indexOf(h)<=Th.findIndex((function(t){return"Hour"===t.label})))return"left"===i?[a]:[];if(!0===h.irregular)u=Ko(n,e,h.getPrevKeyValue(t),h.getNextKeyValue(t));else{var l=h.greatTicks.getReferenceKeyValue(t)(n);u=Zo(n,e,h.unit,l)}var d=function(t,i,n){var e,r;try{for(var s=o(n),h=s.next();!h.done;h=s.next()){var u=h.value;if(u>=t&&u<=i)return u}}catch(t){e={error:t}}finally{try{h&&!h.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}}(n,e,u);return"left"===i?void 0===d||Gs(d,f,c)?[a]:[d]:void 0!==d&&Gs(d,f,c)?[d]:[c]}},Lh=function(t,i){return function(n,e,r,s){var o,h=Ch(t,r,s);if(void 0===h)return[];if("great"===t&&void 0!==h.greatTicks)if(!0===h.irregular)o=Ko(n,e,h.getPrevKeyValue(i),h.getNextKeyValue(i));else{var u=h.greatTicks.getReferenceKeyValue(i)(n);o=Zo(n,e,h.unit,u)}else if("major"===t&&void 0!==h.majorTicks)o=!0===h.irregular?function(t,i,n,e){for(var r=[],s=n(t),o=0;s1e3)throw new Error("Infinite loop in Axis tick key values logic.");return r.push(s),r}(n,e,h.getPrevKeyValue(i),h.getNextKeyValue(i)):function(t,i,n){for(var e=[],r=t,s=0;r1e3)throw new Error("Infinite loop in Axis tick key values logic.");return e.push(r),e}(n,e,h.unit);else{if("minor"!==t||void 0===h.minorTicks)return[];if(!0===h.irregular)o=function(t,i,n,e){for(var r=[],s=n(t),o=0;s1e3)throw new Error("Infinite loop in Axis tick key values logic.");return r}(n,e,h.getNextKeyValueIncludingRef(i),h.getNextKeyValue(i));else{var a=function(t){if(void 0!==t)return Th[Th.indexOf(t)+1]}(h);if(void 0===a)return[];o=Xo(n,e,a.unit/h.minorTicks.amount)}}return o}},Ih=function(t){return function(i,n,e,r,s,o){var h,u=Ch(t,s,o);if(void 0!==u)return"major"===t?h=u.majorTicks.fitFunction:u.minorTicks&&(h=u.minorTicks.fitFunction),h?h(i,n,e,r,s,o):void 0}},Oh=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.se=function(t){var i=this,n=void 0!==this.dateOrigin?this.dateOrigin.getTime():0,e=function(t){return Th.map((function(n){var e=function(t,i,n){switch(n.label){case"MilliSecond100":return"Great"===i?void 0:"Major"===i?t.formatOptionsMajorMilliSecond:t.formatOptionsMinorMillisecond;case"Second":return"Great"===i?t.formatOptionsGreatSecond:"Major"===i?t.formatOptionsMajorSecond:t.formatOptionsMinorSecond;case"Minute":return"Great"===i?t.formatOptionsGreatMinute:"Major"===i?t.formatOptionsMajorMinute:t.formatOptionsMinorMinute;default:case"Hour":return"Great"===i?t.formatOptionsGreatHour:"Major"===i?t.formatOptionsMajorHour:t.formatOptionsMinorHour;case"Day":return"Great"===i?t.formatOptionsGreatDay:"Major"===i?t.formatOptionsMajorDay:t.formatOptionsMinorDay;case"Week":return"Great"===i?t.formatOptionsGreatWeek:"Major"===i?t.formatOptionsMajorWeek:t.formatOptionsMinorWeek;case"Month":return"Great"===i?t.formatOptionsGreatMonth:"Major"===i?t.formatOptionsMajorMonth:t.formatOptionsMinorMonth;case"Year":return"Great"===i?t.formatOptionsGreatYear:"Major"===i?t.formatOptionsMajorYear:t.formatOptionsMinorYear;case"Decade":return"Great"===i?void 0:"Major"===i?t.formatOptionsMajorDecade:t.formatOptionsMinorDecade;case"Century":return"Great"===i?void 0:"Major"===i?t.formatOptionsMajorCentury:void 0;case"Millennium":return}}(i,t,n);if("object"!=typeof e)return e;try{return new Intl.DateTimeFormat(i.locale,e)}catch(t){var r="";for(var s in e)r+=" "+s+": "+e[s]+",";console.error("Invalid Intl.DateTimeFormat ( locale: "+i.locale+", formatOptions {"+r+"} )")}}))},r=new Map;r.set("great",e("Great")),r.set("major",e("Major")),r.set("minor",e("Minor"));var s=function(t){return String(t)},o=function(t,e){return function(o,h){var u=o+n,a=h.getInnerStart(),f=h.getInnerEnd(),c=a>f,l=Ch(t,c?f:a,c?a:f);if(void 0===l)return s(u);if("great"===t){u=(!1===Br(o,"left"===e?a:f)?o:!1===l.irregular?"left"===e&&!1===c||"right"===e&&!0===c?l.greatTicks.getReferenceKeyValue(n)(o):l.greatTicks.getReferenceKeyValue(n)(o+1*l.unit):"left"===e&&!1===c||"right"===e&&!0===c?l.getPrevKeyValue(n)(o):l.getNextKeyValue(n)(o))+n}var d=r.get(t);if(void 0===d)return s(u);var v=d[Th.indexOf(l)];return void 0===v?"":"function"==typeof v?v(u,h,i.locale):v.format(u)}},h=[],u=[{sr:"Great ticks (directive)",hr:0,Ie:!0,pe:Lh("great",n),xe:void 0},{sr:"Major ticks",hr:1,Ce:this.majorTickStyle,Ae:o("major"),pe:Lh("major",n),Gn:{Oe:Ih("major")},xe:void 0}];this.greatTickStyle!==mh&&(h.push({sr:"Great ticks (left)",Ce:this.greatTickStyle.setLabelAlignment(-1),Ae:o("great","left"),pe:Bh(n,"left"),en:!0,Ne:!1}),h.push({sr:"Great ticks (right)",Ce:this.greatTickStyle.setLabelAlignment(1),Ae:o("great","right"),pe:Bh(n,"right"),en:!0,Ne:!1})),this.minorTickStyle!==mh&&u.push({sr:"Minor ticks",hr:2,Ce:this.minorTickStyle,Ae:o("minor"),pe:Lh("minor",n),Gn:{Oe:Ih("minor"),Hn:function(t,i,n,e,r,s){var o=Ch("minor",r,s);return!o||"Week"!==o.label}},xe:void 0});var a=this.cursorFormatter;return{cn:h,ln:u,rn:a?function(t,i,e){return a(n+t,i,e)}:function(t,i,e){var r=new Date(n+t);return new Intl.DateTimeFormat(e,{year:"numeric",month:"numeric",day:"numeric",minute:"2-digit",hour:"2-digit"}).format(r)+" "},ae:1e3,fe:31536e9}},i.prototype.setCursorFormatter=function(t){return this.set("cursorFormatter",t)},i.prototype.getCursorFormatter=function(){return this.get("cursorFormatter")},i.prototype.setGreatTickStyle=function(t){if("function"==typeof t){var i=this.get("greatTickStyle");return i!==mh?this.set("greatTickStyle",t(i)):this}return this.set("greatTickStyle",t)},i.prototype.getGreatTickStyle=function(){return this.get("greatTickStyle")},i.prototype.setMajorTickStyle=function(t){return"function"==typeof t?this.set("majorTickStyle",t(this.get("majorTickStyle"))):this.set("majorTickStyle",t)},i.prototype.getMajorTickStyle=function(){return this.get("majorTickStyle")},i.prototype.setMinorTickStyle=function(t){if("function"==typeof t){var i=this.get("minorTickStyle");return i!==mh?this.set("minorTickStyle",t(i)):this}return this.set("minorTickStyle",t)},i.prototype.getMinorTickStyle=function(){return this.get("minorTickStyle")},i.prototype.setLocale=function(t){return this.set("locale",t)},i.prototype.getLocale=function(){return this.get("locale")},i.prototype.setDateOrigin=function(t){return this.set("dateOrigin",t)},i.prototype.getDateOrigin=function(){return this.get("dateOrigin")},i.prototype.setFormattingDecade=function(t,i){return this.withMutations((function(n){return t&&(n=n.set("formatOptionsMajorDecade",t)),i&&(n=n.set("formatOptionsMinorYear",i)),n}))},i.prototype.setFormattingYear=function(t,i){return this.withMutations((function(n){return t&&(n=n.set("formatOptionsMajorYear",t)),i&&(n=n.set("formatOptionsMinorMonth",i)),n}))},i.prototype.setFormattingMonth=function(t,i,n){return this.withMutations((function(e){return t&&(e=e.set("formatOptionsGreatYear",t)),i&&(e=e.set("formatOptionsMajorMonth",i)),n&&(e=e.set("formatOptionsMinorWeek",n)),e}))},i.prototype.setFormattingWeek=function(t,i,n){return this.withMutations((function(e){return t&&(e=e.set("formatOptionsGreatMonth",t)),i&&(e=e.set("formatOptionsMajorWeek",i)),n&&(e=e.set("formatOptionsMinorDay",n)),e}))},i.prototype.setFormattingDay=function(t,i,n){return this.withMutations((function(e){return t&&(e=e.set("formatOptionsGreatWeek",t)),i&&(e=e.set("formatOptionsMajorDay",i)),n&&(e=e.set("formatOptionsMinorHour",n)),e}))},i.prototype.setFormattingHour=function(t,i,n){return this.withMutations((function(e){return t&&(e=e.set("formatOptionsGreatDay",t)),i&&(e=e.set("formatOptionsMajorHour",i)),n&&(e=e.set("formatOptionsMinorMinute",n)),e}))},i.prototype.setFormattingMinute=function(t,i,n){return this.withMutations((function(e){return t&&(e=e.set("formatOptionsGreatHour",t)),i&&(e=e.set("formatOptionsMajorMinute",i)),n&&(e=e.set("formatOptionsMinorSecond",n)),e}))},i.prototype.setFormattingSecond=function(t,i,n){return this.withMutations((function(e){return t&&(e=e.set("formatOptionsGreatMinute",t)),i&&(e=e.set("formatOptionsMajorSecond",i)),n&&(e=e.set("formatOptionsMinorMillisecond",n)),e}))},i.prototype.setFormattingMilliSecond=function(t,i){return this.withMutations((function(n){return t&&(n=n.set("formatOptionsGreatSecond",t)),i&&(n=n.set("formatOptionsMajorMilliSecond",i)),n}))},i}(me({locale:void 0,dateOrigin:void 0,cursorFormatter:void 0,greatTickStyle:new yh,majorTickStyle:new yh,minorTickStyle:new yh,formatOptionsMajorCentury:{year:"numeric"},formatOptionsMinorDecade:{year:"numeric"},formatOptionsMajorDecade:{year:"numeric"},formatOptionsMinorYear:{year:"numeric"},formatOptionsMajorYear:{year:"numeric"},formatOptionsMinorMonth:{month:"short"},formatOptionsGreatYear:{year:"numeric"},formatOptionsMajorMonth:{month:"long"},formatOptionsMinorWeek:{day:"numeric"},formatOptionsGreatMonth:{year:"numeric",month:"long"},formatOptionsMajorWeek:{day:"numeric",weekday:"short"},formatOptionsMinorDay:{day:"numeric",weekday:"short"},formatOptionsGreatWeek:function(t,i,n){var e=new Date(t),r=function(t){var i=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()));i.setUTCDate(i.getUTCDate()+4-(i.getUTCDay()||7));var n=new Date(Date.UTC(i.getUTCFullYear(),0,1));return Math.ceil(((i.getTime()-n.getTime())/864e5+1)/7)}(e);return new Intl.DateTimeFormat(n,{year:"numeric",month:"long"}).format(e)+" Week "+r},formatOptionsMajorDay:{weekday:"long",day:"numeric"},formatOptionsMinorHour:{hour:"2-digit",minute:"2-digit"},formatOptionsGreatDay:{year:"numeric",month:"long",day:"numeric"},formatOptionsMajorHour:{hour:"2-digit",minute:"2-digit"},formatOptionsMinorMinute:{hour:"2-digit",minute:"2-digit"},formatOptionsGreatHour:{year:"numeric",month:"long",day:"numeric"},formatOptionsMajorMinute:{hour:"2-digit",minute:"2-digit"},formatOptionsMinorSecond:{hour:"2-digit",minute:"2-digit",second:"2-digit"},formatOptionsGreatMinute:{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"},formatOptionsMajorSecond:{second:"2-digit"},formatOptionsMinorMillisecond:function(t){var i=new Date(t);return""+(i.getSeconds()+i.getUTCMilliseconds()/1e3).toFixed(2)},formatOptionsGreatSecond:{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"},formatOptionsMajorMilliSecond:function(t){var i=new Date(t);return""+(i.getSeconds()+i.getUTCMilliseconds()/1e3).toFixed(1)}})),Ph=function(t,i){return function(n,e){var r=e-n;if(i){var s=Math.log10(r/2),o=Math.pow(10,Math.floor(s-t)),h=Math.floor(n/(10*o))*o*10;return Zo(h,e,o,void 0)}var u=Math.log10(r),a=Math.pow(10,Math.floor(u-t));return Xo(n,e,a)}},Dh=function(t,i,n,e,r,s){return 0===i?t.filter((function(t,i){return i%2==0})):1===i?t.filter((function(t,i){return i%5==0})):void 0},_h=Jo(void 0,2,5),Rh=function(t,i,n,e,r,s){return 0===i?[t[1],t[3],t[5]]:1===i?[t[0],t[3]]:2===i?[t[1]]:void 0},zh=function(t,i){var n=Bo(t),e=Lo(t);if(i)return function(t,i){for(var r=[],s=Math.floor(n(t)),o=Math.ceil(n(i)),h=s-1;h<=o+1;h+=1){var u=Math.pow(e,h);r.push(u)}return r};var r=10===t?9:4;return function(t,i){for(var s=Math.round(n(t)),o=Math.round(n(i)),h=[],u=Math.pow(e,s),a=(Math.pow(e,o)-u)/r,f=1;f<=r;f+=1){var c=u+a*f;c>t&&c=24*Vh?"MajorHours12":n>=Vh?"MajorHours":n>=10*Gh?"MajorMinutes15":n>=1*Gh?"MajorMinutes":n>=10*Hh?"MajorSeconds15":n>=Hh?"MajorSeconds":n>=100*jh?"MajorMilliseconds100":n>=10*jh?"MajorMilliseconds10":n>=1*jh?"MajorMilliseconds":n>=100*Wh?"MajorMicroseconds100":n>=10*Wh?"MajorMicroseconds10":n>=1*Wh?"MajorMicroseconds":n<=1*Wh?"MajorNanoseconds100":"Unknown"},Xh={hhmmss:function(t){var i=Math.abs(t),n=t>=0?"":"-",e=Math.floor(i/Vh);i%=Vh;var r=Math.floor(i/Gh);i%=Gh;var s=Math.floor(i/Hh);return""+n+As(e,2)+":"+As(r,2)+":"+As(s,2)},hhmmssmmm:function(t){var i=Math.abs(t),n=t>=0?"":"-",e=Math.floor(i/Vh);i%=Vh;var r=Math.floor(i/Gh);i%=Gh;var s=Math.floor(i/Hh);i%=Hh;var o=Math.floor(i/jh);return""+n+As(e,2)+":"+As(r,2)+":"+As(s,2)+"."+As(o,3)},hhmmssmmmuuu:function(t){var i=Math.abs(t),n=t>=0?"":"-",e=Math.floor(i/Vh),r=Math.floor(i/Gh)%60,s=Math.floor(i/Hh)%60,o=Math.floor(i/jh)%1e3,h=t.toLocaleString("en-US",{minimumFractionDigits:3,maximumFractionDigits:3}).split(".")[1];return""+n+As(e,2)+":"+As(r,2)+":"+As(s,2)+"."+As(o,3)+h},hhmmssmmmuuunnn:function(t){var i=Math.abs(t),n=t>=0?"":"-",e=Math.floor(i/Vh),r=Math.floor(i/Gh)%60,s=Math.floor(i/Hh)%60,o=Math.floor(i/jh)%1e3,h=t.toLocaleString("en-US",{minimumFractionDigits:6,maximumFractionDigits:6}).split(".")[1];return""+n+As(e,2)+":"+As(r,2)+":"+As(s,2)+"."+As(o,3)+h}},Zh={MajorHours12:{major:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){var r=12*Vh;return t=Math.floor(t/(4*r))*r*4,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,4)},minor:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){return Xo(t,i,1*Vh)},fitKeyValues:Jo({},2,3,4,6)},defaultValueFormatter:Xh.hhmmss},MajorHours:{major:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){var r=Vh;return t=Math.floor(t/(12*r))*r*12,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,6,12)},minor:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){return Xo(t,i,5*Gh)},fitKeyValues:Jo({},2,4,6)},defaultValueFormatter:Xh.hhmmss},MajorMinutes15:{major:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){var r=15*Gh;return t=Math.floor(t/Vh)*Vh,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2)},minor:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){return Xo(t,i,1*Gh)},fitKeyValues:Jo({},3,5)},defaultValueFormatter:Xh.hhmmss},MajorMinutes:{major:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){var r=Gh;return t=Math.floor(t/(10*r))*r*10,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,5)},minor:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){return Xo(t,i,5*Hh)},fitKeyValues:Jo({},2,3,4,6)},defaultValueFormatter:Xh.hhmmss},MajorSeconds15:{major:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){var r=15*Hh;return t=Math.floor(t/(4*r))*r*4,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,4)},minor:{format:Xh.hhmmss,getKeyValues:function(t,i,n,e){return Xo(t,i,1*Hh)},fitKeyValues:Jo({},3,5)},defaultValueFormatter:Xh.hhmmss},MajorSeconds:{major:{format:Xh.hhmmssmmm,getKeyValues:function(t,i,n,e){var r=Hh;return t=Math.floor(t/(10*r))*r*10,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,5)},minor:{format:Xh.hhmmssmmm,getKeyValues:function(t,i,n,e){return Xo(t,i,100*jh)},fitKeyValues:Jo({},2,3,5)},defaultValueFormatter:Xh.hhmmssmmm},MajorMilliseconds100:{major:{format:Xh.hhmmssmmm,getKeyValues:function(t,i,n,e){var r=100*jh;return t=Math.floor(t/(10*r))*r*10,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,5)},minor:{format:Xh.hhmmssmmm,getKeyValues:function(t,i,n,e){return Xo(t,i,10*jh)},fitKeyValues:Jo({},2,3,5)},defaultValueFormatter:Xh.hhmmssmmm},MajorMilliseconds10:{major:{format:Xh.hhmmssmmm,getKeyValues:function(t,i,n,e){var r=10*jh;return t=Math.floor(t/(10*r))*r*10,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,5)},minor:{format:Xh.hhmmssmmm,getKeyValues:function(t,i,n,e){return Xo(t,i,jh)},fitKeyValues:Jo({},2,3,5)},defaultValueFormatter:Xh.hhmmssmmm},MajorMilliseconds:{major:{format:Xh.hhmmssmmmuuu,getKeyValues:function(t,i,n,e){var r=jh;return t=Math.floor(t/(10*r))*r*10,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,5)},minor:{format:Xh.hhmmssmmmuuu,getKeyValues:function(t,i,n,e){return Xo(t,i,100*Wh)},fitKeyValues:Jo({},2)},defaultValueFormatter:Xh.hhmmssmmmuuu},MajorMicroseconds100:{major:{format:Xh.hhmmssmmmuuu,getKeyValues:function(t,i,n,e){var r=100*Wh;return t=Math.floor(t/(10*r))*r*10,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,5)},minor:{format:Xh.hhmmssmmmuuu,getKeyValues:function(t,i,n,e){return Xo(t,i,10*Wh)},fitKeyValues:Jo({},2,3,5)},defaultValueFormatter:Xh.hhmmssmmmuuu},MajorMicroseconds10:{major:{format:Xh.hhmmssmmmuuu,getKeyValues:function(t,i,n,e){var r=10*Wh;return t=Math.floor(t/(10*r))*r*10,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,5)},minor:{format:Xh.hhmmssmmmuuu,getKeyValues:function(t,i,n,e){return Xo(t,i,1*Wh)},fitKeyValues:Jo({},2,3,5)},defaultValueFormatter:Xh.hhmmssmmmuuu},MajorMicroseconds:{major:{format:Xh.hhmmssmmmuuunnn,getKeyValues:function(t,i,n,e){var r=1*Wh;return t=Math.floor(t/(10*r))*r*10,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,5)},minor:{format:Xh.hhmmssmmmuuunnn,getKeyValues:function(t,i,n,e){return Xo(t,i,100*Uh)},fitKeyValues:Jo({},2,3,5)},defaultValueFormatter:Xh.hhmmssmmmuuunnn},MajorNanoseconds100:{major:{format:Xh.hhmmssmmmuuunnn,getKeyValues:function(t,i,n,e){var r=100*Uh;return t=Math.floor(t/(10*r))*r*10,Zo(t,i,r,void 0)},fitKeyValues:Jo({ignore:"first"},2,5)},minor:{format:Xh.hhmmssmmmuuunnn,getKeyValues:function(t,i,n,e){return Xo(t,i,10*Uh)},fitKeyValues:Jo({},2,3,5)},defaultValueFormatter:Xh.hhmmssmmmuuunnn},Unknown:{major:{format:function(t,i,n){return""},getKeyValues:function(t,i,n,e){return[]},fitKeyValues:void 0},minor:{format:function(t,i,n){return""},getKeyValues:function(t,i,n,e){return[]},fitKeyValues:void 0},defaultValueFormatter:function(t,i,n){return""}}},Kh=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.se=function(t){var i=this.timeOrigin||0,n=[{sr:"Major ticks",hr:0,Ce:this.majorTickStyle,Ae:function(t,n,e){var r=Yh(Math.min(n.getInnerStart(),n.getInnerEnd()),Math.max(n.getInnerStart(),n.getInnerEnd()));return(0,Zh[r].major.format)(t+i,n,e)},pe:function(t,i,n,e){var r=Yh(n,e);return(0,Zh[r].major.getKeyValues)(t,i,n,e)},Gn:{Oe:function(t,i,n,e,r,s){var o=Yh(r,s),h=Zh[o].major.fitKeyValues;if(h)return h(t,i,n,e,r,s)}},xe:void 0}];return this.minorTickStyle instanceof yh&&n.push({sr:"Minor ticks",hr:1,Ce:this.minorTickStyle,Ae:function(t,n,e){var r=Yh(Math.min(n.getInnerStart(),n.getInnerEnd()),Math.max(n.getInnerStart(),n.getInnerEnd()));return(0,Zh[r].minor.format)(t+i,n,e)},pe:function(t,i,n,e){var r=Yh(n,e);return(0,Zh[r].minor.getKeyValues)(t,i,n,e)},Gn:{Oe:function(t,i,n,e,r,s){var o=Yh(r,s),h=Zh[o].minor.fitKeyValues;if(h)return h(t,i,n,e,r,s)}},xe:void 0}),{cn:[],ln:n,rn:this.cursorFormatter||function(t,n,e){var r=Yh(Math.min(n.getInnerStart(),n.getInnerEnd()),Math.max(n.getInnerStart(),n.getInnerEnd()));return Zh[r].defaultValueFormatter(t+i,n,e)},ae:1e-4,fe:864e6}},i.prototype.setMajorTickStyle=function(t){return"function"==typeof t?this.set("majorTickStyle",t(this.get("majorTickStyle"))):this.set("majorTickStyle",t)},i.prototype.getMajorTickStyle=function(){return this.get("majorTickStyle")},i.prototype.setMinorTickStyle=function(t){if("function"==typeof t){var i=this.get("minorTickStyle");return i!==mh?this.set("minorTickStyle",t(i)):this}return this.set("minorTickStyle",t)},i.prototype.getMinorTickStyle=function(){return this.get("minorTickStyle")},i.prototype.setCursorFormatter=function(t){return this.set("cursorFormatter",t)},i.prototype.getCursorFormatter=function(){return this.get("cursorFormatter")},i.prototype.setTimeOrigin=function(t){return this.set("timeOrigin",t)},i.prototype.getTimeOrigin=function(){return this.get("timeOrigin")},i}(Nh),qh={ZoomIn:{x:-43,y:0},ZoomOut:{x:-65,y:0},ZoomToFit:{x:-86,y:0},ZoomInX:{x:-107,y:-1},ZoomOutX:{x:-128,y:-3},ZoomInY:{x:-150,y:0},ZoomOutY:{x:-171,y:0},EnableAnimation:{x:-276,y:0},DisableAnimation:{x:-298,y:0},CollapseMenu:{x:0,y:0},ShowMenu:{x:-21,y:0}},Jh={ZoomIn:{x:-43,y:0},ZoomOut:{x:-65,y:0},ZoomToFit:{x:-86,y:0},ZoomInX:{x:-107,y:-1},ZoomOutX:{x:-128,y:-3},ZoomInY:{x:-150,y:0},ZoomOutY:{x:-171,y:0},EnableAnimation:{x:-276,y:0},DisableAnimation:{x:-298,y:0},CollapseMenu:{x:0,y:0},ShowMenu:{x:-21,y:0}};function Qh(t,i,n){return n<0?t:n>1?i:Ae(t.getR()+n*(i.getR()-t.getR()),t.getG()+n*(i.getG()-t.getG()),t.getB()+n*(i.getB()-t.getB()),t.getA()+n*(i.getA()-t.getA()))}var $h,tu,iu={seriesBackgroundTint:Ae(20,20,20),dashBGStops:[{color:Ae(50,51,52),offset:0},{color:Ae(14,15,16),offset:.5},{color:Ae(0,0,1),offset:1}],panelBGStops:[{color:Ae(120,120,120,100),offset:0},{color:Ae(0,1,1,50),offset:1}],seriesBGStops:[{color:Ae(20,20,20,200),offset:0},{color:Ae(0,0,0,255),offset:1}],spiderWebStops:[{color:Ae(200,200,200,150),offset:0},{color:Ae(50,50,50,150),offset:.5},{color:Ae(255,255,255,150),offset:1}],legendFillStops:[{color:Ae(80,80,80,130),offset:0},{color:Ae(30,30,30,130),offset:1}],axisColorStops:[{color:Ae(255,255,255),offset:0},{color:Ae(50,50,50),offset:1}],axisOverlayColorStops:[{color:Ae(255,255,255,50),offset:0},{color:Ae(255,255,255,20),offset:.2},{color:Ae(255,255,255,30),offset:.8},{color:Ae(255,255,255,50),offset:1}],gridColor:Ae(200,200,200),isDarkTheme:!0,colorStrength:1,colorSaturation:.7,darkLightBlendColor:Ae(255,255,255,255),legendStrokeColor:Ae(255,255,255),dashRadialFillCenterX:.8,dashRadialFillCenterY:.8,forceLabelsWhite:!1,explicitMasterColor:Ae(100,100,100),gradientStrength:1,cursorSolverColor:Ae(32,32,32),mapColor:Ae(100,100,100),gaugeValueColor:Ae(100,100,100),useFullHSVPalette:!0,customPaletteSteps:[Ae(255,0,0),Ae(0,255,0),Ae(0,0,255)]},nu=Ae(254,204,0,.7),eu=function(i){var n=e(e({},iu),i),r=n.seriesBackgroundTint,s=n.dashBGStops,o=n.panelBGStops,h=n.seriesBGStops,u=n.spiderWebStops,a=n.legendFillStops,f=n.axisColorStops,c=n.axisOverlayColorStops,l=n.gridColor,d=n.isDarkTheme,v=n.colorStrength,y=n.colorSaturation,S=n.darkLightBlendColor,m=n.legendStrokeColor,b=n.dashRadialFillCenterX,g=n.dashRadialFillCenterY,w=n.forceLabelsWhite,p=n.masterHueDeg,k=n.sliceHueStep,x=n.explicitMasterColor,M=n.gradientStrength,A=n.cursorSolverColor,F=n.mapColor,T=n.gaugeValueColor,C=Te(p,y,v),B=Qh(C,Ae(255,255,255),.5),L=Qh(C,Ae(255,255,255),.2),I=Qh(C,Ae(255,255,255),.8),O=Qh(C,Ae(255,255,255),.9),P=Qh(C,Ae(255,255,255),.8),D=B,_=Qh(S,C,.3),R=Qh(S,C,.5),z=[{color:Qh(F,Ae(255,255,255),.4*M),offset:0},{color:Qh(F,Ae(0,0,0),.1*M),offset:1}],E=Qh(O,Ae(0,0,0),.8),N=h[0].color.setA(60);function V(t,i){var e=t*k+i;e<0&&(e+=360*(1+Math.abs(Math.floor(e/360)))),e%=360;var r=n.customPaletteSteps.length,s=Math.floor(e%360/(360/r)),o=s+1;o>=r&&(o=0);var h=e%(360/r)/(360/r),u=Qh(n.customPaletteSteps[s],n.customPaletteSteps[o],h),a=Qh(C,S,.2);return Qh(a,u,.6)}function G(t){if(!0===n.useFullHSVPalette){var i=p+t*k;i<0&&(i+=360*(1+Math.abs(Math.floor(i/360))));var e=Te(i,y,v),r=Qh(C,S,.2);return Qh(r,e,.6)}return V(t,0)}function H(t){if(!0===n.useFullHSVPalette){var i=p+t*k+180;i<0&&(i+=360*(1+Math.abs(Math.floor(i/360))));var e=Te(i,y,v),r=Qh(C,S,.2);return Qh(r,e,.6)}return V(t,180)}d?w&&(I=Ae(255,255,255),_=Ae(255,255,255),P=Ae(255,255,255),B=Ae(255,255,255),D=Ae(255,255,255)):(S=Ae(0,0,0,255),C=Te(p,y,v),x!==iu.explicitMasterColor&&(C=x),B=Qh(C,Ae(0,0,0),.5),L=Qh(C,Ae(0,0,0),.2),I=Qh(C,Ae(0,0,0),.8),O=Qh(C,Ae(0,0,0),.9),l=Ae(40,40,40),P=Qh(C,Ae(0,0,0),.8),D=B,m=Ae(40,40,40),_=Qh(S,C,.3),R=Qh(S,C,.5),z=[{color:Qh(F,Ae(255,255,255),.8*M),offset:0},{color:Qh(F,Ae(0,0,0),.8*M),offset:1}],u=[{color:Ae(60,60,60,150),offset:0},{color:Ae(100,100,100,150),offset:.5},{color:Ae(80,80,80,150),offset:1}],a=[{color:Qh(C,Ae(100,100,100,0),.6*M),offset:0},{color:Qh(C,Ae(255,255,255,0),.6*M),offset:1}],c=[{color:Ae(128,128,128,50),offset:0},{color:Ae(128,128,128,20),offset:.2},{color:Ae(128,128,128,30),offset:.8},{color:Ae(128,128,128,50),offset:1}],E=Qh(O,Ae(255,255,255),.8));var j=new Je({stops:s,position:{x:b,y:g}}),W=new nr({thickness:1,fillStyle:new Qe({angle:45,stops:[{color:Ae(255,255,255,150),offset:0},{color:Ae(50,50,50,150),offset:1}]}),highlightThicknessMultiplier:1}),U=new nr({thickness:6,fillStyle:new Ee({color:Ae(0,0,0,0)}),highlightThicknessMultiplier:1}),Y=new Je({stops:o,position:{x:.5,y:.5},shape:t.GradientShape.circle,extent:t.GradientExtent.farthestCorner}),X=new nr({thickness:1,fillStyle:new Ee({color:S.setA(20)})}),Z=new Je({stops:h,position:{x:.5,y:.5},shape:t.GradientShape.circle,extent:t.GradientExtent.farthestCorner}),K=new nr({thickness:0,fillStyle:new Ee({color:Ae(0,0,0)})}),q="Verdana",J=new sh({size:16,family:q,style:"normal",weight:"normal"}),Q=new Ee({color:P}),$=new Ee({color:S.setA(20)}),tt=new nr({thickness:2,fillStyle:new Ee({color:S.setA(150)})}),it=$,nt=tt,et=new Ee({color:B}),rt=new sh({size:16,family:q,style:"normal",weight:"normal"}),st=new nr({thickness:1,fillStyle:new Ee({color:l.setA(75)})}),ot=new nr({thickness:1,fillStyle:new Ee({color:l.setA(50)})}),ht=new nr({thickness:1,fillStyle:new Ee({color:l.setA(20)})}),ut=new nr({thickness:2,fillStyle:new Ee({color:l.setA(200)})}),at=new nr({thickness:1,fillStyle:new Ee({color:l.setA(200)})}),ft=new nr({thickness:1,fillStyle:new Ee({color:l.setA(150)})}),ct=new sh({size:13,family:q,style:"italic",weight:"bold"}),lt=new Ee({color:I}),dt=new sh({size:12,family:q,style:"italic",weight:"normal"}),vt=new Ee({color:I}),yt=new sh({size:10,family:q,style:"italic",weight:"normal"}),St=new Ee({color:I}),mt=new nr({thickness:2,fillStyle:new Qe({angle:45,stops:f})}),bt=new nr({thickness:0,fillStyle:new Ee({color:Ae(0,0,0)})}),gt=new Qe({angle:45,stops:c}),wt=new Qe({angle:45,stops:[{color:L.setA(50),offset:0},{color:Qh(L,S,.3).setA(50),offset:1}]}),pt=new nr({thickness:1,fillStyle:new Ee({color:L.setA(100)})}),kt=new nr({thickness:3,fillStyle:new Ee({color:Qh(L,S,.3).setA(150)})}),xt=function(t){return new Ee({color:Qh(G(t),S,.3)})},Mt=new nr({thickness:1,fillStyle:new Ee({color:N})}),At=Mt,Ft=new nr({thickness:1,fillStyle:new Ee({color:R})}),Tt=new Ee({color:Qh(Te(120,y,v),C,.2)}),Ct=new Ee({color:Qh(Te(0,y,v),C,.2)}),Bt=new nr({thickness:2,fillStyle:Tt,highlightThicknessMultiplier:1}),Lt=new nr({thickness:2,fillStyle:Ct,highlightThicknessMultiplier:1}),It=new Ee({color:Ae(255,255,255)}),Ot=new nr({thickness:0,fillStyle:new Ee({color:Ae(0,0,0)})}),Pt=new Ee({color:Qh(Qh(A,S,.01),C,.1).setA(220)}),Dt=new nr({thickness:1,fillStyle:new Ee({color:Qh(A,S,.5).setA(240)})}),_t=new Ee({color:Qh(A,S,.99)}),Rt=new sh({size:13,family:q,style:"italic",weight:"normal"}),zt=new nr({thickness:1,fillStyle:new Ee({color:Ae(150,150,150)})}),Et=new Ee({color:Qh(Qh(A,S,.01),C,.1).setA(220)}),Nt=new nr({thickness:1,fillStyle:new Ee({color:Qh(A,S,.5).setA(240)})}),Vt=new Ee({color:Qh(A,S,.99)}),Gt=new sh({size:15,family:q,style:"normal",weight:"normal"}),Ht=dt,jt=at,Wt=vt,Ut=new nr({thickness:2,fillStyle:new Je({stops:u,position:{x:.2,y:.2},shape:t.GradientShape.circle,extent:t.GradientExtent.farthestCorner})}),Yt=Ut,Xt=new nr({thickness:3,fillStyle:new Ee({color:Ae(200,200,200)})}),Zt=new Ee({color:I}),Kt=new sh({size:15,family:q,style:"normal",weight:"normal"}),qt=new Ee({color:I}),Jt=new sh({size:15,family:q,style:"normal",weight:"normal"}),Qt=new yh({gridStrokeStyle:new nr({thickness:1,fillStyle:new Qe({angle:45,stops:[{color:Ae(50,50,50,150),offset:0},{color:Ae(255,255,255,150),offset:1}]})}),tickLength:7,tickStyle:new nr({thickness:1,fillStyle:new Ee({color:l.setA(200)})}),tickPadding:0,labelFont:new sh({size:14,family:q,style:"normal",weight:"normal"}),labelPadding:0,labelFillStyle:new Ee({color:I})}),$t=new nr({thickness:2,fillStyle:new Je({stops:[{color:Ae(50,50,50,150),offset:0},{color:Ae(255,255,255,150),offset:1}],position:{x:.4,y:.8},shape:t.GradientShape.circle,extent:t.GradientExtent.farthestCorner})}),ti=new Ee({color:B}),ii=new nr({thickness:2,fillStyle:new Qe({angle:45,stops:[{color:Ae(100,100,100,150),offset:0},{color:Ae(255,255,255,150),offset:1}]})}),ni=new Ee({color:B}),ei={x:new nr({thickness:1,fillStyle:new Ee({color:Ae(200,200,200)})}),y:new nr({thickness:1,fillStyle:new Ee({color:Ae(200,200,200)})}),z:new nr({thickness:1,fillStyle:new Ee({color:Ae(200,200,200)})})},ri=ir;var si=new nr({thickness:1,fillStyle:new Ee({color:O})}),oi=new nr({thickness:1,fillStyle:new Ee({color:D})}),hi=new Ee({color:I}),ui=new sh({size:14,family:q,style:"normal",weight:"normal"}),ai=new Je({stops:[{color:r,offset:.5},{color:Ae(0,0,0,255),offset:1}],position:{x:.5,y:.5}}),fi=new nr({thickness:1.5,fillStyle:new Je({stops:[{color:Ae(200,200,200,150),offset:0},{color:Ae(50,50,50,150),offset:.5},{color:Ae(255,255,255,150),offset:1}],position:{x:.2,y:.2},shape:t.GradientShape.circle,extent:t.GradientExtent.farthestCorner})}),ci=new Je({stops:[{color:Qh(T,Ae(255,255,255,255),.5*M),offset:0},{color:T,offset:.5},{color:Qh(T,Ae(0,0,0,255),.5*M),offset:1}],position:{x:.5,y:.5}}),li=new Qe({angle:0,stops:a}),di=new nr({thickness:1,fillStyle:new Ee({color:m})}),vi=new Ee({color:_}),yi=new sh({size:13,family:q,style:"italic",weight:"normal"}),Si=li,mi=di,bi=vi;var gi=new Qe({angle:-45,stops:z}),wi=new nr({thickness:1,fillStyle:new Ee({color:O})}),pi=new Ee({color:Ae(0,0,0,0)}),ki=new nr({thickness:1,fillStyle:new Ee({color:E})}),xi=li,Mi=di,Ai=new nr({thickness:1,fillStyle:xt(0)}),Fi=Ai.getFillStyle(),Ti=Ai,Ci=ir,Bi=new nr({thickness:1,fillStyle:new Ee({color:Ae(0,0,0)})}),Li=mh,Ii=new yh({gridStrokeStyle:st,tickStyle:ut,tickLength:50,tickPadding:-14,labelFont:ct,labelPadding:0,labelFillStyle:lt}),Oi=new yh({gridStrokeStyle:ot,tickStyle:at,tickLength:7,tickPadding:0,labelFont:dt,labelPadding:0,labelFillStyle:vt}),Pi=new yh({gridStrokeStyle:ht,tickStyle:ft,tickLength:4,tickPadding:5,labelFont:yt,labelPadding:0,labelFillStyle:St}),Di=new Eh({extremeTickStyle:Li,majorTickStyle:Oi,minorTickStyle:Pi}),_i=new Oh({greatTickStyle:Ii,majorTickStyle:Oi,minorTickStyle:Pi}),Ri=new Kh({majorTickStyle:Oi,minorTickStyle:Pi});return{onScreenMenuButtonBackgroundColor:nu,onScreenMenuButtonIconSet:Jh,segmentSeriesStyle:Ai,boxFigureStyle:Fi,boxFigureLineStyle:Ti,boxFigureStrokeStyle:Ci,boxFigureMedianLineStyle:Bi,uiButtonFillStyle:bi,uiButtonSize:10,candleStickStyle:Ft,candleStickPositiveStyle:Tt,candleStickNegativeStyle:Ct,candleStickPositiveStrokeStyle:ir,candleStickNegativeStrokeStyle:ir,OHLCBarPositiveStyle:Bt,OHLCBarNegativeStyle:Lt,lcjsBackgroundFillStyle:j,lcjsBackgroundStrokeStyle:W,dashboardSplitterStyle:U,panelBackgroundFillStyle:Y,panelBackgroundStrokeStyle:X,chartTitleFont:J,chartTitleFillStyle:Q,seriesBackgroundFillStyle:Z,seriesBackgroundStrokeStyle:K,chartXYZoomingRectangleFillStyle:$,chartXYZoomingRectangleStrokeStyle:tt,chartXYFittingRectangleFillStyle:it,chartXYFittingRectangleStrokeStyle:nt,axisTitleFillStyle:et,axisTitleFont:rt,axisStyle:mt,axisOverlayStyle:gt,axisNibOverlayStyle:gt,axisNibStyle:bt,numericTickStrategy:Di,dateTimeTickStrategy:_i,timeTickStrategy:Ri,pointMarkerFillStyle:It,pointMarkerStrokeStyle:Ot,resultTableFillStyle:Pt,resultTableStrokeStyle:Dt,resultTableTextFillStyle:_t,resultTableTextFont:Rt,customTickGridStrokeStyle:zt,customTickPointerLength:7,uiPointableTextBoxFillStyle:Et,uiPointableTextBoxFont:Gt,uiPointableTextBoxStrokeStyle:Nt,uiPointableTextBoxTextFillStyle:Vt,uiTickFont:Ht,uiTickStrokeStyle:jt,uiTickTextFillStyle:Wt,uiBackgroundFillStyle:Si,uiBackgroundStrokeStyle:mi,uiTextFillStyle:vi,uiFont:yi,seriesFillStyle:xt,seriesStrokeStyle:function(t){return new nr({thickness:2,fillStyle:new Ee({color:G(t)})})},seriesPointFillStyle:function(t){return new Ee({color:Qh(G(t),S,.3)})},seriesStrokeStyle3D:function(t){return new nr({thickness:5,fillStyle:new Ee({color:G(t)})})},seriesTriangulatedPointStyle3D:function(t){return new ch.Triangulated({shape:"sphere",size:10,fillStyle:new Ee({color:G(t)})})},seriesNonTriangulatedPointStyle3D:function(t){return new ch.Pixelated({size:5,fillStyle:new Ee({color:G(t)})})},heatmapGridSeriesWireframeStyle:Mt,surfaceSeriesFillStyle:function(t){return function(t){return new Ee({color:G(t)})}(t)},surfaceSeriesWireframeStyle:At,boxSeriesFillStyle:function(t){return function(t){return new Ee({color:G(t)})}(t)},mountainsStrokeStyle:function(t){return new nr({thickness:2,fillStyle:new Ee({color:G(t)})})},mountainsFillStyle:function(t){return new Qe({angle:180,stops:[{color:Qh(G(t),Ae(255,255,255,0),.1*M).setA(100),offset:0},{color:Qh(G(t),Ae(0,0,0,0),.5*M).setA(100),offset:1}]})},mountainsInvertedStrokeStyle:function(t){return new nr({thickness:2,fillStyle:new Ee({color:H(t)})})},mountainsInvertedFillStyle:function(t){return new Qe({angle:0,stops:[{color:Qh(H(t),Ae(255,255,255,0),.1*M).setA(100),offset:0},{color:Qh(H(t),Ae(0,0,0,0),.5*M).setA(100),offset:1}]})},bandFillStyle:wt,bandStrokeStyle:pt,constantLineStrokeStyle:kt,spiderSeriesFillStyle:function(t){return new Ee({color:G(t).setA(100)})},spiderSeriesStrokeStyle:function(t){return new nr({thickness:2,fillStyle:new Ee({color:G(t)}),highlightThicknessMultiplier:2})},spiderWebStyle:Ut,spiderAxisStyle:Yt,spiderAxisNibStyle:Xt,spiderScaleLabelFillStyle:Zt,spiderScaleLabelFont:Kt,spiderAxisLabelFillStyle:qt,spiderAxisLabelFont:Jt,polarRadialAxisTickStyle:Qt,polarRadialAxisStyle:$t,polarRadialAxisTitleStyle:ti,polarAmplitudeAxisStyle:ii,polarAmplitudeAxisTitleStyle:ni,axesStyles3D:ei,boundingBoxStyle3D:ri,sliceChartRadialFillStylePalette:function(t){var i=G(t);return new Je({stops:[{color:Qh(i,Ae(255,255,255),.2*M),offset:0},{color:i,offset:.5},{color:Qh(i,Ae(0,0,0),.2*M),offset:1}]})},sliceChartStackedFillStylePalette:function(t){var i=G(t);return new Qe({angle:90,stops:[{color:Qh(i,Ae(255,255,255),.5*M),offset:0},{color:i,offset:.5},{color:Qh(i,Ae(0,0,0),.5*M),offset:1}]})},sliceChartStrokeStyle:si,sliceLabelConnectorStyle:oi,sliceLabelFillStyle:hi,sliceLabelFont:ui,gaugeBackgroundFillStyle:ai,gaugeBackgroundStrokeStyle:fi,gaugeSliceFillStyle:ci,mapChartFillStyle:gi,mapChartStrokeStyle:wi,mapChartOutlierRegionFillStyle:pi,mapChartOutlierRegionStrokeStyle:ki,mapChartSeparateRegionFillStyle:xi,mapChartSeparateRegionStrokeStyle:Mi,rectangleSeriesFillStyle:function(t){var i=G(t);return new Qe({angle:90,stops:[{color:Qh(i,Ae(255,255,255),.5*M),offset:0},{color:i,offset:.5},{color:Qh(i,Ae(0,0,0),.8*M),offset:1}]})}}},ru=function(t,i,n){return t*(1-n)+i*n},su=function(t,i,n,e,r){if(void 0!==i.value&&void 0!==n.value&&void 0!==e.value&&void 0!==r.value){var s=(t.x-n.point.x)/(r.point.x-n.point.x),o=(r.point.y-n.point.y)*s+n.point.y,h=(t.x-i.point.x)/(e.point.x-i.point.x),u=(e.point.y-i.point.y)*h+i.point.y,a=(t.y-u)/(o-u),f=ru(n.value,r.value,s),c=ru(i.value,e.value,h);return ru(c,f,a)}},ou={warm:function(t){return function(i){return Te(60/(t-1)*i,.8,.8)}},cold:function(t){return function(i){return Te(60/(t-1)*i+180,.8,.8)}},fullSpectrum:function(t){return function(i){return Te(360/t*i,.8,.8)}},reverseSpectrum:function(t){return function(i){return Te(360/t*(t-i),.8,.8)}},flatUI:function(t){return function(i){return Te(360/t*i+8,.8,.8-.15/t*i)}},arction:function(t){return function(i){var n=1-.2/t*i;return Te(360/t*i+51,n,n)}},arctionWarm:function(t){return function(i){var n=t-1,e=1-.2/n*i;return Te(46-46/n*i+4,e,e)}},sunset:function(t){return function(i){var n=[170,320];return Te(i%2?n[0]:n[1],.8,.5+.5/(t-1)*i)}},dynamic:function(t){return function(i){var n=i%2,e=[234,346];return Te(n?e[0]:e[1],n?.3:.9,.5+.5/(t-1)*i)}},magenta:function(t){return function(i){var n=[.9,.6];return Te(354,i%2?n[0]:n[1],.5+.5/(t-1)*i)}},greyscale:function(t){return function(i){return Te(0,0,.25+.5/(t-1)*i)}},frozen:function(t){return function(i){var n=[.8,.6];return Te(160+80/(t-1)*i,.6,i%2?n[0]:n[1])}},retro:function(t){return function(i){var n=[6,183];return Te(i%2?n[0]:n[1],.7,.5+.5/(t-1)*i)}},crayons:function(t){return function(i){var n=180+230/(t-1)*i;return n>360&&(n-=360),Te(n,.9,.8)}},custom:function(t,i){return function(n){var e=.25+.5/(t-1)*n;if(!i)return Te(0,0,e);var r=i.getR()/255,s=i.getG()/255,o=i.getB()/255,h=Math.max(r,s,o),u=Math.min(r,s,o),a=0;if(h!==u){var f=h-u;switch(h){case r:a=(s-o)/f+(s1?1:n},fu=function(t,i){if(i.length<2)throw new Error("Invalid palette size");for(var n=0;n=0?(n.Yr.splice(i,1),n.Yr.length>0?n.$r.style.cursor=n.Yr[n.Yr.length-1][1]:n.$r.style.cursor="default"):(n.Yr.push([0,"default"]),n.$r.style.cursor="default")},this.ns=function(t){return n.es.l(t),n},this.rs=function(){return n.es.S()},this.ss=function(){n.Hr&&n.Hr(),n.os(),n.jr&&n.jr()},this.hs=function(t){return n.Er.set(t.us(),t),n.Er=new Map(u([],h(n.Er.entries())).sort((function(t,i){return t[0]-i[0]}))),t},this.fs=function(t){return n.Er.delete(t),n},this.bi=function(){return n.es.t=!1,n},this.gi=function(){return n.es.t=!0,n},this.cs=function(t){if(n.Xr){var i=n.ls;n.ls=t;var e=n.ds(t.clientX,t.clientY);n.vs=e;var r=Array.from(n.Er.values()).reverse().reduce((function(t,i){return t||(void 0!==i.ys()?i:void 0)}),void 0);Array.from(n.Er.values()).reverse().reduce((function(n,s){return void 0===r||s===r?s.cs(t,i,e.x,e.y,n):n}),!0)}},this.Ss=function(t){var i,e;n.Xr=!1,n.vs=void 0,n.ls=t;try{for(var r=o(n.Er.values()),s=r.next();!s.done;s=r.next()){s.value.Ss(t)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(i)throw i.error}}},this.bs=function(t){n.Xr=!0,n.ls=t},this.gs=function(){return n.vs},this.ws=function(){return Array.from(n.Er.values()).reduce((function(t,i){return t||void 0!==i.ys()}),!1)},this.ps={overrideInteractionMouseButtons:t&&t.overrideInteractionMouseButtons?t.overrideInteractionMouseButtons:void 0,resourcesBaseUrl:t&&void 0!==t.resourcesBaseUrl&&null!==t.resourcesBaseUrl?t.resourcesBaseUrl:"resources",warnings:!t||!("warnings"in t)||"boolean"!=typeof t.warnings||t.warnings},this.ks=this.xs();var e=i?i.container:void 0;if(e){if("string"==typeof e){var r=wr.document.getElementById(e);if(!r)throw new Error('Container "'+e+"\" doesn't exist.");this.$r=r}else this.$r=e;wr.addEventListener("resize",this.qr),this.Wr=function(){wr.removeEventListener("resize",n.qr)}}else{if(void 0===Hz){var s=wr.document.createElement("div");s.id="lcjs-auto-flexbox",s.style.position="relative",s.style.width="100%",s.style.display="flex",s.style.flexDirection="column",wr.document.body.appendChild(s),Hz=s,wr.addEventListener("resize",Xz)}for(var a=1;null!==wr.document.getElementById("chart-"+a);)a+=1;this.$r=wr.document.createElement("div"),this.$r.id="chart-"+a,this.$r.style.flex="1",Hz.appendChild(this.$r),Xz(),Yz.push(this.qr),this.Wr=function(){Hz&&Hz.removeChild(n.$r),Yz.includes(n.qr)&&Yz.splice(Yz.indexOf(n.qr),1),0===Yz.length&&Hz&&(wr.document.body.removeChild(Hz),Hz=void 0,wr.removeEventListener("resize",Xz))}}if(wr.ResizeObserver){this.Ms=new wr.ResizeObserver(function(t){var i,e;try{for(var r=o(t),s=r.next();!s.done;s=r.next()){s.value.target===n.$r&&n.qr()}}catch(t){i={error:t}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(i)throw i.error}}}.bind(this)),this.Ms.observe(this.$r)}this.$r.style.position="relative",this.$r.style.boxSizing="content-box",this.$r.addEventListener("fullscreenchange",this.qr),this.$r.addEventListener("webkitfullscreenchange",this.qr);var f=i?i.maxFps:void 0;this.As=f?-1===f?-1:0!==f?1e3/f:0:0;var c=new Map,d=!1;var v,y=function(t,i){return function(e){var r=function(t){return{x:t.clientX,y:t.clientY}}(e);switch(e.type){case"pointerover":case"pointerenter":case"pointermove":case"pointerdown":c.set(e.pointerId,r);break;default:c.delete(e.pointerId),d=!1}e.interactions=Array.from(c.values()),n.Fs(Nz.osm)>0&&n.handleOsmPointerEvent(e);var s=n.Ts(e);switch(e.pointerType){case"pen":case"mouse":t&&t(e);break;case"touch":!s&&i&&i(e);break;default:t&&t(e)}e.defaultPrevented&&(d=!0)}};if(this.$r.onwheel=this.Cs(zz.wheel),this.$r.oncontextmenu=this.Cs(zz.contextmenu),this.$r.onclick=this.Cs(zz.click),this.$r.ondblclick=this.Cs(zz.dbclick),this.$r.onlostpointercapture=function(){d=!1},this.$r.ontouchmove=function(t){d&&t.preventDefault()},this.$r.onpointerover=y(),this.$r.onpointerenter=y(this.bs),this.$r.onpointerdown=y(this.Cs(zz.mouseDown),this.Bs(Ez.touchStart)),this.$r.onpointermove=y(this.cs,this.Bs(Ez.touchMove)),this.$r.onpointerup=y(this.Cs(zz.mouseUp),this.Bs(Ez.touchEnd)),this.$r.onpointercancel=y(),this.$r.onpointerout=y(),this.$r.onpointerleave=y(this.Ss,this.Bs(Ez.touchEnd)),!wr.requestAnimationFrame||!wr.cancelAnimationFrame)throw new Error("LightningChart JS depends on requestAnimationFrame. Make sure to load a polyfill in older browsers.");wr.addEventListener("scroll",this.Zr),this.es=w(new xe({r:0,g:0,b:0,a:0})),this.Ls={container:(v=this).$r,scale:v.Rt,xn:function(t){return v.xn(t)},gs:function(){return v.gs()},ws:function(){return v.ws()},Is:function(t){return v.Is(t)},setMouseStyle:function(t,i){return v.Qr(t,i)},restoreMouseStyle:function(t){return v.ts(t)},clientLocation2Engine:function(t,i){return v.ds(t,i)},engineLocation2Client:function(t,i){return v.Os(t,i)},captureFrame:function(t,i){return v.Ps(t,i)},renderFrame:function(t,i,n){return void 0===n&&(n=!1),v.Ds(t,i,n)},layout:function(){return v.qr()},setBackgroundFillStyle:function(t){return v.setBackgroundFillStyle(t),this},setBackgroundStrokeStyle:function(t){return v.setBackgroundStrokeStyle(t),this},getBackgroundFillStyle:function(){return v.getBackgroundFillStyle()},getBackgroundStrokeStyle:function(){return v.getBackgroundStrokeStyle()}}}return t.prototype._s=function(){return this.ls},t.prototype.Rs=function(t){var i;(null===(i=this.ks.get(t.it))||void 0===i?void 0:i.delete(t.zs))&&this.$r.removeChild(t.Es)},t.prototype.Fs=function(t){return this.ks.get(t).size},t.prototype.xs=function(){var t=new Map;for(var i in Nz)({}).hasOwnProperty.call(Nz,i)&&(Number.isNaN(Number(i))||t.set(Number(i),new Map));return t},t.prototype.handleOsmPointerEvent=function(t){this.Ts(t)?this.Xr&&(this.Ss(t),"touch"===t.pointerType&&(t.forceTouchEnd=!0,this.Ns(Ez.touchEnd,t))):this.Xr||this.bs(t)},t.prototype.Is=function(t){var i,n=this.Vs(t);return this.$r.appendChild(n.Es),null===(i=this.ks.get(t))||void 0===i||i.set(n.zs,n),n},t.prototype.Vs=function(t){var i=this,n={zs:Uz(),it:t,Es:wr.document.createElement("div"),dispose:function(){return i.Rs(n)}};return n.Es.id=n.zs,n},t.prototype.Gs=function(){return this.Hs},t.prototype.js=function(){return this.Ws},t.prototype.setBackgroundFillStyle=function(t){return this.Us.$n(t),this},t.prototype.getBackgroundFillStyle=function(){return this.Us.Qn()},t.prototype.setBackgroundStrokeStyle=function(t){return this.Us.Ys(t),this},t.prototype.getBackgroundStrokeStyle=function(){return this.Us.Xs()},t.prototype.Zs=function(t){return this.jr=t,this},t.prototype.Ks=function(t){return this.Hr=t,this},t.prototype.qs=function(t){return this.Er.get(t)},t.prototype.Js=function(){return Array.from(this.Er.keys()).reverse().reduce((function(t,i){return i!==Number.MAX_SAFE_INTEGER&&i>t?i:t}),0)+1},t.prototype.Cs=function(t){var i=this;return function(n){return i.Qs(t,n)}},t.prototype.Qs=function(t,i){Array.from(this.Er.values()).reverse().reduce((function(n,e){return e.Qs(i,n,t)}),!0)},t.prototype.Bs=function(t){var i=this;return function(n){return i.Ns(t,n)}},t.prototype.Ns=function(t,i){for(var n=i.interactions.length,e=this.ds(i.clientX,i.clientY),r=new Array(n),s=0;s=t.left&&i.clientX<=t.right&&i.clientY>=t.top&&i.clientY<=t.bottom),n},t.prototype.io=function(t){return this.an.on("resize",t)},t.prototype.no=function(t){return this.an.off(t,"resize")},t.prototype.eo=function(){return this.an.topicOff("resize"),this},t.prototype.ro=function(){var t,i;if(this.Er)try{for(var n=o(this.Er.values()),e=n.next();!e.done;e=n.next()){e.value.ro()}}catch(i){t={error:i}}finally{try{e&&!e.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this.Hr=void 0,this.jr=void 0,wr.removeEventListener("scroll",this.Zr),this.$r.removeEventListener("fullscreenchange",this.qr),this.$r.removeEventListener("webkitfullscreenchange",this.qr),this.so(),this.Ms&&this.Ms.disconnect(),this.Wr(),this.Gr&&wr.cancelAnimationFrame(this.Gr)},t.prototype.so=function(){var t,i,n,e;try{for(var r=o(this.ks.values()),s=r.next();!s.done;s=r.next()){var h=s.value;try{for(var u=(n=void 0,o(h.values())),a=u.next();!a.done;a=u.next()){a.value.dispose()}}catch(t){n={error:t}}finally{try{a&&!a.done&&(e=u.return)&&e.call(u)}finally{if(n)throw n.error}}}}catch(i){t={error:i}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}},t.prototype.ds=function(t,i){return l(t-this.Vr.x,this.Vr.y-i)},t.prototype.Os=function(t,i){return l(t+this.Vr.x,this.Vr.y-i)},t}(),Jz=function(t){return void 0===t&&(t=1),{type:"horizontalProgressive",packager:function(i,n,e){if(i.length>1){for(var r=ao(n,e*t),s=Math.abs(r.x),o=i.length,h=[],u=0,a=0,f=i[0].x+s;av&&(v=i[a].y),i[a].y1){for(var r=ao(n,e*t),s=Math.abs(r.x),o=i.length,h=[],u=0,a=0,f=i[0].x-s;af&&a=f;)i[a].y>v&&(v=i[a].y),i[a].y1){for(var r=ao(n,e*t),s=Math.abs(r.y),o=i.length,h=[],u=0,a=0,f=i[0].y+s;av&&(v=i[a].x),i[a].x1){for(var r=ao(n,e*t),s=Math.abs(r.y),o=i.length,h=[],u=0,a=0,f=i[0].y-s;af&&a=f;)i[a].x>v&&(v=i[a].x),i[a].xn.max.x)){for(var s,o=Number.MAX_VALUE,h=e;h<=r;h+=1){var u=t[h],a=u.x>i.x?u.x-i.x:i.x-u.x;an.max.y)){for(var s,o=Number.MAX_VALUE,h=e;h<=r;h+=1){var u=t[h],a=u.y>i.y?u.y-i.y:i.y-u.y;aa.x?u.x:a.x,d=u.y>a.y?u.y:a.y;if(!(o&&(hl)||!o&&(hd)))for(var v=r,y=Math.floor((r+s)/2),S=s,m=-1;;){var b=h-(o?t[y].x:t[y].y);if(b*(e?-1:1)>0)v=Math.min(y+1,S),m=Math.floor((v+S)/2);else{if(0===Math.abs(b))return y;S=Math.max(y-1,v),m=Math.floor((v+S)/2)}if(m===y){var g=y>r?Math.abs(h-(o?t[y-1].x:t[y-1].y)):Is,w=ya.x?u.x:a.x,d=u.y>a.y?u.y:a.y;if(!(o&&(hl)||!o&&(hd)))for(var v=r,y=Math.floor((r+s)/2),S=s,m=-1;;){var b=h-(o?t[y].x:t[y].y);if(b*(e?-1:1)>0)v=Math.min(y+1,S),m=Math.floor((v+S)/2);else{if(0===Math.abs(b))return{a:y,b:y,lerpAmount:0};S=Math.max(y-1,v),m=Math.floor((v+S)/2)}if(m===y){if(b*(e?-1:1)<0&&y>r){var g=t[y-1],w=t[y];return{a:y-1,b:y,lerpAmount:o?(i.x-g.x)/(w.x-g.x):(i.y-g.y)/(w.y-g.y)}}if(y0},i.prototype.Uo=function(){return!1===this.uh&&this.Yo()},i.prototype.Jn=function(t){return this.$o.l(t),this},i.prototype.Kn=function(){return this.$o.S()},i.prototype.ie=function(t){return t instanceof sh?this.oh.l(t):this.oh.l(t(this.oh.S())),this},i.prototype.te=function(){return this.oh.S()},i.prototype.ah=function(t){return this.oh.l(this.oh.S().setFamily(t)),this},i.prototype.fh=function(){return this.oh.S().getFamily()},i.prototype.lh=function(t){return this.oh.l(this.oh.S().setSize(t)),this},i.prototype.dh=function(){return this.oh.S().getSize()},i.prototype.yh=function(t){return this.oh.l(this.oh.S().setWeight(t)),this},i.prototype.Sh=function(){return this.oh.S().getWeight()},i.prototype.mh=function(t){return this.oh.l(this.oh.S().setStyle(t)),this},i.prototype.bh=function(){return this.oh.S().getStyle()},i.prototype.gh=function(t){return this.oh.l(this.oh.S().setVariant(t)),this},i.prototype.wh=function(){return this.oh.S().getVariant()},i.prototype.ph=function(t){return this.th.l(t),this},i.prototype.kh=function(){return this.th.S()},i.prototype.ne=function(t){return this.sh.l(t),this},i.prototype.ee=function(){return this.sh.S()},i.prototype.xh=function(t,i){return this.rh.l(l(t,i)),this},i.prototype.Mh=function(){return this.rh.S()},i.prototype.Ah=function(t){return this.eh.l(t),this},i.prototype.Fh=function(){return this.eh.S()},i.prototype.Th=function(t){return this.ih.l(t),this},i.prototype.Ch=function(){return this.ih.S()},i.prototype.Bh=function(t){return this.eh.l(t.x),this.ih.l(t.y),this},i.prototype.Lh=function(t){return this.Qt.l(t),this},i.prototype.Ih=function(){return this.Qt.S()},i.prototype.Oh=function(t){return this.hh.l(t),this},i.prototype.Ph=function(){return this.hh.S()},i}(gE),xE=function(i){function e(n,e,r,s,o,h){void 0===h&&(h=5);var u=i.call(this,n,e,r,s,o,w(h))||this;return u.Dh=[],u._h=w(t.PointShape.Square),u.sh=w(0),u.Rh=w(!1),u.zh=w(!1),u.Eh=w(!1),u.Nh=Ps,u.Vh=0,u.Gh=[],u.Hh=0,u.jh=Ps,u.Wh=Wz.Nearest,u}return n(e,i),e.prototype.Uh=function(t){return this.Wh=t,this},e.prototype.Yh=function(){return this.Gh},e.prototype.Xh=function(){return this.Dh},e.prototype.Zh=function(t){return this._h.l(t),this},e.prototype.ne=function(t){return this.sh.l(t),this},e.prototype.Kh=function(t){return this.Rh.l(t),this},e.prototype.qh=function(t){return this.zh.l(t),this},e.prototype.Jh=function(t){return this.Eh.l(t),this},e.prototype.Qh=function(t,i){return Array.isArray(t)||(t=[t]),this.Hh+=t.length,this.Gh=ps(this.Gh,t,{canReturnB:!0}),this.jh&&(this.jh=i?Js(this.jh,i):void 0),this},e.prototype.$h=function(){return this.Vo=!0,this.Dh.length=0,this.Vh=0,this.Nh=Ps,this.Gh=[],this.Hh=0,this},e.prototype.tu=function(){return this.Vh},e.prototype.iu=function(){return this.Hh},e}(pE),ME=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.th=w(l(0,0)),o.hi=w(l(100,100)),o.sh=w(0),o.st=w(l(0,0)),o.nu=!1,o}return n(i,t),i.prototype.Fe=function(){return this.eu(),this},i.prototype.ph=function(t){var i=this.th.S();return t.x===i.x&&t.y===i.y||(this.th.l(t),this.eu()),this},i.prototype.kh=function(){return this.th.S()},i.prototype.ru=function(t){var i=this.th.S();return t!==i.x&&(this.th.l(l(t,i.y)),this.eu()),this},i.prototype.su=function(t){var i=this.th.S();return t!==i.y&&(this.th.l(l(i.x,t)),this.eu()),this},i.prototype.oi=function(t){var i=this.hi.S();return t.x===i.x&&t.y===i.y||(this.hi.l(l(t.x,t.y)),this.eu()),this},i.prototype.vi=function(){return this.hi.S()},i.prototype.ou=function(t){var i=this.hi.S();return t!==i.x&&(this.hi.l(l(t,i.y)),this.eu()),this},i.prototype.hu=function(t){var i=this.hi.S();return t!==i.x&&(this.hi.l(l(i.x,t)),this.eu()),this},i.prototype.ne=function(t){return this.sh.l(t),this},i.prototype.ee=function(){return this.sh.S()},i.prototype.uu=function(t){var i=this.st.S();return t===i&&i.x===t.x&&i.y===t.y||(void 0===t?(this.nu=!1,this.eu()):(this.nu=!0,this.st.l(t))),this},i.prototype.eu=function(){if(!this.nu){var t=this.th.S(),i=this.hi.S(),n=l(t.x+i.x/2,t.y+i.y/2),e=this.st.S();n.x===e.x&&n.y===e.y||this.st.l(n)}},i}(wE),AE=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.Dh=[],i.th=w(l(0,0)),i.Nh=Ps,i}return n(i,t),i.prototype.au=function(t){return t=Ss(t),this.Dh=t,this.Vo=!0,this},i.prototype.fu=function(){return this.Dh},i.prototype.Et=function(){return this.Nh.max.x},i.prototype.zt=function(){return this.Nh.min.x},i.prototype.Vt=function(){return this.Nh.max.y},i.prototype.Nt=function(){return this.Nh.min.y},i.prototype.cu=function(){return 0},i.prototype.lu=function(){return 0},i}(wE),FE=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i}(AE),TE=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i}(AE);!function(t){function i(){return null!==t&&t.apply(this,arguments)||this}n(i,t)}(AE);var CE,BE=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.du=new Array,o.vu=new Array,o.yu=w(iE()),o.Nh=Ps,o.jh=Ps,o.Su=0,o.mu=!1,o.Gh=[Array(),Array()],o.bu=!1,o.gu=(new Ee).setColor(Ae(42,171,240)),o.wu=!1,o.pu=!1,o}return n(i,t),i.prototype.Qh=function(t,i){var n=this.Su-1,e=h(n>0&&!this.bu?[[this.du[n]],[this.vu[n]]]:[[],[]],2),r=e[0],s=e[1];if(t instanceof Array){var o=h(m(t),2),u=o[0],a=o[1];r=ps(r,u,{canReturnB:!0}),s=ps(s,a,{canReturnB:!0})}else{var f=t.position;r.push(l(f,t.high)),s.push(l(f,t.low))}return this.bu?(this.Gh[0]=ps(this.Gh[0],r,{canReturnB:!0}),this.Gh[1]=ps(this.Gh[1],s,{canReturnB:!0})):(this.Gh=[r,s],this.bu=!0),this.jh&&(this.jh=i?Js(this.jh,i):void 0),this},i.prototype.$h=function(){return this.Vo=!0,this.du.length=0,this.vu.length=0,this.Su=0,this.Nh=Ps,this},i.prototype.Xh=function(){return[this.du,this.vu]},i.prototype.Yh=function(){return[this.Gh[0],this.Gh[1]]},i.prototype.ku=function(t){return this.yu.l(t),this},i.prototype.xu=function(){return this.yu.S()},i.prototype.Mu=function(t){return this.gu="function"==typeof t?t(this.gu):t,this},i.prototype.Au=function(){return this.gu},i.prototype.tu=function(){return this.Su-(Number(this.wu)+Number(this.pu))},i.prototype.iu=function(){return this.Gh.length},i.prototype.Fu=function(t){return this.wu=t,this},i.prototype.Tu=function(){return this.wu},i.prototype.Cu=function(t){return this.pu=t,this},i.prototype.Bu=function(){return this.pu},i.prototype.Uo=function(){return this.Wo===Re&&this.Lu===Re&&(this.Ho!==Re||this.gu!==Re)},i.prototype.Iu=function(t){this.Lu=t},i.prototype.Yo=function(){return this.gu!==Re||t.prototype.Yo.call(this)},i.prototype.jo=function(){return t.prototype.jo.call(this)||!this.Lu||this.Lu!==this.gu},i}(gE),LE=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.th=w(l(0,0)),o.Ou=w(0),o.bt=w(360),o.Pu=w(100),o.Du=w(100),o._u=w(0),o.Ru=w(void 0),o.zu=l(0,0),o.Eu=l(0,0),o.Nu=l(0,0),o}return n(i,t),i.prototype.Vu=function(){return this.Pu.S()},i.prototype.Gu=function(){return this.Du.S()},i.prototype.kh=function(){return this.th.S()},i.prototype.Hu=function(){return this.Ou.S()},i.prototype.Hi=function(){return this.bt.S()},i.prototype.ju=function(){return this._u.S()},i.prototype.Wu=function(){return this.Ru.S()},i.prototype.Uu=function(){return this.zu},i.prototype.Yu=function(){return this.Eu},i.prototype.Xu=function(){return this.Nu},i.prototype.ph=function(t){return this.th.l(t),this},i.prototype.Zu=function(t){return this.Ou.l(t),this},i.prototype.Ku=function(t){return this.bt.l(t),this},i.prototype.qu=function(t){return this.Du.l(t),this.Pu.l(t),this},i.prototype.Ju=function(t){return this.Pu.l(t),this},i.prototype.Qu=function(t){return this.Du.l(t),this},i.prototype.$u=function(t){return this._u.l(t<0?0:t),this},i.prototype.ta=function(t){return this.Ru.l(void 0!==t&&t<=0?void 0:t),this},i}(wE);!function(t){t[t.Complex=0]="Complex",t[t.Simple=1]="Simple",t[t.Convex=2]="Convex"}(CE||(CE={}));var IE,OE=function(t,i){return"function"==typeof i?i(t):i},PE=function(t,i){return!t||!1===t.equals(i)},DE=function(t,i){return!t||t.thickness!==i},_E=function(t,i){return t===ir&&i!==ir},RE=function(t){return t!==ir},zE=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.engine=i,o.ia=Kz.lineStyle,o}return n(i,t),i.prototype.na=function(t){return this.ia=OE(this.ia,t),this},i.prototype.ea=function(){return this.ia},i.prototype.Ko=function(){return PE(this.ra,this.ia)},i.prototype.sa=function(t){return DE(this.ra,t)},i.prototype.Uo=function(){return _E(this.ra,this.ia)},i.prototype.Yo=function(){return RE(this.ia)},i.prototype.oa=function(t){this.ra=t},i}(dE),EE=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.St=l(0,0),o.bt=l(0,0),o}return n(i,t),i.prototype.l=function(t){var i=t.min,n=t.max;return this.Vo=!0,this.St=i,this.bt=n,this},i.prototype.ji=function(){return this.St},i.prototype.Hi=function(){return this.bt},i.prototype.ha=function(t){return this.Vo=!0,this.St=t,this},i.prototype.Ku=function(t){return this.Vo=!0,this.bt=t,this},i}(zE),NE=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.ua=[],o}return n(i,t),i.prototype.Qh=function(t,i){return this.ua.push(t),this.ua.push(i),this.Vo=!0,this},i.prototype.$h=function(){return this.ua.length=0,this.Vo=!0,this},i}(zE),VE=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.aa=[],o.Nh=Ps,o.Gh=new Array,o.Vh=0,o.Wh=Wz.NearestX,o.fa=w(void 0),o.wu=!1,o.pu=!1,o}return n(i,t),i.prototype.ca=function(t){return this.fa.l(t),this},i.prototype.la=function(){return this.fa.S()},i.prototype.Yh=function(){return this.Gh},i.prototype.Xh=function(){return this.aa},i.prototype.Uh=function(t){return this.Wh=t,this},i.prototype.$h=function(){return this.Vo=!0,this.aa.length=0,this.Vh=0,this.Gh=[],this.Nh=Ps,this},i.prototype.tu=function(){return this.Vh-(Number(this.wu)+Number(this.pu))},i.prototype.iu=function(){return this.Gh.length},i.prototype.Fu=function(t){return this.wu=t,this},i.prototype.Tu=function(){return this.wu},i.prototype.Cu=function(t){return this.pu=t,this},i.prototype.Bu=function(){return this.pu},i}(zE),GE=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.engine=i,o.Su=0,o.da=0,o.hi=w({x:0,y:0}),o.va=w({x:0,y:0}),o.ya=w({x:0,y:0}),o.St={x:0,y:0},o.bt={x:0,y:0},o.Sa=!0,o.ma=!0,o.ba=!0,o.Nh=Ps,o.ga=!0,o.wa=Re,o}return n(i,t),i.prototype.pa=function(t){return this.wa=yE(this.wa,t),this},i.prototype.ka=function(){return this.wa},i.prototype.l=function(t){return HE.l(this,t,(function(t,i){return{x:t,y:i}})),this},i.prototype.xa=function(){return HE.xa(this)},i.prototype.Ma=function(){return HE.Ma(this)},i.prototype.kh=function(){return HE.kh(this)},i.prototype.iu=function(){return HE.iu(this)},i.prototype.Aa=function(t,i,n){return HE.Aa(this,t,i,n),this},i.prototype.Fa=function(t,i,n){return HE.Fa(this,t,i,n),this},i.prototype.Ta=function(t,i){return HE.Ta(this,t,i),this},i.prototype.Ca=function(t,i){return HE.Ca(this,t,i),this},i.prototype.Ba=function(t,i){return HE.Ba(this,t,i),this},i.prototype.$h=function(){return HE.$h(this,(function(t,i){return{x:t,y:i}})),this},i.prototype.La=function(){return HE.La(this)},i.prototype.Ia=function(){return HE.Ia(this)},i.prototype.Oa=function(){return HE.Oa(this)},i.prototype.tu=function(){return HE.tu(this)},i.prototype.Uo=function(){return HE.Uo(this)},i.prototype.Yo=function(){return HE.Yo(this)},i.prototype.Pa=function(){return this.Da},i.prototype._a=function(){return this.Ra},i}(gE),HE={l:function(t,i,n){t.Vo=!0,t.Sa=!0,t.ma=!0,t.ba=!0;var r=i.start,s=i.end,o=i.rows,h=i.columns;t.ga=i.pixelate;var u={x:i.pixelate&&h>=1||!i.pixelate&&h>1?h:0,y:i.pixelate&&o>=1||!i.pixelate&&o>1?o:0};t.va.l(u),t.St=e({},r),t.bt=e({},s),t.hi.l(co(s,r)),HE.za(t,n)},za:function(t,i){var n=t.va.S();if(n.x>0&&n.y>0){t.Da?t.Da.length=0:t.Da=[];var e=t.ga?fo(n,{x:1,y:1}):{x:n.x,y:n.y};t.ya.l(e),t.Da=Array.from(Array(e.y)).map((function(){return Array(e.x)})),t.Ra=Array.from(Array(n.y)).map((function(){return Array(n.x)})),HE.Ea(t,n,e,i),t.Su=e.x*e.y,t.da=n.x*n.y}else t.Da=void 0,t.ya.l({x:0,y:0})},Ea:function(t,i,n,e){var r,s,h=t.St,u=t.bt,a=t.Da,f=t.Ra;if(a){for(var c=n.x,l=n.y,d=t.hi.S(),v={x:d.x/(c-1),y:d.y/(l-1)},y=0;y0?t[0].length:0,e=Array.from(Array(n)).map((function(){return Array(i)})),r=0;r0?i[0].length:0,S=(f=s,0);f0?i[0].length:0,v=(f=s,0);f0?i[0].length:0,S=(c=o,0);c0?i[0].length:0,y=(c=o,0);c0){for(var n=0,e=0,r=0;r=this.Wa?(this.Ya.splice(r,1),r-=1):this.Ya[r].state&&(e=!0);return this.Ua?0===i.interactions.length&&(this.Ya.push({state:!1,time:n}),this.Ua=!1):1===i.interactions.length&&"pointerdown"===i.type&&(this.Ya.push({state:!0,time:n}),e=!0,this.Ua=!0),e},t.prototype.Fe=function(t,i,n){if(n&&!this.Ua){var e=this.Ya.reduce((function(t,i){return i.state?t.on+=1:t.off+=1,t}),{on:0,off:0});e.on>=1&&e.off>=1&&(this.ja(t,i),this.Ya.length=0)}},t}(),DoublePoke:function(){function t(t,i){void 0===i&&(i=300),this.ja=t,this.Wa=i,this.Ua=!1,this.Ya=[]}return t.prototype.Ha=function(t,i){for(var n=wr.performance.now(),e=!1,r=0;r=this.Wa?(this.Ya.splice(r,1),r-=1):this.Ya[r].state&&(e=!0);return this.Ua?0===i.interactions.length&&(this.Ya.push({state:!1,time:n}),this.Ua=!1):1===i.interactions.length&&"pointerdown"===i.type&&(this.Ya.push({state:!0,time:n}),e=!0,this.Ua=!0),e},t.prototype.Fe=function(t,i,n){if(n){var e=this.Ya.reduce((function(t,i){return i.state?t.on+=1:t.off+=1,t}),{on:0,off:0});e.on>=2&&e.off>=1&&(this.ja(t,i),this.Ya.length=0)}},t}(),Drag:function(){function t(t,i,n,e,r){void 0===e&&(e=1),void 0===r&&(r=100),this.Xa=t,this.Za=i,this.Ka=n,this.qa=e,this.Ja=r}return t.prototype.Ha=function(t,i){var n=i.interactions.length;if(n===this.qa){if(void 0!==this.Qa)return!0;if("pointerdown"===i.type&&(1===n||function(t){var i=t.length;if(i>0){for(var n=jE(t),e=0,r=0;r0},t}(),ZE=function(i,n,e){var r=i.getDraggingMode();if(r!==t.UIDraggingModes.notDraggable){var s=i.scale.Li(i.getPosition(),{x:r!==t.UIDraggingModes.onlyVertical?n.x:0,y:r!==t.UIDraggingModes.onlyHorizontal?n.y:0}),o=i.scale,h=i.getSize(),u=i.getOrigin(),a=o.Li({x:o.x.getInnerStart(),y:o.y.getInnerStart()},lo({x:(1+u.x)/2,y:(1+u.y)/2},h)),f=o.Li({x:o.x.getInnerEnd(),y:o.y.getInnerEnd()},lo({x:(u.x-1)/2,y:(u.y-1)/2},h)),c={x:Math.min(Math.max(s.x,a.x),f.x),y:Math.min(Math.max(s.y,a.y),f.y)};i.setPosition(c),ss(e)}},KE=function(t,i,n,e,r){ZE(t,r,i)},qE=function(t,i,n,e,r){ZE(t,e,r)},JE=function(i){function e(t,n,e,r,s,o){var h=i.call(this)||this;h.wf=t,h.renderingScale=n,h.scale=e,h.uo=r,h.ao=s,h.theme=o,h.position=l(50,50),h.origin=l(0,0),h.size=l(0,0),h.So=!1,h.pf=void 0,h.kf=void 0,h.xf=YE,h.Mf=void 0,h.Af=function(){var t="function"==typeof h.xf?h.xf(h):h.xf;t&&(h.kf=h.wf.oo.Qr(t))},h.Ff=function(){h.wf.oo.ts(h.kf)},h.Qt=p(0,0,0,0),h.wf.xn(),h.onMouseEnter(h.Af),h.onMouseLeave(h.Ff),h.onMouseDrag(KE);var u=WE(new UE.Drag(Cr,qE,Cr));return h.onTouchStart(u.onTouchStart),h.onTouchMove(u.onTouchMove),h.onTouchEnd(u.onTouchEnd),h.vn=o,h}return n(e,i),e.prototype.setAutoDispose=function(t){return this.Mf=t,this.wf.xn(),this},e.prototype.getAutoDispose=function(){return this.Mf},e.prototype.getSize=function(i){return void 0===i&&(i=t.UISpace.Everything),i===t.UISpace.Everything?l(this.size.x+(this.Qt.left+this.Qt.right),this.size.y+(this.Qt.bottom+this.Qt.top)):this.size},e.prototype.setContentSize=function(t){this.size=t},e.prototype.setMargin=function(t){return this.Qt="object"==typeof t?x(this.Qt,t):{left:t,top:t,right:t,bottom:t},this.wf.xn(),this},e.prototype.getMargin=function(){return this.Qt},e.prototype.Tf=function(){if(this.Mf){var t=this.size,i=this.renderingScale.vi(),n={x:t.x/i.x,y:t.y/i.y};("max-width"===this.Mf.type&&n.x>=this.Mf.maxWidth||"max-height"===this.Mf.type&&n.y>=this.Mf.maxHeight)&&this.dispose()}return this},e.prototype.Fe=function(){return this},e.prototype.dispose=function(){return this.wf.xn(),this.So=!0,this.uo(this),this},e.prototype.restore=function(){return this.So=!1,this.wf.xn(),this.ao(this),this},e.prototype.isDisposed=function(){return this.So},e.prototype.setPosition=function(t){return this.position=t,this.wf.xn(),this},e.prototype.getPosition=function(i,n){void 0===i&&(i=this.origin),void 0===n&&(n=t.UISpace.Everything);var e=this.getSize(t.UISpace.Everything),r=this.scale.Li(this.position,lo({x:-(this.origin.x+1)/2,y:-(this.origin.y+1)/2},e));if(n===t.UISpace.Everything)return this.scale.Li(r,lo({x:(i.x+1)/2,y:(i.y+1)/2},e));var s=this.scale.Li(r,{x:this.Qt.left,y:this.Qt.bottom}),o=this.getSize(t.UISpace.Content);return this.scale.Li(s,lo({x:(i.x+1)/2,y:(i.y+1)/2},o))},e.prototype.setOrigin=function(t){return this.origin=t,this.wf.xn(),this},e.prototype.getOrigin=function(){return this.origin},e.prototype.setDraggingMode=function(i){return void 0===i&&(i=t.UIDraggingModes.notDraggable),this.pf=i,this.wf.xn(),this},e.prototype.getDraggingMode=function(){return void 0!==this.pf?this.pf:t.UIDraggingModes.notDraggable},e.prototype.setMouseStyle=function(t){return this.xf=t,this},e.prototype.getMouseStyle=function(){return this.xf},e}(XE),QE=function(i){function e(t,n,e,r,s,o,h){var u=i.call(this,t,n,e,s,o,h)||this;return u.wf=t,u.Cf=r,u.hh=p(),u.Bf=!1,u.backgroundElement=new u.Cf(u.wf,u.renderingScale,u.scale,Cr,Cr,h),u.gf(u.backgroundElement),u}return n(e,i),e.prototype.onHighlight=function(t){return this.an.on("highlight",t)},e.prototype.offHighlight=function(t){return this.an.off(t)},e.prototype.setBackground=function(t){return t(this.backgroundElement),this},e.prototype.getBackground=function(){return this.backgroundElement},e.prototype.Tf=function(){return i.prototype.Tf.call(this),i.prototype.isDisposed.call(this)||this.backgroundElement.setOrigin(this.origin).setPosition(this.getPosition(this.origin,t.UISpace.PaddedBackground)).Tf(),this},e.prototype.Fe=function(){var n=this.getSize(t.UISpace.PaddedContent);return this.backgroundElement.Lf(n).Fe(),i.prototype.Fe.call(this)},e.prototype.dispose=function(){return i.prototype.dispose.call(this),this.backgroundElement.dispose(),this},e.prototype.restore=function(){return i.prototype.restore.call(this),this.backgroundElement.restore(),this},e.prototype.isDisposed=function(){return i.prototype.isDisposed.call(this)&&this.backgroundElement.isDisposed()},e.prototype.setPadding=function(t){return this.hh="object"==typeof t?x(this.hh,t):{left:t,top:t,right:t,bottom:t},this.wf.xn(),this},e.prototype.getPadding=function(){return this.hh},e.prototype.getSize=function(n){void 0===n&&(n=t.UISpace.Everything);var e=i.prototype.getSize.call(this,n);return n>=t.UISpace.PaddedContent&&(e=l(e.x+this.hh.left+this.hh.right,e.y+this.hh.bottom+this.hh.top)),n>=t.UISpace.PaddedBackground&&(e=l(e.x+this.backgroundElement.If()+this.backgroundElement.Of(),e.y+this.backgroundElement.Pf()+this.backgroundElement.Df())),e},e.prototype.getPosition=function(n,e){if(void 0===n&&(n=this.origin),void 0===e&&(e=t.UISpace.Everything),e===t.UISpace.Everything)return i.prototype.getPosition.call(this,n,e);var r=i.prototype.getPosition.call(this,l(-1,-1),t.UISpace.Everything),s=this.getMargin(),o=this.scale.Li(r,{x:s.left,y:s.bottom});if(e===t.UISpace.PaddedBackground){var h=this.getSize(t.UISpace.PaddedBackground);return this.scale.Li(o,lo({x:(n.x+1)/2,y:(n.y+1)/2},h))}var u=this.scale.Li(o,{x:this.backgroundElement.If(),y:this.backgroundElement.Pf()});if(e===t.UISpace.PaddedContent){var a=this.getSize(t.UISpace.PaddedContent);return this.scale.Li(u,lo({x:(n.x+1)/2,y:(n.y+1)/2},a))}var f=this.getPadding(),c=this.scale.Li(u,{x:f.left,y:f.bottom}),d=this.getSize(t.UISpace.Content);return this.scale.Li(c,lo({x:(n.x+1)/2,y:(n.y+1)/2},d))},e.prototype.setMouseInteractions=function(t){return this.backgroundElement.setMouseInteractions(t),this},e.prototype.getMouseInteractions=function(){return this.backgroundElement.getMouseInteractions()},e.prototype.getHighlighted=function(){return this.Bf},e.prototype.setHighlighted=function(t){return this.Bf=t,this.backgroundElement.setHighlighted(t),this.an.emit("highlight",t),this},e}(JE),$E=function(t){function i(i,n,e,r,s,o,h,u,a,f,c,l){var d=t.call(this)||this;return d._f=n,d.Rf=e,d.axisScale=r,d.renderingScale=s,d.zf=h,d.Ef=u,d.Nf=a,d.uo=f,d.ao=c,d.Vf=d.gf(d._f.Gf(d.renderingScale)),d.u=0,d.Hf=1,d.jf=!1,d.Wf=new sh,d.Uf=!0,d.vn=l,d.Yf=d.gf(d.Nf.Xf(d.Rf,d.renderingScale,o,Cr,Cr,d.vn,!1).setOrigin(es(d.Ef)).setDirection(d.Ef)),d.axis=i,d.setMouseInteractions(!1),d.Vf.na(l.customTickGridStrokeStyle),d}return n(i,t),i.prototype.setValue=function(t){return this.u=t,this.Rf.xn(),this.an.emit("valueChange",this.u),this},i.prototype.getValue=function(){return this.u},i.prototype.setTextFormatter=function(t){return this.Zf=t,this.Rf.xn(),this},i.prototype.setTickLength=function(t){return this.Yf.setPointerLength(t),this._f.xn(),this},i.prototype.getTickLength=function(){return this.Yf.getPointerLength()},i.prototype.setTickLabelPadding=function(t){return this.Yf.setTickLabelPadding(t),this._f.xn(),this},i.prototype.setTickLabelRotation=function(t){return this.Yf.setTextRotation(t),this._f.xn(),this},i.prototype.getTickLabelRotation=function(){return this.Yf.getTextRotation()},i.prototype.getTickLabelPadding=function(){return this.Yf.getTickLabelPadding()},i.prototype.setGridStrokeLength=function(t){return this.Hf=t,this._f.xn(),this},i.prototype.getGridStrokeLength=function(){return this.Hf},i.prototype.setGridStrokeStyle=function(t){return this.Vf.na(t),this._f.xn(),this},i.prototype.getGridStrokeStyle=function(){return this.Vf.ea()},i.prototype.restore=function(){return this.Vf.restore(),this.jf||this.Yf.restore(),this.ao(this),this._f.oo.xn(),this},i.prototype.dispose=function(){return this.Vf.dispose(),this.Yf.dispose(),this.uo(this),this._f.oo.xn(),this},i.prototype.isDisposed=function(){return this.Vf.isDisposed()&&this.Yf.isDisposed()},i.prototype.disposeMarker=function(){return this.jf=!0,this.Yf.dispose(),this.Rf.xn(),this},i.prototype.restoreMarker=function(){return this.jf=!1,this.isDisposed()||this.Yf.restore(),this.Rf.xn(),this},i.prototype.isDisposedMarker=function(){return this.jf},i.prototype.setMarker=function(t){return t(this.Yf),this.Rf.xn(),this},i.prototype.getMarker=function(){return this.Yf},i.prototype.setMouseInteractions=function(t){return this.Yf.setMouseInteractions(t),this.Vf.setMouseInteractions(t),this},i.prototype.getMouseInteractions=function(){return this.Vf.getMouseInteractions()},i.prototype.setAllocatesAxisSpace=function(t){return this.Uf=t,this.Rf.xn(),this},i.prototype.getAllocatesAxisSpace=function(){return this.Uf},i.prototype.isInScale=function(){return Gs(this.u,this.axisScale.getInnerStart(),this.axisScale.getInnerEnd())},i.prototype.onValueChange=function(t){return this.an.on("valueChange",t)},i.prototype.offValueChange=function(t){return this.an.off(t,"valueChange")},i}(XE),tN=function(t){function i(i,n,e,r,s,o,h,u,a,f,c,l){var d=t.call(this,i,n,e,r,s,o,h,u,l,f,a,c)||this;return d._f=n,d.Rf=e,d.Qh=a,d.uo=f,d.vn=c,d.Kf=!1,d}return n(i,t),i.prototype.isDisposed=function(){return!this.Kf&&t.prototype.isDisposed.call(this)},i.prototype.dispose=function(){return this.Kf=!1,t.prototype.dispose.call(this)},i.prototype.update=function(){return this},i.prototype.plot=function(t,i,n,e){if(this.isInScale()){this.Kf=!1;var r=rr(this.u,this.axisScale,this.zf.getWidth(this.renderingScale));this.Vf.restore().ha(this.zf.toPoint(r,t)).Ku(this.zf.toPoint(r,t-(n+i*this.Hf))),this.jf||(this.Zf&&this.Yf.setText(this.Zf(this.u,this)),this.Yf.restore().setPosition(this.zf.toPoint(r,e)).Fe().Tf())}else this.Vf.dispose(),this.Yf.dispose();return this},i.prototype.qf=function(){var t=this.Yf.Fe().getSize();return this.zf.getHeight(t)},i}($E);t.HighlightModes=void 0,(IE=t.HighlightModes||(t.HighlightModes={}))[IE.noHighlighting=0]="noHighlighting",IE[IE.onHover=1]="onHover",IE[IE.onHoverIndividual=2]="onHoverIndividual";var iN,nN=function(){function i(i,n,e,r){var s=this;this.vr=i,this.Jf=n,this.Qf=e,this.vn=r,this.$f=!0,this.Bf=!1,this.tc=t.HighlightModes.noHighlighting,this.ic=[],this.So=!1,this.nc=0,this.an=new qe,this.rc=this.$f,this.sc=[],this.oc=function(t,i){i?s.restore():s.dispose()},this.onEntryMouseEnter=function(){return s.setHighlighted(!0)},this.onEntryMouseLeave=function(){return s.setHighlighted(!1)},this.onMouseEnter=function(t){return s.an.on("mouseEnter",t)},this.onMouseLeave=function(t){return s.an.on("mouseLeave",t)},this.onMouseClick=function(t){return s.an.on("mouseClick",t)},this.onMouseDoubleClick=function(t){return s.an.on("mouseDoubleClick",t)},this.onMouseDown=function(t){return s.an.on("mouseDown",t)},this.onMouseUp=function(t){return s.an.on("mouseUp",t)},this.onMouseMove=function(t){return s.an.on("mouseMove",t)},this.offMouseEnter=function(t){return s.an.off(t,"mouseEnter")},this.offMouseLeave=function(t){return s.an.off(t,"mouseLeave")},this.offMouseClick=function(t){return s.an.off(t,"mouseClick")},this.offMouseDoubleClick=function(t){return s.an.off(t,"mouseDoubleClick")},this.offMouseDown=function(t){return s.an.off(t,"mouseDown")},this.offMouseUp=function(t){return s.an.off(t,"mouseUp")},this.offMouseMove=function(t){return s.an.off(t,"mouseMove")},this.offMouseDragStart=function(t){return s.an.off(t,"mouseDragStart")},this.offMouseDrag=function(t){return s.an.off(t,"mouseDrag")},this.offMouseDragStop=function(t){return s.an.off(t,"mouseDragStop")},this.offMouseWheel=function(t){return s.an.off(t,"mouseWheel")},this.hc=function(t,i){0===s.nc&&s.an.emit("mouseEnter",s,i);var n=l(i.clientX,i.clientY);s.uc(t,n)},this.ac=function(t,i){1===s.nc&&s.an.emit("mouseLeave",s,i),s.fc(t)},this.cc=function(t,i){s.an.emit("mouseMove",s,i),s.lc(t,l(i.clientX,i.clientY))},this.dc=function(t,i){return s.an.emit("mouseClick",s,i)},this.vc=function(t,i){return s.an.emit("mouseDoubleClick",s,i)},this.yc=function(t,i){return s.an.emit("mouseDown",s,i)},this.Sc=function(t,i){return s.an.emit("mouseUp",s,i)},this.mc=function(t,i,n){s.an.emit("mouseDragStart",s,i,n)},this.bc=function(t,i,n,e,r){s.an.emit("mouseDrag",s,i,n,e,r)},this.gc=function(t,i,n,e){s.an.emit("mouseDragStop",s,i,n,e)},this.wc=function(t,i){s.an.emit("mouseWheel",s,i)},this.kc=function(t,i){s.an.emit("touchStart",s,i),s.uc(t,l(i.clientX,i.clientY))},this.xc=function(t,i){s.an.emit("touchMove",s,i),s.lc(void 0,l(i.clientX,i.clientY))},this.Mc=function(t,i){s.an.emit("touchEnd",s,i),s.fc(t)}}return i.prototype.onHighlight=function(t){return this.an.on("highlight",t)},i.prototype.offHighlight=function(t){return this.an.off(t)},i.prototype.setName=function(t){var i=this;return this.Mt=t,this.sc.forEach((function(t){return t.setText(i.Mt)})),this},i.prototype.getName=function(){return this.Mt},i.prototype.isDisposed=function(){return this.So},i.prototype.dispose=function(){this.So=!0;var t=this.ic.slice();return t.forEach(Tr),this.ic=t,this.sc.forEach((function(t){return t.getOn()?t.setOn(!1):void 0})),this.Jf(this),this.vr.engine.xn(),this},i.prototype.restore=function(){return this.So=!1,this.ic.forEach(Fr),this.sc.forEach((function(t){return t.getOn()?void 0:t.setOn(!0)})),this.Qf(this),this.vr.engine.xn(),this},i.prototype.setHighlighted=function(t){var i=this;return this.Bf=t,this.ic.forEach((function(n){return i.Ac(n,t)})),this.an.emit("highlight",t),this.vr.engine.xn(),this},i.prototype.getHighlighted=function(){return this.Bf},i.prototype.Fc=function(t){this.$f=t;for(var i=0;i0},i.prototype.setHighlightOnHover=function(i){return this.tc=i?t.HighlightModes.onHover:t.HighlightModes.noHighlighting,!1===i&&this.Bf&&this.setHighlighted(!1),this},i.prototype.getHighlightOnHover=function(){return this.tc!==t.HighlightModes.noHighlighting},i.prototype.Cc=function(t,i){return void 0===i&&(i=this.ic),i.includes(t)||(i.push(t),t.setIsUnderMouse(this.nc>0).setMouseInteractions(this.$f).setMouseEnterEventHandler(this.hc).setMouseLeaveEventHandler(this.ac).setMouseClickEventHandler(this.dc).setMouseDoubleClickEventHandler(this.vc).setMouseDownEventHandler(this.yc).setMouseUpEventHandler(this.Sc).setMouseMoveEventHandler(this.cc).setMouseDragStartEventHandler(this.mc).setMouseDragEventHandler(this.bc).setMouseDragStopEventHandler(this.gc).setMouseWheelEventHandler(this.wc).setTouchStartEventHandler(this.kc).setTouchMoveEventHandler(this.xc).setTouchEndEventHandler(this.Mc)),t},i.prototype.attach=function(t,i){void 0===i&&(i=!0),t.setText(this.Mt),t.setButtonOffStrokeStyle(t.getButtonOffStrokeStyle().set("thickness",1)),t.setButtonOnStrokeStyle(t.getButtonOnStrokeStyle().set("thickness",1));var n=t.getLocked();return t.setLocked(!1).setOn(!this.isDisposed()).setLocked(n),i&&t.onSwitch(this.oc),t.setLocked(!i),t.onMouseEnter(this.onEntryMouseEnter),t.onMouseLeave(this.onEntryMouseLeave),this.onMouseEnter((function(){return t.setHighlighted(!0)})),this.onMouseLeave((function(){return t.setHighlighted(!1)})),this.onTouchStart((function(){return t.setHighlighted(!0)})),this.onTouchEnd((function(){return t.setHighlighted(!1)})),this.sc.push(t),this},i.prototype.onMouseDragStart=function(t){return this.an.on("mouseDragStart",t)},i.prototype.onMouseDrag=function(t){return this.an.on("mouseDrag",t)},i.prototype.onMouseDragStop=function(t){return this.an.on("mouseDragStop",t)},i.prototype.onMouseWheel=function(t){return this.an.on("mouseWheel",t)},i.prototype.onTouchStart=function(t){return this.an.on("touchStart",t)},i.prototype.onTouchMove=function(t){return this.an.on("touchMove",t)},i.prototype.onTouchEnd=function(t){return this.an.on("touchEnd",t)},i.prototype.offTouchStart=function(t){return this.an.off(t,"touchStart")},i.prototype.offTouchMove=function(t){return this.an.off(t,"touchMove")},i.prototype.offTouchEnd=function(t){return this.an.off(t,"touchEnd")},i.prototype.uc=function(i,n,e){void 0===e&&(e=1),this.nc+=e,this.tc===t.HighlightModes.onHoverIndividual&&this.Ac(i,!0),this.nc===e&&this.tc===t.HighlightModes.onHover&&this.setHighlighted(!0)},i.prototype.fc=function(i,n){void 0===n&&(n=1),this.nc=Math.max(0,this.nc-n),this.tc===t.HighlightModes.onHoverIndividual&&this.Ac(i,!1),0===this.nc&&this.tc===t.HighlightModes.onHover&&this.setHighlighted(!1)},i.prototype.lc=function(t,i){},i}(),eN=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,n,e,r,u)||this;return a.wf=i,a.axis=s,a.Rt=o,a.Bc=h,a.Lc(),a}return n(i,t),i.prototype.lc=function(){},i}(nN),rN=function(i){function e(){var t=null!==i&&i.apply(this,arguments)||this;return t.Mt="Band",t.Ic=0,t.Oc=0,t.Ho=new c(t.vn.bandFillStyle),t.Zo=new c(t.vn.bandStrokeStyle),t.Ut=t.Cc(t.wf.Pc(t.Rt)).$n(t.Ho.L()).Ys(t.Zo.L()),t}return n(e,i),e.prototype.setValueStart=function(t){return this.Ic=t,this.an.emit("valueChange",this,this.Ic,this.Oc),this.wf.xn(),this},e.prototype.getValueStart=function(){return this.Ic},e.prototype.setValueEnd=function(t){return this.Oc=t,this.an.emit("valueChange",this,this.Ic,this.Oc),this.wf.xn(),this},e.prototype.getValueEnd=function(){return this.Oc},e.prototype.setFillStyle=function(t){this.Ho.C(t);var i=this.Ho.D(this.Bf);return this.Ut.$n(i),this.wf.xn(),this},e.prototype.getFillStyle=function(){return this.Ho.L()},e.prototype.setFillStyleHighlight=function(t){if(this.Ho.I(t),this.getHighlighted()){var i=this.Ho.D(!0);this.Ut.$n(i)}return this.wf.xn(),this},e.prototype.getFillStyleHighlight=function(){return this.Ho.D(!0)},e.prototype.setStrokeStyle=function(t){this.Zo.C(t);var i=this.Zo.D(this.Bf);return this.Ut.Ys(i),this.wf.xn(),this},e.prototype.getStrokeStyle=function(){return this.Zo.L()},e.prototype.setStrokeStyleHighlight=function(t){if(this.Zo.I(t),this.getHighlighted()){var i=this.Zo.D(!0);this.Ut.Ys(i)}return this.wf.xn(),this},e.prototype.getStrokeStyleHighlight=function(){return this.Zo.D(!0)},e.prototype.onValueChange=function(t){return this.an.on("valueChange",t)},e.prototype.offValueChange=function(t){return this.an.off(t,"valueChange")},e.prototype.Tf=function(){return this.Ut.ph(this.Bc.toVec2(this.Ic,this.Bc.getHeight(this.Rt).getInnerStart())).oi(this.Bc.toVec2(this.Oc-this.Ic,this.Bc.getHeight(this.Rt).getInnerInterval())),this},e.prototype.attach=function(t,n){return i.prototype.attach.call(this,t,n),ks(t,this.vn,{fill:this.Ho,stroke:this.Zo}),this},e.prototype.Ac=function(t,i){t.$n(this.Ho.D(i)),this.wf.xn()},e.prototype.Lc=function(){var i,n,e=this,r=function(t,r){var s=sr(e.wf.oo.ds(r.x,r.y),e.wf.oo.Rt,e.Rt),o=e.Bc.getWidth(s),h=e.axis.Rt._t(e.Ic),u=e.axis.Rt._t(e.Oc),a=(e.axis.Rt._t(o)-h)/(u-h);!1===(i=!(a<.1||a>.9))&&(n=a<.5)},s=function(t,r,s,o,h){var u=e.Bc.getWidth(o);i?(e.Ic=e.axis.Rt.Li(e.Ic,u),e.Oc=e.axis.Rt.Li(e.Oc,u)):n?e.Ic=e.axis.Rt.Li(e.Ic,u):e.Oc=e.axis.Rt.Li(e.Oc,u),ss(h),e.an.emit("valueChange",e,e.Ic,e.Oc),e.wf.xn()};this.onMouseMove((function(n,s){r(0,l(s.clientX,s.clientY));var o=i?t.MouseStyles.Point:e.Bc.getWidth({x:t.MouseStyles.Horizontal,y:t.MouseStyles.Vertical});e.Dc=e.vr.engine.setMouseStyle(o,e.Dc)})),this.onMouseLeave((function(){e.vr.engine.restoreMouseStyle(e.Dc),e.Dc=void 0})),this.onMouseDrag((function(t,i,n,e,r){0===n&&s(0,0,0,r,i)}));var o=WE(new UE.Drag(r,s));this.onTouchStart(o.onTouchStart),this.onTouchMove(o.onTouchMove),this.onTouchEnd(o.onTouchEnd)},e}(eN),sN=function(i){function e(){var t=null!==i&&i.apply(this,arguments)||this;return t.Mt="Constant Line",t.u=0,t.Zo=new c(t.vn.constantLineStrokeStyle),t.Wt=t.Cc(t.wf.Gf(t.Rt)).na(t.Zo.L()),t}return n(e,i),e.prototype.setValue=function(t){return this.u=t,this.an.emit("valueChange",this,this.u),this.wf.xn(),this},e.prototype.getValue=function(){return this.u},e.prototype.setStrokeStyle=function(t){this.Zo.C(t);var i=this.Zo.D(this.Bf);return this.Wt.na(i),this.wf.xn(),this},e.prototype.getStrokeStyle=function(){return this.Zo.L()},e.prototype.setStrokeStyleHighlight=function(t){if(this.Zo.I(t),this.getHighlighted()){var i=this.Zo.D(!0);this.Wt.na(i)}return this.wf.xn(),this},e.prototype.getStrokeStyleHighlight=function(){return this.Zo.D(!0)},e.prototype.onValueChange=function(t){return this.an.on("valueChange",t)},e.prototype.offValueChange=function(t){return this.an.off(t,"valueChange")},e.prototype.Tf=function(){return this.Wt.ha(this.Bc.toVec2(this.u,this.Bc.getHeight(this.Rt).getInnerStart())).Ku(this.Bc.toVec2(this.u,this.Bc.getHeight(this.Rt).getInnerEnd())),this},e.prototype.attach=function(t,n){return i.prototype.attach.call(this,t,n),ks(t,this.vn,{stroke:this.Zo}),this},e.prototype.Ac=function(t,i){t.na(this.Zo.D(i)),this.wf.xn()},e.prototype.Lc=function(){var i=this,n=function(t,n,e,r){i.u=i.axis.Rt.Li(i.u,i.Bc.getWidth(r)),i.an.emit("valueChange",i,i.u),i.wf.xn()};this.onMouseMove((function(){var n=i.Bc.getWidth({x:t.MouseStyles.Horizontal,y:t.MouseStyles.Vertical});i.Dc=i.vr.engine.setMouseStyle(n,i.Dc)})),this.onMouseLeave((function(){i.vr.engine.restoreMouseStyle(i.Dc),i.Dc=void 0})),this.onMouseDrag((function(t,i,e,r,s){0===e&&n(0,0,0,s)}));var e=WE(new UE.Drag(void 0,n));this.onTouchStart(e.onTouchStart),this.onTouchMove(e.onTouchMove),this.onTouchEnd(e.onTouchEnd)},e}(eN),oN=function(t,i){return t.setTextFillStyle(i.uiTextFillStyle).setTextFont(i.uiFont)},hN=function(t,i){return ks(t.setButtonOffSize(i.uiButtonSize).setButtonOnSize(i.uiButtonSize),i,{fill:i.uiButtonFillStyle}),t},uN=function(t,i,n){n&&"setBackground"in t&&t.setBackground((function(t){return t.setFillStyle(i.uiBackgroundFillStyle).setStrokeStyle(i.uiBackgroundStrokeStyle)}))},aN={uiElement:void 0,stylers:dn(),addStyler:function(t){return e(e({},this),{stylers:this.stylers.push(t)})},applyStylers:function(t,i){return this.stylers.forEach((function(n){return void 0!==n?n(t,i):void 0})),t}},fN={background:void 0,setBackground:function(t){return e(e({},this),{background:t})}},cN={Xf:function(t,i,n,e,r,s,o){var h=this.applyStylers(new this.uiElement(t,i,n,e,r,s),s);return uN(h,s,o),h}},lN={Xf:function(t,i,n,e,r,s,o){var h=this.applyStylers(new this.uiElement(t,i,n,this.background,e,r,s),s);return uN(h,s,o),h}},dN=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i._c=!0,i}return n(i,t),i.prototype.Tf=function(){return t.prototype.Tf.call(this),this},i.prototype.setMouseInteractions=function(t){return this._c=t,this},i.prototype.getMouseInteractions=function(){return this._c},i}(JE),vN=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.onHighlight=function(t){return this.an.on("highlight",t)},i.prototype.offHighlight=function(t){return this.an.off(t)},i.prototype.Lf=function(t){return this.size=t,this},i.prototype.If=function(){return 0},i.prototype.Of=function(){return 0},i.prototype.Df=function(){return 0},i.prototype.Pf=function(){return 0},i.prototype.getHighlighted=function(){return!1},i.prototype.setHighlighted=function(){return this},i.prototype.setFillStyleHighlight=function(){return this},i.prototype.getFillStyleHighlight=function(){return Re},i.prototype.setFillStyle=function(){return this},i.prototype.getFillStyle=function(){return Re},i.prototype.setStrokeStyle=function(){return this},i.prototype.getStrokeStyle=function(){return ir},i.prototype.setStrokeThickness=function(){return this},i.prototype.getStrokeThickness=function(){return 0},i}(dN),yN=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.setSize=i.Lf.bind(i),i}return n(i,t),i}(vN),SN=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.Ho=new c(Re),i.an=new qe,i.Bf=!1,i}return n(i,t),i.prototype.onHighlight=function(t){return this.an.on("highlight",t)},i.prototype.offHighlight=function(t){return this.an.off(t)},i.prototype.setFillStyle=function(t){return this.Ho.C(t),this._h.$n(this.Ho.D(this.Bf)),this.wf.xn(),this},i.prototype.getFillStyle=function(){return this.Ho.L()},i.prototype.setFillStyleHighlight=function(t){return this.Ho.I(t),this._h.$n(this.Ho.D(this.Bf)),this},i.prototype.getFillStyleHighlight=function(){return this.Ho.P()},i.prototype.getHighlighted=function(){return this.Bf},i.prototype.setHighlighted=function(t){return this.Bf=t,this._h.$n(this.Ho.D(t)),this.an.emit("highlight",t),this.wf.xn(),this},i.prototype.setMouseInteractions=function(t){return this._h.setMouseInteractions(t),this},i.prototype.getMouseInteractions=function(){return this._h.getMouseInteractions()},i.prototype.dispose=function(){return t.prototype.dispose.call(this),this._h.dispose(),this},i.prototype.restore=function(){return t.prototype.restore.call(this),this._h.restore(),this},i.prototype.isDisposed=function(){return t.prototype.isDisposed.call(this)&&this._h.isDisposed()},i}(JE),mN=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.Zo=new c(ir),i}return n(i,t),i.prototype.setStrokeStyle=function(t){return this.Zo.C(t),this._h.Ys(this.Zo.D(this.getHighlighted())),this.wf.xn(),this},i.prototype.getStrokeStyle=function(){return this.Zo.L()},i.prototype.setStrokeStyleHighlight=function(t){return this.Zo.I(t),this._h.Ys(this.Zo.D(this.getHighlighted())),this},i.prototype.getStrokeStyleHighlight=function(){return this.Zo.P()},i.prototype.setHighlighted=function(i){return t.prototype.setHighlighted.call(this,i),this._h.Ys(this.Zo.D(i)),this},i}(SN),bN=function(t){function i(i,n,e,r,s,o,h){var u=t.call(this,i,n,e,s,o,h)||this;return u.wf=i,u._h=u.wf.Rc(u.renderingScale,r).Ys(u.getStrokeStyle()).$n(u.getFillStyle()),u.gf(u._h),u}return n(i,t),i.prototype.zc=function(){var t=this,i=this.Ec();if(i.length>2){var n=Ks(i),e=l(n.max.x-n.min.x,n.max.y-n.min.y);this.setContentSize(e);var r=i.map((function(i){var r=fo(i,ao(n.min,-1));return t.scale.Li(t.position,fo(r,lo(ao(fo(t.origin,l(1,1)),-.5),e)))})).map((function(i){return sr(i,t.scale,t.renderingScale)}));this._h.au(r)}else this._h&&this._h.dispose(),this.setContentSize(l(0,0))},i.prototype.Tf=function(){return t.prototype.Tf.call(this),t.prototype.isDisposed.call(this)||this.zc(),this},i.prototype.Fe=function(){return this.zc(),t.prototype.Fe.call(this)},i}(mN),gN=function(i){function e(t,n,e,r,s,o){var h=i.call(this,t,n,e,r,s,o)||this;return h.$o="label",h._h=h.wf.$e(h.renderingScale).$n(h.Ho.D(h.getHighlighted())).Jn(h.$o),h.gf(h._h),h}return n(e,i),e.prototype.Tf=function(){var i=this.getPosition(l(0,0),t.UISpace.Content),n=sr(i,this.scale,this.renderingScale);return this._h.ph(n),this},e.prototype.Fe=function(){this._h.Fe();var t=0===this.$o.length?l(0,0):this._h.Nc();return this.setContentSize(t),i.prototype.Fe.call(this)},e.prototype.setText=function(t){return this.$o=t,this._h.Jn(this.$o),this.wf.xn(),this},e.prototype.getText=function(){return this.$o},e.prototype.setFont=function(t){return this._h.ie(t),this.wf.xn(),this},e.prototype.getFont=function(){return this._h.te()},e.prototype.setTextRotation=function(t){return this._h.ne(t),this.wf.xn(),this},e.prototype.getTextRotation=function(){return this._h.ee()},e}(SN),wN=e(e(e({},aN),cN),{uiElement:gN}),pN=function(i){function e(t,n,e,r,s,o){var h=i.call(this,t,n,e,r,s,o)||this;return h.fitTo=h.Lf.bind(h),h.setSize=h.fitTo,h._h=h.wf.Pc(n).$n(h.Ho.D(h.getHighlighted())).Ys(h.getStrokeStyle()),h.gf(h._h),h}return n(e,i),e.prototype.Tf=function(){var i=this,n=Ks([this.getPosition(l(-1,-1),t.UISpace.Content),this.getPosition(l(1,1),t.UISpace.Content)].map((function(t){return sr(t,i.scale,i.renderingScale)}))),e={x:n.max.x-n.min.x,y:n.max.y-n.min.y};return this._h.oi(e).ph(sr(this.getPosition(l(-1,-1),t.UISpace.Content),this.scale,this.renderingScale)).Fe(),this},e.prototype.Lf=function(t){return this.setContentSize(t),this.wf.xn(),this},e.prototype.If=function(){return 0},e.prototype.Of=function(){return 0},e.prototype.Df=function(){return 0},e.prototype.Pf=function(){return 0},e}(mN),kN=function(i){function e(t,n,e,r,s,o){var h=i.call(this,t,n,e,r,s,o)||this;return h.Vc=l(0,0),h.setSize=h.fitTo.bind(h),h._h=t.Gc(n).Zu(0).Ku(360).$n(h.Ho.D(h.getHighlighted())).Ys(h.getStrokeStyle()),h.gf(h._h),h}return n(e,i),e.prototype.Tf=function(){var i=this.getSize(t.UISpace.Content).x/2;return this._h.Ju(i*this.renderingScale.tn().x).Qu(i*this.renderingScale.tn().y).ph(sr(this.getPosition(l(0,0),t.UISpace.Content),this.scale,this.renderingScale)).ta(255).Fe(),this},e.prototype.Lf=function(t){var i=Math.sqrt(t.x*t.x/4+t.y*t.y/4);return this.setContentSize(l(2*i,2*i)),this.Vc=t,this.wf.xn(),this},e.prototype.If=function(){return(this.getSize(t.UISpace.Content).x-this.Vc.x)/2},e.prototype.Of=function(){return(this.getSize(t.UISpace.Content).x-this.Vc.x)/2},e.prototype.Df=function(){return(this.getSize(t.UISpace.Content).y-this.Vc.y)/2},e.prototype.Pf=function(){return(this.getSize(t.UISpace.Content).y-this.Vc.y)/2},e.prototype.fitTo=function(t){var i=Math.min(t.x,t.y);return this.setContentSize(l(i,i)),this.Vc=t,this},e}(mN),xN=function(i){function e(t,n,e,r,s,o){var h=i.call(this,t,n,e,CE.Convex,r,s,o)||this;return h.wf=t,h.Hc=w(l(0,0)),h.jc=!1,h.setSize=h.fitTo.bind(h),h.zc(),h}return n(e,i),e.prototype.Ec=function(){var t=this.Hc.S();if(this.jc){var i=Math.min(t.x,t.y);return[l(0,0),l(i/2,i/2),l(0,i),l(-i/2,i/2)]}var n=2*Math.sqrt(this.Hc.S().x*this.Hc.S().x/4+this.Hc.S().y*this.Hc.S().y/4),e=l(Math.cos(Math.PI/4)*n,0),r=l(0,Math.sin(Math.PI/4)*n),s=l(0,0),o=fo(s,fo(e,r)),h=fo(o,fo(r,ao(e,-1)));return[s,o,h,co(h,fo(e,r))]},e.prototype.Lf=function(t){return this.Hc.l(t),this.jc=!1,this.wf.xn(),this},e.prototype.If=function(){return this.jc?0:(this.getSize(t.UISpace.Content).x-this.Hc.S().x)/2},e.prototype.Of=function(){return this.jc?0:(this.getSize(t.UISpace.Content).x-this.Hc.S().x)/2},e.prototype.Df=function(){return this.jc?0:(this.getSize(t.UISpace.Content).y-this.Hc.S().y)/2},e.prototype.Pf=function(){return this.jc?0:(this.getSize(t.UISpace.Content).y-this.Hc.S().y)/2},e.prototype.fitTo=function(t){return this.Hc.l(t),this.jc=!0,this.wf.xn(),this},e}(bN),MN=function(i){function e(n,e,r,s,o,h){var u=i.call(this,n,e,r,CE.Simple,s,o,h)||this;return u.Wc=w(l(0,0)),u.Uc=w(10),u.Yc=w(void 0),u.Ef=w(t.UIDirections.Right),u.zc(),u}return n(e,i),e.prototype.setDirection=function(t){return this.Ef.l(t),this.wf.xn(),this},e.prototype.getDirection=function(){return this.Ef.S()},e.prototype.setPointerLength=function(t){return this.Uc.l(t),this.wf.xn(),this},e.prototype.getPointerLength=function(){return this.Uc.S()},e.prototype.setPointerAngle=function(t){return this.Yc.l(t),this.wf.xn(),this},e.prototype.getPointerAngle=function(){var t=this.Yc.S();if(void 0===t){var i=this.Xc();if(0===i)return 0;t=0!==i?180*Math.atan(2*this.getPointerLength()/i)/Math.PI:0}return Math.min(Math.max(t,1),89)},e.prototype.Lf=function(t){return this.Wc.l(t),this.wf.xn(),this},e.prototype.Zc=function(){var t=this.getPointerAngle();return 0===t?0:2*this.getPointerLength()/Math.tan(t*Math.PI/180)},e.prototype.Kc=function(){return rs(this.Ef.S())?this.Wc.S().x:this.Wc.S().y},e.prototype.Xc=function(){return rs(this.Ef.S())?this.Wc.S().y:this.Wc.S().x},e.prototype.If=function(){switch(this.Ef.S()){case t.UIDirections.Right:return 0;case t.UIDirections.Left:return this.getPointerLength();case t.UIDirections.Up:case t.UIDirections.Down:return Math.max(0,this.Zc()-this.Xc());default:return 0}},e.prototype.Of=function(){switch(this.Ef.S()){case t.UIDirections.Right:return this.getPointerLength();case t.UIDirections.Left:return 0;case t.UIDirections.Up:case t.UIDirections.Down:return Math.max(0,this.Zc()-this.Xc());default:return 0}},e.prototype.Df=function(){switch(this.Ef.S()){case t.UIDirections.Right:case t.UIDirections.Left:return Math.max(0,this.Zc()-this.Xc());case t.UIDirections.Up:return this.getPointerLength();case t.UIDirections.Down:default:return 0}},e.prototype.Pf=function(){switch(this.Ef.S()){case t.UIDirections.Right:case t.UIDirections.Left:return Math.max(0,this.Zc()-this.Xc());case t.UIDirections.Up:return 0;case t.UIDirections.Down:return this.getPointerLength();default:return 0}},e.prototype.Ec=function(){var t=es(this.Ef.S()),i=ho(l(0,0),t),n=this.getPointerLength(),e=this.Zc(),r=this.Kc(),s=this.Xc();if(!(0!==n&&0!==e||0!==r&&0!==s))return[];var o=l(0,0),h=fo(fo(o,ao(t,-n)),ao(i,e/2)),u=fo(h,ao(i,(s-e)/2)),a=fo(u,ao(t,-r)),f=fo(fo(o,ao(t,-n)),ao(i,-e/2)),c=fo(f,ao(i,-(s-e)/2)),d=fo(c,ao(t,-r));return 0===r||0===s?[o,h,f]:0===n||0===e?[u,a,d,c]:Br(s,e)?[o,h,a,d,f]:[o,h,u,a,d,c,f]},e}(bN),AN=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.setSize=function(t){return this.setContentSize(t),this.wf.xn(),this},i}(dN),FN=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.qc=[],i.Jc=0,i.Qc=function(t){var n=i.qc.indexOf(t);n>=0&&i.qc.splice(n,1)},i.$c=function(t){i.qc.includes(t)||i.qc.push(t)},i}return n(i,t),i.prototype.getMembers=function(){return this.qc},i.prototype.getMemberCount=function(){return this.qc.length},i.prototype.setMinimumSize=function(t){return this.tl=t,this.wf.xn(),this},i.prototype.getMinimumSize=function(){return this.tl},i.prototype.addElement=function(t,i){void 0===i&&(i=-1);var n=t.Xf(this.wf,this.renderingScale,this.scale,this.Qc,this.$c,this.vn,!1);return n.setMouseInteractions(this.getMouseInteractions()),i>=0?this.qc.splice(i,0,n):this.qc.push(n),this.gf(n),Jr(!this.isDisposed())(n),n},i.prototype.dispose=function(){t.prototype.dispose.call(this);var i=this.qc.slice();return i.slice().forEach(Tr),this.qc=i,this},i.prototype.restore=function(){return t.prototype.restore.call(this),this.qc.forEach(Fr),this},i.prototype.isDisposed=function(){return this.qc.reduce((function(t,i){return!!t&&i.isDisposed()}),t.prototype.isDisposed.call(this))},i.prototype.setMouseInteractions=function(i){t.prototype.setMouseInteractions.call(this,i);for(var n=0;n0?(this.size.x-this.Jc)/r:0;return this.qc.reduce((function(t,i){return i instanceof AN?n.scale.Li({x:t,y:e.y},{x:s+i.getSize().x,y:0}).x:i.setOrigin(l(-1,0)).setPosition(l(t,e.y)).Tf().getPosition(l(1,0)).x}),e.x),this},e.prototype.Fe=function(){for(var t=0;t0?(this.size.y-this.Jc)/r:0;return this.qc.reduce((function(t,i){return i instanceof AN?n.scale.Li({x:e.x,y:t},{x:0,y:-(s+i.getSize().y)}).y:i.setOrigin(l(0,1)).setPosition(l(e.x,t)).Tf().getPosition(l(0,-1)).y}),e.y),this},e.prototype.Fe=function(){for(var t=0;t0?this.al*r.y+this.ll.vi().y:0)+.5*this.sl[0].vi().y},o={x:s.x,y:this.getPosition({x:-1,y:1},t.UISpace.Content).y-.5*this.sl[this.sl.length-1].vi().y};this.cl.ph({x:f.x,y:s.y}),this.ll.Bh({x:-1,y:-1}).ph(a);var h=e.min,u=e.max;e.getSteps().forEach((function(t,i){var r=Us(s,o,!0===e.getInterpolation()?(t.value-h)/(u-h):.9*(t.value-h)/(u-h));n.sl[i].Bh({x:-1,y:0}).ph(r)}))}else{var a,f=this.getPosition({x:-1,y:-1},t.UISpace.Content),c=this.getPosition({x:1,y:1},t.UISpace.Content),l=this.sl.reduce((function(t,i){return Math.max(t,i.vi().y)}),0),d=fo(f,{x:.5*this.sl[0].vi().x,y:l}),v={x:(a={x:c.x,y:d.y}).x-(.5*this.sl[this.sl.length-1].vi().x+(this.hl.length>0?this.al*r.x+this.ll.vi().x:0)),y:d.y},y={x:d.x,y:d.y+this.ol*r.y};this.cl.ph(y),this.ll.Bh({x:1,y:1}).ph(a);var S=e.min,m=e.max;e.getSteps().forEach((function(t,i){var r=Us(d,v,!0===e.getInterpolation()?(t.value-S)/(m-S):.9*(t.value-S)/(m-S));n.sl[i].Bh({x:0,y:1}).ph(r)}))}}return this},e.prototype.Fe=function(){if(this.Sl){this.ll.restore(),this.cl.restore();for(var t=this.Sl.getSteps(),n=this.sl.length;n0?this.al+this.ll.Fe().Nc().y:0)+r+.5*this.sl[0].Fe().Nc().y+.5*this.sl[this.sl.length-1].Fe().Nc().y;this.setContentSize({x:s,y:o})}else{e=this.dl,r=this.vl;this.cl.oi({x:e*this.renderingScale.x.getPixelSize(),y:r*this.renderingScale.y.getPixelSize()});s=(this.hl.length>0?this.al+this.ll.Fe().Nc().x:0)+e+.5*this.sl[0].Fe().Nc().x+.5*this.sl[this.sl.length-1].Fe().Nc().x,o=r+this.ol+this.sl.reduce((function(t,i){return Math.max(t,i.Fe().Nc().y)}),0);this.setContentSize({x:s,y:o})}}else this.sl.forEach((function(t){return t.dispose()})),this.sl.length=0,this.ll.dispose(),this.cl.dispose(),this.setContentSize({x:0,y:0});return i.prototype.Fe.call(this)},e.prototype.restore=function(){return i.prototype.restore.call(this),this.cl.restore(),this.sl.forEach(Fr),this.ll.restore(),this},e.prototype.dispose=function(){return i.prototype.dispose.call(this),this.cl.dispose(),this.sl.forEach(Tr),this.ll.dispose(),this},e.prototype.isDisposed=function(){return i.prototype.isDisposed.call(this)&&this.cl.isDisposed()},e.prototype.setMouseInteractions=function(t){return this.cl.setMouseInteractions(t),this.sl.forEach((function(i){return i.setMouseInteractions(t)})),this},e.prototype.getMouseInteractions=function(){return this.cl.getMouseInteractions()},e}(JE),YN={lutElement:{},setLUT:function(t){return this.lutElement.yl(t),this},getLUT:function(){return this.lutElement.ml()},setLUTLength:function(t){return this.lutElement.bl(t),this},getLUTLength:function(){return this.lutElement.wl()},setLUTThickness:function(t){return this.lutElement.pl(t),this},getLUTThickness:function(){return this.lutElement.kl()},setLookUpUnit:function(t){return this.lutElement.xl(t),this},getLookUpUnit:function(){return this.lutElement.Ml()},setLUTStepValueFormatter:function(t){return this.lutElement.Al(t),this}},XN=e(e(e({},aN),fN),{background:pN,alignment:"horizontal",setAlignment:function(t){return e(e({},this),{alignment:t})},Xf:function(t,i,n,e,r,s,o){var h=this,u=new CN(t,i,n,this.background,e,r,s),a=u.addElement({Xf:function(){return new UN(t,i,n,Cr,Cr,s,h.alignment)}}),f=Object.assign(u,zN,{stylableTexts:[a]},YN,{lutElement:a});return uN(f,s,o),this.applyStylers(f,s)}}).addStyler(oN),ZN=e(e(e({},aN),fN),{background:pN,buttonBuilder:jN,setPictureOff:function(t){return e(e({},this),{buttonBuilder:this.buttonBuilder.setPictureOff(t)})},setPictureOn:function(t){return e(e({},this),{buttonBuilder:this.buttonBuilder.setPictureOn(t)})},alignment:"horizontal",setAlignment:function(t){return e(e({},this),{alignment:t})},Xf:function(i,n,e,r,s,o){var h=this,u=new CN(i,n,e,this.background,r,s,o),a=u.addElement(DN),f=a.addElement(PN);f.addGap();var c=f.addElement(this.buttonBuilder);f.addGap();var l=a.addElement(PN);l.addGap();var d=l.addElement(wN);l.addGap(),a.addGap();var v=u.addElement(DN);v.addGap();var y=v.addElement({Xf:function(){return new UN(i,n,e,Cr,Cr,o,h.alignment)}});v.addGap(),u.addGap();var S=Object.assign(u,_N,{setTextLabel:d},zN,{stylableTexts:[d,y]},RN("LUTText",[y]),EN,{button:c},YN,{lutElement:y}),m=function(){S.setOn(!S.getOn())};S.onMouseClick(m),S.onMouseEnter((function(){return S.setHighlighted(!0)})),S.onMouseLeave((function(){return S.setHighlighted(!1)})),S.setMouseStyle(t.MouseStyles.Point);var b=WE(new UE.Poke(m));return S.onTouchStart(b.onTouchStart),S.onTouchMove(b.onTouchMove),S.onTouchEnd(b.onTouchEnd),this.applyStylers(S,o)}}).addStyler(oN).addStyler(hN),KN={alignment:null,title:null,entryStylers:null,entries:[],add:function(t,i){var n=!i||"object"!=typeof i||void 0===i.disposeOnClick||i.disposeOnClick,e=i&&"object"==typeof i&&void 0!==i.builder?i.builder:void 0;return t instanceof mV?this.addChart(t,n,e):"attach"in t?this.addAttachable(t,n,e):t&&this.addDashboard(t,n,e),this},addAttachable:function(t,i,n){var e=t.ml&&t.ml(),r=n;r||(r=e?ZN.setAlignment(this.alignment):WN);var s=this.addElement(r);if(e&&"setLUT"in s){s.setLUT(e.lut);var o=e.lut.getUnits(),h=e.lookUpProperty,u=o.length>0?o:"x"===h?"x":"y"===h?"y":"z"===h?"z":"";s.setLookUpUnit(u)}return this.entryStylers.forEach((function(t){return t(s)})),this.entries.push({entry:s,component:t}),t.attach(s,i),this},addChart:function(t,i,n){var e=this;return t.Fl().forEach((function(t){return e.addAttachable(t,i,n)})),this},addDashboard:function(t,i,n){var e=this;return t.forEachChart((function(t){return e.addChart(t,i,n)})),this},setTitle:function(t){return this.title.setText(t),this},getTitle:function(){return this.title.getText()},setTitleFillStyle:function(t){return this.title.setTextFillStyle(t),this},getTitleFillStyle:function(){return this.title.getTextFillStyle()},setTitleFont:function(t){return this.title.setTextFont(t),this},getTitleFont:function(){return this.title.getTextFont()},setTitleRotation:function(t){return this.title.setTextRotation(t),this},getTitleRotation:function(){return this.title.getTextRotation()},setEntries:function(t){return this.entries.forEach((function(i){return t(i.entry,i.component)})),this}},qN={alignment:"vertical",layoutBuilder:PN,setAlignment:function(t){return e(e({},this),{alignment:t,layoutBuilder:"horizontal"===t?DN:PN})},getAlignment:function(){return this.alignment},titleBuilder:VN,styleTitle:function(t){return e(e({},this),{titleBuilder:this.titleBuilder.addStyler(t)})},entryStylers:[],styleEntries:function(t){return e(e({},this),{entryStylers:u(u([],h(this.entryStylers)),[t])})}},JN=e(e(e(e({},aN),fN),qN),{background:pN,Xf:function(t,i,n,e,r,s,o){var h=Object.assign(this.layoutBuilder.setBackground(this.background).Xf(t,i,n,e,r,s,!1),KN,{alignment:this.alignment,entryStylers:this.entryStylers}),u=h.addElement("horizontal"===this.alignment?PN:DN),a=u.addElement(this.titleBuilder).setText("Legend").setMargin({right:6});return u.addGap(),h=Object.assign(h,{title:a}),uN(h,s,o),this.applyStylers(h,s)}}).addStyler((function(t,i){return t.setPadding(5).setMargin(3)})).styleEntries((function(t){return t.setPadding({left:3,right:3})})),QN=function(i){function e(n,e,r,s,o,h){var u=i.call(this,n,e,r,s,o,h)||this;return u.Tl=10,u.Cl=t.UIDirections.Up,u.Bl=0,u.$o=u.gf(n.$e(u.renderingScale)),u.Wt=u.gf(n.Gf(u.renderingScale)),u}return n(e,i),e.prototype.Tf=function(){if(i.prototype.Tf.call(this),i.prototype.isDisposed.call(this))return this;var n=sr(this.getPosition(),this.scale,this.renderingScale),e=this.renderingScale.Li(n,{x:this.Cl===t.UIDirections.Right?-this.Tl:this.Cl===t.UIDirections.Left?this.Tl:0,y:this.Cl===t.UIDirections.Up?-this.Tl:this.Cl===t.UIDirections.Down?this.Tl:0}),r=this.renderingScale.Li(e,{x:this.Cl===t.UIDirections.Right?-this.Bl:this.Cl===t.UIDirections.Left?this.Bl:0,y:this.Cl===t.UIDirections.Up?-this.Bl:this.Cl===t.UIDirections.Down?this.Bl:0});return this.Wt.ha(n).Ku(e),this.$o.ph(r).Bh(this.Cl===t.UIDirections.Up?{x:0,y:1}:this.Cl===t.UIDirections.Down?{x:0,y:-1}:this.Cl===t.UIDirections.Right?{x:1,y:0}:{x:-1,y:0}),this},e.prototype.Fe=function(){var n=this.Wt.ea(),e=n instanceof nr?n.getThickness():0;return this.size=this.Cl===t.UIDirections.Left||this.Cl===t.UIDirections.Right?{x:this.Tl+this.Bl+this.$o.Fe().Nc().x,y:e}:{y:this.Tl+this.Bl+this.$o.Fe().Nc().y,x:e},i.prototype.Fe.call(this)},e.prototype.dispose=function(){return i.prototype.dispose.call(this),this.$o.dispose(),this.Wt.dispose(),this},e.prototype.restore=function(){return i.prototype.restore.call(this),this.$o.restore(),this.Wt.restore(),this},e.prototype.setMouseInteractions=function(t){return this.$o.setMouseInteractions(t),this.Wt.setMouseInteractions(t),this},e.prototype.getMouseInteractions=function(){return this.$o.getMouseInteractions()},e.prototype.getText=function(){return this.$o.Kn()},e.prototype.setTextFillStyle=function(t){return this.$o.$n(t),this.wf.xn(),this},e.prototype.getTextFillStyle=function(){return this.$o.Qn()},e.prototype.setTextFont=function(t){return this.$o.ie(t),this},e.prototype.setTextRotation=function(t){return this.$o.ne(t),this},e.prototype.getTextRotation=function(){return this.$o.ee()},e.prototype.getTextFont=function(){return this.$o.te()},e.prototype.setText=function(t){return this.$o.Jn(t),this.wf.xn(),this},e.prototype.setDirection=function(t){return this.Cl=t,this.wf.xn(),this},e.prototype.getDirection=function(){return this.Cl},e.prototype.setPointerLength=function(t){return this.Tl=t,this.wf.xn(),this},e.prototype.getPointerLength=function(){return this.Tl},e.prototype.setTickLabelPadding=function(t){return this.Bl=t,this.wf.xn(),this},e.prototype.getTickLabelPadding=function(){return this.Bl},e.prototype.setTickStyle=function(t){return this.Wt.na(t),this.wf.xn(),this},e.prototype.getTickStyle=function(){return this.Wt.ea()},e}(JE),$N=e(e({},aN),{Xf:function(t,i,n,e,r,s,o){var h=new QN(t,i,n,e,r,s);return uN(h,s,o),this.applyStylers(h,s)}}).addStyler(oN).addStyler((function(t,i){return t.setPointerLength(i.numericTickStrategy.majorTickStyle.getTickLength()).setTickLabelPadding(i.numericTickStrategy.majorTickStyle.getTickPadding()).setTickStyle(i.uiTickStrokeStyle||i.numericTickStrategy.majorTickStyle.getTickStyle()).setTextFont(i.customTickMarkerFont||i.uiTickFont||oh).setTextFillStyle(i.customTickMarkerTextFillStyle||i.uiTickTextFillStyle||Re)})),tV=WN.addStyler((function(t){return t.onSwitch((function(i,n){return!0===n?setTimeout((function(){return t.setOn(!1)}),300):void 0}))})),iV=JN.setAlignment("horizontal"),nV=JN.setAlignment("vertical"),eV={TextBox:VN,CheckBox:WN,ButtonBox:tV,PointableTextBox:GN,AxisTick:$N,LUTRange:XN},rV={HorizontalLegendBox:iV,VerticalLegendBox:nV},sV=function(t){function i(i,n,e,r,s,o,h,u,a){var f=t.call(this,i,n,e,r,s,o,a)||this;return f.Ll=h,f.Il=u,f}return n(i,t),i}(rh),oV=function(t,i,n){return Lr(t+.1*(i-t)+.5*n.getPixelSize()*Math.sign(i-t),t,i)},hV=function(t,i,n){var e=n._t(t),r=n._t(i);return Lr(n.Dt(e+.1*(r-e)+.5*Math.sign(r-e)),t,i)},uV=function(i){function e(n,e,r,s,o,h,u,a,f,c,d,v,y,S,m,b,g){var w,p=i.call(this,c,f,u,m,b,{numeric:m.numericTickStrategy,datetime:m.dateTimeTickStrategy,time:m.timeTickStrategy},g)||this;p.Ll=n,p.Ol=e,p.Pl=r,p.Rf=s,p.Dl=o,p._l=h,p.chart=c,p.Rl=v,p.zl=y,p.El=new Map,p.Nl=void 0,p.Vl=0,p.Gl=[],p.Hl=[],p.wn=Ho.fitting,p.jl=!0,p.Wl=0,p.Ul=8,p.Yl=void 0,p.Xl=void 0,p.Zl=20,p.Kl=1,p.ql=!0,p.Jl=!0,p.Ql=!0,p.$l=!0,p.td=!0,p.nd=!0,p.ed=!0,p.rd=!0,p.sd=!0,p.od=!0,p.hd=p.dn.defaultDragMouseStyle,p.ud=p.dn.defaultDragMouseStyle,p.ad=p.dn.defaultDragMouseStyle,p.fd=p.dn.defaultDragMouseStyle,p.ld=p.dn.defaultDragMouseStyle,p.an=new qe,p.dd=[],p.vd=function(t){var i=p.Hl.indexOf(t);i>=0&&p.Hl.splice(i,1)},p.yd=function(t){return p.Hl.indexOf(t)<0&&p.Hl.push(t),p.vd},p.kc=function(t,i){return p.an.emit("axisAreaTouch",p,i)},p.Sd=ds(p.dd),p.md=vs(p.dd),p.onAxisInteractionAreaMouseClick=function(t){return p.an.on("axisAreaMouseClick",t)},p.onAxisInteractionAreaMouseDoubleClick=function(t){return p.an.on("axisAreaDoubleClick",t)},p.onAxisInteractionAreaMouseDown=function(t){return p.an.on("axisAreaMouseDown",t)},p.onAxisInteractionAreaMouseUp=function(t){return p.an.on("axisAreaMouseUp",t)},p.onAxisInteractionAreaMouseEnter=function(t){return p.an.on("axisAreaMouseEnter",t)},p.onAxisInteractionAreaMouseLeave=function(t){return p.an.on("axisAreaMouseLeave",t)},p.onAxisInteractionAreaMouseMove=function(t){return p.an.on("axisAreaMouseMove",t)},p.onAxisInteractionAreaMouseWheel=function(t){return p.an.on("axisAreaMouseWheel",t)},p.onAxisInteractionAreaMouseDragStart=function(t){return p.an.on("axisAreaMouseDragStart",t)},p.onAxisInteractionAreaMouseDrag=function(t){return p.an.on("axisAreaMouseDrag",t)},p.onAxisInteractionAreaMouseDragStop=function(t){return p.an.on("axisAreaMouseDragStop",t)},p.onAxisInteractionAreaTouchStart=function(t){return p.an.on("axisAreaTouchStart",t)},p.onAxisInteractionAreaTouch=function(t){return p.an.on("axisAreaTouch",t)},p.onAxisInteractionAreaTouchStop=function(t){return p.an.on("axisAreaTouchEnd",t)},p.onAxisAreaMouseDragStart=function(t){return p.an.on("axisAreaMouseDragStart",t)},p.onAxisAreaMouseDrag=function(t){return p.an.on("axisAreaMouseDrag",t)},p.onAxisAreaMouseDragStop=function(t){return p.an.on("axisAreaMouseDragStop",t)},p.onAxisInteractionAreaMouseTouchStart=function(t){return p.an.on("axisAreaTouchStart",t)},p.onAxisInteractionAreaMouseTouch=function(t){return p.an.on("axisAreaTouch",t)},p.onAxisInteractionAreaMouseTouchStop=function(t){return p.an.on("axisAreaTouchEnd",t)},p.offAxisInteractionAreaMouseClick=function(t){return p.an.off(t,"axisAreaMouseClick")},p.offAxisInteractionAreaMouseDoubleClick=function(t){return p.an.off(t,"axisAreaDoubleClick")},p.offAxisInteractionAreaMouseDown=function(t){return p.an.off(t,"axisAreaMouseDown")},p.offAxisInteractionAreaMouseUp=function(t){return p.an.off(t,"axisAreaMouseUp")},p.offAxisInteractionAreaMouseEnter=function(t){return p.an.off(t,"axisAreaMouseEnter")},p.offAxisInteractionAreaMouseLeave=function(t){return p.an.off(t,"axisAreaMouseLeave")},p.offAxisInteractionAreaMouseMove=function(t){return p.an.off(t,"axisAreaMouseMove")},p.offAxisInteractionAreaMouseWheel=function(t){return p.an.off(t,"axisAreaMouseWheel")},p.offAxisInteractionAreaMouseDragStart=function(t){return p.an.off(t,"axisAreaMouseDragStart")},p.offAxisInteractionAreaMouseDrag=function(t){return p.an.off(t,"axisAreaMouseDrag")},p.offAxisInteractionAreaMouseDragStop=function(t){return p.an.off(t,"axisAreaMouseDragStop")},p.offAxisInteractionAreaTouchStart=function(t){return p.an.off(t,"axisAreaTouchStart")},p.offAxisInteractionAreaTouch=function(t){return p.an.off(t,"axisAreaTouch")},p.offAxisInteractionAreaTouchStop=function(t){return p.an.off(t,"axisAreaTouchEnd")},p.offAxisInteractionAreaMouseTouchStart=function(t){return p.an.off(t,"axisAreaTouchStart")},p.offAxisInteractionAreaMouseTouch=function(t){return p.an.off(t,"axisAreaTouch")},p.offAxisInteractionAreaMouseTouchStop=function(t){return p.an.off(t,"axisAreaTouchEnd")},p.bd=function(t,i){return i.getAllocatesAxisSpace()?Math.max(t,i.update().qf()):t},p.gd=function(t){var i=p.Gl.indexOf(t);-1!==i&&p.Gl.splice(i,1)},p.wd=function(t){p.Gl.includes(t)||p.Gl.push(t)},p.pd=function(t,i){p.$l&&(p.an.emit("axisAreaDoubleClick",p,i),p.release(),ss(i))},p.kd=function(t){(p.Jl||p.ql||p.Ql||p.$l)&&(p.an.emit("axisAreaMouseEnter",p),p.xd(t))},p.Md=function(t){p.Ad(t),p.an.emit("axisAreaMouseLeave",p)},p.Fd=function(t,i,n){var e,r,s=Rr(null===(e=p.chart.ps.overrideInteractionMouseButtons)||void 0===e?void 0:e.axisXYZoomMouseButton,0),o=Rr(null===(r=p.chart.ps.overrideInteractionMouseButtons)||void 0===r?void 0:r.axisXYPanMouseButton,2),h=l(i.clientX,i.clientY);n===o&&p.Jl?(p.an.emit("axisAreaMouseDragStart",p,i,n),p.Td(t),ss(i)):n===s&&p.ql&&(p.an.emit("axisAreaMouseDragStart",p,i,n),p.Cd(t,h),ss(i))},p.Bd=function(t,i,n,e,r){var s,o,h=Rr(null===(s=p.chart.ps.overrideInteractionMouseButtons)||void 0===s?void 0:s.axisXYZoomMouseButton,0),u=Rr(null===(o=p.chart.ps.overrideInteractionMouseButtons)||void 0===o?void 0:o.axisXYPanMouseButton,2),a=l(i.clientX,i.clientY);n===u&&p.Jl?(p.an.emit("axisAreaMouseDrag",p,i,n,e,r),p.Ld(t,r),ss(i)):n===h&&p.ql&&(p.an.emit("axisAreaMouseDrag",p,i,n,e,r),p.Id(t,e,a,r),ss(i))},p.Od=function(t,i,n,e){var r,s,o=Rr(null===(r=p.chart.ps.overrideInteractionMouseButtons)||void 0===r?void 0:r.axisXYZoomMouseButton,0),h=Rr(null===(s=p.chart.ps.overrideInteractionMouseButtons)||void 0===s?void 0:s.axisXYPanMouseButton,2),u=l(i.clientX,i.clientY);n===h&&p.Jl?(p.Pd(t),p.an.emit("axisAreaMouseDragStop",p,i,n,e),ss(i)):n===o&&p.ql&&(p.an.emit("axisAreaMouseDragStop",p,i,n,e),p.Dd(t,e,u),ss(i)),t.getIsUnderMouse()&&(p.Jl||p.ql||p.Ql||p.$l)&&p.xd(t)},p._d=function(t,i){if(p.Ql){p.an.emit("axisAreaMouseWheel",p,i),p.stop();var n=p.dn.getWidth(p.Rf.oo.ds(i.clientX,i.clientY)),e=p.Rt.Dt(n);p.zoom(e,Cs(i)),ss(i)}},p.Rd=function(t,i){return p.an.emit("axisAreaMouseClick",p,i)},p.zd=function(t,i){return p.an.emit("axisAreaMouseDown",p,i)},p.Ed=function(t,i){return p.an.emit("axisAreaMouseUp",p,i)},p.Nd=function(t,i){return p.an.emit("axisAreaMouseMove",p,i)},p.Vd=function(t,i,n){p.ql&&(p.an.emit("axisAreaTouchStart",p,n),p.xd(t),p.Cd(t,i),ss(n))},p.Gd=function(t,i,n,e,r){p.ql&&(p.an.emit("axisAreaTouch",p,r),p.Id(t,i,n,e),ss(r))},p.Hd=function(t,i,n,e){p.ql&&(p.an.emit("axisAreaTouchEnd",p,e),p.Dd(t,i,n),p.Ad(t),ss(e))},p.jd=function(t,i,n,e){(p.Jl||p.Ql)&&(p.xd(t),p.Td(t),ss(e))},p.Wd=function(t,i,n,e,r,s){if(p.Jl){var o=l((e.x+r.x)/2,(e.y+r.y)/2);p.Ld(t,o),ss(s)}if(p.Ql){var h=p.Rf.oo.ds(i.x,i.y),u=p.Rf.oo.ds(n.x,n.y),a=Math.abs(p.dn.getWidth(co(h,e))-p.dn.getWidth(co(u,r)))-Math.abs(p.dn.getWidth(h)-p.dn.getWidth(u)),f=p.Rt.Li(p.Xn,-a),c=p.Rt.Li(p.Zn,a);p.Wn(f,c),ss(s)}},p.Ud=function(t,i,n,e){(p.Jl||p.Ql)&&(p.Pd(t),p.Ad(t),ss(e))},p.Yd=function(t,i){(p.td||p.nd)&&p.Xd(t)},p.Zd=function(t,i){p.Kd(t)},p.qd=function(t,i,n){var e=l(i.clientX,i.clientY);p.td&&p.Jd(t,e)},p.Qd=function(t,i,n,e,r){var s=l(i.clientX,i.clientY);p.td&&p.$d(t,s,e,r)},p.tv=function(t,i,n,e,r){var s=l(i.clientX,i.clientY);p.td&&p.nv(t,s,e,r)},p.ev=function(t,i,n,e){var r=l(i.clientX,i.clientY);(p.td||p.nd)&&p.rv(t,r,e),(p.td||p.nd)&&p.Xd(t)},p.sv=function(t,i){p.nd&&(p.stop(),p.zoom(p.Xn,Cs(i)),ss(i))},p.ov=function(t,i){p.nd&&(p.stop(),p.zoom(p.Zn,Cs(i)),ss(i))},p.hv=function(t,i,n){p.td&&(p.Xd(t),p.Jd(t,i),ss(n))},p.uv=function(t,i,n,e,r){p.td&&(p.$d(t,i,n,e),ss(r))},p.av=function(t,i,n,e,r){p.td&&(p.nv(t,i,n,e),ss(r))},p.fv=function(t,i,n,e){p.td&&(p.rv(t,i,n),p.Kd(t),ss(e))},S(p,p.yd),u.cv=p,p.lv=d,p.dv=p.lv>50?1:-1,p.vv=(w=p.dn.toPoint(0,-p.dv),Math.abs(w.x)>=Math.abs(w.y)?w.x>=0?t.UIDirections.Right:t.UIDirections.Left:w.y>=0?t.UIDirections.Up:t.UIDirections.Down),p.yv=a,p.Sv=p.Rt instanceof zo?(new Vo).Xi(p.dn.toVec2(p.Rt,p.yv)):(new Go).Xi(p.dn.toVec2(p.Rt,p.yv)),p.mv=p.chart.pixelScale,p.bv=(new Vo).Xi(p.dn.toVec2(p.dn.getWidth(p.mv),p.yv)),p.gv=p.Pl.Gf(p.Sv).setMouseInteractions(!1),p.wv=p.Pl.Gf(p.Sv).setMouseInteractions(!1),p.pv=p.Pl.Gf(p.Sv).setMouseInteractions(!1),p.kv=p.Rf.Pc(p.mv).$n(dz).Ys(ir),p.xv=p.Rf.Pc(p.mv).$n(dz).Ys(ir),p.Mv=p.Rf.Pc(p.mv).$n(dz).Ys(ir),p.qn=p.Pl.$e(p.Sv).setMouseInteractions(!1).ne(p.dn.getTitleTextRotation(p.dv));var k=WE(new UE.Drag(p.Vd,p.Gd,p.Hd,1),new UE.Pinch(p.jd,p.Wd,p.Ud),new UE.DoublePoke(p.pd)),x=WE(new UE.Drag(p.hv,p.uv,p.fv)),M=WE(new UE.Drag(p.hv,p.av,p.fv));return p.kv.setMouseEnterEventHandler(p.kd).setMouseLeaveEventHandler(p.Md).setMouseDragStartEventHandler(p.Fd).setMouseDragEventHandler(p.Bd).setMouseDragStopEventHandler(p.Od).setMouseWheelEventHandler(p._d).setMouseDoubleClickEventHandler(p.pd).setMouseClickEventHandler(p.Rd).setMouseDownEventHandler(p.zd).setMouseUpEventHandler(p.Ed).setMouseMoveEventHandler(p.Nd).setTouchStartEventHandler(k.onTouchStart).setTouchMoveEventHandler(k.onTouchMove).setTouchEndEventHandler(k.onTouchEnd),p.xv.setMouseEnterEventHandler(p.Yd).setMouseLeaveEventHandler(p.Zd).setMouseDragStartEventHandler(p.qd).setMouseDragEventHandler(p.Qd).setMouseDragStopEventHandler(p.ev).setMouseWheelEventHandler(p.sv).setTouchStartEventHandler(x.onTouchStart).setTouchMoveEventHandler(x.onTouchMove).setTouchEndEventHandler(x.onTouchEnd),p.Mv.setMouseEnterEventHandler(p.Yd).setMouseLeaveEventHandler(p.Zd).setMouseDragStartEventHandler(p.qd).setMouseDragEventHandler(p.tv).setMouseDragStopEventHandler(p.ev).setMouseWheelEventHandler(p.ov).setTouchStartEventHandler(M.onTouchStart).setTouchMoveEventHandler(M.onTouchMove).setTouchEndEventHandler(M.onTouchEnd),p.gv.na(m.axisStyle),p.wv.na(m.axisNibStyle),p.pv.na(m.axisNibStyle),p.Av=m.axisOverlayStyle,p.Fv=m.axisNibOverlayStyle,p.qn.$n(p.vn.axisTitleFillStyle).ie(p.vn.axisTitleFont),p}return n(e,i),e.prototype.Je=function(){return this.Tn},e.prototype.Qe=function(){return void 0!==this.ce},e.prototype.addBand=function(t){void 0===t&&(t=!0);var i=t?this._l:this.Dl,n=new rN(i,this.chart,this.Sd,this.md,this,this.Sv,this.dn,this.vn);return this.md(n),n},e.prototype.addConstantLine=function(t){void 0===t&&(t=!0);var i=t?this._l:this.Dl,n=new sN(i,this.chart,this.Sd,this.md,this,this.Sv,this.dn,this.vn);return this.md(n),n},e.prototype.Tv=function(t){this.dd.forEach(t)},e.prototype.Cv=function(t){return this.dd.map(t)},e.prototype.getHighlighters=function(){return this.dd},e.prototype.setThickness=function(t){return"number"==typeof t?(this.Bv=t,this.Lv=t):"object"==typeof t&&(this.Bv=t.min,this.Lv=t.max),this.Ll.xn(),this},e.prototype.getThickness=function(){return{min:this.Bv,max:this.Lv}},e.prototype.setMouseInteractions=function(t){return this.setAxisInteractionPanByDragging(t).setAxisInteractionReleaseByDoubleClicking(t).setAxisInteractionZoomByDragging(t).setAxisInteractionZoomByWheeling(t).setNibInteractionScaleByDragging(t).setNibInteractionScaleByWheeling(t)},e.prototype.Ge=function(){return this.Hl},e.prototype.Be=function(t,i,n,e){return new sV(i,t,n,e,this.Pl,this.Sv,this.Ll,this.Sv)},e.prototype.re=function(){var t,n;if(this.El){try{for(var e=o(this.El),r=e.next();!r.done;r=e.next()){var s=r.value;s[1].grid.dispose(),s[1].tick.dispose()}}catch(i){t={error:i}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(t)throw t.error}}this.El.clear()}i.prototype.re.call(this)},e.prototype.Le=function(t,i){var n=i.tickStart,e=t.tickLevel.Ce,r=n+e.getTickLength()*this.dv+e.getTickPadding()*this.dv;t.label.ph(this.dn.toPoint(t.value,r)).Bh(this.dn.toPoint(e.getLabelAlignment(),-this.dv)).ne(e.labelRotation)},e.prototype.Iv=function(t,i){var n=i.startPosition,e=i.gridStrokeLen,r=i.gridStrokeStart,s=i.tickStart,o=t.tickLevel.Ce,h=n-e*o.getGridStrokeLength(),u=s+o.getTickLength()*this.dv;return{gridStroke:{start:this.dn.toPoint(t.value,r),end:this.dn.toPoint(t.value,h)},tickStroke:{start:this.dn.toPoint(t.value,s),end:this.dn.toPoint(t.value,u)}}},e.prototype.Ov=function(t,i,n,e){return this.Ll.Gf(this.Sv).na(new nr({fillStyle:new Ee({color:Te(360*(1-e))}),thickness:5})).ha(this.dn.toVec2(t,0)).Ku(this.dn.toVec2(t,this.dv*(50*e)))},e.prototype.Ze=function(t,i){return"linear"===this.Un.type?oV(t,i,this.Rt):hV(t,i,this.Rt)},e.prototype.Pv=function(t,i){return i instanceof zo?oV:hV},e.prototype.qe=function(t,i,n){if("linear"===this.Un.type){var e=this.Rt.Yi(i-t);return{min:t-n*e,max:i+n*e}}var r=this.Rt;return{min:r.Li(t,-n),max:r.Li(i,n)}},e.prototype.Tf=function(t,i,n){var e,r,s,u,a,f,c,l,d,v,y,S,m,b=this.gv.ea(),g=this.Rt.getInnerStart()this.Rt.getInnerStart()?this.Rt.getInnerEnd():this.Rt.getInnerStart(),p=this.Rt.li(),k=this.yv.getInnerInterval(),x=b instanceof nr?b.getThickness()*this.dv/2:0,M=this.lv/100*k,A=M+t,F=A+x,T=k*this.dv,C=F+x,B=this.Gl.reduce(this.bd,0),L=0;if(this.Sn!==Uo){var I=this.Rt.li();this.ve({physicalAxisSize:I,startPosition:M,gridStrokeLen:T,gridStrokeStart:A,tickStart:C});try{for(var O=o(this.bn),P=O.next();!P.done;P=O.next()){var D=h(P.value,2),_=D[0],R=D[1],z=this.El.get(_);if(!z)if(_.en)z={grid:this.Ll.Dv(this.Sv).setMouseInteractions(!1),tick:this.Ll.Dv(this.Sv).setMouseInteractions(!1)};else if("hr"in _){var E=Array.from(this.bn.keys()).filter((function(t){return"hr"in t})).reverse().indexOf(_),N=this.Ol[E];if(!N)throw new Error("Not enough tick layers. This is an internal LCJS error - if you see this, please contact Arction support.");z={grid:N.Dv(this.Sv).setMouseInteractions(!1),tick:N.Dv(this.Sv).setMouseInteractions(!1)}}if(z){z.grid.$h(),z.tick.$h();try{for(var V=(s=void 0,o(R)),G=V.next();!G.done;G=V.next()){var H=h(G.value,2),j=(H[0],H[1]),W=this.Iv(j,{physicalAxisSize:I,startPosition:M,gridStrokeLen:T,gridStrokeStart:A,tickStart:C});j.label.isDisposed()||(z.grid.Qh(W.gridStroke.start,W.gridStroke.end),z.tick.Qh(W.tickStroke.start,W.tickStroke.end))}}catch(t){s={error:t}}finally{try{G&&!G.done&&(u=V.return)&&u.call(V)}finally{if(s)throw s.error}}z.grid.na(_.Ce.getGridStrokeStyle()),z.tick.na(_.Ce.getTickStyle()),this.El.set(_,z)}}}catch(t){e={error:t}}finally{try{P&&!P.done&&(r=O.return)&&r.call(O)}finally{if(e)throw e.error}}try{for(var U=o(this.bn.values()),Y=U.next();!Y.done;Y=U.next()){_=Y.value;var X=Os;try{for(var Z=(c=void 0,o(_.values())),K=Z.next();!K.done;K=Z.next()){var q=(j=K.value).tickLevel.Ce,J=this.dn.getHeight(j.label.vi()),Q=q.getTickLength()+q.getTickPadding()+J+q.getLabelPadding();X=Math.max(X,Q)}}catch(t){c={error:t}}finally{try{K&&!K.done&&(l=Z.return)&&l.call(Z)}finally{if(c)throw c.error}}L=Math.max(L,X)}}catch(t){a={error:t}}finally{try{Y&&!Y.done&&(f=U.return)&&f.call(U)}finally{if(a)throw a.error}}m=C+Math.max(L,B)*this.dv}else L=0,m=C+B*this.dv;this.gv.ha(this.dn.toPoint(g,F)).Ku(this.dn.toPoint(w,F)),this.wv.ha(this.dn.toPoint(this.Rt.Li(this.Rt.getInnerStart(),this.Ul),F)).Ku(this.dn.toPoint(this.Rt.getInnerStart(),F)),this.pv.ha(this.dn.toPoint(this.Rt.Li(this.Rt.getInnerEnd(),-this.Ul),F)).Ku(this.dn.toPoint(this.Rt.getInnerEnd(),F));var $=this.qn&&this.qn.Kn().length>0?this.dn.getHeight(this.qn.Fe().vi()):0,tt=m+.5*$*this.dv;this.qn.ph(this.dn.toPoint(this.Rt.Li(this.Rt.getInnerStart(),p/2),tt));var it,nt=C,et=nt+this.dv*this.Vl,rt=Math.min(this.Zl,.25*p);if(this.Nl){var st=this.lv/100*k+t,ot=-this.dv*k-t;it={start:this.dn.toVec2(this.Nl.min,C+this.dv*this.Vl),end:this.dn.toVec2(this.Nl.max,st+ot)}}else it={start:this.dn.toVec2(this.Rt.Li(this.Rt.getInnerStart(),rt),nt),end:this.dn.toVec2(this.Rt.Li(this.Rt.getInnerEnd(),-rt),et)};var ht=sr(this.dn.toVec2(this.Rt.getInnerStart(),et),this.Sv,this.mv),ut=sr(it.start,this.Sv,this.mv),at=sr(it.end,this.Sv,this.mv),ft=sr(this.dn.toVec2(this.Rt.getInnerEnd(),nt),this.Sv,this.mv);this.kv.ph(ut).oi(co(at,ut)),this.xv.ph(ht).oi(co(ut,ht)),this.Mv.ph(at).oi(co(ft,at));try{for(var ct=o(this.Gl),lt=ct.next();!lt.done;lt=ct.next()){(j=lt.value).update().plot(A,T,t,C)}}catch(t){d={error:t}}finally{try{lt&&!lt.done&&(v=ct.return)&&v.call(ct)}finally{if(d)throw d.error}}try{for(var dt=o(this.dd),vt=dt.next();!vt.done;vt=dt.next()){vt.value.Tf()}}catch(t){y={error:t}}finally{try{vt&&!vt.done&&(S=dt.return)&&S.call(dt)}finally{if(y)throw y.error}}var yt=(b instanceof nr?b.getThickness():0)+Math.max(L,B)+(this.qn&&this.qn.Kn().length>0?$+this.Wl:0);return this.Vl=Lr(yt,void 0!==this.Bv?this.Bv:0,void 0!==this.Lv?this.Lv:Is),this},e.prototype._v=function(t){var i,n,e,r,s=this.gv.ea(),h=s instanceof nr?s.getThickness()*this.dv/2:0,u=this.yv.getInnerInterval(),a=this.lv/100*u+t,f=a+h,c=u*this.dv,l=f+h;try{for(var d=o(this.Gl),v=d.next();!v.done;v=d.next()){v.value.update().plot(a,c,t,l)}}catch(t){i={error:t}}finally{try{v&&!v.done&&(n=d.return)&&n.call(d)}finally{if(i)throw i.error}}try{for(var y=o(this.dd),S=y.next();!S.done;S=y.next()){S.value.Tf()}}catch(t){e={error:t}}finally{try{S&&!S.done&&(r=y.return)&&r.call(y)}finally{if(e)throw e.error}}},e.prototype.getHeight=function(){return this.Vl},e.prototype.Rv=function(t,i){i=i||eV.PointableTextBox;var n=new tN(this,t?this.Ll:this.Pl,this.Rf,this.Rt,this.bv,this.bv,this.dn,this.vv,this.wd,this.gd,this.vn,i).setTextFormatter(this.formatValue);return this.Gl.push(n),n},e.prototype.xd=function(t){t.$n(this.Av).oo.xn(),this.Yl=t.oo.Qr(this.hd,this.Yl)},e.prototype.Ad=function(t){t.$n(dz).oo.xn(),t.oo.ts(this.Yl)},e.prototype.Td=function(t){this.stop(),t.oo.ts(this.Yl)},e.prototype.Ld=function(t,i){var n=-this.dn.getWidth(i);this.pan(n),this.Yl=t.oo.Qr(this.ud,this.Yl)},e.prototype.pan=function(t){var i=this.Xn,n=this.Zn,e=this.Rt.Li(i,t),r=this.Rt.Li(n,t);this.Wn(e,r,{allowClamping:!1})},e.prototype.zoom=function(t,i){var n=this.Rt._t(this.Xn),e=this.Rt._t(this.Zn),r=this.Rt._t(t),s=Lr((r-n)/(e-n),0,1),o=.2*this.Rt.li(),h=s*this.Kl*o*-i,u=(1-s)*this.Kl*o*i,a=this.Rt.Li(this.Xn,h),f=this.Rt.Li(this.Zn,u);this.Wn(a,f)},e.prototype.Pd=function(t){this.Nl=void 0,t.oo.ts(this.Yl)},e.prototype.Cd=function(t,i){this.stop(),t.oo.ts(this.Yl)},e.prototype.Id=function(t,i,n,e){var r=sr(this.Rf.oo.ds(n.x,n.y),this.Rf.oo.Rt,this.Sv),s=Lr(this.dn.getWidth(r),this.Xn,this.Zn),o=this.dn.getWidth(sr(this.Rf.oo.ds(i.x,i.y),this.Rf.oo.Rt,this.Sv)),h=Gs(this.dn.getHeight(r),this.dn.getHeight(sr(this.kv.kh(),this.mv,this.Sv)),this.dn.getHeight(sr(fo(this.kv.kh(),this.kv.vi()),this.mv,this.Sv)));Math.abs(this.Rt._t(s)-this.Rt._t(o))>10&&h?(this.Nl=b(Math.min(s,o),Math.max(s,o)),this.Yl=t.oo.Qr(this.ad,this.Yl)):(this.Nl=void 0,this.Yl=t.oo.Qr(this.hd,this.Yl)),this.Rf.xn()},e.prototype.Dd=function(t,i,n){if(this.Nl){var e=this.Nl.min,r=this.Nl.max,s=this.Zn0?(this.Ty&&(this.Ty.finish(!1),this.Ty=void 0),this.Iy(this.py,0,(function(){return t.prototype.dispose.call(i)}))):t.prototype.dispose.call(this),this.xy=!0,this},i.prototype.restore=function(){if(this.vr.getAnimationsEnabled()&&(this.Ty&&(this.Ty.finish(!1),this.Ty=void 0),this.Iy(this.py,this.u)),this.getExploded()&&!this.vr.getMultipleSliceExplosion())for(var i=this.vr.getSlices(),n=0;n=0&&(f.Oy.splice(i,1),f.jy())},f.Wy=function(t){f.Oy.indexOf(t)<0&&(f.Oy.push(t),f.jy(),t.setHighlightOnHover(f.Ry))},u&&(f.vn=u),f.Uy=e.qs(t.LayerIndices.bottom),f.Yy=e.qs(t.LayerIndices.top),f.hy.Jn("Pie Chart"),f.oy(o,f.pixelScale),f.onBackgroundMouseDoubleClick(TV);var c=WE(new UE.DoublePoke(TV));return f.onBackgroundTouchStart(c.onTouchStart),f.onBackgroundTouchMove(c.onTouchMove),f.onBackgroundTouchEnd(c.onTouchEnd),a&&f.setAnimationsEnabled(!1),f}return n(e,i),e.prototype.addSlice=function(t,i){var n=new MV(this.Ny,this.Uy,this.Yy,this,this.pixelScale,this.Hy,this.Wy,this.vn);this.Ny+=1,n.setName(t);var e=this.Mn;return this.Mn=!1,n.setValue(i),this.Mn=e,this.Xy(n),this.Oy.push(n),this.jy(),n.setHighlightOnHover(this.Ry),n},e.prototype.addSlices=function(t){for(var i=[],n=0;n0})),u=0;for(o=0;o0?a/f:0));for(o=0;o=0?1:-1,y:t.y>=0?1:-1,z:t.z>=0?1:-1};return{gridlinePositionA:y(0,i.y,i.z),gridlinePositionB:y(0,i.y,-i.z),gridlinePositionC:y(0,-i.y,-i.z)}}},UV={je:function(t){return t.getYMin()},We:function(t){return t.getYMax()},Ye:function(t){return t.eS().y},rS:function(t){return t.y},sS:function(t,i){return{x:i.x,y:t.y,z:i.z}},Cl:y(-1,0,0),oS:function(t){var i={x:t.x>=0?1:-1,y:t.y>=0?1:-1,z:t.z>=0?1:-1};return{gridlinePositionA:y(i.x,0,i.z),gridlinePositionB:y(i.x,0,-i.z),gridlinePositionC:y(-i.x,0,-i.z)}}},YV={je:function(t){return t.getZMin()},We:function(t){return t.getZMax()},Ye:function(t){return t.eS().z},rS:function(t){return t.z},sS:function(t,i){return{x:i.x,y:i.y,z:t.z}},Cl:y(1,0,0),oS:function(t){var i={x:t.x>=0?1:-1,y:t.y>=0?1:-1,z:t.z>=0?1:-1};return{gridlinePositionA:y(i.x,-i.y,0),gridlinePositionB:y(i.x,i.y,0),gridlinePositionC:y(-i.x,i.y,0)}}},XV=function(t){if(t instanceof nr){var i=t.getThickness(),n=t.getFillStyle();if(n instanceof Ee)return 1===i?uh:new ah({size:i,fillStyle:n,shape:"sphere"})}return uh},ZV=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,i,n,e,r,u,{numeric:r.numericTickStrategy,datetime:r.dateTimeTickStrategy,time:r.timeTickStrategy},{type:"linear"})||this;return a.hS=s,a.uS=o,a.aS=h,a.fS=a.hS.Rt,a.cS=a.hS.iS([LV.InternalUI]).na(a.dn.rS(a.vn.axesStyles3D)).lS(XV(a.dn.rS(a.vn.axesStyles3D))).setMouseInteractions(!1),a.qn=a.uS.$e(a.aS).setMouseInteractions(!1).$n(a.vn.axisTitleFillStyle).ie(a.vn.axisTitleFont),a.El=new Map,a.dS=function(){},a.vS=function(){},a.yS=function(){},a.SS=function(){},a.cS.setMouseEnterEventHandler(a.dS).setMouseLeaveEventHandler(a.vS).setMouseDragEventHandler(a.yS).setMouseDragStopEventHandler(a.SS),e.cv=a,a}return n(i,t),i.prototype.setStrokeStyle=function(t){return this.cS.na(t).lS(XV(this.cS.ea())),this.chart.engine.xn(),this},i.prototype.getStrokeStyle=function(){return this.cS.ea()},i.prototype.setAnimationScroll=function(i){return t.prototype.setAnimationScroll.call(this,i),this},i.prototype.setMouseInteractions=function(t){return this},i.prototype.Ge=function(){return this.chart.getSeries()},i.prototype.mS=function(t){return Math.abs(this.Rt.bS(t)*this.hS.gS(1))},i.prototype.qe=function(t,i,n){var e=Math.abs(this.Rt.bS(i-t)*this.hS.gS(1));return{min:t-n*e,max:i+n*e}},i.prototype.Be=function(t,i,n,e){return new KV(i,t,n,e,this.uS,this.aS,this.hS)},i.prototype.Le=function(t,i){var n=i.wuSize,e=i.start,r=i.end,s=i.tickDirection3D,o=i.tickDirection2D,h=t.tickLevel.Ce,u=(t.value-this.Rt.getInnerStart())/(this.Rt.getInnerEnd()-this.Rt.getInnerStart()),a=Ls.addVec(Ys(e,r,u),Ls.multiplyVec(Ls.multiply(s,this.hS.gS(.5*this.cS.ea().thickness)),n)),f=Ls.addVec(a,Ls.multiplyVec(Ls.multiply(s,this.hS.gS(h.tickLength)),n)),c=this.hS.wS(f)||l(0,0),d=fo(sr(c,this.chart.engine.scale,this.aS),ao(o,h.tickPadding));return t.label.ph(d).Bh({x:-o.x,y:-o.y}),{posTickEnd3D:f,posTickStart3D:a,tickPositionRelative:u}},i.prototype.Ov=function(t,i,n){var e=i.wuSize,r=i.start,s=i.end,o=i.tickDirection3D,h=(t-this.Rt.getInnerStart())/(this.Rt.getInnerEnd()-this.Rt.getInnerStart()),u=Ls.addVec(Ys(r,s,h),Ls.multiplyVec(Ls.multiply(o,this.hS.gS(.5*this.cS.ea().thickness)),e)),a=Ls.addVec(u,Ls.multiplyVec(Ls.multiply(o,this.hS.gS(10)),e)),f=this.hS.wS(u)||l(0,0),c=this.hS.wS(a)||l(0,0);return this.uS.Gf(this.aS).ha(f).Ku(c).na(new nr({fillStyle:new Ee({color:Te(120*n)}),thickness:1}))},i.prototype.Ze=function(t,i){return qV(t,i,this.Rt)},i.prototype.Tf=function(t){var i,n,e,r,s,u,a=this,f=this.fS,c=y(f.x.pS(),f.y.pS(),f.z.pS());this.dn===YV?(s=y(f.x.getInnerEnd(),f.y.getInnerStart(),f.z.getInnerStart()),u=y(f.x.getInnerEnd(),f.y.getInnerStart(),f.z.getInnerEnd())):(s=y(f.x.getInnerStart(),f.y.getInnerStart(),f.z.getInnerStart()),u=this.dn.sS(y(f.x.getInnerEnd(),f.y.getInnerEnd(),f.z.getInnerEnd()),s));var d=this.dn.Cl,v=this.hS.wS(s)||l(0,0),S=this.hS.wS(u)||l(0,0),m=Ys(s,u,.5),b=Ls.addVec(m,Ls.multiplyVec(Ls.multiply(d,-1),c)),g=this.hS.wS(m)||l(0,0),w=this.hS.wS(b)||l(0,0),p=oo(co(sr(g,this.chart.engine.scale,this.aS),sr(w,this.chart.engine.scale,this.aS)));this.cS.$h().Qh([s,u]);var k=this.dn.oS(t),x=k.gridlinePositionA,M=k.gridlinePositionB,A=k.gridlinePositionC,F=function(t){return{x:-1===t.x?a.fS.x.getInnerStart():1===t.x?a.fS.x.getInnerEnd():0,y:-1===t.y?a.fS.y.getInnerStart():1===t.y?a.fS.y.getInnerEnd():0,z:-1===t.z?a.fS.z.getInnerStart():1===t.z?a.fS.z.getInnerEnd():0}},T=F(x),C=F(M),B=F(A),L={physicalAxisSize:uo(co(v,S)),wuSize:c,start:s,end:u,tickDirection3D:d,tickDirection2D:p,gridlinePositionA:T,gridlinePositionB:C,gridlinePositionC:B},I=this.ve(L);try{for(var O=o(this.bn),P=O.next();!P.done;P=O.next()){var D=h(P.value,2),_=D[0],R=D[1],z=this.El.get(_);z||(z={grid:this.hS.Dv().setMouseInteractions(!1),tick:this.hS.Dv().setMouseInteractions(!1)}),z.grid.$h(),z.tick.$h();try{for(var E=(e=void 0,o(R)),N=E.next();!N.done;N=E.next()){var V=h(N.value,2)[1],G=this.Iv(V,L,I);G.gridStroke&&z.grid.Qh(G.gridStroke),z.tick.Qh([G.tickStroke.start,G.tickStroke.end])}}catch(t){e={error:t}}finally{try{N&&!N.done&&(r=E.return)&&r.call(E)}finally{if(e)throw e.error}}z.grid.na(_.Ce.getGridStrokeStyle()),z.tick.na(_.Ce.getTickStyle()),this.El.set(_,z)}}catch(t){i={error:t}}finally{try{P&&!P.done&&(n=O.return)&&n.call(O)}finally{if(i)throw i.error}}var H=this.De((function(t,i){var n=i.label.vi();return t.x=Math.max(t.x,n.x),t.y=Math.max(t.y,n.y),t}),l(0,0)),j=Math.atan((S.y-v.y)/(S.x-v.x));this.qn.Bh({x:0,y:0}).ne(180*-j/Math.PI);var W=Ls.addVec(m,Ls.multiplyVec(Ls.multiply(d,this.hS.gS(.5*this.cS.ea().thickness+this.Ve((function(t,i){return Math.max(t,i.tickLength)}),0))),c)),U=this.hS.wS(W)||l(0,0),Y=fo(sr(U,this.chart.engine.scale,this.aS),fo(fo(lo(H,p),ao(p,this.Ve((function(t,i){return Math.max(t,i.labelPadding)}),0))),lo(ao(this.qn.Fe().vi(),.5),p)));this.qn.ph(Y);this.cS.kS={overrideFollowing:!1,skipMousePicking:!1}},i.prototype.Iv=function(t,i,n){var r,s=i.gridlinePositionA,o=i.gridlinePositionB,h=i.gridlinePositionC,u=n.get(t),a=u.posTickStart3D,f=u.posTickEnd3D,c=u.tickPositionRelative;Br(c,0)||Br(c,1)||(r=[this.isX()?e(e({},s),{x:a.x}):this.isY()?e(e({},s),{y:a.y}):this.isZ()?e(e({},s),{z:a.z}):{x:0,y:0,z:0},this.isX()?e(e({},o),{x:a.x}):this.isY()?e(e({},o),{y:a.y}):this.isZ()?e(e({},o),{z:a.z}):{x:0,y:0,z:0},this.isX()?e(e({},h),{x:a.x}):this.isY()?e(e({},h),{y:a.y}):this.isZ()?e(e({},h),{z:a.z}):{x:0,y:0,z:0}]);return{gridStroke:r,tickStroke:{start:a,end:f}}},i.prototype.re=function(){var i,n;if(this.El){try{for(var e=o(this.El),r=e.next();!r.done;r=e.next()){var s=r.value;s[1].grid.dispose(),s[1].tick.dispose()}}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(i)throw i.error}}this.El.clear()}t.prototype.re.call(this)},i.prototype.isX=function(){return this.dn===WV},i.prototype.isY=function(){return this.dn===UV},i.prototype.isZ=function(){return this.dn===YV},i}(eh),KV=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,i,n,e,r,s,o,u)||this;return a.Ll=h,a}return n(i,t),i}(rh),qV=function(t,i,n){return Lr(t+.1*(i-t)+Math.abs(n.pS())/100*Math.sign(i-t),Math.min(t,i),Math.max(t,i))},JV=function(){this.type="simple"},QV=new JV,$V=function(t){this.type="phong",this.ambientReflection=1,this.specularReflection=.1,this.diffuseReflection=1,this.ambientColor=Fe("#000"),this.specularColor=Fe("#fff"),this.shininess=32,t&&(this.ambientReflection=Number.isNaN(Number(t.ambientReflection))?this.ambientReflection:Number(t.ambientReflection),this.specularReflection=Number.isNaN(Number(t.specularReflection))?this.specularReflection:Number(t.specularReflection),this.diffuseReflection=Number.isNaN(Number(t.diffuseReflection))?this.diffuseReflection:Number(t.diffuseReflection),this.ambientColor=t.ambientColor||this.ambientColor,this.specularColor=t.specularColor||this.specularColor,this.shininess=t.shininess||this.shininess)},tG=new $V,iG={Simple:JV,Phong:$V},nG=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,s)||this;return o.vr=i,o.hS=r,o.xS=tG,o.MS=!0,o.AS=!0,o.setMouseInteractions(!1),o}return n(i,t),i.prototype.setAutoScrollingEnabled=function(t){return this.MS=t,this.vr.engine.xn(),this},i.prototype.getAutoScrollingEnabled=function(){return this.MS},i.prototype.setColorShadingStyle=function(t){return this.xS=t,this.ic.forEach((function(i){return i.FS(t)})),this.hS.xn(),this},i.prototype.getColorShadingStyle=function(){return this.xS},i.prototype.setDepthTestEnabled=function(t){return this.AS=t,this.ic[0].TS(t),this.hS.xn(),this},i.prototype.getDepthTestEnabled=function(){return this.AS},i.prototype.CS=function(){},i.prototype.Tf=function(){},i.prototype.BS=function(){},i.prototype.getXMax=function(){var t=this.ic[0];return t?t.Et():void 0},i.prototype.getXMin=function(){var t=this.ic[0];return t?t.zt():void 0},i.prototype.getYMax=function(){var t=this.ic[0];return t?t.Vt():void 0},i.prototype.getYMin=function(){var t=this.ic[0];return t?t.Nt():void 0},i.prototype.getZMax=function(){var t=this.ic[0];return t?t.Ht():void 0},i.prototype.getZMin=function(){var t=this.ic[0];return t?t.Gt():void 0},i.prototype.eS=function(){var t=this.ic[0];return t?y(t.cu(),t.lu(),t.LS()):y(0,0,0)},i.prototype.IS=function(t){return this},i.prototype.OS=function(){return this},i}(nN),eG=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.aa=[],i}return n(i,t),i.prototype.add=function(t){return Array.isArray(t)?this.PS(t):this.PS([t]),this},i.prototype.clear=function(){var t,i;this.aa.length=0;try{for(var n=o(this.ic),e=n.next();!e.done;e=n.next()){e.value.$h().dispose()}}catch(i){t={error:i}}finally{try{e&&!e.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return this.ic.length=0,this.nc=0,this},i.prototype.getPointAmount=function(){return this.ic.reduce((function(t,i){return t+i.tu()+i.iu()}),this.aa.length)},i.prototype.CS=function(){},i.prototype.Tf=function(){this.aa.length>0&&this.DS(this.aa)},i.prototype.BS=function(){this._S=void 0,this.aa.length=0},i.prototype.He=function(){return this.MS&&this.getPointAmount()>0},i.prototype.PS=function(t){0!==t.length&&(this._S?this._S=Qs(this._S,qs(t)):this._S=qs(t),this.aa=ps(this.aa,t,{canReturnB:!1}),this.vr.engine.xn())},i.prototype.getXMax=function(){return Kr(this.ic,Er,Math.max,Wr,this._S)},i.prototype.getXMin=function(){return Kr(this.ic,zr,Math.min,jr,this._S)},i.prototype.getYMax=function(){return Kr(this.ic,Vr,Math.max,Yr,this._S)},i.prototype.getYMin=function(){return Kr(this.ic,Nr,Math.min,Ur,this._S)},i.prototype.getZMax=function(){return Kr(this.ic,Hr,Math.max,Zr,this._S)},i.prototype.getZMin=function(){return Kr(this.ic,Gr,Math.min,Xr,this._S)},i.prototype.eS=function(){var t,i,n=y(0,0,0);try{for(var e=o(this.ic),r=e.next();!r.done;r=e.next()){var s=r.value;n.x=Math.max(n.x,s.cu()),n.y=Math.max(n.y,s.lu()),n.z=Math.max(n.z,s.LS())}}catch(i){t={error:i}}finally{try{r&&!r.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}return n},i}(nG),rG=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;o.Mt="Box Series 3D",o.RS=.25,o.ml=function(){return xs(o.Ho)};var h=o.vr.getSeries().length;o.Ho=new c(Fs(o.vn.boxSeriesFillStyle,h));var u=o.hS.ES().TS(o.AS).$n(o.Ho.L()).zS(o.RS);return o.Cc(u),o}return n(i,t),i.prototype.invalidateData=function(t){var i=t.length;if(0===i)return this;var n,e=t[0];if(!e)return this;if("xMin"in e||"yMin"in e||"zMin"in e||"xMax"in e||"yMax"in e||"zMax"in e){n=[];for(var r=0;r0},i.prototype.Ac=function(t,i){t.na(this.ia.D(i)).lS(this.VS.D(i)),this.hS.xn()},i.prototype.attach=function(i,n){return t.prototype.attach.call(this,i,n),ks(i,this.vn,{stroke:this.ia}),this},i.prototype.lc=function(t,i){},i}(nG),oG=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;o.Mt="Line Series 3D";var h=o.vr.getSeries().length;return o.ia=new c(Ts(s.lineSeries3DStrokeStyle,h,s.seriesStrokeStyle3D)),o.VS=new c(Kz.pointStyle3D),o.GS(o.ia.L(),o.ia.O()),o.Cc(o.hS.iS([LV.UserSeries]).TS(o.AS).na(o.ia.D(o.Bf)).lS(o.VS.D(o.Bf))),o}return n(i,t),i.prototype.setStrokeStyle=function(i){t.prototype.setStrokeStyle.call(this,i),this.GS(this.ia.L(),this.ia.O());var n=this.VS.D(this.getHighlighted());return this.ic[0].lS(n),this},i.prototype.setStrokeStyleHighlight=function(i){t.prototype.setStrokeStyleHighlight.call(this,i),this.GS(this.ia.L(),this.ia.O());var n=this.VS.D(this.getHighlighted());return this.ic[0].lS(n),this},i.prototype.GS=function(t,i){var n=new ch.Triangulated({shape:"sphere",fillStyle:t.getFillStyle(),size:t.getThickness()}),e=new ch.Triangulated({shape:"sphere",fillStyle:i.getFillStyle(),size:i.getThickness()});this.VS.C(n).I(e)},i}(sG),hG=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;o.Mt="Point Line Series 3D";var h=o.vr.getSeries().length;return o.ia=new c(Ts(s.pointLineSeries3DStrokeStyle,h,s.seriesStrokeStyle3D)),o.VS=new c(Ts(s.pointLineSeries3DPointStyle,h,s.seriesTriangulatedPointStyle3D)),o.HS(),o.Cc(o.hS.iS([LV.UserSeries]).TS(o.AS).na(o.ia.D(o.Bf)).lS(o.VS.D(o.Bf))),o}return n(i,t),i.prototype.setPointStyle=function(t){this.VS.C(t),this.HS();var i=this.VS.D(this.Bf);return this.ic[0].lS(i),this.hS.xn(),this},i.prototype.getPointStyle=function(){return this.VS.L()},i.prototype.setPointStyleHighlight=function(t){if(this.VS.I(t),this.getHighlighted()){var i=this.VS.D(!0);this.ic[0].lS(i)}return this.hS.xn(),this},i.prototype.getPointStyleHighlight=function(){return this.VS.D(!0)},i.prototype.setStrokeStyle=function(i){t.prototype.setStrokeStyle.call(this,i);var n=this.ia.L(),e=Math.abs(n.getThickness()),r=this.VS.L();e>r.getSize()&&this.VS.C(r.setSize(e)),this.HS();var s=this.VS.D(this.Bf);return this.ic[0].lS(s),this.hS.xn(),this},i.prototype.setStrokeStyleHighlight=function(i){return t.prototype.setStrokeStyleHighlight.call(this,i),this.HS(),this.hS.xn(),this},i.prototype.setLineStyle=function(t){return this.setStrokeStyle(t),this},i.prototype.HS=function(){var t=this.VS.L(),i=this.ia.L(),n=t.getSize();"number"==typeof n?this.VS.I(t.setSize(n*i.highlightThicknessMultiplier)):this.VS.I(t.setSize(Ls.multiply(n,i.highlightThicknessMultiplier)))},i.prototype.Ac=function(t,i){t.na(this.ia.D(i)).lS(this.VS.D(i)),this.hS.xn()},i}(sG),uG=function(t){function i(i,n,e,r,s,o){return t.call(this,i,n,e,r,s)||this}return n(i,t),i.prototype.add=function(t){return(t=Array.isArray(t)?t:[t])?(this.ic[0].Qh(t.slice()),this.hS.xn(),this):this},i.prototype.clear=function(){return this.ic[0].$h(),this.nc=0,this},i.prototype.getPointAmount=function(){var t=this.ic[0];return t.tu()+t.iu()},i.prototype.He=function(){return this.MS&&this.getPointAmount()>0},i.prototype.Ac=function(t,i){t.jS(this.WS.D(i)),this.hS.xn()},i.prototype.attach=function(i,n){return t.prototype.attach.call(this,i,n),ks(i,this.vn,{point3D:this.WS}),this},i.prototype.lc=function(t,i){},i}(nG),aG=function(t){function i(i,n,r,s,o,h){var u=t.call(this,i,n,r,s,o,h)||this;u.Mt="Point Series 3D",u.ml=function(){return xs(u.WS.L().getFillStyle())};var a=u.vr.getSeries().length;u.WS=new c(Ts(o.pointSeries3DPointStyle,a,o.seriesTriangulatedPointStyle3D));var f=e({individualPointColorEnabled:!1,individualPointSizeEnabled:!1,individualLookupValuesEnabled:!1,individualPointSizeAxisEnabled:!1},h);return u.Cc(u.hS.US(f).TS(u.AS).jS(u.WS.D(u.Bf))),u}return n(i,t),i.prototype.setPointStyle=function(t){var i,n;this.WS.C(t);var e=this.WS.D(this.Bf);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.jS(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return this.hS.xn(),this},i.prototype.getPointStyle=function(){return this.WS.L()},i.prototype.setPointStyleHighlight=function(t){var i,n;if(this.WS.I(t),this.getHighlighted()){var e=this.WS.D(!0);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.jS(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}return this.hS.xn(),this},i.prototype.getPointStyleHighlight=function(){return this.WS.D(!0)},i}(uG),fG=function(t){function i(i,n,r,s,o,h){var u=t.call(this,i,n,r,s,o,h)||this;u.Mt="Point Cloud Series 3D",u.ml=function(){return xs(u.WS.L().getFillStyle())};var a=u.vr.getSeries().length;u.WS=new c(Fs(o.seriesNonTriangulatedPointStyle3D,a));var f=e({individualPointColorEnabled:!1,individualPointSizeEnabled:!1,individualLookupValuesEnabled:!1,individualPointSizeAxisEnabled:!1},h);return u.Cc(u.hS.US(f).jS(u.WS.D(u.Bf))),u}return n(i,t),i.prototype.setPointStyle=function(t){var i,n;this.WS.C(t);var e=this.WS.D(this.Bf);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.jS(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return this.hS.xn(),this},i.prototype.getPointStyle=function(){return this.WS.L()},i.prototype.setPointStyleHighlight=function(t){var i,n;if(this.WS.I(t),this.getHighlighted()){var e=this.WS.D(!0);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.jS(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}return this.hS.xn(),this},i.prototype.getPointStyleHighlight=function(){return this.WS.D(!0)},i}(uG),cG={Triangulated:aG,Pixelated:fG},lG=function(t){function i(i,n,e,r,s,o){var h=t.call(this,i,n,e,r,o)||this;h.ml=function(){return xs(h.Ho)};var u=h.vr.getSeries().length;return h.Ho=new c(Fs(h.vn.surfaceSeriesFillStyle,u)),h.Cc(h.YS(s).TS(h.AS)),h}return n(i,t),i.prototype.reset=function(t){return this.ic[0].l(dG(t)),this.hS.xn(),this},i.prototype.setFillStyle=function(t){var i,n;this.Ho.C(t);var e=this.Ho.D(this.Bf);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.$n(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return this.hS.xn(),this},i.prototype.getFillStyle=function(){return this.Ho.L()},i.prototype.setWireframeStyle=function(t){return this.ic[0].pa(t),this.hS.xn(),this},i.prototype.getWireframeStyle=function(){return this.ic[0].ka()},i.prototype.Aa=function(t,i,n){return this.ic[0].Aa(t,i,n),this.hS.xn(),this},i.prototype.Fa=function(t,i,n){return this.ic[0].Fa(t,i,n),this.hS.xn(),this},i.prototype.invalidateColorsOnly=function(t,i){return this.ic[0].Ta(t,i),this.vr.engine.xn(),this},i.prototype.invalidateValuesOnly=function(t,i){return this.ic[0].Ca(t,i),this.vr.engine.xn(),this},i.prototype.YS=function(t){return this.hS.XS().l(dG(t)).$n(this.Ho.D(this.Bf))},i.prototype.He=function(){return this.MS},i.prototype.CS=function(){},i.prototype.Tf=function(){},i.prototype.BS=function(){},i.prototype.Ac=function(t,i){t.$n(this.Ho.D(i)),this.hS.xn()},i.prototype.attach=function(i,n){return t.prototype.attach.call(this,i,n),ks(i,this.vn,{fill:this.Ho}),this},i}(nG),dG=function(t){var i={x:t.start.x,y:t.start.z},n={x:t.end.x,y:t.end.z};return e(e({},t),{start:i,end:n})},vG=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.Mt="Surface Grid Series 3D",i}return n(i,t),i.prototype.addRow=function(i,n,e){return t.prototype.Aa.call(this,i,n,e)},i.prototype.addColumn=function(i,n,e){return t.prototype.Fa.call(this,i,n,e)},i.prototype.invalidateYOnly=function(t,i){return this.ic[0].Va(t,i),this.hS.xn(),this},i.prototype.Tf=function(){t.prototype.Tf.call(this),this.ic[0].Fe(!1)},i}(lG),yG=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.Mt="Surface Mesh Series 3D",i}return n(i,t),i.prototype.invalidateGeometryOnly=function(t,i){return this.ic[0].Ba(t,i),this.hS.xn(),this},i.prototype.Tf=function(){t.prototype.Tf.call(this),this.ic[0].Fe(!1)},i}(lG),SG={Grid:vG,Mesh:yG},mG=function(t,i){var n,e,r,s,h=0,u=0;t.forEachAxis((function(t){h+=t.Je()?1:0,u+=t.Qe()?1:0}));var a=function(t){return"getMouseInteractionsWhileScrolling"in t}(t)?t.getMouseInteractionsWhileScrolling():void 0,f=function(t){return"getMouseInteractionsWhileZooming"in t}(t)?t.getMouseInteractionsWhileZooming():void 0;if(!1===a&&u>0||!1===f&&h>0)try{for(var c=o(i),l=c.next();!l.done;l=c.next()){l.value.IS(!1).Fc(!1)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(e=c.return)&&e.call(c)}finally{if(n)throw n.error}}else try{for(var d=o(i),v=d.next();!v.done;v=d.next()){v.value.OS().Tc()}}catch(t){r={error:t}}finally{try{v&&!v.done&&(s=d.return)&&s.call(d)}finally{if(r)throw r.error}}},bG=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.ZS=[],i.KS=0,i.qS=!1,i.JS=function(t){var n=i.ZS.indexOf(t);n>=0&&(i.ZS.splice(n,1),i.an.emit("seriesDispose",i,t))},i.QS=function(t){i.ZS.includes(t)||(i.ZS.push(t),t.setHighlightOnHover(i.qS))},i.$S=function(){i.KS+=1},i.tm=function(){i.KS-=1},i}return n(i,t),i.prototype.im=function(t){this.ZS.push(t),t.onMouseEnter(this.$S),t.onMouseLeave(this.tm),t.setHighlightOnHover(this.qS),this.an.emit("seriesRestore",this,t)},i.prototype.Fl=function(){return this.ZS},i.prototype.nm=function(){return this.KS},i.prototype.setSeriesHighlightOnHover=function(t){return this.qS=t,this.ZS.forEach((function(i){return i.setHighlightOnHover(t)})),this},i}(mV),gG=Ls.normalize({x:-.5610788649579117,y:-.35242840511865414,z:-1.1349149375849081}),wG=function(){function t(t,i,n,e,r){this.rm=t,this.sm=i,this.om=n,this.wS=e,this.hm=r,this.um=!0,this.am=!0,this.fm=2*-Math.PI/2160,this.lm=2*Math.PI/2160,this.dm=.1,this.vm=1*Math.PI/180}return t.prototype.getDefaultCameraConfiguration=function(t){var i={direction:gG,location:Ls.multiply(gG,-1)};return this.cameraLocationChanged({boundingBox:t,cameraDirection:i.direction,cameraLocation:i.location})||i},t.prototype.applyCameraInteractions=function(t,i){var n=this,e={direction:t.cameraDirection,location:t.cameraLocation};return i.forEach((function(t){"rotate"===t.type?e=n.ym(e,t):"wheel-zoom"===t.type?e=n.Sm(e,t):"rotate+zoom"===t.type?e=n.bm(e,t):"fixed-rotate"===t.type?e=n.gm(e,t):"move"===t.type&&(e=n.wm(e,t))})),this.um?e=this.pm(t.boundingBox,e):this.am&&(e=this.km(t.boundingBox,e)),e},t.prototype.ym=function(t,i){var n=i.rotation,e=t.location,r=Ls.multiply(Ls.normalize(t.location),-1),s=this.xm(r),o=s.Right,h=s.Up,u=e,a=this.Mm(r),f=n.x*this.fm*a;u=Ls.rotateAroundAxis(u,h,f);var c=(n.y>0?1:-1)*Math.min(Math.abs(n.y)*this.lm,a-this.vm);return 0!==c&&(u=Ls.rotateAroundAxis(u,o,c)),{location:u,direction:Ls.multiply(Ls.normalize(u),-1)}},t.prototype.Sm=function(t,i){var n=i.deltaY;this.um&&this.Am(!1);var e=t.location,r=Ls.multiply(Ls.normalize(e),-1),s=n*this.dm,o=Ls.length(e)*-s;return{direction:r,location:Ls.addVec(e,Ls.multiply(r,o))}},t.prototype.bm=function(t,i){var n=i.rotation,e=i.cameraDistance;this.um&&this.Am(!1);var r=this.ym(t,{type:"rotate",rotation:n}),s=r.location,o=Ls.multiply(Ls.normalize(s),-1),h=Ls.multiply(o,-e);return r={direction:Ls.multiply(Ls.normalize(h),-1),location:h}},t.prototype.gm=function(t,i){this.um&&this.Am(!1);var n=i.rotation,e=t.location,r=t.direction,s=this.xm(r),o=s.Right,h=s.Up,u=n.x*this.fm,a=Ls.normalize(Ls.rotateAroundAxis(r,h,u)),f=n.y*this.lm;return{location:e,direction:a=Ls.normalize(Ls.rotateAroundAxis(a,o,f))}},t.prototype.wm=function(t,i){this.um&&this.Am(!1),this.am=!1;var n=i.amountRight,e=i.amountForward,r=t.location,s=t.direction,o=this.xm(s).Right;return{location:Ls.addVec(r,Ls.multiply(s,.01*e),Ls.multiply(o,.01*n)),direction:s}},t.prototype.boundingBoxChanged=function(t){var i={location:t.cameraLocation,direction:Ls.multiply(Ls.normalize(t.cameraLocation),-1)};return this.um?this.pm(t.boundingBox,i):this.km(t.boundingBox,i)},t.prototype.cameraLocationChanged=function(t){var i={location:t.cameraLocation,direction:Ls.multiply(Ls.normalize(t.cameraLocation),-1)};return this.um?this.pm(t.boundingBox,i):this.km(t.boundingBox,i)},t.prototype.viewportChanged=function(t){var i={location:t.cameraLocation,direction:Ls.multiply(Ls.normalize(t.cameraLocation),-1)};if(this.um)return this.pm(t.boundingBox,i)},t.prototype.pm=function(t,i,n){var e=i;n=void 0!==n?n:0,e=this.Fm(t,e,100,20,1,n,5);var r=this.Mm(e.direction);return e=this.Tm(e,this.Cm(t,e,100,1),r)},t.prototype.Fm=function(t,i,n,e,r,s,o){var h=this;return pG(s,o,(function(t){return{direction:i.direction,location:Ls.multiply(i.direction,-t)}}),(function(i){return h.Bm(t,i)}),n,r,"linear",e)},t.prototype.Cm=function(t,i,n,e){var r=this,s=this.xm(i.direction),o=s.Right,h=s.Left,u=s.Up,a=s.Down,f=this.Lm(t,!1,i),c=i,l=e,d=.1;return Math.abs(f.bottom-f.top)>l&&(c=f.bottoml&&(c=f.leftr;l&&"linear"===o||!l&&"reversed"===o?(f=(u.value+t)/2,i=u.value):(f=(u.value+i)/2,t=u.value),a+=1}while(an||i.y>e){if(!0===this.vr.ps.warnings){var r="NewSurfaceGridSeries3D.invalidateIntensityValues intensity matrix overflow.\n Grid "+this.Vm.columns+"x"+this.Vm.rows+", input "+i.columns+"x"+i.rows+".\n Excess data will be automatically clipped. This can result in sub-optimal performance.";wr.console.warn(r)}for(var s=[],o=0;oc||f>l){if(!0===this.vr.ps.warnings){r="NewSurfaceGridSeries3D.invalidateIntensityValues intensity matrix overflow.\n Grid "+this.Vm.columns+"x"+this.Vm.rows+", input "+i.columns+"x"+i.rows+" starting at ["+t.iColumn+","+t.iRow+"].\n Out of bounds data will be automatically clipped. This can result in sub-optimal performance.";wr.console.warn(r)}var d=Math.max(-h,0),v=Math.max(-a,0),y=Math.max(u-c,0),S=Math.max(f-l,0),m=i.primary-(d+y);s=[];if(0===v&&0===S)for(o=0;on||i.y>e){if(!0===this.vr.ps.warnings){var r="NewSurfaceGridSeries3D.invalidateHeightMap height matrix overflow.\n Grid "+this.Vm.columns+"x"+this.Vm.rows+", input "+i.columns+"x"+i.rows+".\n Excess data will be automatically clipped. This can result in sub-optimal performance.";wr.console.warn(r)}for(var s=[],o=0;oc||f>l){if(!0===this.vr.ps.warnings){r="NewSurfaceGridSeries3D.invalidateHeightMap height matrix overflow.\n Grid "+this.Vm.columns+"x"+this.Vm.rows+", input "+i.columns+"x"+i.rows+" starting at ["+t.iColumn+","+t.iRow+"].\n Out of bounds data will be automatically clipped. This can result in sub-optimal performance.";wr.console.warn(r)}var d=Math.max(-h,0),v=Math.max(-a,0),y=Math.max(u-c,0),S=Math.max(f-l,0),m=i.primary-(d+y);s=[];if(0===v&&0===S)for(o=0;o(h="columns"===this.Vm.scrollDimension?this.Vm.rows:this.Vm.columns)-1){if(!0===this.vr.ps.warnings){var r="SurfaceScrollingGridSeries3D.addValues input yValues overflow.\nGrid was created with "+h+" "+("columns"===this.Vm.scrollDimension?"rows":"columns")+", input yValues have "+e+".\nExcess data will be automatically clipped. This can result in sub-optimal performance.";wr.console.warn(r)}for(var s=[],o=0;o(h="columns"===this.Vm.scrollDimension?this.Vm.rows:this.Vm.columns)-1){if(!0===this.vr.ps.warnings){r="SurfaceScrollingGridSeries3D.addValues intensityValues overflow.\nGrid was created with "+h+" "+("columns"===this.Vm.scrollDimension?"rows":"columns")+", input intensityValues have "+u+".\nExcess data will be automatically clipped. This can result in sub-optimal performance.";wr.console.warn(r)}for(s=[],o=0;of?i=i.slice(0,f):n=n.slice(0,a)}}var c=i?i.length:null==n?void 0:n.length,l=i?i[0].length:null==n?void 0:n[0].length;return this.ic[0].Km({startPrimary:0,startSecondary:0,lengthPrimary:c,lengthSecondary:l,heightMapValues:i,intensityValues:n}),this.hS.xn(),this},i.prototype.setCullMode=function(t){return this.ic[0].Ym("boolean"==typeof t?t?"cull-back":"disabled":t),this},i.prototype.getCullMode=function(){return this.ic[0].Xm()},i.prototype.CS=function(){},i.prototype.Tf=function(){},i.prototype.BS=function(){},i.prototype.He=function(){return this.MS},i.prototype.Ac=function(t,i){t.$n(this.Ho.D(i)).pa(this.wa.D(i)),this.hS.xn()},i}(nG);!function(t){t[t.bg=0]="bg",t[t.seriesBackground=1]="seriesBackground",t[t.layer3D=2]="layer3D",t[t.axesUi=3]="axesUi",t[t.ui=4]="ui"}(OV||(OV={}));var FG=function(t){function i(i,n,e,r,s,o,h){var u=t.call(this,i,n,e,n.qs(OV.bg),n.qs(OV.ui),r,o,h?h.theme:void 0)||this;u.qm=1,u.Jm=[],u.Qm={x:(new xG).xi(-1,1),y:(new xG).xi(-1,1),z:(new xG).xi(-1,1)},u.$m=2,u.tb=!0,u.ib=!0,u.nb=!0,u.eb=0,u.axes={id:"axes",chart:u},u.world={id:"world",chart:u},u.Jr=function(){var t={x:u.pixelScale.x.fi(),y:u.pixelScale.y.fi(),width:u.pixelScale.x.getInnerInterval(),height:u.pixelScale.y.getInnerInterval()};u.hS.sb(t).rb(t);var i=u.ob.viewportChanged(u.hb());i&&u.ub(i),u.ab.rb(t),u.fb.rb(t),u.engine.xn()},u.cb=!1,u.hy.Jn("Chart3D");var a,f={x:u.pixelScale.x.fi(),y:u.pixelScale.y.fi(),width:u.pixelScale.x.getInnerInterval(),height:u.pixelScale.y.getInnerInterval()};u.fb=n.qs(OV.seriesBackground).rb(f),u.hS=n.lb(OV.layer3D,u.Qm).sb(f).rb(f),u.ab=n.qs(OV.axesUi),u.ab.rb(f),u.vb={x:new ZV(u,WV,u.Qm.x,u.vn,u.hS,u.ab,u.pixelScale,!1),y:new ZV(u,UV,u.Qm.y,u.vn,u.hS,u.ab,u.pixelScale,!1),z:new ZV(u,YV,u.Qm.z,u.vn,u.hS,u.ab,u.pixelScale,!1)},u.yb=u.hS.iS([LV.InternalUI]).setMouseInteractions(!1),u.setBoundingBoxStrokeStyle(u.vn.boundingBoxStyle3D),u.Sb=u.fb.Rc(u.engine.scale,CE.Convex).$n(u.vn.seriesBackgroundFillStyle).Ys(u.vn.seriesBackgroundStrokeStyle).setMouseInteractions(!1),u.mb({x:1,y:1,z:1},!0),u.ob=new wG(u.engine.scale,u.pixelScale,u.Qm,(function(t,i){return i&&u.ub(i),u.hS.wS(t)}),(function(t,i){return i&&u.ub(i),u.hS.hm(t)})),u.bb=u.ob.getDefaultCameraConfiguration(u.gb(u.wb)),u.ub(u.bb);var c=WE(new UE.Pinch((function(t,i,n){a={locationOne:i,locationTwo:n,cameraLocation:u.hS.getCameraLocation()}}),(function(t,i,n,e,r,s){if(u.nb||u.ib){var o=Math.pow(a.locationOne.x-a.locationTwo.x,2)+Math.pow(a.locationOne.y-a.locationTwo.y,2),h=Math.pow(i.x-n.x,2)+Math.pow(i.y-n.y,2),f=Ls.length(a.cameraLocation),c=o/h*f,d=l((e.x+r.x)/2,(e.y+r.y)/2);u.Jm.push({type:"rotate+zoom",rotation:u.nb?d:{x:0,y:0},cameraDistance:u.ib?c:f}),u.engine.xn(),ss(s)}}),(function(t){})),new UE.Drag((function(t){}),(function(t,i,n,e,r){if(u.nb){var s=e;u.Jm.push({type:"rotate",rotation:s}),u.engine.xn(),ss(r)}}),(function(t){})));return u.onBackgroundTouchStart(c.onTouchStart),u.onBackgroundTouchMove(c.onTouchMove),u.onBackgroundTouchEnd(c.onTouchEnd),u.onBackgroundMouseDrag((function(t,i,n,e,r){if(u.nb){var s=r;u.Jm.push({type:"rotate",rotation:s}),u.engine.xn(),ss(i)}})),u.onBackgroundMouseDown((function(t,i){ss(i)})),u.onBackgroundMouseWheel((function(t,i){if(u.ib){if(u.tb)u.eb=5*Math.sign(i.deltaY),i.ctrlKey&&(u.eb=2*Math.sign(i.deltaY));else{var n=Cs(i);u.Jm.push({type:"wheel-zoom",deltaY:n})}u.engine.xn(),ss(i)}})),h&&!0===h.disableAnimations&&u.setAnimationsEnabled(!1),u.onResize(u.Jr),u.oy(s,u.pixelScale),u}return n(i,t),i.prototype.addPointSeries=function(t){var i=new(t&&t.type||aG)(this,this.JS,this.QS,this.hS,this.vn,t);return this.im(i),i},i.prototype.addLineSeries=function(){var t=new oG(this,this.JS,this.QS,this.hS,this.vn);return this.im(t),t},i.prototype.addPointLineSeries=function(){var t=new hG(this,this.JS,this.QS,this.hS,this.vn);return this.im(t),t},i.prototype.addSurfaceSeries=function(t){var i=new(t&&t.type||vG)(this,this.JS,this.QS,this.hS,e({},t),this.vn);return this.im(i),i},i.prototype.addSurfaceGridSeries=function(t){var i=new MG(this,this.JS,this.QS,this.hS,t,this.vn);return this.im(i),i},i.prototype.addSurfaceScrollingGridSeries=function(t){var i=new AG(this,this.JS,this.QS,this.hS,t,this.vn);return this.im(i),i},i.prototype.addSurfaceMeshSeries=function(t){var i=new yG(this,this.JS,this.QS,this.hS,e({},t),this.vn);return this.im(i),i},i.prototype.addBoxSeries=function(){var t=new rG(this,this.JS,this.QS,this.hS,this.vn);return this.im(t),t},i.prototype.getDefaultAxisX=function(){return this.vb.x},i.prototype.getDefaultAxisY=function(){return this.vb.y},i.prototype.getDefaultAxisZ=function(){return this.vb.z},i.prototype.getDefaultAxes=function(){return[this.vb.x,this.vb.y,this.vb.z]},i.prototype.setCameraLocation=function(t){var i={location:t,direction:Ls.normalize(Ls.multiply(t,-1))},n=this.ob.cameraLocationChanged(this.hb(i));return n&&(i=n),this.ub(i),this.engine.xn(),this},i.prototype.getCameraLocation=function(){return this.hS.getCameraLocation()},i.prototype.getCameraDirection=function(){return this.hS.getCameraDirection()},i.prototype.setCameraAutomaticFittingEnabled=function(t){this.ob.Am(t);var i=this.ob.cameraLocationChanged(this.hb());return i&&this.ub(i),this},i.prototype.getCameraAutomaticFittingEnabled=function(){return this.ob._m()},i.prototype.onCameraChange=function(t){return this.an.on("cameraChange",t)},i.prototype.offCameraChange=function(t){return this.an.off(t,"cameraChange")},i.prototype.setSeriesBackgroundFillStyle=function(t){return this.Sb.$n(t),this._f.xn(),this},i.prototype.getSeriesBackgroundFillStyle=function(){return this.Sb.Qn()},i.prototype.setSeriesBackgroundStrokeStyle=function(t){return this.Sb.Ys(t),this._f.xn(),this},i.prototype.getSeriesBackgroundStrokeStyle=function(){return this.Sb.Xs()},i.prototype.setBoundingBoxStrokeStyle=function(t){return this.yb.na(t).lS(XV(this.yb.ea())),this.hS.xn(),this},i.prototype.getBoundingBoxStrokeStyle=function(){return this.yb.ea()},i.prototype.setBoundingBox=function(t){return this.mb(t,!1),this},i.prototype.mb=function(t,i){this.wb=t;var n=this.gb(t);if(this.Qm.x.oi(n.x),this.Qm.y.oi(n.y),this.Qm.z.oi(-n.z),!i){var e=this.ob.boundingBoxChanged(this.hb());e&&this.ub(e)}this.engine.xn()},i.prototype.getBoundingBox=function(){return this.wb},i.prototype.Tf=function(){var i=this;this.tb&&0!==this.eb&&(this.Jm.push({type:"wheel-zoom",deltaY:.1*this.eb}),this.eb-=Math.sign(this.eb),0!==this.eb&&this.engine.xn(!0));var n=this.getCameraDirection();if(this.Jm.length>0){var e=this.ob.applyCameraInteractions(this.hb(),this.Jm);e&&this.ub(e),this.Jm.length=0}this.pb&&Ls.equals(this.pb.location,this.bb.location)&&Ls.equals(this.pb.direction,this.bb.direction)||this.an.emit("cameraChange",this,this.getCameraLocation()),this.pb=this.bb,t.prototype.Tf.call(this);for(var r=0;r0?r-1:f.length-1],f[rn.x.getInnerEnd()||e.yn.y.getInnerEnd();var i,n,e,r},i.prototype.Pb=function(){return i=this.Cb,n=this.Rt,e=sr(i.getPosition(l(-1,-1),t.UISpace.PaddedBackground),i.scale,n),r=sr(i.getPosition(l(1,1),t.UISpace.PaddedBackground),i.scale,n),e.xn.x.getInnerEnd();var i,n,e,r},i.prototype.Db=function(){return i=this.Cb,n=this.Rt,e=sr(i.getPosition(l(-1,-1),t.UISpace.PaddedBackground),i.scale,n),r=sr(i.getPosition(l(1,1),t.UISpace.PaddedBackground),i.scale,n),e.yn.y.getInnerEnd();var i,n,e,r},i.prototype._b=function(t){return this.Bb.push(t),t},i}(),IG=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.st=i._b(new BG((function(t){return i.Cb.setOrigin(t)}),(function(){return i.Cb.getOrigin()}))),i}return n(i,t),i.prototype.Ob=function(){var t=this.st.getNormalValue(),i=l(this.Pb()?-t.x:t.x,this.Db()?-t.y:t.y);this.st.alter(i)},i}(LG),OG=function(t){function i(i,n,e,r){var s=t.call(this,i,n)||this;return s.Rb=e,s.zb=r,s.Eb=s._b(new BG((function(t){return s.Cb.setTextFont((function(i){return i.setSize(t)}))}),(function(){return s.Cb.getTextFont().getSize()}))),s}return n(i,t),i.prototype.Ob=function(){var t=this.Eb.getNormalValue(),i=this.Rb;if(i=o)this.getMembers()[u].dispose(),u-=1,h-=1;else for(var a=t[u].length,f=n.getMembers().length,c=0;c=a)n.getMembers()[c].dispose(),c-=1,f-=1;else if(void 0!==l&&l.length>0){for(i=d.length;i=d.length)v=n.addElement(wN,void 0);else(y=d[c])instanceof AN?(n.getMembers()[c].dispose(),v=n.addElement(wN,c)):v=y;v.setFont(this.Wf).setFillStyle(this.Gb).setText(l).setTextRotation(this.fl)}else{for(i=d.length;i=d.length)n.addGap(void 0,void 0);else(y=d[c])instanceof gN&&(n.getMembers()[c].dispose(),n.addGap(void 0,c))}}}return this.wf.xn(),this},i.prototype.restore=function(){return this.dispose(),t.prototype.restore.call(this),this},i.prototype.setTextFillStyle=function(t){this.Gb="function"==typeof t?t(this.Gb):t;for(var i=0;i=n.x.getInnerStart()&&e.x<=n.x.getInnerEnd()&&e.y>=n.y.getInnerStart()&&e.y<=n.y.getInnerEnd()}(this.th,this.scale),this},t}(),EG=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.qb=!1,i}return n(i,t),i.prototype.pointAt=function(i){return this.Jb(i.fillStyle),t.prototype.pointAt.call(this,i)},i.prototype.Jb=function(t){t&&this.qb&&this.Cb.setTextFillStyle(t)},i.prototype.setResultTableAutoTextStyle=function(t){return this.qb=t,this.wf.xn(),this},i.prototype.getResultTableAutoTextStyle=function(){return this.qb},i}(zG),NG=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.setPosition=function(t){return this.th=t,this.Zb.setPosition(t),this.Cb.setPosition(t),this.wf.xn(),this},i}(zG),VG=function(t,i,n){var e=this;void 0===n&&(n=[]),this.jb=t,this.Wb=i,this.Qb=n,this.$b=function(t){return e.Qb.forEach((function(i){return i(t)})),t}},GG=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.tg=function(t,i,e,r){return n.$b(new EG(t,i,e,n.jb,n.Wb,r))},n.addStyler=function(t){return new i(n.jb,n.Wb,n.Qb.map((function(t){return t})).concat(t))},n.setPointMarker=function(t){return new i(t,n.Wb,n.Qb.map((function(t){return t})))},n.setResultTableBackground=function(t){return new i(n.jb,t,n.Qb.map((function(t){return t})))},n}return n(i,t),i}(VG),HG=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.ig=function(t,i,e,r){return n.$b(new NG(t,i,e,n.jb,n.Wb,r))},n.addStyler=function(t){return new i(n.jb,n.Wb,n.Qb.map((function(t){return t})).concat(t))},n.setPointMarker=function(t){return new i(t,n.Wb,n.Qb.map((function(t){return t})))},n.setResultTableBackground=function(t){return new i(n.jb,t,n.Qb.map((function(t){return t})))},n}return n(i,t),i}(VG),jG=function(t){return t.setPointMarker((function(t){return t.setSize(l(5,5)).setOrigin(l(0,0))})).setResultTable((function(t){return t.setOrigin(l(-1,-1)).setMargin(5)}))},WG=function(t){return t.setPointMarker((function(t){return t.setSize(l(20,20)).setOrigin(l(0,0))})).setResultTable((function(t){return t.setBackground((function(t){return t})).setOrigin(l(-1,-1)).setMargin(10)}))};new GG(pN,pN,[jG]);var UG=new GG(pN,MN,[jG,function(i){return i.disposePointMarker().setResultTable((function(i){return i.setOrigin(l(0,-1)).setMargin(0).setBackground((function(i){i instanceof MN&&i.setDirection(t.UIDirections.Down).setPointerLength(10).setPointerAngle(60)}))}))}]),YG=UG;new HG(xN,pN,[WG,function(t){return t.disposeResultTable()}]);var XG,ZG=new HG(yN,pN,[WG,function(t){return t.setResultTable((function(t){return t.setOrigin(lz.LeftBottom)}))}]),KG=function(t,i,n,e,r){return{location:t,scale:i,resultTableContent:n,series:e,fillStyle:r}},qG={World:"World",USA:"USA",NorthAmerica:"NorthAmerica",SouthAmerica:"SouthAmerica",Canada:"Canada",Europe:"Europe",Asia:"Asia",Africa:"Africa",Australia:"Australia"},JG=function(t,i){var n;if(t===qG.World)n="countries_world.json";else if(t===qG.NorthAmerica)n="countries_northAmerica.json";else if(t===qG.SouthAmerica)n="countries_southAmerica.json";else if(t===qG.Africa)n="countries_africa.json";else if(t===qG.Europe)n="countries_europe.json";else if(t===qG.Asia)n="countries_asia.json";else if(t===qG.USA)n="states_usa.json";else if(t===qG.Canada)n="territoriesProvinces_canada.json";else{if(t!==qG.Australia){var e="LCJS MapChart unidentified `type`: "+t;throw wr.alert(e),new Error(e)}n="territories_australia.json"}var r=i+"/maps/"+n;return wr.fetch(r).then((function(t){return t.json()})).catch((function(t){var n='LightningChart JS Map data request failed.\nresourcesBaseUrl: "'+i+'"\nPlease see API documentation of MapChart to learn more about this.\nThe latest documentation can be found at arction.com.';throw wr.alert(n),new Error(n)}))},QG=function(t,i){return!(!i.name||t.name.toLowerCase()!==i.name.toLowerCase())||"ISO_A3"in t&&"ISO_A3"in i&&t.ISO_A3.toLowerCase()===i.ISO_A3.toLowerCase()},$G=function(t,i,n){if(t===qG.Asia){for(var e=[],r=0;rthis.uiScale.x.ci()||t.ythis.uiScale.y.ci())){var e,r=Number.MAX_VALUE;try{for(var s=o(this.ZS),h=s.next();!h.done;h=s.next()){var u=h.value;if(u.getCursorEnabled()){var a=u.solveNearestFromScreen(t);if(a){var f=sr(a.location,a.scale,this.engine.scale),c=Hs(t,f);Number.isNaN(c)||e&&!(c0)?this.ag=this.solveNearest():this.ag=void 0),(void 0!==this.ag||e)&&this.engine.xn()}},e.prototype.im=function(t){t.onHover(this.eg),i.prototype.im.call(this,t)},e.prototype.cg=function(t){return this.an.on("seriesRestore",t)},e.prototype.lg=function(t){return this.an.off(t)},e.prototype.dg=function(t){return this.an.on("seriesDispose",t)},e.prototype.vg=function(t){return this.an.off(t)},e.prototype.dispose=function(){return this.ZS.slice().forEach(Tr),i.prototype.dispose.call(this)},e}(bG),sH=function(i){function h(n,e,r,s,o,h,u){var a=i.call(this,n,e,r,e.qs(eH.bg),e.qs(eH.ui),s,u,h?h.theme:void 0)||this;a.yg=[],a.Sg=[],a.mg=[],a.Rt=a.zv.d2({scaleXYConstructor:Vo}),a.$f=!0,a.Ho=new c(a.vn.mapChartFillStyle),a.Zo=new c(a.vn.mapChartStrokeStyle),a.gg=a.vn.mapChartOutlierRegionFillStyle,a.wg=a.vn.mapChartOutlierRegionStrokeStyle,a.pg=a.vn.mapChartSeparateRegionFillStyle,a.kg=a.vn.mapChartSeparateRegionStrokeStyle,a.Bf=!1,a.xg=t.AutoCursorModes.onHover,a.Mg=hH,a.Mn=!1,a.onMouseEnter=function(t){return a.an.on("mouseEnter",t)},a.onMouseLeave=function(t){return a.an.on("mouseLeave",t)},a.onMouseClick=function(t){return a.an.on("mouseClick",t)},a.onMouseDoubleClick=function(t){return a.an.on("mouseDoubleClick",t)},a.onMouseDown=function(t){return a.an.on("mouseDown",t)},a.onMouseUp=function(t){return a.an.on("mouseUp",t)},a.onMouseMove=function(t){return a.an.on("mouseMove",t)},a.offMouseEnter=function(t){return a.an.off(t,"mouseEnter")},a.offMouseLeave=function(t){return a.an.off(t,"mouseLeave")},a.offMouseClick=function(t){return a.an.off(t,"mouseClick")},a.offMouseDoubleClick=function(t){return a.an.off(t,"mouseDoubleClick")},a.offMouseDown=function(t){return a.an.off(t,"mouseDown")},a.offMouseUp=function(t){return a.an.off(t,"mouseUp")},a.offMouseMove=function(t){return a.an.off(t,"mouseMove")},a.offMouseDragStart=function(t){return a.an.off(t,"mouseDragStart")},a.offMouseDrag=function(t){return a.an.off(t,"mouseDrag")},a.offMouseDragStop=function(t){return a.an.off(t,"mouseDragStop")},a.offMouseWheel=function(t){return a.an.off(t,"mouseWheel")},a.onMapDataReady=function(t){var i=a.an.on("mapDataReady",t);return a.Ag&&wr.setTimeout((function(){return t()})),i},a.onViewChange=function(t){return a.an.on("viewChange",t)},a.Fg=function(t,i,n,e,r){a.Rt.x.oi(e).ai([a.Qt.left+a.hh.left,a.Qt.right+a.hh.right]),a.Rt.y.oi(r).ai([a.Qt.bottom+a.hh.bottom,a.Qt.top+a.hh.top+a.yy()]),a.Tg&&a.Cg(a.Bg,a.Rt,a.Tg)},a.hc=function(i,n,e,r){a.xg!==t.AutoCursorModes.disabled&&(a.Lg(i,e,r),ss(n)),a.an.emit("mouseEnter",a,n)},a.ac=function(t,i,n,e){a.Ig(t,n,e),a.an.emit("mouseLeave",a,i),i&&ss(i)},a.cc=function(i,n,e,r){a.xg!==t.AutoCursorModes.disabled&&(a.Lg(i,e,r),ss(n)),a.an.emit("mouseMove",a,n)},a.dc=function(t,i){return a.an.emit("mouseClick",a,i)},a.vc=function(t,i){return a.an.emit("mouseDoubleClick",a,i)},a.yc=function(t,i){return a.an.emit("mouseDown",a,i)},a.Sc=function(t,i){return a.an.emit("mouseUp",a,i)},a.mc=function(t,i,n){a.an.emit("mouseDragStart",a,i,n)},a.bc=function(t,i,n,e,r){a.an.emit("mouseDrag",a,i,n,e,r)},a.gc=function(t,i,n,e){a.an.emit("mouseDragStop",a,i,n,e)},a.wc=function(t,i){a.an.emit("mouseWheel",a,i)},a.kc=function(t,i,n,e){a.Og=a.engine.clientLocation2Engine(i.clientX,i.clientY),a.Lg(t,n,e),a.an.emit("touchStart",a,i),ss(i)},a.xc=function(t,i,n,e){a.Og=a.engine.clientLocation2Engine(i.clientX,i.clientY),a.Lg(t,n,e),a.an.emit("touchMove",a,i),ss(i)},a.Mc=function(t,i,n,e){a.Og=void 0,a.Ig(t,n,e),a.an.emit("touchEnd",a,i),ss(i)},a.Pg=e.qs(eH.plotting),a.onResize(a.Fg),a.hy.Jn("Map Chart");var f=Rr(h?h.autoCursorBuilder:void 0,ZG);a.Dg=f.ig(a.Rf,a.Rt,a.Rt,a.vn).dispose(),a.oy(o,a.uiScale);var l=Rr(h&&h.type,qG.World);return a.Bg=l,a._g(l).then((function(){a.an.emit("mapDataReady")})),a}return n(h,i),h.prototype.setFillStyle=function(t){return this.Ho.C(t),this.Rg(),this},h.prototype.getFillStyle=function(){return this.Ho.L()},h.prototype.setStrokeStyle=function(t){return this.Zo.C(t),this.Rg(),this},h.prototype.getStrokeStyle=function(){return this.Zo.L()},h.prototype.setOutlierRegionFillStyle=function(t){var i=this;return this.gg="function"==typeof t?t(this.gg):t,this.Sg.forEach((function(t){return t.$n(i.gg)})),this.engine.xn(),this},h.prototype.getOutlierRegionFillStyle=function(){return this.gg},h.prototype.setOutlierRegionStrokeStyle=function(t){var i=this;return this.wg="function"==typeof t?t(this.wg):t,this.Sg.forEach((function(t){return t.Ys(i.wg)})),this.engine.xn(),this},h.prototype.getOutlierRegionStrokeStyle=function(){return this.wg},h.prototype.setSeparateRegionFillStyle=function(t){var i=this;return this.pg="function"==typeof t?t(this.pg):t,this.mg.forEach((function(t){return t.$n(i.pg)})),this.engine.xn(),this},h.prototype.getSeparateRegionFillStyle=function(){return this.pg},h.prototype.setSeparateRegionStrokeStyle=function(t){var i=this;return this.kg="function"==typeof t?t(this.kg):t,this.mg.forEach((function(t){return t.Ys(i.kg)})),this.engine.xn(),this},h.prototype.getSeparateRegionStrokeStyle=function(){return this.kg},h.prototype.invalidateRegionValues=function(t){var i,n;if(!this.Ag||!this.zg)return this.Eg=this.Eg||[],this.Eg.push(t),this;var r=this.Ho.D(!1),s=r instanceof Ve;if("function"==typeof t)for(var h=0;he){h=(o.max.y-o.min.y)*(s/e-1);o.min.y-=h/2,o.max.y+=h/2}i.x.xi(o.min.x,o.max.x),i.y.xi(o.min.y,o.max.y);var u=this.Rt.x.Si(),a=this.Rt.y.Si();this.an.emit("viewChange",{latitudeRange:{start:o.min.y,end:o.max.y},longitudeRange:{start:o.min.x,end:o.max.x},margin:{top:a[1],bottom:a[0],left:u[0],right:u[1]}})},h.prototype.Vg=function(t){for(var i,n,e=0;e0,e=i>0;return[As(Math.abs(0|t),2),"° ",As(Math.abs(0|(t<0?t=-t:t)%1*60),2),"' "].join("")+(n?"E":"W")+", "+([As(Math.abs(0|i),2),"° ",As(Math.abs(0|(i<0?i=-i:i)%1*60),2),"' "].join("")+(e?"N":"S"))},aH=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,i,n,n.Hg(e),r,s,{numeric:r.numericTickStrategy,datetime:r.dateTimeTickStrategy,time:r.timeTickStrategy},{type:"linear"})||this;return a.jg=o,a.Wg=h,a.Ug=u,a.Yg=e,a.qn=u.$e(e).setMouseInteractions(!1).ie(r.axisTitleFont),a}return n(i,t),i.prototype.setStrokeStyle=function(t){return this.Xg="function"==typeof t?t(this.Xg):t,this.Wg.xn(),this},i.prototype.getStrokeStyle=function(){return this.Xg},i.prototype.Be=function(t,i,n,e){return new fH(i,t,n,e,this.Yg,this.Ug,this.Ug,this.Zg(this.jg,this.Yg),this.Ug.Gf(this.Yg).setMouseInteractions(!1))},i.prototype.Le=function(t,i){var n=this.Kg(this.Yg,t);this.qg&&!1===this.qg(t)?t.label.dispose():t.label.restore().ph(fo(this.Jg(this.Yg,t.value),n.padding)).Bh(n.alignment).ne(n.rotation).xh(n.offset.x,n.offset.y),this.Qg(this.Yg,t.gridline,t.tickline,t)},i.prototype.setMouseInteractions=function(t){return this},i.prototype.Tf=function(){var t=this;this.ve({physicalAxisSize:0});var i=this.De((function(i,n){var e=n.tickLevel.Ce,r=.5*t.Xg.thickness+e.tickLength+e.tickPadding+Math.abs(n.label.Fe().vi().y/t.Yg.tn().y)+e.labelPadding;return Math.max(i,r)}),0);return this.$g(this.Yg,this.Xg,i),this.tw(this.Yg,this.qn,i),i},i}(eh),fH=function(t){function i(i,n,e,r,s,o,h,u,a,f){var c=t.call(this,i,n,e,r,o,s,h,s,f)||this;return c.gridline=u,c.tickline=a,u.setMouseInteractions(!1),c}return n(i,t),i.prototype.restore=function(){return t.prototype.restore.call(this),this.gridline.restore(),this.tickline.restore(),this},i.prototype.dispose=function(){return t.prototype.dispose.call(this),this.gridline.dispose(),this.tickline.dispose(),this},i.prototype.isDisposed=function(){return t.prototype.isDisposed.call(this)&&this.gridline.isDisposed()&&this.tickline.isDisposed()},i}(sV),cH=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,i,lH,n,e,r,s,o,h)||this;return a.iw=u,a.Xg=a.vn.polarAmplitudeAxisStyle,a.cS=a.Wg.Gf(a.Yg).setMouseInteractions(!1),a.setScrollStrategy(Ho.expansion),a.setTickStrategy(jo.Numeric),a.qn.$n(e.polarAmplitudeAxisTitleStyle),a.setTitle("Amplitude"),a}return n(i,t),i.prototype.Ge=function(){return this.iw()},i.prototype.Ze=function(t,i){return oV(t,i,this.Yg.y)},i.prototype.qe=function(t,i,n){var e=2*(i-t),r=this.Yg.x.Yi(e);return{min:t-n*r,max:i+n*r}},i.prototype.Jg=function(t,i){return{x:t.nw()?i-t.ew().start:t.ew().start-i,y:0}},i.prototype.Zg=function(t,i){return t.Gc(i)},i.prototype.Qg=function(t,i,n,e){var r=e.tickLevel.Ce,s=t.nw()?e.value-t.ew().start:t.ew().start-e.value;Br(e.value,t.ew().start)||Br(e.value,t.ew().end)?i.dispose():i.restore().Zu(0).Ku(360).ta(void 0).$u(0).qu(s).ta(60).$n(Re).Ys(r.gridStrokeStyle);var o=.5*this.Xg.thickness;n.ha({x:s,y:-o*t.tn().y}).Ku({x:s,y:-(o+r.tickLength)*t.tn().y}).na(r.tickStyle)},i.prototype.Kg=function(t,i){var n=i.tickLevel.Ce;return{alignment:{x:0,y:1},padding:{x:0,y:t.tn().y*-(.5*this.Xg.thickness+n.tickLength+n.tickPadding)},rotation:0,offset:{x:0,y:0}}},i.prototype.$g=function(t,i,n){var e=t.nw()?t.ew().end-t.ew().start:t.ew().start-t.ew().end;this.cS.ha({x:0,y:0}).Ku({x:e,y:0}).na(i)},i.prototype.tw=function(t,i,n){var e=t.nw()?(t.ew().start+t.ew().end)/2-t.ew().start:t.ew().start-(t.ew().start+t.ew().end)/2;i.Bh({x:0,y:1}).ph({x:e,y:-n*t.tn().y})},i}(aH),lH={je:function(t){return t.getAmplitudeMin()},We:function(t){return t.getAmplitudeMax()},Ye:function(t){},Hg:function(t){return{getInnerStart:function(){return t.ew().start},getInnerEnd:function(){return t.ew().end},xi:function(i,n){return t.rw(i,n)},Ti:function(i,n,e,r,s){return t.y.Ti(i,n,e,r,s)}}}},dH=function(t){function i(i,n,e,r,s,o,h){var u=t.call(this,i,yH,n,e,r,s,o,h)||this;return u.Xg=u.vn.polarRadialAxisStyle,u.sw=90,u.ow=12,u.hw=vH,u.cS=u.Wg.Gc(u.Yg).setMouseInteractions(!1),u.qg=function(t){for(var i=180*(t.value-u.Yg.uw())/Math.PI%360;i<0;)i+=360;for(;i>360;)i-=360;if(i>=0&&i<=20||i>=340&&i<=360)return!1},u.wn=void 0,u.setTickStyle(e.polarRadialAxisTickStyle),u.qn.$n(e.polarRadialAxisTitleStyle),u.setTitle("Degrees"),u.setNorth(u.sw),u}return n(i,t),i.prototype.setTickStyle=function(t){return this.aw="function"==typeof t?t(this.aw):t,this.fw(),this.Wg.xn(),this},i.prototype.getTickStyle=function(){return this.aw},i.prototype.setTickFormattingFunction=function(t){return this.hw=t,this.fw(),this.Wg.xn(),this},i.prototype.getTickFormattingFunction=function(){return this.hw},i.prototype.setClockwise=function(t){this.Yg.cw(t);var i=this.sw*Math.PI/180;return t?this.Yg.lw(i+Math.PI/2):this.Yg.lw(i-Math.PI/2),this.Wg.xn(),this},i.prototype.getClockwise=function(){return!this.Yg.dw()},i.prototype.setNorth=function(t){for(;t<0;)t+=360;t%=360,this.sw=t;var i=t*Math.PI/180;return this.getClockwise()?this.Yg.lw(i+Math.PI/2):this.Yg.lw(i-Math.PI/2),this.Wg.xn(),this},i.prototype.getNorth=function(){return 180*this.Yg.uw()/Math.PI},i.prototype.setDivision=function(t){return this.ow=t,this.fw(),this.Wg.xn(),this},i.prototype.getDivision=function(){return this.ow},i.prototype.Ge=function(){return[]},i.prototype.Ze=function(t,i){return i},i.prototype.qe=function(t,i,n){return{min:t,max:i}},i.prototype.Jg=function(t,i){var n=t.dw()?1:-1,e=t.uw(),r=t.nw()?t.ew().end-t.ew().start:t.ew().start-t.ew().end;return{x:Math.cos((i-e)*n)*r,y:Math.sin((i-e)*n)*r}},i.prototype.Zg=function(t,i){return t.Gf(i)},i.prototype.Qg=function(t,i,n,e){var r=this.aw,s=t.dw()?1:-1,o=t.uw(),h=(e.value-o)*s,u=Math.cos(h),a=Math.sin(h),f=t.nw()?t.ew().end-t.ew().start:t.ew().start-t.ew().end,c={x:u*f,y:a*f};i.ha({x:0,y:0}).Ku(c);var l={x:c.x+u*r.tickLength*t.tn().x,y:c.y+a*r.tickLength*t.tn().y};n.ha(c).Ku(l),i.na(r.gridStrokeStyle),n.na(r.tickStyle)},i.prototype.Kg=function(t,i){for(var n,e=this.aw,r=t.dw()?1:-1,s=t.uw(),o=(i.value-s)*r;o<0;)o+=2*Math.PI;for(;o>=2*Math.PI;)o-=2*Math.PI;n=o>0&&o<=Math.PI?-o+Math.PI/2:-o-Math.PI/2;var h=e.tickLength+e.tickPadding,u=Math.cos(o)*h*t.tn().x,a=Math.sin(o)*h*t.tn().y;return{alignment:{x:0,y:0},padding:{x:u,y:a},rotation:180*n/Math.PI,offset:{x:u,y:a}}},i.prototype.$g=function(t,i,n){var e=t.nw()?t.ew().end-t.ew().start:t.ew().start-t.ew().end;this.cS.Zu(0).Ku(360).$u(0).qu(e+.5*i.thickness*t.tn().x).ta(60).$n(Re).Ys(i)},i.prototype.tw=function(t,i,n){var e=t.uw(),r=this.Kg(t,{value:0+e}),s=t.nw()?t.ew().end-t.ew().start:t.ew().start-t.ew().end;i.Bh(r.alignment).ne(r.rotation).xh(r.offset.x,r.offset.y).ph(fo({x:s,y:0},r.padding))},i.prototype.fw=function(){var t=this;this.he({cn:[],ln:[{sr:"Radial ticks",hr:0,Ce:this.aw,Ae:this.hw,pe:function(i,n,e,r){for(var s=[],o=2*Math.PI/t.ow,h=0;h<2*Math.PI;h+=o)s.push(h);return s},Gn:{Oe:function(){},Hn:function(){return!1}},xe:void 0}],rn:vH,ae:void 0,fe:void 0})},i}(aH),vH=function(t,i,n){return(180*t/Math.PI).toFixed(0)},yH={je:function(t){},We:function(t){},Ye:function(t){},Hg:function(t){return{getInnerStart:function(){return 0},getInnerEnd:function(){return 2*Math.PI},xi:function(t,i){},Ti:function(i,n,e,r,s){return t.x.Ti(i,n,e,r,s)}}}},SH=function(t){function i(i,n,e,r,s,o){var h=t.call(this,n,e,r,o)||this;return h.wf=i,h.Yg=s,h.Mt="Sector",h.yw=0,h.Sw=1*Math.PI/2,h.mw=void 0,h.bw=void 0,h.Ly=h.Cc(h.wf.Gc(h.Yg)),h.Ho=new c(o.bandFillStyle),h.Zo=new c(o.bandStrokeStyle),h.setMouseInteractions(!1),h}return n(i,t),i.prototype.setAngleStart=function(t){return this.yw=Lr(t,0,360),this.wf.xn(),this},i.prototype.getAngleStart=function(){return this.yw},i.prototype.setAngleEnd=function(t){return this.Sw=Lr(t,0,360),this.wf.xn(),this},i.prototype.getAngleEnd=function(){return this.Sw},i.prototype.setAmplitudeStart=function(t){return this.mw=t,this.wf.xn(),this},i.prototype.getAmplitudeStart=function(){return this.mw},i.prototype.setAmplitudeEnd=function(t){return this.bw=t,this.wf.xn(),this},i.prototype.getAmplitudeEnd=function(){return this.bw},i.prototype.setFillStyle=function(t){return this.Ho.C(t),this.wf.xn(),this},i.prototype.getFillStyle=function(){return this.Ho.L()},i.prototype.setFillStyleHighlighted=function(t){return this.Ho.I(t),this.wf.xn(),this},i.prototype.getFillStyleHighlighted=function(){return this.Ho.P()},i.prototype.setStrokeStyle=function(t){return this.Zo.C(t),this.wf.xn(),this},i.prototype.getStrokeStyle=function(){return this.Zo.L()},i.prototype.setStrokeStyleHighlight=function(t){return this.Zo.I(t),this.wf.xn(),this},i.prototype.getStrokeStyleHighlight=function(){return this.Zo.D(!0)},i.prototype.Tf=function(){var t=this.Yg.ew(),i=180*this.Yg.uw()/Math.PI,n=void 0!==this.mw?Lr(this.mw,t.start,t.end):t.start,e=void 0!==this.bw?Lr(this.bw,t.start,t.end):t.end,r=this.Yg.nw()?n-t.start:t.start-n,s=this.Yg.nw()?e-t.start:t.start-e,o=Math.min(r,s),h=Math.max(r,s),u=this.Yg.dw()?1:-1,a=Math.abs(this.Sw-this.yw);this.Ly.Zu((this.yw-i)*u).Ku((this.Sw-i)*u).$u(100*o/h).qu(h).$n(this.Ho.D(this.Bf)).Ys(this.Zo.D(this.Bf)).ta(Math.ceil(a/2))},i.prototype.Ac=function(t,i){},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),t.prototype.attach.call(this,i,n),ks(i,this.vn,{fill:this.Ho,stroke:this.Zo}),this},i}(nN),mH=function(i,n,e){if(e instanceof rH&&(e.getAutoCursorMode()!==t.AutoCursorModes.disabled&&!0===i||n.listeners("hover").size>1))return!0;return n.listeners("hover").size>0},bH=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.MS=!0,i.gw=!0,i.ww=!0,i.onHover=function(t){return i.an.on("hover",t)},i.offHover=function(t){return i.an.off(t,"hover")},i}return n(i,t),i.prototype.setAutoScrollingEnabled=function(t){return this.MS=t,this.vr.engine.xn(),this},i.prototype.getAutoScrollingEnabled=function(){return this.MS},i.prototype.CS=function(){this.pw&&mH(this.ww,this.an,this.vr)&&this.an.emit("hover",this,void 0===this.kw?this.solveNearestFromScreen(this.pw):this.solveNearestFromSegment(this.pw,this.kw))},i.prototype.Tf=function(){},i.prototype.BS=function(){},i.prototype.IS=function(t){return this.ww=t,this},i.prototype.OS=function(){return this.ww=this.gw,this},i.prototype.setCursorEnabled=function(t){return this.ww=t,this.gw=t,this},i.prototype.getCursorEnabled=function(){return this.ww},i.prototype.uc=function(i,n,e){void 0===e&&(e=1),t.prototype.uc.call(this,i,n,e),this.kw=i,this.pw=this.vr.engine.clientLocation2Engine(n.x,n.y),mH(this.ww,this.an,this.vr)&&this.an.emit("hover",this,this.solveNearestFromSegment(this.pw,this.kw))},i.prototype.fc=function(i,n){void 0===n&&(n=1),t.prototype.fc.call(this,i,n),this.kw=void 0,this.pw=void 0,mH(this.ww,this.an,this.vr)&&this.an.emit("hover",this,void 0)},i.prototype.lc=function(i,n){t.prototype.lc.call(this,i,n),this.kw=i,this.pw=this.vr.engine.clientLocation2Engine(n.x,n.y),mH(this.ww,this.an,this.vr)&&this.an.emit("hover",this,void 0===this.kw?this.solveNearestFromScreen(this.pw):this.solveNearestFromSegment(this.pw,this.kw))},i}(nN),gH=function(t){function i(i,n,e,r,s,o){var h=t.call(this,n,e,r,o)||this;return h.wf=i,h.vr=n,h.Mg=wH,h.scale=s,h}return n(i,t),i.prototype.getAmplitudeMin=function(){return this.xw?this.xw.min:void 0},i.prototype.getAmplitudeMax=function(){return this.xw?this.xw.max:void 0},i.prototype.setCursorResultTableFormatter=function(t){return this.Mg=t,this.vr.engine.xn(),this},i.prototype.getCursorResultTableFormatter=function(){return this.Mg},i}(bH),wH=function(t,i,n,e,r){return t.addRow(i.getName()).addRow("Angle:","",Math.round(n).toString()).addRow("Amplitude","",r(e))},pH=function(t,i){var n,e,r=[],s=i.ew().start,h=i.ew().end,u=i.nw(),a=i.dw()?1:-1,f=i.uw(),c=Math.abs(h-s),l=Math.min(s,h)+.001*c,d=Math.max(s,h)-.001*c;try{for(var v=o(t),y=v.next();!y.done;y=v.next()){var S=y.value,m=Lr(S.amplitude,l,d),b=S.angle*Math.PI/180-f,g=Math.cos(b*a)*(u?m-s:s-m),w=Math.sin(b*a)*(u?m-s:s-m),p=S.color;r.push({x:g,y:w,color:p})}}catch(t){n={error:t}}finally{try{y&&!y.done&&(e=v.return)&&e.call(v)}finally{if(n)throw n.error}}return r},kH=function(t){var i,n,e={min:Is,max:Os};try{for(var r=o(t),s=r.next();!s.done;s=r.next()){var h=s.value;e.min=Math.min(e.min,h.amplitude),e.max=Math.max(e.max,h.amplitude)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return e},xH=function(t){return t.slice().map((function(t){return t.angle>=0&&t.angle<=360?t:e(e({},t),{angle:t.angle%360})}))},MH=function(t,i){var n=po(t);for(i.dw()||(n*=-1),n+=180*i.uw()/Math.PI;n<0;)n+=360;n%=360;var e=uo(t),r=i.ew(),s=Math.abs(r.end-r.start);return{angle:n,amplitude:ru(r.start,r.end,e/s)}},AH=function(t){function i(i,n,e,r,s,o){var h=t.call(this,i,n,e,r,s,o)||this;h.Mt="Line Series",h.Mw=[],h.Aw=!1,h.Fw=!1;var u=h.vr.getSeries().length;return h.ia=new c(Fs(h.vn.seriesStrokeStyle,u)),h.Tw=h.Cc(i.iS(s,void 0,[LV.UserSeries]).na(h.ia.D(h.Bf))).Uh(Wz.Nearest),h}return n(i,t),i.prototype.setData=function(t){return this.Mw=xH(t),this.Aw=!0,this.xw=kH(this.Mw),this.wf.xn(),this},i.prototype.setStrokeStyle=function(t){var i,n;this.ia.C(t);var e=this.ia.D(this.Bf);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.na(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return this.wf.xn(),this},i.prototype.getStrokeStyle=function(){return this.ia.L()},i.prototype.setStrokeStyleHighlight=function(t){var i,n;if(this.ia.I(t),this.getHighlighted()){var e=this.ia.D(!0);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.na(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}return this.wf.xn(),this},i.prototype.getStrokeStyleHighlight=function(){return this.ia.D(!0)},i.prototype.setConnectDataAutomaticallyEnabled=function(t){return this.Fw=t,this.wf.xn(),this},i.prototype.getConnectDataAutomaticallyEnabled=function(){return this.Fw},i.prototype.He=function(){return this.MS&&this.Mw.length>0},i.prototype.Ac=function(t,i){t.na(this.ia.D(i)),this.wf.xn()},i.prototype.solveNearestFromScreen=function(t){return this.solveNearestFromSegment(t,this.Tw)},i.prototype.solveNearestFromSegment=function(t,i){var n=i.Cw(t);if(n){var e=MH(n,this.scale),r=e.angle,s=e.amplitude;return KG(n,this.scale,this.Mg(new _G,this,r,s,this.vr.getAmplitudeAxis().formatValue).Xf(),this,this.ia.L().getFillStyle())}},i.prototype.Tf=function(){if(this.Aw||this.scale.Bw()){var t=pH(this.Mw,this.scale),i=Ks(t);this.Fw?(t.push(e({},t[0])),this.Tw.Cu(!0)):this.Tw.Cu(!1),this.Tw.$h().Qh(t).Eo(i),this.Aw=!1,this.Tw.Fe()}},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),t.prototype.attach.call(this,i,n),ks(i,this.vn,{stroke:this.ia}),this},i}(gH),FH=function(i){function r(n,e,r,s,o,h){var u=i.call(this,n,e,r,s,o,h)||this;u.Mt="Point Line Series",u.Mw=[],u.Aw=!1,u.Fw=!1,u.Lw=3,u.sh=0,u.Iw=t.PointShape.Circle;var a=u.vr.getSeries().length;return u.Ho=new c(Fs(u.vn.seriesPointFillStyle,a)),u.ia=new c(Fs(u.vn.seriesStrokeStyle,a)),u.Tw=u.Cc(n.iS(o,void 0,[LV.UserSeries]).na(u.ia.D(u.Bf))).Uh(Wz.Nearest),u.Ow=u.Cc(n.US(o).$n(u.Ho.D(u.Bf)).Zh(u.Iw).oi(u.Lw)).Uh(Wz.Nearest),u}return n(r,i),r.prototype.setData=function(t){return this.Mw=xH(t),this.Aw=!0,this.xw=kH(this.Mw),this.wf.xn(),this},r.prototype.setStrokeStyle=function(t){this.ia.C(t);var i=this.ia.D(this.Bf);return this.Tw.na(i),this.wf.xn(),this},r.prototype.getStrokeStyle=function(){return this.ia.L()},r.prototype.setStrokeStyleHighlight=function(t){if(this.ia.I(t),this.getHighlighted()){var i=this.ia.D(!0);this.Tw.na(i)}return this.wf.xn(),this},r.prototype.getStrokeStyleHighlight=function(){return this.ia.D(!0)},r.prototype.setPointFillStyle=function(t){this.Ho.C(t);var i=this.Ho.D(this.Bf);return this.Ow.$n(i),this.wf.xn(),this},r.prototype.getPointFillStyle=function(){return this.Ho.L()},r.prototype.setPointFillStyleHighlight=function(t){if(this.Ho.I(t),this.getHighlighted()){var i=this.Ho.D(!0);this.Ow.$n(i)}return this.wf.xn(),this},r.prototype.getPointFillStyleHighlight=function(){return this.Ho.D(!0)},r.prototype.setPointSize=function(t){return this.Lw=t,this.Ow.oi(t),this.wf.xn(),this},r.prototype.getPointSize=function(){return this.Lw},r.prototype.setPointShape=function(t){return this.Iw=t,this.Ow.Zh(this.Iw),this},r.prototype.getPointShape=function(){return this.Iw},r.prototype.setPointRotation=function(t){return this.sh=t,this.Ow.ne(t),this.wf.xn(),this},r.prototype.getPointRotation=function(){return this.sh},r.prototype.setConnectDataAutomaticallyEnabled=function(t){return this.Fw=t,this.wf.xn(),this},r.prototype.getConnectDataAutomaticallyEnabled=function(){return this.Fw},r.prototype.He=function(){return this.MS&&this.Mw.length>0},r.prototype.Ac=function(t,i){t instanceof VE?t.na(this.ia.D(i)):t.$n(this.Ho.D(i)),this.wf.xn()},r.prototype.solveNearestFromScreen=function(t){return this.solveNearestFromSegment(t,this.Tw)},r.prototype.solveNearestFromSegment=function(t,i){var n=i instanceof xE?i.Pw(t):i.Cw(t);if(n){var e=MH(n,this.scale),r=e.angle,s=e.amplitude;return KG(n,this.scale,this.Mg(new _G,this,r,s,this.vr.getAmplitudeAxis().formatValue).Xf(),this,"color"in n&&this.Ho.L()instanceof Ne?new Ee({color:n.color}):this.Ho.L())}},r.prototype.Tf=function(){if(this.Aw||this.scale.Bw()){var t=pH(this.Mw,this.scale),i=Ks(t);this.Fw?(t.push(e({},t[0])),this.Tw.Cu(!0)):this.Tw.Cu(!1),this.Tw.$h().Qh(t).Eo(i),this.Ow.$h().Qh(t).Eo(i),this.Aw=!1,this.Tw.Fe(),this.Ow.Fe()}},r}(gH),TH=function(i){function e(n,e,r,s,o,h){var u=i.call(this,n,e,r,s,o,h)||this;u.Mt="Point Series",u.Mw=[],u.Aw=!1,u.Lw=3,u.sh=0,u.Iw=t.PointShape.Circle;var a=u.vr.getSeries().length;return u.Ho=new c(Fs(u.vn.seriesPointFillStyle,a)),u.Ow=u.Cc(n.US(o).$n(u.Ho.D(u.Bf)).Zh(u.Iw).oi(u.Lw)).Uh(Wz.Nearest),u}return n(e,i),e.prototype.setData=function(t){return this.Mw=xH(t),this.Aw=!0,this.xw=kH(this.Mw),this.wf.xn(),this},e.prototype.setPointFillStyle=function(t){var i,n;this.Ho.C(t);var e=this.Ho.D(this.Bf);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.$n(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return this.wf.xn(),this},e.prototype.getPointFillStyle=function(){return this.Ho.L()},e.prototype.setPointFillStyleHighlight=function(t){var i,n;if(this.Ho.I(t),this.getHighlighted()){var e=this.Ho.D(!0);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.$n(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}return this.wf.xn(),this},e.prototype.getPointFillStyleHighlight=function(){return this.Ho.D(!0)},e.prototype.setPointSize=function(t){var i,n;this.Lw=t;try{for(var e=o(this.ic),r=e.next();!r.done;r=e.next()){r.value.oi(t)}}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(i)throw i.error}}return this.wf.xn(),this},e.prototype.getPointSize=function(){return this.Lw},e.prototype.setPointShape=function(t){var i,n;this.Iw=t;try{for(var e=o(this.ic),r=e.next();!r.done;r=e.next()){r.value.Zh(this.Iw)}}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(i)throw i.error}}return this},e.prototype.getPointShape=function(){return this.Iw},e.prototype.setPointRotation=function(t){var i,n;this.sh=t;try{for(var e=o(this.ic),r=e.next();!r.done;r=e.next()){r.value.ne(t)}}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(i)throw i.error}}return this.wf.xn(),this},e.prototype.getPointRotation=function(){return this.sh},e.prototype.He=function(){return this.MS&&this.Mw.length>0},e.prototype.Ac=function(t,i){t.$n(this.Ho.D(i)),this.wf.xn()},e.prototype.solveNearestFromScreen=function(t){var i=this.Ow.Pw(t);if(i){var n=MH(i,this.scale),e=n.angle,r=n.amplitude;return KG(i,this.scale,this.Mg(new _G,this,e,r,this.vr.getAmplitudeAxis().formatValue).Xf(),this,"color"in i&&this.Ho.L()instanceof Ne?new Ee({color:i.color}):this.Ho.L())}},e.prototype.solveNearestFromSegment=function(t,i){return this.solveNearestFromScreen(t)},e.prototype.Tf=function(){if(this.Aw||this.scale.Bw()){var t=pH(this.Mw,this.scale),i=Ks(t);this.Ow.$h().Qh(t).Eo(i),this.Aw=!1,this.Ow.Fe()}},e.prototype.attach=function(t,n){return void 0===n&&(n=!0),i.prototype.attach.call(this,t,n),ks(t,this.vn,{fill:this.Ho}),this},e}(gH),CH=function(){function t(t,i,n,e,r){this.vr=t,this.Dw=i,this._w=n,this.ZS=e,this.Rw=!1,this._h=r}return t.prototype.setGeometry=function(t){return this.zw=t,this.Rw=!0,this.vr.engine.xn(),this},t.prototype.getGeometry=function(){return this.zw},t.prototype.setMouseInteractions=function(t){return this._h.setMouseInteractions(t),this},t.prototype.dispose=function(){return this._h.dispose(),this.Dw(this),this},t.prototype.isDisposed=function(){return this._h.isDisposed()},t.prototype.restore=function(){return this._h.restore(),this._w(this),this},t}(),BH=function(t,i,n){var e=i.Rt,r=n.Rt,s=(t.x-e.getInnerStart())/(e.getInnerEnd()-e.getInnerStart()),o=(t.y-r.getInnerStart())/(r.getInnerEnd()-r.getInnerStart());return 1===n.dv&&(s=1-s),1===i.dv&&(o=1-o),l(o,s)},LH=function(t){function i(i,n,e,r,s,o,h,u,a){var f=t.call(this,i,n,aV(e.Rt,r.Rt),s,o,a)||this;return f.axisX=e,f.axisY=r,f.Ew=h,f.Nw=u,f.vn=a,f.Vw=f.axisX.Rv(!1,f.Ew).setMouseInteractions(!1).setAllocatesAxisSpace(!1),f.Gw=!1,f.Hw=f.axisY.Rv(!1,f.Nw).setMouseInteractions(!1).setAllocatesAxisSpace(!1),f.jw=!1,f.Ww=!0,f.Uw=!0,f.Yw=!1,f.Xw=!1,f.setGridStrokeYStyle=function(t){return f.Hw.setGridStrokeStyle(t),f},f.getGridStrokeYStyle=function(){return f.Hw.getGridStrokeStyle()},f}return n(i,t),i.prototype.pointAt=function(i){return t.prototype.pointAt.call(this,i),this.setPosition(sr(i.location,i.scale,this.scale)),this},i.prototype.setPosition=function(i){t.prototype.setPosition.call(this,i),this.Vw.setValue(i.x),this.Hw.setValue(i.y);var n=BH(l(this.Vw.getValue(),this.Hw.getValue()),this.axisX,this.axisY);return this.Vw.setGridStrokeLength(this.Yw?n.x:1),this.Hw.setGridStrokeLength(this.Xw?n.y:1),this},i.prototype.Tf=function(){!this.isDisposed()&&this.Xb?(this.Vw.restore(),this.Hw.restore()):(this.Vw.dispose(),this.Hw.dispose());var i=BH(l(this.Vw.getValue(),this.Hw.getValue()),this.axisX,this.axisY);return this.Vw.setGridStrokeLength(this.Yw?i.x:1),this.Hw.setGridStrokeLength(this.Xw?i.y:1),t.prototype.Tf.call(this)},i.prototype.dispose=function(){return t.prototype.dispose.call(this),this.Vw.dispose(),this.Hw.dispose(),this},i.prototype.restore=function(){return t.prototype.restore.call(this),this.Vw.restore(),this.Hw.restore(),this},i.prototype.setGridStrokeXCut=function(t){return this.Yw=t,this.wf.xn(),this},i.prototype.getGridStrokeXCut=function(){return this.Yw},i.prototype.setGridStrokeYCut=function(t){return this.Xw=t,this.wf.xn(),this},i.prototype.getGridStrokeYCut=function(){return this.Xw},i.prototype.setGridStrokeXStyle=function(t){return this.Vw.setGridStrokeStyle(t),this},i.prototype.getGridStrokeXStyle=function(){return this.Vw.getGridStrokeStyle()},i.prototype.disposeTickMarkerX=function(){return this.Vw.disposeMarker(),this.wf.xn(),this},i.prototype.restoreTickMarkerX=function(){return this.Vw.restoreMarker(),this.wf.xn(),this},i.prototype.isDisposedTickMarkerX=function(){return this.Vw.isDisposedMarker()},i.prototype.disposeTickMarkerY=function(){return this.Hw.disposeMarker(),this.wf.xn(),this},i.prototype.restoreTickMarkerY=function(){return this.Hw.restoreMarker(),this.wf.xn(),this},i.prototype.isDisposedTickMarkerY=function(){return this.Hw.isDisposedMarker()},i.prototype.setTickMarkerX=function(t){return this.Vw.setMarker(t),this},i.prototype.setTickMarkerY=function(t){return this.Hw.setMarker(t),this},i.prototype.getTickMarkerX=function(){return this.Vw.getMarker()},i.prototype.getTickMarkerY=function(){return this.Hw.getMarker()},i}(NG),IH=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,i,n,e,r,s,u)||this;return a.jb=r,a.Wb=s,a.Ew=o,a.Nw=h,a.vn=u,a.Yw=!1,a.Xw=!1,a.Zw=a.vn.customTickGridStrokeStyle,a.Kw=a.vn.customTickGridStrokeStyle,a.qw=!1,a.Jw=!1,a.Qw=new Map,a.$w=new Map,a.tp=!1,a.ip=!1,a.vn.pointMarkerHorizontalGridStrokeStyle&&a.setGridStrokeXStyle(a.vn.pointMarkerHorizontalGridStrokeStyle),a.vn.pointMarkerVerticalGridStrokeStyle&&a.setGridStrokeYStyle(a.vn.pointMarkerVerticalGridStrokeStyle),a}return n(i,t),i.prototype.Tf=function(){return this.np&&this.ep&&(!this.isDisposed()&&this.Xb?(this.ep.restore(),this.np.restore()):(this.ep.dispose(),this.np.dispose())),t.prototype.Tf.call(this)},i.prototype.restore=function(){return t.prototype.restore.call(this),this.np&&this.np.restore(),this.ep&&this.ep.restore(),this},i.prototype.dispose=function(){return this.isDisposed()||(t.prototype.dispose.call(this),this.np&&this.np.dispose(),this.ep&&this.ep.dispose()),this},i.prototype.pointAt=function(i){var n=i.location,e=i.series,r=e.axisX,s=e.axisY,o=this.Rn(r,!0),h=this.Rn(s,!1);o!==this.np&&this.np&&(this.np.dispose(),o.restore()),h!==this.ep&&this.ep&&(this.ep.dispose(),h.restore()),o.setValue(n.x),h.setValue(n.y);var u=BH(l(n.x,n.y),r,s);return o.setGridStrokeLength(this.Yw?u.x:1),h.setGridStrokeLength(this.Xw?u.y:1),this.np=o,this.ep=h,t.prototype.pointAt.call(this,i)},i.prototype.Jb=function(i){if(t.prototype.Jb.call(this,i),i){var n=function(t){return t.setTextFillStyle(i)};this.np&&this.qw&&this.np.setMarker(n),this.ep&&this.Jw&&this.ep.setMarker(n)}},i.prototype.Rn=function(t,i){var n=(i?this.Qw:this.$w).get(t);return n||(i?(n=t.Rv(!1,this.Ew),this.Qw.set(t,n)):(n=t.Rv(!1,this.Nw),this.$w.set(t,n)),this.Te(n,i),n.setMouseInteractions(!1).setAllocatesAxisSpace(!1)),n},i.prototype.Te=function(t,i){var n=i?this.Zw:this.Kw;return t.setGridStrokeStyle(n),t.setMouseInteractions(!1),(i?this.tp:this.ip)?t.disposeMarker():t.restoreMarker(),t},i.prototype.setGridStrokeXCut=function(t){return this.Yw=t,this.wf.xn(),this},i.prototype.getGridStrokeXCut=function(){return this.Yw},i.prototype.setGridStrokeYCut=function(t){return this.Xw=t,this.wf.xn(),this},i.prototype.getGridStrokeYCut=function(){return this.Xw},i.prototype.setGridStrokeXStyle=function(t){var i=this;return this.Zw=t instanceof Function?t(this.getGridStrokeXStyle()):t,this.Qw.forEach((function(t){return t.setGridStrokeStyle(i.Zw)})),this},i.prototype.getGridStrokeXStyle=function(){return this.Zw},i.prototype.setGridStrokeYStyle=function(t){var i=this;return this.Kw=t instanceof Function?t(this.getGridStrokeYStyle()):t,this.$w.forEach((function(t){return t.setGridStrokeStyle(i.Kw)})),this},i.prototype.getGridStrokeYStyle=function(){return this.Kw},i.prototype.disposeTickMarkerX=function(){return this.Qw.forEach((function(t){return t.disposeMarker()})),this.tp=!0,this},i.prototype.restoreTickMarkerX=function(){return this.Qw.forEach((function(t){return t.restoreMarker()})),this.tp=!1,this},i.prototype.isDisposedTickMarkerX=function(){return this.tp},i.prototype.disposeTickMarkerY=function(){return this.$w.forEach((function(t){return t.disposeMarker()})),this.ip=!0,this},i.prototype.restoreTickMarkerY=function(){return this.$w.forEach((function(t){return t.restoreMarker()})),this.ip=!1,this},i.prototype.isDisposedTickMarkerY=function(){return this.ip},i.prototype.setTickMarkerX=function(t){return this.Qw.forEach((function(i){return i.setMarker(t)})),this.Ew=this.Ew.addStyler(t),this.wf.xn(),this},i.prototype.setTickMarkerY=function(t){return this.$w.forEach((function(i){return i.setMarker(t)})),this.Nw=this.Nw.addStyler(t),this.wf.xn(),this},i.prototype.setTickMarkerXAutoTextStyle=function(t){return this.qw=t,this.wf.xn(),this},i.prototype.getTickMarkerXAutoTextStyle=function(){return this.qw},i.prototype.setTickMarkerYAutoTextStyle=function(t){return this.Jw=t,this.wf.xn(),this},i.prototype.getTickMarkerYAutoTextStyle=function(){return this.Jw},i}(EG),OH=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,s)||this;return o.jb=i,o.Wb=n,o.Ew=e,o.Nw=r,o.Qb=s,o}return n(i,t),i}(VG),PH=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.tg=function(t,i,e,r){return n.$b(new IH(t,i,e,n.jb,n.Wb,n.Ew,n.Nw,r))},n.addStyler=function(t){return new i(n.jb,n.Wb,n.Ew,n.Nw,n.Qb.map((function(t){return t})).concat(t))},n.setPointMarker=function(t){return new i(t,n.Wb,n.Ew,n.Nw,n.Qb.map((function(t){return t})))},n.setResultTableBackground=function(t){return new i(n.jb,t,n.Ew,n.Nw,n.Qb.map((function(t){return t})))},n}return n(i,t),i}(OH),DH=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.ig=function(t,i,e,r,s){return n.$b(new LH(t,i,e,r,n.jb,n.Wb,n.Ew,n.Nw,s))},n.addStyler=function(t){return new i(n.jb,n.Wb,n.Ew,n.Nw,n.Qb.map((function(t){return t})).concat(t))},n.setPointMarker=function(t){return new i(t,n.Wb,n.Ew,n.Nw,n.Qb.map((function(t){return t})))},n.setResultTableBackground=function(t){return new i(n.jb,t,n.Ew,n.Nw,n.Qb.map((function(t){return t})))},n}return n(i,t),i}(OH),_H=WG,RH=new PH(pN,pN,eV.PointableTextBox,eV.PointableTextBox,[function(t){jG(t)}]),zH=new DH(xN,pN,eV.PointableTextBox,eV.PointableTextBox,[_H]),EH=function(i,n,e){switch(i){case t.UIVisibilityModes.always:return!0;case t.UIVisibilityModes.never:return!1;case t.UIVisibilityModes.whenDragged:return e;case t.UIVisibilityModes.whenHovered:return n&&!e;case t.UIVisibilityModes.whenHoveredOrDragged:return e||n;case t.UIVisibilityModes.whenNotDragged:return!e;default:return!1}},NH=function(t,i){return Math.min(Math.max(t,i.getInnerStart()),i.getInnerEnd())},VH=function(){function i(i,n,e,r,s,o){var h=this;this.wf=i,this.renderingScale=n,this.scale=e,this.Dg=r,this.rp=s,this.sp=o,this.op=t.UIVisibilityModes.always,this.hp=t.UIVisibilityModes.always,this.lo=!0,this.up=!1,this.ap=!1,this.th=l(0,0),this.pf=t.UIDraggingModes.draggable,this.kf=void 0,this.an=new qe,this.fp=function(i,n,e){h.up=!0,h.wf.xn();var r=h.pf===t.UIDraggingModes.notDraggable?h.pf:e||h.pf;h.kf=h.wf.oo.Qr(r===t.UIDraggingModes.notDraggable?t.MouseStyles.Restricted:r===t.UIDraggingModes.draggable?t.MouseStyles.Move:r===t.UIDraggingModes.onlyHorizontal?t.MouseStyles.Horizontal:t.MouseStyles.Vertical)},this.cp=function(){h.up=!1,h.wf.xn(),h.wf.oo.ts(h.kf)},this.lp=function(t,i){h.ap=!0,ss(i),h.wf.xn()},this.dp=function(i,n){if(h.pf!==t.UIDraggingModes.notDraggable){var e=n||h.pf,r=sr(h.wf.oo.ds(i.x,i.y),h.wf.oo.Rt,h.scale),s=l(e!==t.UIDraggingModes.onlyVertical?NH(r.x,h.scale.x):h.th.x,e!==t.UIDraggingModes.onlyHorizontal?NH(r.y,h.scale.y):h.th.y);return h.setPosition(s),!0}return!1},this.vp=function(t,i){h.ap=!1,ss(i),h.wf.xn()};var u=r.getPointMarker().setMouseInteractions(!0);u.onMouseEnter(this.fp),u.onMouseLeave(this.cp),u.onMouseDragStart(this.lp),u.onMouseDrag((function(t,i){return h.dp(l(i.clientX,i.clientY))&&ss(i)})),u.onMouseDragStop(this.vp),u.onTouchStart(this.lp),u.onTouchMove((function(t,i){return h.dp(l(i.clientX,i.clientY))&&ss(i)})),u.onTouchEnd(this.vp),r.getResultTable().setMouseInteractions(!0),this.setPosition(this.th)}return i.prototype.setPosition=function(t){return this.th=t,this.Dg.setPosition(t),this.an.emit("positionChange",this,this.th),this},i.prototype.getPosition=function(){return this.th},i.prototype.onPositionChange=function(t){return this.an.on("positionChange",t)},i.prototype.offPositionChange=function(t){return this.an.off(t,"positionChange")},i.prototype.setPointMarkerVisibility=function(t){return this.op=t,this.wf.xn(),this},i.prototype.getPointMarkerVisibility=function(){return this.op},i.prototype.setResultTableVisibility=function(t){return this.hp=t,this.wf.xn(),this},i.prototype.getResultTableVisibility=function(){return this.hp},i.prototype.setMouseInteractions=function(t){return this.lo=t,this.Dg.getPointMarker().setMouseInteractions(t),this.Dg.getResultTable().setMouseInteractions(t),this},i.prototype.getMouseInteractions=function(){return this.lo},i.prototype.setAutoFitStrategy=function(t){return this.Dg.setAutoFitStrategy(t),this},i.prototype.getAutoFitStrategy=function(){return this.Dg.getAutoFitStrategy()},i.prototype.isAttached=function(){return!0},i.prototype.Tf=function(){var t=this.isAttached();return EH(this.op,this.up,this.ap)?this.Dg.restorePointMarker():this.Dg.disposePointMarker(),t&&EH(this.hp,this.up,this.ap)?this.Dg.restoreResultTable():this.Dg.disposeResultTable(),this.Dg.Tf(),this},i.prototype.Fe=function(){return this.Dg.Fe(),this},i.prototype.pointAt=function(t){return this.Dg.pointAt(t),this},i.prototype.dispose=function(){return this.rp(this),this.Dg.dispose(),this},i.prototype.restore=function(){return this.sp(this),this.Dg.restore(),this},i.prototype.isDisposed=function(){return this.Dg.isDisposed()},i.prototype.setPointMarker=function(t){return this.Dg.setPointMarker(t),this},i.prototype.getPointMarker=function(){return this.Dg.getPointMarker()},i.prototype.setResultTable=function(t){return this.Dg.setResultTable(t),this},i.prototype.getResultTable=function(){return this.Dg.getResultTable()},i.prototype.setDraggingMode=function(i){return void 0===i&&(i=t.UIDraggingModes.notDraggable),this.pf=i,this.wf.xn(),this},i.prototype.getDraggingMode=function(){return this.pf},i}(),GH=function(t){function i(i,n,e,r,s,o,h){var u=t.call(this,i,n,e,r.ig(i,n,e,h),s,o)||this;return u.wf=i,u.rp=s,u.sp=o,u.vn=h,u}return n(i,t),i}(VH),HH=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i}(function(i){function e(n,e,r,s,o,h,u,a){var f=i.call(this,n,e,aV(r.Rt,s.Rt),o.ig(n,e,r,s,a),h,u)||this;f.wf=n,f.axisX=r,f.axisY=s,f.rp=h,f.sp=u,f.yp=t.UIVisibilityModes.always,f.Sp=t.UIVisibilityModes.always,f.mp=t.UIVisibilityModes.always,f.bp=t.UIVisibilityModes.always,f.gridStrokeStyleX=f.Dg.getGridStrokeXStyle(),f.gridStrokeStyleY=f.Dg.getGridStrokeYStyle(),f.vn=a;var c=f.Dg.getTickMarkerX().setMouseInteractions(!0);c.onMouseEnter((function(i,n){return f.fp(i,n,t.UIDraggingModes.onlyHorizontal)})),c.onMouseLeave(f.cp),c.onMouseDragStart(f.lp),c.onMouseDrag((function(i,n){return f.dp(l(n.clientX,n.clientY),t.UIDraggingModes.onlyHorizontal)&&ss(n)})),c.onMouseDragStop(f.vp),c.onTouchStart(f.lp),c.onTouchMove((function(i,n){return f.dp(l(n.clientX,n.clientY),t.UIDraggingModes.onlyHorizontal)&&ss(n)}));var d=f.Dg.getTickMarkerY().setMouseInteractions(!0);return d.onMouseEnter((function(i,n){return f.fp(i,n,t.UIDraggingModes.onlyVertical)})),d.onMouseLeave(f.cp),d.onMouseDragStart(f.lp),d.onMouseDrag((function(i,n){return f.dp(l(n.clientX,n.clientY),t.UIDraggingModes.onlyVertical)&&ss(n)})),d.onMouseDragStop(f.vp),d.onTouchStart(f.lp),d.onTouchMove((function(i,n){return f.dp(l(n.clientX,n.clientY),t.UIDraggingModes.onlyVertical)&&ss(n)})),a.pointMarkerTextFillStyle&&(d.setTextFillStyle(a.pointMarkerTextFillStyle),c.setTextFillStyle(a.pointMarkerTextFillStyle)),f}return n(e,i),e.prototype.Tf=function(){var t=this.isAttached();return!this.isDisposed()&&t&&EH(this.mp,this.up,this.ap)?this.Dg.restoreTickMarkerX():this.Dg.disposeTickMarkerX(),!this.isDisposed()&&t&&EH(this.bp,this.up,this.ap)?this.Dg.restoreTickMarkerY():this.Dg.disposeTickMarkerY(),this.Dg.setGridStrokeXStyle(!this.isDisposed()&&t&&EH(this.yp,this.up,this.ap)?this.gridStrokeStyleX:ir),this.Dg.setGridStrokeYStyle(!this.isDisposed()&&t&&EH(this.Sp,this.up,this.ap)?this.gridStrokeStyleY:ir),i.prototype.Tf.call(this)},e.prototype.setGridStrokeXVisibility=function(t){return this.yp=t,this.wf.xn(),this},e.prototype.getGridStrokeXVisibility=function(){return this.yp},e.prototype.setGridStrokeYVisibility=function(t){return this.Sp=t,this.wf.xn(),this},e.prototype.getGridStrokeYVisibility=function(){return this.Sp},e.prototype.setTickMarkerXVisibility=function(t){return this.mp=t,this.wf.xn(),this},e.prototype.getTickMarkerXVisibility=function(){return this.mp},e.prototype.setTickMarkerYVisibility=function(t){return this.bp=t,this.wf.xn(),this},e.prototype.getTickMarkerYVisibility=function(){return this.bp},e.prototype.setGridStrokeXCut=function(t){return this.Dg.setGridStrokeXCut(t),this},e.prototype.getGridStrokeXCut=function(){return this.Dg.getGridStrokeXCut()},e.prototype.setGridStrokeYCut=function(t){return this.Dg.setGridStrokeYCut(t),this},e.prototype.getGridStrokeYCut=function(){return this.Dg.getGridStrokeYCut()},e.prototype.setGridStrokeXStyle=function(t){return this.gridStrokeStyleX=t instanceof $e?t:t(this.gridStrokeStyleX),this},e.prototype.getGridStrokeXStyle=function(){return this.Dg.getGridStrokeXStyle()},e.prototype.setGridStrokeYStyle=function(t){return this.gridStrokeStyleY=t instanceof $e?t:t(this.gridStrokeStyleY),this},e.prototype.getGridStrokeYStyle=function(){return this.Dg.getGridStrokeYStyle()},e.prototype.setTickMarkerX=function(t){return this.Dg.setTickMarkerX(t),this},e.prototype.getTickMarkerX=function(){return this.Dg.getTickMarkerX()},e.prototype.setTickMarkerY=function(t){return this.Dg.setTickMarkerY(t),this},e.prototype.getTickMarkerY=function(){return this.Dg.getTickMarkerY()},e.prototype.setMouseInteractions=function(t){return i.prototype.setMouseInteractions.call(this,t),this.Dg.getTickMarkerX().setMouseInteractions(t),this.Dg.getTickMarkerY().setMouseInteractions(t),this},e}(VH)),jH=function(t){function i(i,n,e,r,s,o,h){var u=t.call(this,i,n,e.axisX,e.axisY,r,s,o,h)||this;return u.wf=i,u.owningSeries=e,u.rp=s,u.sp=o,u.gp=!1,u.vn=h,u}return n(i,t),i.prototype.setPosition=function(i){return t.prototype.setPosition.call(this,i),this.gp=!1,this.wf.xn(),this},i.prototype.Fe=function(){if(!this.gp){var i=this.owningSeries.solveNearestFromScreen(sr(this.th,this.scale,this.wf.oo.Rt));i?(this.th=sr(i.location,this.owningSeries.scale,this.scale),this.Dg.pointAt(i),this.gp=!0):this.Dg.setPosition(this.th)}return t.prototype.Fe.call(this)},i.prototype.isAttached=function(){return this.gp},i}(HH),WH=function(t){function i(i,n,e,r,s,o,h,u,a,f){var c=t.call(this,i,n,e,f)||this;return c.chart=i,c.wf=r,c.axisX=s,c.axisY=o,c.axisXAttachHandler=h,c.axisYAttachHandler=u,c.qv=a,c.wp=[],c.addMarker=function(t){void 0===t&&(t=zH);var i=new jH(c.qv(),c.vr.uiScale,c,t,c.removeMarker,c.restoreMarker,c.vn);return c.wp.push(i),i},c.removeMarker=function(t){var i=c.wp.indexOf(t);-1!==i&&c.wp.splice(i,1)},c.restoreMarker=function(t){c.wp.includes(t)||c.wp.push(t)},c.vn=f,c.scale=aV(s.Rt,o.Rt),c.pp(c.scale),c.attacheAxis(),c}return n(i,t),i.prototype.attacheAxis=function(){this.kp=this.axisXAttachHandler(this),this.xp=this.axisYAttachHandler(this)},i.prototype.Tf=function(){t.prototype.Tf.call(this);for(var i=0;i0){var h=t.slice(s,o);s+=o,e(h,!0)}}for(;s0){var i=this.aa[this.aa.length-1];this.Tp={x:i.x,y:i.y}}return this},e.prototype.addArrayX=function(t,i,n){void 0===i&&(i=1);var e=n;return e||(e=this.Tp?this.Tp.y+i:0),this.add(function(t,i,n){void 0===i&&(i=1);for(var e=void 0!==n?n:0,r=new Array(t.length),s=0;s0?t:0,this.wf.xn(),this},e.prototype.getMaxPointCount=function(){return this.Fp>0?this.Fp:void 0},e.prototype.getPointAmount=function(){return this.ic.reduce((function(t,i){return t+i.tu()+i.iu()}),this.aa.length)},e.prototype.clear=function(){this._S=void 0;for(var t=0;t0},e.prototype.getXMax=function(){return this.Ap.getXMax(this.ic,this._S)||0},e.prototype.getXMin=function(){return this.Ap.getXMin(this.ic,this._S)||0},e.prototype.getYMax=function(){return this.Ap.getYMax(this.ic,this._S)||0},e.prototype.getYMin=function(){return this.Ap.getYMin(this.ic,this._S)||0},e.prototype.eS=function(){var t,i,n=l(0,0);try{for(var e=o(this.ic),r=e.next();!r.done;r=e.next()){var s=r.value;n.x=Math.max(n.x,s.cu()),n.y=Math.max(n.y,s.lu())}}catch(i){t={error:i}}finally{try{r&&!r.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}return n},e.prototype.Cp=function(t,i,n,e){this.Ap.Cp(t,i,n,e,this.scale)},e.prototype.CS=function(){i.prototype.CS.call(this);var t=this.ic.length;this.Bp&&this.Cp(this.ic,this.getPointAmount(),this.Bp,this.Fp),t!==this.ic.length&&this.Mp()},e.prototype.Tf=function(){var t,n;i.prototype.Tf.call(this);var e=this.getBoundaries();this.aa.length>0&&(this.DS(this.aa),this.aa=[]);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.Eo(e)}}catch(i){t={error:i}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return i.prototype.Tf.call(this)},e.prototype.BS=function(){this._S=void 0,this.aa.length=0},e.prototype.PS=function(t){0!==t.length&&(this._S?this._S=Js(this._S,Ks(t)):this._S=Ks(t),this.an.emit("dataAdd",this,t,this._S),this.aa=ps(this.aa,t,{canReturnB:!1}),this.wf.xn())},e.prototype.Lp=function(){return YH(this.ic)},e.prototype.Ip=function(t){return this.an.on("dataAdd",t)},e.prototype.Op=function(t){return this.an.off(t)},e.prototype.Pp=function(t){return this.an.on("dataClear",t)},e.prototype.Dp=function(t){return this.an.off(t)},e}(WH),qH=function(t,i,n,e){for(var r,s,o=Number.MAX_VALUE,h=0;h=0&&h._p.splice(i,1),h.wf.xn()},h.zp=function(t){h._p.indexOf(t)<0&&h._p.push(t),h.wf.xn()};var u=h.vr.getSeries().length;return h.Ho=new c(Fs(h.vn.mountainsFillStyle,u)),h.Zo=new c(Fs(h.vn.mountainsStrokeStyle,u)),h}return n(i,t),i.prototype.addPolygon=function(){var t=new CH(this.vr,this.Rp,this.zp,this,this.Ep());return this._p.push(t),t},i.prototype.setFillStyle=function(t){var i,n;this.Ho.C(t);var e=this.Ho.D(this.Bf);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.$n(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return this.wf.xn(),this},i.prototype.getFillStyle=function(){return this.Ho.L()},i.prototype.setFillStyleHighlight=function(t){var i,n;if(this.Ho.I(t),this.getHighlighted()){var e=this.Ho.D(!0);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.$n(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}return this.wf.xn(),this},i.prototype.getFillStyleHighlight=function(){return this.Ho.D(!0)},i.prototype.setStrokeStyle=function(t){var i,n;this.Zo.C(t);var e=this.Zo.D(this.Bf);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.Ys(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return this.wf.xn(),this},i.prototype.getStrokeStyle=function(){return this.Zo.L()},i.prototype.setStrokeStyleHighlight=function(t){var i,n;if(this.Zo.I(t),this.getHighlighted()){var e=this.Zo.D(!0);try{for(var r=o(this.ic),s=r.next();!s.done;s=r.next()){s.value.Ys(e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}return this.wf.xn(),this},i.prototype.getStrokeStyleHighlight=function(){return this.Zo.D(!0)},i.prototype.He=function(){return this.MS&&void 0!==this._p.find((function(t){return void 0!==t.Np}))},i.prototype.Tf=function(){var t=this;this._p.forEach((function(i){(i.Rw||t.scale.Bw())&&i.Vp&&(i._h.au(pH(i.Vp,t.scale)),i.Rw=!1,i._h.Fe())}))},i.prototype.CS=function(){t.prototype.CS.call(this);var i=b(Is,Os);this._p.forEach((function(t){if(t.zw){var n=!t.Rw&&t.Vp?t.Vp:xH(t.zw);t.Vp=n;var e=!t.Rw&&t.Np?t.Np:kH(n);t.Np=e,i.min=Math.min(i.min,e.min),i.max=Math.max(i.max,e.max)}})),this.xw=i},i.prototype.Ac=function(t,i){t.$n(this.Ho.D(i)).Ys(this.Zo.D(i)),this.wf.xn()},i.prototype.solveNearestFromScreen=function(t){var i=this,n=qH(t,this.ic,(function(t,n){var e=t.Pw(n);if(e)return sr(e,i.scale,t.oo.Rt)}),Hs);if(n){var e=sr(n[0],n[1].oo.Rt,this.scale),r=this.Gp(n[1]);if(r){var s=MH(e,this.scale),o=s.angle,h=s.amplitude;return{location:e,scale:this.scale,resultTableContent:this.Mg(new _G,this,o,h,this.vr.getAmplitudeAxis().formatValue).Xf(),series:this,fillStyle:this.Ho.L(),polarPolygon:r}}}},i.prototype.solveNearestFromSegment=function(t,i){var n=this.Gp(i);if(n){var e=i.Pw(t);if(e){var r=MH(e,this.scale),s=r.angle,o=r.amplitude;return{location:e,scale:this.scale,resultTableContent:this.Mg(new _G,this,s,o,this.vr.getAmplitudeAxis().formatValue).Xf(),series:this,fillStyle:this.Ho.L(),polarPolygon:n}}}},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),t.prototype.attach.call(this,i,n),ks(i,this.vn,{fill:this.Ho,stroke:this.Zo}),this},i.prototype.Ep=function(){return this.Cc(this.wf.Rc(this.scale,CE.Simple).$n(this.Ho.D(this.Bf)).Ys(this.Zo.D(this.Bf)))},i.prototype.Gp=function(t){return this._p.find((function(i){return i._h===t}))},i}(gH),QH=function(t){function i(i,n,e,r,s,o){var h=t.call(this,i,n,e,r,s,o)||this;h.Mt="Area Series",h.Mw=[],h.Aw=!1,h.Fw=!1,h.Hp=!1;var u=h.vr.getSeries().length;return h.Ho=new c(Ts(h.vn.polarAreaSeriesFillStyle,u,h.vn.mountainsFillStyle)),h.Zo=new c(Ts(h.vn.polarAreaSeriesStrokeStyle,u,h.vn.mountainsStrokeStyle)),h}return n(i,t),i.prototype.setData=function(t){var i=function(t){for(var i,n,e=[],r=!1,s=0;s0},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),t.prototype.attach.call(this,i,n),ks(i,this.vn,{fill:this.Ho,stroke:this.Zo}),this},i}(gH),$H=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.jp=i.Cc(i.wf.Rc(i.scale,CE.Simple)),i}return n(i,t),i.prototype.Tf=function(){if(this.Aw||this.scale.Bw()){var t=this.Mw,i=!0===this.Fw?pH(t.concat(function(t){if(0===t.length)return t;var i=t[0],n=t[t.length-1];if(Br(i.angle,n.angle))return t;for(var e=1*Math.sign(n.angle-i.angle),r=0,s=[],o=n.angle+e;!Br(o%360,i.angle%360);o+=e)if(s.push({angle:o,amplitude:0}),(r+=1)>360)return[];for(var h=0;h=this.Wp.start},i.prototype.cw=function(t){this.Yp=t,this.Jp=!0},i.prototype.dw=function(){return!1===this.Yp},i.prototype.lw=function(t){this.Xp=t,this.Jp=!0},i.prototype.uw=function(){return this.Xp},i.prototype.Ei=function(){return!1},i.prototype.Pt=function(t,i,n,e){return this.x=new zo(t.x,i.x,n.x,e?e.x:void 0),this.y=new zo(t.y,i.y,n.y,e?e.y:void 0),this},i.prototype.Oi=function(){return this.Ai},i.prototype.Bw=function(){return this.qp},i.prototype.tk=function(){return this.Jp},i.prototype.Qi=function(){return this.Ii},i.prototype.tn=function(){return this.Qp},i.prototype.bi=function(){return this.t=!1,this.Ii=!1,this.qp=!1,this.Jp=!1,this},i.prototype.gi=function(){return this.t=!0,this.Ii=!0,this.qp=!0,this.Jp=!0,this},i.prototype.oi=function(t,i){return"object"==typeof t?(this.hi.x=t.x,this.hi.y=t.y):(this.hi.x=t,this.hi.y=i),this.$p(),this},i.prototype.Zi=function(t){return this.Zp=t,this.$p(),this},i.prototype.Ki=function(t){return this.Kp=t,this.$p(),this},i.prototype.di=function(){return l(this.Zp[0]+this.Zp[1],this.Kp[0]+this.Kp[1])},i.prototype.vi=function(){return this.hi},i.prototype.$p=function(){var t=this.Wp,i=l(this.x.yi(this.hi.x),this.y.yi(this.hi.y)),n=this.Zp[0]+this.Zp[1],e=this.Kp[0]+this.Kp[1],r=Math.max(i.x-n,0),s=Math.max(i.y-e,0),o=.5*(r>s?s:r),h=[this.Zp[0]+Math.max((r-2*o)/2,0),this.Zp[1]+Math.max((r-2*o)/2,0)],u=[this.Kp[0]+Math.max((s-2*o)/2,0),this.Kp[1]+Math.max((s-2*o)/2,0)],a=Math.abs(t.end-t.start);this.x.oi(this.hi.x).ai(h).xi(-a,a),this.y.oi(this.hi.y).ai(u).xi(-a,a),this.Qp={x:this.x.getPixelSize(),y:this.y.getPixelSize()},this.Ai={x:this.x.Oi(),y:this.y.Oi()},this.gi()},i.prototype.Li=function(t,i){var n=this.tn();return{x:t.x+i.x*n.x,y:t.y+i.y*n.y}},i.prototype.nn=function(t,i,n,e){var r=this.tn(),s=ho(t,i);return s.x*=e,s.y*=e,{x:t.x+n*r.x*s.x,y:t.y+n*r.y*s.y}},i}(No),ij=function(i){function e(n,e,r,s,o,h,u){var a=i.call(this,n,e,r,e.qs(oH.bg),e.qs(oH.ui),s,u,h?h.theme:void 0)||this;a.ng=t.AutoCursorModes.snapToClosest,a.dd=[],a.Mn=!0,a.lo=!0,a.ik=function(t,i,n,e,r){a.Yg.oi(e,r)},a.Sd=ds(a.dd),a.md=vs(a.dd),a.nk=function(){return a.ZS},a.ek=e.qs(oH.gridLines),a.rk=e.qs(oH.series),a.sk=e.qs(oH.axisLines),a.hk=e.qs(oH.axisTicks),a.Yg=r.d2({scaleXYConstructor:tj}),a.onResize(a.ik),a.hy.Jn("Polar Chart");var f=Rr(h?h.autoCursorBuilder:void 0,YG);return a.og=f.tg(a.Rf,a.uiScale,a.uiScale,a.vn),a.hg=i.prototype.sg.call(a,a._f.Gc(a.Yg).$n(a.vn.seriesBackgroundFillStyle).Ys(a.vn.seriesBackgroundStrokeStyle)).Zu(0).Ku(360).$u(0),h&&!0===h.disableAnimations&&a.setAnimationsEnabled(!1),a.oy(o,a.pixelScale),a.uk=new cH(a,a.Yg,a.vn,!(!h||!0!==h.disableAnimations),a.ek,a.sk,a.hk,a.nk),a.ak=new dH(a,a.Yg,a.vn,!(!h||!0!==h.disableAnimations),a.ek,a.sk,a.hk),a}return n(e,i),e.prototype.addLineSeries=function(){var t=new AH(this.rk,this,this.JS,this.QS,this.Yg,this.vn);return this.im(t),t},e.prototype.addPointSeries=function(){var t=new TH(this.rk,this,this.JS,this.QS,this.Yg,this.vn);return this.im(t),t},e.prototype.addPointLineSeries=function(){var t=new FH(this.rk,this,this.JS,this.QS,this.Yg,this.vn);return this.im(t),t},e.prototype.addAreaSeries=function(){var t=new $H(this.rk,this,this.JS,this.QS,this.Yg,this.vn);return this.im(t),t},e.prototype.addPolygonSeries=function(){var t=new JH(this.rk,this,this.JS,this.QS,this.Yg,this.vn);return this.im(t),t},e.prototype.getSeries=function(){return this.ZS},e.prototype.addSector=function(){var t=new SH(this.rk,this,this.Sd,this.md,this.Yg,this.vn);return this.md(t),t},e.prototype.getAmplitudeAxis=function(){return this.uk},e.prototype.getRadialAxis=function(){return this.ak},e.prototype.Tf=function(){var t,n,e,r,s,h,u,a,f,c;i.prototype.Tf.call(this);try{for(var l=o(this.ZS),d=l.next();!d.done;d=l.next()){d.value.CS()}}catch(i){t={error:i}}finally{try{d&&!d.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}this.uk.Xe(),this.ak.Xe();try{for(var v=o(this.ZS),y=v.next();!y.done;y=v.next()){y.value.Tf()}}catch(t){e={error:t}}finally{try{y&&!y.done&&(r=v.return)&&r.call(v)}finally{if(e)throw e.error}}for(var S=1;S<=2;S+=1){var m=this.uk.Tf(),b=this.ak.Tf(),g=this.yy(),w=[this.hh.left+b,this.hh.right+b],p=[this.hh.bottom+b,this.hh.top+b+g];this.Yg.Zi(w).Ki(p);if(!(!this.fk||Math.abs(this.fk.amplitude-m)>=4||Math.abs(this.fk.radial-b)>=4)||1!==S){this.fk={amplitude:m,radial:b};break}}var k=this.Yg.ew().start,x=this.Yg.ew().end;this.hg.qu(this.Yg.nw()?((null===(f=this.fk)||void 0===f?void 0:f.radial)||0)*this.Yg.x.getPixelSize()+x-k:((null===(c=this.fk)||void 0===c?void 0:c.radial)||0)*this.Yg.x.getPixelSize()+k-x).ta(360);try{for(var M=o(this.dd),A=M.next();!A.done;A=M.next()){A.value.Tf()}}catch(t){s={error:t}}finally{try{A&&!A.done&&(h=M.return)&&h.call(M)}finally{if(s)throw s.error}}this.ug();try{for(var F=o(this.ZS),T=F.next();!T.done;T=F.next()){T.value.BS()}}catch(t){u={error:t}}finally{try{T&&!T.done&&(a=F.return)&&a.call(F)}finally{if(u)throw u.error}}return i.prototype.sy.call(this),this.le(),this},e.prototype.setAnimationsEnabled=function(t){return this.Mn=!!t,this.uk.setAnimationsEnabled(t),this.ak.setAnimationsEnabled(t),this},e.prototype.getAnimationsEnabled=function(){return this.Mn},e.prototype.disableAnimations=function(){return this.setAnimationsEnabled(!1),this},e.prototype.setMouseInteractions=function(t){return this.lo=t,this},e.prototype.getMouseInteractions=function(){return this.lo},e.prototype.getMinimumSize=function(){return l(nj,nj)},e.prototype.le=function(){},e.prototype.forEachAxis=function(t){t(this.uk),t(this.ak)},e.prototype.dispose=function(){return this.ek.ro(),this.rk.ro(),this.sk.ro(),this.hk.ro(),i.prototype.dispose.call(this)},e.prototype.Fl=function(){return u(u([],h(this.ZS)),h(this.dd))},e}(rH),nj=300;!function(t){t[t.bg=0]="bg",t[t.gridLines=1]="gridLines",t[t.series=2]="series",t[t.axisLines=3]="axisLines",t[t.axisTicks=4]="axisTicks",t[t.ui=5]="ui"}(oH||(oH={}));var ej,rj,sj=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i}(pV),oj=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,r,o,h,u)||this;return a.vr=r,a.scale=s,a.Jf=o,a.Qf=h,a.Mt="Slice",a.u=0,a.by=!1,a.ck=Re,a.wy=Re,a.py=a.u,a.xy=!1,a.My=th((function(){return a.vr.engine.xn()})),a.Fy=function(){a.Ty=void 0},a.index=i,a.jp=a.Cc(n.Rc(s,CE.Convex)),a.sr=a.Cc(e.$e(s)),a}return n(i,t),i.prototype.setValue=function(t){return this.vr.getAnimationsEnabled()?this.xy||this.Iy(this.py,t):this.py=t,this.u=t,this.vr.engine.xn(),this},i.prototype.getValue=function(){return this.u},i.prototype.dispose=function(){var i=this;return this.vr.getAnimationsEnabled()&&this.py>0?(this.Ty&&(this.Ty.finish(!1),this.Ty=void 0),this.Iy(this.py,0,(function(){return t.prototype.dispose.call(i)}))):t.prototype.dispose.call(this),this.xy=!0,this},i.prototype.restore=function(){return this.vr.getAnimationsEnabled()&&(this.Ty&&(this.Ty.finish(!1),this.Ty=void 0),this.Iy(this.py,this.u)),t.prototype.restore.call(this),this.xy=!1,this},i.prototype.Iy=function(t,i,n){var e=this;this.Ty=this.My(300,Qo.ease)([[t,i]],(function(t){var i=h(t,1)[0];e.py=i,e.vr.engine.xn()})),this.Ty.onEveryAnimationEnd(this.Fy),n&&this.Ty.onAnimationEnd(n)},i.prototype.setStyle=function(t,i,n,e){this.ck=t,this.wy=n,this.jp.$n(this.Bf?this.ck.getDefaultHighlightStyle():this.ck).Ys(i),this.sr.$n(this.Bf?this.wy.getDefaultHighlightStyle():this.wy).ie(e);for(var r=0;r=100?100:t)/100)},aj=function(i,n,e,r,s,o,h,u){void 0===o&&(o=0),void 0===h&&(h=t.FunnelSliceModes.VariableHeight),n=uj(n,r.x),e=uj(e,r.x);var a,f=i.length,c=0;a=i.reduce((function(t,i){return t+i.getAnimatedValue()}),0);var l={x:u-n/2,y:r.y+s.bottom},d={x:u+n/2,y:r.y+s.bottom},v={x:0,y:s.bottom},y={x:0,y:s.bottom},S=0,m=0;if(o)for(var b=0;b0&&(l={x:v.x+w*o,y:v.y-o},d={x:y.x-w*o,y:y.y-o}),v={x:u-(k=(n+c/a*(e-n))/2),y:parseInt(""+(h===t.FunnelSliceModes.VariableWidth?l.y-x:x),10)},y={x:u+k,y:parseInt(""+(h===t.FunnelSliceModes.VariableWidth?d.y-x:x),10)},d.x>=l.x&&y.x>v.x&&p.jp.au([v,l,d,y])}},fj=function(i){function e(n,e,r,s,o,h,u,a){var f=i.call(this,n,e,r,e.qs(rj.bg),e.qs(rj.ui),s,h,u)||this;return f.Oy=[],f.Py=gV.None,f.Ry=!0,f.Ny=0,f.lk=80,f.dk=20,f.vk=0,f.yk=t.FunnelSliceModes.VariableHeight,f.Mn=!0,f.Hy=function(t){var i=f.Oy.indexOf(t);i>=0&&(f.Oy.splice(i,1),f.jy())},f.Wy=function(t){f.Oy.indexOf(t)<0&&(f.Oy.push(t),f.jy(),t.setHighlightOnHover(f.Ry))},f.Uy=e.qs(rj.bottom),f.Yy=e.qs(rj.top),f.hy.Jn("Funnel Chart"),f.Dy=f.vn.sliceChartStackedFillStylePalette,f._y=f.vn.sliceChartStrokeStyle,f.zy=f.vn.sliceLabelFont,f.Ey=f.vn.sliceLabelFillStyle,a&&f.setAnimationsEnabled(!1),f.oy(o,f.pixelScale),f}return n(e,i),e.prototype.addSlice=function(t,i){var n=new oj(this.Ny,this.Uy,this.Yy,this,this.pixelScale,this.Hy,this.Wy,this.vn);return this.Ny+=1,n.setName(t),n.setValue(i),this.Oy.push(n),this.engine.xn(),n.setHighlightOnHover(this.Ry),n},e.prototype.addSlices=function(t){for(var i=[],n=0;n0})),h=0;for(r=0;r0?u/a:0));for(r=0;r0){var s=(r[1].y-r[0].y)/2+r[0].y;return{x:n===t.FunnelLabelSide.Left?(r[0].x-r[1].x)/2+r[1].x-e:(r[2].x-(4===r.length?r[3].x:r[1].x))/2+(4===r.length?r[3].x:r[1].x)+e,y:s}}},lj=function(t){var i=t.fu();if(i.length>0)return{x:(i[2].x-i[1].x)/2+i[1].x,y:(i[1].y-i[0].y)/2+i[0].y}},dj=function(i){function e(){var n=null!==i&&i.apply(this,arguments)||this;return n.Zy=wV.NamePlusValue,n.qy=10,n.Sk=t.FunnelLabelSide.Left,n.mk=t.SliceLabelIndices.LabelsOnSides,n.Qy=[],n.$y=n.vn.sliceLabelConnectorStyle,n}return n(e,i),e.prototype.setLabelConnectorStyle=function(t){this.$y=t;for(var i=0;i=0&&f.Oy.splice(i,1)},f.Wy=function(t){f.Oy.indexOf(t)<0&&f.Oy.push(t)},f.wf=e.qs(t.LayerIndices.bottom),f.Yy=e.qs(t.LayerIndices.top),f.hy.Jn("Gauge Chart"),f.oy(o,f.pixelScale);var c=WE();return f.onBackgroundTouchStart(c.onTouchStart),f.onBackgroundTouchMove(c.onTouchMove),f.onBackgroundTouchEnd(c.onTouchEnd),a&&f.setAnimationsEnabled(!1),f}return n(e,i),e.prototype.setAnimationsEnabled=function(t){return this.Mn=t,this},e.prototype.getAnimationsEnabled=function(){return this.Mn},e.prototype.disableAnimations=function(){return this.setAnimationsEnabled(!1),this},e.prototype.dispose=function(){return this.wf.ro(),this.Yy.ro(),i.prototype.dispose.call(this)},e}(mV),mj=function(i){function e(n,e,r,s,o,h,u,a){var f=i.call(this,n,e,r,s,o,h,u,a)||this;f.Eu=90,f.Nu=-270,f.wk={min:f.Eu,max:f.Nu},f.pk=th((function(){return f.wf.xn()})),f.kk=function(){f.xk=void 0};var c=e.qs(t.LayerIndices.bottom);return e.qs(t.LayerIndices.top),f.Mk=c.Gc(f.pixelScale).$n(f.vn.gaugeBackgroundFillStyle).Ys(f.vn.gaugeBackgroundStrokeStyle),f}return n(e,i),e.prototype.setAngleInterval=function(t,i){t===i?i-=360:Math.abs(i-t)>360&&(i-=(i-t)%360);var n=this.Eu,e=this.Nu,r=this.wk;return this.getAnimationsEnabled()?this.Ak(r,{min:t,max:i}):(r.min=t,r.max=i,this.Eu=t,this.Nu=i),this.an.emit("angleIntervalChange",this,{min:n,max:e},{min:t,max:i}),this.engine.xn(),this},e.prototype.getAngleInterval=function(){return{min:this.Eu,max:this.Nu}},e.prototype.setGaugeFillStyle=function(t){return this.Mk.$n(t),this.engine.xn(),this},e.prototype.setGaugeStrokeStyle=function(t){return this.Mk.Ys(t),this.engine.xn(),this},e.prototype.Ak=function(t,i,n){var e=this;this.xk=this.pk(1e3,Qo.ease)([[t.min,i.min],[t.max,i.max]],(function(t){var i=h(t,2),n=i[0],r=i[1];e.wk={min:n,max:r},e.Eu=n,e.Nu=r,e.wf.xn()})),this.xk.onEveryAnimationEnd(this.kk),n&&this.xk.onAnimationEnd(n)},e.prototype.onAngleIntervalChange=function(t){return this.an.on("angleIntervalChange",t)},e.prototype.offAngleIntervalChange=function(t){return this.an.off(t,"angleIntervalChange")},e}(Sj),bj=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.Fk=function(t){return this.an.on("valueChange",t)},i.prototype.Tk=function(t){return this.an.on("valueIntervalChange",t)},i.prototype.offValueChange=function(t){return this.an.off(t,"valueChange")},i.prototype.offIntervalChange=function(t){return this.an.off(t,"valueIntervalChange")},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),t.prototype.attach.call(this,i,n),this.styleAttachedEntry(i),this},i.prototype.setHighlighted=function(i){t.prototype.setHighlighted.call(this,i);for(var n=0;ns&&(n=s);var o=this.Nu-i*this.Ik,u=this.Eu+i*this.Lk,a=this.Pk-this.Ok,f=(0!==a?(o-u)/a:1/0)*(n-this.Ok);this.arc.Zu(u).Ku(u+f);var c="function"==typeof t?t(n,{getInnerStart:function(){return r},getInnerEnd:function(){return s}}):t.format(n);this.label.Jn(c)},i.prototype._k=function(){var t=this,i=this.vr.getIntervalLabelFormatter(),n="function"==typeof i?i(this.Ok,{getInnerStart:function(){return t.Ok},getInnerEnd:function(){return t.Pk}}):i.format(this.Ok);return this.minLabel.Jn(n).Fe(),this.minLabel.vi()},i.prototype.Rk=function(){var t=this,i=this.vr.getIntervalLabelFormatter(),n="function"==typeof i?i(this.Pk,{getInnerStart:function(){return t.Ok},getInnerEnd:function(){return t.Pk}}):i.format(this.Pk);return this.maxLabel.Jn(n).Fe(),this.maxLabel.vi()},i.prototype.setName=function(i){return t.prototype.setName.call(this,i),this.vr.engine.xn(),this},i.prototype.setValue=function(t){var i=this.u;return this.py=i,this.vr.getAnimationsEnabled()?this.isDisposed()||this.Iy(this.py,t):this.py=t,this.u=t,this.an.emit("valueChange",this,i,t),this.vr.engine.xn(),this},i.prototype.getValue=function(){return this.u},i.prototype.dispose=function(){var i=this;return this.vr.getAnimationsEnabled()&&this.py>0?(this.Ty&&(this.Ty.finish(!1),this.Ty=void 0),this.Iy(this.py,0,(function(){return t.prototype.dispose.call(i)}))):t.prototype.dispose.call(this),this},i.prototype.restore=function(){return this.vr.getAnimationsEnabled()&&(this.Ty&&(this.Ty.finish(!1),this.Ty=void 0),this.Iy(0,this.u)),t.prototype.restore.call(this),this},i.prototype.setInterval=function(t,i){var n=this.Ok,e=this.Pk;return this.an.emit("valueIntervalChange",this,{min:n,max:e},{min:t,max:i}),this.Ok=t,this.Pk=i,this.vr.engine.xn(),this},i.prototype.setIntervalLabelsFont=function(t){return this.minLabel.ie(t),this.maxLabel.ie(t),this.vr.engine.xn(),this},i.prototype.getIntervalLabelsFont=function(){return this.minLabel.te()},i.prototype.setIntervalLabelsVisible=function(t){return t?(this.minLabel.restore(),this.maxLabel.restore()):(this.minLabel.dispose(),this.maxLabel.dispose()),this.Dk=t,this},i.prototype.getIntervalLabelsVisible=function(){return this.Dk},i.prototype.setAngleInterval=function(t,i){return this.Eu=t,this.Nu=i,this.vr.engine.xn(),this},i.prototype.setMinAngle=function(t){return this.Eu=t,this.vr.engine.xn(),this},i.prototype.setMaxAngle=function(t){return this.Nu=t,this.vr.engine.xn(),this},i.prototype.setMarginInDegrees=function(t,i){return void 0===t&&(t=this.Lk),void 0===i&&(i=this.Ik),t!==this.Lk&&(this.Lk=t),i!==this.Ik&&(this.Ik=i),this.vr.engine.xn(),this},i.prototype.setFillStyle=function(t){this.Ck.C(t);var i=this.Ck.D(this.Bf);this.arc.$n(i);for(var n=0;nr?25*e:25*r)));var o=Array(s+2),h=Math.PI,u=0,a=0,f=i*h/180,c=(n*h/180-f)/s;for(o[u]=l(t.x,t.y),u+=1;u<=s+1;)o[u]=l(t.x+e*Math.cos(f+a*c),t.y+r*Math.sin(f+a*c)),u+=1,a+=1;return[o,s]}var kj,xj,Mj=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,i,n,e,r,s,o,h,u)||this;a.vl=20,a.Nk=new Intl.NumberFormat,a.Vk=new Intl.NumberFormat,a.Gk=!1,a.Hk=5;var f=new wj(a.wf,a.Yy,a,a.pixelScale,a.Hy,a.Wy,a.vn);return a.jk=f,a.Oy.push(f),a.setPadding(10),a}return n(i,t),i.prototype.Tf=function(){t.prototype.Tf.call(this),t.prototype.sy.call(this);var i=this.yy(),n=Ks([this.jk._k(),this.jk.Rk()]),e=l(this.pixelScale.x.getInnerInterval()-(this.hh.left+this.hh.right+2*n.max.x),this.pixelScale.y.getInnerInterval()-(this.hh.bottom+this.hh.top+2*n.max.y+i)),r=Math.max(.5*Math.min(e.x,e.y),0),s=l(this.hh.left+n.max.x+.5*e.x,this.hh.bottom+n.max.y+.5*e.y),o=this.Gk?this.Wk(s,r):s,h=this.Mk.Zo.thickness,u=r-.5*h,a=r-this.vl,f=a/r*100;f=f>100||f<0?99:f;var c=100*(1-(this.vl-h)/r);this.Uk(o,a)&&(this.Mk.qu(r).$u(f),this.jk.arc.qu(u).$u(c));var d,v,y=.5*(d=r,(v=this.Nu-this.Eu)/(2*Math.PI*d*(v/360))*h);this.Mk.Zu(this.Eu).Ku(this.Nu).ph(o),this.jk.arc.ph(o),this.jk.label.ph(o),this.Sl&&this.jk.setFillStyle(new Ee({color:this.Sl.getColors(this.jk.getAnimatedValue())})),this.jk.setMinAngle(this.Eu).setMaxAngle(this.Nu).setMarginInDegrees(y,y).Tf();var S=this.Mk.Vu();if(this.jk.getIntervalLabelsVisible()){this.Yk(this.Eu,this.Nu,o,S+this.Hk);var m=this.jk.minLabel.Fe().fn(),b=this.jk.maxLabel.Fe().fn();zs(m,b)&&this.Xk(m,b,o,S+this.Hk)}},i.prototype.Uk=function(t,i){var n=ao(this.jk.label.Fe().vi(),.5),e=t.x+i,r=t.x-i,s=t.y+i,o=t.y-i;return!(t.x+n.x>e||t.x-n.xs||t.y-n.y=0?n=-e:e=-n),[n,e]},i.prototype.Wk=function(t,i){var n=Ks(h(pj(t,this.Eu,this.Nu,i,i),1)[0]),e=.5*(n.max.x-n.min.x),r=.5*(n.max.y-n.min.y);return fo(co(t,l(n.min.x+e,n.min.y+r)),t)},i.prototype.Yk=function(t,i,n,e){var r=go(t),s=go(i);this.jk.minLabel.ph(ro(l(n.x+e,n.y),n,-r)),this.jk.maxLabel.ph(ro(l(n.x+e,n.y),n,-s)),this.jk.minLabel.Bh(l(-Math.cos(r),-Math.sin(r))),this.jk.maxLabel.Bh(l(-Math.cos(s),-Math.sin(s)))},i.prototype.getDefaultSlice=function(){return this.jk},i.prototype.setAutoScaling=function(t){return this.Gk=t,this.engine.xn(),this},i.prototype.getAutoScaling=function(){return this.Gk},i.prototype.setDataLabelFormatter=function(t){return this.Vk=t,this.engine.xn(),this},i.prototype.getDataLabelFormatter=function(){return this.Vk},i.prototype.setIntervalLabelFormatter=function(t){return this.Nk=t,this.engine.xn(),this},i.prototype.getIntervalLabelFormatter=function(){return this.Nk},i.prototype.setIntervalLabelPadding=function(t){return this.Hk=t,this.engine.xn(),this},i.prototype.getIntervalLabelPadding=function(){return this.Hk},i.prototype.setThickness=function(t){return this.vl=t,this},i.prototype.setLUT=function(t){return this.Sl=t,this.engine.xn(),this},i.prototype.setDataLabelFont=function(t){return this.jk.label.ie(t),this.engine.xn(),this},i.prototype.getDataLabelFont=function(){return this.jk.label.te()},i.prototype.getMinimumSize=function(){return l(500,300)},i.prototype.setDataLabelFillStyle=function(t){return this.jk.zk(t),this.engine.xn(),this},i.prototype.getDataLabelFillStyle=function(){return this.jk.Ek()},i.prototype.Fl=function(){return this.Oy},i.prototype.dispose=function(){return this.jk.dispose(),t.prototype.dispose.call(this)},i}(mj),Aj=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i}(pV),Fj=function(t){function i(i,n,e,r,s,o,h,u){var a=t.call(this,r,o,h,u)||this;return a.vr=r,a.scale=s,a.Jf=o,a.Qf=h,a.Mt="Slice",a.u=0,a.by=!1,a.ck=Re,a.wy=Re,a.py=a.u,a.xy=!1,a.My=th((function(){return a.vr.engine.xn()})),a.Fy=function(){a.Ty=void 0},a.index=i,a.jp=a.Cc(n.Rc(s,CE.Convex)),a.sr=a.Cc(e.$e(s)),a}return n(i,t),i.prototype.setValue=function(t){return this.vr.getAnimationsEnabled()?this.xy||this.Iy(this.py,t):this.py=t,this.u=t,this.vr.engine.xn(),this},i.prototype.getValue=function(){return this.u},i.prototype.dispose=function(){var i=this;return this.vr.getAnimationsEnabled()&&this.py>0?(this.Ty&&(this.Ty.finish(!1),this.Ty=void 0),this.Iy(this.py,0,(function(){return t.prototype.dispose.call(i)}))):t.prototype.dispose.call(this),this.xy=!0,this},i.prototype.restore=function(){return this.vr.getAnimationsEnabled()&&(this.Ty&&(this.Ty.finish(!1),this.Ty=void 0),this.Iy(this.py,this.u)),t.prototype.restore.call(this),this.xy=!1,this},i.prototype.Iy=function(t,i,n){var e=this;this.Ty=this.My(300,Qo.ease)([[t,i]],(function(t){var i=h(t,1)[0];e.py=i,e.vr.engine.xn()})),this.Ty.onEveryAnimationEnd(this.Fy),n&&this.Ty.onAnimationEnd(n)},i.prototype.setStyle=function(t,i,n,e){this.ck=t,this.wy=n,this.jp.$n(this.Bf?this.ck.getDefaultHighlightStyle():this.ck).Ys(i),this.sr.$n(this.Bf?this.wy.getDefaultHighlightStyle():this.wy).ie(e);for(var r=0;r=100?100:t)/100)},Bj=function(i,n,e,r,s,o,h,u){void 0===o&&(o=0),void 0===h&&(h=t.PyramidSliceModes.VariableHeight),n=Cj(n,r.x),e=Cj(e,r.x);var a,f=i.length,c=0;a=i.reduce((function(t,i){return t+i.getAnimatedValue()}),0);var l={x:u-n/2,y:r.y+s.bottom},d={x:u+n/2,y:r.y+s.bottom},v={x:0,y:s.bottom},y={x:0,y:s.bottom},S=0,m=0;if(o)for(var b=0;b0&&(l={x:v.x+w*o,y:v.y-o},d={x:y.x-w*o,y:y.y-o}),v={x:u-(k=(n+c/a*(e-n))/2),y:parseInt(""+(h===t.PyramidSliceModes.VariableWidth?l.y-x:x),10)},y={x:u+k,y:parseInt(""+(h===t.PyramidSliceModes.VariableWidth?d.y-x:x),10)},d.x>=l.x&&y.x>=v.x&&p.jp.au([v,l,d,y])}},Lj=function(i){function e(n,e,r,s,o,h,u,a){var f=i.call(this,n,e,r,e.qs(xj.bg),e.qs(xj.ui),s,h,u)||this;return f.Oy=[],f.Py=gV.None,f.Dy=f.vn.sliceChartStackedFillStylePalette,f._y=f.vn.sliceChartStrokeStyle,f.Ry=!1,f.zy=f.vn.sliceLabelFont,f.Ey=f.vn.sliceLabelFillStyle,f.Ny=0,f.lk=0,f.dk=80,f.vk=0,f.yk=t.PyramidSliceModes.VariableHeight,f.Mn=!0,f.Hy=function(t){var i=f.Oy.indexOf(t);i>=0&&(f.Oy.splice(i,1),f.jy())},f.Wy=function(t){f.Oy.indexOf(t)<0&&(f.Oy.push(t),f.jy(),t.setHighlightOnHover(f.Ry))},f.Uy=e.qs(xj.bottom),f.Yy=e.qs(xj.top),f.hy.Jn("Pyramid Chart"),a&&f.setAnimationsEnabled(!1),f.oy(o,f.pixelScale),f}return n(e,i),e.prototype.addSlice=function(t,i){var n=new Fj(this.Ny,this.Uy,this.Yy,this,this.pixelScale,this.Hy,this.Wy,this.vn);return this.Ny+=1,n.setName(t),n.setValue(i),this.Oy.push(n),this.engine.xn(),n},e.prototype.addSlices=function(t){for(var i=[],n=0;n0})),h=0;for(r=0;r0?u/a:0));for(r=0;r0){var s=(r[1].y-r[0].y)/2+r[0].y;return{x:n===t.PyramidLabelSide.Left?(r[0].x-r[1].x)/2+r[1].x-e:(r[2].x-(4===r.length?r[3].x:r[1].x))/2+(4===r.length?r[3].x:r[1].x)+e,y:s}}},Oj=function(t){var i=t.fu();if(i.length>0)return{x:(i[2].x-i[1].x)/2+i[1].x,y:(i[1].y-i[0].y)/2+i[0].y}},Pj=function(i){function e(){var n=null!==i&&i.apply(this,arguments)||this;return n.Zy=wV.NamePlusValue,n.qy=10,n.Sk=t.PyramidLabelSide.Left,n.mk=t.SliceLabelIndices.LabelsOnSides,n.Qy=[],n.$y=n.vn.sliceLabelConnectorStyle,n}return n(e,i),e.prototype.setLabelConnectorStyle=function(t){this.$y=t;for(var i=0;i0?e-1:u-1],f=n[e],c=n[e0},e.prototype.addPoints=function(){for(var t=this,i=[],n=0;n=3&&(this.jp||(this.jp=this.Cc(this.wf.Rc(this.scale,CE.Simple).Ys(this.hx.D(this.Bf)).$n(this.ox.D(this.Bf)))),this.jp.au(t),this.Ow||(this.Ow=this.Cc(this.wf.US(this.scale).oi(this.Lw).Zh(this.Iw).ne(this.sh).$n(this.ux.D(this.Bf)))),this.Ow.$h().Qh(t))}},e.prototype.attach=function(t,n){return void 0===n&&(n=!0),i.prototype.attach.call(this,t,n),ks(t,this.vn,{fill:this.ox,stroke:this.hx}),this},e.prototype.vx=function(){for(var t=0;t=0?n:n+2*Math.PI},Wj=function(t){return Ks(t.shapeTag.fn())},Uj=function(t){return Ks(t.fn())},Yj=function(i,n,e,r){return i.$u(0).ph(e).Zu(90).Ku(-270).ta(n===t.SpiderWebMode.Circle?void 0:r.length)},Xj={alignmentX:0,alignmentY:0,paddingX:0,paddingY:0},Zj={alignmentX:0,alignmentY:0,paddingX:0,paddingY:0},Kj=function(){Zj.alignmentX=0,Zj.alignmentY=0,Zj.paddingX=0,Zj.paddingY=0};!function(t){t[t.bg=0]="bg",t[t.axisBg=1]="axisBg",t[t.plotting=2]="plotting",t[t.fg=3]="fg",t[t.ui=4]="ui"}(Nj||(Nj={}));var qj,Jj=function(i){function e(n,e,r,s,u,a,f){var d=i.call(this,n,e,r,e.qs(Nj.bg),e.qs(Nj.ui),s,f,a?a.theme:void 0)||this;d.ng=t.AutoCursorModes.onHover,d.hh=p(20,20,20,20),d.axisScale=er.d1({scale1DConstructor:zo,dimension:"x"}).xi(0,1),d.vb=[],d.mx=[],d.bx=[],d.gx=Ho.expansion,d.wx=!0,d.kx=Ej,d.xx=zj,d.Mn=!0,d.lo=!0,d.Mx=t.SpiderWebMode.Normal,d.Ax=4,d.Fx=d.vn.spiderWebStyle,d.Tx=d.vn.spiderScaleLabelFillStyle,d.Cx=d.vn.spiderScaleLabelFont,d.Bx=5,d.Lx=d.vn.spiderAxisLabelFillStyle,d.Ix=d.vn.spiderAxisLabelFont,d.Ox=5,d.Px=d.vn.spiderAxisStyle,d.Dx=new c(d.vn.spiderAxisNibStyle),d.Ul=10,d._x=l(0,0),d.Rx=p(),d.removeAxis=function(t){for(var i=0;i=0&&void 0!==n){var a=jj(u,d.vb.length),f=l(Math.cos(a),Math.sin(a)),c=h.x*f.x+h.y*f.y,v=uo(co(t.shapeAxis.ji(),t.shapeAxis.Hi())),y=n.min+(n.max-n.min)*Math.max(1+c/v,.01);d.axisScale.xi(n.min,y),ss(o),d.engine.xn()}},o=function(){if(n=void 0,void 0!==e)if(d.Mn){var t=b(d.axisScale.getInnerStart(),d.axisScale.getInnerEnd()),i=d.Ux(),r=e;if(void 0!==i){var s=r.start(t.min,t.max,i.min,i.max),o=r.end(t.min,t.max,i.min,i.max);d.Wx=d._f.oo.Nr(300,Qo.ease)([[0,1]],(function(i){var n=h(i,1)[0];d.axisScale.xi(t.min+n*(s-t.min),t.max+n*(o-t.max))})),d.Wx.onAnimationEnd((function(){d.Wx=void 0,d.gx=r}))}else d.gx=e}else d.gx=e;e=void 0};i.setMouseEnterEventHandler(d.Yx).setMouseLeaveEventHandler(d.Xx).setMouseDragStartEventHandler(r).setMouseDragEventHandler((function(t,i,n,e,r){return s(0,l(i.clientX,i.clientY),e,0,i)})).setMouseDragStopEventHandler(o);var u=WE(new UE.Drag((function(t,i,n){d.Yx(t),r(),ss(n)}),s,(function(t,i,n,e){d.Xx(t),o(),ss(e)})));return i.setTouchStartEventHandler(u.onTouchStart).setTouchMoveEventHandler(u.onTouchMove).setTouchEndEventHandler(u.onTouchEnd)},d.Zx=function(t){d.wx&&!d.hasAxis(t)&&d.addAxis(t)},d.Jk=function(t,i){var n,e;try{for(var r=o(d.vb),s=r.next();!s.done;s=r.next()){var h=s.value;if(h.tag===t){var u=Math.max(Math.min((i-d.axisScale.getInnerStart())/(d.axisScale.getInnerEnd()-d.axisScale.getInnerStart()),1),0);return Us(h.shapeAxis.ji(),h.shapeAxis.Hi(),u)}}}catch(t){n={error:t}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(n)throw n.error}}},d.Qk=function(t){var i,n;if(0!==d.vb.length){var e,r=co(sr(t,d.engine.scale,d.pixelScale),d.vb[0].shapeAxis.ji()),s=Math.atan2(r.y,r.x),h=Is;try{for(var u=o(d.vb),a=u.next();!a.done;a=u.next()){var f=a.value,c=co(f.shapeAxis.Hi(),f.shapeAxis.ji()),l=Math.atan2(c.y,c.x),v=Math.abs(s-l);v0?S.right=Math.max(S.right,A.x+.5*(1-M.alignmentX)*x.x-m):S.left=Math.max(S.left,-A.x+.5*(M.alignmentX+1)*x.x-m),k>0?S.top=Math.max(S.top,A.y+.5*(1-M.alignmentY)*x.y-m):S.bottom=Math.max(S.bottom,-A.y+.5*(M.alignmentY+1)*x.y-m)}if(this.gx){var F=this.Ux();if(void 0!==F){var T=this.gx.start(this.axisScale.getInnerStart(),this.axisScale.getInnerEnd(),F.min,F.max),C=this.gx.end(this.axisScale.getInnerStart(),this.axisScale.getInnerEnd(),F.min,F.max);this.axisScale.xi(T,C)}}var B=l(this.pixelScale.x.getInnerStart()+(S.left+this.pixelScale.x.getInnerInterval()-S.right)/2,this.pixelScale.y.getInnerStart()+(S.bottom+this.pixelScale.y.getInnerInterval()-S.top)/2),L=Math.min(y.x/2-(S.left+S.right)/2,y.y/2-(S.bottom+S.top)/2);this._x=l(Math.max(y.x-(2*L+S.left+S.right),0),Math.max(y.y-(2*L+S.bottom+S.top),0)),this.Rx=p(this.Qt.left+this.hh.left+S.left,this.Qt.top+this.hh.top+v+S.top,this.Qt.right+this.hh.right+S.right,this.Qt.bottom+this.hh.bottom+S.bottom),this.Ky(B,L);try{for(var I=o(this.ZS),O=I.next();!O.done;O=I.next()){O.value.CS()}}catch(i){t={error:i}}finally{try{O&&!O.done&&(n=I.return)&&n.call(I)}finally{if(t)throw t.error}}try{for(var P=o(this.ZS),D=P.next();!D.done;D=P.next()){D.value.Tf()}}catch(t){e={error:t}}finally{try{D&&!D.done&&(r=P.return)&&r.call(P)}finally{if(e)throw e.error}}i.prototype.sy.call(this),this.ug();try{for(var _=o(this.ZS),R=_.next();!R.done;R=_.next()){R.value.BS()}}catch(t){s={error:t}}finally{try{R&&!R.done&&(h=_.return)&&h.call(_)}finally{if(s)throw s.error}}},e.prototype.dispose=function(){return this.Kx.ro(),this.Pg.ro(),this.Pl.ro(),i.prototype.dispose.call(this)},e.prototype.getMinimumSize=function(){return l(this.Rx.left+this.Rx.right+100,this.Rx.bottom+this.Rx.top+100)},e.prototype.Ky=function(t,i){for(var n,e,r,s,h=this.vb.length,u=[],a=0;a0&&a>1,c=0;c=u&&t.push(o());var l=t[c];Yj(l,n,e,s);var d=r*((c+1)/i);l.qu(d)}else c=c&&t.push(h());var g=t[d];d+=1;var w=(n-m)/n,p=Us(s,o[v],w);g.ph(fo(p,l(b.paddingX,b.paddingY))).Ah(b.alignmentX).Th(b.alignmentY).Jn(a(w))}}for(var k=d;k1;try{for(var u=o(this.vb),a=u.next();!a.done;a=u.next()){var f=a.value;try{for(var c=(n=void 0,o(this.ZS)),l=c.next();!l.done;l=c.next()){var d=l.value.getValue(f.tag,h);void 0!==d&&(r=void 0===r?d:Math.min(r,d),s=void 0===s?d:Math.max(s,d))}}catch(t){n={error:t}}finally{try{l&&!l.done&&(e=c.return)&&e.call(c)}finally{if(n)throw n.error}}}}catch(i){t={error:i}}finally{try{a&&!a.done&&(i=u.return)&&i.call(u)}finally{if(t)throw t.error}}if(void 0!==r&&void 0!==s)return b(r,s)},e}(rH),Qj={getWidth:function(t){return t.x},getHeight:function(t){return t.y},toVec2:function(t,i){return{x:t,y:i}},toPoint:function(t,i){return l(t,i)}},$j={getWidth:function(t){return t.y},getHeight:function(t){return t.x},toVec2:function(t,i){return{x:i,y:t}},toPoint:function(t,i){return l(i,t)}},tW={defaultDragMouseStyle:t.MouseStyles.Horizontal,getTitleTextRotation:function(){return 0},je:function(t){return t.getXMin()},We:function(t){return t.getXMax()},Ye:function(t){return t.eS().x}},iW={defaultDragMouseStyle:t.MouseStyles.Vertical,getTitleTextRotation:function(t){return 90*t},je:function(t){return t.getYMin()},We:function(t){return t.getYMax()},Ye:function(t){return t.eS().y}},nW=e(e({},Qj),tW),eW=e(e({},$j),iW),rW=function(t){function i(i,n,e,r,s){var o=t.call(this)||this;return o.wf=i,o.scale=n,o.qx=e,o.Jx=r,o.Qx=[],o.Bf=!1,o._c=!0,o.an=new qe,o.$x=function(t){return o.Qx.push(t),o.gf(t),t.setMouseInteractions(o._c),t},o.getHighlighted=function(){return o.Bf},o.vn=s,o}return n(i,t),i.prototype.onHighlight=function(t){return this.an.on("highlight",t)},i.prototype.offHighlight=function(t){return this.an.off(t)},i.prototype.dispose=function(){return this.Qx.forEach(Tr),this.qx&&this.qx(this),this.wf.oo.xn(),this},i.prototype.isDisposed=function(){return this.Qx.reduce((function(t,i){return function(t,i){return!!t&&i.isDisposed()}(t,i)}),!0)},i.prototype.restore=function(){return this.Jx&&this.Jx(this),this.Qx.forEach(Fr),this.wf.oo.xn(),this},i.prototype.setHighlighted=function(t){return this.Bf=t,this.an.emit("highlight",t),this.wf.xn(),this},i.prototype.setMouseInteractions=function(t){this._c=t;for(var i=0;i=0&&i.ic.splice(n,1),i.wf.xn()},i.Jx=function(t){i.ic.findIndex((function(i){return i===t}))<0&&i.ic.push(t),i.wf.xn()},i}return n(i,t),i.prototype.clear=function(){return this.ic.slice().forEach(Tr),this.ic.length=0,this.nc=0,this.wf.xn(),this},i.prototype.tM=function(t,i){void 0!==i?this.ic.splice(i,0,t):this.ic.push(t),Jr(!this.isDisposed())(t),t.setMouseInteractions(this.$f),this.Ac(t,this.getHighlighted()),t.onMouseEnter(this.hc),t.onMouseLeave(this.ac),t.onMouseClick(this.dc),t.onMouseDoubleClick(this.vc),t.onMouseDown(this.yc),t.onMouseUp(this.Sc),t.onMouseMove(this.cc),t.onMouseDragStart(this.mc),t.onMouseDrag(this.bc),t.onMouseDragStop(this.gc),t.onMouseWheel(this.wc),t.onTouchStart(this.kc),t.onTouchMove(this.xc),t.onTouchEnd(this.Mc),this.wf.xn()},i.prototype.Ac=function(t,i){t.setHighlighted(i)},i}(WH),oW=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i}(rW),hW=function(i){function e(){var t=null!==i&&i.apply(this,arguments)||this;return t.iM=void 0,t.nM=function(){t.iM=void 0},t}return n(e,i),e.prototype.He=function(){return this.MS&&this.ic.length>0},e.prototype.setDefaultStyle=function(t){this.eM=t,this.ic.forEach(t),t(this.rM);for(var i=0;i0){var s=0,o=t[0];n[s]=o,s+=1;for(var h=1;h1)for(var r=l(0,0),s=l(0,0),o=l(0,0),h=oo(co(t[1],t[0])),u=0,a=0,f=0;fi?Math.abs(d/(3*r.x)):1,a=Math.abs(s.x)>i?Math.abs(d/(3*s.x)):1}c[1]=fo(ao(r,u),c[1]),c[2]=co(c[2],ao(s,a)),e[f]=c}return e.length>0?e:[]}(t),f=a.length,c=Array(f*i),d=0,v=0;v0){var i=m.ic[m.ic.length-1];if(t.length>0){var n=i.Xh(),e=i.Yh(),r=n.length+e.length-+i.Tu();if(r>=m.Bp){var s=e.length>0?e[e.length-1]:n[i.Tu()?r:r-1],o=l((s.x+t[0].x)/2,(s.y+t[0].y)/2);i.Qh(o,b(l(o.x,o.y),l(o.x,o.y))).Cu(!0),m.Cc(m.NM([o].concat(t)).Fu(!0))}else i.Qh(t,m._S)}}else t.length>0&&m.Cc(m.NM(t))},m.VM=function(t){if(m.zM.length>0){var i=m.zM[m.zM.length-1];if(t.length>0)(i.Xh().length+i.Yh().length)*m.RM>=m.Bp?m.Cc(m.GM(t),m.zM):i.Qh(t)}else t.length>0&&m.Cc(m.GM(t),m.zM)},m.HM=function(t,i){var n=t.Cw(i);if(n)return sr(n,m.scale,m.wf.oo.Rt)},m.jM=function(t,i){var n=t.WM(i);if(n)return sr(n,m.scale,m.wf.oo.Rt)},m.vn=v,m.UM=new c(Fs(v.seriesPointFillStyle,S)),m.ia=new c(Fs(m.vn.seriesStrokeStyle,S)),m}return n(i,t),i.prototype.add=function(i){return t.prototype.add.call(this,i),this},i.prototype.Lp=function(){return YH(this.zM)},i.prototype.setStrokeStyle=function(t){this.ia.C(t);for(var i=this.ia.D(this.Bf),n=0;n0?this.ic[this.ic.length-1].Xh().length+this.ic[this.ic.length-1].Yh().length-+this.ic[this.ic.length-1].Tu():void 0;UH(t,i,this.Bp,this.EM),UH(t,i,this.Bp,this.VM)},i.prototype.GM=function(t,i){return this.wf.US(this.scale).Qh(t,i).setMouseInteractions(this.$f).$n(this.UM.D(this.Bf)).Zh(this.Iw).oi(this.Lw).ne(this.sh).Kh(this.Rh).qh(this.zh).Jh(this.Eh).Uh(nE(this._M))},i.prototype.NM=function(t,i){return this.wf.iS(this.scale,void 0,u([LV.UserSeries],h(this.PM))).Qh(t,i).setMouseInteractions(this.$f).na(this.ia.D(this.Bf)).Uh(nE(this._M))},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),ks(i,this.vn,{stroke:this.ia,fill:this.UM}),t.prototype.attach.call(this,i,n)},i.prototype.getPointAmount=function(){return this.zM.reduce((function(t,i){return t+i.tu()+i.iu()}),this.aa.length)},i.prototype.setHighlighted=function(i){for(var n=this.UM.D(i),e=0;e=i?t.Yh().slice(-i):Array.prototype.concat(t.Xh(),t.Yh()).slice(-i)},gW=function(t,i,n){var e=Array.prototype.concat(t.Xh(),t.Yh()).slice(0,-n-1).concat(i.slice(n+1,2*n+2));t.$h().Qh(e).Fe()},wW=function(t){function i(i,n,e,r,s,o,h,u,a,f,c,l,d,v){var y=t.call(this,i,n,e,r,s,o,h,u,a,f,c,l,d,v)||this;return y.Mt="Spline Series",y.RM=mW,y.Bp=8e3,y.YM=function(t){if(0!==t.length){var i=y.zM.length;if(i>0){var n=i>1,e=y.zM[i-1];if(n){if((v=(d=Array.prototype.concat(e.Xh(),e.Yh())).length)*mW>=y.Bp){var r=bW(e,3),s=Array.prototype.concat(r,t),o=yW(s,mW);gW(y.ic[i-1],o,mW),y.Cc(y.NM(o.slice(66)))}else if(v<5){var h=y.zM[i-2],u=(r=bW(h,3),s=Array.prototype.concat(r,d,t),o=yW(s,mW),y.ic[i-1]),a=o.slice(66);u.$h().Qh(a).Fe()}else{u=y.ic[i-1];var f=Array.prototype.concat(u.Xh(),u.Yh()),c=bW(e,4),l=(s=Array.prototype.concat(c,t),o=yW(s,mW),f.slice(0,-66).concat(o.slice(33)));u.$h().Qh(l).Fe()}}else{var d,v=(d=Array.prototype.concat(e.Xh(),e.Yh())).length;u=y.ic[i-1];if(v*mW>=y.Bp){r=bW(e,3),s=Array.prototype.concat(r,t),o=yW(s,mW);gW(y.ic[0],o,mW),y.Cc(y.NM(o.slice(66)))}else if(v+t.length>2){s=Array.prototype.concat(d,t),o=yW(s,mW);u.$h().Qh(o).Fe()}else u.Qh(t)}}else{var S=t.length>2?yW(t,mW):t,m=Ks(S);y.Cc(y.NM(S,m))}y.VM(t)}},y.XM=function(t,i){var n=t.Pw(i);if(n)return sr(n,y.scale,y.wf.oo.Rt)},y.vn=l,y}return n(i,t),i.prototype.setCursorInterpolationEnabled=function(i){return t.prototype.setCursorInterpolationEnabled.call(this,i)},i.prototype.DS=function(t){var i=this.zM.length,n=this.zM.length>0?this.zM[i-1].Xh().length+this.zM[i-1].Yh().length:void 0;UH(t,n,Math.ceil(this.Bp/this.RM),this.YM)},i.prototype.solveNearestFromScreen=function(i,n){if(void 0===n&&(n=this.DM),n)return t.prototype.solveNearestFromScreen.call(this,i,n);var e=qH(i,this.zM,this.XM,"nearest-x"===this._M?function(t,i){return Math.abs(t.x-i.x)}:"nearest-y"===this._M?function(t,i){return Math.abs(t.y-i.y)}:function(t,i){return Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2)});if(void 0!==e){var r=sr(e[0],this.wf.oo.Rt,this.scale);return KG(r,this.scale,this.Mg(new _G,this,r.x,r.y,r).Xf(),this,e[1].Qn())}},i.prototype.solveNearestFromSegment=function(i,n,e){if(void 0===e&&(e=this.DM),e||n instanceof xE)return t.prototype.solveNearestFromSegment.call(this,i,n,e);var r=qH(i,this.zM,this.XM,"nearest-x"===this._M?function(t,i){return Math.abs(t.x-i.x)}:"nearest-y"===this._M?function(t,i){return Math.abs(t.y-i.y)}:function(t,i){return Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2)});if(void 0!==r){var s=sr(r[0],this.wf.oo.Rt,this.scale),o=n.ea();return KG(s,this.scale,this.Mg(new _G,this,s.x,s.y,s).Xf(),this,o instanceof nr?o.getFillStyle():void 0)}},i.prototype.setMaxPointCount=function(i){return t.prototype.setMaxPointCount.call(this,void 0!==i&&i>0?33*i:0),this},i}(SW),pW=function(){function t(){this.$i="FreeformPattern",this.yu=iE()}return t.prototype.Cp=function(t,i,n,e,r){if(e>0){var s=Math.trunc((i-e)/n);if(s>0&&t.length>1)for(var o=t.splice(0,s),h=0;h0){var s=Math.ceil(e/n),o=t.length-s;if(o>0){var h=this.KM(t,r);if(h>0){var u=o-h>0?h:o;if(u>0){for(var a=0;a1)for(var s=0;s0?t[t.length-1].Et():void 0},i.prototype.getXMin=function(t,i){return void 0===t&&(t=[]),t.length>0&&t[0].tu()>0?t[0].zt():i?i.min.x:void 0},i.prototype.setPrecision=function(t){return this.set("_columnPackaging",Jz(kW(t)))},i}(FW),CW=function(t){function i(){var i=t.call(this,{yu:Qz()})||this;return i.$i="HorizontalRegressivePattern",i}return n(i,t),i.prototype.KM=function(t,i){var n=t.length,e=Math.max(i.x.getInnerStart(),i.x.getInnerEnd()),r=0;if(n>1)for(var s=0;s0&&t[0].tu()>0?t[0].Et():i?i.max.x:void 0},i.prototype.getXMin=function(t,i){return void 0===t&&(t=[]),void 0!==i?i?i.min.x:void 0:t.length>0?t[t.length-1].zt():void 0},i.prototype.setPrecision=function(t){return this.set("_columnPackaging",Qz(kW(t)))},i}(FW),BW=function(t,i){var n=i.zt();return t?Math.min(n,t):n},LW=function(t,i){var n=i.Et();return t?Math.max(n,t):n},IW=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.ZM=function(t,i){return Math.abs(t.y-i.y)},i.prototype.getXMax=function(t,i){return void 0===t&&(t=[]),t.reduce(LW,i?i.max.x:void 0)},i.prototype.getXMin=function(t,i){return void 0===t&&(t=[]),t.reduce(BW,i?i.min.x:void 0)},i}(xW),OW=function(t){function i(){var i=t.call(this,{yu:$z()})||this;return i.$i="VerticalProgressivePattern",i}return n(i,t),i.prototype.KM=function(t,i){var n=t.length,e=Math.min(i.y.getInnerStart(),i.y.getInnerEnd()),r=0;if(n>1)for(var s=0;s0?t[t.length-1].Vt():void 0},i.prototype.getYMin=function(t,i){return void 0===t&&(t=[]),t.length>0&&t[0].tu()>0?t[0].Nt():i?i.min.y:void 0},i.prototype.setPrecision=function(t){return this.set("_columnPackaging",$z(kW(t)))},i}(IW),PW=function(t){function i(){var i=t.call(this,{yu:tE()})||this;return i.$i="VerticalRegressivePattern",i}return n(i,t),i.prototype.KM=function(t,i){var n=t.length,e=Math.max(i.y.getInnerStart(),i.y.getInnerEnd()),r=0;if(n>1)for(var s=0;s0&&t[0].tu()>0?t[0].Vt():i?i.max.y:void 0},i.prototype.getYMin=function(t,i){return void 0===t&&(t=[]),void 0!==i?i?i.min.y:void 0:t.length>0?t[t.length-1].Nt():void 0},i.prototype.setPrecision=function(t){return this.set("_columnPackaging",tE(kW(t)))},i}(IW),DW={horizontalProgressive:new TW,horizontalRegressive:new CW,verticalProgressive:new OW,verticalRegressive:new PW,freeform:new pW},_W=function(t){function i(i,n,e,r,s,o,h,u,a,f,c,d,v,y){var S=t.call(this,i,n,e,r,s,o,h,u,a,DW.horizontalProgressive,f,d,v,y)||this;return S.Mt="Step Series",S.EM=function(t){var i=S.ic.length>0?S.ic[S.ic.length-1].Xh().length+S.ic[S.ic.length-1].Yh().length:void 0;UH(t,i,S.Bp,S.qM)},S.qM=function(t){var i=t.length;if(S.ic.length>0){var n=S.ic[S.ic.length-1];if(i>0){var e=n.Xh(),r=n.Yh(),s=r.length>0?r[r.length-1]:e[e.length-1],o=vW([s].concat(t),S.wt);o.shift();var h=l((s.x+o[0].x)/2,(s.y+o[0].y)/2),u=Array.prototype.concat(h,o);(r.length>0?e.length+r.length:e.length)>=S.Bp?(n.Qh(h,b(l(h.x,h.y),l(h.x,h.y))).Cu(!0),S.Cc(S.NM(u).Fu(!0)),S.zM.push(S.GM(t))):n.Qh(u)}}else i>0&&S.Cc(S.NM(vW(t,S.wt)));S.VM(t)},S.vn=d,S.wt=c,void 0===S.PM.find((function(t){return"DataPattern"===t.type}))&&S.PM.push({type:"DataPattern",args:{pattern:"ProgressiveX"}}),S}return n(i,t),i}(SW),RW=function(t){function i(i,n,e,r,s,o,h,u,a,f,l,d,v,y){var S=t.call(this,i,n,e,r,s,o,h,u,a,f,l)||this;return S.PM=d,S.Mt="Line Series",S.DM=!0,S.Bp=void 0,S._M="nearest-x",S.fa=void 0,S.ml=function(){return xs(S.ia.L().getFillStyle())},S.HM=function(t,i){var n=t.Cw(i);if(n)return sr(n,S.scale,S.wf.oo.Rt)},S.jM=function(t,i){var n=t.WM(i);if(n)return sr(n,S.scale,S.wf.oo.Rt)},S.ia=new c(Fs(S.vn.seriesStrokeStyle,v)),S.JM={individualLookupValuesEnabled:void 0!==(null==y?void 0:y.individualLookupValuesEnabled)&&y.individualLookupValuesEnabled},S.setMouseInteractions(!1),S}return n(i,t),i.prototype.add=function(i){return t.prototype.add.call(this,i),this},i.prototype.setMouseInteractions=function(i){return t.prototype.setMouseInteractions.call(this,i)},i.prototype.setStrokeStyle=function(t){this.ia.C(t);for(var i=this.ia.D(this.Bf),n=0;n0?this.root.ze():this.root},t.prototype.vA=function(t){if(this.root)return this.hA(t),this.contentCompare(this.root.value,t)>=0?this.root.ze():this.root},t.prototype.yA=function(t){if(this.root)return this.hA(t),this.contentCompare(this.root.value,t)>=0?this.root:this.root.Ee()},t.prototype.SA=function(t){if(this.root)return this.hA(t),this.contentCompare(this.root.value,t)<=0?this.root.Ee():this.root},t.prototype.mA=function(t){var i=this;t instanceof Array?t.forEach((function(t){return i.Qh(t)})):this.Qh(t)},t.prototype.hA=function(t){var i,n,e,r,s,o;if(this.root){for(n=i=new ZW,e=i,o=new ZW,s=this.root;;){var h=this.contentCompare(t,s.value);if(h<0){if(!s.left)break;if(this.contentCompare(t,s.left.value)<0&&(r=s.left,s.left=r.right,s.sA(),r.right=s,r.sA(),!(s=r).left))break;(r=new ZW).right=s,r.left=o.left,o.left=r,e.left=s,e.sA(),e=s,s=s.left}else{if(!(h>0))break;if(!s.right)break;if(this.contentCompare(t,s.right.value)>0&&(r=s.right,s.right=r.left,s.sA(),r.left=s,r.sA(),!(s=r).right))break;(r=new ZW).left=s,r.right=o.right,o.right=r,n.right=s,n.sA(),n=s,s=s.right}}for(n.right=s.left,n.sA(),e.left=s.right,e.sA(),s.left=i.right,s.right=i.left;o.left;)o.left.right.sA(),o.left=o.left.left;for(;o.right;)o.right.left.sA(),o.right=o.right.right;s.sA(),this.root=s}},t.prototype.eA=function(t,i,n){return this.root&&(i=this.root.eA(t,i,0,n,this)),i},t.prototype.rA=function(t,i,n){return this.root&&(i=this.root.rA(t,i,this.length-1,n,this)),i},t.prototype.$h=function(){this.root=null,this.length=0},t.prototype.bA=function(t,i){for(var n,e=this.lA();e;){var r=this.SA(e.value);t.call(i,n?n.value:void 0,e.value,r?r.value:void 0),n=e,e=r}},t.prototype.gA=function(t,i,n){for(var e,r=this.lA(),s=0;r;){var o=this.SA(r.value);i=t.call(n,i,e?e.value:void 0,r.value,o?o.value:void 0,s++,this),e=r,r=o}return i},t}(),qW=function(){function t(t,i){this.key=t,this.value=i}return t.prototype.equals=function(t){return YW(this.key,t.key)&&YW(this.value,t.value)},t.prototype.compare=function(t){return UW(this.key,t.key)},t}(),JW=function(){function t(t,i,n){var e=this;void 0===i&&(i=YW),void 0===n&&(n=UW),this.length=0,this.contentEquals=i,this.contentCompare=n,this.store=new KW(void 0,(function(t,n){return i(t.key,n.key)}),(function(t,i){return n(t.key,i.key)})),t&&(Array.isArray(t)?t.forEach((function(t){return e.Qh(t.key,t.value)})):this.Qh(t.key,t.value))}return t.prototype.S=function(t){var i=this.store.S(new qW(t,void 0));return i?i.value.value:void 0},t.prototype.l=function(t,i){var n=new qW(t,i),e=this.store.S(n);if(e)return e.value.value=i,e;var r=this.store.Qh(n);return this.length+=1,r},t.prototype.Qh=function(t,i){return this.l(t,i)},t.prototype.oA=function(t){return this.store.oA(new qW(t,void 0))},t.prototype.$h=function(){this.store.$h(),this.length=0},t.prototype.eA=function(t,i,n){var e=this;return this.store.eA((function(i,r){return t.call(n,i,r.value,r.key,e)}),i,this.store)},t.prototype.rA=function(t,i,n){var e=this;return this.store.rA((function(i,r){return t.call(n,i,r.value,r.key,e)}),i,this.store)},t.prototype.fA=function(t){var i=new qW(t,void 0);return!!this.store.oA(i)&&(this.store.fA(i),this.length--,!0)},t.prototype.aA=function(t,i){return this.eA((function(n,e,r){t.call(i,e,r)}),void 0)},t.prototype.wA=function(t){return this.store.S(new qW(t,void 0))||void 0},t.prototype.bA=function(t,i){for(var n,e=this.store.lA();e;){var r=this.store.SA(e.value);t.call(i,n?n.value.value:void 0,e.value.value,r?r.value.value:void 0),n=e,e=r}},t.prototype.gA=function(t,i,n){for(var e,r=this.store.lA(),s=0;r;){var o=this.store.SA(r.value);i=t.call(n,i,e?e.value.value:void 0,r.value.value,o?o.value.value:void 0,s++,this),e=r,r=o}return i},t.prototype.cA=function(){return this.store.cA()},t.prototype.lA=function(){return this.store.lA()},t.prototype.dA=function(t){return this.store.dA(new qW(t,void 0))},t.prototype.vA=function(t){return this.store.vA(new qW(t,void 0))},t.prototype.yA=function(t){return this.store.yA(new qW(t,void 0))},t.prototype.SA=function(t){return this.store.SA(new qW(t,void 0))},t}(),QW={minGapNew:1.75,minGapSplit:2,maxGapFuse:1.5},$W=function(t,i){return Math.min(t,i[3])},tU=function(t,i){return Math.max(t,i[2])},iU=function(t,i){var n=t.length;if(!(n<2))return[i,t[0].y,t.reduce(Mr,Os),t.reduce(xr,Is),t[n-1].y]},nU=function(t,i){var n=[],e=t.getDataIndices(),r=i.getDataIndices();return Array.isArray(e)?n=n.concat(e):n.push(e),Array.isArray(r)?n=n.concat(r):n.push(r),n},eU=function(t,i){if(t.length>0)return i>0?t[t.length-1]:t[0]},rU=function(t,i,n){return t.addRow(i.getName()).addRow("X",i.axisX.formatValue(n.getPosition())).addRow("Open",n.getOpen().toFixed(2)).addRow("High",n.getHigh().toFixed(2)).addRow("Low",n.getLow().toFixed(2)).addRow("Close",n.getClose().toFixed(2))},sU=function(i){function e(n,e,r,s,o,h,u,a,f,c,l,v,y){var S=i.call(this,n,e,r,s,o,h,u,a,f,v)||this;return S.pA=c,S.kA=l,S.Mt="OHLC Series",S.xA=new JW,S.iM=b(d(Is,Is),d(Os,Os)),S.MA=0,S.AA=5,S.FA=QW,S.fa=void 0,S.TA=void 0,S.CA=void 0,S.BA=!0,S.tc=t.HighlightModes.onHover,S.Mg=rU,S.LA=new S.pA(S.wf,S.scale,Cr,Cr,!0,S.vn).dispose(),S.IA=new S.kA(S.wf,S.scale,Cr,Cr,!1,S.vn).dispose(),S}return n(e,i),e.prototype.pp=function(t){if(!(t.x instanceof zo))throw new Error("OHLCSeries must be attached to a Linear X Axis.");this.OA=t.x},e.prototype.setStyle=function(t){return this.PA=t,this.DA(),this.wf.xn(),this},e.prototype.setPositiveStyle=function(t){return this._A=t,this.DA(),this.wf.xn(),this},e.prototype.setNegativeStyle=function(t){return this.RA=t,this.DA(),this.wf.xn(),this},e.prototype.setFigureWidth=function(t){return this.AA=t,this.wf.xn(),this},e.prototype.getFigureWidth=function(){return this.AA},e.prototype.setFigureAutoFitting=function(t){return this.FA=t?QW:void 0,this.wf.xn(),this},e.prototype.getFigureAutoFitting=function(){return void 0!==this.FA},e.prototype.zA=function(t,i){return t-i/2<=this.scale.x.getInnerEnd()+.1*this.scale.x.getInnerInterval()&&this.scale.x.getInnerStart()-.1*this.scale.x.getInnerInterval()<=t+i/2},e.prototype.EA=function(t,i,n,e){var r=function(t){return t[4]>=t[1]}(t),s=new(r?this.pA:this.kA)(this.wf,this.scale,this.qx,this.Jx,r,this.vn);return this.tM(s,e),this.NA(s),this.Ac(s,this.Bf),s.AM(t[0],t[1],t[2],t[3],t[4],i).ou(n),s},e.prototype.VA=function(t){var i=this.MA;return this.MA+=1,this.xA.l(i,t),this.BA=!0,this.an.emit("dataAdd",this,[t],void 0),i},e.prototype.DA=function(){var t=this;this.ic.forEach((function(i){t.PA&&t.PA(i),i.positive&&t._A?t._A(i):!i.positive&&t.RA&&t.RA(i)}))},e.prototype.NA=function(t){this.PA&&this.PA(t),t.positive&&this._A?this._A(t):!t.positive&&this.RA&&this.RA(t)},e.prototype.GA=function(t){return t*this.OA.getPixelSize()},e.prototype.HA=function(t){return t/this.OA.getPixelSize()},e.prototype.jA=function(t){if(!Array.isArray(t))return this.xA.S(t);if(this.xA.S(t[0])&&this.xA.S(t[t.length-1])){for(var i=0,n=this.xA.S(t[0])[1],e=Os,r=Is,s=this.xA.S(t[t.length-1])[4],o=0;o1){var e=t>0?this.ic.length-1:0;this.ic[e].dispose()}var r;do{r=!1;var s=eU(this.ic,t);if(s){for(var o=s.getPosition(),h=s.getDataIndices(),u=("number"==typeof h?h:h[t>0?h.length-1:0])+t,a=void 0,f=[],c=[];;){var l=this.xA.S(u);if(!l)break;if(!this.zA(l[0],i))break;if(a){if(Math.abs(o-l[0])>=1.5*n)break;t>0?a[4]=l[4]:a[1]=l[1],a[2]=Math.max(a[2],l[2]),a[3]=Math.min(a[3],l[3])}else a=l.slice();f.push(l[0]),t>0?c.push(u):c.splice(0,0,u),u+=t}if(a){var d=t>0?void 0:0;this.EA(a,c,i,d),r=!0}}}while(r)}},e.prototype.Cp=function(t){var i;if(t&&"maxDataPointCount"in t){var n=t.maxDataPointCount;if(n&&this.xA.length>n){var e=this.MA-1;if(o=this.xA.store.lA()){for(var r=e-n;r>=o.value.key;r-=1)this.xA.fA(r);var s=!0;this.iM.min.y=Is,this.iM.max.y=Os;for(r=1+e-n;r<=e;r+=1){(c=this.xA.S(r))&&(this.iM.min.y=Math.min(this.iM.min.y,c[3]),this.iM.max.y=Math.max(this.iM.max.y,c[2]),s&&(this.iM.min.x=c[0],s=!1))}}}}else if(t&&"minDataPointCount"in t&&t.minDataPointCount){var o,h=t.minDataPointCount,u=this.scale.x.getInnerStart();e=this.MA-1;if(o=this.xA.store.lA()){var a=o.value.key,f=void 0;for(r=o.value.key;r<=e;r+=1){if((null===(i=this.xA.S(r))||void 0===i?void 0:i[0])>=u)break;f=r}if(void 0!==f&&f-a>=1e3&&this.xA.length-(f-a)>=h){for(r=f;r>=a;r-=1)this.xA.fA(r);o=this.xA.store.lA();s=!0;if(this.iM.min.y=Is,this.iM.max.y=Os,o)for(r=o.value.key;r<=e;r+=1){var c;(c=this.xA.S(r))&&(this.iM.min.y=Math.min(this.iM.min.y,c[3]),this.iM.max.y=Math.max(this.iM.max.y,c[2]),s&&(this.iM.min.x=c[0],s=!1))}}}}return this},e.prototype.setDataCleaning=function(t){return this.fa=t,this.wf.xn(),this},e.prototype.setMaxPointCount=function(t){return this.setDataCleaning({maxDataPointCount:t}),this},e.prototype.BS=function(){i.prototype.BS.call(this),this.Cp(this.fa);var t=this.OA.getPixelSize(),n=this.TA,e=b(this.scale.x.getInnerStart(),this.scale.x.getInnerEnd()),r=this.CA,s=this.GA(this.AA),o=!r||e.max-e.min!=r.max-r.min,h=this.ic.length;if(!r||e.min>r.min)for(var u=0;u=0;u-=1){a=this.ic[u];if(this.zA(a.getPosition(),s))break;a.dispose()}if(0===this.ic.length&&this.xA.length>0)for(u=0;u0){var c=this.FA?s*this.FA.minGapNew:0;if((o||!r||e.minr.max)&&(this.WA(1,s,c),this.BA=!0),this.FA){var l=s*this.FA.maxGapFuse,d=s*this.FA.minGapSplit;if(void 0===n||t!==n||this.BA){var v=void 0;do{v=!1;for(u=0;u1){var S=a.getPosition(),m=u>0?this.ic[u-1]:void 0,g=u=1.5*d)&&(!g||g.getPosition()-S>=1.5*d)){v=!0,a.dispose();var w=y.length,p=Math.round(w/2),k=y.splice(p,w-p),x=this.jA(y),M=this.jA(k);void 0!==x&&this.EA(x,y,s,u),void 0!==M&&this.EA(M,k,s,u+1),u+=1}}}}while(v);var A=void 0;do{A=!1;for(u=0;u0){for(var n=sr(t,this.wf.oo.Rt,this.scale),e=void 0,r=0;rn.x+s.FM())break;if(o>=n.x){var h=r>0?n.x-this.ic[r-1].getPosition():Number.MAX_VALUE,u=o-n.x,a=r0){if(Array.isArray(i[0])){for(var n=i,e=0;e0},i}(sU),hU=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.aa=[],i}return n(i,t),i.prototype.He=function(){return this.MS&&(this.xA.length>0||this.aa.length>0)},i.prototype.add=function(t){Array.isArray(t)?this.addPoints(t):this.addPoint(t);var i=this.aa[this.aa.length-1];return this.Tp=i?{x:i.x,y:i.y}:void 0,this},i.prototype.addPoint=function(t){return this.aa.push(t),this.wf.xn(),this.iM.min.x=Math.min(this.iM.min.x,t.x),this.iM.max.x=Math.max(this.iM.max.x,t.x),this.iM.min.y=Math.min(this.iM.min.y,t.y),this.iM.max.y=Math.max(this.iM.max.y,t.y),this},i.prototype.addPoints=function(t){return t.length>0&&(this.aa=this.aa.concat(t),this.wf.xn(),this.iM.min.x=Math.min(this.iM.min.x,t[0].x),this.iM.max.x=Math.max(this.iM.max.x,t[t.length-1].x),this.iM.min.y=t.reduce(xr,this.iM.min.y),this.iM.max.y=t.reduce(Mr,this.iM.max.y)),this},i.prototype.addArrayY=function(t,i,n){void 0===i&&(i=1),void 0===n&&(n=0);var e=n;return e||(e=this.Tp?this.Tp.x+i:0),this.add(XH(t,i,e)),this},i.prototype.BS=function(){if(this.Cp(this.fa),this.aa.length>0){var i=void 0;if(void 0!==this.UA)i=this.UA;else{var n=this.FA?this.FA.minGapNew:1;i=this.GA(this.AA*n)}var e=void 0!==this.YA?this.YA:this.aa[0].x,r=function(t,i,n){for(var e=[],r=[],s=!1;t.length>0;){for(var o=0;o=n+i){var u=iU(r,n+i/2);void 0!==u&&(e.push(u),t.splice(0,r.length-1)),n+=i;break}}if(r.length=0,!s)break}return e}(this.aa,i,e);if(r.length>0){for(var s=0;s0){var e=n.ic.length-1,r=n.ic[e];if(i>0){var s=h(r.Xh(),2),o=s[0],u=s[1],a=h(r.Yh(),2),f=a[0],c=a[1];if((f?o.length+f.length:o.length)>=n.Bp){var d=f&&f.length>0?f[f.length-1]:o[o.length-1],y=c&&c.length>0?c[c.length-1]:u[o.length-1],S=(d.x+t[0].position)/2,m=mo(S,d,l(t[0].position,t[0].high)).y,g=mo(S,y,l(t[0].position,t[0].low)).y,w=v(S,m,g);r.Qh(w,b(l(S,g),l(S,m))).Cu(!0),n.Cc(n.tF([w].concat(t)).Fu(!0))}else r.Qh(t)}}else i>0&&n.Cc(n.tF(t))},n.iF=function(t){var i=n.qA,e=t.length;if(n.qA.length>0){if(e>0){var r=i[i.length-1],s=r.Xh(),o=r.Yh();if(s.length+o.length>=n.Bp){var h=o.length>0?o[o.length-1]:s[s.length-1],u=(h.x+t[0].x)/2,a=mo(u,h,l(t[0].x,t[0].y)).y,f=l(u,a);r.Qh(f,b(l(u,a),l(u,a))).Cu(!0),i.push(n.nF([f].concat(t),n._S).Fu(!0))}else r.Qh(t)}}else e>0&&i.push(n.nF(t))},n.eF=function(t){var i=n.JA,e=t.length;if(n.JA.length>0){if(e>0){var r=i[i.length-1],s=r.Xh(),o=r.Yh();if(s.length+o.length>=n.Bp){var h=o.length>0?o[o.length-1]:s[s.length-1],u=(h.x+t[0].x)/2,a=mo(u,h,l(t[0].x,t[0].y)).y,f=l(u,a);r.Qh(f,b(l(u,a),l(u,a))).Cu(!0),i.push(n.rF([f].concat(t)).Fu(!0))}else r.Qh(t)}}else e>0&&i.push(n.rF(t))},n.sF=function(t,i){var e=t.Cw(i);if(e)return[sr(e[0],n.scale,n.wf.oo.Rt),sr(e[1],n.scale,n.wf.oo.Rt)]},n.oF=function(t,i){var e=t.WM(i);if(e)return[sr(e[0],n.scale,n.wf.oo.Rt),sr(e[1],n.scale,n.wf.oo.Rt)]},n}return n(e,i),e.prototype.setDataCleaning=function(t){return this.setMaxPointCount(t&&t.minDataPointCount),this},e.prototype.clear=function(){for(var t=0;t0?t:0,this.wf.xn(),this},e.prototype.getMaxPointCount=function(){return this.Fp>0?this.Fp:void 0},e.prototype.setCursorResultTableFormatter=function(t){return this.Mg=t,this.vr.engine.xn(),this},e.prototype.getCursorResultTableFormatter=function(){return this.Mg},e.prototype.getXMax=function(){return Kr(this.ic,Er,Math.max,Wr,this._S)},e.prototype.getXMin=function(){return Kr(this.ic,zr,Math.min,jr,this._S)},e.prototype.getYMax=function(){return Kr(this.ic,Vr,Math.max,Yr,this._S)},e.prototype.getYMin=function(){return Kr(this.ic,Nr,Math.min,Ur,this._S)},e.prototype.eS=function(){var t,i,n=l(0,0);try{for(var e=o(this.ic),r=e.next();!r.done;r=e.next()){var s=r.value;n.x=Math.max(n.x,s.cu()),n.y=Math.max(n.y,s.lu())}}catch(i){t={error:i}}finally{try{r&&!r.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}return n},e.prototype.He=function(){return this.MS&&this.getPointAmount()>0},e.prototype.pp=function(t){},e.prototype.PS=function(t,i,n){this.aa=ps(this.aa,t,{canReturnB:!1}),this.ZA=ps(this.ZA,i,{canReturnB:!1}),this.KA=ps(this.KA,n,{canReturnB:!1}),this.wf.xn()},e.prototype.hF=function(t,i,n,e){this.uF(i,n,e),this.PS(Array.isArray(t)?t:[t],i,n)},e.prototype.uF=function(t,i,n){var e=Js(Ks(t),Ks(i));this._S?this._S=Js(this._S,e):this._S=e,n&&(this._S=Js(this._S,n))},e.prototype.KM=function(){var t=this.ic.length,i=Math.min(this.scale.x.getInnerStart(),this.scale.x.getInnerEnd()),n=0;if(t>1)for(var e=0;e0){var r=Math.ceil(n/i),s=t.length-r;if(s>0&&e>0){var o=s-e>0?e:s;if(o>0){for(var h=0;h0?this.ic[this.ic.length-1]:void 0,n=i?i.Xh()[0].length+(i.Yh()[0]?i.Yh()[0].length:0):void 0;UH(t,n,this.Bp,this.$A)},e.prototype.fF=function(t){var i=this.qA.length>0?this.qA[this.qA.length-1].Xh().length+this.qA[this.qA.length-1].Yh().length:void 0;UH(t,i,this.Bp,this.iF)},e.prototype.cF=function(t,i){var n=this.qA.length>0?this.qA[this.qA.length-1].Xh().length+this.qA[this.qA.length-1].Yh().length:void 0;UH(t,n,this.Bp,this.iF),UH(i,n,this.Bp,this.eF)},e.prototype.tF=function(t,i){return this.wf.lF(this.scale).Qh(t,i).$n(this.dF.D(this.Bf)).Mu(this.vF.D(this.Bf)).ku(this.yu)},e.prototype.yF=function(t,i,n){return this.wf.iS(this.scale,void 0,[LV.UserSeries]).Qh(t,n).setMouseInteractions(!1).na(i)},e.prototype.nF=function(t,i){return this.yF(t,this.SF.D(this.Bf),i)},e.prototype.rF=function(t,i){return this.yF(t,this.mF.D(this.Bf),i)},e.prototype.bF=function(t){this.dF.C(t);for(var i=this.dF.D(this.Bf),n=0;n0){var t=this.ic.length,n=this.KM();this.Cp(this.ic,this.Bp,this.Fp,n);var e=this.ic.length;this.qA.length>0&&this.Cp(this.qA,this.Bp,this.Fp,n),this.JA.length>0&&this.Cp(this.JA,this.Bp,this.Fp,n),t!==e&&this.Mp(),this.QA=!0}},e.prototype.Tf=function(){var t,n,e,r,s,h;if(i.prototype.Tf.call(this),this.aa.length>0&&(this.aF(this.aa),this.EF(this.ZA,this.KA),this.QA=!0),this.QA){var u=this.getBoundaries();try{for(var a=o(this.ic),f=a.next();!f.done;f=a.next()){f.value.Eo(u)}}catch(i){t={error:i}}finally{try{f&&!f.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}try{for(var c=o(this.qA),l=c.next();!l.done;l=c.next()){l.value.Eo(u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}try{for(var d=o(this.JA),v=d.next();!v.done;v=d.next()){v.value.Eo(u)}}catch(t){s={error:t}}finally{try{v&&!v.done&&(h=d.return)&&h.call(d)}finally{if(s)throw s.error}}}},e.prototype.BS=function(){this._S=void 0,this.aa.length=0,this.ZA.length=0,this.KA.length=0},e.prototype.dispose=function(){i.prototype.dispose.call(this);for(var t=0;t0){var n=this.VF(i),e=h(this.GF(n),2),r=e[0],s=e[1];this.hF(n,r,s,b(l(Is,this.NF),l(Os,this.NF)));var o=this.aa[this.aa.length-1];this.Tp=o?{position:o.position,high:o.high,low:o.low}:void 0,this.an.emit("dataAdd",this,i,this._S)}return this},i.prototype.addArrayY=function(t,i,n){void 0===i&&(i=1),void 0===n&&(n=0);var e=n;return e||(e=this.Tp?this.Tp.position+i:0),this.add(XH(t,i,e)),this},i.prototype.Ip=function(t){return this.an.on("dataAdd",t)},i.prototype.Op=function(t){return this.an.off(t)},i.prototype.Pp=function(t){return this.an.on("dataClear",t)},i.prototype.Dp=function(t){return this.an.off(t)},i}(cU),vU=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.mF=new c(ir),i}return n(i,t),i.prototype.EF=function(t){return this.fF(t)},i.prototype.GF=function(t){for(var i=t.length,n=Array(i),e=0;e=s){var u=v(o.x,o.y,s);if(0!==n&&qr(i[n-1],u)||(i[n]=u,n+=1),h.y=s)(a=Mo(l(Os,s),l(Is,s),o,h))&&(i[n]=v(a.x,a.y,s),n+=1),i[n]=v(h.x,h.y,s),n+=1;else i[n]=v(h.x,s,s),n+=1}}return n},i.prototype.Lp=function(){return YH(this.ic,(function(t){return t[0]}))},i.prototype.setFillStyle=function(t){return this.bF(t),this},i.prototype.setFillStyleHighlight=function(t){return this.gF(t),this},i.prototype.getFillStyle=function(){return this.kF()},i.prototype.getFillStyleHighlight=function(){return this.xF()},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),ks(i,this.vn,{fill:this.dF,stroke:this.SF}),t.prototype.attach.call(this,i,n)},i}(vU),SU=function(t){function i(i,n,e,r,s,o,h,u,a,f,l){var d=t.call(this,i,n,e,r,s,o,h,u,a,f,l)||this,v=i.getSeries().length;return d.dF=new c(Re),d.vF=new c(Fs(d.vn.mountainsInvertedFillStyle,v)),d.SF=new c(Fs(d.vn.mountainsInvertedStrokeStyle,v)),d}return n(i,t),i.prototype.VF=function(t){return this.UF(t)},i.prototype.UF=function(t){var i=[];return 1===t.length?this.jF(t[0],i):this.WF(t,i),i},i.prototype.jF=function(t,i,n){void 0===n&&(n=0);var e=this.NF;return i[n]=t.y>e?v(t.x,e,e):v(t.x,t.y,e),n+=1},i.prototype.WF=function(t,i,n){void 0===n&&(n=0);for(var e=0,r=t.length-1,s=this.NF;es)(a=Mo(l(Os,s),l(Is,s),o,h))&&(i[n]=v(a.x,a.y,s),n+=1),i[n]=v(h.x,s,s),n+=1;else i[n]=v(h.x,h.y,s),n+=1}else{var a;u=v(o.x,s,s);if(0!==n&&qr(i[n-1],u)||(i[n]=u,n+=1),h.y<=s)(a=Mo(l(Os,s),l(Is,s),o,h))&&(i[n]=v(a.x,a.y,s),n+=1),i[n]=v(h.x,h.y,s),n+=1;else i[n]=v(h.x,s,s),n+=1}}return n},i.prototype.Lp=function(){return YH(this.ic,(function(t){return t[1]}))},i.prototype.setFillStyle=function(t){return this.wF(t),this},i.prototype.setFillStyleHighlight=function(t){return this.pF(t),this},i.prototype.getFillStyle=function(){return this.Au()},i.prototype.getFillStyleHighlight=function(){return this.AF()},i.prototype.attach=function(i,n){return void 0===n&&(n=!0),ks(i,this.vn,{fill:this.vF,stroke:this.SF}),t.prototype.attach.call(this,i,n)},i}(vU),mU=function(t){function i(i,n,e,r,s,o,h,u,a,f,l){var d=t.call(this,i,n,e,r,s,o,h,u,a,f,l)||this,v=i.getSeries().length;return d.dF=new c(Fs(d.vn.mountainsFillStyle,v)),d.SF=new c(Fs(d.vn.mountainsStrokeStyle,v)),d.vF=new c(Fs(d.vn.mountainsInvertedFillStyle,v)),d.mF=new c(Fs(d.vn.mountainsInvertedStrokeStyle,v)),d}return n(i,t),i.prototype.VF=function(t){return this.YF(t)},i.prototype.EF=function(t,i){return this.cF(t,i)},i.prototype.YF=function(t){var i=0,n=[],e=t.length,r=this.NF;return e>0&&(this.XF&&(this.XF.y<=r&&r<=t[0].y||this.XF.y>=r&&r>=t[0].y)&&(n[i]=v(.5*(this.XF.x+t[0].x),r,r),i+=1),this.XF=t[e-1],1===e?this.jF(t[0],n,i):this.WF(t,n)),n},i.prototype.jF=function(t,i,n){return void 0===n&&(n=0),i[n]=v(t.x,t.y,this.NF),n+=1},i.prototype.WF=function(t,i){for(var n=0,e=0,r=t.length-1,s=this.NF;e=s&&s>=h.y)&&(i[n]=v(.5*(o.x+h.x),s,s),n+=1),i[n]=v(h.x,h.y,s),n+=1}return n},i.prototype.GF=function(t){for(var i=t.length,n=Array(i),e=Array(i),r=this.NF,s=0;sr?(n[s]=l(o.position,o.high),e[s]=l(o.position,r)):o.highn||i.y>e){if(!0===this.chart.ps.warnings){var r="HeatmapGridSeries.invalidateIntensityValues intensity matrix overflow.\nGrid "+this.Vm.columns+"x"+this.Vm.rows+", input "+i.columns+"x"+i.rows+".\nExcess data will be automatically clipped. This can result in sub-optimal performance.";wr.console.warn(r)}for(var s=[],o=0;oc||f>l){if(!0===this.chart.ps.warnings){r="HeatmapGridSeries.invalidateIntensityValues intensity matrix overflow.\nGrid "+this.Vm.columns+"x"+this.Vm.rows+", input "+i.columns+"x"+i.rows+" starting at ["+t.iColumn+","+t.iRow+"].\nOut of bounds data will be automatically clipped. This can result in sub-optimal performance.";wr.console.warn(r)}var d=Math.max(u-c,0),v=i.primary-d,y=Math.max(f-l,0);for(s=[],o=0;o0?-y:void 0);t={iColumn:t.iColumn,iRow:t.iRow,values:s}}this.ic[0].Wm({type:"intensity",lengthPrimary:t.values.length,lengthSecondary:t.values[0].length,startPrimary:h,startSecondary:a,values:t.values})}return this.an.emit("invalidateIntensity",this,t),this.wf.xn(),this},i.prototype.setFillStyle=function(t){return this.Ho.C(t),this.ic[0].$n(this.Ho.L()),this.an.emit("styleChange",this),this.wf.xn(),this},i.prototype.getFillStyle=function(){return this.Ho.L()},i.prototype.setCursorResultTableFormatter=function(t){return this.Mg=t,this.vr.engine.xn(),this},i.prototype.getCursorResultTableFormatter=function(){return this.Mg},i.prototype.yT=function(t){return this.an.on("invalidateIntensity",t)},i.prototype.ST=function(t){return this.an.off(t)},i}(BU),IU=function(t){function i(i,n,r,s,o,h,u,a,f,l,d,v){var y=t.call(this,i,n,r,s,o,h,u,a,f,d)||this;y.Mt="Scrolling Heatmap Grid Series",y.Mg=CU,y.DM=!1,y.vn=d;var S=v;y.Ho=new c(Ts(d.heatmapGridSeriesFillStyle,S,d.seriesFillStyle)),y.wa=new c(Ts(y.vn.heatmapGridSeriesWireframeStyle,S,ir));var m=e({scrollDimension:"columns",heatmapDataType:"intensity",start:{x:0,y:0},step:{x:1,y:1}},l);y.Vm=m;var b=[{type:"DataPattern",args:{pattern:"columns"===m.scrollDimension?m.step.x>0?"ProgressiveX":"RegressiveX":m.step.y>0?"ProgressiveY":"RegressiveY",regularProgressiveStep:!0}}];return y.Cc(y.wf.mT(y.scale,b,m).$n(y.Ho.D(y.Bf)).pa(y.wa.D(y.Bf))),y.setMouseInteractions(!1),y}return n(i,t),i.prototype.clear=function(){return this.ic[0].$h(),this.wf.xn(),this},i.prototype.setWireframeStyle=function(t){return this.wa.C(t),this.ic[0].pa(this.wa.D(this.Bf)),this.wf.xn(),this},i.prototype.getWireframeStyle=function(){return this.wa.L()},i.prototype.setPixelInterpolationMode=function(t){return t=t||"disabled",this.ic[0].Hm(t),this.wf.xn(),this},i.prototype.getPixelInterpolationMode=function(){return this.ic[0].jm()},i.prototype.setCursorInterpolationEnabled=function(t){return this.DM=t,this.wf.oo.xn(),this},i.prototype.getCursorInterpolationEnabled=function(){return this.DM},i.prototype.setDataCleaning=function(t){return this.ic[0].ca(t),this.wf.xn(),this},i.prototype.He=function(){return this.MS},i.prototype.ml=function(){return xs(this.Ho)},i.prototype.attach=function(i,n){return t.prototype.attach.call(this,i,n),ks(i,this.vn,{fill:this.Ho}),this},i.prototype.$n=function(t){var i=this;return this.Ho.C(t),this.ic.forEach((function(t){return t.$n(i.Ho.D(i.Bf))})),this.wf.xn(),this},i.prototype.solveNearestFromScreen=function(t,i){void 0===i&&(i=this.DM);var n=sr(t,this.wf.oo.Rt,this.scale),e=i?this.ic[0].ZF(n):this.ic[0].Pw(n);if(e)return KG(e,this.scale,this.Mg(new _G,this,{x:e.x,y:e.y,column:e.column,row:e.column,intensity:e.cellValue}).Xf(),this)},i.prototype.solveNearestFromSegment=function(t,i,n){void 0===n&&(n=this.DM);var e=sr(t,this.wf.oo.Rt,this.scale),r=n?i.ZF(e):i.Pw(e);if(r)return KG(r,this.scale,this.Mg(new _G,this,{x:r.x,y:r.y,column:r.column,row:r.column,intensity:r.cellValue}).Xf(),this)},i.prototype.pp=function(t){if(!(t instanceof Vo))throw new Error("HeatmapScrollingGridSeries can only be attached to a pair of Linear Axes.");if(t instanceof Vo&&t.Ei())throw new Error("HeatmapScrollingGridSeries can not be attached to a high precision Axis.")},i.prototype.getXMax=function(){return this.ic[0].Et()||0},i.prototype.getXMin=function(){return this.ic[0].zt()||0},i.prototype.getYMax=function(){return this.ic[0].Vt()||0},i.prototype.getYMin=function(){return this.ic[0].Nt()||0},i.prototype.eS=function(){var t,i,n=l(0,0);try{for(var e=o(this.ic),r=e.next();!r.done;r=e.next()){var s=r.value;n.x=Math.max(n.x,s.cu()),n.y=Math.max(n.y,s.lu())}}catch(i){t={error:i}}finally{try{r&&!r.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}return n},i.prototype.Ac=function(t,i){t.$n(this.Ho.D(i)).pa(this.wa.D(i)),this.wf.xn()},i}(WH),OU=function(t){function i(i,n,e,r,s,o,h,u,a,f,c,l){var d=t.call(this,i,n,e,r,s,o,h,u,a,f,c,l)||this;return d.Mg=CU,d}return n(i,t),i.prototype.addIntensityValues=function(t){var i=t.length,n=t[0].length,e=("columns"===this.Vm.scrollDimension?t.length:t[0].length,"rows"===this.Vm.scrollDimension?t.length:t[0].length,0+n-1),r=this.Vm.resolution-1;if(e>r){if(!0===this.chart.ps.warnings){var s="HeatmapScrollingGridSeries.addIntensityValues intensity matrix overflow.\nGrid resolution: "+this.Vm.resolution+", input "+i+"x"+n+".\nExcess data will be automatically clipped. This can result in sub-optimal performance.";wr.console.warn(s)}for(var o=[],h=0;h=4||Math.abs(c.fk.left-y)>=4||Math.abs(c.fk.right-S)>=4||Math.abs(c.fk.top-v)>=4)||t){c.fk={bottom:d,left:y,top:v,right:S},c.hg.oi(l(k,x));var D=c.getDefaultAxisX(),_=c.getDefaultAxisY();if(D&&_){var R=g(D.Rt.fi(),_.Rt.fi(),D.Rt.li(),_.Rt.li());c.Pg.rb(R),c.Dl.rb(R),c._l.rb(R),c.Hv&&c.Hv();var z=function(t){return function(i,n,e,r){return n._v(i),i+n.getHeight()*t}};c.wT.reduce(z(-1),0),c.gT.reduce(z(1),0),c.pT.reduce(z(-1),0),c.kT.reduce(z(1),0)}}else c.YT(!0)},c.addAreaSeries=function(t){var i=t&&t.xAxis?t.xAxis:c.getDefaultAxisX(),n=t&&t.yAxis?t.yAxis:c.getDefaultAxisY();jU(i,n);var e=t&&t.baseline?t.baseline:0,r=new(t&&t.type?t.type:bU.Positive)(c,c.JS,c.QS,c.Pg,i,n,c.XT(i),c.XT(n),c.qv,e,c.vn,void 0!==(null==t?void 0:t.automaticColorIndex)?t.automaticColorIndex:c.ZS.length);return c.im(r),r},c.addAreaRangeSeries=function(t){var i=t&&t.xAxis?t.xAxis:c.getDefaultAxisX(),n=t&&t.yAxis?t.yAxis:c.getDefaultAxisY();jU(i,n);var e=new wU(c,c.JS,c.QS,c.Pg,i,n,c.XT(i),c.XT(n),c.qv,c.vn,void 0!==(null==t?void 0:t.automaticColorIndex)?t.automaticColorIndex:c.ZS.length);return c.im(e),e},c.addHeatmapSeries=function(t){var i=t.xAxis?t.xAxis:c.getDefaultAxisX(),n=t.yAxis?t.yAxis:c.getDefaultAxisY(),r=t.type?t.type:FU.Grid;jU(i,n);var s=new r(c,c.JS,c.QS,c.Pg,i,n,c.XT(i),c.XT(n),c.qv,e({},t),c.vn,void 0!==(null==t?void 0:t.automaticColorIndex)?t.automaticColorIndex:c.ZS.length);return c.im(s),s},c.ZT=!1,c.KT=function(){(c.MT||c.AT)&&(c.GT=c.engine.setMouseStyle(c.zT))},c.qT=function(){c.ZT=!1,c.engine.restoreMouseStyle(c.GT)},c.JT=function(t,i,n){var e,r,s=Rr(null===(e=c.ps.overrideInteractionMouseButtons)||void 0===e?void 0:e.chartXYRectangleZoomFitMouseButton,0),o=Rr(null===(r=c.ps.overrideInteractionMouseButtons)||void 0===r?void 0:r.chartXYPanMouseButton,2);c.engine.restoreMouseStyle(c.GT);var h=c.Rf.oo.ds(i.clientX,i.clientY);n===s&&(c.MT||c.AT)?(c.QT(t,h),ss(i)):n===o&&c.TT&&(c.GT=c.engine.setMouseStyle(c.ET),ss(i))},c.$T=function(t,i,n,e,r){var s,o,h=l(i.clientX,i.clientY),u=Rr(null===(s=c.ps.overrideInteractionMouseButtons)||void 0===s?void 0:s.chartXYRectangleZoomFitMouseButton,0),a=Rr(null===(o=c.ps.overrideInteractionMouseButtons)||void 0===o?void 0:o.chartXYPanMouseButton,2);n===u&&(c.MT||c.AT)?(c.tC(t,e,h),ss(i)):n===a&&c.TT&&(c.iC(ao(r,-1)),ss(i)),c.Rf.xn()},c.nC=function(t,i,n,e){var r,s,o=Rr(null===(r=c.ps.overrideInteractionMouseButtons)||void 0===r?void 0:r.chartXYRectangleZoomFitMouseButton,0),h=Rr(null===(s=c.ps.overrideInteractionMouseButtons)||void 0===s?void 0:s.chartXYPanMouseButton,2);if(n===o&&(c.MT||c.AT)){var u=l(i.clientX,i.clientY);c.eC(t,e,u),ss(i)}else n===h&&c.TT&&ss(i);c.engine.restoreMouseStyle(c.GT),c.hg.getIsUnderMouse()&&(c.GT=c.engine.setMouseStyle(c.zT))},c.rC=function(t,i){if(c.FT){var n=c.Rf.oo.ds(i.clientX,i.clientY);c.zoom(n,l(Cs(i),Cs(i))),ss(i)}},c.sC=function(t,i,n,e,r,s){if(c.TT){var o=l(-(e.x+r.x)/2,-(e.y+r.y)/2);c.iC(o),ss(s)}if(c.FT){var h=c.engine.clientLocation2Engine(i.x,i.y),u=c.engine.clientLocation2Engine(n.x,n.y),a=co(l(Math.abs(h.x-e.x-(u.x-r.x)),Math.abs(h.y-e.y-(u.y-r.y))),l(Math.abs(h.x-u.x),Math.abs(h.y-u.y)));c.forEachAxisX((function(t){t.getChartInteractionZoomByWheel()&&t.ue(t.Rt.Li(t.getInterval().start,-a.x),t.Rt.Li(t.getInterval().end,a.x),!1,!0,"interactionZoom")})),c.forEachAxisY((function(t){t.getChartInteractionZoomByWheel()&&t.ue(t.Rt.Li(t.getInterval().start,-a.y),t.Rt.Li(t.getInterval().end,a.y),!1,!0,"interactionZoom")})),ss(s)}},c.oC=function(t,i,n){(c.AT||c.MT)&&(c.QT(t,i),ss(n))},c.hC=function(t,i,n,e,r){(c.AT||c.MT)&&(c.tC(t,i,n),ss(r))},c.uC=function(t,i,n,e){(c.AT||c.MT)&&(c.eC(t,i,n),ss(e))},c.setPadding({right:24}),c.aC=[zU.gridLine0,zU.gridLine1,zU.gridLine2].map((function(t){return r.qs(t)})),c.Dl=r.qs(zU.highlightersBelow),c.Pg=r.qs(zU.plotting),c._l=r.qs(zU.highlightersAbove),c.Pl=r.qs(zU.fg),c.bT.x.xi(0,c.uiScale.x.getCellSize()-(c.Qt.left+c.Qt.right+c.hh.left+c.hh.right)),c.bT.y.xi(0,c.uiScale.y.getCellSize()-(c.Qt.bottom+c.Qt.top+c.hh.bottom+c.hh.top)),c.bT.oi(c.uiScale.vi().x,c.uiScale.vi().y),c.hg=i.prototype.sg.call(c,c._f.Pc(c.bT)).$n(c.vn.seriesBackgroundFillStyle).Ys(c.vn.seriesBackgroundStrokeStyle).ph(l(0,0)).oi(l(c.bT.getInnerIntervalPixels().x,c.bT.getInnerIntervalPixels().y));var d=Rr(a?a.autoCursorBuilder:void 0,RH);c.og=d.tg(c.Rf,c.bT,c.bT,c.vn),c.addAxisX(a&&a.defaultAxisX),c.addAxisY(a&&a.defaultAxisY),c.onResize(c.WT),c.hy.Jn("ChartXY");var v=WE(new UE.Drag(c.oC,c.hC,c.uC,1),new UE.Pinch(Cr,c.sC,Cr));return c.onSeriesBackgroundMouseEnter(c.KT),c.onSeriesBackgroundMouseLeave(c.qT),c.onSeriesBackgroundMouseWheel(c.rC),c.onSeriesBackgroundMouseDragStart(c.JT),c.onSeriesBackgroundMouseDrag(c.$T),c.onSeriesBackgroundMouseDragStop(c.nC),c.onSeriesBackgroundTouchStart(v.onTouchStart),c.onSeriesBackgroundTouchMove(v.onTouchMove),c.onSeriesBackgroundTouchEnd(v.onTouchEnd),a&&!0===a.disableAnimations&&c.setAnimationsEnabled(!1),c.oy(u,c.bT),c}return n(r,i),r.prototype.getMinimumSize=function(){var t=this.bT.di(),i=this.bT.tn();return l(Math.max(t.x+RU.x,this.hy.isDisposed()?0:this.hy.Fe().vi().x/i.x),t.y+RU.y+this.yy())},r.prototype.getSeries=function(){return this.ZS},r.prototype.addChartMarkerXY=function(t,i,n){void 0===t&&(t=zH);var e=new HH(this.Rf,this.uiScale,i||this.getDefaultAxisX(),n||this.getDefaultAxisY(),t,this.rp,this.sp,this.vn);return this.ey(e),e},r.prototype.addAxisX=function(t){var i,n=HU(t),e=n.opposite,r=n.type;(i="linear"===r.type?this.zv.d1({dimension:"x",scale1DConstructor:zo}):"linear-highPrecision"===r.type?this.zv.d1({dimension:"x",scale1DConstructor:zo}).zi():this.zv.d1({dimension:"x",scale1DConstructor:Co}).Ci(r.base)).oi(this.bT.x.vi());var s=e?this.gT:this.wT,o=new uV(this._f,this.aC,this.Pl,this.Rf,this.Dl,this._l,i,this.bT.y,nW,this,e?100:0,this.Rl,this.zl(s),this.UT,this.vn,!this.Mn,r);return s.push(o),this.Rf.xn(),o},r.prototype.addAxisY=function(t){var i,n=HU(t),e=n.opposite,r=n.type;(i="linear"===r.type?this.zv.d1({dimension:"y",scale1DConstructor:zo}):"linear-highPrecision"===r.type?this.zv.d1({dimension:"y",scale1DConstructor:zo}).zi():this.zv.d1({dimension:"y",scale1DConstructor:Co}).Ci(r.base)).oi(this.bT.y.vi());var s=e?this.kT:this.pT,o=new uV(this._f,this.aC,this.Pl,this.Rf,this.Dl,this._l,i,this.bT.x,eW,this,e?100:0,this.Rl,this.zl(s),this.UT,this.vn,!this.Mn,r);return s.push(o),this.Rf.xn(),o},r.prototype.dispose=function(){return this.Pg.ro(),this.Pl.ro(),this.aC.forEach((function(t){return t.ro()})),this._l.ro(),this.Dl.ro(),this.eT().forEach((function(t){return t.dispose()})),vV(this.bT),i.prototype.dispose.call(this)},r.prototype.getDefaultAxisX=function(){return this.wT[0]?this.wT[0]:this.gT[0]},r.prototype.getDefaultAxisY=function(){return this.pT[0]?this.pT[0]:this.kT[0]},r.prototype.getDefaultAxes=function(){return[this.getDefaultAxisX(),this.getDefaultAxisY()]},r.prototype.getAxes=function(){for(var i=this,n=[],e=0;e0?new Set(n):EU;return Ir(Array.from(r).map((function(n){switch(n){default:case t.AxisPosition.Top:return i.gT;case t.AxisPosition.Bottom:return i.wT;case t.AxisPosition.Left:return i.pT;case t.AxisPosition.Right:return i.kT}})))},r.prototype.fC=function(t){var i;return this.forEachAxisX((function(n){i=t===n?"x":i})),this.forEachAxisY((function(n){i=t===n?"y":i})),i},r.prototype.forEachAxisX=function(t){this.wT.forEach(t),this.gT.forEach(t)},r.prototype.forEachAxisY=function(t){this.pT.forEach(t),this.kT.forEach(t)},r.prototype.Tf=function(){var t,n,e,r,s,h;i.prototype.Tf.call(this);try{for(var u=o(this.ZS),a=u.next();!a.done;a=u.next()){a.value.CS()}}catch(i){t={error:i}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}try{for(var f=o(this.ZS),c=f.next();!c.done;c=f.next()){c.value.Tf()}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=f.return)&&r.call(f)}finally{if(e)throw e.error}}this.forEachAxis(NU),this.ug(),this.YT(),i.prototype.sy.call(this);try{for(var l=o(this.ZS),d=l.next();!d.done;d=l.next()){d.value.BS()}}catch(t){s={error:t}}finally{try{d&&!d.done&&(h=l.return)&&h.call(l)}finally{if(s)throw s.error}}this.le()},r.prototype.bi=function(){for(var t=0;t=10;s&&u&&o.x===e.x&&this.MT?(this.LT.$n(this.PT).Ys(this.DT),this.IT.na(ir),this.OT.na(ir),this.GT=this.engine.setMouseStyle(this.NT,this.GT)):s&&u&&h.x===e.x&&this.AT?(this.LT.$n(this._T).Ys(this.RT),this.IT.na(this.RT).ha(e).Ku(r),this.OT.na(this.RT).ha(l(e.x,r.y)).Ku(l(r.x,e.y)),this.GT=this.engine.setMouseStyle(this.VT,this.GT)):(this.LT.Ys(ir).$n(Re),this.IT.na(ir),this.OT.na(ir),this.engine.restoreMouseStyle(this.GT)),this.Rf.xn()},r.prototype.eC=function(t,i,n){var e=this;if(this.ZT){var r=sr(this.engine.clientLocation2Engine(i.x,i.y),this.Rf.oo.Rt,this.bT),s=sr(this.engine.clientLocation2Engine(n.x,n.y),this.Rf.oo.Rt,this.bT),o=Gs(s.x,this.bT.x.getInnerStart(),this.bT.x.getInnerEnd())&&Gs(s.y,this.bT.y.getInnerStart(),this.bT.y.getInnerEnd()),h=this.LT.kh(),u=fo(h,this.LT.vi()),a=Math.min(this.LT.vi().x,this.LT.vi().y)>=10;o&&a&&Br(h.x,r.x)&&this.MT?(this.forEachAxisX((function(t){if(t.getChartInteractionZoomByDrag()){var i=sr(h,e.bT,t.Sv).x,n=sr(u,e.bT,t.Sv).x;t.ue(i,n,!0,!0,"interactionSetInterval")}})),this.forEachAxisY((function(t){if(t.getChartInteractionZoomByDrag()){var i=sr(h,e.bT,t.Sv).y,n=sr(u,e.bT,t.Sv).y;t.ue(i,n,!0,!0,"interactionSetInterval")}}))):o&&a&&Br(u.x,r.x)&&this.AT&&this.forEachAxis(GU)}this.LT.Ys(ir).$n(Re),this.IT.na(ir),this.OT.na(ir),this.ZT=!1,this.Rf.xn()},r.prototype.pan=function(t){this.forEachAxisX((function(i){i.stop().pan(t.x)})),this.forEachAxisY((function(i){i.stop().pan(t.y)}))},r.prototype.iC=function(t){this.forEachAxisX((function(i){i.getChartInteractionPanByDrag()&&i.stop().pan(t.x)})),this.forEachAxisY((function(i){i.getChartInteractionPanByDrag()&&i.stop().pan(t.y)}))},r.prototype.zoom=function(t,i){this.forEachAxis(VU),this.forEachAxisX((function(n){n.zoom(n.Rt.Dt(t.x),i.x)})),this.forEachAxisY((function(n){n.zoom(n.Rt.Dt(t.y),i.y)}))},r.prototype.cC=function(t,i){this.forEachAxis(VU),this.forEachAxisX((function(n){n.getChartInteractionZoomByWheel()&&n.zoom(n.Rt.Dt(t.x),i.x)})),this.forEachAxisY((function(n){n.getChartInteractionZoomByWheel()&&n.zoom(n.Rt.Dt(t.y),i.y)}))},r.prototype.setAnimationsEnabled=function(t){return this.Mn=!!t,this.forEachAxis((function(i){return i.setAnimationsEnabled(t)})),this},r.prototype.getAnimationsEnabled=function(){return this.Mn},r.prototype.disableAnimations=function(){return this.setAnimationsEnabled(!1),this},r.prototype.Fl=function(){var t=[];return this.forEachAxis((function(i){return i.Tv((function(i){return t.push(i)}))})),i.prototype.Fl.call(this).concat(t)},r.prototype.eT=function(){return this.BT},r.prototype._r=function(){return this.Sy(this.Pg)},r.prototype.setMouseInteractionsWhileScrolling=function(t){return this.cb=t,this},r.prototype.getMouseInteractionsWhileScrolling=function(){return this.cb},r.prototype.setMouseInteractionsWhileZooming=function(t){return this.CT=t,this},r.prototype.getMouseInteractionsWhileZooming=function(){return this.CT},r.prototype.forEachAxis=function(t){this.forEachAxisX(t),this.forEachAxisY(t)},r.prototype.le=function(){mG(this,this.ZS)},r}(rH),YU=function(t){return t instanceof KH||t instanceof dU||t instanceof wU||t instanceof LU||t instanceof sU||t instanceof _W},XU=function(){function i(i,n,r,s,a,f,c,l,d){var v,y,S=this;this.ps=i,this.an=new qe,this.lC=new Map,this.ZS=new Map,this.dC=function(t,i){var n=t.series;S.vC&&(i instanceof wU||i instanceof _W||i instanceof LU||i instanceof KH||i instanceof dU||i instanceof sU)&&S.vC(n,i)},this.yC=function(t){var i=t.map((function(t){return t.Un.type}));if(1!==u([],h(new Set(i))).length)throw new Error("All ZoomBandChart axes must be of the same type")},this.SC=function(t,i){0!==S.ZS.size&&void 0!==u([],h(S.ZS.values())).find((function(t){return!1===t.series.isDisposed()}))||S.mC.ue(t,i,!1,!1,"zoomBandChart")},this.attachedAxes=Array.isArray(a)?a:[a],this.attachedAxis=this.attachedAxes[0],this.yC(this.attachedAxes);var m=this.attachedAxes[0].chart.fC(this.attachedAxes[0])||"x";this.bC=m,this.zf="x"===m?Qj:$j;var b=this.attachedAxes[0].onScaleChange(this.SC);this.gC=function(){return S.attachedAxes[0].offScaleChange(b)};var g,w=this.zf.toVec2("linear"===(g=this.attachedAxes[0].Un).type||"linear-highPrecision"===g.type?g:{type:"logarithmic",base:"number"==typeof g.base?g.base:"e"===g.base?"e":function(){throw new Error("Unhandled logarithmic base: "+g.base)}()},void 0),p=w.x,k=w.y;this.wC=new UU(i,n,r,s,c,e(e({},l),{defaultAxisX:p,defaultAxisY:k}),d).setTitle("Zoom Band Chart").setMouseInteractions(!1).setAutoCursorMode(t.AutoCursorModes.disabled),this.engine=this.wC.engine;var x=this.wC.getDefaultAxisX().setMouseInteractions(!1),M=this.wC.getDefaultAxisY().setMouseInteractions(!1);this.mC=this.zf.getWidth({x:x,y:M}).setScrollStrategy(Ho.fitting).setAnimationScroll(!1),this.pC(this.zf.getHeight({x:x,y:M})),this.mC.he(this.attachedAxes[0].oe()),this.band=this.mC.addBand(f),this.kC(this.band,this.attachedAxes);for(var A=0;A1&&ar.apply(void 0,u([],h(i))),i[0].onScaleChange((function(i,n){if(!r){s=!0;var o=wr.performance.now();e=o,t.setValueStart(i).setValueEnd(n),requestAnimationFrame((function(){return requestAnimationFrame((function(){e!==o||(s=!1)}))}))}})),t.onValueChange((function(t,e,o){if(!s){r=!0;var h=wr.performance.now();n=h,i[0].ue(e,o,!1,!0,"zoomBandChart"),requestAnimationFrame((function(){return requestAnimationFrame((function(){n!==h||(r=!1)}))}))}}))},i.prototype.yd=function(t){var i=this.zf.getHeight({x:t.axisX,y:t.axisY}),n=this.lC.get(i);n||(0===this.lC.size?n=this.zf.getHeight({x:this.wC.getDefaultAxisX(),y:this.wC.getDefaultAxisY()}):(n=this.zf.getHeight({x:this.wC.addAxisX.bind(this.wC),y:this.wC.addAxisY.bind(this.wC)})(),this.pC(n))),this.lC.set(i,n);var r,s,o=this.zf.getWidth({x:this.mC,y:n}),h=this.zf.getHeight({x:this.mC,y:n});if(t instanceof wU){var u=r=this.wC.addAreaRangeSeries({xAxis:o,yAxis:h});u.add(t.Lp());var a=t.Ip((function(t,i,n){return u.add(i)}));s=function(){return t.Op(a)}}else if(t instanceof _W){var f=t.wt,c=r=this.wC.addStepSeries({mode:f,xAxis:o,yAxis:h});c.add(t.Lp());var l=t.Ip((function(t,i,n){return c.add(i)}));s=function(){return t.Op(l)}}else if(t instanceof LU){var d=e(e({},t.fT),{xAxis:void 0,yAxis:void 0}),v=this.wC.addHeatmapGridSeries(d);r=v;var y=function(){v.setWireframeStyle(t.getWireframeStyle()).setPixelInterpolationMode(t.getPixelInterpolationMode()).setFillStyle(t.getFillStyle())};y();var S=t.dT(y);t.lT(v);var m=t.yT((function(t,i){v.invalidateIntensityValues(i)}));s=function(){t.vT(S),t.ST(m)}}else{var b=this.wC.addLineSeries({xAxis:this.zf.getWidth({x:this.mC,y:n}),yAxis:this.zf.getHeight({x:this.mC,y:n})});if(r=b,t instanceof sU){var g=function(t){for(var i=[],n=t.length,e=0;e=0&&cf:l100-d||-1===a&&f<0+d){h.fill(0);break}h[c]=f-l,f+=d*a}return h},$U=function(){function i(i,n,e,r,s){var o=this;this.ps=i,this.MC=n,this.AC=r,this.FC=new Array,this.an=new qe,this.TC=[],this.Nv=[],this.CC=void 0,this.BC=void 0,this.LC=function(t){var i=h(t,2),n=i[0],e=i[1];o.uiScale.oi(n,e),o.engine.xn()},this.IC=function(){for(var t=function(t,i,n){var e=WE(new UE.Drag(n?o.OC:o.PC,(function(t,e,r,s,h){o.DC(s,i,n),ss(h)}),n?o._C:o.RC));t.setMouseEnterEventHandler(n?o.OC:o.PC).setMouseLeaveEventHandler(n?o._C:o.RC).setMouseDragEventHandler((function(t,e,r,s,h){o.DC(h,i,n),ss(e)})).setTouchStartEventHandler(e.onTouchStart).setTouchMoveEventHandler(e.onTouchMove).setTouchEndEventHandler(e.onTouchEnd);var r=o.zC.L();r instanceof nr&&r.fillStyle instanceof Qe&&n?t.na(r.setFillStyle(r.fillStyle.setAngle(90))):t.na(r),t.dispose()},i=0;i=0&&o.TC.splice(i,1)},this.Yv=function(t){var i=o.Nv.indexOf(t);i>=0&&o.Nv.splice(i,1)},this.UC=function(t){o.TC.includes(t)||o.TC.push(t)},this.Zv=function(t){o.Nv.includes(t)||o.Nv.push(t)},this.YC=function(t,i,n,e,r){if(o.XC(i,n,e,r)){var s={panel:t,columnIndex:i,rowIndex:n,columnSpan:e,rowSpan:r};return o.FC.push(s),o.ZC(i,n,e,r),o.KC(s),t}throw new fr("Out of dashboard range.")},this.EC=n.numberOfRows,this.GC=n.numberOfColumns;var u=this.EC*this.GC;this.VC=new Array(this.EC-1),this.HC=new Array(this.GC-1),this.qC={x:new KU(new Array(this.GC).fill(1)),y:new KU(new Array(this.EC).fill(1))},this.vn=n.theme||Gz,this.zC=new c(this.vn.dashboardSplitterStyle),this.JC=!!n.disableAnimations,this.QC=ZU(e,u+1,1),this.NC=e.$v(0),this.$C=this.QC(u).Jv,this.Qv=e.$v(Number.MAX_SAFE_INTEGER-1);var a=e.vi();this.uiScale=er.d2({scaleXYConstructor:Vo}).qi(0,100).Ji(0,100).oi(a),this.tB=e.iB.bind(e),this.nB=e.eB.bind(e),this.rB=e.sB.bind(e),this.oB=e.hB.bind(e),this.Gs=e.Gs.bind(e),this.js=e.js.bind(e),this.engine=e.Ls,this.IC(),e.io(this.LC),e.xn(),this.uB();var f,d,v=(f=this.an,d="dashboard-resize",{on:f.on.bind(f,d),off:f.off.bind(f)});this.createChartXY=function(t){var i=tY(t,o.MC,o.JC);return o.YC(new UU(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,i,v),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createSpiderChart=function(t){var i=tY(t,o.MC,o.JC);return o.YC(new Jj(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,i,v),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createPolarChart=function(t){var i=tY(t,o.MC,o.JC);return o.YC(new ij(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,i,v),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createPieChart=function(t){var i=tY(t,o.MC,o.JC),n=i&&i.type?i.type:GV;return o.YC(new n(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,v,i.theme),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createGaugeChart=function(t){var i=tY(t,o.MC,o.JC),n=i&&i.type?i.type:Mj;return o.YC(new n(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,v,i.theme,i.disableAnimations),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createFunnelChart=function(t){var i=tY(t,o.MC,o.JC),n=i&&i.type?i.type:dj;return o.YC(new n(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,v,i.theme),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createPyramidChart=function(t){var i=tY(t,o.MC,o.JC),n=t&&t.type?t.type:Pj;return o.YC(new n(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,v,i.theme),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createUIPanel=function(t){var i=tY(t,o.MC,o.JC);return o.YC(new yV(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,v,i.theme),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createLegendBoxPanel=function(t){var i=tY(t,o.MC,o.JC);return o.YC(new CG(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,v,i.theme),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createZoomBandChart=function(t){var i=tY(t,o.MC,o.JC),n=void 0===i.bandAboveSeries||i.bandAboveSeries;return o.YC(new XU(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,i.axis,n,s,i,v),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createMapChart=function(t){var i=tY(t,o.MC,o.JC);return o.YC(new sH(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,i,v),i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)},this.createChart3D=function(t){var i=tY(t,o.MC,o.JC),n=new FG(o.ps,o.QC(o.aB(t.columnIndex,t.rowIndex)),o.fB(i,o.qC),o.jC,s,v,i);return o.YC(n,i.columnIndex,i.rowIndex,i.columnSpan,i.rowSpan)}}return i.prototype.aB=function(t,i){return t+i*this.GC},i.prototype.fB=function(t,i){var n=this;return{d1:function(e){return new e.scale1DConstructor("x"===e.dimension?t.columnIndex:t.rowIndex,"x"===e.dimension?t.columnSpan:t.rowSpan,"x"===e.dimension?n.GC:n.EC,"x"===e.dimension?i.x:i.y)},d2:function(e){return(new e.scaleXYConstructor).Pt({x:t.columnIndex,y:t.rowIndex},{x:t.columnSpan,y:t.rowSpan},{x:n.GC,y:n.EC},i)}}},i.prototype.setWidth=function(t){return t instanceof Array||(t=[t,t]),this.tB(t[0]),this.nB(t[1]),this},i.prototype.setHeight=function(t){return t instanceof Array||(t=[t,t]),this.rB(t[0]),this.oB(t[1]),this},i.prototype.getWidth=function(){return this.Gs()},i.prototype.getHeight=function(){return this.js()},i.prototype.setBackgroundFillStyle=function(t){return this.engine.setBackgroundFillStyle(t),this.NC.xn(),this},i.prototype.getBackgroundFillStyle=function(){return this.engine.getBackgroundFillStyle()},i.prototype.setBackgroundStrokeStyle=function(t){return this.engine.setBackgroundStrokeStyle(t),this.NC.xn(),this},i.prototype.getBackgroundStrokeStyle=function(){return this.engine.getBackgroundStrokeStyle()},i.prototype.getTheme=function(){return this.vn},i.prototype.setSplitterStyle=function(t){var i=this.zC.D(!1);return this.zC.C(t),this.cB(i),this},i.prototype.getSplitterStyle=function(){return this.zC.D(!1)},i.prototype.setSplitterStyleHighlight=function(t){var i=this.zC.D(!1);return this.zC.I(t),this.cB(i),this},i.prototype.getSplitterStyleHighlight=function(){return this.zC.D(!0)},i.prototype.cB=function(t){var i,n,e,r,s=h([this.zC.D(!1),this.zC.D(!0)],2),u=s[0],a=s[1];try{for(var f=o(this.HC),c=f.next();!c.done;c=f.next()){(v=c.value).na(v.ea()===t?u:a)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=f.return)&&n.call(f)}finally{if(i)throw i.error}}try{for(var l=o(this.VC),d=l.next();!d.done;d=l.next()){var v;(v=d.value).na(v.ea()===t?u:a)}}catch(t){e={error:t}}finally{try{d&&!d.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}this.uB()},i.prototype.setColumnWidth=function(t,i){var n=this.qC.x.S();t>=0&&t=i.length)throw new fr("Column index is out of dashboard range.");return i[t]},i.prototype.setRowHeight=function(t,i){var n=this.qC.y.S();t>=0&&t=i.length)throw new fr("Row index is out of dashboard range.");return i[Math.abs(i.length-1-t)]},i.prototype.DC=function(t,i,n){var e,r;n&&Math.abs(t.x)>0?this.lB(i,t.x):!n&&Math.abs(t.y)>0&&this.dB(i,t.y),this.an.emit("dashboard-resize");try{for(var s=o(this.FC),h=s.next();!h.done;h=s.next()){h.value.panel.gi()}}catch(t){e={error:t}}finally{try{h&&!h.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}this.engine.xn()},i.prototype.dB=function(t,i){var n=this,e=QU(this.FC,this.VC,t,i,this.uiScale.y.getPixelSize(),!1),r=[],s=0;e.forEach((function(t,i){var e=n.VC[i].ji();if(e){var o=e.y+t;n.VC[i].ha(l(0,o)),n.VC[i].Ku(l(100,o));var h=(o-s)/100;r[i]=h,s=o}})),r[this.EC-1]=1-s/100,this.qC.y.l(r)},i.prototype.lB=function(t,i){var n=this,e=QU(this.FC,this.HC,t,i,this.uiScale.x.getPixelSize(),!0),r=[],s=0;e.forEach((function(t,i){var e=n.HC[i].ji();if(e){var o=e.x+t;n.HC[i].ha(l(o,0)),n.HC[i].Ku(l(o,100));var h=(o-s)/100;r[i]=h,s=o}})),r[this.GC-1]=1-s/100,this.qC.x.l(r)},i.prototype.ZC=function(t,i,n,e){var r=i-1,s=i-1+e,o=t-1,h=t-1+n;r>=0&&this.VC[r].restore(),s=0&&this.HC[o].restore(),h=0&&t>=0&&i+e<=this.EC&&t+n<=this.GC},i.prototype.KC=function(t){var i=this.zC.L(),n=i===ir?0:i.thickness/2,e={left:t.columnIndex>0?n:0,top:t.rowIndex0?n:0};t.panel.Lh(e)},i.prototype.uB=function(){var t,i;this.uiScale.x.ai([0,0]),this.uiScale.y.ai([0,0]);try{for(var n=o(this.FC),e=n.next();!e.done;e=n.next()){var r=e.value;this.KC(r)}}catch(i){t={error:i}}finally{try{e&&!e.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this.engine.xn()},i}(),tY=function(t,i,n){var r,s,o=e(e({},t),{columnSpan:t.columnSpan||1,rowSpan:t.rowSpan||1,theme:t.theme||i.theme,disableAnimations:void 0!==t.disableAnimations?t.disableAnimations:n});return o.rowIndex=(r=o.rowIndex,s=o.rowSpan,i.numberOfRows-(r+s)),o},iY=150,nY=31,eY="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAfCAMAAAAyYMTAAAAC/VBMVEUAAABcXE1CQkJDQEDg4uLb3NyOjY3a2trq7OxCQUHZ2dkvLy9BPz/R0dE/Pz9FRETHx8ejo6PX2Ng+PT1FRUWrqqrIycm5urpCQUHq6urKyspDQkLh4uLO0NDR0tJ/f3/i4+NgXl7q6+vq6urj5uZAQEDm5+fCw8OOjY2Hh4f6yQJHRUKcnJzMzMxOSz9paGiAgIDY2dlTUVFGRUXa29vY2dnr6+vW19fr6+tBQUFERETo6+vY2NhAQEA/Pz92dnaoqKjn6OjR0tLP0NCmpqaSkpLQ0dHDxMRbWlqGhobBwsKNeSlmZmZFQ0PY2dno6OixsbHb29udnZ3m5uZFREPj5OSWlpbDw8NFRENmZmbIycnb3NzWrg+KiorZ2tq1tbXCoBbT1NReVjpiWTh2aDHX2Nh2dXXZ2trMzMxEQkJZWVne399FRERNTEzf4eFISEhAQEA8PDzU1NSLi4v9ywJFREPW1tb2xgPovAiYmJjf4OB6enrftAyLi4tLSEG6u7t2dnZ6enpWUDzLzMylpqZXV1fFxcWXmJiRkZFDQ0Oenp7o6ura2tqAgIB0c3OgoaHX19fh4uLa29taWFi8vr5oZmadnZ1UU1O9vb28vLzvwAbf39+KiYl1dHTLzMyEg4PitgvMpxLIpBSampq7u7uxlBu3t7epjR9pXzXg4eGFhYXg4OCoqKi8vb2FhYX+zABiYWHDxMT8ygFaWlrFxcWnp6ff4eHExcVjZGShoqKDgoLp7Oy3t7fHx8fW2NjruwCniDV6enrT09O8nBhxcHBmXDechCOCcC2ysrJkY2NQT09wb2/R0tKbm5tcXFzm6OhJSUnr6+v9zABtYjL8ygB8fHxiYmJnZ2ehoaGtra3+zADc3d3HpRRPT0+Hh4f9ywB6enr8ywCTk5P8zAD6zABEQ0Pr7Oz+zADo6enNzc3j4+Pb29vFxcXe39/W1ta3t7dvbm7+/v7q6+u9vb1cW1tPTk7IyclFREOWlZV+fn5mZmb29vZXVlbv7+9HRka4S7StAAAA5XRSTlMAAmJE1Sn+DGhPEgciCC38BfljGQ397u1dL/VZIRz+0sycUUUcFP37+ff14dnV1dTGxKGYkFlXQTw6NjU1MSn8+/f27OLh29nX1NLAmGhNS/769vTw7+/r5+Xf3dnX0NDOy8fFwLauqZ6HhHh2cnFCPRAP/Pr49e/m4+Hg397b2dXRzczMwsC1p6eknp6ckIKAfWdkYk8oHfzy7ezr6OLi4dPRy8nIxcXDvbq1tLOrqKWjmZiOjYd3dW1jXkw9LwwF497LyMTCwLq4rqmclpORj2NdWEdDPy7o2MGypYeBenZSS0AsNPhBGgAAB1RJREFUWMPFmHVUFGEQwGc5OC7xOE/lEFBJQWyQFFQQEAW7u7u7u7u7u7u7u7tzZ/eOUux8fvvtofhO78zn74+b2Xuzb383M7vv3YIA0yYf+wNqtFTC32SSPRA0E+AnaMlaYCQVh+/ieigmZpgd/AL5zwHBPrsErOKVhbWEA/P4/hP4LnY5irYs5Dz9V7Ty/LRWe9acLAVMyesCd7qv3w8/0nIAiG0GsE+bqAZNEAAEqUkTXYRvghhSoAgK1IAiMFAhjC4xUJGh1T4xsBMowoU8HL6PhDVnxUIa+h1fwPldArCkNfgIBMTX7Zl9GhM1FZhuIwACVsGE+DLR8Qyc6b+k5+TwmLqls08DTeEhfatHiVpRgxeXdp6miFKRbRvi9RNaWehEq8zihHY14jhu0WWwpMUEzrsQXmukjlkTDWtXQXh2R4BDRVzmjdQp+4+FFiWKKr0axkXA+GjQRifAVIOo1S0uBNb4Q/xYgIZxYF0r36JGQijLcUuJYh+uy/EsNha03ObF1I/L2m5OR5LPVAWVYCb0dnbY11+uzbFdq23aF1rMVYK62yittvVM1Zi5mXZLTsZdoeMUR3Ct1ca61tHu3GFBzo+0KR+7guOOsqwFLbLybXLqYMIckrtUb69xDm14Kn5c6/nKSdlyEYZCi4EAilK9SV4zYtiRb1c+PEcEOaFd36zWtKosJTZdarDsco5wrGsPrk8WK1oOQtBWAoDE6OKwZF2s0/aeDU9BYgkGCFSLKTWZ5hvrAkCMqOVMtAJvqMjYGw4FK1qDenACTdgCNPqRSTZmf0ZL4byTcalXUwlTfPyzuvrEOoEm+3hGk6igWnDipj3YhcNen2nqgFKiVmp9e0W9mgzsndE/p2WtrsSCUuf1Qo6b1Z2mrGUtV3+qBbuy1YovKCeXy1EQoH4k2bSrjrXyD2kD28kxHChdvdaSkwAjZsYW8t8MBPWQXNVjBwhC2ecqLWr1q8NlIPg1oXNsZEULQnRizOrkRFckIpTkEiB45bTpwICyAxAYSYK8o1BtE+El/o7iug42EYJfVFGwpNXEj8tMj66Nad9ErX+HNrqDBa0aDTjKguWcyAq2SheOG8T+a609ccyPtRrN4iiHq9Sgkd6ADbiFrEnrv7B/U8ZOUZmMnWrCDfqvWpc4il9jltBYvBfp8579r1rrxbXqJz4munMZO5XPTEsjk9FV0MvCIINgmSdQ3GVq+IKHzAXM8XS/KJPtFivN0ciKCYEJ81ALM+zCERpUYUWOkdyUmmnpsSK9cZrjYsigHo4DSmWjHL7Qi377Lfaj05HgrKKV5tihT1ZidX7NiGGuAA9NayUiPOEL/EhrN85QCXG87wbIoCqfIHYCXxWHLwz3NR/9Skz1Pdi7d0FXTCaV5hRDR4b0eV3+wbtO0BnStTLxus9SMXn3lI18+zbyUyatMViJDjG37XTQj85ta2s7RYF8bduV5WFbL0yx3RJsS1itBxfbprrWJM09RgEQRiv3lEfjUC86YFKZ+7YemNxCxUQG2pG40m51VaxoOwUmjYuKybkMDvhxPb5pT5N+YsyW9OKZm+HZ00xa9bCu2JhUiQfPG5KN2CwYUwypyF9f64avKhyciKmGJCyldMcKHeuhm8GI9aFYOv8q2RvLrcYSKhBoTYpSSJGi+vPnyTxuhcKYZsDFsUk4o8IGcF02/OyWEXCFu3WZzQwdp0nr6YtvtCrjaSGUx7TpVfmaCfKKfFsZVnOyqYg7sg7GgaERTXGA0w5MLR6A1ch0izqNwmyKksaaNnJvY86qWAYoYlFSKIRIJPL66A+z0+9uxDKq2ekXQsly3Vt2ZrgcNm06IGHNoFov36e9fPryq5Yn8m2FOBErEbPi0AndJM2xEDAljTmhNrYim04+7PC5qjAWUqAhBNphtYtCk1ww+TpiM6DUpkU+quDclUuW5LGMmk+VPBrQyp53k4CASj4d4ArAj7TYd7zhZaaVd8cUifhz67ZGR4BgTPOqjeWEizow3ily0PBJcrq5s7FcMFbQAZEOwJ7CmSXUiGNBgPEmRe7o2Kmkt+ObNylYLgzTSJOAhq9Y0GI/pBozdWsb4sYwvd6+F57Wopu+kwwrQWXSqPKYTemJKVdpoyAA+6p5oxNpFACR3oLOdp22YWnohqWKeXh4uJiKSpdHn/Y6nbe3zW6sJN6IPmprWtKPwm7hu292qzBSdvF8gr0bTct4kkbBRHJReyPiMKFRpKpZGHkEZEzXtSISyMHOFJoMdzcV6dNR4FXoGHHpghBxq5X/iW/ev00mK/+mM9FyAhNnfX19O3fuPNnfNwSuzc8rTcJyntUilbBTehLgQV5pwT3SggCjpG3t8kYqt0rPgdr/rQNMnZNXauTJ4k0mp0ilG/aaimCscCiN1I2XbgaBdXlJYvlf9VODweD4MtlgePWBdQBz9DKZ7Dwmy8EqwaRyNKaFgBl//A7CnOaImJ4cx4BVCguVz4cy8Ev85huba0WKFCnaVgfWmSpUJijh1/gMHDQcrlbMjHoAAAAASUVORK5CYII=",rY=150,sY=31,oY="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAfCAMAAAAyYMTAAAABFFBMVEUAAACEhITm7OygnZ3c3986OjrKy8vW1tYiIiI5OTnf399DQ0Onp6fX19eHh4fOzs7j4+OWlpaRkZGrrq6kpKShoqKhoaG/v78rKyt3d3d8e3ucmpq1tbV3d3dbW1t/f3+bm5vIycmCgYG4ubmVlZWNiYl0dXXR0dGCgYHExcU+Pj6hn5+UlJRta2uDg4O5ubmvr6+8vb2oqamnqqpISEhJSUmopqa6urqSlJSxsbHo6Ohsamre3t6FhIRfX1+BgYGKiorExMSVlZWbmZmgoKCoq6u5urpTUVFzc3NgYGDm5+fHx8fAwMCurq7T1dVMS0vExMSHhoZqaWmSkpKwsLDk5OR2dnasrKyMjIyenp6SkpKloaEjfdvjAAAAXHRSTlMAJydHDgolBwMOCQgCEw4FDENAPkM1JSQGMStFODQXCi0eNyolPSclLxkXRColGwk7MCkkFRFBPjUlJCklNCYiFQ48ODEtNSIfHBpIQTQgG0Q7LiAeFgUWET0wPfWkCs4AAAXUSURBVFjDxZiJUhpBEIZ7d3bZ2+VmWYRwX3IrIKAiKIJJjPeR5P3fIz0zELSIoKlY+avc7hn/Gb7paaEEmJ6GwisaHsM/lWSyYL3FeyysUQ1elx3JZO5seId6CRZC8marKqzVA+iWAn+Usl/eq47Vj8H69CeY7CIJp/qfTXgNywBIzjAZ6Tisz39sezGjmHUvgOn1sh0w/MaiUyY7bf0dWLsFDhc5EPsSwDqsSBWslls8fYCJDJCpAVgzsHbzxRZAKRmOavVI3g09AKQE93Qyx+oJxdCDGXIAJEF9O1ZfDFM4URQLW7AWyzvZUyZlFW6LcDeEeiiNaJd2qwzwowaldBnU1NSB40OQim2Q/XOsqQG3LrRqCDuFzVjZQpiGiCh6MByIYk9Yh/V9kqlMVSuqYj5W9UOwBieOkpRH+yNJSrlQGqDr4laSrH2H5a1lb9Wv1dEh2JP2Zqxwn+FkRVSWFgsh11ar3NYArChtqBMZTozIZThhuSBd51FTKFUBzNAA8yPnrvqi5XGxgwssV92I5aE4ixjBmzwQNmAZNEhpfOg/DAjPWtrITV2CnuYGxEIGjecuPjJLLG9Rhd1Z5BI2YGGpqHpCWGTCm9x9E5Y5fgL72xHAaOyq9jiJGCfHCGpyrNskOutQz9lgheZYFTDpgjqaN2AhBdOBUBDFfp+n67HsosHi1uGkdSRjso8vVblRcU+cybbhkWKB+6MVPgeo7beGwh5QVfKnrYFG+W5gLVb2QFyI8vXYPYY3YIE8j6qmqTQ6BubyfIZGmds0WWXBUfk5DBVzQGXKa7F64gv1+XuDwLE+TqOivAYrW5jfn4cF1lO0WB+OVZ/C61i7fQ5T4O8MvKcKOJxj/R99XvQUg1n0VA+f/xNLWl4c/7jhZcri839i8WIdZDkELxbjWsWSJBYUSYeFdMnmiZf/bjm7KtMroV46YWV3nW/eZwVaQHhosbhWsJTAd5nGUlCAhSLBBE+aQRl+K4Ozq+c/C3SCwbHDnKtSGicqhvvbWtjGU/K2WiiMxXoNSyI5lcbj6PITo0k0XomA34Dfuo2uvnl/6/iig8HgiDtXJe2wz7BZq7WV5Xe4Kyx14OExmRROUc+xSuSQv4BHBeWzBzUyGyTjSXnBKgRjnpJewLmUArYnBZYHdW8C6MxZ9wZiU3YoHZ1ootugLOShi+xvGfLdMwIpcTrREKvP2mqp3ny0/bXypdv9knyGlSEuDXbAJ+vNHb8/Rs71js/vIzvOnY/4rwcWoaMT8O5cqxHi88VIBaQz5kykSNoBqoXJDOVyfkIeIUJyPiIkfSR3fQ5meFh7HIIuft4SVsWxkpUXWGfknDV3MPfQJANNviBtiUQ17Sdpqz1SNZwUqWrtHZ9hkSJckLJWI2mzGTvS5EZMa5I8MC1MYMiyXCEu9sHeHck7F2TPULFDwqWhDPf38OkVLOFqW0guLxGrRNr8uIfeTs4As+GTS6QKsB3TsJJ7wB5KJ4eVqpoN7CDEk4JpFVf6nQY/EzfZHb+jf2s2m2cIi9t8GuzRAFSOjHBeeB0redVdtDyvEl+YInkkA9ARIEMS9EUNRJORDw20c5skoXeuVVqYEiniSpwLkBqguAknsIzpdNpHEvQcOM3CUmuwhEr36hmWRcidrih43HOJjBVTQrazmIa4aUSLGaAEcg66XMA7sygOQj+SE8WkgxAJSbqu2/bc5A36ZVZoug1KIn7YhHVxRXvr6mVvRQghgUZja5toMCaB7W2Sp7cDjOAnCexioajrXOn4DSwUUGjTh84GmcFTjAQDgcDQy00zhZDtszN0lnjT6Th+3Ih12sWWvwg9x6pFqeKaG5XBcKNx/PMyizcAT3HsmnY0flSPH6Er3rajN3Acx15zbxyQmRMHGibx+OXChNvFUdxJNYtisv6/6mS3290WuqiK8ACrUiRJum/gLWyUTp2B3IrzQ76DSAWDwR3/FDYrQp25S3if/vIbG6OMasMbJFOnBu/ULxhct69nFFK8AAAAAElFTkSuQmCC";t.ImageFitMode=void 0,(WU=t.ImageFitMode||(t.ImageFitMode={}))[WU.Fill=0]="Fill",WU[WU.Fit=1]="Fit",WU[WU.Stretch=2]="Stretch",WU[WU.Center=3]="Center";var hY,uY=function(t){function i(i){var n=t.call(this,i)||this;return n.type="fillstyle",n}return n(i,t),i.prototype.setSource=function(t){return this.set("source",t)},i.prototype.getSource=function(){return this.get("source")},i.prototype.setSurroundingColor=function(t){return t instanceof xe?this.set("surroundingColor",t):this.set("surroundingColor",t(this.get("surroundingColor")))},i.prototype.getSurroundingColor=function(){return this.get("surroundingColor")},i.prototype.setSourceMissingColor=function(t){return t instanceof xe?this.set("sourceMissingColor",t):this.set("sourceMissingColor",t(this.get("sourceMissingColor")))},i.prototype.getSourceMissingColor=function(){return this.get("sourceMissingColor")},i.prototype.setFitMode=function(t){return this.set("fitMode",t)},i.prototype.getFitMode=function(){return this.get("fitMode")},i.prototype.createDefaultHighlightStyle=function(){return this.asImmutable()},i.prototype.getDefaultHighlightStyle=function(){return this.It||(this.It=this.createDefaultHighlightStyle()),this.It},i}(me({source:void 0,surroundingColor:Ae(0,0,0,0),sourceMissingColor:Ae(0,0,0,255),fitMode:t.ImageFitMode.Fill})),aY={translation:function(t,i,n){return[1,0,0,0,0,1,0,0,0,0,1,0,t,i,n,1]},xRotation:function(t){var i=Math.cos(t),n=Math.sin(t);return[1,0,0,0,0,i,n,0,0,-n,i,0,0,0,0,1]},yRotation:function(t){var i=Math.cos(t),n=Math.sin(t);return[i,0,-n,0,0,1,0,0,n,0,i,0,0,0,0,1]},zRotation:function(t){var i=Math.cos(t),n=Math.sin(t);return[i,n,0,0,-n,i,0,0,0,0,1,0,0,0,0,1]},scaling:function(t,i,n){return[t,0,0,0,0,i,0,0,0,0,n,0,0,0,0,1]},translate:function(t,i,n,e){return aY.multiply(t,aY.translation(i,n,e))},xRotate:function(t,i){return aY.multiply(t,aY.xRotation(i))},yRotate:function(t,i){return aY.multiply(t,aY.yRotation(i))},zRotate:function(t,i){return aY.multiply(t,aY.zRotation(i))},scale:function(t,i,n,e){return aY.multiply(t,aY.scaling(i,n,e))},multiply:function(t,i){var n=i[0],e=i[1],r=i[2],s=i[3],o=i[4],h=i[5],u=i[6],a=i[7],f=i[8],c=i[9],l=i[10],d=i[11],v=i[12],y=i[13],S=i[14],m=i[15],b=t[0],g=t[1],w=t[2],p=t[3],k=t[4],x=t[5],M=t[6],A=t[7],F=t[8],T=t[9],C=t[10],B=t[11],L=t[12],I=t[13],O=t[14],P=t[15],D=[];return D[0]=n*b+e*k+r*F+s*L,D[1]=n*g+e*x+r*T+s*I,D[2]=n*w+e*M+r*C+s*O,D[3]=n*p+e*A+r*B+s*P,D[4]=o*b+h*k+u*F+a*L,D[5]=o*g+h*x+u*T+a*I,D[6]=o*w+h*M+u*C+a*O,D[7]=o*p+h*A+u*B+a*P,D[8]=f*b+c*k+l*F+d*L,D[9]=f*g+c*x+l*T+d*I,D[10]=f*w+c*M+l*C+d*O,D[11]=f*p+c*A+l*B+d*P,D[12]=v*b+y*k+S*F+m*L,D[13]=v*g+y*x+S*T+m*I,D[14]=v*w+y*M+S*C+m*O,D[15]=v*p+y*A+S*B+m*P,D},inverse:function(t){var i=[],n=t[0],e=t[1],r=t[2],s=t[3],o=t[4],h=t[5],u=t[6],a=t[7],f=t[8],c=t[9],l=t[10],d=t[11],v=t[12],y=t[13],S=t[14],m=t[15],b=l*m,g=S*d,w=u*m,p=S*a,k=u*d,x=l*a,M=r*m,A=S*s,F=r*d,T=l*s,C=r*a,B=u*s,L=f*y,I=v*c,O=o*y,P=v*h,D=o*c,_=f*h,R=n*y,z=v*e,E=n*c,N=f*e,V=n*h,G=o*e,H=b*h+p*c+k*y-(g*h+w*c+x*y),j=g*e+M*c+T*y-(b*e+A*c+F*y),W=w*e+A*h+C*y-(p*e+M*h+B*y),U=x*e+F*h+B*c-(k*e+T*h+C*c),Y=1/(n*H+o*j+f*W+v*U);return i[0]=Y*H,i[1]=Y*j,i[2]=Y*W,i[3]=Y*U,i[4]=Y*(g*o+w*f+x*v-(b*o+p*f+k*v)),i[5]=Y*(b*n+A*f+F*v-(g*n+M*f+T*v)),i[6]=Y*(p*n+M*o+B*v-(w*n+A*o+C*v)),i[7]=Y*(k*n+T*o+C*f-(x*n+F*o+B*f)),i[8]=Y*(L*a+P*d+D*m-(I*a+O*d+_*m)),i[9]=Y*(I*s+R*d+N*m-(L*s+z*d+E*m)),i[10]=Y*(O*s+z*a+V*m-(P*s+R*a+G*m)),i[11]=Y*(_*s+E*a+G*d-(D*s+N*a+V*d)),i[12]=Y*(O*l+_*S+I*u-(D*S+L*u+P*l)),i[13]=Y*(E*S+L*r+z*l-(R*l+N*S+I*r)),i[14]=Y*(R*u+G*S+P*r-(V*S+O*r+z*u)),i[15]=Y*(V*l+D*r+N*u-(E*u+G*l+_*r)),i},projectionPerspective:function(t,i,n,e){var r=1/Math.tan(t*Math.PI/180/2),s=1/(n-e);return[r/i,0,0,0,0,r,0,0,0,0,(n+e)*s,-1,0,0,n*e*s*2,0]},projectionOrthographic:function(t,i,n,e,r,s){return[2/(i-t),0,0,-(i+t)/(i-t),0,2/(e-n),0,-(e+n)/(e-n),0,0,-2/(s-r),-(s+r)/(s-r),0,0,0,1]}},fY=function(t){this.yB=t},cY=function(){function t(){var t=this;this.SB=new Array,this.mB=function(i){return t.SB.push(i),i},this.bB=this.mB(new Map),this.gB=this.mB(new Map),this.wB=this.mB(new Map),this.pB=this.mB(new Map),this.kB=this.mB(new Map)}return t.prototype.xB=function(){this.SB.forEach((function(t){t.forEach((function(t){return t.xB()})),t.clear()}))},t}(),lY=function(){function t(t){this.MB=t,this.AB=new Map}return t.prototype.FB=function(t){return!!this.AB.get(t)},t.prototype.S=function(t){var i=this.AB.get(t);return i&&i.textureInfo},t.prototype.Qh=function(t){if(t instanceof De){var i=this.AB.get(t);i&&(i={textureInfo:i.textureInfo,refs:i.refs+1},this.AB.set(t,i))}else t.textureInfo&&this.AB.set(t.lut,{textureInfo:t.textureInfo,refs:1});return this},t.prototype.uo=function(t){if(!t)return this;var i=this.AB.get(t);return i&&(0===(i={textureInfo:i.textureInfo,refs:i.refs-1}).refs?(this.MB.deleteTexture(i.textureInfo.texture),this.AB.delete(t)):this.AB.set(t,i)),this},t.prototype.TB=function(t){var i=this.AB.get(t);return i?i.refs:void 0},t.prototype.dl=function(){return this.AB.size},t}(),dY=function(t){return new lY(t)},vY=function(t,i){this.st=t,this.hi=i,this.CB=!0,this.BB=null,this.LB=null},yY=function(){function t(t){this.IB=!1,this.OB=1,this.PB=t,this.DB={st:l(0,0),hi:l(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),CB:!0,BB:null,LB:null},this._B=l(64,64),this.RB=new Uint8ClampedArray(this._B.x*this._B.y*this.OB)}return t.prototype.zB=function(t,i){if(!t.CB)return null;if(t.BB&&t.LB){var n=this.zB(t.BB,i);return null!==n?n:this.zB(t.LB,i)}var e,r,s=d(t.hi.x,t.hi.y);if(t.st.x+t.hi.x>=Number.MAX_SAFE_INTEGER&&(s.x=this._B.x-t.st.x-1),t.st.y+t.hi.y>=Number.MAX_SAFE_INTEGER&&(s.y=this._B.y-t.st.y-1),t.hi.x===i.x&&t.hi.y===i.y)return t.CB=!1,t;if(s.xt.hi.y)),u?(e=new vY(fo(t.st,{x:0,y:1}),l(t.hi.x,i.y)),r=new vY(fo(t.st,{x:0,y:i.y+1}),l(t.hi.x,t.hi.y-1-i.y))):(e=new vY(fo(t.st,{x:1,y:0}),l(i.x,t.hi.y)),r=new vY(fo(t.st,{x:i.x+1,y:0}),l(t.hi.x-1-i.x,t.hi.y))),t.BB=e,t.LB=r,this.zB(t.BB,i)},t.prototype.EB=function(t,i){var n={NB:!1,st:null},e=this.zB(this.DB,i);if(null===e)for(;null===e&&this._B.xthis.PB||t.y>this.PB)return!1;for(var i=new Uint8ClampedArray(t.x*t.y*this.OB),n=0;n0;){var l=c.shift(),d=l.prefix,v=l.obj;h+=d+":";var y=Object.keys(v).sort();try{for(var S=(n=void 0,o(y)),m=S.next();!m.done;m=S.next()){var b=m.value,g=v[b];"object"==typeof g&&g.__proto__===Object.prototype||Array.isArray(g)?c.push({prefix:b,obj:g}):h+=b+"="+String(g)+","}}catch(t){n={error:t}}finally{try{m&&!m.done&&(e=S.return)&&e.call(S)}finally{if(n)throw n.error}}}else h+=String(f)+","}}catch(i){t={error:i}}finally{try{a&&!a.done&&(i=u.return)&&i.call(u)}finally{if(t)throw t.error}}return h},AY={"2D":"\nvoid main(void) {\n gl_Position = vec4(posWorld, 0.0, 1.0 );\n}\n","3D":"\nuniform mat4 uViewProjectionMatrix;\nvoid main(void) {\n gl_Position = uViewProjectionMatrix * vec4(posWorld, 1.0);\n}\n"},FY={EmptyFragmentShader:"\nvoid main(void) {\n\n}\n"},TY=function(){function t(t){this.modifiers=[],this.modifiers=t}return t.prototype.alter=function(i){var n=new t(this.modifiers.slice());return n.modifiers.push.apply(n.modifiers,i),n},t.prototype.build=function(t){var i,n;try{for(var e=o(this.modifiers),r=e.next();!r.done;r=e.next()){t=(0,r.value)(t)}}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(i)throw i.error}}return t},t}(),CY=function(){for(var t=[],i=0;i 1. || vTextureCoord.y < 0. || vTextureCoord.y > 1.){\n "+KY+" = uColor;\n }\n gl_FragColor = "+KY+";\n}\n",fX="\nvarying vec3 vPosWorld;\nvarying vec3 vNormal;\nuniform vec3 uCameraLoc;\nuniform vec3 uLightLoc;\nuniform vec4 uLightColor;\nuniform vec4 uAmbientColor;\nuniform float uShininess;\nuniform float uAmbientReflection;\nuniform float uDiffuseReflection;\nuniform float uSpecularReflection;\nvoid main(void) {\n}\n",cX=function(t,i,n,e,r){return void 0===n&&(n="uLookupMin"),void 0===e&&(e="uLookupMax"),void 0===r&&(r="uLookupTexture"),"\nfloat texCoordY = ("+t+" - "+n+") / ("+e+" - "+n+");\ntexCoordY = (roundUnsigned(clamp(texCoordY, 0.0, 1.0) * uLookupTextureHeightPx) / uLookupTextureHeightPx) * (1.0 - (1.0 / uLookupTextureHeightPx)) + (0.5 / uLookupTextureHeightPx);\nvec4 "+i+" = texture2D("+r+", vec2(0.5, texCoordY));\n"},lX="\nfloat ambientReflection = uAmbientReflection;\nfloat diffuseReflection = uDiffuseReflection;\nfloat specularReflection = uSpecularReflection;\n\nvec3 ambientColor = uAmbientColor.rgb;\nvec3 diffuseColor = "+ZY+".rgb;\nvec3 specularColor = uLightColor.rgb;\n\nvec3 vNormalNormalized = normalize(vNormal);\nvNormalNormalized = (float(gl_FrontFacing) * 2.0 - 1.0) * vNormalNormalized;\nvec3 lightDir = normalize( uLightLoc - vPosWorld );\n\nfloat lambertian = abs(dot(vNormalNormalized, lightDir)); \nfloat specular = 0.0;\nvec3 R = reflect(-lightDir, vNormalNormalized);\nvec3 V = normalize(uCameraLoc - vPosWorld);\n\nfloat specAngle = max(dot(R,V),0.0);\nspecular = pow(specAngle, uShininess);\n\ngl_FragColor = vec4(ambientReflection * ambientColor + diffuseReflection * lambertian * diffuseColor + specularReflection * specular * specularColor, "+ZY+".a);\n",dX="\ngl_FragColor = "+ZY+";\n",vX=new TY([CY("uniform vec4 uColorDiffuse"),DY("vec4 "+ZY+" = uColorDiffuse",lX)]).build(fX),yX=new TY([CY("uniform vec4 uColorDiffuse"),DY("vec4 "+ZY+" = uColorDiffuse",dX)]).build(fX),SX=new TY([CY("varying vec4 vColor"),DY("vec4 "+ZY+" = vColor",lX)]).build(fX),mX=new TY([CY("varying vec4 vColor"),DY("vec4 "+ZY+" = vColor",dX)]).build(fX),bX=new TY([CY("uniform float uLookupMin"),CY("uniform float uLookupMax"),CY("uniform float uLookupTextureHeightPx;"),CY("uniform sampler2D uLookupTexture"),CY("varying float vLookupValue"),CY(zY),DY(cX("vLookupValue","colorPalette")),DY("vec4 "+ZY+" = colorPalette"),DY(lX)]).build(fX),gX=new TY([CY("uniform float uLookupMin"),CY("uniform float uLookupMax"),CY("uniform sampler2D uLookupTexture"),CY("uniform float uLookupTextureHeightPx;"),CY("varying float vLookupValue"),CY(zY),DY(cX("vLookupValue","colorPalette")),DY("vec4 "+ZY+" = colorPalette"),DY(dX)]).build(fX),wX={Basic:eX,BasicTextureMask:rX,PointColor:sX,PointColorTextureMask:oX,Paletted:hX,PalettedTextureMask:uX,Phong3D:vX,Simple3D:yX,Paletted3D:bX,SimplePaletted3D:gX,PointColor3D:SX,SimplePointColor3D:mX,Textured2D:aX},pX={Basic:"\nattribute vec2 aPos;\nuniform vec2 uScale;\nuniform vec2 uDisp;\nvoid main(void) {\n gl_Position = vec4( ( aPos - uDisp ) / uScale, 0.0, 1.0 );\n}\n",BasicOffsetted:"\nattribute vec2 aPos;\nuniform vec2 uScale;\nuniform vec2 uDisp;\nuniform vec2 uOffset;\nvoid main(void) {\n gl_Position = vec4( ( (aPos + uOffset) - uDisp ) / uScale, 0.0, 1.0 );\n}\n",BasicInstanced:"\nattribute vec2 aPos;\nattribute vec2 aRot;\nattribute vec2 aGeo;\nattribute float aSize;\nuniform vec2 uScale;\nuniform vec2 uRatioPxClip;\nuniform vec2 uDisp;\nvoid main(void) {\n vec2 rotatedGeo = vec2(\n aGeo.x * aRot.y + aGeo.y * aRot.x,\n aGeo.y * aRot.y - aGeo.x * aRot.x\n );\n vec2 scaled = (rotatedGeo * aSize * uRatioPxClip);\n gl_Position = vec4( (aPos - uDisp ) / uScale + scaled, 0.0, 1.0 );\n}\n",PointSize:"\nattribute vec2 aPos;\nuniform vec2 uScale;\nuniform vec2 uDisp;\nuniform float uPointSize;\nvoid main(void) {\n gl_Position = vec4( ( aPos - uDisp ) / uScale, 0.0, 1.0 );\n gl_PointSize = uPointSize;\n}\n",Texture:"\nattribute vec2 aPos;\nattribute vec2 aMaskTextureCoord;\nuniform vec2 uScale;\nuniform vec2 uDisp;\nvarying vec2 vMaskTextureCoord;\nvoid main(void) {\n gl_Position = vec4( ( aPos - uDisp ) / uScale, 0.0, 1.0 );\n vMaskTextureCoord = aMaskTextureCoord;\n}\n",PointSizePointColor:"\nattribute vec2 aPos;\nattribute vec4 aColor;\nuniform vec2 uScale;\nuniform vec2 uDisp;\nuniform float uPointSize;\nvarying vec4 vColor;\nvoid main(void) {\n gl_Position = vec4( ( aPos - uDisp ) / uScale, 0.0, 1.0 );\n gl_PointSize = uPointSize;\n vColor = aColor;\n}\n",PointColor:"\nattribute vec2 aPos;\nattribute vec4 aColor;\nuniform vec2 uScale;\nuniform vec2 uDisp;\nvarying vec4 vColor;\nvoid main(void) {\n gl_Position = vec4( ( aPos - uDisp ) / uScale, 0.0, 1.0 );\n vColor = aColor;\n}\n",PointColorOffsetted:"\nattribute vec2 aPos;\nattribute vec4 aColor;\nuniform vec2 uScale;\nuniform vec2 uDisp;\nuniform vec2 uOffset;\nvarying vec4 vColor;\nvoid main(void) {\n gl_Position = vec4( ( (aPos + uOffset) - uDisp ) / uScale, 0.0, 1.0 );\n vColor = aColor;\n}\n",PointColorInstanced:"\nattribute vec2 aPos;\nattribute vec2 aRot;\nattribute vec2 aGeo;\nattribute vec4 aColor;\nattribute float aSize;\nuniform vec2 uScale;\nuniform vec2 uRatioPxClip;\nuniform vec2 uDisp;\nvarying vec4 vColor;\nvoid main(void) {\n vec2 rotatedGeo = vec2(\n aGeo.x * aRot.y + aGeo.y * aRot.x,\n aGeo.y * aRot.y - aGeo.x * aRot.x\n );\n vec2 scaled = (rotatedGeo * aSize * uRatioPxClip);\n gl_Position = vec4( ( aPos - uDisp ) / uScale + scaled, 0.0, 1.0 );\n vColor = aColor;\n}\n",Paletted:"\nattribute vec2 aPos;\nattribute float aIntensity;\nuniform vec2 uScale;\nuniform vec2 uDisp;\nvarying float vLookupValue;\nvoid main(void) {\n gl_Position = vec4( ( aPos - uDisp ) / uScale, 0.0, 1.0 );\n vLookupValue = aIntensity;\n}\n",PalettedOffsetted:"\nattribute vec2 aPos;\nattribute float aIntensity;\nuniform vec2 uScale;\nuniform vec2 uDisp;\nuniform vec2 uOffset;\nvarying float vLookupValue;\nvoid main(void) {\n gl_Position = vec4( ( (aPos + uOffset) - uDisp ) / uScale, 0.0, 1.0 );\n vLookupValue = aIntensity;\n}\n"},kX=function(){function t(t,i,n,e){if(this.id=t,this.shader=n,this.gl=e,!i||!n)throw new Sr("Could not find "+this.aL()+" shader source code.");if(this.gl.shaderSource(n,i),this.gl.compileShader(n),!this.gl.getShaderParameter(n,this.gl.COMPILE_STATUS)){var r=this.gl.getShaderInfoLog(n);try{var s=Number(r.match(/ERROR:\s?\d:(\d*)/)[1]);r+="...\n"+i.split("\n").filter((function(t,i){return Math.abs(s-i)<=1})).join("\n")+"\n..."}catch(t){}throw new Sr("Could not create "+this.aL()+" shader: \n\n "+r)}}return t.prototype.aL=function(){return this.id.toString()+" "+(this.gl.getShaderParameter(this.shader,this.gl.SHADER_TYPE)===this.gl.FRAGMENT_SHADER?"fragment":"vertex")},t}(),xX=function(t){function i(i,n,e){return t.call(this,i,n,e.createShader(e.VERTEX_SHADER),e)||this}return n(i,t),i}(kX),MX=function(t){function i(i,n,e){return t.call(this,i,n,e.createShader(e.FRAGMENT_SHADER),e)||this}return n(i,t),i}(kX),AX=function(){function t(t,i,n,e){if(void 0===e&&(e=n.createProgram()),this.MB=n,this.fL=e,this.cL=new Map,this.lL=new Map,this.dL=t.aL(),this.vL=i.aL(),n.attachShader(e,t.shader),n.attachShader(e,i.shader),n.bindAttribLocation(e,0,"aPos"),n.linkProgram(e),!n.getProgramParameter(e,n.LINK_STATUS))throw new Sr("Could not compile WebGL program. \n\n"+n.getProgramInfoLog(e));n.deleteShader(t.shader),n.deleteShader(i.shader)}return t.prototype.yL=function(t){var i=this.SL(t);if(void 0===i)throw new Sr("Could not get "+t+" uniform from "+this.dL+" and "+this.vL+" shaders.");return i},t.prototype.SL=function(t){var i=this.cL.get(t);if(i)return i;var n=this.MB.getUniformLocation(this.fL,t);return n?(this.cL.set(t,n),n):void 0},t.prototype.mL=function(t){var i=this.bL(t);if(void 0===i)throw new Sr("Could not get "+t+" attribute from "+this.dL+" and "+this.vL+" shaders.");return i},t.prototype.bL=function(t){var i=this.lL.get(t);if(i||0===i)return i;var n=this.MB.getAttribLocation(this.fL,t);return n||0===n?(this.lL.set(t,n),n):void 0},t.prototype.ro=function(){this.MB.deleteProgram(this.fL)},t}(),FX=function(t,i,n){return void 0===n&&(n=void 0),function(){t.gL=i,n&&n()}},TX=function(){function t(t,i){var n=this;if(this.So=!1,this.wL=0,this.pL=0,this.kL=!1,this.gL=!1,this.xL=!1,this.ML=!1,this.AL=!1,this.FL=new Set,this.TL=new Set,this.CL=i,this.MB=t,this.BL=null,this.kL=i instanceof wr.HTMLVideoElement,this.CL instanceof wr.HTMLImageElement)this.CL.addEventListener("load",(function(){n.ML=!0,n.LL()})),this.CL.addEventListener("error",(function(){n.AL=!0})),this.CL.complete&&(this.ML=!0,this.LL());else if(this.CL instanceof wr.HTMLVideoElement){var e=this;this.CL.addEventListener("canplay",(function(){e.pL=this.videoHeight,e.wL=this.videoWidth,e.ML=!0,e.LL()}),!0),this.CL.addEventListener("play",FX(this,!0,(function(){return n.LL()}))),this.CL.addEventListener("playing",FX(this,!0,(function(){return n.LL()}))),this.CL.addEventListener("pause",FX(this,!1)),this.CL.addEventListener("ended",FX(this,!1)),this.CL.readyState>=1&&(this.wL=this.CL.videoWidth,this.pL=this.CL.videoHeight,this.gL=!this.CL.paused,this.ML=!0,this.LL())}else this.ML=!0,this.LL()}return t.prototype.rL=function(t){this.TL.add(t)},t.prototype.sL=function(t){this.TL.delete(t),0===this.TL.size&&this.dispose()},t.prototype.IL=function(t){this.FL.add(t),this.xL&&(t(),this.OL(t))},t.prototype.OL=function(t){this.FL.delete(t)},t.prototype.LL=function(){var t=this;if(!(this.So||this.AL||this.xL)&&this.ML){var i=this.MB.gl;if(!this.BL&&this.CL){this.BL=i.createTexture(),i.bindTexture(i.TEXTURE_2D,this.BL),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);var n=i.RGBA,e=i.RGBA,r=i.UNSIGNED_BYTE,s=this.CL,o=this.wL>0?this.wL:s.width,h=this.pL>0?this.pL:s.height;i.texImage2D(i.TEXTURE_2D,0,n,e,r,s),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),this.wL=o,this.pL=h,i.bindTexture(i.TEXTURE_2D,null)}this.xL=!0,this.FL&&this.FL.forEach((function(i){i(),t.OL(i)}))}},t.prototype.Fe=function(){var t=this.MB.gl;if(!this.AL&&this.xL&&this.BL&&!this.So){var i=t.RGBA,n=t.RGBA,e=t.UNSIGNED_BYTE,r=this.CL;r&&(t.bindTexture(t.TEXTURE_2D,this.BL),t.texImage2D(t.TEXTURE_2D,0,i,n,e,r))}},t.prototype.PL=function(){return this.BL},t.prototype.restore=function(){return this.So&&(this.So=!1,this.LL()),this},t.prototype.dispose=function(){return this.So||(this.BL&&(this.MB.KB(this.BL),this.BL=null),this.TL.clear(),this.So=!0,this.xL=!1),this},t.prototype.isDisposed=function(){return this.So},t}(),CX=function(){function t(t,i,n){var e,r,s=this;void 0===n&&(n=!0),this.ps=t,this.hL=function(){var t=wr.document.createElement("canvas"),i=t.getContext("2d");if(!i)throw new yr("Failed to get Text canvas rendering context");return i.fillStyle="#fff",function(n,e,r){var s=e.style+" "+e.weight+" "+e.size*r+"px "+e.family;i.font=s,i.textBaseline="alphabetic",i.textAlign="left";var o=i.measureText(n);if(0!==o.width){var h=void 0!==o.actualBoundingBoxLeft&&void 0!==o.actualBoundingBoxRight?Math.ceil(o.actualBoundingBoxLeft+o.actualBoundingBoxRight):Math.ceil(o.width),u=o.width,a=Math.round(e.size*r),f=void 0!==o.actualBoundingBoxLeft?o.actualBoundingBoxLeft:0;t.width=h>0?h:u,t.height=2*a,i.font=s,i.textBaseline="alphabetic",i.textAlign="left",i.clearRect(0,0,t.width,t.height),i.fillStyle="#fff",i.fillText(n,f,a);for(var c=i.getImageData(0,0,t.width,t.height),d=0,v=0,y=c.width,S=0;S=0;S-=1){for(m=0;m-1&&s.gl.enableVertexAttribArray(u)}var a=0;for(h=0;h-1&&s.gl.vertexAttribPointer(f.location,f.size,s.gl.FLOAT,!1,o*Float32Array.BYTES_PER_ELEMENT,a*Float32Array.BYTES_PER_ELEMENT),a+=f.size}if(void 0!==i)for(h=0;h-1&&s.sI(c,i)}return s},this.oI=function(){for(var t=[],i=0;i-1&&s.gl.disableVertexAttribArray(r)}return s},this.hI=function(t,i){return void 0===t||(s.gl.bindBuffer(s.gl.ARRAY_BUFFER,i),s.gl.enableVertexAttribArray(t),s.gl.vertexAttribPointer(t,4,s.gl.FLOAT,!1,0,0)),s},this.uI=function(t,i){return void 0===t||(s.gl.bindBuffer(s.gl.ARRAY_BUFFER,i),s.gl.vertexAttribPointer(t,1,s.gl.FLOAT,!1,0,0),s.gl.enableVertexAttribArray(t)),s},this.aI=function(t){return s.gl.bindBuffer(s.gl.ELEMENT_ARRAY_BUFFER,t),s},this.Ky=function(t,i,n){return void 0===n&&(n=0),i>0&&s.gl.drawArrays(t,n,i),s},this.fI=function(t,i,n,e){return void 0===i&&(i=s.gl.TRIANGLES),void 0===n&&(n=0),void 0===e&&(e=s.gl.UNSIGNED_SHORT),t>0&&s.gl.drawElements(i,t,e,n),s},this.cI=function(t,i,n,e){if(e>0&&(s.gl2&&s.gl2.ctx.drawArraysInstanced(t,i,n,e),s.gl1)){if(!s.gl1.lI.ANGLE_instanced_arrays)return wr.console.warn("The browser does not support REQUIRED WebGL 1 extension: ANGLE_instanced_arrays.\nThis application will NOT work properly!"),s;s.gl1.lI.ANGLE_instanced_arrays.drawArraysInstancedANGLE(t,i,n,e)}return s},this.dI=function(t,i,n,e,r){if(void 0===r&&(r=s.gl.UNSIGNED_SHORT),e>0&&(s.gl2&&s.gl2.ctx.drawElementsInstanced(t,i,r,n,e),s.gl1)){if(!s.gl1.lI.ANGLE_instanced_arrays)return wr.console.warn("The browser does not support REQUIRED WebGL 1 extension: ANGLE_instanced_arrays.\nThis application will NOT work properly!"),s;s.gl1.lI.ANGLE_instanced_arrays.drawElementsInstancedANGLE(t,i,r,n,e)}return s},this.sI=function(t,i){if(t>-1&&(s.gl2&&s.gl2.ctx.vertexAttribDivisor(t,i),s.gl1)){if(!s.gl1.lI.ANGLE_instanced_arrays)return wr.console.warn("The browser does not support REQUIRED WebGL 1 extension: ANGLE_instanced_arrays.\nThis application will NOT work properly!"),s;s.gl1.lI.ANGLE_instanced_arrays.vertexAttribDivisorANGLE(t,i)}return s},this.vI=function(t,i,n,e){void 0===e&&(e=0);var r=s.gl.TEXTURE0+e;s.gl.activeTexture(r),s.gl.bindFramebuffer(s.gl.FRAMEBUFFER,i),s.gl.bindTexture(s.gl.TEXTURE_2D,n),s.gl.framebufferTexture2D(s.gl.FRAMEBUFFER,s.gl.COLOR_ATTACHMENT0,s.gl.TEXTURE_2D,n,0);var o=s.yI();o&&s.SI(!1),t(),o&&s.SI(!0),s.gl.bindTexture(s.gl.TEXTURE_2D,null),s.gl.bindFramebuffer(s.gl.FRAMEBUFFER,null)},this.mI=function(t,i,n){var e=wr.document.createElement("canvas").getContext("2d").createImageData(n.x,n.y),r=e.data;return s.gl.readPixels(t,i,n.x,n.y,s.gl.RGBA,s.gl.UNSIGNED_BYTE,r),e},this.$h=function(){return s.gl.clear(s.gl.COLOR_BUFFER_BIT),s.gl.clear(s.gl.DEPTH_BUFFER_BIT),s},this.bI=function(t){return s.gl.clearColor(t.r,t.g,t.b,t.a),s},this.gI=function(t,i,n,e){return s.gl.viewport(t,i,n,e),s},this.rL=function(t){return s.gl.useProgram(t.fL),s},this.wI=!1,this.gl=i.ctx,this.pI=i.antialias,this.kI=i.lineAntialias,n&&(this.gl.enable(this.gl.BLEND),this.xI());var o=[];if(this.lI={WEBGL_lose_context:this.gl.getExtension("WEBGL_lose_context")},Object.keys(this.lI).forEach((function(t){null===s.lI[t]&&o.push(t)})),"webgl2"===i.type)this.gl2={ctx:i.ctx},this.MI=!0;else{var a={ANGLE_instanced_arrays:this.gl.getExtension("ANGLE_instanced_arrays"),EXT_blend_minmax:this.gl.getExtension("EXT_blend_minmax"),OES_element_index_uint:this.gl.getExtension("OES_element_index_uint"),OES_standard_derivatives:this.gl.getExtension("OES_standard_derivatives"),OES_vertex_array_object:this.gl.getExtension("OES_vertex_array_object")};a.OES_standard_derivatives||(this.kI=!1),Object.keys(a).forEach((function(t){null===a[t]&&o.push(t)}));var f={OES_texture_float:this.gl.getExtension("OES_texture_float")};this.MI=!!f.OES_texture_float,this.gl1={ctx:i.ctx,lI:a,optional:f}}this.EL=o,this.XB=this.gl.getParameter(this.gl.MAX_TEXTURE_SIZE),this.$B=this.AI();var c,d,v,y,S,m,b,g=(d=(c=this).gl,v=new Map,y=new Map,S=new Map,m={totalMs:0,vertexShaders:0,fragmentShaders:0,programs:0},b=function(t,i,n){void 0===n&&(n=[]);var e=[],r=[];if(c.gl1){var s=t.match(/#extension.*/g);s&&r.push.apply(r,u([],h(s))),t=t.replace(/#extension.*/g,"")}else if(e.push("#version 300 es"),(t=(t=(t=t.replace(/#extension.*/g,"")).replace(/attribute/g,"in")).replace(/texture2D/g,"texture")).includes("usampler2D")&&e.push("precision highp usampler2D;"),"vertex"===i)t=t.replace(/varying/g,"out");else{t=t.replace(/varying/g,"in");var o=n.find((function(t){return"fragOutput"===t.type}));t=(t=o?"out "+o.fragOutput+" fragOutput;\n"+t:"out vec4 fragOutput;\n"+t).replace(/gl_FragColor/g,"fragOutput")}return r&&e.push.apply(e,u([],h(r))),e.push("precision highp float;"),e.push("precision highp int;"),e.join("\n")+"\n"+t},{FI:function(t,i){var n=wr.performance.now(),e=t.toString()+i.toString(),r=S.get(e);if(r)return r;var s=v.get(t);s||(o=b(o=pX[t],"vertex"),s=new xX(t,o,d),v.set(t,s),m.vertexShaders+=1);var o,h=y.get(i);h||(o=b(o=wX[i],"vertex"),h=new MX(i,o,d),y.set(i,h),m.fragmentShaders+=1);var u=new AX(s,h,d);return S.set(e,u),m.programs+=1,m.totalMs+=wr.performance.now()-n,u},TI:function(){for(var t=[],i=0;i=t)return this.ZI.buffer;this.ZI&&(this.VI(this.ZI.buffer),this.ZI=void 0);for(var i=t,n=new Float32Array(i),e=0;e 0.0) {\n colorDiffuse = vec4(mix(colorDiffuse.rgb, uWireframeColor.rgb, edge * uWireframeColor.a), max(colorDiffuse.a, uWireframeColor.a));\n }":"if (edge > 0.0) {\n colorDiffuse = uWireframeColor;\n } else {\n discard;\n }")),b.push.apply(b,u([CY("varying vec3 vTriangleBary")],h("phong"===r?(S="colorDiffuse",[CY("varying vec3 vPosWorld;","varying vec3 vNormal;","uniform vec3 uCameraLoc;","uniform vec3 uLightLoc;","uniform vec4 uLightColor;","uniform vec4 uAmbientColor;","uniform float uShininess;","uniform float uAmbientReflection;","uniform float uDiffuseReflection;","uniform float uSpecularReflection;"),S!==ZY&&DY("vec4 "+ZY+" = "+S),DY(lX)]):function(t){return[t!==ZY&&DY("vec4 "+ZY+" = "+t),DY(dX)]}("colorDiffuse")))),{vertexShaderModifiers:m,fragmentShader:"EmptyFragmentShader",fragmentShaderModifiers:b}}}},DebugSurfaceGridNormals:function(t){return{idFeature:"DebugSurfaceGridNormals",idVertex:"DebugSurfaceGridNormals:"+MY(t),idFragment:"DebugSurfaceGridNormals:"+MY(t),apply:function(i){return{vertexShaderModifiers:u(u(u([CY.apply(void 0,u(["attribute float aNormalArrow","uniform int uBaseInstance","uniform ivec2 uTileDimensions","uniform vec2 uTileDimensionsXZ","uniform vec2 uTileStartLocationAxisXZ","uniform vec2 uTileSizeAxisXZ","uniform sampler2D uHeightmapTexture","attribute"===t.instanceIdSource&&"attribute float aInstanceID",zY,HY,VY,"ubyte"===t.heightmapTextureType&&NY],h("uint"===t.normalTextureType?["uniform usampler2D uNormalmapTexture"]:["uniform sampler2D uNormalmapTexture"]))),IY.apply(void 0,u(u([void 0===t.instanceIdSource?"int iInstance = gl_InstanceID":"int iInstance = int(roundUnsigned(aInstanceID))","iInstance = iInstance + uBaseInstance","int iSecondary = modulus(iInstance, (uTileDimensions.y - 1))","int iPrimary = iInstance / (uTileDimensions.y - 1)","vec2 iCell = vec2(float(iPrimary), float(iSecondary))","vec2 uTileDimensionsMinus1 = vec2(float(uTileDimensions.x), float(uTileDimensions.y)) - 1.0","float y00 = "+("float"===t.heightmapTextureType?"pickTexel(uHeightmapTexture, vec2(iCell.y, iCell.x), vec2(uTileDimensions.y, uTileDimensions.x)).x":"decodeUbyteRGBAEncodedFloat(pickTexel(uHeightmapTexture, vec2(iCell.y, iCell.x), vec2(uTileDimensions.y, uTileDimensions.x)), "+t.littleEndian+")"),"float y01 = "+("float"===t.heightmapTextureType?"pickTexel(uHeightmapTexture, vec2(iCell.y + 1.0, iCell.x), vec2(uTileDimensions.y, uTileDimensions.x)).x":"decodeUbyteRGBAEncodedFloat(pickTexel(uHeightmapTexture, vec2(iCell.y + 1.0, iCell.x), vec2(uTileDimensions.y, uTileDimensions.x)), "+t.littleEndian+")"),"float y10 = "+("float"===t.heightmapTextureType?"pickTexel(uHeightmapTexture, vec2(iCell.y, iCell.x + 1.0), vec2(uTileDimensions.y, uTileDimensions.x)).x":"decodeUbyteRGBAEncodedFloat(pickTexel(uHeightmapTexture, vec2(iCell.y, iCell.x + 1.0), vec2(uTileDimensions.y, uTileDimensions.x)), "+t.littleEndian+")"),"float y11 = "+("float"===t.heightmapTextureType?"pickTexel(uHeightmapTexture, vec2(iCell.y + 1.0, iCell.x + 1.0), vec2(uTileDimensions.y, uTileDimensions.x)).x":"decodeUbyteRGBAEncodedFloat(pickTexel(uHeightmapTexture, vec2(iCell.y + 1.0, iCell.x + 1.0), vec2(uTileDimensions.y, uTileDimensions.x)), "+t.littleEndian+")"),"float y = (y00 + y01 + y10 + y11) / 4.0","vec2 cellSizeAxis = uTileSizeAxisXZ / (uTileDimensionsXZ - 1.0)","vec2 posAxisXZ = uTileStartLocationAxisXZ + cellSizeAxis * (0.5 + "+(t.flipXZ?"vec2(iCell.y, iCell.x)":"iCell")+")","vec3 posAxis = vec3(posAxisXZ.x, y, posAxisXZ.y)"],h("uint"===t.normalTextureType?["vec4 normalAxisRGB = vec4(pickTexelUnsigned(uNormalmapTexture, vec2(iCell.y, iCell.x), vec2(uTileDimensionsMinus1.y, uTileDimensionsMinus1.x))) / float(-1u)"]:["vec4 normalAxisRGB = pickTexel(uNormalmapTexture, vec2(iCell.y, iCell.x), vec2(uTileDimensionsMinus1.y, uTileDimensionsMinus1.x))"])),["vec3 normalAxis = (normalAxisRGB.rgb * 2.0) - 1.0","vec3 normalWorld = normalize(normalAxis * uScale)"]))],h("uint"===t.normalTextureType?[BY(GY)]:[])),h(RX({axisWorldTranslation:t.axisWorldTranslation,normalSource:"custom"},!0,{attributeNameAxisCoord:void 0,variableNameAxisCoord:WY,variableNameWorldCoord:UY}))),[PY("posWorld =","vec3 dirArrow = normalWorld","vec3 posArrowStart = posWorld","vec3 posArrowEnd = posWorld + dirArrow * 0.010","vec3 notParallel = normalize(mix( vec3( 0.0, 1.0, 0.0 ), vec3( 0.2, 0.8, 0.0 ), step( abs(dirArrow.y), 0.9 ) ))","vec3 dirArrowLeft = normalize(-dirArrow + 0.50 * normalize(cross(dirArrow, notParallel)))","vec3 dirArrowRight = normalize(-dirArrow + 0.50 * normalize(cross(notParallel, dirArrow)))","vec3 posArrowLeft = posArrowEnd + dirArrowLeft * 0.0025","vec3 posArrowRight = posArrowEnd + dirArrowRight * 0.0025","if (aNormalArrow == 0.0) {\n posWorld = posArrowStart;\n } else if (aNormalArrow == 1.0) {\n posWorld = posArrowEnd;\n } else if (aNormalArrow == 2.0) {\n posWorld = posArrowLeft;\n } else if (aNormalArrow == 3.0) {\n posWorld = posArrowRight;\n }")]),fragmentShader:"EmptyFragmentShader",fragmentShaderModifiers:[DY("gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0)")]}}}},OffsetTowardsCamera:function(){return{idFeature:"OffsetTowardsCamera",idVertex:"OffsetTowardsCamera",idFragment:void 0,apply:function(t){return{vertexShaderModifiers:[CY("uniform vec3 uCameraLoc"),PY("posWorld =","posWorld = posWorld + normalize(uCameraLoc) * 0.0025")]}}}},AliasedEdge:function(){return{idFeature:"AliasedEdge",idVertex:"AliasedEdge",idFragment:"AliasedEdge",apply:function(t){return{vertexShaderModifiers:[CY("attribute float aSegmentInside"),CY("varying float vSegmentInside"),CY("varying float vSegmentSide"),PY("gl_Position = ","\n vSegmentInside = aSegmentInside;\n vSegmentSide = aSegmentSide;\n ")],fragmentShaderModifiers:[RY("#extension GL_OES_standard_derivatives : enable"),CY("uniform float uAALimit"),CY("varying float vSegmentInside"),CY("varying float vSegmentSide"),OY("gl_FragColor = ","\n float dist = (uAALimit - vSegmentInside);\n vec2 ddist = vec2(dFdx(dist), dFdy(dist));\n float pixelDist = dist / length(ddist);\n // additional blurring\n pixelDist *= 0.5;\n\n float aa = clamp(0.5 - pixelDist, 0.0, 1.0);\n if((vSegmentSide <= 0.0 || vSegmentSide >= 1.0) && aa <=0.99){\n aa *= 0.5;\n }\n "+KY+".a = "+KY+".a * aa;\n ")]}}}}},NX=function(t){if(t instanceof Vo||t instanceof tj)return t.Ei()?"linear-highPrecision":"linear";if(t instanceof Go){var i={};return t.x instanceof Co&&(i.x={base:t.x.Bi()}),t.y instanceof Co&&(i.y={base:t.y.Bi()}),["logarithmic",i]}return"linear"};function VX(i,n,e,r,s,o){var h,u,a=n.x._t(i.max.x),f=n.x._t(i.min.x),c=n.y._t(i.max.y),l=n.y._t(i.min.y),d=a-f,v=c-l,y=d/v,S=d*e.x,m=v*e.y,b=d-S,g=v-m,w=S>b?[b,S]:[S,b],p=m>g?[g,m]:[m,g],k=1,x=1;switch(r){default:case t.GradientExtent.closestSide:if(h=w[0]/d,u=p[0]/v,s===t.GradientShape.circle)k=M=Math.min(h*y,u),x=M;else k=h*y,x=u;break;case t.GradientExtent.farthestSide:if(h=w[1]/d,u=p[1]/v,s===t.GradientShape.circle)k=M=Math.max(h*y,u),x=M;else k=h*y,x=u;break;case t.GradientExtent.closestCorner:if(u=p[0]/v,s===t.GradientShape.circle)h=w[0]/d*y,k=M=Math.sqrt(h*h+u*u),x=M;else h=w[0]/d,k=(M=Math.sqrt(h*h+u*u))*y,x=M;break;case t.GradientExtent.farthestCorner:var M;if(u=p[1]/v,s===t.GradientShape.circle)h=w[1]/d*y,k=M=Math.sqrt(h*h+u*u),x=M;else h=w[1]/d,k=(M=Math.sqrt(h*h+u*u))*y,x=M}return{bounds:[f*o,l*o,d*o,v*o],center:[e.x*y,e.y],distance:[Math.max(k,1e-4),Math.max(x,1e-4)],aspectRatio:y}}function GX(t,i,n,e){var r=i.x._t(t.max.x),s=i.x._t(t.min.x),o=i.y._t(t.max.y),h=i.y._t(t.min.y),u=r-s,a=o-h,f=Math.abs(u*Math.sin(n))+Math.abs(a*Math.cos(n)),c=l(u/2-Math.sin(n)*(f/2),a/2-Math.cos(n)*(f/2)),d=l(u/2+Math.sin(n)*(f/2),a/2+Math.cos(n)*(f/2));return{bounds:[s*e,h*e,u*e,a*e],startPoint:[c.x*e,c.y*e],endPoint:[d.x*e,d.y*e]}}var HX,jX=function(t,i,n){return function(t,i,n,e){for(var r,s,o,h,u=[],a=0,f=ao(i,n/2),c=e?t[t.length-1]:t[0],d=0,v=0;v0&&(c=t[v-1]),pr(r,c)&&(c=fo(r,oo(ao(co(s,r),-1)))),pr(r,s)&&(s=fo(r,oo(ao(co(c,r),-1))));var y=vo(c,i),S=vo(r,i),m=vo(s,i),b=oo(co(S,y)),g=oo(co(m,S)),w=fo(b,g),p=l(-w.y,w.x),k=l(-b.y,b.x),x=1/So(p,k),M=uo(p),A=oo(co(b,g)),F=Math.sign(So(p,A))||1,T=lo(p,ao(f,x)),C=lo(p,ao(f,-x));if(M<1||x===1/0){var B={x:0,y:0},L={x:0,y:0},I={x:0,y:0},O={x:0,y:0},P=l(-g.y,g.x),D=Math.sign(So(b,p))||F,_=lo(k,ao(f,D)),R=lo(P,ao(f,D));1===F?(B=_,L=C,I=R,O=C):(B=T,L=_,I=T,O=R);var z=4*Hs(c,r),E=4*Hs(r,s);(x>z||x>E)&&(1===F?(B=_,L=R,I=R,O=_):(B=R,L=_,I=_,O=R));var N=fo(r,B),V=fo(r,L),G=fo(r,I),H=fo(r,O);u[a]=N,u[a+=1]=V,u[a+=1]=G,u[a+=1]=H,a+=1,d=4}else N=fo(r,T),V=fo(r,C),u[a]=N,u[a+=1]=V,a+=1,d=2;h=o,o=t[v]}return e&&(u[a]=u[0],u[a+=1]=u[1],a+=1),[u,d,[h,o]]}(t,i,n,!0)[0]},WX=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.gO=i,o.cL=new BX,o.wO=Ps,o.pO=Ps,o.yB=i.kO(),o}return n(i,t),i.prototype.xO=function(t,i){var n,e=0,r=Array(0);if(void 0!==i){for(var s=t.length,o=Array(s+i.length),h=0,u=0;h0?pj(this.th.S(),this.Ou.S(),this.bt.S(),this.Pu.S()*S/100,this.Du.S()*S/100,y)[0]:[this.th.S()],g=v.length-1;if(2===g){var w=(v[g-1].x+v[1].x)/2,p=(v[g-1].y+v[1].y)/2;this.zu=l(w,p)}else{var k=Math.floor(g/2);this.zu=l(v[k].x,v[k].y)}this.Eu=v[1];var x=v.length-1;this.Nu=v[x],this._u.S()&&(v.shift(),m.shift());var M=!1;(this.t()||this.th.t||this.Ou.t||this.bt.t||this.Pu.t||this.Du.t||this._u.t||this.Ru.t||a)&&(this.pO=b(l(this.kh().x-f,this.kh().y-c),l(this.kh().x+f,this.kh().y+c)),M=!0,this.th.t=!1,this.Ou.t=!1,this.bt.t=!1,this.Pu.t=!1,this.Du.t=!1,this._u.t=!1,this.Ru.t=!1,this.Go());var A=this.jo();(M||A)&&this.Ho!==Re&&(this._u.S()?(this.AO&&this.yB.gl.deleteBuffer(this.AO),t=h(this.xO(v,m),4),this.FO=t[0],this.AO=t[1],this.TO=t[2],this.CO=t[3]):(this.AO&&this.yB.gl.deleteBuffer(this.AO),i=h(this.xO(v,void 0),4),this.FO=i[0],this.AO=i[1],this.TO=i[2],this.CO=i[3]),this.Ho instanceof Je?this.BO=VX(this.pO,this.Rt,this.Ho.getPosition(),this.Ho.getExtent(),this.Ho.getShape(),this.yB.uL()):this.Ho instanceof Qe?this.LO=GX(this.pO,this.Rt,this.Ho.getAngle(!0),this.yB.uL()):(this.BO=void 0,this.LO=void 0)),A&&(this.IO=this.yB.FI(EX["2D"],EX.Color({dataType:this.Ho instanceof Je||this.Ho instanceof Qe?["gradient",this.Ho]:"uniform"}),EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0})),this.Xo(this.Ho));var F=this.Zo;if(F instanceof nr&&(M||this.Jo(F.getThickness()))){this._u.S()?360===u?(v.pop(),m.pop(),n=h(this.MO(v,void 0,F.getThickness(),this.Qp),2),this.OO=n[0],this.PO=n[1],this.DO&&this.OO?this.yB.$L(this.DO,this.OO,!0):!this.DO&&this.OO?this.DO=this.yB.qL(this.OO,!0):this.DO&&!this.OO&&(this.yB.VI(this.DO),this.DO=void 0),e=h(this.MO(m,void 0,F.getThickness(),this.Qp),2),this._O=e[0],this.RO=e[1],this.zO&&this._O?this.yB.$L(this.zO,this._O,!0):!this.zO&&this._O?this.zO=this.yB.qL(this._O,!0):this.zO&&!this._O&&(this.yB.VI(this.zO),this.zO=void 0)):(r=h(this.MO(v,m,F.getThickness(),this.Qp),2),this.OO=r[0],this.PO=r[1],this.DO&&this.OO?this.yB.$L(this.DO,this.OO,!0):!this.DO&&this.OO?this.DO=this.yB.qL(this.OO,!0):this.DO&&!this.OO&&(this.yB.VI(this.DO),this.DO=void 0),this._O&&(this.zO&&this.yB.gl.deleteBuffer(this.zO),this.zO=void 0,this.RO=0)):(360===u&&(v.shift(),v.pop()),s=h(this.MO(v,void 0,F.getThickness(),this.Qp),2),this.OO=s[0],this.PO=s[1],this.DO&&this.OO?this.yB.$L(this.DO,this.OO,!0):!this.DO&&this.OO?this.DO=this.yB.qL(this.OO,!0):this.DO&&!this.OO&&(this.yB.VI(this.DO),this.DO=void 0));var T=F.getFillStyle();T instanceof Je?this.EO=VX(this.pO,this.Rt,T.getPosition(),T.getExtent(),T.getShape(),this.yB.uL()):T instanceof Qe?this.NO=GX(this.pO,this.Rt,T.getAngle(!0),this.yB.uL()):(this.EO=void 0,this.NO=void 0),this.VO=T===Re?void 0:this.yB.FI(EX["2D"],EX.Color({dataType:T instanceof Je||T instanceof Qe?["gradient",T]:"uniform"}),EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0})),this.Qo(F)}if(M){var C=1,B=1;F instanceof nr&&(C=F.getThickness()*this.Qp.x,B=F.getThickness()*this.Qp.y),this.wO=b(l(this.pO.min.x-C,this.pO.min.y-B),l(this.pO.max.x+C,this.pO.max.y+B))}}return this},i.prototype.vB=function(){var t=this;if(this.Yo()){this.Fe();var i=this.Ho,n=this.IO,e=this.AO;n&&e&&this.yB.rL(n).NI(n,(function(r,s,o,h){t.yB.VL(r("uScale"),t.cL.aO()).VL(r("uDisp"),t.cL.uO()).VL(h("uScaleStart_highpart"),t.cL.fO()).VL(h("uScaleStart_lowpart"),t.cL.cO()).UI(o,e,t.Rt.Ei(),void 0),i instanceof Ee?t.yB.YL(r("uColor"),i.getColor()):i instanceof Je?t.BO&&t.yB.GI(n,t.BO,i):i instanceof Qe&&t.LO&&t.yB.HI(n,t.LO,i),t.yB.Ky(t.CO,t.TO)}));var r=this.Zo;r instanceof nr&&(void 0!==this.DO&&this.GO(this.DO,this.PO,r),void 0!==this.zO&&this.GO(this.zO,this.RO,r))}return this},i.prototype.GO=function(t,i,n){var e=this,r=this.VO,s=n.getFillStyle();r&&this.yB.rL(r).NI(r,(function(o,h,u,a){e.yB.VL(o("uScale"),e.cL.aO()).VL(o("uDisp"),e.cL.uO()).UI(u,t,e.Rt.Ei(),void 0),s instanceof Ee?e.yB.YL(o("uColor"),s.getColor()):s instanceof Je?e.EO&&e.yB.GI(r,e.EO,s):s instanceof Qe&&e.NO&&e.yB.HI(r,e.NO,s);var f=n.getThickness(),c=-1===f||1===f;e.yB.Ky(c?e.yB.gl.LINE_LOOP:e.yB.gl.TRIANGLE_STRIP,i)}))},i.prototype.HO=function(t,i){if(this.Yo()&&this.Qp){var n=sr({x:t,y:i},this.oo.Rt,this.Rt);if(eo.Ut(n,this.wO.min,this.wO.max)){if(eo.Ut(n,this.pO.min,this.pO.max)&&this.Ho!==Re&&this.FO){var e=this.FO.length,r=2;if(this._u.S())for(;rMath.abs(p.y/this.Qp.y)){var f=l(g.x,g.y+h),c=l(g.x,g.y-h),d=l(w.x,w.y+h),v=l(w.x,w.y-h);if($s(n,f,c,d)||$s(n,d,v,f))return!0}else{var y=l(g.x+u,g.y),S=l(g.x-u,g.y),m=l(w.x+u,w.y),b=l(w.x-u,w.y);if($s(n,y,S,m)||$s(n,m,b,y))return!0}}if(this._O&&1!==s.getThickness()){if(Zs(n,this._O))return!0}else if(this._O)for(o=this._O.length-1,h=2*this.Qp.y,u=2*this.Qp.x,a=0;aMath.abs(p.y/this.Qp.y)){f=l(g.x,g.y+h),c=l(g.x,g.y-h),d=l(w.x,w.y+h),v=l(w.x,w.y-h);if($s(n,f,c,d)||$s(n,d,v,f))return!0}else{y=l(g.x+u,g.y),S=l(g.x-u,g.y),m=l(w.x+u,w.y),b=l(w.x-u,w.y);if($s(n,y,S,m)||$s(n,m,b,y))return!0}}}}}return!1},i.prototype.ZB=function(){return this.jO&&(this.yB.VI(this.jO),this.jO=void 0),this.WO&&(this.yB.VI(this.WO),this.WO=void 0),this.AO&&(this.yB.VI(this.AO),this.AO=void 0),this.DO&&(this.yB.VI(this.DO),this.DO=void 0),this.zO&&(this.yB.VI(this.zO),this.zO=void 0),this},i}(LE),UX=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.gO=i,o.cL=new BX,o.wO=Ps,o.yB=i.kO(),o}return n(i,t),i.prototype.Pw=function(t){var i,n,e,r=Number.MAX_VALUE;try{for(var s=o(this.Dh),h=s.next();!h.done;h=s.next()){var u=h.value,a=Hs(sr(u,this.Rt,this.oo.Rt),t);aMath.abs(d.y/this.Qp.y)){var v=l(f.x,f.y+h),y=l(f.x,f.y-h),S=l(c.x,c.y+h),m=l(c.x,c.y-h);if($s(n,v,y,S)||$s(n,S,m,v))return!0}else{var b=l(f.x+u,f.y),g=l(f.x-u,f.y),w=l(c.x+u,c.y),p=l(c.x-u,c.y);if($s(n,b,g,w)||$s(n,w,p,b))return!0}}}}}return!1},i.prototype.ZB=function(){return this.jO&&(this.yB.VI(this.jO),this.jO=void 0),this.AO&&(this.yB.VI(this.AO),this.AO=void 0),this.DO&&(this.yB.VI(this.DO),this.DO=void 0),this},i}(FE),YX=function(t,i,n){void 0===n&&(n=200);var e=n-1;t<=1&&(t+=1),i<=1&&(i+=1);for(var r=Math.ceil((t-1)/e),s=Math.ceil((i-1)/e),o=Array.from(Array(r)).map((function(){return Array(s)})),h=0,u=0,a=0,f=t-1;h=r-1,l=a>=s-1,d=t[c?h-1:h+1][a],v=t[h][l?a-1:a+1],y=Ls.normalize(Ls.cross(Ls.divideVec(Ls.subtractVec(c?d:f,c?f:d),e),Ls.divideVec(Ls.subtractVec(l?f:v,l?v:f),e)));u[a]=y}var m=r-1,g=s-1,w=m*g*6,p=Array(6*(m*g*6)),k=Array(w),x=b(S(Is,Is,Is),S(Os,Os,Os)),M=0,A=1,F=2,T=3,C=0,B=0;for(h=0;h=r-1,m=d>=s-1,g=t[y?l-1:l+1][d],w=t[l][m?d-1:d+1],p=Ls.normalize(Ls.cross(Ls.divideVec(Ls.subtractVec(y?g:v,y?v:g),e),Ls.divideVec(Ls.subtractVec(m?v:w,m?w:v),e)));u[c+0]=v.x,u[c+1]=v.y,u[c+2]=v.z,u[(c+=3)+0]=p.x,u[c+1]=p.y,u[c+2]=p.z,c+=3,f.min.x=Math.min(f.min.x,v.x),f.min.y=Math.min(f.min.y,v.y),f.min.z=Math.min(f.min.z,v.z),f.max.x=Math.max(f.max.x,v.x),f.max.y=Math.max(f.max.y,v.y),f.max.z=Math.max(f.max.z,v.z)}var k=0;for(l=0;l0){try{for(var e=o(this.YO),r=e.next();!r.done;r=e.next()){var s=r.value,h=s||{},u=h.vbo,a=h.ibo,f=h.colors,c=h.intensities;u&&(n.VI(u),s.vbo=void 0),a&&(n.VI(a),s.ibo=void 0),f&&(n.VI(f),s.colors=void 0),c&&(n.VI(c),s.intensities=void 0)}}catch(i){t={error:i}}finally{try{r&&!r.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}this.YO.length=0}},i.prototype.ZB=function(){return this.KO(),this.tP&&(this.yB.zI(this.tP),this.tP=void 0),this.gO.BI.uo(this.qO),this.QO=void 0,this},i.prototype.Ba=function(i,n){return this.UO="mesh",t.prototype.Ba.call(this,i,n)},i.prototype.Et=function(){return"grid"===this.UO?this.Nh.max.x+this.St.x:this.Nh.max.x},i.prototype.zt=function(){return"grid"===this.UO?this.Nh.min.x+this.St.x:this.Nh.min.x},i.prototype.Vt=function(){return"grid"===this.UO?this.Nh.max.y+this.St.y:this.Nh.max.y},i.prototype.Nt=function(){return"grid"===this.UO?this.Nh.min.y+this.St.y:this.Nh.min.y},i.prototype.cu=function(){return 0},i.prototype.lu=function(){return 0},i}(GE),tZ=function(){function t(){this.first=0,this.second=1,this.third=2,this.fourth=3,this.fifth=4,this.sixth=5}return t.prototype.iP=function(t){return this.first=t,this.second=t+1,this.third=t+2,this.fourth=t+3,this.fifth=t+4,this.sixth=t+5,t+=6,this},t.prototype.nP=function(){return this.first=this.second,this.second=this.third,this.third=this.fourth,this.fourth=this.fifth,this.fifth=this.sixth,this.sixth+=1,this},t.prototype.eP=function(){return this.first=this.third,this.second=this.fourth,this.third=this.fifth,this.fourth=this.sixth,this.fifth=this.fourth+1,this.sixth=this.fifth+1,this},t.prototype.jt=function(t){var i=t.buffer,n=t.position;return i[n]=this.first,i[n+1]=this.second,i[n+2]=this.third,n+=3,t.position=n,t.next&&this.nP(),this},t.prototype.Yt=function(t){var i=t.buffer,n=t.position;return i[n]=this.first,i[n+1]=this.third,i[n+2]=this.second,i[n+3]=this.third,i[n+4]=this.fourth,i[n+5]=this.second,n+=6,t.position=n,t.next&&this.eP(),this},t.prototype.rP=function(t,i){i.next=!0,6*t>=i.buffer.length&&(i.buffer=Array(6*t));for(var n=0;n0&&(iZ.nP(),f>0&&(f-=1)),s.push(t),r.push(iZ.first,iZ.second,iZ.third),u=iZ.second,o=t,h=void 0,a&&s.push(n,e),[o,h,u,f]},oZ=function(t,i){var n,e,r,s,o,u,a,f;void 0===i&&(i=0),iZ.iP(i);var c,l,d=h(t,2),v=d[0],y=d[1],S=v.length,m=[],b=[],g=[],w=i,p=0,k=v[p],x=y[p],M=v[p],A=y[p],F=!1,T=w>0?M.y!==A.y?2:1:0;if(S>1)for(;pA.y?k.y>x.y?(c=(n=h(nZ(M,A,k,x,m,g,c,l,w,C),3))[0],l=n[1],w=n[2]):k.yx.y?(c=(o=h(eZ(M,A,k,x,b,m,g,c,l,w,C),3))[0],l=o[1],w=o[2]):(c=(u=h(rZ(M,A,k,b,g,c,l,w,F,C),4))[0],l=u[1],w=u[2],F=u[3]):k.y===x.y?(c=M,F&&(g.push(M),F=!1,iZ.nP()),0===g.length&&w>0&&T>0&&(T-=1)):k.y>x.y?(c=(a=h(sZ(M,0,k,x,m,g,c,l,w,C,T),4))[0],l=a[1],w=a[2],T=a[3]):(c=(f=h(sZ(M,0,k,x,b,g,c,l,w,C,T),4))[0],l=f[1],w=f[2],T=f[3])}return[g,new Uint16Array(m),new Uint16Array(b),w,T]},hZ=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.gO=i,o.cL=new BX,o.oP=0,o.Dh=Array(),o.hP=0,o.uP=new Uint16Array(0),o.aP=new Uint16Array(0),o.yB=i.kO(),o}return n(i,t),i.prototype.Fe=function(){var t=this.Uo()||this.t();if(this.Yo()){this.cL.$I(this.Rt);var i=this.Rt instanceof Go==!1,n=i?this.Rt.tn():void 0,e=this.xu(),r=this.Rt.Qi()||t,s=this.t()||this.yu.t||r&&"disabled"!==e.type;if(s){if(this.oP=0,this.uP=new Uint16Array(0),this.aP=new Uint16Array(0),this.Dh.length=0,this.hP=0,this.Su>1){var o=h(oZ([i?e.packager(this.du,n,.5):this.du,i?e.packager(this.vu,n,.5):this.vu]),4),u=o[0],a=o[1],f=o[2],c=o[3];this.oP=c,this.uP=a,this.aP=f,this.Dh=u,this.hP=u.length}this.Go(),this.yu.t=!1}if(this.bu&&this.Gh[0].length>1){var l=h(this.Gh,2),d=l[0],v=l[1],y=d.length,S=h(oZ([i?e.packager(d,n,.5):d,i?e.packager(v,n,.5):v],this.oP),5),m=(u=S[0],a=S[1],f=S[2],c=S[3],S[4]);this.oP=c,this.Nh=this.jh?Js(this.Nh,this.jh):Js(this.Nh,Ks(u));for(var b=u.length,g=m;g0||this.Su>0?1:m;g0&&this.Gh[0].length>0?[u(u([],h(this.Xh()[0])),h(this.Yh()[0])),u(u([],h(this.Xh()[1])),h(this.Yh()[1]))]:this.Xh(),2),n=i[0],e=i[1],r=n.length>2&&n[1].x0&&this.Gh[0].length>0?[u(u([],h(this.Xh()[0])),h(this.Yh()[0])),u(u([],h(this.Xh()[1])),h(this.Yh()[1]))]:this.Xh(),2),n=i[0],e=i[1],r=n.length;if(0!==r){var s=this.wu?1:0,o=r-(this.pu?2:1),a=n.length>2&&n[1].xMath.abs(h.y/r.y)){var u=r.y,a=l(s.x,s.y+u),f=l(s.x,s.y-u),c=l(o.x,o.y+u),d=l(o.x,o.y-u);return $s(e,a,f,c)||$s(e,c,d,a)}var v=r.x,y=l(s.x+v,s.y),S=l(s.x-v,s.y),m=l(o.x+v,o.y),b=l(o.x-v,o.y);return $s(e,y,S,m)||$s(e,m,b,y)}}}return!1},i.prototype.dispose=function(){return t.prototype.dispose.call(this),this.qO&&(this.gO.BI.uo(this.qO),this.qO=void 0),this.QO=void 0,this.xP=void 0,this.gP&&(this.yB.VI(this.gP),this.gP=void 0),this},i.prototype.ZB=function(){return this},i}(EE),aZ=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.gO=i,o.cL=new BX,o.yB=i.kO(),o.fL=o.yB.FI(EX["2D"],EX.Color({dataType:"uniform"}),EX.VertexLocation({axisWorldTranslation:NX(o.Rt),normalSource:void 0})),o}return n(i,t),i.prototype.Fe=function(){var t=this.ia,i=this.ua,n=this.Uo()||this.t();if(this.Yo()&&t instanceof nr){var e=t.getThickness(),r=this.sa(e);this.cL.$I(this.Rt);var s=this.Rt.Qi()||n;if(this.t()||r||s&&1!==e)if(this.gP&&this.yB.gl.deleteBuffer(this.gP),1===e||-1===e){var o=os(i,this.Rt.Ei());this.gP=this.yB.qL(o),this.kP=i.length,this.pP=this.yB.gl.LINES}else{for(var h=[],u=0;u0){for(var n=Math.max(t[i-1].x,t[0].x),e=Math.min(t[i-1].x,t[0].x),r=t[0].y,s=t[0].y,o=0;or&&(r=h.y),h.y0){for(var n=Math.max(t[i-1].y,t[0].y),e=Math.min(t[i-1].y,t[0].y),r=t[0].x,s=t[0].x,o=0;or&&(r=h.x),h.x2*this.DP.totalDataPointsAtTime;if(y&&!S)return this.EP=setTimeout((function(){return n.NP(t)}),1e3),!1;var m,b=l>=10,g=this.DP.enabled?this.DP.columnWidthAxis/f<1.5:void 0,w=this.DP.enabled&&l>this.DP.dataPointsPerColumn?l/this.DP.dataPointsPerColumn>=2:void 0;!0===this.DP.enabled?g?w&&(m={enabled:!0,columnWidthAxis:d,dataPointsPerColumn:l,totalDataPointsAtTime:s}):m=b?{enabled:!0,columnWidthAxis:d,dataPointsPerColumn:l,totalDataPointsAtTime:s}:{enabled:!1,totalDataPointsAtTime:s}:b&&(m={enabled:!0,columnWidthAxis:d,dataPointsPerColumn:l,totalDataPointsAtTime:s});var p=!1===i;return m?(p&&(this.DP=m),!0):(p&&(this.DP=e(e({},this.DP),{totalDataPointsAtTime:s})),!1)},i.prototype.Vb=function(){this.VP=void 0,this._P.length=0,this.EP&&(clearTimeout(this.EP),this.EP=void 0)},i.prototype.GP=function(t){var i;if(0===t.length)return t;if(this.PP||!this.LP||"linear"!==this.RP.type||!this.DP.enabled)return t;var n,e,r=(i=this._P.length>0?ps(this._P,t,{canReturnB:!0}):t).length,s=[],o=void 0===this.VP,h=-1,u=-1,a=0,f=0;if("x"!==this.LP||this.IP)if("x"===this.LP&&this.IP)for(v=this.DP.columnWidthAxis,y=(this.VP?this.VP.x:i[0].x)-v,d=0;d=y?((!n||S.y>n.y)&&(n=S,h=d),(!e||S.y=l?((!n||S.x>n.x)&&(n=S,h=d),(!e||S.xn.x)&&(n=S,h=d),(!e||S.xn.y)&&(n=S,h=d),(!e||S.y0&&(this.VP=s[b-1]),s},i.prototype.HP=function(t){if(this.LP&&"linear"===this.RP.type){var i="x"===this.LP?this.RP.scale.x.cv:this.RP.scale.y.cv;if(!i)throw new Error("CP helper has no information about Axis state.");if(i.wn===Ho.progressive||i.wn===Ho.regressive){var n=Math.abs("x"===this.LP?this.RP.scale.x.getInnerInterval():this.RP.scale.y.getInnerInterval());if(this.DP.enabled)return 2*n/this.DP.columnWidthAxis;var e=t.length,r=t[0],s=t[e-1];return n/this.calculateAvgStepBetweenDataPoints("x"===this.LP?r.x:r.y,"x"===this.LP?s.x:s.y,e)}}},i.prototype.jP=function(t,i,n){if(!this.LP)return i;var e=n.length,r=hE(n,t.min,this.LP,this.IP,0,e-1);void 0===r&&(r=this.IP?e-1:0);var s=hE(n,t.max,this.LP,this.IP,0,e-1);return void 0===s&&(s=this.IP?0:e-1),1+Math.abs(s-r)},i.prototype.WP=function(){this.EP&&(clearTimeout(this.EP),this.EP=void 0)},i.prototype.NP=function(t){this.zP(t,!0)&&this.xn()},i}(lZ),yZ=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.renderVisibleOnly=function(t,i){var n=this.Rt.x.getInnerStart(),e=this.Rt.x.getInnerEnd(),r=Math.min(n,e),s=Math.max(n,e),o=this.Rt.y.getInnerStart(),h=this.Rt.y.getInnerEnd(),u=Math.min(o,h),a=Math.max(o,h);t.forEach((function(t,n){t.existingCoordinatesCount<=1||t.boundaries.max.xs||t.boundaries.max.ya||i(t)}))},i}(lZ),SZ=function(){function t(t,i,n){this.UP=i,this.YP=n,this.XP=t,this.ZP=[]}return t.prototype.KP=function(t,i,n,r){var s=t.length;if(0!==s){var o=t,h=s,u=this.XP[this.XP.length-1];do{var a=this.XP.length,f=void 0;if(u||(u=this.qP(i,h)),u)0===u.allocatedCoordinatesCount-u.existingCoordinatesCount&&(u=void 0);var c=0;if(this.YP&&a>0&&(void 0===u||0===u.existingCoordinatesCount)){var l=this.XP[a-1].lastDataPoint;l?(o.splice(0,0,l),c=1,h+=1):console.error("SegmentationHelper _connectSegments = true, but segment has no lastDataPoint information!")}if(u){f=Math.min(h,u.allocatedCoordinatesCount-u.existingCoordinatesCount),r(u,o.slice(0,f),f,c)}else{var d=Math.ceil(i)+c;f=Math.min(d,h);var v=o.slice(0,f),y=e(e({},n(d,v,f,c)),{isDropped:!1});this.XP.push(y)}f>0&&(h>f?h=(o=o.slice(f)).length:(o=[],h=0))}while(h>0);this.JP()}},t.prototype.QP=function(t){var i=t,n=this.XP.indexOf(i);n>=0&&this.XP.splice(n,1),i.droppedTimestamp=wr.performance.now(),this.ZP.push(i)},t.prototype.$P=function(){var t=this;this.XP.slice().forEach((function(i){return t.QP(i)}))},t.prototype.tD=function(){var t=this;this.XP.forEach((function(i){return t.UP(i)})),this.ZP.forEach((function(i){return t.UP(i)})),this.XP.length=0,this.ZP.length=0},t.prototype.qP=function(t,i){var n=2*t/3,e=4*t/3,r=this.ZP.findIndex((function(t){return t.allocatedCoordinatesCount>=n&&t.allocatedCoordinatesCount<=e}));if(r>=0){var s=this.ZP[r];return this.ZP.splice(r,1),this.XP.push(s),s}},t.prototype.JP=function(){if(this.ZP.length>5)for(var t=wr.performance.now(),i=0;i=1e4)&&(this.UP(n),this.ZP.splice(i,1),i-=1)}},t}(),mZ=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype.iD=function(t,i){if(!i||"object"!=typeof i)return 0;var n=this.Rt.x.getInnerStart(),e=this.Rt.x.getInnerEnd(),r=Math.min(n,e),s=Math.max(n,e),o=this.Rt.y.getInnerStart(),h=this.Rt.y.getInnerEnd(),u=Math.min(o,h),a=Math.max(o,h);if("maxDataPointCount"in i)return this.nD(t,i.maxDataPointCount,r,s,u,a);if("minDataPointCount"in i)return this.eD(t,i.minDataPointCount,r,s,u,a);if("progressiveDataCleaningThreshold"in i)return this.rD(t,i.progressiveDataCleaningThreshold,r,s,u,a);throw new Error("Unimplemented data cleaning configuration: "+JSON.stringify(i))},i.prototype.nD=function(t,i,n,e,r,s){if(void 0===i||i<=0)return 0;var o=t.reduce((function(t,i){return t+i.existingDataPointsCount}),0);if(o<=i)return 0;for(var h=0,u=o,a=0;ai&&(h+=1,u-=f.existingDataPointsCount)}return h},i.prototype.rD=function(t,i,n,e,r,s){if(void 0===i||!this.LP)return 0;for(var o=0,h=0;he:u.boundaries.min.y>s:"x"===this.LP?u.boundaries.max.xi:u.boundaries.min.y>i:"x"===this.LP?u.boundaries.max.x2))break;o+=1}return o},i.prototype.eD=function(t,i,n,e,r,s){if(void 0===i||0===i)return 0;for(var o=0,h=0,u=t.length-1;u>=0;u-=1){var a=t[u];if(h>i)if(this.LP){if(this.IP?"x"===this.LP?a.boundaries.min.x>e:a.boundaries.min.y>s:"x"===this.LP?a.boundaries.max.xe||a.boundaries.max.ys?o+=1:o=0;h+=a.existingDataPointsCount}return o},i.prototype.sD=function(t,i){var n=t.reduce((function(t,i){return Js(t,i.boundaries)}),Ps);if(i&&"progressiveDataCleaningThreshold"in i&&i.progressiveDataCleaningThreshold){var e=i.progressiveDataCleaningThreshold;"x"!==this.LP||this.IP?"x"===this.LP&&this.IP?n.max.x=Math.min(n.max.x,e):"y"!==this.LP||this.IP?"y"===this.LP&&this.IP&&(n.max.y=Math.min(n.max.y,e)):n.min.y=Math.max(n.min.y,e):n.min.x=Math.max(n.min.x,e)}return n},i}(lZ),bZ=function(t){function i(i,n,e,r,s,o){var h=t.call(this,i,n,e,r,s)||this;h.Vm=o,h.cL=new BX,h.ic=[],h.oD=new yZ(h.Rt,h),h.hD=new vZ(h.Rt,h,(function(){return h.engine.xn()})),h.uD=new SZ(h.ic,(function(t){return t.coordsBuffer&&h.yB.VI(t.coordsBuffer)}),!0),h.aD=new mZ(h.Rt,h),h.xP={type:"none"},h.yB=i.kO(),h.gO=i;var u,a,f,c=h.Rt.Ei(),l=!0===(null==o?void 0:o.individualLookupValuesEnabled),d=0;c||(u=d,d+=2),c&&(a=d,d+=4),l&&(f=d,d+=1);var v=function(t,i){return i?function(i,n){return us(i,t)}:function(i,n){return os(i,t)}}(c,l);return h.fD={individualLookupValuesEnabled:l,attributesPerVertex:d,attributeOffsetCoordinateLowPrecision:u,attributeOffsetCoordinateHighPrecision:a,attributeOffsetLookUpValue:f,prepareRenderData:function(t,i){return v(t,h.ia.fillStyle)}},h}return n(i,t),i.prototype.Fe=function(){var t=this,i=this.t(),n=this.ia,e=this.Ko(),r=this.Gh,s=r.length,o=s>0,h=this.co;this.lo.S(),o&&(this.aa=ps(this.aa,r,{canReturnB:!0}),this.Vh+=s);var u=this.fa.t,a=this.aD.iD(this.ic,this.fa.S());if(a>0){for(var f=0,c=0;c0){var S=this.hD.HP(this.aa)||(this._o("ApplicationType",(function(t){return"InternalUI"===t.type}))?this.Vh:1e5);y/S>10&&(S=y/10),this.uD.KP(v,S,(function(i,n,e,r){var s=t.oD.calculateUserDataPointsBoundaries(n);return{allocatedCoordinatesCount:i,existingDataPointsCount:t.hD.jP(s,e,t.aa)-r,existingCoordinatesCount:e,jointPointsCount:r,boundaries:s,coordsBuffer:t.yB.JL(i*t.fD.attributesPerVertex,t.fD.prepareRenderData(n,e)),lastDataPoint:n[e-1]}}),(function(i,n,e,r){var s=Js(i.boundaries,t.oD.calculateUserDataPointsBoundaries(n)),o=t.hD.jP(s,i.existingCoordinatesCount+e,t.aa)-(i.jointPointsCount+r);t.yB.QL(i.coordsBuffer,i.existingCoordinatesCount*t.fD.attributesPerVertex,t.fD.prepareRenderData(n,e)),i.jointPointsCount+=r,i.lastDataPoint=n[e-1],i.existingDataPointsCount=o,i.existingCoordinatesCount+=e,i.boundaries=s}))}if(u&&(this.Nh=this.aD.sD(this.ic,this.fa.S())),this.cL.$I(this.Rt),e||h){var m=n instanceof nr&&n,b=m&&m.getThickness(),g=m&&m.getFillStyle(),w=g instanceof Ee&&g,p=g instanceof Qe&&g,k=g instanceof Je&&g,x=g instanceof Ve&&g,M=w||p||k||x,A=this.fD.individualLookupValuesEnabled;if(x&&"value"===x.getLookUpProperty()&&!A){var F='LCJS misusage error: Series individualLookupValuesEnabled flag must be set if using PalettedFill with lookUpProperty="value" !';throw wr.alert(F),new Error(F)}if(M&&m&&!1!==b){var T=-1===b?"primitive":"triangulated",C=p?["gradient",p]:k?["gradient",k]:x?["lookup",x.getLookUpProperty()]:"uniform";this.xP="primitive"===T?{type:T,shader:this.yB.FI(EX["2D"],EX.Color({dataType:C}),EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0})),lineStyle:m,fillStyleSolid:w,fillStyleLinearGradient:p,fillStyleRadialGradient:k,fillStylePaletted:x}:"triangulated"===T?{type:T,shader:this.yB.FI(EX["2D"],EX.Color({dataType:C}),EX.LineInstanced2D({axisWorldTranslation:NX(this.Rt),normalSource:void 0}),this.yB.kI?EX.AliasedEdge():void 0),geometry:gZ(this.yB,b),lineStyle:m,fillStyleSolid:w,fillStyleLinearGradient:p,fillStyleRadialGradient:k,fillStylePaletted:x}:{type:"none"},this.oa(m)}else this.xP={type:"none"};if(k?this.EO=VX(this.No(),this.Rt,k.getPosition(),k.getExtent(),k.getShape(),this.yB.uL()):p?this.NO=GX(this.No(),this.Rt,p.getAngle(!0),this.yB.uL()):(this.EO=void 0,this.NO=void 0),x){if(x&&x.lut.isValid){var B=x.getPalette();this.QO=this.gO.$O(B,this.qO,this.QO),this.qO=B}}else this.gO.BI.uo(this.qO),this.qO=void 0}return this.Vo=!1,this.co=!1,this.Gh=[],this.lo.t=!1,this.Go(),this.fa.t=!1,this},i.prototype.vB=function(){var t=this;this.Fe();var i=this.yB.gl,n=this.xP;if(!n||"none"===n.type)return this;var e=n.shader,r=n.lineStyle,s=n.fillStyleSolid,o=n.fillStyleLinearGradient,h=n.fillStyleRadialGradient,u=n.fillStylePaletted;return this.yB.rL(e).NI(e,(function(a,f,c,l){if(t.Rt instanceof Vo||t.Rt instanceof tj?t.yB.VL(e.yL("uScale"),t.cL.aO()).VL(e.yL("uDisp"),t.cL.uO()).VL(e.SL("uScaleStart_highpart"),t.cL.fO()).VL(e.SL("uScaleStart_lowpart"),t.cL.cO()):t.Rt instanceof Go&&t.yB.VL(e.SL("uScaleStart"),t.cL.MixedScaleXY.uScaleStart).VL(e.SL("uScaleStartLog"),t.cL.MixedScaleXY.uScaleStartLog).VL(e.SL("uScaleInterval"),t.cL.MixedScaleXY.uScaleInterval).VL(e.SL("uScaleIntervalLog"),t.cL.MixedScaleXY.uScaleIntervalLog).VL(e.yL("uViewportStart"),t.cL.MixedScaleXY.uViewportStart).VL(e.yL("uViewportSize"),t.cL.MixedScaleXY.uViewportSize),s?t.yB.YL(e.yL("uColor"),s.getColor()):h?t.EO&&t.yB.GI(e,t.EO,h):o?t.NO&&t.yB.HI(e,t.NO,o):u&&t.QO&&t.yB.KL(a("uLookupTexture"),t.QO.texture,0).XL(a("uLookupMin"),u.lut.min).XL(a("uLookupMax"),u.lut.max).XL(a("uLookupTextureHeightPx"),t.QO.textureHeight),"triangulated"===n.type){var d=r.getThickness()+1;t.yB.XL(e.yL("uThicknessPixels"),d).XL(e.SL("uAALimit"),1-(d-1)/d).VL(e.yL("uRatioPxClip"),[2/t.oo.vi().x,2/t.oo.vi().y])}t.oD.renderVisibleOnly(t.ic,(function(e){var r=e.coordsBuffer;if(r){if(i.bindBuffer(i.ARRAY_BUFFER,r),"triangulated"===n.type)if(t.Rt.Ei()||void 0===t.fD.attributeOffsetCoordinateLowPrecision){if(t.Rt.Ei()&&void 0!==t.fD.attributeOffsetCoordinateHighPrecision){var s=f("aLocationA_highpart"),o=f("aLocationA_lowpart"),h=f("aLocationB_highpart"),a=f("aLocationB_lowpart");i.vertexAttribPointer(s,2,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetCoordinateHighPrecision*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(s,1),i.enableVertexAttribArray(s),i.vertexAttribPointer(o,2,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,(t.fD.attributeOffsetCoordinateHighPrecision+2)*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(o,1),i.enableVertexAttribArray(o),i.vertexAttribPointer(h,2,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,(t.fD.attributeOffsetCoordinateHighPrecision+t.fD.attributesPerVertex)*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(h,1),i.enableVertexAttribArray(h),i.vertexAttribPointer(a,2,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,(t.fD.attributeOffsetCoordinateHighPrecision+t.fD.attributesPerVertex+2)*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(a,1),i.enableVertexAttribArray(a)}}else{var l=f("aLocationA"),d=f("aLocationB");i.vertexAttribPointer(l,2,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetCoordinateLowPrecision*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(l,1),i.enableVertexAttribArray(l),i.vertexAttribPointer(d,2,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,(t.fD.attributeOffsetCoordinateLowPrecision+t.fD.attributesPerVertex)*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(d,1),i.enableVertexAttribArray(d)}else if(t.Rt.Ei()||void 0===t.fD.attributeOffsetCoordinateLowPrecision){if(t.Rt.Ei()&&void 0!==t.fD.attributeOffsetCoordinateHighPrecision){var v=f("aPos_highpart");i.vertexAttribPointer(v,2,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetCoordinateHighPrecision*Float32Array.BYTES_PER_ELEMENT),i.enableVertexAttribArray(v);var y=f("aPos_lowpart");i.vertexAttribPointer(y,2,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,(t.fD.attributeOffsetCoordinateHighPrecision+2)*Float32Array.BYTES_PER_ELEMENT),i.enableVertexAttribArray(y)}}else{var S=f("aPos");i.vertexAttribPointer(S,2,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetCoordinateLowPrecision*Float32Array.BYTES_PER_ELEMENT),i.enableVertexAttribArray(S)}if(u&&"value"===u.lookUpProperty&&void 0!==t.fD.attributeOffsetLookUpValue)if("triangulated"===n.type){var m=f("aLookupValueA");i.vertexAttribPointer(m,1,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetLookUpValue*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(m,1),i.enableVertexAttribArray(m);var b=f("aLookupValueB");i.vertexAttribPointer(b,1,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,(t.fD.attributeOffsetLookUpValue+t.fD.attributesPerVertex)*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(b,1),i.enableVertexAttribArray(b)}else{var g=f("aLookupValue");i.vertexAttribPointer(g,1,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetLookUpValue*Float32Array.BYTES_PER_ELEMENT),i.enableVertexAttribArray(g)}"triangulated"===n.type?n.geometry.rL(c).Ky(e.existingCoordinatesCount-1):t.yB.Ky(i.LINE_STRIP,e.existingCoordinatesCount,0)}})),i.bindBuffer(i.ARRAY_BUFFER,null)})),this},i.prototype.Qh=function(t,i){return Array.isArray(t)||(t=[t]),this.Gh=ps(this.Gh,t,{canReturnB:!0}),this.Nh=Js(this.Nh,i||this.oD.calculateUserDataPointsBoundaries(t)),this},i.prototype.$h=function(){return t.prototype.$h.call(this),this},i.prototype.dispose=function(){return t.prototype.dispose.call(this),this.hD.WP(),this.qO&&(this.gO.BI.uo(this.qO),this.qO=void 0),this.xP={type:"none"},this.QO=void 0,this},i.prototype.ZB=function(){return this.uD.tD(),this},i.prototype.Cw=function(t){var i=this.Gh.length>0?u(u([],h(this.Xh())),h(this.Yh())):this.Xh(),n=eE(i,t,this.Wh,this.wu,this.pu,this.Rt,this.engine.Rt,this.Nh,this.oD.LP,this.oD.IP);return void 0!==n?i[n]:void 0},i.prototype.WM=function(t){var i=this.Gh.length>0?u(u([],h(this.Xh())),h(this.Yh())):this.Xh(),n=i.length;if(0!==n){var e=this.wu?1:0,r=n-(this.pu?2:1);if(this.Wh===Wz.Nearest){for(var s=Is,o=void 0,a=void 0,f=0;fb&&this.oD.LP)if("x"===this.oD.LP)for(var g=v/(F=v/b),w=0;w=0&&Tr.x){m=(S=g*w)+b;break}}}else if("y"===this.oD.LP){var F;for(g=v/(F=b),w=0;w=0&&Tr.y){m=(S=g*w)+b;break}}}}for(;Su&&L.xl&&L.y=50?8:i>=20?6:i>=7?4:i>=4?3:1===i?1:2)},wZ=function(t){function i(i,n){var e=t.call(this,i)||this;e.cD=n,e.lD=os(n,!1),e.dD=n.length,e.RB=i.qL(e.lD);var r=Ks(e.cD);return e.hi=l(r.max.x-r.min.x,r.max.y-r.min.y),e}return n(i,t),i.prototype.xB=function(){this.yB.VI(this.RB)},i}(fY),pZ=function(t){var i,n,e=((i=[]).push(l(-(n=2/1.73205080757)/2,.3333333333333333)),i.push(l(0,-.6666666666666666)),i.push(l(n/2,.3333333333333333)),i);return new wZ(t,e)},kZ=function(t){var i=[l(-.5,-.5),l(-.5,.5),l(.5,-.5),l(.5,-.5),l(-.5,.5),l(.5,.5)];return new wZ(t,i)},xZ=function(t,i){var n,e=(void 0===(n=i)&&(n=25),pj(l(0,0),0,360,.5,.5,n)[0]);return new wZ(t,e)},MZ=function(t,i,n){var e=i._L.bB.get(t);return e||(e=n(i),i._L.bB.set(t,e)),e},AZ=1e3,FZ=function(i){function e(t,n,e,r,s){var o=i.call(this,t,n,e,r,s)||this;return o.gO=t,o.cL=new BX,o.wO=b(d(Os,Os),d(Is,Is)),o.vD=[],o.yB=t.kO(),o}return n(e,i),e.prototype.Fe=function(){var i=this.Uo()||this.t(),n=this.Gh,e=n.length,r=e>0,s=this._h.S(),o=this.Ho,h=this.size.S(),u=this.Rt.Qi()||i,a=this.t()||this.size.t||this._h.t,f=n&&n.length>0||this.co,c=u||a||this.co;if(r){this.Dh=ps(this.Dh,n,{canReturnB:!0}),this.Vh+=e;var l=this.vD[this.vD.length-1],d=l?{St:l.St,bt:l.bt,iM:{max:{x:l.iM.max.x,y:l.iM.max.y},min:{x:l.iM.min.x,y:l.iM.min.y}},yD:{max:{x:l.yD.max.x,y:l.yD.max.y},min:{x:l.yD.min.x,y:l.yD.min.y}}}:void 0,v=n.length;if(!d)(S={St:0,bt:n.length>=AZ?AZ:n.length}).iM=Ks(n.slice(0,S.bt)),S.yD=vE(S.iM,{x:h,y:h},this.Rt),this.vD[0]=S,d=S,v=n.length-(S.bt||0);if(d&&v)if(d.bt-d.St+vthis.Dh.length?this.Dh.length:y+AZ}).iM=Ks(n.slice(S.St,S.bt)),S.yD=vE(S.iM,{x:h,y:h},this.Rt),y=S.bt,this.vD[this.vD.length]=S}}}if(r||this.co||this.Vo){this.Nh=this.jh?Js(this.Nh,this.jh):Js(this.Nh,Ks(this.Dh));var m=os(this.Dh,this.Rt.Ei());this.SD=this.Vh,this.mD=this.yB.qL(m)}if(this.cL.$I(this.Rt),a||this.jo()){var b=this.Rh.S()?"attribute":"uniform";this.fL=o===Re?void 0:this.yB.FI(EX["2D"],h<=1&&EX.PointSize(b),EX.VertexLocation({offset:h>1?{dataType:b,sizeUnit:"px",symmetric:!0,rotation:(this.zh.S()||this.sh.S()%360!=0)&&{dataType:this.zh.S()?"attribute":"uniform"}}:void 0,axisWorldTranslation:NX(this.Rt),normalSource:void 0}),o instanceof Ee?EX.Color({dataType:"uniform"}):o instanceof Ne?EX.Color({dataType:"attribute"}):o instanceof Ve?EX.Color({dataType:["lookup",o.getLookUpProperty()]}):o instanceof Je||o instanceof Qe?EX.Color({dataType:["gradient",o]}):void 0)}if(o!==Re?c&&(this.bD&&(this.bD=void 0),h>1||o instanceof Ne?h<=1?this.pP=this.yB.gl.POINTS:s===t.PointShape.Triangle?(this.bD=MZ(t.PointShape.Triangle,this.yB,pZ),this.pP=this.yB.gl.TRIANGLES):s===t.PointShape.Circle?(this.bD=MZ(t.PointShape.Circle,this.yB,(function(t){return xZ(t,24)})),this.pP=this.yB.gl.TRIANGLE_FAN):s===t.PointShape.Square?(this.bD=MZ(t.PointShape.Square,this.yB,kZ),this.pP=this.yB.gl.TRIANGLES):this.pP=this.yB.gl.POINTS:this.pP=this.yB.gl.POINTS):this.bD&&(this.bD=void 0),f||this.jo()){var g=this.Dh.length;if(o instanceof Ne&&this.SD&&this.SD>0){for(var w=o.getFallbackColor(),p=new Float32Array(4*g),k=0;k0&&h>1){var M=new Float32Array(g);for(k=0;k0&&h>1){var A=new Float32Array(2*g),F=go(this.sh.S()),T=Math.sin(F),C=Math.cos(F);for(k=0;k0){var B=new Float32Array(g);for(k=0;k0||r||i)&&(this.Nh&&f&&(this.wO=vE(this.Nh,{x:h,y:h},this.Rt)),this.Gh=[],this.Hh=0,this.jh=Ps),this.Go(),this.Wo=o,this._h.t=!1,this.size.t=!1,this.Vo=!1,this},e.prototype.vB=function(){var t=this;if(this.Yo()){this.Fe();var i=this.fL,n=this.mD,e=this.SD,r=this.Ho;i&&n&&e&&r!==Re&&(this.yB.rL(i),this.yB.NI(i,(function(r,s,o,h){if(t.Rt instanceof Vo||t.Rt instanceof tj?t.yB.VL(r("uScale"),t.cL.aO()).VL(r("uDisp"),t.cL.uO()).VL(h("uScaleStart_highpart"),t.cL.fO()).VL(h("uScaleStart_lowpart"),t.cL.cO()):t.Rt instanceof Go&&t.yB.VL(h("uScaleStart"),t.cL.MixedScaleXY.uScaleStart).VL(h("uScaleStartLog"),t.cL.MixedScaleXY.uScaleStartLog).VL(h("uScaleInterval"),t.cL.MixedScaleXY.uScaleInterval).VL(h("uScaleIntervalLog"),t.cL.MixedScaleXY.uScaleIntervalLog).VL(r("uViewportStart"),t.cL.MixedScaleXY.uViewportStart).VL(r("uViewportSize"),t.cL.MixedScaleXY.uViewportSize),t.yB.UI(o,n,t.Rt.Ei(),t.bD?1:void 0),t.bD){var u=s("aInstanceGeo");t.yB.nI(u,t.bD.RB).sI(u,0)}if(t.Ho instanceof Ee)t.yB.YL(r("uColor"),t.Ho.getColor());else if(t.Ho instanceof Ne&&t.gD){var a=s("aColor");t.yB.hI(a,t.gD),t.pP!==t.yB.gl.POINTS&&t.yB.sI(a,1)}else if(t.Ho instanceof Ve&&t.QO){if("value"===t.Ho.getLookUpProperty()&&t.Ft){var f=s("aLookupValue");t.yB.uI(f,t.Ft),t.pP!==t.yB.gl.POINTS&&t.yB.sI(f,1)}t.yB.KL(r("uLookupTexture"),t.QO.texture,0).XL(r("uLookupMin"),t.Ho.lut.min).XL(r("uLookupMax"),t.Ho.lut.max).XL(r("uLookupTextureHeightPx"),t.QO.textureHeight)}else t.Ho instanceof Je?t.BO&&t.yB.GI(i,t.BO,t.Ho):t.Ho instanceof Qe&&t.LO&&t.yB.HI(i,t.LO,t.Ho);if(t.wD&&t.pP!==t.yB.gl.POINTS){var c=s("aOffsetPixels");t.yB.uI(c,t.wD),t.pP!==t.yB.gl.POINTS&&t.yB.sI(c,1)}else if(t.pP!==t.yB.gl.POINTS){var l=r("uOffsetPixels");t.yB.XL(l,t.size.S())}if(t.pD&&t.pP!==t.yB.gl.POINTS){var d=s("aRot");t.yB.nI(d,t.pD),t.pP!==t.yB.gl.POINTS&&t.yB.sI(d,1)}else if(t.pP!==t.yB.gl.POINTS&&t.sh.S()%360!=0){var v=go(t.sh.S()),y=Math.sin(v),S=Math.cos(v);t.yB.VL(r("uRot"),[y,S])}if(t.pP===t.yB.gl.POINTS)t.yB.XL(r("uPointSize"),t.size.S());else{var m={x:2/t.oo.vi().x,y:2/t.oo.vi().y};t.yB.VL(r("uRatioPxClip"),[m.x,m.y])}t.pP===t.yB.gl.POINTS?t.yB.Ky(t.pP,e):t.bD&&t.yB.cI(t.pP,0,t.bD.dD,e)})))}return this},e.prototype.Pw=function(t){var i=this.Hh>0?u(u([],h(this.Xh())),h(this.Yh())):this.Xh(),n=eE(i,t,this.Wh,!1,!1,this.Rt,this.oo.Rt,this.Nh,void 0,void 0);return void 0!==n?i[n]:void 0},e.prototype.HO=function(i,n){var e=this.Rt;if(e instanceof Go)return!1;var r=e.tn();if(this.Yo()&&this.Ho!==Re){var s=sr({x:i,y:n},this.oo.Rt,this.Rt);if(!eo.Ut(s,this.wO.min,this.wO.max))return!1;for(var o=!1,h=function(i){if(eo.Ut(s,u.vD[i].yD.min,u.vD[i].yD.max)){var n=u.Xh(),e=u.size.S(),h=u._h.S(),a=go(u.sh.S());if(u.pP===u.yB.gl.POINTS){for(var f=r.y*e,c=r.x*e,d=u.vD[i].St;d80*n){e=s=t[0],r=o=t[1];for(var v=n;vs&&(s=h),u>o&&(o=u);a=0!==(a=Math.max(s-e,o-r))?1/a:0}return DZ(l,d,n,e,r,a),d}function OZ(t,i,n,e,r){var s,o;if(r===nK(t,i,n,e)>0)for(s=i;s=i;s-=e)o=$Z(s,t[s],t[s+1],o);return o&&XZ(o,o.next)&&(tK(o),o=o.next),o}function PZ(t,i){if(!t)return t;i||(i=t);var n,e=t;do{if(n=!1,e.steiner||!XZ(e,e.next)&&0!==YZ(e.prev,e,e.next))e=e.next;else{if(tK(e),(e=i=e.prev)===e.next)break;n=!0}}while(n||e!==i);return i}function DZ(t,i,n,e,r,s,o){if(t){!o&&s&&function(t,i,n,e){var r=t;do{null===r.z&&(r.z=HZ(r.x,r.y,i,n,e)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var i,n,e,r,s,o,h,u,a=1;do{for(n=t,t=null,s=null,o=0;n;){for(o++,e=n,h=0,i=0;i0||u>0&&e;)0!==h&&(0===u||!e||n.z<=e.z)?(r=n,n=n.nextZ,h--):(r=e,e=e.nextZ,u--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;n=e}s.nextZ=null,a*=2}while(o>1)}(r)}(t,e,r,s);for(var h,u,a=t;t.prev!==t.next;)if(h=t.prev,u=t.next,s?RZ(t,e,r,s):_Z(t))i.push(h.i/n),i.push(t.i/n),i.push(u.i/n),tK(t),t=u.next,a=u.next;else if((t=u)===a){o?1===o?DZ(t=zZ(PZ(t),i,n),i,n,e,r,s,2):2===o&&EZ(t,i,n,e,r,s):DZ(PZ(t),i,n,e,r,s,1);break}}}function _Z(t){var i=t.prev,n=t,e=t.next;if(YZ(i,n,e)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(WZ(i.x,i.y,n.x,n.y,e.x,e.y,r.x,r.y)&&YZ(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function RZ(t,i,n,e){var r=t.prev,s=t,o=t.next;if(YZ(r,s,o)>=0)return!1;for(var h=r.xs.x?r.x>o.x?r.x:o.x:s.x>o.x?s.x:o.x,f=r.y>s.y?r.y>o.y?r.y:o.y:s.y>o.y?s.y:o.y,c=HZ(h,u,i,n,e),l=HZ(a,f,i,n,e),d=t.prevZ,v=t.nextZ;d&&d.z>=c&&v&&v.z<=l;){if(d!==t.prev&&d!==t.next&&WZ(r.x,r.y,s.x,s.y,o.x,o.y,d.x,d.y)&&YZ(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,v!==t.prev&&v!==t.next&&WZ(r.x,r.y,s.x,s.y,o.x,o.y,v.x,v.y)&&YZ(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;d&&d.z>=c;){if(d!==t.prev&&d!==t.next&&WZ(r.x,r.y,s.x,s.y,o.x,o.y,d.x,d.y)&&YZ(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;v&&v.z<=l;){if(v!==t.prev&&v!==t.next&&WZ(r.x,r.y,s.x,s.y,o.x,o.y,v.x,v.y)&&YZ(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function zZ(t,i,n){var e=t;do{var r=e.prev,s=e.next.next;!XZ(r,s)&&ZZ(r,e,e.next,s)&&JZ(r,s)&&JZ(s,r)&&(i.push(r.i/n),i.push(e.i/n),i.push(s.i/n),tK(e),tK(e.next),e=t=s),e=e.next}while(e!==t);return PZ(e)}function EZ(t,i,n,e,r,s){var o=t;do{for(var h=o.next.next;h!==o.prev;){if(o.i!==h.i&&UZ(o,h)){var u=QZ(o,h);return o=PZ(o,o.next),u=PZ(u,u.next),DZ(o,i,n,e,r,s),void DZ(u,i,n,e,r,s)}h=h.next}o=o.next}while(o!==t)}function NZ(t,i){return t.x-i.x}function VZ(t,i){if(i=function(t,i){var n,e=i,r=t.x,s=t.y,o=-1/0;do{if(s<=e.y&&s>=e.next.y&&e.next.y!==e.y){var h=e.x+(s-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(h<=r&&h>o){if(o=h,h===r){if(s===e.y)return e;if(s===e.next.y)return e.next}n=e.x=e.x&&e.x>=f&&r!==e.x&&WZ(sn.x||e.x===n.x&&GZ(n,e)))&&(n=e,l=u)),e=e.next}while(e!==a);return n}(t,i)){var n=QZ(i,t);PZ(i,i.next),PZ(n,n.next)}}function GZ(t,i){return YZ(t.prev,t,i.prev)<0&&YZ(i.next,t,t.next)<0}function HZ(t,i,n,e,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(i=1431655765&((i=858993459&((i=252645135&((i=16711935&((i=32767*(i-e)*r)|i<<8))|i<<4))|i<<2))|i<<1))<<1}function jZ(t){var i=t,n=t;do{(i.x=0&&(t-o)*(e-h)-(n-o)*(i-h)>=0&&(n-o)*(s-h)-(r-o)*(e-h)>=0}function UZ(t,i){return t.next.i!==i.i&&t.prev.i!==i.i&&!function(t,i){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==i.i&&n.next.i!==i.i&&ZZ(n,n.next,t,i))return!0;n=n.next}while(n!==t);return!1}(t,i)&&(JZ(t,i)&&JZ(i,t)&&function(t,i){var n=t,e=!1,r=(t.x+i.x)/2,s=(t.y+i.y)/2;do{n.y>s!=n.next.y>s&&n.next.y!==n.y&&r<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(e=!e),n=n.next}while(n!==t);return e}(t,i)&&(YZ(t.prev,t,i.prev)||YZ(t,i.prev,i))||XZ(t,i)&&YZ(t.prev,t,t.next)>0&&YZ(i.prev,i,i.next)>0)}function YZ(t,i,n){return(i.y-t.y)*(n.x-i.x)-(i.x-t.x)*(n.y-i.y)}function XZ(t,i){return t.x===i.x&&t.y===i.y}function ZZ(t,i,n,e){var r=qZ(YZ(t,i,n)),s=qZ(YZ(t,i,e)),o=qZ(YZ(n,e,t)),h=qZ(YZ(n,e,i));return r!==s&&o!==h||(!(0!==r||!KZ(t,n,i))||(!(0!==s||!KZ(t,e,i))||(!(0!==o||!KZ(n,t,e))||!(0!==h||!KZ(n,i,e)))))}function KZ(t,i,n){return i.x<=Math.max(t.x,n.x)&&i.x>=Math.min(t.x,n.x)&&i.y<=Math.max(t.y,n.y)&&i.y>=Math.min(t.y,n.y)}function qZ(t){return t>0?1:t<0?-1:0}function JZ(t,i){return YZ(t.prev,t,t.next)<0?YZ(t,i,t.next)>=0&&YZ(t,t.prev,i)>=0:YZ(t,i,t.prev)<0||YZ(t,t.next,i)<0}function QZ(t,i){var n=new iK(t.i,t.x,t.y),e=new iK(i.i,i.x,i.y),r=t.next,s=i.prev;return t.next=i,i.prev=t,n.next=r,r.prev=n,e.next=n,n.prev=e,s.next=e,e.prev=s,e}function $Z(t,i,n,e){var r=new iK(t,i,n);return e?(r.next=e.next,r.prev=e,e.next.prev=r,e.next=r):(r.prev=r,r.next=r),r}function tK(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 iK(t,i,n){this.i=t,this.x=i,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function nK(t,i,n,e){for(var r=0,s=i,o=n-e;s0&&(e+=t[r-1].length,n.holes.push(e))}return n};var eK=LZ.exports,rK=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.gO=i,o.cL=new BX,o.wO=Ps,o.yB=i.kO(),o}return n(i,t),i.prototype.Pw=function(t){var i,n,e,r=Number.MAX_VALUE;try{for(var s=o(this.Dh),h=s.next();!h.done;h=s.next()){var u=h.value,a=Hs(sr(u,this.Rt,this.oo.Rt),t);aMath.abs(c.y/this.Qp.y)){var d=l(a.x,a.y+o),v=l(a.x,a.y-o),y=l(f.x,f.y+o),S=l(f.x,f.y-o);if($s(n,d,v,y)||$s(n,y,S,d))return!0}else{var m=l(a.x+h,a.y),b=l(a.x-h,a.y),g=l(f.x+h,f.y),w=l(f.x-h,f.y);if($s(n,m,b,g)||$s(n,g,w,m))return!0}}}}}return!1},i.prototype.ZB=function(){return this.TD&&(this.yB.VI(this.TD),this.TD=void 0),this.AO&&(this.yB.VI(this.AO),this.AO=void 0),this.DO&&(this.yB.VI(this.DO),this.DO=void 0),this.QO=void 0,this},i}(TE),sK=function(t,i){for(var n=0,e=[];n0;s-=o?1:0,s-=n+s0;s-=o?1:0;s-=0;var h=Math.min(s,t-r),u=n-(o?1:0),a={start:u,startUnique:r,sizeData:Math.min(i,t-u),sizeUniqueData:h};e.push(a),n+=h}return e},hK=function(t,i,n,e){if(n){var r=new Map;return i.gridTiles.forEach((function(t){r.set(t,{type:n,dataInvalidationRanges:[{tileInvalidationOffset:{primary:0,secondary:0},tileInvalidationLength:t.sizeHeatmapDataVectors}]})})),r}for(var s=new Map,o=function(n){var r=t[n],o={x:r.startPrimary,y:r.startSecondary},h={x:o.x+r.lengthPrimary-1,y:o.y+r.lengthSecondary-1},u=[o,{x:h.x,y:o.y},h,{x:o.x,y:h.y}];i.gridTiles.forEach((function(t){var i=t.iFirstVector,n=e(t),o={x:i.primary+n.primary-1,y:i.secondary+n.secondary-1},h=[{x:i.primary,y:i.secondary},{x:o.x,y:i.secondary},o,{x:i.primary,y:o.y}];if(zs(u,h)){var a=s.get(t);a||(a={type:r.type,dataInvalidationRanges:[]},s.set(t,a));for(var f,c,l=Es(u,h),d={primary:l.min.x-i.primary,secondary:l.min.y-i.secondary},v={primary:1+l.max.x-l.min.x,secondary:1+l.max.y-l.min.y},y=!1,S=[{x:d.primary,y:d.secondary},{x:d.primary+v.primary,y:d.secondary},{x:d.primary+v.primary,y:d.secondary+v.secondary},{x:d.primary,y:d.secondary+v.secondary}],m=0;m0&&(fK(this.yB,d,(function(t){return t.intensityData}),(function(t){return t.intensityDataTexture})),this.BD=!0),this.cL.$I(this.Rt);var v=this.xP;if((n||this.co||u)&&(h?(this.RD=this.gO.$O(h,this.zD,this.RD),this.zD=h):(this.RD=void 0,this.gO.BI.uo(this.zD),this.zD=void 0),v.tile=s&&this.RD?{renderMode:"paletted",fillStylePaletted:s,colorLookupTexture:this.RD,shader:this.yB.FI(EX["2D"],EX.ColorGrid2D({heatmapType:"intensity",interpolation:"bilinear"===a&&"bilinear",flipXY:"rows"===this.Vm.dataOrder,intensityTextureType:this.yB.MI?"float":"ubyte",littleEndian:this.yB.IS_MACHINE_LITTLE_ENDIAN}),EX.VertexLocation({scaling:{dataType:"uniform"},translation:{dataType:"uniform",sizeUnit:"axis"},axisWorldTranslation:NX(this.Rt),flipXY:"rows"===this.Vm.dataOrder,normalSource:void 0}))}:o?{renderMode:"solid",fillStyleSolid:o,shader:this.yB.FI(EX["2D"],EX.Color({dataType:"uniform"}),EX.VertexLocation({scaling:{dataType:"uniform"},translation:{dataType:"uniform",sizeUnit:"axis"},axisWorldTranslation:NX(this.Rt),flipXY:"rows"===this.Vm.dataOrder,normalSource:void 0}))}:void 0),r||this.co){var y=e instanceof nr&&e,S=y&&y.getFillStyle(),m=S instanceof Ee&&S;v.wireframe=y&&m?-1===y.getThickness()?{renderMode:"primitive",shader:this.yB.FI(EX["2D"],EX.Color({dataType:"uniform"}),EX.VertexLocation({translation:{dataType:"uniform",sizeUnit:"axis"},scaling:{dataType:"uniform"},flipXY:"rows"===this.Vm.dataOrder,axisWorldTranslation:NX(this.Rt),normalSource:void 0})),fillStyleSolid:m}:{renderMode:"triangulated",shader:this.yB.FI(EX["2D"],EX.Color({dataType:"uniform"}),EX.LineInstanced2D({translation:{dataType:"uniform",sizeUnit:"axis"},scaling:{dataType:"uniform"},flipXY:"rows"===this.Vm.dataOrder,axisWorldTranslation:NX(this.Rt),normalSource:void 0}),this.yB.kI?EX.AliasedEdge():void 0),geometry:cZ(this.yB,1),solidLine:y,fillStyleSolid:m}:void 0,v.wireframe?this.ED=this.ED||this.ND():this.ED&&(this.yB.VI(this.ED.wireframeCoordinatesBuffer),this.ED=void 0)}return this.xP=v,this.Vo=!1,this.LD=!1,this.co=!1,this.CD.length=0,this.Xo(i),this.Ga=e,this.PD.t=!1,this},i.prototype._D=function(){var t=this,i=this.OD.gridTiles.map((function(i){var n=aK(t.yB,i.sizeHeatmapDataVectors.secondary,i.sizeHeatmapDataVectors.primary);return e(e({},i),{intensityDataTexture:n})})),n=this.OD.gridTileSizes.map((function(t){return e(e({},t),{tiles:i.filter((function(i){return i.sizeHeatmapDataVectors.primary===t.sizeHeatmapData.primary&&i.sizeHeatmapDataVectors.secondary===t.sizeHeatmapData.secondary}))})})),r=this.yB.qL([0,0,1,0,0,1,1,1]),s=this.yB.gl.TRIANGLE_STRIP;return{gridTiles:i,gridTileSizes:n,rectangleLocationsBuffer:r,rectangleLocationsDrawMode:s,rectangleLocationsDrawLength:4}},i.prototype.ND=function(){for(var t=this.Vm.primaryDimensionVectorsCount+1+this.Vm.secondaryDimensionVectorsCount+1,i=new Float32Array(4*t),n=0,e=0;ethis.Nh.max.x||t.ythis.Nh.max.y)){var i=t,n="columns"===this.Vm.dataOrder?i.x:i.y,e="columns"===this.Vm.dataOrder?i.y:i.x,r="columns"===this.Vm.dataOrder?this.Vm.start.x:this.Vm.start.y,s="columns"===this.Vm.dataOrder?this.Vm.start.y:this.Vm.start.x,o="columns"===this.Vm.dataOrder?this.Vm.step.x:this.Vm.step.y,h="columns"===this.Vm.dataOrder?this.Vm.step.y:this.Vm.step.x,u=Lr((n-r)/o-.5,0,this.Vm.primaryDimensionVectorsCount-1),a=Lr((e-s)/h-.5,0,this.Vm.secondaryDimensionVectorsCount-1),f=Lr(Math.ceil(u)-1,0,this.Vm.primaryDimensionVectorsCount-1),c=Lr(Math.ceil(a)-1,0,this.Vm.secondaryDimensionVectorsCount-1),l={point:{x:f,y:c},value:this.VD(f,c)},d={point:{x:f,y:c+1},value:this.VD(f,c+1)},v={point:{x:f+1,y:c},value:this.VD(f+1,c)},y={point:{x:f+1,y:c+1},value:this.VD(f+1,c+1)},S=su({x:u,y:a},l,d,v,y);if(void 0!==S){var m=Lr(Math.floor(u+.5),0,this.Vm.primaryDimensionVectorsCount-1),b=Lr(Math.floor(a+.5),0,this.Vm.secondaryDimensionVectorsCount-1),g="columns"===this.Vm.dataOrder?m:b,w="columns"===this.Vm.dataOrder?b:m,p=t;return{x:p.x,y:p.y,column:g,row:w,cellValue:S}}}},i.prototype.VD=function(t,i){for(var n=0;n=e.iFirstVector.primary&&t<=e.iFirstVector.primary+e.sizeHeatmapDataVectors.primary-1&&i>=e.iFirstVector.secondary&&i<=e.iFirstVector.secondary+e.sizeHeatmapDataVectors.secondary-1){var r=t-e.iFirstVector.primary,s=i-e.iFirstVector.secondary,o=r*e.sizeHeatmapDataVectors.secondary+s;return e.intensityData[o]}}return 0},i.prototype.Et=function(){return this.Nh.max.x},i.prototype.zt=function(){return this.Nh.min.x},i.prototype.Vt=function(){return this.Nh.max.y},i.prototype.Nt=function(){return this.Nh.min.y},i.prototype.cu=function(){return 0},i.prototype.lu=function(){return 0},i.prototype.lT=function(){var t=[];return this.OD.gridTiles.forEach((function(i){if(i.hasIntensityData){for(var n=new Array(i.sizeUniqueHeatmapDataVectors.primary).fill(0).map((function(t){return new Array(i.sizeUniqueHeatmapDataVectors.secondary).fill(0)})),e=0;e0){for(var i=0;i0?this.ic[0].boundaries.min.x:Is:this.Nh.min.y=this.ic.length>0?this.ic[0].boundaries.min.y:Is}return this.ic.forEach((function(t){return t.shape.Fe()})),this.fa.t=!1,this},i.prototype.vB=function(){return this.Fe(),this.ic.forEach((function(t){return t.shape.vB()})),this},i.prototype.Km=function(t){if(0===t.length)return this;var i=0,n=this.HD.dataPerSegment,r=t.length;do{var s=this.ic[this.ic.length-1],o=s?n-(s.existingDataPointsCount+(s.hasJoint?1:0)):0,h=!1;if(!s||0===o){var u={columns:"columns"===this.Vm.scrollDimension?n:this.Vm.resolution,rows:"rows"===this.Vm.scrollDimension?n:this.Vm.resolution,heatmapDataType:this.Vm.heatmapDataType,dataOrder:this.Vm.scrollDimension,step:this.Vm.step,start:"columns"===this.Vm.scrollDimension?{x:this.Vm.start.x+this.Vm.step.x*this.GD,y:this.Vm.start.y}:{x:this.Vm.start.x,y:this.Vm.start.y+this.Vm.step.y*this.GD}};this.ic.length>0&&(u.start="columns"===this.Vm.scrollDimension?{x:u.start.x-1*this.Vm.step.x,y:u.start.y}:{x:u.start.x,y:u.start.y-1*this.Vm.step.y},h=!0);var a=new cK(this.gO,this.Rt,Cr,Cr,[],u).Hm(this.PD.S()).$n(this.Ho).pa(this.wa);s={shape:a,existingDataPointsCount:0,existingCoordinatesCount:0,allocatedCoordinatesCount:n,dataStartIndex:this.GD,hasJoint:!1,boundaries:a.Nh},this.ic.push(s),o=n-(h?1:0)}var f=r-i,c=Math.min(o,f),l=t.slice(i,i+c),d={type:"intensity",values:l,startPrimary:s.existingDataPointsCount+(s.hasJoint?1:0),startSecondary:0,lengthPrimary:c,lengthSecondary:this.Vm.resolution};h&&(d.values.unshift(this.jD),d.lengthPrimary+=1,s.hasJoint=!0),s.shape.Wm(d),s.existingDataPointsCount+=c,s.existingCoordinatesCount+=c+(h?1:0),s.boundaries=s.shape.Nh,this.jD=l[l.length-1],this.GD+=c,i+=c}while(i=this.GD||"rows"===this.Vm.scrollDimension&&s>=this.GD)return;return{x:e.result.x,y:e.result.y,column:r,row:s,cellValue:e.result.cellValue}}},i.prototype.ZF=function(t){var i=this,n=sr(t,this.Rt,this.engine.Rt),e=this.ic.reduce((function(e,r){var s=r.shape.ZF(t);if(s){var o=js(sr(s,i.Rt,i.engine.Rt),n);if(void 0===e||o=this.GD||"rows"===this.Vm.scrollDimension&&s>=this.GD)return;return{x:e.result.x,y:e.result.y,column:r,row:s,cellValue:e.result.cellValue}}},i.prototype.Et=function(){return this.Nh.max.x},i.prototype.zt=function(){return this.Nh.min.x},i.prototype.Vt=function(){return this.Nh.max.y},i.prototype.Nt=function(){return this.Nh.min.y},i.prototype.cu=function(){return 0},i.prototype.lu=function(){return 0},i}(function(t){function i(i,n,r,s,o,h){var u=t.call(this,i,n,r,s,o)||this;u.engine=i,u.wa=Kz.lineStyle,u.fa=w(void 0),u.PD=w("bilinear");var a="columns"===h.scrollDimension?b({x:h.start.x,y:h.start.y},{x:h.start.x,y:h.start.y+h.resolution*h.step.y}):b({x:h.start.x,y:h.start.y},{x:h.start.x+h.resolution*h.step.x,y:h.start.y});return u.Vm=e(e({},h),{initialBoundaries:a}),u}return n(i,t),i.prototype.pa=function(t){return this.wa="function"==typeof t?t(this.wa):t,this},i.prototype.ka=function(){return this.wa},i.prototype.ca=function(t){return this.fa.l(t),this},i.prototype.la=function(){return this.fa.S()},i.prototype.Hm=function(t){return this.PD.l(t),this},i.prototype.jm=function(){return this.PD.S()},i}(gE)),dK={translation:function(t,i){return[1,0,0,0,1,0,t,i,1]},rotation:function(t){var i=Math.cos(t),n=Math.sin(t);return[i,-n,0,n,i,0,0,0,1]},scaling:function(t,i){return[t,0,0,0,i,0,0,0,1]},translate:function(t,i,n){return dK.multiply(t,dK.translation(i,n))},rotate:function(t,i){return dK.multiply(t,dK.rotation(i))},scale:function(t,i,n){return dK.multiply(t,dK.scaling(i,n))},multiply:function(t,i){var n=t[0],e=t[1],r=t[2],s=t[3],o=t[4],h=t[5],u=t[6],a=t[7],f=t[8],c=i[0],l=i[1],d=i[2],v=i[3],y=i[4],S=i[5],m=i[6],b=i[7],g=i[8];return[c*n+l*s+d*u,c*e+l*o+d*a,c*r+l*h+d*f,v*n+y*s+S*u,v*e+y*o+S*a,v*r+y*h+S*f,m*n+b*s+g*u,m*e+b*o+g*a,m*r+b*h+g*f]},projection:function(t,i,n){return[2/t,0,0,0,-2*n/i,0,-1,1*n,1]}},vK=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r,s)||this;return o.gO=i,o.WD=[],o.cL=new BX,o.UD=[l(0,0),l(0,0),l(0,0),l(0,0)],o.YD=b(l(0,0),l(0,0)),o.XD=b(l(0,0),l(0,0)),o.ZD=l(0,0),o.KD=l(0,0),o.Qp=l(0,0),o.qD=l(0,0),o.JD=0,o.yB=i.kO(),o}return n(i,t),i.prototype.Fe=function(){var t,i=this.Yo(),n=this.Uo()||this.t();if(i){var e=this.yB,r=this.yB.uL();if(this.cL.$I(this.Rt),this.oh.t||this.co){this.QD&&this.QD.sL(this),this.font.l(dh(this.oh.S()));var s=this.font.S();this.QD=this.yB.te(s.properties.family),this.QD.rL(this)}var o=this.font.t||this.co||this.$o.t||this.co;if(o&&this.QD){s=this.font.S();t=h(this.QD.oL(this.$o.S(),s.properties),2),this.$D=t[0],this.XD=t[1],this.WD.forEach((function(t){t.texCoordBuff&&e.VI(t.texCoordBuff),t.vertexBuff&&e.VI(t.vertexBuff)})),this.WD=this.$D.map((function(t){return{texCoordBuff:e.qL(t.texCoords,!1),texture:t.texture,info:t}})),this.oh.t=!1,this.font.t=!1,this.$o.t=!1}var u=this.Rt.Qi()||n||this.co,a=this.th.t||this.eh.t||this.ih.t||this.rh.t||o||u||this.co,f=this.hh.S(),c=ao(l(this.eh.S()+1,this.ih.S()+1),.5);if(a&&this.$D&&(this.ZD=l(-(f.left*r+this.XD.max.x-this.XD.min.x+f.right*r)*c.x-this.XD.min.x+f.right*r,-(f.bottom*r+this.XD.max.y-this.XD.min.y+f.top*r)*c.y-this.XD.min.y+f.top*r)),(a||u||this.sh.t||this.jo())&&this.Ho!==Re){if(this.$D){var d=fo(this.th.S(),this.rh.S()),v=sr(d,this.Rt,this.oo.Rt),y=ao(v,r);this.qD=y;var S=go(this.sh.S());this.JD=S,o&&this.WD.forEach((function(t){var i=t.info;i&&(t.vertexBuffLen=i.vertices.length/2,t.vertexBuff?e.$L(t.vertexBuff,i.vertices,!0):t.vertexBuff=e.qL(i.vertices,!0))}));var m=this.Qt.S(),b=[fo(ro(l((this.XD.min.x+(-m.left-f.left)*r+this.ZD.x)/r,(this.XD.max.y+(m.top+f.top)*r+this.ZD.y)/r),this.st,S),v),fo(ro(l((this.XD.max.x+(m.right+f.right)*r+this.ZD.x)/r,(this.XD.max.y+(m.top+f.top)*r+this.ZD.y)/r),this.st,S),v),fo(ro(l((this.XD.max.x+(m.right+f.right)*r+this.ZD.x)/r,(this.XD.min.y+(-m.bottom-f.bottom)*r+this.ZD.y)/r),this.st,S),v),fo(ro(l((this.XD.min.x+(-m.left-f.left)*r+this.ZD.x)/r,(this.XD.min.y+(-m.bottom-f.bottom)*r+this.ZD.y)/r),this.st,S),v)];this.UD=[sr(b[0],this.oo.Rt,this.Rt),sr(b[1],this.oo.Rt,this.Rt),sr(b[2],this.oo.Rt,this.Rt),sr(b[3],this.oo.Rt,this.Rt)],this.YD=Ks(this.UD);var g=Ks(b);this.KD=l(-(g.max.x-g.min.x)*r*c.x-g.min.x*r+this.qD.x,-(g.max.y-g.min.y)*r*c.y-g.min.y*r+this.qD.y),this.t_=co(g.max,g.min)}this.Ho instanceof Je?this.BO=VX(this.YD,this.Rt,this.Ho.getPosition(),this.Ho.getExtent(),this.Ho.getShape(),this.yB.uL()):this.Ho instanceof Qe?this.LO=GX(this.YD,this.Rt,this.Ho.getAngle(!0),this.yB.uL()):(this.BO=void 0,this.LO=void 0)}this.jo()&&(this.fL=this.Ho===Re?void 0:this.yB.FI(EX["2D"],EX.VertexLocation({axisWorldTranslation:"matrix",normalSource:void 0}),EX.Color({dataType:this.Ho instanceof Je||this.Ho instanceof Qe?["gradient",this.Ho]:"uniform",maskTexture:!0}))),this.th.t=!1,this.eh.t=!1,this.ih.t=!1,this.rh.t=!1,this.sh.t=!1,this.Xo(this.Ho),this.Go()}return this.uh=i,this},i.prototype.vB=function(){var t=this;if(this.Yo()){this.Fe();var i=this.fL;if(!i)return this;var n=this.yB.DL,e=this.yB.gl.drawingBufferWidth,r=this.yB.gl.drawingBufferHeight,s=dK.projection(e,r,-1),o=dK.translation(this.ZD.x,this.ZD.y),h=dK.translation(this.KD.x,this.KD.y);s=dK.translate(s,this.qD.x,this.qD.y),s=dK.multiply(s,h),s=dK.rotate(s,this.JD),s=dK.multiply(s,o),this.yB.rL(i).NI(i,(function(i,e,r,o){if(t.yB.WL(i("uMatrix"),s),t.Ho instanceof Ee)t.yB.YL(i("uColor"),t.Ho.getColor());else if(t.Ho instanceof Je&&t.BO){t.yB.VL(i("uCenter"),t.BO.center).VL(i("uDistance"),t.BO.distance).HL(i("uBounds"),t.BO.bounds).XL(i("uAspect"),t.BO.aspectRatio);for(var h=t.Ho.getColorStops(),u=0;u=a.x&&r>=a.y&&n<=a.x+a.width&&r<=a.y+a.height;if(void 0!==e.h_){if(void 0!==i&&void 0!==e.h_.Bo){var c=l(t.clientX-i.clientX,i.clientY-t.clientY);0===c.x&&0===c.y||e.h_.Bo(e.h_,t,e.u_,e.a_,c)}return!1}var d=f&&s?e.f_(e.n_,n,r):void 0;try{for(var v=o(e.n_),y=v.next();!y.done;y=v.next()){var S=y.value;S.getMouseInteractions()&&S.Ro(t,S===d,i)}}catch(t){h={error:t}}finally{try{y&&!y.done&&(u=v.return)&&u.call(v)}finally{if(h)throw h.error}}return!1!==s&&void 0===d},e.Ss=function(t){var i,n;try{for(var r=o(e.n_),s=r.next();!s.done;s=r.next()){var h=s.value;h.getMouseInteractions()&&h.zo(t)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}void 0!==e.h_&&void 0!==e.u_&&void 0!==e.a_&&(void 0!==e.h_.Lo&&e.h_.Lo(e.h_,t,e.u_,e.a_),e.h_=void 0)},e}return n(i,t),i.prototype.ro=function(){var t,i;try{for(var n=o(this.n_),e=n.next();!e.done;e=n.next()){e.value.ZB().dispose()}}catch(i){t={error:i}}finally{try{e&&!e.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this.c_=void 0,this.h_=void 0,this.oo.fs(this.i_)},i.prototype.xn=function(){return this.oo.xn(),this},i.prototype.rb=function(t){return this.e_.l(t),this},i.prototype.my=function(){return this.e_.S()},i.prototype.sb=function(t){return this.gI.l(t),this},i.prototype.l_=function(){return this.gI.S()},i.prototype.us=function(){return this.i_},i.prototype.Qs=function(t,i,n){n===zz.mouseUp&&void 0!==this.h_&&void 0!==this.u_&&void 0!==this.a_&&t.button===this.u_&&(void 0!==(r=SK(this.h_)).dragStop&&r.dragStop(this.h_,t,this.u_,this.a_),this.h_=void 0,this.u_=void 0);if(n===zz.contextmenu&&ss(t),i){var e=Array.from(this.n_).filter((function(t){return t.getIsUnderMouse()}));if(e&&e.length>0){var r,s=e[0];if(void 0===this.h_&&n===zz.mouseDown)this.h_=s,this.u_=t.button,this.a_=l(t.clientX,t.clientY),void 0!==(r=SK(this.h_)).dragStart&&r.dragStart(this.h_,t,this.u_);var o=l(t.clientX,t.clientY),h=SK(s)[zz[n]];return h&&h(s,t,t.button,o,o),!1}return!0}return!1},i.prototype.Ns=function(t,i,n,e,r){if(void 0!==this.c_){var s=mK(this.c_)[Ez[n]];this.c_&&s&&s(this.c_,i),n===Ez.touchEnd&&0===t.length&&(this.c_=void 0)}else if(n===Ez.touchStart){var o=this.e_.S(),h=!o||e>=o.x&&r>=o.y&&e<=o.x+o.width&&r<=o.y+o.height,u=t.length;if(this.c_=void 0,h)for(var a=0;a0?new kK(t,Lr(i,0,1)):new wK(t),t._L.kB.set(i,n),n)},AK=function(t){function i(i,n,e,r){var s=t.call(this,i,n,e,r)||this;return s.b_=i,s.gO=i.gO,s.yB=s.gO.kO(),s}return n(i,t),i}(function(t){function i(i,n,e,r){var s=t.call(this,i,n,e,r)||this;return s.Vo=!0,s}return n(i,t),i.prototype.FS=function(t){return this.g_=this.xS.S(),this.xS.l(t),this},i.prototype.Ym=function(t){return this.w_=t,this},i.prototype.Xm=function(){return this.w_},i.prototype.t=function(){return this.Vo||this.co},i.prototype.Go=function(){this.Vo=!1,this.co=!1},i}(function(t){function i(i,n,e,r){var s=t.call(this,i.oo,n,e,r)||this;return s.wf=i,s.Rt=s.wf.Rt,s.AS=!0,s.kS={},s.xS=w(QV),s}return n(i,t),i.prototype.p_=function(){var t;return this.xS.t&&this.xS.S().type!==(null===(t=this.g_)||void 0===t?void 0:t.type)},i.prototype.TS=function(t){return this.AS=t,this},i.prototype.k_=function(t){return this.kS=t,this},i}(fE))),FK=function(t){function i(i,n,e,r){var s=t.call(this,i,n,e,r)||this;return s.w_="cull-back",s.Nh=Ds,s.x_={},s.M_=[],s.Ho=Kz.fillStyle,s.xS.l(tG),s}return n(i,t),i.prototype.Fe=function(t){var i,n,e,r,s,h,u,a,f=this.M_,c=this.Ho,l=c!==Re,d=this.A_,v=this.t()||this.jo()||this.F_!==d,y=this.p_();if(l){try{for(var S=o(f),m=S.next();!m.done;m=S.next()){(N=m.value).id=void 0!==N.id?String(N.id):void 0,N.xSize=void 0!==N.xSize&&N.xSize<0?-N.xSize:N.xSize,N.ySize=void 0!==N.ySize&&N.ySize<0?-N.ySize:N.ySize,N.zSize=void 0!==N.zSize&&N.zSize<0?-N.zSize:N.zSize}}catch(t){i={error:t}}finally{try{m&&!m.done&&(n=S.return)&&n.call(S)}finally{if(i)throw i.error}}var g=11,w=this.T_||0,p=w;try{for(var k=o(f),x=k.next();!x.done;x=k.next()){void 0!==(V=(N=x.value).id)&&void 0!==this.x_[V]||(p+=1)}}catch(t){e={error:t}}finally{try{x&&!x.done&&(r=k.return)&&r.call(k)}finally{if(e)throw e.error}}var M,A,F;if(F=!(A=M=p!==w)&&(f.length<100?"chunks":"all"),M){var T=p*g,C=new Float32Array(T);this.lD&&C.set(this.lD),this.lD=C,this.C_=T,this.B_=w*g}var B=c instanceof Ne?c.getFallbackColor():void 0;try{for(var L=o(f),I=L.next();!I.done;I=L.next()){var O=void 0!==(V=(N=I.value).id)&&this.x_[V],P=[N.xCenter,N.yCenter,N.zCenter,N.xSize,N.ySize,N.zSize,N.color?N.color.r:B?B.r:void 0,N.color?N.color.g:B?B.g:void 0,N.color?N.color.b:B?B.b:void 0,N.color?N.color.a:B?B.a:void 0,N.value];if(O){for(var D=0;D0){var W=b({x:Is,y:Is,z:Is},{x:Os,y:Os,z:Os});for(D=0;DZ?W.max.x:Z,W.max.y=W.max.y>Q?W.max.y:Q,W.max.z=W.max.z>nt?W.max.z:nt}this.Nh=W}this.T_=p,this.M_.length=0}return this.Xo(c),this.Go(),this.F_=d,this.xS.t=!1,this},i.prototype.vB=function(){var t=this,i=this.fL,n=this.L_,e=this.FP,r=this.Ho,s=this.T_,o=this.xS.S();return i&&e&&void 0!==s&&this.yB.NI(i,(function(h,u,a){var f=u("aPos"),c=u("aOffsetAxis");t.yB.rL(i).jL(h("uScale"),t.b_.cL.aO()).jL(h("uDisp"),t.b_.cL.uO()).UL(h("uViewProjectionMatrix"),t.O_),"phong"===o.type&&t.yB.jL(h("uCameraLoc"),t.P_).jL(h("uLightLoc"),t.D_).XL(h("uAmbientReflection"),o.ambientReflection).XL(h("uSpecularReflection"),o.specularReflection).XL(h("uDiffuseReflection"),o.diffuseReflection).XL(h("uShininess"),o.shininess).YL(h("uLightColor"),o.specularColor).YL(h("uAmbientColor"),o.ambientColor);var l={location:f,size:3},d={location:c,size:3},v={location:void 0,size:4},y={location:void 0,size:1};if(r instanceof Ee)t.yB.YL(h("uColorDiffuse"),r.getColor());else if(r instanceof Ne){var S=u("aColor");v.location=S}else if(r instanceof Ve){var m=r.getLookUpProperty(),b=r.getPalette();"value"===m&&(y.location=u("aLookupValue")),t.yB.KL(h("uLookupTexture"),t.QO.texture,0).XL(h("uLookupMin"),b.min).XL(h("uLookupMax"),b.max).XL(h("uLookupTextureHeightPx"),t.QO.textureHeight)}e&&(t.yB.rI(e,1,l,d,v,y),n.Ky(a,s))})),this},i.prototype.HO=function(t,i){},i.prototype.ZB=function(){return this.FP&&(this.yB.VI(this.FP),this.FP=void 0),this.gO.BI.uo(this.qO),this.QO=void 0,this.qO=void 0,this.fL=void 0,this},i.prototype.NS=function(t){this.M_=ps(this.M_,t,{canReturnB:!0})},i.prototype.$n=function(t){return this.Ho=yE(this.Ho,t),this},i.prototype.Qn=function(){return this.Ho},i.prototype.zS=function(t){return this.A_=void 0!==t&&t>0?Lr(t,0,1):void 0,this},i.prototype.I_=function(){return this.A_},i.prototype.Et=function(){return this.Nh.max.x},i.prototype.zt=function(){return this.Nh.min.x},i.prototype.Vt=function(){return this.Nh.max.y},i.prototype.Nt=function(){return this.Nh.min.y},i.prototype.Ht=function(){return this.Nh.max.z},i.prototype.Gt=function(){return this.Nh.min.z},i.prototype.cu=function(){return 0},i.prototype.lu=function(){return 0},i.prototype.LS=function(){return 0},i.prototype.jo=function(){return SE(this.Wo,this.Ho)},i.prototype.Xo=function(t){this.Wo=t},i}(AK),TK=function(t){function i(i,n){var e=t.call(this,i)||this;e.MP=n,e.v_="custom";var r=e.AP(),s=r.vertices,o=r.drawSize;return e.FP=i.qL(s),e.CP=o,e}return n(i,t),i.prototype.rL=function(t){return this.yB.rI(this.FP,0,{location:t.attribute("aSegmentPosition"),size:1},{location:t.attribute("aPerpendHorizontal"),size:1},{location:t.attribute("aPerpendVertical"),size:1}),this},i.prototype.Ky=function(t){return this.yB.cI(this.yB.gl.TRIANGLE_STRIP,0,this.CP,t),this},i.prototype.AP=function(){for(var t,i,n=this.MP,e=new Float32Array(3*(2*(n+1))),r=0,s=0;s<=n;s+=1){var h=2*Math.PI*s/n,u=Math.cos(h),a=Math.sin(h);try{for(var f=(t=void 0,o([0,1])),c=f.next();!c.done;c=f.next()){var l=c.value;e[r+0]=l,e[r+1]=u,e[r+2]=a,r+=3}}catch(i){t={error:i}}finally{try{c&&!c.done&&(i=f.return)&&i.call(f)}finally{if(t)throw t.error}}}return{vertices:e,drawSize:r/3}},i.prototype.xB=function(){this.yB.VI(this.FP)},i}(fY),CK=function(t,i){void 0===i&&(i=16);var n=t._L.wB.get(i);return n||(n=new TK(t,i),t._L.wB.set(i,n),n)},BK=function(t){function i(i,n,e,r){var s=t.call(this,i,n,e,r)||this;return s.w_="cull-back",s.ua=[],s.ia=Kz.lineStyle,s.xS.l(QV),s}return n(i,t),i.prototype.Fe=function(t){var i=this.t(),n=this.ia,e=this.ra!==n,r=this.p_();if(i){this.__&&(this.yB.VI(this.__),this.__=void 0);var s=hs(this.ua);this.__=this.yB.qL(s)}if(e||r){var o=n instanceof nr&&n.getFillStyle(),h=1===n.thickness?"primitive":"instanced";this.xP=void 0,o instanceof Ee&&("primitive"===h?this.xP={type:h,shader:this.yB.FI(EX["3D"],EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0}),EX.Color({dataType:"uniform"})),fillStyle:o}:"instanced"===h&&(this.xP={type:h,shader:this.yB.FI(EX["3D"],EX.ColorShaded3D({dataType:"uniform",shadingStyle:this.xS.S().type}),EX.LineInstanced3D({axisWorldTranslation:NX(this.Rt)})),geometry:CK(this.yB,8),fillStyle:o}))}return this.Go(),this.ra=n,this.xS.t=!1,this},i.prototype.vB=function(){var t=this,i=this.yB.gl,n=this.xP,e=this.__,r=this.ia,s=this.xS.S();if(n&&e)switch(n.type){case"instanced":var o=.5*this.wf.gS(r.thickness),h=n.fillStyle.getColor(),u=n.shader,a=n.geometry;this.yB.NI(u,(function(n,r,f){t.yB.rL(u).jL(n("uScale"),t.b_.cL.aO()).jL(n("uDisp"),t.b_.cL.uO()).UL(n("uViewProjectionMatrix"),t.O_).YL(n("uColorDiffuse"),h).XL(n("uOffsetWU"),o),"phong"===s.type&&t.yB.jL(n("uCameraLoc"),t.P_).jL(n("uLightLoc"),t.D_).XL(n("uAmbientReflection"),s.ambientReflection).XL(n("uSpecularReflection"),s.specularReflection).XL(n("uDiffuseReflection"),s.diffuseReflection).XL(n("uShininess"),s.shininess).YL(n("uLightColor"),s.specularColor).YL(n("uAmbientColor"),s.ambientColor),i.bindBuffer(i.ARRAY_BUFFER,e);var c=r("aLocationA"),l=r("aLocationB");i.vertexAttribPointer(c,3,i.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,0*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(c,1),i.enableVertexAttribArray(c),i.vertexAttribPointer(l,3,i.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,3*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(l,1),i.enableVertexAttribArray(l),a.rL(f).Ky(t.ua.length/2)}));break;case"primitive":var f=r instanceof nr?r.getFillStyle():void 0,c=f&&f instanceof Ee?f.getColor():void 0;if(c){var l=n.shader;this.yB.NI(l,(function(n,r){t.yB.rL(l).jL(n("uScale"),t.b_.cL.aO()).jL(n("uDisp"),t.b_.cL.uO()).UL(n("uViewProjectionMatrix"),t.O_),t.yB.YL(n("uColor"),c).rI(e,void 0,{location:r("aPos"),size:3}).Ky(i.LINES,t.ua.length)}))}}return this},i.prototype.Qh=function(t){for(var i=0;i0&&(h(u,a,1,0,0),h(u,a+1,1,1,0),h(u+1,a,0,0,1)),ue.length&&wr.console.warn("LightningChart JS unexpected error scenario, sphere geometry buffer size mismatch.\nA point series 3D component might have missing points.\n\nThis warning can be omitted with LightningChartOptions.warnings")})),{vertices:e,drawSize:r/6}},i.prototype.xB=function(){this.yB.VI(this.FP)},i}(fY),IK=function(t,i){var n=Math.round(i);n<3&&Bs();var e=n,r=t._L.pB.get(Array.from(t._L.pB.keys()).find((function(t){return t.sectors===n&&t.stacks===e})));return r||(r=new LK(t,n,e),t._L.pB.set({sectors:n,stacks:e},r),r)},OK=function(t){function i(i,n,e,r){var s=t.call(this,i,n,e,r)||this;return s.w_="cull-back",s.ic=[],s.xP={},s.uD=new SZ(s.ic,(function(t){return t.vertexBuffer&&s.yB.VI(t.vertexBuffer)}),!0),s.aa=[],s.Vh=0,s.Gh=[],s.Hh=0,s.Nh=Ds,s.jh=Ds,s.ia=Kz.lineStyle,s.VS=Kz.pointStyle3D,s.xS.l(tG),s.fD={attributesPerVertex:3,prepareRenderData:function(t,i){return hs(t)}},s}return n(i,t),i.prototype.Fe=function(t){var i=this,n=this.Vo,e=this.co,r=this.Gh,s=this.Hh,o=s>0,h=this.ia,u=h!==this.ra,a=this.VS,f=a!==this.N_,c=this.p_();this.jh&&(this.Nh=Qs(this.Nh,this.jh),this.jh=void 0),o&&(this.aa=ps(this.aa,r,{canReturnB:!0}),this.Vh+=s);var l=r,d=s;if((n||e)&&(this.ic.forEach((function(t){t.existingCoordinatesCount=0,t.existingDataPointsCount=0,t.boundaries=Ds})),this.uD.$P(),l=this.aa,d=this.Vh),d>0){var v=Math.floor(this.gO.V_/(this.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT)),y=this._o("ApplicationType",(function(t){return"UserSeries"===t.type}))?d:1e3,S=Lr(y,1e5,v);this.uD.KP(l,S,(function(t,n,e,r){return{existingDataPointsCount:e-r,existingCoordinatesCount:e,allocatedCoordinatesCount:t,jointPointsCount:r,lastDataPoint:n[e-1],boundaries:Ds,vertexBuffer:i.yB.JL(t*i.fD.attributesPerVertex,i.fD.prepareRenderData(n,e))}}),(function(t,n,e,r){i.yB.QL(t.vertexBuffer,t.existingCoordinatesCount*i.fD.attributesPerVertex,i.fD.prepareRenderData(n,e)),t.existingDataPointsCount+=e-r,t.existingCoordinatesCount+=e,t.jointPointsCount+=r,t.lastDataPoint=n[e-1]}))}if(u||f||e||c){var m={},b=h instanceof nr&&h,g=b&&b.getFillStyle(),w=g instanceof Ee&&g,p=g instanceof Ve&&g,k=w||p,x=a instanceof ah&&a.getSize(),M=a instanceof ah&&a.getFillStyle(),A=M instanceof Ee&&M,F=M instanceof Ve&&M,T=A||F,C=h.thickness<0||1===h.thickness&&this._o("ApplicationType",(function(t){return"InternalUI"===t.type}))?"primitive":"instanced",B=p?["lookup",p.getLookUpProperty()]:"uniform";if("primitive"===C&&k?m.lines={type:"primitive",fillStyleSolid:w,fillStylePaletted:p,shader:this.yB.FI(EX["3D"],EX.Color({dataType:B}),EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0}))}:"instanced"===C&&b&&k&&(m.lines={type:"instanced",lineStyleSolid:b,fillStyleSolid:w,fillStylePaletted:p,shader:this.yB.FI(EX["3D"],EX.ColorShaded3D({dataType:B,shadingStyle:this.xS.S().type}),EX.LineInstanced3D({axisWorldTranslation:NX(this.Rt)})),geometry:PK(this.yB,b.getThickness())}),m.markers=void 0,T){var L=gs(a.getShape(),{cube:function(){return MK(i.yB)},sphere:function(){return DK(i.yB,a)}});m.markers={geometry:L,pointStyle:a,pointSizeNWU:"number"==typeof x&&x,pointSizeAxis:"object"==typeof x&&x,fillStyleSolid:A,fillStylePaletted:F,shader:this.yB.FI(EX["3D"],EX.ColorShaded3D({dataType:F?["lookup",F.getLookUpProperty()]:"uniform",shadingStyle:this.xS.S().type}),EX.VertexLocation({offset:{dataType:"uniform",sizeUnit:"number"==typeof x?"nwu":"axis",symmetric:"number"==typeof x,halved:!0},axisWorldTranslation:NX(this.Rt),normalSource:L.v_}))}}if(this.xP=m,p){if(p&&p.lut.isValid){var I=p.getPalette();this.QO=this.gO.$O(I,this.qO,this.QO),this.qO=I}}else this.gO.BI.uo(this.qO),this.qO=void 0}return this.Go(),this.Gh=[],this.Hh=0,this.ra=h,this.N_=a,this.xS.t=!1,this},i.prototype.vB=function(){var t=this,i=this.yB.gl,n=this.xP,e=n.lines,r=n.markers,s=this.xS.S();if(e&&"instanced"===e.type){var o=e.shader,h=e.geometry,u=e.lineStyleSolid,a=e.fillStyleSolid,f=e.fillStylePaletted;this.yB.NI(o,(function(n,e,r){t.yB.rL(o).jL(n("uScale"),t.b_.cL.aO()).jL(n("uDisp"),t.b_.cL.uO()).UL(n("uViewProjectionMatrix"),t.O_).XL(n("uOffsetWU"),t.wf.gS(u.getThickness())),"phong"===s.type&&t.yB.jL(n("uCameraLoc"),t.P_).jL(n("uLightLoc"),t.D_).XL(n("uAmbientReflection"),s.ambientReflection).XL(n("uSpecularReflection"),s.specularReflection).XL(n("uDiffuseReflection"),s.diffuseReflection).XL(n("uShininess"),s.shininess).YL(n("uLightColor"),s.specularColor).YL(n("uAmbientColor"),s.ambientColor),a?t.yB.YL(n("uColorDiffuse"),a.getColor()):f&&t.QO&&t.yB.KL(n("uLookupTexture"),t.QO.texture,0).XL(n("uLookupMin"),f.lut.min).XL(n("uLookupMax"),f.lut.max).XL(n("uLookupTextureHeightPx"),t.QO.textureHeight),t.ic.forEach((function(n){i.bindBuffer(i.ARRAY_BUFFER,n.vertexBuffer);var s=e("aLocationA"),o=e("aLocationB");i.vertexAttribPointer(s,3,i.FLOAT,!1,3*Float32Array.BYTES_PER_ELEMENT,0*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(s,1),i.enableVertexAttribArray(s),i.vertexAttribPointer(o,3,i.FLOAT,!1,3*Float32Array.BYTES_PER_ELEMENT,3*Float32Array.BYTES_PER_ELEMENT),t.yB.sI(o,1),i.enableVertexAttribArray(o),h.rL(r).Ky(n.existingCoordinatesCount-1)}))}))}if(e&&"primitive"===e.type){var c=e.shader,l=e.fillStyleSolid,d=e.fillStylePaletted;this.yB.NI(c,(function(n,e){t.yB.rL(c).jL(n("uScale"),t.b_.cL.aO()).jL(n("uDisp"),t.b_.cL.uO()).UL(n("uViewProjectionMatrix"),t.O_),l?t.yB.YL(n("uColor"),l.getColor()):d&&t.QO&&t.yB.KL(n("uLookupTexture"),t.QO.texture,0).XL(n("uLookupMin"),d.lut.min).XL(n("uLookupMax"),d.lut.max).XL(n("uLookupTextureHeightPx"),t.QO.textureHeight),t.ic.forEach((function(n){t.yB.rI(n.vertexBuffer,void 0,{location:e("aPos"),size:3}).Ky(i.LINE_STRIP,n.existingCoordinatesCount)}))}))}if(r){var v=r.shader,y=r.geometry,S=r.fillStyleSolid,m=r.fillStylePaletted,b=r.pointSizeAxis,g=r.pointSizeNWU;this.yB.NI(v,(function(i,n,e,r){t.yB.rL(v).jL(i("uScale"),t.b_.cL.aO()).jL(i("uDisp"),t.b_.cL.uO()).UL(i("uViewProjectionMatrix"),t.O_).XL(r("uRatioNwuWu"),t.b_.G_()),"phong"===s.type&&t.yB.jL(i("uCameraLoc"),t.P_).jL(i("uLightLoc"),t.D_).XL(i("uAmbientReflection"),s.ambientReflection).XL(i("uSpecularReflection"),s.specularReflection).XL(i("uDiffuseReflection"),s.diffuseReflection).XL(i("uShininess"),s.shininess).YL(i("uLightColor"),s.specularColor).YL(i("uAmbientColor"),s.ambientColor),S?t.yB.YL(i("uColorDiffuse"),S.getColor()):m&&t.QO&&t.yB.KL(i("uLookupTexture"),t.QO.texture,0).XL(i("uLookupMin"),m.lut.min).XL(i("uLookupMax"),m.lut.max).XL(i("uLookupTextureHeightPx"),t.QO.textureHeight),!1!==b&&t.yB.jL(i("uOffsetAxis"),[b.x,b.y,b.z]),!1!==g&&t.yB.XL(i("uOffsetNWU"),g),t.ic.forEach((function(i){t.yB.rI(i.vertexBuffer,1,{location:n("aPos"),size:3}),y.Ky(e,i.existingCoordinatesCount)}))}))}return this},i.prototype.Qh=function(t,i){Array.isArray(t)||(t=[t]),this.Gh=ps(this.Gh,t,{canReturnB:!0}),this.Hh+=t.length;var n=i||qs(t);return this.jh=this.jh?Qs(this.jh,n):n,this},i.prototype.na=function(t){return this.ia="function"==typeof t?t(this.ia):t,this},i.prototype.ea=function(){return this.ia},i.prototype.lS=function(t){return this.VS="function"==typeof t?t(this.VS):t,this},i.prototype.H_=function(){return this.VS},i.prototype.Et=function(){return this.jh?Math.max(this.jh.max.x,this.Nh.max.x):this.Nh.max.x},i.prototype.zt=function(){return this.jh?Math.min(this.jh.min.x,this.Nh.min.x):this.Nh.min.x},i.prototype.Vt=function(){return this.jh?Math.max(this.jh.max.y,this.Nh.max.y):this.Nh.max.y},i.prototype.Nt=function(){return this.jh?Math.min(this.jh.min.y,this.Nh.min.y):this.Nh.min.y},i.prototype.Ht=function(){return this.jh?Math.max(this.jh.max.z,this.Nh.max.z):this.Nh.max.z},i.prototype.Gt=function(){return this.jh?Math.min(this.jh.min.z,this.Nh.min.z):this.Nh.min.z},i.prototype.cu=function(){return.5*this.ia.thickness},i.prototype.lu=function(){return.5*this.ia.thickness},i.prototype.LS=function(){return.5*this.ia.thickness},i.prototype.Xh=function(){return this.aa},i.prototype.Yh=function(){return this.Gh},i.prototype.tu=function(){return this.Vh},i.prototype.iu=function(){return this.Hh},i.prototype.$h=function(){return this.Vo=!0,this.aa.length=0,this.Vh=0,this.Gh=[],this.Hh=0,this.Nh=Ds,this.jh=void 0,this},i.prototype.HO=function(t,i){},i.prototype.dispose=function(){return t.prototype.dispose.call(this),this.uD.tD(),this.xP={},this.qO&&(this.gO.BI.uo(this.qO),this.qO=void 0),this.QO=void 0,this},i.prototype.ZB=function(){return this.dispose(),this},i}(AK),PK=function(t,i){return CK(t,i>50?20:i>20?16:i>10?12:i>5?8:6)},DK=function(t,i){var n=i.getSize();return IK(t,"number"==typeof i?n>50?20:n>20?16:n>10?12:n>5?8:6:20)},_K=function(t){function i(i,n,e,r,s){var o=t.call(this,i,n,e,r)||this;o.Vm=s,o.w_="cull-back",o.ic=[],o.uD=new SZ(o.ic,(function(t){return t.vertexBuffer&&o.yB.VI(t.vertexBuffer)}),!1),o.aa=[],o.Vh=0,o.Gh=[],o.Hh=0,o.Nh=Ds,o.jh=Ds,o.WS=Kz.pointStyle3D,o.xS.l(tG);var h,u,a,f,c=!0===(null==s?void 0:s.individualPointColorEnabled),l=!0===(null==s?void 0:s.individualPointSizeEnabled),d=!0===(null==s?void 0:s.individualLookupValuesEnabled),v=!0===(null==s?void 0:s.individualPointSizeAxisEnabled),y=0;y+=3,c&&(h=y,y+=4),l&&(u=y,y+=1),d&&(a=y,y+=1),v&&(f=y,y+=3);var S=function(t,i,n,e){return t||i||n||e?!t||i||n||e?t||!i||n||e?t||i||!n||e?t||i||n||!e?function(r,s,o){for(var h=3+(t?4:0)+(i?1:0)+(n?1:0)+(e?3:0),u=r.length,a=new Float32Array(u*h),f=0,c=f,l=0;l0,h=this.WS,u=this.WS!==this.j_,a=this.lo.t,f=this.p_();this.jh&&(this.Nh=Qs(this.Nh,this.jh),this.jh=void 0),o&&(this.aa=ps(this.aa,r,{canReturnB:!0}),this.Vh+=s);var c=r,l=s;if((n||e)&&(this.ic.forEach((function(t){t.existingDataPointsCount=0,t.existingCoordinatesCount=0,t.boundaries=Ds})),this.uD.$P(),c=this.aa,l=this.Vh),l>0){var d=Math.floor(this.gO.V_/(this.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT)),v=Lr(l,1e5,d);this.uD.KP(c,v,(function(t,n,e){return{existingDataPointsCount:e,existingCoordinatesCount:e,allocatedCoordinatesCount:t,boundaries:Ds,vertexBuffer:i.yB.JL(t*i.fD.attributesPerVertex,i.fD.prepareRenderData(n,e))}}),(function(t,n,e){i.yB.QL(t.vertexBuffer,t.existingCoordinatesCount*i.fD.attributesPerVertex,i.fD.prepareRenderData(n,e)),t.existingDataPointsCount+=e,t.existingCoordinatesCount=t.existingDataPointsCount}))}if(u||e||f||a){var y=void 0,S=h.getSize(),m=h.getFillStyle(),b=this.fD.individualPointColorEnabled,g=this.fD.individualPointSizeEnabled,w=this.fD.individualPointSizeAxisEnabled,p=this.fD.individualLookupValuesEnabled,k=m instanceof Ee&&m,x=m instanceof Ne&&m,M=m instanceof Ve&&m;if(x&&!b){var A="LCJS misusage error: Series individualPointColorEnabled flag must be set if using IndividualPointFill !";throw wr.alert(A),new Error(A)}if(M&&"value"===M.getLookUpProperty()&&!p){A='LCJS misusage error: Series individualLookupValuesEnabled flag must be set if using PalettedFill with lookUpProperty="value" !';throw wr.alert(A),new Error(A)}var F=h instanceof ah&&h,T=F&&F.getWireframeStyle(),C=T&&T instanceof nr&&T,B=C&&C.getFillStyle(),L=B&&B instanceof Ee&&B;if(k||x||M||L){var I=x?"attribute":M?["lookup",M.getLookUpProperty()]:"uniform",O=g&&"number"==typeof S,P=w&&"object"==typeof S,D=O||P?"attribute":"uniform";if(h instanceof ah){var _=gs(h.getShape(),{cube:function(){return MK(i.yB)},sphere:function(){return RK(i.yB,h,g)}});y={type:"instanced",shader:this.yB.FI(EX["3D"],EX.ColorShaded3D({dataType:I,shadingStyle:this.xS.S().type,wireframe:!1!==L}),EX.VertexLocation({offset:{dataType:D,sizeUnit:"number"==typeof S?"nwu":"axis",halved:!0,symmetric:"number"==typeof S},axisWorldTranslation:NX(this.Rt),normalSource:_.v_})),pointStyle:h,useIndividualPointSize:O,useIndividualPointSize3D:P,pointSizeNWU:"number"==typeof S&&S,pointSizeAxis:"object"==typeof S&&S,fillStyleSolid:k,fillStyleIndividual:x,fillStylePalette:M,geometry:_,wireframe:C&&L&&{thickness:C.getThickness(),fillStyleSolid:L}}}else h instanceof fh&&"number"==typeof S&&(y={type:"primitive",shader:this.yB.FI(EX["3D"],EX.PointSize(D),EX.Color({dataType:I}),EX.VertexLocation({axisWorldTranslation:NX(this.Rt),normalSource:void 0})),pointStyle:h,pointSizePixels:S,useIndividualPointSize:O,fillStyleSolid:k,fillStyleIndividual:x,fillStylePalette:M})}if(this.xP=y,m instanceof Ve){var R=m.getPalette();this.RD=this.gO.$O(R,this.qO,this.RD),this.qO=R}else this.RD=void 0,this.gO.BI.uo(this.qO),this.qO=void 0}return this.Go(),this.Gh=[],this.Hh=0,this.j_=h,this.xS.t=!1,this},i.prototype.vB=function(){var t=this,i=this.yB.gl,n=this.xP;if(!n)return this;var e=n.shader;if(!e)return this;var r=this.xS.S(),s=n.fillStyleSolid,o=n.fillStylePalette,h=n.useIndividualPointSize,u="instanced"===n.type&&n.useIndividualPointSize3D;return this.yB.NI(e,(function(a,f,c,l){if(t.yB.rL(e).jL(a("uScale"),t.b_.cL.aO()).jL(a("uDisp"),t.b_.cL.uO()).UL(a("uViewProjectionMatrix"),t.O_),"instanced"===n.type){var d=n.pointSizeAxis,v=n.pointSizeNWU;!1!==d&&!1===u&&t.yB.jL(a("uOffsetAxis"),[d.x,d.y,d.z]),!1!==v&&!1===h&&t.yB.XL(a("uOffsetNWU"),v).XL(l("uRatioNwuWu"),t.b_.G_())}else if("primitive"===n.type){var y=n.pointSizePixels;h||t.yB.XL(a("uPointSize"),y).XL(a("uDevicePixelRatio"),t.yB.uL())}if("instanced"===n.type){var S=n.wireframe;"phong"===r.type&&t.yB.jL(a("uCameraLoc"),t.P_).jL(a("uLightLoc"),t.D_).XL(a("uAmbientReflection"),r.ambientReflection).XL(a("uSpecularReflection"),r.specularReflection).XL(a("uDiffuseReflection"),r.diffuseReflection).XL(a("uShininess"),r.shininess).YL(a("uLightColor"),r.specularColor).YL(a("uAmbientColor"),r.ambientColor),S&&t.yB.XL(a("uWireframeThickness"),S.thickness).YL(a("uWireframeColor"),S.fillStyleSolid.getColor()),s&&t.yB.YL(a("uColorDiffuse"),s.getColor())}else"primitive"===n.type&&s&&t.yB.YL(a("uColor"),s.getColor());o&&t.RD&&t.yB.KL(a("uLookupTexture"),t.RD.texture,0).XL(a("uLookupMin"),o.lut.min).XL(a("uLookupMax"),o.lut.max).XL(a("uLookupTextureHeightPx"),t.RD.textureHeight),t.ic.forEach((function(e,r){i.bindBuffer(i.ARRAY_BUFFER,e.vertexBuffer);var s=f("aPos");if(i.vertexAttribPointer(s,3,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetCoordinate*Float32Array.BYTES_PER_ELEMENT),"instanced"===n.type&&t.yB.sI(s,1),i.enableVertexAttribArray(s),n.fillStyleIndividual&&void 0!==t.fD.attributeOffsetColor){var o=f("aColor");i.vertexAttribPointer(o,4,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetColor*Float32Array.BYTES_PER_ELEMENT),"instanced"===n.type&&t.yB.sI(o,1),i.enableVertexAttribArray(o)}if(h&&void 0!==t.fD.attributeOffsetSize){"instanced"===n.type?t.yB.XL(l("uRatioNwuWu"),t.b_.G_()):"primitive"===n.type&&t.yB.XL(a("uDevicePixelRatio"),t.yB.uL());var d=f("instanced"===n.type?"aOffsetNWU":"aPointSize");i.vertexAttribPointer(d,1,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetSize*Float32Array.BYTES_PER_ELEMENT),"instanced"===n.type&&t.yB.sI(d,1),i.enableVertexAttribArray(d)}if(u&&void 0!==t.fD.attributeOffsetPointSize3D&&"instanced"===n.type){var v=f("aOffsetAxis");i.vertexAttribPointer(v,3,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetPointSize3D*Float32Array.BYTES_PER_ELEMENT),"instanced"===n.type&&t.yB.sI(v,1),i.enableVertexAttribArray(v)}if(n.fillStylePalette&&"value"===n.fillStylePalette.getLookUpProperty()&&void 0!==t.fD.attributeOffsetLookUpValue){var y=f("aLookupValue");i.vertexAttribPointer(y,1,i.FLOAT,!1,t.fD.attributesPerVertex*Float32Array.BYTES_PER_ELEMENT,t.fD.attributeOffsetLookUpValue*Float32Array.BYTES_PER_ELEMENT),"instanced"===n.type&&t.yB.sI(y,1),i.enableVertexAttribArray(y)}"instanced"===n.type?n.geometry.Ky(c,e.existingCoordinatesCount):"primitive"===n.type&&t.yB.Ky(i.POINTS,e.existingCoordinatesCount)}))})),this},i.prototype.Qh=function(t,i){Array.isArray(t)||(t=[t]),this.Gh=ps(this.Gh,t,{canReturnB:!0}),this.Hh+=t.length;var n=i||qs(t);return this.jh=this.jh?Qs(this.jh,n):n,this},i.prototype.jS=function(t){return this.WS="function"==typeof t?t(this.WS):t,this},i.prototype.W_=function(){return this.WS},i.prototype.Et=function(){return this.jh?Math.max(this.jh.max.x,this.Nh.max.x):this.Nh.max.x},i.prototype.zt=function(){return this.jh?Math.min(this.jh.min.x,this.Nh.min.x):this.Nh.min.x},i.prototype.Vt=function(){return this.jh?Math.max(this.jh.max.y,this.Nh.max.y):this.Nh.max.y},i.prototype.Nt=function(){return this.jh?Math.min(this.jh.min.y,this.Nh.min.y):this.Nh.min.y},i.prototype.Ht=function(){return this.jh?Math.max(this.jh.max.z,this.Nh.max.z):this.Nh.max.z},i.prototype.Gt=function(){return this.jh?Math.min(this.jh.min.z,this.Nh.min.z):this.Nh.min.z},i.prototype.cu=function(){var t=this.WS,i=t.getSize();return"number"==typeof i?t instanceof ah?i/2:t instanceof fh?5:0:0},i.prototype.lu=function(){return this.cu()},i.prototype.LS=function(){return this.cu()},i.prototype.Xh=function(){return this.aa},i.prototype.Yh=function(){return this.Gh},i.prototype.tu=function(){return this.Vh},i.prototype.iu=function(){return this.Hh},i.prototype.$h=function(){return this.Vo=!0,this.aa.length=0,this.Vh=0,this.Gh=[],this.Hh=0,this.Nh=Ds,this.jh=void 0,this},i.prototype.HO=function(t,i){},i.prototype.dispose=function(){return t.prototype.dispose.call(this),this.uD.tD(),this.gO.BI.uo(this.qO),this.qO=void 0,this.RD=void 0,this.xP=void 0,this},i.prototype.ZB=function(){return this.dispose(),this},i}(AK),RK=function(t,i,n){var e=i.getSize();return IK(t,"number"==typeof e?n||e>=50?20:e>=10?10:e>=3?5:3:32)},zK=function(t){function i(i,n,e,r){var s=t.call(this,i,n,e,r)||this;return s.UO="grid",s.w_="disabled",s.YO=[],s.Su=0,s.da=0,s.hi=w({x:0,y:0,z:0}),s.va=w({x:0,y:0}),s.ya=w({x:0,y:0}),s.St={x:0,y:0},s.bt={x:0,y:0},s.Sa=!0,s.ma=!0,s.ba=!0,s.Nh=Ds,s.ga=!0,s.Ho=Kz.fillStyle,s.wa=Re,s.xS.l(QV),s}return n(i,t),i.prototype.Fe=function(){var t,i,n,e,r,s,h,u,a,f,c,l,d=this.Uo(),v=this.co,y=this.Vo;if(this.Yo()&&this.Ra&&this.Da){var S=this.yB,m=this.Ho,b=this.Wo!==m,g=this.p_(),w=this.wa,p=this.Ga!==w,k=this.xa(),x=this.Rt.x.t||this.Rt.y.t||this.Rt.z.t;if(k||v){var M=this.va.S(),A=M.y,F=M.x,T=this.ga?101:201;this.XO=YX(A,F,T),this.ZO=XX(this.XO),this.KO(),this.YO=this.ZO.map((function(){return{vbo:void 0,ibo:void 0,colors:void 0,intensities:void 0,length:0}})),this.va.t=!1,this.ya.t=!1}var C=this.ZO,B=this.YO,L=this.Da;if(d||v||x||this.ba||y||k){this.Nh=Ds;try{for(var I=o(C),O=I.next();!O.done;O=I.next()){var P=O.value;ZX(L,this.ga,P,qX,this.Rt)}}catch(i){t={error:i}}finally{try{O&&!O.done&&(i=I.return)&&i.call(I)}finally{if(t)throw t.error}}var D=0;try{for(var _=o(B),R=_.next();!R.done;R=_.next()){(Q=R.value).vbo&&S.gl.deleteBuffer(Q.vbo),Q.ibo&&S.gl.deleteBuffer(Q.ibo);var z=C[D];D+=1,Q.vbo=S.qL(z.vbo),Q.ibo=S.tI(z.ibo),Q.length=z.length,Q.lengthWireframe=z.lengthWireframe,this.Nh=Qs(this.Nh,z.boundary)}}catch(t){n={error:t}}finally{try{R&&!R.done&&(e=_.return)&&e.call(_)}finally{if(n)throw n.error}}this.ba=!1}if(m instanceof Ve||(this.gO.BI.uo(this.qO),this.qO=void 0),b||v||g){var E=m instanceof Ee&&m,N=m instanceof Ne&&m,V=m instanceof Ve&&m;this.fL=E||N||V?S.FI(EX["3D"],EX.ColorShaded3D({dataType:E?"uniform":N?"attribute":["lookup",V.getLookUpProperty()],shadingStyle:this.xS.S().type}),EX.VertexLocation({translation:"grid"===this.UO?{dataType:"uniform",sizeUnit:"axis"}:void 0,axisWorldTranslation:NX(this.Rt),normalSource:"attribute"})):void 0}(p||v)&&(this.JO=w instanceof Ee?S.FI(EX["3D"],EX.Color({dataType:"uniform"}),EX.VertexLocation({translation:"grid"===this.UO?{dataType:"uniform",sizeUnit:"axis"}:void 0,axisWorldTranslation:NX(this.Rt),normalSource:void 0}),EX.OffsetTowardsCamera()):void 0);var G=this.Ra;if(m instanceof Ve&&m.lut.isValid){if("value"===m.getLookUpProperty()&&(this.ma||this.co)){try{for(var H=o(C),j=H.next();!j.done;j=H.next()){var W=j.value;JX(G,this.ga,W,qX)}}catch(t){r={error:t}}finally{try{j&&!j.done&&(s=H.return)&&s.call(H)}finally{if(r)throw r.error}}D=0;try{for(var U=o(B),Y=U.next();!Y.done;Y=U.next()){(Q=Y.value)&&Q.intensities&&S.gl.deleteBuffer(Q.intensities);z=C[D];D+=1,Q.intensities=S.iI(z.intensities)}}catch(t){h={error:t}}finally{try{Y&&!Y.done&&(u=U.return)&&u.call(U)}finally{if(h)throw h.error}}this.ma=!1}var X=m.getPalette();this.QO=this.gO.$O(X,this.qO,this.QO),this.qO=X}else if(m instanceof Ne&&(this.tP&&S.zI(this.tP),this.Sa||this.co)){try{for(var Z=o(C),K=Z.next();!K.done;K=Z.next()){W=K.value;QX(G,m.color,this.ga,W,qX)}}catch(t){a={error:t}}finally{try{K&&!K.done&&(f=Z.return)&&f.call(Z)}finally{if(a)throw a.error}}D=0;try{for(var q=o(B),J=q.next();!J.done;J=q.next()){var Q;(Q=J.value).colors&&S.gl.deleteBuffer(Q.colors);z=C[D];D+=1,Q.colors=S.iI(z.colors)}}catch(t){c={error:t}}finally{try{J&&!J.done&&(l=q.return)&&l.call(q)}finally{if(c)throw c.error}}this.Sa=!1}}return this.Vo=!1,this.co=!1,this.Xo(this.Ho),this.Ga=this.wa,this.xS.t=!1,this},i.prototype.vB=function(){var t=this,i=this.Ra&&this.Da;if(this.Yo()&&i){var n=this.fL,e=this.xS.S();if(n){var r=(a=this.Ho)instanceof Ee&&a,s=a instanceof Ve&&a,h=a instanceof Ne&&a;this.yB.NI(n,(function(i,u,a){var f,c;t.yB.rL(n).jL(i("uScale"),t.b_.cL.aO()).jL(i("uDisp"),t.b_.cL.uO()).UL(i("uViewProjectionMatrix"),t.O_),"phong"===e.type&&t.yB.jL(i("uCameraLoc"),t.P_).jL(i("uLightLoc"),t.D_).XL(i("uAmbientReflection"),e.ambientReflection).XL(i("uSpecularReflection"),e.specularReflection).XL(i("uDiffuseReflection"),e.diffuseReflection).XL(i("uShininess"),e.shininess).YL(i("uLightColor"),e.specularColor).YL(i("uAmbientColor"),e.ambientColor),"grid"===t.UO&&t.yB.jL(i("uTranslationAxis"),[t.St.x,0,t.St.y]),r&&t.yB.YL(i("uColorDiffuse"),r.getColor()),s&&s.lut.isValid&&t.QO&&t.yB.XL(i("uLookupMin"),s.lut.min).XL(i("uLookupMax"),s.lut.max).XL(i("uLookupTextureHeightPx"),t.QO.textureHeight).KL(i("uLookupTexture"),t.QO.texture,0);try{for(var l=o(t.YO),d=l.next();!d.done;d=l.next()){var v=d.value,y=v.vbo,S=v.ibo,m=v.colors,b=v.intensities,g=v.length;t.yB.rI(y,void 0,{location:u("aPos"),size:3},{location:u("aNormal"),size:3}).aI(S),s&&"value"===s.getLookUpProperty()&&b&&t.yB.uI(u("aLookupValue"),b),h&&m&&t.yB.hI(u("aColor"),m),t.yB.fI(g)}}catch(t){f={error:t}}finally{try{d&&!d.done&&(c=l.return)&&c.call(l)}finally{if(f)throw f.error}}}))}var u=this.JO;if(u){var a,f=(a=this.wa)instanceof Ee&&a;f&&this.yB.NI(u,(function(i,n,e){var r,s;t.yB.rL(u).jL(u.yL("uScale"),t.b_.cL.aO()).jL(u.yL("uDisp"),t.b_.cL.uO()).UL(u.yL("uViewProjectionMatrix"),t.O_).jL(u.yL("uCameraLoc"),t.P_),"grid"===t.UO&&t.yB.jL(u.yL("uTranslationAxis"),[t.St.x,0,t.St.y]),t.yB.YL(u.yL("uColor"),f.getColor());try{for(var h=o(t.YO),a=h.next();!a.done;a=h.next()){var c=a.value,l=c.vbo,d=c.ibo,v=c.lengthWireframe;t.yB.rI(l,void 0,{location:n("aPos"),size:3},{location:void 0,size:3}).aI(d).fI(v,t.yB.gl.LINES)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(s=h.return)&&s.call(h)}finally{if(r)throw r.error}}}))}}return this},i.prototype.HO=function(t,i){},i.prototype.KO=function(){var t,i,n=this.yB;if(this.YO.length>0){try{for(var e=o(this.YO),r=e.next();!r.done;r=e.next()){var s=r.value,h=s||{},u=h.vbo,a=h.ibo,f=h.colors,c=h.intensities;u&&(n.VI(u),s.vbo=void 0),a&&(n.VI(a),s.ibo=void 0),f&&(n.VI(f),s.colors=void 0),c&&(n.VI(c),s.intensities=void 0)}}catch(i){t={error:i}}finally{try{r&&!r.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}this.YO.length=0}},i.prototype.ZB=function(){return this.KO(),this.tP&&(this.yB.zI(this.tP),this.tP=void 0),this.fL=void 0,this.JO=void 0,this.gO.BI.uo(this.qO),this.qO=void 0,this.QO=void 0,this},i.prototype.l=function(t){return HE.l(this,t,(function(t,i){return{x:t,y:0,z:i}})),this},i.prototype.xa=function(){return HE.xa(this)},i.prototype.Ma=function(){return HE.Ma(this)},i.prototype.kh=function(){return HE.kh(this)},i.prototype.iu=function(){return HE.iu(this)},i.prototype.Aa=function(t,i,n){return HE.Aa(this,t,i,n),this},i.prototype.Fa=function(t,i,n){return HE.Fa(this,t,i,n),this},i.prototype.Ta=function(t,i){return HE.Ta(this,t,i),this},i.prototype.Ca=function(t,i){return HE.Ca(this,t,i),this},i.prototype.Ba=function(t,i){return this.UO="mesh",HE.Ba(this,t,i),this},i.prototype.Va=function(t,i){return HE.Va(this,t,i),this},i.prototype.$h=function(){return HE.$h(this,(function(t,i){return{x:t,y:0,z:i}})),this},i.prototype.La=function(){return HE.La(this)},i.prototype.Ia=function(){return HE.Ia(this)},i.prototype.Oa=function(){return HE.Oa(this)},i.prototype.tu=function(){return HE.tu(this)},i.prototype.Uo=function(){return HE.Uo(this)},i.prototype.Yo=function(){return HE.Yo(this)},i.prototype.Et=function(){return"grid"===this.UO?this.Nh.max.x+this.St.x:this.Nh.max.x},i.prototype.zt=function(){return"grid"===this.UO?this.Nh.min.x+this.St.x:this.Nh.min.x},i.prototype.Vt=function(){return this.UO,this.Nh.max.y},i.prototype.Nt=function(){return this.UO,this.Nh.min.y},i.prototype.Ht=function(){return"grid"===this.UO?this.Nh.max.z+this.St.y:this.Nh.max.z},i.prototype.Gt=function(){return"grid"===this.UO?this.Nh.min.z+this.St.y:this.Nh.min.z},i.prototype.cu=function(){return 0},i.prototype.lu=function(){return 0},i.prototype.LS=function(){return 0},i.prototype.$n=function(t){return this.Ho=yE(this.Ho,t),this},i.prototype.Qn=function(){return this.Ho},i.prototype.pa=function(t){return this.wa=yE(this.wa,t),this},i.prototype.ka=function(){return this.wa},i.prototype.jo=function(){return SE(this.Wo,this.Ho)},i.prototype.Xo=function(t){this.Wo=t},i}(AK),EK=function(t){function i(i,n,r,s,o){var h=t.call(this,i,n,r,s)||this;h.w_="disabled",h.Ho=Kz.fillStyle,h.wa=Kz.lineStyle,h.PD=w("bilinear"),h.U_=[],h.Y_=Ds,h.X_=void 0,h.Z_=!1,h.xS.l(QV);var u="columns"===o.dataOrder?o.columns:o.rows,a="columns"===o.dataOrder?o.rows:o.columns;h.Vm=e(e({},o),{primaryDimensionVectorsCount:u,secondaryDimensionVectorsCount:a}),h.Y_={min:{x:Math.min(o.start.x,o.start.x+(o.columns-1)*o.step.x),z:Math.min(o.start.z,o.start.z+(o.rows-1)*o.step.z)},max:{x:Math.max(o.start.x,o.start.x+(o.columns-1)*o.step.x),z:Math.max(o.start.z,o.start.z+(o.rows-1)*o.step.z)}},h.K_=new Array(h.Vm.primaryDimensionVectorsCount).fill(void 0),h.q_=new cK(h.gO,i.oo.Rt,Cr,Cr,[],e(e({},h.Vm),{start:{x:0,y:0},step:{x:1,y:1}})).pa(ir),h.q_.ID=oK;var f=h.q_.OD.gridTiles.map((function(t){var i=t.sizeHeatmapDataVectors,n=t.sizeUniqueHeatmapDataVectors,e=t.iFirstVector,r=t.iFirstUniqueVector,s="columns"===h.Vm.dataOrder?{x:h.Vm.step.x*(t.sizeHeatmapDataVectors.primary-1),z:h.Vm.step.z*(t.sizeHeatmapDataVectors.secondary-1)}:{x:h.Vm.step.x*(t.sizeHeatmapDataVectors.secondary-1),z:h.Vm.step.z*(t.sizeHeatmapDataVectors.primary-1)},o="columns"===h.Vm.dataOrder?{x:h.Vm.start.x+h.Vm.step.x*t.iFirstVector.primary,z:h.Vm.start.z+h.Vm.step.z*t.iFirstVector.secondary}:{x:h.Vm.start.x+h.Vm.step.x*t.iFirstVector.secondary,z:h.Vm.start.z+h.Vm.step.z*t.iFirstVector.primary},u=new Float32Array(t.sizeHeatmapDataVectors.primary*t.sizeHeatmapDataVectors.secondary),a={primary:t.sizeHeatmapDataVectors.primary-1,secondary:t.sizeHeatmapDataVectors.secondary-1};return{iFirstVector:t.iFirstVector,iFirstUniqueVector:t.iFirstUniqueVector,sizeHeatmapDataVectors:t.sizeHeatmapDataVectors,sizeUniqueHeatmapDataVectors:t.sizeUniqueHeatmapDataVectors,iFirstGeometryVector:e,iFirstGeometryUniqueVector:r,sizeGeometryDataVectors:i,sizeUniqueGeometryDataVectors:n,startLocationAxis:o,sizeAxis:s,heightmapData:u,normalmapSize:a}})),c=h.q_.OD.gridTileSizes.map((function(t){var i=f.filter((function(i){return i.sizeHeatmapDataVectors.primary===t.sizeHeatmapData.primary&&i.sizeHeatmapDataVectors.secondary===t.sizeHeatmapData.secondary})),n=i[0].sizeGeometryDataVectors;return e(e({},t),{tiles:i,sizeGeometryData:n})})),l=f.reduce((function(t,i){var n=i.sizeHeatmapDataVectors.primary,e=i.sizeHeatmapDataVectors.secondary,r=n*e;return r>t.cells?{primary:n,secondary:e,cells:r}:t}),{primary:0,secondary:0,cells:0});return h.J_={gridTiles:f,gridTileSizes:c,largestGridTileSize:l},h}return n(i,t),i.prototype.Q_=function(t){this.tR=t,this.X_=void 0},i.prototype.iR=function(t){"columns"===this.Vm.dataOrder?(this.Y_.min.x=Math.min(this.Vm.start.x,this.Vm.start.x+(this.Vm.columns-1)*this.Vm.step.x)+t,this.Y_.max.x=Math.max(this.Vm.start.x,this.Vm.start.x+(this.Vm.columns-1)*this.Vm.step.x)+t):(this.Y_.min.z=Math.min(this.Vm.start.z,this.Vm.start.z+(this.Vm.rows-1)*this.Vm.step.z)+t,this.Y_.max.z=Math.max(this.Vm.start.z,this.Vm.start.z+(this.Vm.rows-1)*this.Vm.step.z)+t),this.nR=t},i.prototype.Fe=function(t){var i=this,n=this.U_,e=this.Ho,r=e instanceof Ee&&e,s=e instanceof Ve&&e,o=SE(this.Wo,e),h=s&&s.getPalette(),u=this.wa,a=u instanceof nr&&u,f=a&&a.getFillStyle(),c=f&&f instanceof Ee&&f,l=!1!==c,d=u!==this.Ga,v=this.PD.t,y=this.PD.S(),S=this.xS.S(),m=this.p_(),b=this.co;this.q_.Fe();var g=this.q_.DD;if(!g)return this;this.eR=this.eR||this.rR(g);var w=this.eR;this.sR(w);var p=hK(n,w,b&&this.Z_?"y":void 0,(function(t){return t.sizeGeometryDataVectors}));if(p.size>0&&(fK(this.yB,p,(function(t){return t.heightmapData}),(function(t){return t.heightmapDataTexture})),this.Z_=!0),"phong"===S.type&&(p.size>0||m)){var k=this.yB.gl,x=this.yB.FI(EX["2D"],EX.DrawToNormalTexture({flipXZ:"rows"===this.Vm.dataOrder,vertexIdSource:this.yB.KI(),normalTextureType:this.yB.gl2?"uint":"ubyte",heightmapTextureType:this.yB.MI?"float":"ubyte",littleEndian:this.yB.IS_MACHINE_LITTLE_ENDIAN}));w.gridTileSizes.forEach((function(t){t.tiles.forEach((function(n){var e=n.normalmapTexture;if(e){var r={x:n.normalmapSize.secondary,y:n.normalmapSize.primary},s=r.x*r.y;i.yB.LI.vB((function(){i.yB.NI(x,(function(e,r,o,h){i.yB.rL(x).qI(o,s).VL(e("uTileDimensionsXZ"),["columns"===i.Vm.dataOrder?t.sizeHeatmapData.primary:t.sizeHeatmapData.secondary,"columns"===i.Vm.dataOrder?t.sizeHeatmapData.secondary:t.sizeHeatmapData.primary]).GL(e("uTileDimensions"),[t.sizeHeatmapData.primary,t.sizeHeatmapData.secondary]).VL(e("uTileStartLocationAxisXZ"),[n.startLocationAxis.x+("columns"===i.Vm.dataOrder&&i.nR||0),n.startLocationAxis.z+("rows"===i.Vm.dataOrder&&i.nR||0)]).VL(e("uTileSizeAxisXZ"),[n.sizeAxis.x,n.sizeAxis.z]).KL(e("uHeightmapTexture"),n.heightmapDataTexture,1).Ky(k.POINTS,s)}))}),e,r,void 0,i.oo.vi(),i.oo.rs(),0)}}))}))}if(o||d||this.co||v){h?(this.RD=this.gO.$O(h,this.zD,this.RD),this.zD=h):(this.RD=void 0,this.gO.BI.uo(this.zD),this.zD=void 0);var M=a&&c?{wireframeSolid:a,wireframeFillSolid:c}:void 0,A=void 0;r?A={shader:this.yB.FI(EX["3D"],EX.SurfaceGrid({axisWorldTranslation:NX(this.Rt),fillColor:"uniform",interpolation:"bilinear"===y&&"bilinear",flipXZ:"rows"===this.Vm.dataOrder,shadingStyle:S.type,wireframe:l,instanceIdSource:this.yB.JI(),normalTextureType:this.yB.gl2?"uint":"ubyte",intensityTextureType:this.yB.MI?"float":"ubyte",heightmapTextureType:this.yB.MI?"float":"ubyte",littleEndian:this.yB.IS_MACHINE_LITTLE_ENDIAN})),fill:{fillMode:"solid",fillStyleSolid:r},wireframe:M}:this.RD&&s&&"value"===s.getLookUpProperty()?A={shader:this.yB.FI(EX["3D"],EX.SurfaceGrid({axisWorldTranslation:NX(this.Rt),fillColor:["lookup","value"],interpolation:"bilinear"===y&&"bilinear",flipXZ:"rows"===this.Vm.dataOrder,shadingStyle:S.type,wireframe:l,instanceIdSource:this.yB.JI(),normalTextureType:this.yB.gl2?"uint":"ubyte",intensityTextureType:this.yB.MI?"float":"ubyte",heightmapTextureType:this.yB.MI?"float":"ubyte",littleEndian:this.yB.IS_MACHINE_LITTLE_ENDIAN})),fill:{fillMode:"intensity",fillStylePaletted:s,colorLookupTexture:this.RD},wireframe:M}:this.RD&&s?A={shader:this.yB.FI(EX["3D"],EX.SurfaceGrid({axisWorldTranslation:NX(this.Rt),fillColor:["lookup",s.getLookUpProperty()],interpolation:"bilinear"===y&&"bilinear",flipXZ:"rows"===this.Vm.dataOrder,shadingStyle:S.type,wireframe:l,instanceIdSource:this.yB.JI(),normalTextureType:this.yB.gl2?"uint":"ubyte",intensityTextureType:this.yB.MI?"float":"ubyte",heightmapTextureType:this.yB.MI?"float":"ubyte",littleEndian:this.yB.IS_MACHINE_LITTLE_ENDIAN})),fill:{fillMode:"xyz",fillStylePaletted:s,colorLookupTexture:this.RD},wireframe:M}:l&&(A={shader:this.yB.FI(EX["3D"],EX.SurfaceGrid({axisWorldTranslation:NX(this.Rt),fillColor:void 0,interpolation:"bilinear"===y&&"bilinear",flipXZ:"rows"===this.Vm.dataOrder,shadingStyle:S.type,wireframe:l,instanceIdSource:this.yB.JI(),normalTextureType:this.yB.gl2?"uint":"ubyte",intensityTextureType:this.yB.MI?"float":"ubyte",heightmapTextureType:this.yB.MI?"float":"ubyte",littleEndian:this.yB.IS_MACHINE_LITTLE_ENDIAN})),fill:void 0,wireframe:M}),this.xP=A}return this.U_.length=0,this.Vo=!1,this.co=!1,this.Wo=e,this.Ga=u,this.xS.t=!1,this},i.prototype.rR=function(t){var i=this,n=this.J_.gridTiles.map((function(n){var r=aK(i.yB,n.sizeHeatmapDataVectors.secondary,n.sizeHeatmapDataVectors.primary),s=t.gridTiles.find((function(t){return t.iFirstUniqueVector.primary===n.iFirstUniqueVector.primary&&t.iFirstUniqueVector.secondary===n.iFirstUniqueVector.secondary}));if(!s)throw new Error("Internal LC JS error prepare surface data 2D render data not found");return e(e({},n),{intensityDataTexture:s.intensityDataTexture,heightmapDataTexture:r,normalmap:void 0})})),r=this.J_.gridTileSizes.map((function(t){var i=n.filter((function(i){return i.sizeHeatmapDataVectors.primary===t.sizeHeatmapData.primary&&i.sizeHeatmapDataVectors.secondary===t.sizeHeatmapData.secondary}));return e(e({},t),{tiles:i})})),s=this.yB.qL([0,0,1,0,0,1,0,1,1,0,0,1,0,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,0,0]),o=this.yB.gl.TRIANGLES;return{gridTiles:n,gridTileSizes:r,rectangleLocationsBuffer:s,rectangleLocationsDrawLength:6,rectangleLocationsDrawMode:o}},i.prototype.sR=function(t){var i,n=this;if("phong"===this.xS.S().type)for(var e=0;ed||au.max?r:u.max;else{u={min:Is,max:Os},t.K_[o]=u;for(var a=0;af?r:f,u.min=Math.min(u.min,f),u.max=Math.max(u.max,f)}}}})),this.X_={min:e,max:r},this.X_},i}(AK),NK=function(t){function i(i,n,r,s,o){var h=t.call(this,i,n,r,s)||this;h.w_="disabled",h.GD=0,h.jD={};var u={min:{x:o.start.x,z:o.start.z},max:{x:"rows"===o.scrollDimension?o.start.x+(o.columns-1)*o.step.x:o.start.x,z:"columns"===o.scrollDimension?o.start.z+(o.rows-1)*o.step.z:o.start.z}};h.Vm=e(e({},o),{initialBoundaries:u,scrollDimensionSize:"columns"===o.scrollDimension?o.columns:o.rows,staticDimensionSize:"columns"===o.scrollDimension?o.rows:o.columns}),h.Y_=u;var a=function(){return{shape:new EK(h.b_,Cr,Cr,h.fo,{columns:o.columns+("columns"===o.scrollDimension?1:0),rows:o.rows+("rows"===o.scrollDimension?1:0),start:{x:0,z:0},step:o.step,dataOrder:o.scrollDimension,heatmapDataType:"intensity"}).dispose(),hasData:!1}};return h.ic=[a(),a()],h}return n(i,t),i.prototype.Fe=function(t){return this.ic.forEach((function(i){i.shape.Fe(t)})),this},i.prototype.vB=function(){var t=this;return this.ic.forEach((function(i){i.hasData&&(i.shape.O_=t.O_,i.shape.P_=t.P_,i.shape.D_=t.D_,i.shape.vB())})),this},i.prototype.$h=function(){return this.GD=0,this.jD={},this.Y_=this.Vm.initialBoundaries,this.ic.forEach((function(t){t.shape.dispose(),t.shape.Z_=!1,t.hasData=!1})),this},i.prototype.Km=function(t){var i,n=this.isDisposed(),e=this.ic[0],r=this.ic[1],s=t.heightMapValues?t.heightMapValues.length:null===(i=t.intensityValues)||void 0===i?void 0:i.length,o=0;if(!s)return this;do{var h=Math.floor(this.GD/this.Vm.scrollDimensionSize)%this.ic.length,u=this.ic[h],a=this.GD%this.Vm.scrollDimensionSize,f=this.Vm.scrollDimensionSize-a,c=0===a,l=Math.min(f,s),d=a+l,v=a,y=v+1,S=o,m=o+l,b=this.GD>=this.Vm.scrollDimensionSize&&d<=this.Vm.scrollDimensionSize-1,g=c;if(c){var w="columns"===this.Vm.scrollDimension?this.Vm.start.x+(this.GD-1)*this.Vm.step.x:this.Vm.start.z+(this.GD-1)*this.Vm.step.z;u.shape.iR(w)}var p=b?0:1,k=d+(b?1:0);u.shape.Q_({fill:{iFirstPrimary:p,amountPrimary:k},wireframe:{iFirstPrimary:p,amountPrimary:k,connectNext:!1}});var x=u===e?r:e,M=d+1,A=1+this.Vm.scrollDimensionSize-M;x.shape.Q_({fill:{iFirstPrimary:M,amountPrimary:A},wireframe:{iFirstPrimary:M,amountPrimary:A-1,connectNext:!0}});var F={};if(t.heightMapValues){var T=t.heightMapValues.slice(S,m),C=!1;g&&this.jD.yValues&&(C=!0,T.splice(0,0,this.jD.yValues));var B={startPrimary:C?v:y,startSecondary:0,lengthPrimary:T.length,lengthSecondary:this.Vm.staticDimensionSize,values:T,type:"y"};u.shape.Um(B),u.hasData=!0,n||u.shape.restore(),F.yValues=T[l-1]}if(t.intensityValues){var L=t.intensityValues.slice(S,m),I=!1;g&&this.jD.intensityValues&&(I=!0,L.splice(0,0,this.jD.intensityValues));B={startPrimary:I?v:y,startSecondary:0,lengthPrimary:L.length,lengthSecondary:this.Vm.staticDimensionSize,values:L,type:"intensity"};u.shape.Wm(B),u.hasData=!0,n||u.shape.restore(),F.intensityValues=L[l-1]}this.GD+=l,o+=l,this.jD=F}while(oLs.length(a)){var f=u;u=a,a=f}var c=Ls.normalize(Ls.subtractVec(u,a)),d=this.cL.aO(),v=this.cL.uO(),S=y(d[0],d[1],d[2]),m=y(v[0],v[1],v[2]),b=Ls.addVec(Ls.multiplyVec(a,S),m),g=Ls.addVec(a,Ls.multiply(c,1)),w=Ls.addVec(Ls.multiplyVec(g,S),m);return{origin:b,direction:Ls.normalize(Ls.subtractVec(w,b))}}},i.prototype.lR=function(t){var i=this.cL.uO(),n=this.cL.aO(),r=Ls.divideVec(Ls.subtractVec(t,{x:i[0],y:i[1],z:i[2]}),{x:n[0],y:n[1],z:n[2]});return e(e({},t),{x:r.x,y:r.y,z:r.z})},i.prototype.dR=function(t){var i=this.cL.uO(),n=this.cL.aO(),r=Ls.addVec(Ls.multiplyVec(t,{x:n[0],y:n[1],z:n[2]}),{x:i[0],y:i[1],z:i[2]});return e(e({},t),{x:r.x,y:r.y,z:r.z})},i.prototype.gS=function(t){return t/1e3},i.prototype.G_=function(){return.001},i.prototype.vB=function(){var t=this;this.vR=!1,this.Fe();var i=this.gI.S(),n=this.O_,e=this.P_.S(),r=this.D_;if(!i||!n)throw new Error("Layer3D viewport is not defined");if(!r)throw new Error("Layer3D light location is not defined");var s=[e.x,e.y,e.z],o=[r.x,r.y,r.z];return this.gl.gl.viewport(i.x*this.gl.uL(),i.y*this.gl.uL(),i.width*this.gl.uL(),i.height*this.gl.uL()),this.n_.forEach((function(i){i.O_=n,i.P_=s,i.D_=o,t.gl.II(i.w_),t.gl.TS(i.AS),i.vB()})),this.gl.II("disabled"),this.gl.TS(!1),this},i.prototype.US=function(t){return this.r_(new _K(this,this.s_,this.o_,[],t))},i.prototype.iS=function(t){return this.r_(new OK(this,this.s_,this.o_,t))},i.prototype.XS=function(){return this.r_(new zK(this,this.s_,this.o_,[]))},i.prototype.ES=function(){return this.r_(new FK(this,this.s_,this.o_,[]))},i.prototype.Dv=function(){return this.r_(new BK(this,this.s_,this.o_,[]))},i.prototype.Gm=function(t){return this.r_(new EK(this,this.s_,this.o_,[],t))},i.prototype.Zm=function(t){return this.r_(new NK(this,this.s_,this.o_,[],t))},i}(function(t){function i(i,n,e){var r=t.call(this,i,n)||this;return r.Rt=e,r.vR=!0,r.yR=45,r.cR=.1,r.SR=100,r.P_=w(y(0,0,1)),r.mR=w(y(0,0,-1)),r.bR=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],r.xS=new JV,r}return n(i,t),i.prototype.aR=function(){var t=this.e_.S();if(void 0!==t){var i=t.width/t.height;if(this.gR=aY.projectionPerspective(this.yR,i,this.cR,this.SR),this.P_.t||this.mR.t){if(this.P_.t){var n=this.P_.S();this.bR[12]=n.x,this.bR[13]=n.y,this.bR[14]=n.z}if(this.mR.t){var e=this.mR.S(),r=y(0,1,0),s=Ls.multiply(e,-1),o=Ls.normalize(Ls.cross(r,s)),h=Ls.normalize(Ls.cross(s,o));this.bR[0]=o.x,this.bR[1]=o.y,this.bR[2]=o.z,this.bR[4]=h.x,this.bR[5]=h.y,this.bR[6]=h.z,this.bR[8]=s.x,this.bR[9]=s.y,this.bR[10]=s.z}this.wR=aY.inverse(this.bR)}this.O_=aY.multiply(this.gR,this.wR),this.fR=aY.inverse(this.O_),this.e_.t=!1,this.P_.t=!1,this.mR.t=!1,this.vR=!0}},i.prototype.Fe=function(){return this.aR(),this.uR(),this},i.prototype.setCameraLocation=function(t){return this.P_.l(t),this},i.prototype.getCameraLocation=function(){return this.P_.S()},i.prototype.setCameraDirection=function(t){return this.mR.l(Ls.normalize(t)),this},i.prototype.getCameraDirection=function(){return this.mR.S()},i.prototype.setLightLocation=function(t){return this.D_=t,this},i.prototype.getLightLocation=function(){return this.D_},i.prototype.pR=function(){return!0===this.vR||this.e_.t||this.P_.t||this.mR.t},i.prototype.kR=function(){return y(this.bR[0],this.bR[1],this.bR[2])},i.prototype.xR=function(){return y(this.bR[4],this.bR[5],this.bR[6])},i}(yK)),GK=function(t){function i(i,n,e){var r,s,h;void 0===e&&(e=CX);var u=t.call(this,i,n)||this;u.hi=d(1,1),u.MR=!1,u.AR=0,u.V_=8*Math.pow(1024,2),u.xn=function(t){return void 0===t&&(t=!1),t&&(u.MR=!0),void 0===u.Gr&&(u.Gr=wr.requestAnimationFrame(u.FR)),u},u.FR=function(t){t-u.AR>=u.As||-1===u.As?(u.AR=t,u.MR=!1,u.Hr&&u.Hr(),u.Gr=void 0,-1!==u.As&&(u.Gr=u.MR?wr.requestAnimationFrame(u.FR):void 0),u.os(),u.jr&&u.jr()):u.Gr=wr.requestAnimationFrame(u.FR)},u.kO=function(){return u.yB},u.os=function(){var t,i;u.Us.oi(u.hi),u.es.t&&u.yB.bI(u.es.S()),u.yB.$h();try{for(var n=o(u.Er.values()),e=n.next();!e.done;e=n.next()){e.value.vB()}}catch(i){t={error:i}}finally{try{e&&!e.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return u.bi(),u.Zr(),u.ls&&u.cs(u.ls),u},u.ho=function(){var t,i;try{for(var n=o(u.Er.values()),e=n.next();!e.done;e=n.next()){e.value.Fe()}}catch(i){t={error:i}}finally{try{e&&!e.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return u.bi(),u},u.TR=wr.document.createElement("canvas");var a,f={preserveDrawingBuffer:!0,antialias:n?n.antialias:void 0,alpha:!0,lineAntialias:!n||(!0===n.lineAntiAlias||!1===n.lineAntiAlias?n.lineAntiAlias:!1!==n.antialias)};if("webgl1"!==(null===(r=null==n?void 0:n.webgl)||void 0===r?void 0:r.version)){var c=u.TR.getContext("webgl2",f);c&&(a=new e(u.ps,{type:"webgl2",ctx:c,antialias:f.antialias,lineAntialias:f.lineAntialias}))}if(!a&&"webgl2"!==(null===(s=null==n?void 0:n.webgl)||void 0===s?void 0:s.version)){var l=u.TR.getContext("webgl",f)||u.TR.getContext("experimental-webgl",f);a=new e(u.ps,{type:"webgl1",ctx:l,antialias:f.antialias,lineAntialias:f.lineAntialias})}if(!a)throw new yr("No WebGL context available."+((null===(h=null==n?void 0:n.webgl)||void 0===h?void 0:h.version)?"\nSelected explicit target: "+n.webgl.version:""));u.yB=a,u.BI=dY(u.yB.gl);var v=u.yB.EL;if(v.length>0){var y=wr.document.createElement("div");y.innerText="LightningChart JS: Some features might not work properly, due to missing WebGL features.",y.style.cssText="position:absolute;top:0;background:red;width:100%;padding:10px;text-align:center;color:white;z-index:1;";var S=wr.document.createElement("button");S.innerText="X",S.addEventListener("click",(function(){y.parentElement&&y.parentElement.removeChild(y)})),u.$r.appendChild(y),y.appendChild(S),console.warn("LightningChart JS - Following WebGL extensions could not be loaded:",v.join(", "))}var m=1;if(n&&n.devicePixelRatio)m=!0===n.devicePixelRatio?wr.devicePixelRatio||1:n.devicePixelRatio||1;else{var b=wr.document.head.querySelector('meta[name="viewport"]');b&&b.content.includes("width=device-width")&&(m=wr.devicePixelRatio||1)}u.yB.DI(m),u.TR.style.position="absolute",u.TR.style.top="0",u.TR.style.left="0",u.TR.style.right="0",u.TR.style.bottom="0",u.TR.style.width="100%",u.TR.style.height="100%",u.TR.style.boxSizing="content-box",u.$r.appendChild(u.TR);var g=n?n.width:void 0,w=n?n.height:void 0;u.Hs=u.CR(g),u.Ws=u.CR(w),u.BR(u.Hs,u.Ws);var p=(null==n?void 0:n.theme)||Gz;return u.LR=u.$v(0),u.Us=u.LR.Pc(u.Rt).$n(p.lcjsBackgroundFillStyle||p.dashboardBackgroundFillStyle||Re).Ys(p.lcjsBackgroundStrokeStyle||p.dashboardBackgroundStrokeStyle||ir).setMouseInteractions(!1).ph({x:0,y:0}),u.Jr(),u.Zr(),u}return n(i,t),Object.defineProperty(i.prototype,"IR",{get:function(){return this.Er},enumerable:!1,configurable:!0}),i.prototype.Ps=function(t,i){return function(t){for(var i=t.split(",")[0].split(":")[1].split(";")[0],n=wr.atob(t.split(",")[1]),e=new Uint8Array(n.length),r=0;r=1&&this.an.emit("resize",[this.hi.x,this.hi.y])},i.prototype.ro=function(){t.prototype.ro.call(this),this.TR.width=1,this.TR.height=1,this.TR&&(this.$r.removeChild(this.TR),this.TR=void 0,this.$r=void 0),Array.from(this.yB.RL.values()).forEach((function(t){t.ZB()})),Array.from(this.yB.zL.values()).forEach((function(t){t.dispose()})),this.yB._L.xB(),this.yB.ZI&&(this.yB.VI(this.yB.ZI.buffer),this.yB.ZI=void 0),this.yB.YI(),this.yB.gl=void 0},i.prototype.OR=function(t,i,n){var e=this.hi[t.toLowerCase()],r=n||this.$r["offset"+i]||e||1;return e!==r?(this.TR[i.toLowerCase()]=r*this.yB.uL(),this.hi[t.toLowerCase()]=r,this.Rt[t.toLowerCase()].xi(0,r).oi(r),1):0},i.prototype.$O=function(t,i,n){var e=this.BI,r=n;if(e.FB(t))t!==i&&(e.uo(i),r=e.S(t),e.Qh(t));else{r={};var s=this.vi(),o={x:1,y:this.yB.XB};r.textureHeight=o.y;var h=er.d2({scaleXYConstructor:Vo}).oi(o);h.x.xi(0,1),h.y.xi(t.min,t.max);var u=new $X(this,h,(function(){}),(function(){}),[]);u.$n(new Ne({color:t.color})),t.interpolate?u.l({columns:2,rows:t.length,start:{x:0,y:t.min},end:{x:1,y:t.max},pixelate:!1}).Ba((function(i,n,e){return{x:e.x,y:t.steps[i].value}})).Ta((function(i){return t.steps[i].color})):u.l({columns:1,rows:t.length,start:{x:0,y:t.min},end:{x:1,y:t.max},pixelate:!0}).Ba((function(i,n,e){return{x:e.x,y:i=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:a,o|=u}return n(!(240&o),"Invalid character in "+t),r}function h(t,i,e,r){for(var s=0,o=0,h=Math.min(t.length,e),u=i;u=49?a-49+10:a>=17?a-17+10:a,n(a>=0&&o0?t:i},r.min=function(t,i){return t.cmp(i)<0?t:i},r.prototype.LL=function(t,i,e){if("number"==typeof t)return this.PR(t,i,e);if("object"===M(t))return this.DR(t,i,e);"hex"===i&&(i=16),n(i===(0|i)&&i>=2&&i<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&r++,16===i?this._R(t,r):this.RR(t,i,r),"-"===t[0]&&(this.negative=1),this.zR(),"le"===e&&this.DR(this.toArray(),i,e)},r.prototype.PR=function(t,i,e){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===e&&this.DR(this.toArray(),i,e)},r.prototype.DR=function(t,i,e){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var r=0;r=0;r-=3)o=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[s]|=o<>>26-h&67108863,(h+=24)>=26&&(h-=26,s++);else if("le"===e)for(r=0,s=0;r>>26-h&67108863,(h+=24)>=26&&(h-=26,s++);return this.zR()},r.prototype._R=function(t,i){this.length=Math.ceil((t.length-i)/6),this.words=new Array(this.length);for(var n=0;n=i;n-=6)r=o(t,n,n+6),this.words[e]|=r<>>26-s&4194303,(s+=24)>=26&&(s-=26,e++);n+6!==i&&(r=o(t,i,n+6),this.words[e]|=r<>>26-s&4194303),this.zR()},r.prototype.RR=function(t,i,n){this.words=[0],this.length=1;for(var e=0,r=1;r<=67108863;r*=i)e++;e--,r=r/i|0;for(var s=t.length-n,o=s%e,u=Math.min(s,s-o)+n,a=0,f=n;f1&&0===this.words[this.length-1];)this.length--;return this.GR()},r.prototype.GR=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{r.prototype[Symbol.for("nodejs.util.inspect.custom")]=a}catch(t){r.prototype.inspect=a}else r.prototype.inspect=a;function a(){return(this.red?""}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,i,n){n.negative=i.negative^t.negative;var e=t.length+i.length|0;n.length=e,e=e-1|0;var r=0|t.words[0],s=0|i.words[0],o=r*s,h=67108863&o,u=o/67108864|0;n.words[0]=h;for(var a=1;a>>26,c=67108863&u,l=Math.min(a,i.length-1),d=Math.max(0,a-t.length+1);d<=l;d++){var v=a-d|0;f+=(o=(r=0|t.words[v])*(s=0|i.words[d])+c)/67108864|0,c=67108863&o}n.words[a]=0|c,u=0|f}return 0!==u?n.words[a]=0|u:n.length--,n.zR()}r.prototype.toString=function(t,i){var e;if(i=0|i||1,16===(t=t||10)||"hex"===t){e="";for(var r=0,s=0,o=0;o>>24-r&16777215)||o!==this.length-1?f[6-u.length]+u+e:u+e,(r+=2)>=26&&(r-=26,o--)}for(0!==s&&(e=s.toString(16)+e);e.length%i!=0;)e="0"+e;return 0!==this.negative&&(e="-"+e),e}if(t===(0|t)&&t>=2&&t<=36){var a=c[t],d=l[t];e="";var v=this.clone();for(v.negative=0;!v.isZero();){var y=v.modrn(d).toString(t);e=(v=v.idivn(d)).isZero()?y+e:f[a-y.length]+y+e}for(this.isZero()&&(e="0"+e);e.length%i!=0;)e="0"+e;return 0!==this.negative&&(e="-"+e),e}n(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},r.prototype.toJSON=function(){return this.toString(16,2)},s&&(r.prototype.toBuffer=function(t,i){return this.toArrayLike(s,t,i)}),r.prototype.toArray=function(t,i){return this.toArrayLike(Array,t,i)},r.prototype.toArrayLike=function(t,i,e){this.zR();var r=this.byteLength(),s=e||Math.max(1,r);n(r<=s,"byte array longer than desired length"),n(s>0,"Requested array length <= 0");var o=function(t,i){return t.allocUnsafe?t.allocUnsafe(i):new t(i)}(t,s);return this["_toArrayLike"+("le"===i?"LE":"BE")](o,r),o},r.prototype.HR=function(t,i){for(var n=0,e=0,r=0,s=0;r>8&255),n>16&255),6===s?(n>24&255),e=0,s=0):(e=o>>>24,s+=2)}if(n=0&&(t[n--]=o>>8&255),n>=0&&(t[n--]=o>>16&255),6===s?(n>=0&&(t[n--]=o>>24&255),e=0,s=0):(e=o>>>24,s+=2)}if(n>=0)for(t[n--]=e;n>=0;)t[n--]=0},Math.clz32?r.prototype.WR=function(t){return 32-Math.clz32(t)}:r.prototype.WR=function(t){var i=t,n=0;return i>=4096&&(n+=13,i>>>=13),i>=64&&(n+=7,i>>>=7),i>=8&&(n+=4,i>>>=4),i>=2&&(n+=2,i>>>=2),n+i},r.prototype.UR=function(t){if(0===t)return 26;var i=t,n=0;return 0==(8191&i)&&(n+=13,i>>>=13),0==(127&i)&&(n+=7,i>>>=7),0==(15&i)&&(n+=4,i>>>=4),0==(3&i)&&(n+=2,i>>>=2),0==(1&i)&&n++,n},r.prototype.bitLength=function(){var t=this.words[this.length-1],i=this.WR(t);return 26*(this.length-1)+i},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,i=0;it.length?this.clone().ior(t):t.clone().ior(this)},r.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},r.prototype.iuand=function(t){var i;i=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},r.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},r.prototype.iuxor=function(t){var i,n;this.length>t.length?(i=this,n=t):(i=t,n=this);for(var e=0;et.length?this.clone().ixor(t):t.clone().ixor(this)},r.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},r.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var i=0|Math.ceil(t/26),e=t%26;this.VR(i),e>0&&i--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-e),this.zR()},r.prototype.notn=function(t){return this.clone().inotn(t)},r.prototype.setn=function(t,i){n("number"==typeof t&&t>=0);var e=t/26|0,r=t%26;return this.VR(e+1),this.words[e]=i?this.words[e]|1<t.length?(n=this,e=t):(n=t,e=this);for(var r=0,s=0;s>>26;for(;0!==r&&s>>26;if(this.length=n.length,0!==r)this.words[this.length]=r,this.length++;else if(n!==this)for(;st.length?this.clone().iadd(t):t.clone().iadd(this)},r.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var i=this.iadd(t);return t.negative=1,i.GR()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this.GR();var n,e,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(n=this,e=t):(n=t,e=this);for(var s=0,o=0;o>26,this.words[o]=67108863&i;for(;0!==s&&o>26,this.words[o]=67108863&i;if(0===s&&o>>13,d=0|o[1],v=8191&d,y=d>>>13,S=0|o[2],m=8191&S,b=S>>>13,g=0|o[3],w=8191&g,p=g>>>13,k=0|o[4],x=8191&k,M=k>>>13,A=0|o[5],F=8191&A,T=A>>>13,C=0|o[6],B=8191&C,L=C>>>13,I=0|o[7],O=8191&I,P=I>>>13,D=0|o[8],_=8191&D,R=D>>>13,z=0|o[9],E=8191&z,N=z>>>13,V=0|h[0],G=8191&V,H=V>>>13,j=0|h[1],W=8191&j,U=j>>>13,Y=0|h[2],X=8191&Y,Z=Y>>>13,K=0|h[3],q=8191&K,J=K>>>13,Q=0|h[4],$=8191&Q,tt=Q>>>13,it=0|h[5],nt=8191&it,et=it>>>13,rt=0|h[6],st=8191&rt,ot=rt>>>13,ht=0|h[7],ut=8191&ht,at=ht>>>13,ft=0|h[8],ct=8191&ft,lt=ft>>>13,dt=0|h[9],vt=8191&dt,yt=dt>>>13;n.negative=t.negative^i.negative,n.length=19;var St=(a+(e=Math.imul(c,G))|0)+((8191&(r=(r=Math.imul(c,H))+Math.imul(l,G)|0))<<13)|0;a=((s=Math.imul(l,H))+(r>>>13)|0)+(St>>>26)|0,St&=67108863,e=Math.imul(v,G),r=(r=Math.imul(v,H))+Math.imul(y,G)|0,s=Math.imul(y,H);var mt=(a+(e=e+Math.imul(c,W)|0)|0)+((8191&(r=(r=r+Math.imul(c,U)|0)+Math.imul(l,W)|0))<<13)|0;a=((s=s+Math.imul(l,U)|0)+(r>>>13)|0)+(mt>>>26)|0,mt&=67108863,e=Math.imul(m,G),r=(r=Math.imul(m,H))+Math.imul(b,G)|0,s=Math.imul(b,H),e=e+Math.imul(v,W)|0,r=(r=r+Math.imul(v,U)|0)+Math.imul(y,W)|0,s=s+Math.imul(y,U)|0;var bt=(a+(e=e+Math.imul(c,X)|0)|0)+((8191&(r=(r=r+Math.imul(c,Z)|0)+Math.imul(l,X)|0))<<13)|0;a=((s=s+Math.imul(l,Z)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,e=Math.imul(w,G),r=(r=Math.imul(w,H))+Math.imul(p,G)|0,s=Math.imul(p,H),e=e+Math.imul(m,W)|0,r=(r=r+Math.imul(m,U)|0)+Math.imul(b,W)|0,s=s+Math.imul(b,U)|0,e=e+Math.imul(v,X)|0,r=(r=r+Math.imul(v,Z)|0)+Math.imul(y,X)|0,s=s+Math.imul(y,Z)|0;var gt=(a+(e=e+Math.imul(c,q)|0)|0)+((8191&(r=(r=r+Math.imul(c,J)|0)+Math.imul(l,q)|0))<<13)|0;a=((s=s+Math.imul(l,J)|0)+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,e=Math.imul(x,G),r=(r=Math.imul(x,H))+Math.imul(M,G)|0,s=Math.imul(M,H),e=e+Math.imul(w,W)|0,r=(r=r+Math.imul(w,U)|0)+Math.imul(p,W)|0,s=s+Math.imul(p,U)|0,e=e+Math.imul(m,X)|0,r=(r=r+Math.imul(m,Z)|0)+Math.imul(b,X)|0,s=s+Math.imul(b,Z)|0,e=e+Math.imul(v,q)|0,r=(r=r+Math.imul(v,J)|0)+Math.imul(y,q)|0,s=s+Math.imul(y,J)|0;var wt=(a+(e=e+Math.imul(c,$)|0)|0)+((8191&(r=(r=r+Math.imul(c,tt)|0)+Math.imul(l,$)|0))<<13)|0;a=((s=s+Math.imul(l,tt)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,e=Math.imul(F,G),r=(r=Math.imul(F,H))+Math.imul(T,G)|0,s=Math.imul(T,H),e=e+Math.imul(x,W)|0,r=(r=r+Math.imul(x,U)|0)+Math.imul(M,W)|0,s=s+Math.imul(M,U)|0,e=e+Math.imul(w,X)|0,r=(r=r+Math.imul(w,Z)|0)+Math.imul(p,X)|0,s=s+Math.imul(p,Z)|0,e=e+Math.imul(m,q)|0,r=(r=r+Math.imul(m,J)|0)+Math.imul(b,q)|0,s=s+Math.imul(b,J)|0,e=e+Math.imul(v,$)|0,r=(r=r+Math.imul(v,tt)|0)+Math.imul(y,$)|0,s=s+Math.imul(y,tt)|0;var pt=(a+(e=e+Math.imul(c,nt)|0)|0)+((8191&(r=(r=r+Math.imul(c,et)|0)+Math.imul(l,nt)|0))<<13)|0;a=((s=s+Math.imul(l,et)|0)+(r>>>13)|0)+(pt>>>26)|0,pt&=67108863,e=Math.imul(B,G),r=(r=Math.imul(B,H))+Math.imul(L,G)|0,s=Math.imul(L,H),e=e+Math.imul(F,W)|0,r=(r=r+Math.imul(F,U)|0)+Math.imul(T,W)|0,s=s+Math.imul(T,U)|0,e=e+Math.imul(x,X)|0,r=(r=r+Math.imul(x,Z)|0)+Math.imul(M,X)|0,s=s+Math.imul(M,Z)|0,e=e+Math.imul(w,q)|0,r=(r=r+Math.imul(w,J)|0)+Math.imul(p,q)|0,s=s+Math.imul(p,J)|0,e=e+Math.imul(m,$)|0,r=(r=r+Math.imul(m,tt)|0)+Math.imul(b,$)|0,s=s+Math.imul(b,tt)|0,e=e+Math.imul(v,nt)|0,r=(r=r+Math.imul(v,et)|0)+Math.imul(y,nt)|0,s=s+Math.imul(y,et)|0;var kt=(a+(e=e+Math.imul(c,st)|0)|0)+((8191&(r=(r=r+Math.imul(c,ot)|0)+Math.imul(l,st)|0))<<13)|0;a=((s=s+Math.imul(l,ot)|0)+(r>>>13)|0)+(kt>>>26)|0,kt&=67108863,e=Math.imul(O,G),r=(r=Math.imul(O,H))+Math.imul(P,G)|0,s=Math.imul(P,H),e=e+Math.imul(B,W)|0,r=(r=r+Math.imul(B,U)|0)+Math.imul(L,W)|0,s=s+Math.imul(L,U)|0,e=e+Math.imul(F,X)|0,r=(r=r+Math.imul(F,Z)|0)+Math.imul(T,X)|0,s=s+Math.imul(T,Z)|0,e=e+Math.imul(x,q)|0,r=(r=r+Math.imul(x,J)|0)+Math.imul(M,q)|0,s=s+Math.imul(M,J)|0,e=e+Math.imul(w,$)|0,r=(r=r+Math.imul(w,tt)|0)+Math.imul(p,$)|0,s=s+Math.imul(p,tt)|0,e=e+Math.imul(m,nt)|0,r=(r=r+Math.imul(m,et)|0)+Math.imul(b,nt)|0,s=s+Math.imul(b,et)|0,e=e+Math.imul(v,st)|0,r=(r=r+Math.imul(v,ot)|0)+Math.imul(y,st)|0,s=s+Math.imul(y,ot)|0;var xt=(a+(e=e+Math.imul(c,ut)|0)|0)+((8191&(r=(r=r+Math.imul(c,at)|0)+Math.imul(l,ut)|0))<<13)|0;a=((s=s+Math.imul(l,at)|0)+(r>>>13)|0)+(xt>>>26)|0,xt&=67108863,e=Math.imul(_,G),r=(r=Math.imul(_,H))+Math.imul(R,G)|0,s=Math.imul(R,H),e=e+Math.imul(O,W)|0,r=(r=r+Math.imul(O,U)|0)+Math.imul(P,W)|0,s=s+Math.imul(P,U)|0,e=e+Math.imul(B,X)|0,r=(r=r+Math.imul(B,Z)|0)+Math.imul(L,X)|0,s=s+Math.imul(L,Z)|0,e=e+Math.imul(F,q)|0,r=(r=r+Math.imul(F,J)|0)+Math.imul(T,q)|0,s=s+Math.imul(T,J)|0,e=e+Math.imul(x,$)|0,r=(r=r+Math.imul(x,tt)|0)+Math.imul(M,$)|0,s=s+Math.imul(M,tt)|0,e=e+Math.imul(w,nt)|0,r=(r=r+Math.imul(w,et)|0)+Math.imul(p,nt)|0,s=s+Math.imul(p,et)|0,e=e+Math.imul(m,st)|0,r=(r=r+Math.imul(m,ot)|0)+Math.imul(b,st)|0,s=s+Math.imul(b,ot)|0,e=e+Math.imul(v,ut)|0,r=(r=r+Math.imul(v,at)|0)+Math.imul(y,ut)|0,s=s+Math.imul(y,at)|0;var Mt=(a+(e=e+Math.imul(c,ct)|0)|0)+((8191&(r=(r=r+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;a=((s=s+Math.imul(l,lt)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,e=Math.imul(E,G),r=(r=Math.imul(E,H))+Math.imul(N,G)|0,s=Math.imul(N,H),e=e+Math.imul(_,W)|0,r=(r=r+Math.imul(_,U)|0)+Math.imul(R,W)|0,s=s+Math.imul(R,U)|0,e=e+Math.imul(O,X)|0,r=(r=r+Math.imul(O,Z)|0)+Math.imul(P,X)|0,s=s+Math.imul(P,Z)|0,e=e+Math.imul(B,q)|0,r=(r=r+Math.imul(B,J)|0)+Math.imul(L,q)|0,s=s+Math.imul(L,J)|0,e=e+Math.imul(F,$)|0,r=(r=r+Math.imul(F,tt)|0)+Math.imul(T,$)|0,s=s+Math.imul(T,tt)|0,e=e+Math.imul(x,nt)|0,r=(r=r+Math.imul(x,et)|0)+Math.imul(M,nt)|0,s=s+Math.imul(M,et)|0,e=e+Math.imul(w,st)|0,r=(r=r+Math.imul(w,ot)|0)+Math.imul(p,st)|0,s=s+Math.imul(p,ot)|0,e=e+Math.imul(m,ut)|0,r=(r=r+Math.imul(m,at)|0)+Math.imul(b,ut)|0,s=s+Math.imul(b,at)|0,e=e+Math.imul(v,ct)|0,r=(r=r+Math.imul(v,lt)|0)+Math.imul(y,ct)|0,s=s+Math.imul(y,lt)|0;var At=(a+(e=e+Math.imul(c,vt)|0)|0)+((8191&(r=(r=r+Math.imul(c,yt)|0)+Math.imul(l,vt)|0))<<13)|0;a=((s=s+Math.imul(l,yt)|0)+(r>>>13)|0)+(At>>>26)|0,At&=67108863,e=Math.imul(E,W),r=(r=Math.imul(E,U))+Math.imul(N,W)|0,s=Math.imul(N,U),e=e+Math.imul(_,X)|0,r=(r=r+Math.imul(_,Z)|0)+Math.imul(R,X)|0,s=s+Math.imul(R,Z)|0,e=e+Math.imul(O,q)|0,r=(r=r+Math.imul(O,J)|0)+Math.imul(P,q)|0,s=s+Math.imul(P,J)|0,e=e+Math.imul(B,$)|0,r=(r=r+Math.imul(B,tt)|0)+Math.imul(L,$)|0,s=s+Math.imul(L,tt)|0,e=e+Math.imul(F,nt)|0,r=(r=r+Math.imul(F,et)|0)+Math.imul(T,nt)|0,s=s+Math.imul(T,et)|0,e=e+Math.imul(x,st)|0,r=(r=r+Math.imul(x,ot)|0)+Math.imul(M,st)|0,s=s+Math.imul(M,ot)|0,e=e+Math.imul(w,ut)|0,r=(r=r+Math.imul(w,at)|0)+Math.imul(p,ut)|0,s=s+Math.imul(p,at)|0,e=e+Math.imul(m,ct)|0,r=(r=r+Math.imul(m,lt)|0)+Math.imul(b,ct)|0,s=s+Math.imul(b,lt)|0;var Ft=(a+(e=e+Math.imul(v,vt)|0)|0)+((8191&(r=(r=r+Math.imul(v,yt)|0)+Math.imul(y,vt)|0))<<13)|0;a=((s=s+Math.imul(y,yt)|0)+(r>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,e=Math.imul(E,X),r=(r=Math.imul(E,Z))+Math.imul(N,X)|0,s=Math.imul(N,Z),e=e+Math.imul(_,q)|0,r=(r=r+Math.imul(_,J)|0)+Math.imul(R,q)|0,s=s+Math.imul(R,J)|0,e=e+Math.imul(O,$)|0,r=(r=r+Math.imul(O,tt)|0)+Math.imul(P,$)|0,s=s+Math.imul(P,tt)|0,e=e+Math.imul(B,nt)|0,r=(r=r+Math.imul(B,et)|0)+Math.imul(L,nt)|0,s=s+Math.imul(L,et)|0,e=e+Math.imul(F,st)|0,r=(r=r+Math.imul(F,ot)|0)+Math.imul(T,st)|0,s=s+Math.imul(T,ot)|0,e=e+Math.imul(x,ut)|0,r=(r=r+Math.imul(x,at)|0)+Math.imul(M,ut)|0,s=s+Math.imul(M,at)|0,e=e+Math.imul(w,ct)|0,r=(r=r+Math.imul(w,lt)|0)+Math.imul(p,ct)|0,s=s+Math.imul(p,lt)|0;var Tt=(a+(e=e+Math.imul(m,vt)|0)|0)+((8191&(r=(r=r+Math.imul(m,yt)|0)+Math.imul(b,vt)|0))<<13)|0;a=((s=s+Math.imul(b,yt)|0)+(r>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,e=Math.imul(E,q),r=(r=Math.imul(E,J))+Math.imul(N,q)|0,s=Math.imul(N,J),e=e+Math.imul(_,$)|0,r=(r=r+Math.imul(_,tt)|0)+Math.imul(R,$)|0,s=s+Math.imul(R,tt)|0,e=e+Math.imul(O,nt)|0,r=(r=r+Math.imul(O,et)|0)+Math.imul(P,nt)|0,s=s+Math.imul(P,et)|0,e=e+Math.imul(B,st)|0,r=(r=r+Math.imul(B,ot)|0)+Math.imul(L,st)|0,s=s+Math.imul(L,ot)|0,e=e+Math.imul(F,ut)|0,r=(r=r+Math.imul(F,at)|0)+Math.imul(T,ut)|0,s=s+Math.imul(T,at)|0,e=e+Math.imul(x,ct)|0,r=(r=r+Math.imul(x,lt)|0)+Math.imul(M,ct)|0,s=s+Math.imul(M,lt)|0;var Ct=(a+(e=e+Math.imul(w,vt)|0)|0)+((8191&(r=(r=r+Math.imul(w,yt)|0)+Math.imul(p,vt)|0))<<13)|0;a=((s=s+Math.imul(p,yt)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,e=Math.imul(E,$),r=(r=Math.imul(E,tt))+Math.imul(N,$)|0,s=Math.imul(N,tt),e=e+Math.imul(_,nt)|0,r=(r=r+Math.imul(_,et)|0)+Math.imul(R,nt)|0,s=s+Math.imul(R,et)|0,e=e+Math.imul(O,st)|0,r=(r=r+Math.imul(O,ot)|0)+Math.imul(P,st)|0,s=s+Math.imul(P,ot)|0,e=e+Math.imul(B,ut)|0,r=(r=r+Math.imul(B,at)|0)+Math.imul(L,ut)|0,s=s+Math.imul(L,at)|0,e=e+Math.imul(F,ct)|0,r=(r=r+Math.imul(F,lt)|0)+Math.imul(T,ct)|0,s=s+Math.imul(T,lt)|0;var Bt=(a+(e=e+Math.imul(x,vt)|0)|0)+((8191&(r=(r=r+Math.imul(x,yt)|0)+Math.imul(M,vt)|0))<<13)|0;a=((s=s+Math.imul(M,yt)|0)+(r>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,e=Math.imul(E,nt),r=(r=Math.imul(E,et))+Math.imul(N,nt)|0,s=Math.imul(N,et),e=e+Math.imul(_,st)|0,r=(r=r+Math.imul(_,ot)|0)+Math.imul(R,st)|0,s=s+Math.imul(R,ot)|0,e=e+Math.imul(O,ut)|0,r=(r=r+Math.imul(O,at)|0)+Math.imul(P,ut)|0,s=s+Math.imul(P,at)|0,e=e+Math.imul(B,ct)|0,r=(r=r+Math.imul(B,lt)|0)+Math.imul(L,ct)|0,s=s+Math.imul(L,lt)|0;var Lt=(a+(e=e+Math.imul(F,vt)|0)|0)+((8191&(r=(r=r+Math.imul(F,yt)|0)+Math.imul(T,vt)|0))<<13)|0;a=((s=s+Math.imul(T,yt)|0)+(r>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,e=Math.imul(E,st),r=(r=Math.imul(E,ot))+Math.imul(N,st)|0,s=Math.imul(N,ot),e=e+Math.imul(_,ut)|0,r=(r=r+Math.imul(_,at)|0)+Math.imul(R,ut)|0,s=s+Math.imul(R,at)|0,e=e+Math.imul(O,ct)|0,r=(r=r+Math.imul(O,lt)|0)+Math.imul(P,ct)|0,s=s+Math.imul(P,lt)|0;var It=(a+(e=e+Math.imul(B,vt)|0)|0)+((8191&(r=(r=r+Math.imul(B,yt)|0)+Math.imul(L,vt)|0))<<13)|0;a=((s=s+Math.imul(L,yt)|0)+(r>>>13)|0)+(It>>>26)|0,It&=67108863,e=Math.imul(E,ut),r=(r=Math.imul(E,at))+Math.imul(N,ut)|0,s=Math.imul(N,at),e=e+Math.imul(_,ct)|0,r=(r=r+Math.imul(_,lt)|0)+Math.imul(R,ct)|0,s=s+Math.imul(R,lt)|0;var Ot=(a+(e=e+Math.imul(O,vt)|0)|0)+((8191&(r=(r=r+Math.imul(O,yt)|0)+Math.imul(P,vt)|0))<<13)|0;a=((s=s+Math.imul(P,yt)|0)+(r>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,e=Math.imul(E,ct),r=(r=Math.imul(E,lt))+Math.imul(N,ct)|0,s=Math.imul(N,lt);var Pt=(a+(e=e+Math.imul(_,vt)|0)|0)+((8191&(r=(r=r+Math.imul(_,yt)|0)+Math.imul(R,vt)|0))<<13)|0;a=((s=s+Math.imul(R,yt)|0)+(r>>>13)|0)+(Pt>>>26)|0,Pt&=67108863;var Dt=(a+(e=Math.imul(E,vt))|0)+((8191&(r=(r=Math.imul(E,yt))+Math.imul(N,vt)|0))<<13)|0;return a=((s=Math.imul(N,yt))+(r>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,u[0]=St,u[1]=mt,u[2]=bt,u[3]=gt,u[4]=wt,u[5]=pt,u[6]=kt,u[7]=xt,u[8]=Mt,u[9]=At,u[10]=Ft,u[11]=Tt,u[12]=Ct,u[13]=Bt,u[14]=Lt,u[15]=It,u[16]=Ot,u[17]=Pt,u[18]=Dt,0!==a&&(u[19]=a,n.length++),n};function y(t,i,n){n.negative=i.negative^t.negative,n.length=t.length+i.length;for(var e=0,r=0,s=0;s>>26)|0)>>>26,o&=67108863}n.words[s]=h,e=o,o=r}return 0!==e?n.words[s]=e:n.length--,n.zR()}function S(t,i,n){return y(t,i,n)}Math.imul||(v=d),r.prototype.mulTo=function(t,i){var n=this.length+t.length;return 10===this.length&&10===t.length?v(this,t,i):n<63?d(this,t,i):n<1024?y(this,t,i):S(this,t,i)},r.prototype.mul=function(t){var i=new r(null);return i.words=new Array(this.length+t.length),this.mulTo(t,i)},r.prototype.mulf=function(t){var i=new r(null);return i.words=new Array(this.length+t.length),S(this,t,i)},r.prototype.imul=function(t){return this.clone().mulTo(t,this)},r.prototype.imuln=function(t){var i=t<0;i&&(t=-t),n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r>=26,e+=s/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),i?this.ineg():this},r.prototype.muln=function(t){return this.clone().imuln(t)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(t){var i=function(t){for(var i=new Array(t.bitLength()),n=0;n>>r&1}return i}(t);if(0===i.length)return new r(1);for(var n=this,e=0;e=0);var i,e=t%26,r=(t-e)/26,s=67108863>>>26-e<<26-e;if(0!==e){var o=0;for(i=0;i>>26-e}o&&(this.words[i]=o,this.length++)}if(0!==r){for(i=this.length-1;i>=0;i--)this.words[i+r]=this.words[i];for(i=0;i=0),r=i?(i-i%26)/26:0;var s=t%26,o=Math.min((t-s)/26,this.length),h=67108863^67108863>>>s<o)for(this.length-=o,a=0;a=0&&(0!==f||a>=r);a--){var c=0|this.words[a];this.words[a]=f<<26-s|c>>>s,f=c&h}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.zR()},r.prototype.ishrn=function(t,i,e){return n(0===this.negative),this.iushrn(t,i,e)},r.prototype.shln=function(t){return this.clone().ishln(t)},r.prototype.ushln=function(t){return this.clone().iushln(t)},r.prototype.shrn=function(t){return this.clone().ishrn(t)},r.prototype.ushrn=function(t){return this.clone().iushrn(t)},r.prototype.testn=function(t){n("number"==typeof t&&t>=0);var i=t%26,e=(t-i)/26,r=1<=0);var i=t%26,e=(t-i)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=e)return this;if(0!==i&&e++,this.length=Math.min(e,this.length),0!==i){var r=67108863^67108863>>>i<=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},r.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i>26)-(u/67108864|0),this.words[r+e]=67108863&s}for(;r>26,this.words[r+e]=67108863&s;if(0===h)return this.zR();for(n(-1===h),h=0,r=0;r>26,this.words[r]=67108863&s;return this.negative=1,this.zR()},r.prototype.XR=function(t,i){var n=(this.length,t.length),e=this.clone(),s=t,o=0|s.words[s.length-1];0!=(n=26-this.WR(o))&&(s=s.ushln(n),e.iushln(n),o=0|s.words[s.length-1]);var h,u=e.length-s.length;if("mod"!==i){(h=new r(null)).length=u+1,h.words=new Array(h.length);for(var a=0;a=0;c--){var l=67108864*(0|e.words[s.length+c])+(0|e.words[s.length+c-1]);for(l=Math.min(l/o|0,67108863),e.YR(s,l,c);0!==e.negative;)l--,e.negative=0,e.YR(s,1,c),e.isZero()||(e.negative^=1);h&&(h.words[c]=l)}return h&&h.zR(),e.zR(),"div"!==i&&0!==n&&e.iushrn(n),{div:h||null,mod:e}},r.prototype.divmod=function(t,i,e){return n(!t.isZero()),this.isZero()?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,i),"mod"!==i&&(s=h.div.neg()),"div"!==i&&(o=h.mod.neg(),e&&0!==o.negative&&o.iadd(t)),{div:s,mod:o}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),i),"mod"!==i&&(s=h.div.neg()),{div:s,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),i),"div"!==i&&(o=h.mod.neg(),e&&0!==o.negative&&o.isub(t)),{div:h.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new r(0),mod:this}:1===t.length?"div"===i?{div:this.divn(t.words[0]),mod:null}:"mod"===i?{div:null,mod:new r(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new r(this.modrn(t.words[0]))}:this.XR(t,i);var s,o,h},r.prototype.div=function(t){return this.divmod(t,"div",!1).div},r.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},r.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},r.prototype.divRound=function(t){var i=this.divmod(t);if(i.mod.isZero())return i.div;var n=0!==i.div.negative?i.mod.isub(t):i.mod,e=t.ushrn(1),r=t.andln(1),s=n.cmp(e);return s<0||1===r&&0===s?i.div:0!==i.div.negative?i.div.isubn(1):i.div.iaddn(1)},r.prototype.modrn=function(t){var i=t<0;i&&(t=-t),n(t<=67108863);for(var e=(1<<26)%t,r=0,s=this.length-1;s>=0;s--)r=(e*r+(0|this.words[s]))%t;return i?-r:r},r.prototype.modn=function(t){return this.modrn(t)},r.prototype.idivn=function(t){var i=t<0;i&&(t=-t),n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var s=(0|this.words[r])+67108864*e;this.words[r]=s/t|0,e=s%t}return this.zR(),i?this.ineg():this},r.prototype.divn=function(t){return this.clone().idivn(t)},r.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var i=this,e=t.clone();i=0!==i.negative?i.umod(t):i.clone();for(var s=new r(1),o=new r(0),h=new r(0),u=new r(1),a=0;i.isEven()&&e.isEven();)i.iushrn(1),e.iushrn(1),++a;for(var f=e.clone(),c=i.clone();!i.isZero();){for(var l=0,d=1;0==(i.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(i.iushrn(l);l-- >0;)(s.isOdd()||o.isOdd())&&(s.iadd(f),o.isub(c)),s.iushrn(1),o.iushrn(1);for(var v=0,y=1;0==(e.words[0]&y)&&v<26;++v,y<<=1);if(v>0)for(e.iushrn(v);v-- >0;)(h.isOdd()||u.isOdd())&&(h.iadd(f),u.isub(c)),h.iushrn(1),u.iushrn(1);i.cmp(e)>=0?(i.isub(e),s.isub(h),o.isub(u)):(e.isub(i),h.isub(s),u.isub(o))}return{a:h,b:u,gcd:e.iushln(a)}},r.prototype.ZR=function(t){n(0===t.negative),n(!t.isZero());var i=this,e=t.clone();i=0!==i.negative?i.umod(t):i.clone();for(var s,o=new r(1),h=new r(0),u=e.clone();i.cmpn(1)>0&&e.cmpn(1)>0;){for(var a=0,f=1;0==(i.words[0]&f)&&a<26;++a,f<<=1);if(a>0)for(i.iushrn(a);a-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)h.isOdd()&&h.iadd(u),h.iushrn(1);i.cmp(e)>=0?(i.isub(e),o.isub(h)):(e.isub(i),h.isub(o))}return(s=0===i.cmpn(1)?o:h).cmpn(0)<0&&s.iadd(t),s},r.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var i=this.clone(),n=t.clone();i.negative=0,n.negative=0;for(var e=0;i.isEven()&&n.isEven();e++)i.iushrn(1),n.iushrn(1);for(;;){for(;i.isEven();)i.iushrn(1);for(;n.isEven();)n.iushrn(1);var r=i.cmp(n);if(r<0){var s=i;i=n,n=s}else if(0===r||0===n.cmpn(1))break;i.isub(n)}return n.iushln(e)},r.prototype.invm=function(t){return this.egcd(t).a.umod(t)},r.prototype.isEven=function(){return 0==(1&this.words[0])},r.prototype.isOdd=function(){return 1==(1&this.words[0])},r.prototype.andln=function(t){return this.words[0]&t},r.prototype.bincn=function(t){n("number"==typeof t);var i=t%26,e=(t-i)/26,r=1<>>26,h&=67108863,this.words[o]=h}return 0!==s&&(this.words[o]=s,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(t){var i,e=t<0;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;if(this.zR(),this.length>1)i=1;else{e&&(t=-t),n(t<=67108863,"Number is too big");var r=0|this.words[0];i=r===t?0:rt.length)return 1;if(this.length=0;n--){var e=0|this.words[n],r=0|t.words[n];if(e!==r){er&&(i=1);break}}return i},r.prototype.gtn=function(t){return 1===this.cmpn(t)},r.prototype.gt=function(t){return 1===this.cmp(t)},r.prototype.gten=function(t){return this.cmpn(t)>=0},r.prototype.gte=function(t){return this.cmp(t)>=0},r.prototype.ltn=function(t){return-1===this.cmpn(t)},r.prototype.lt=function(t){return-1===this.cmp(t)},r.prototype.lten=function(t){return this.cmpn(t)<=0},r.prototype.lte=function(t){return this.cmp(t)<=0},r.prototype.eqn=function(t){return 0===this.cmpn(t)},r.prototype.eq=function(t){return 0===this.cmp(t)},r.red=function(t){return new x(t)},r.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this).KR(t)},r.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype.KR=function(t){return this.red=t,this},r.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this.KR(t)},r.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},r.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},r.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},r.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},r.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},r.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red.qR(this,t),this.red.mul(this,t)},r.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red.qR(this,t),this.red.imul(this,t)},r.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red.JR(this),this.red.sqr(this)},r.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red.JR(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red.JR(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red.JR(this),this.red.invm(this)},r.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red.JR(this),this.red.neg(this)},r.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red.JR(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};function b(t,i){this.name=t,this.p=new r(i,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this.QR()}function g(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function p(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"==typeof t){var i=r.$R(t);this.m=i.p,this.prime=i}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r.ZR(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype.QR=function(){var t=new r(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var i,n=t;do{this.split(n,this.tmp),i=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(i>this.n);var e=i0?n.isub(this.p):void 0!==n.strip?n.strip():n.zR(),n},b.prototype.split=function(t,i){t.iushrn(this.n,0,i)},b.prototype.imulK=function(t){return t.imul(this.k)},e(g,b),g.prototype.split=function(t,i){for(var n=4194303,e=Math.min(t.length,9),r=0;r>>22,s=o}s>>>=22,t.words[r-10]=s,0===s&&t.length>10?t.length-=10:t.length-=9},g.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var i=0,n=0;n>>=26,t.words[n]=r,i=e}return 0!==i&&(t.words[t.length++]=i),t},r.$R=function(t){if(m[t])return m[t];var i;if("k256"===t)i=new g;else if("p224"===t)i=new w;else if("p192"===t)i=new p;else{if("p25519"!==t)throw new Error("Unknown prime "+t);i=new k}return m[t]=i,i},x.prototype.JR=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},x.prototype.qR=function(t,i){n(0==(t.negative|i.negative),"red works only with positives"),n(t.red&&t.red===i.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t).KR(this):(u(t,t.umod(this.m).KR(this)),t)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t).KR(this)},x.prototype.add=function(t,i){this.qR(t,i);var n=t.add(i);return n.cmp(this.m)>=0&&n.isub(this.m),n.KR(this)},x.prototype.iadd=function(t,i){this.qR(t,i);var n=t.iadd(i);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(t,i){this.qR(t,i);var n=t.sub(i);return n.cmpn(0)<0&&n.iadd(this.m),n.KR(this)},x.prototype.isub=function(t,i){this.qR(t,i);var n=t.isub(i);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(t,i){return this.JR(t),this.imod(t.ushln(i))},x.prototype.imul=function(t,i){return this.qR(t,i),this.imod(t.imul(i))},x.prototype.mul=function(t,i){return this.qR(t,i),this.imod(t.mul(i))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var i=this.m.andln(3);if(n(i%2==1),3===i){var e=this.m.add(new r(1)).iushrn(2);return this.pow(t,e)}for(var s=this.m.subn(1),o=0;!s.isZero()&&0===s.andln(1);)o++,s.iushrn(1);n(!s.isZero());var h=new r(1).toRed(this),u=h.redNeg(),a=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new r(2*f*f).toRed(this);0!==this.pow(f,a).cmp(u);)f.redIAdd(u);for(var c=this.pow(f,s),l=this.pow(t,s.addn(1).iushrn(1)),d=this.pow(t,s),v=o;0!==d.cmp(h);){for(var y=d,S=0;0!==y.cmp(h);S++)y=y.redSqr();n(S=0;e--){for(var a=i.words[e],f=u-1;f>=0;f--){var c=a>>f&1;s!==n[0]&&(s=this.sqr(s)),0!==c||0!==o?(o<<=1,o|=c,(4==++h||0===e&&0===f)&&(s=this.mul(s,n[o]),h=0,o=0)):h=0}u=26}return s},x.prototype.convertTo=function(t){var i=t.umod(this.m);return i===t?i.clone():i},x.prototype.convertFrom=function(t){var i=t.clone();return i.red=null,i},r.mont=function(t){return new A(t)},e(A,x),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var i=this.imod(t.mul(this.rinv));return i.red=null,i},A.prototype.imul=function(t,i){if(t.isZero()||i.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(i),e=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(e).iushrn(this.shift),s=r;return r.cmp(this.m)>=0?s=r.isub(this.m):r.cmpn(0)<0&&(s=r.iadd(this.m)),s.KR(this)},A.prototype.mul=function(t,i){if(t.isZero()||i.isZero())return new r(0).KR(this);var n=t.mul(i),e=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(e).iushrn(this.shift),o=s;return s.cmp(this.m)>=0?o=s.isub(this.m):s.cmpn(0)<0&&(o=s.iadd(this.m)),o.KR(this)},A.prototype.invm=function(t){return this.imod(t.ZR(this.m).mul(this.r2)).KR(this)}})(HK,BZ);var jK=HK.exports;function WK(t,i){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"!=typeof t){for(var e=0;e>8,o=255&r;s?n.push(s,o):n.push(o)}return n}var UK,YK,XK=function(t,i,n){var e=new Array(Math.max(t.bitLength(),n)+1);e.fill(0);for(var r=1<(r>>1)-1?(r>>1)-u:u,s.isubn(h)):h=0,e[o]=h,s.iushrn(1)}return e},ZK=function(t,i){var n=[[],[]];t=t.clone(),i=i.clone();for(var e=0,r=0;t.cmpn(-e)>0||i.cmpn(-r)>0;){var s=t.andln(3)+e&3,o=i.andln(3)+r&3;3===s&&(s=-1),3===o&&(o=-1);var h=void 0;if(0==(1&s))h=0;else h=3!==(u=t.andln(7)+e&7)&&5!==u||2!==o?s:-s;n[0].push(h);var u,a=void 0;if(0==(1&o))a=0;else a=3!==(u=i.andln(7)+r&7)&&5!==u||2!==s?o:-o;n[1].push(a),2*e===h+1&&(e=1-e),2*r===a+1&&(r=1-r),t.iushrn(1),i.iushrn(1)}return n},KK=function(){function t(t,i){this.type=t,this.p=new jK(i.p,16),this.red=i.prime?jK.red(i.prime):jK.mont(this.p),this.zero=new jK(0).toRed(this.red),this.one=new jK(1).toRed(this.red),this.two=new jK(2).toRed(this.red),this.n=i.n&&new jK(i.n,16),this.g=i.g&&this.pointFromJSON(i.g,i.gRed),this.tz=new Array(4),this.iz=new Array(4),this.nz=new Array(4),this.ez=new Array(4),this.rz=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this.sz=!0,this.redN=this.n.toRed(this.red))}return t.prototype.oz=function(t,i){var n=t.hz(),e=XK(i,1,this.rz),r=(1<=o;u--)h=(h<<1)+e[u];s.push(h)}for(var a=this.jpoint(null,null,null),f=this.jpoint(null,null,null),c=r;c>0;c--){for(o=0;o=0;h--){for(;h>=0&&0===s[h];h--)0;if(h>=0&&i++,o=o.dblp(i),h<0)break;var u=s[h];o="affine"===t.type?u>0?o.mixedAdd(r[u-1>>1]):o.mixedAdd(r[-u-1>>1].neg()):u>0?o.add(r[u-1>>1]):o.add(r[-u-1>>1].neg())}return"affine"===t.type?o.toP():o},t.prototype.fz=function(t,i,n,e,r){for(var s=this.tz,o=this.iz,h=this.nz,u=0,a=0;a=1;a-=2){var c=a-1,l=a;if(1===s[c]&&1===s[l]){var d=[i[c],null,null,i[l]];0===i[c].y.cmp(i[l].y)?(d[1]=i[c].add(i[l]),d[2]=i[c].toJ().mixedAdd(i[l].neg())):0===i[c].y.cmp(i[l].y.redNeg())?(d[1]=i[c].toJ().mixedAdd(i[l]),d[2]=i[c].add(i[l].neg())):(d[1]=i[c].toJ().mixedAdd(i[l]),d[2]=i[c].toJ().mixedAdd(i[l].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],y=ZK(n[c],n[l]);u=Math.max(y[0].length,u),h[c]=new Array(u),h[l]=new Array(u);for(var S=0;S=0;a--){for(var p=0;a>=0;){var k=!0;for(S=0;S=0&&p++,g=g.dblp(p),a<0)break;for(S=0;S0?M=o[S][x-1>>1]:x<0&&(M=o[S][-x-1>>1].neg()),g="affine"===M.type?g.mixedAdd(M):g.add(M))}}for(a=0;a=Math.ceil((t.bitLength()+1)/i.step)},t.prototype.hz=function(t,i){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],e=this,r=0;r=0&&(s=i,o=n),e.negative&&(e=e.neg(),r=r.neg()),s.negative&&(s=s.neg(),o=o.neg()),[{a:e,b:r},{a:s,b:o}]},i.prototype.gz=function(t){var i=this.endo.basis,n=i[0],e=i[1],r=e.b.mul(t).divRound(this.n),s=n.b.neg().mul(t).divRound(this.n),o=r.mul(n.a),h=s.mul(e.a),u=r.mul(n.b),a=s.mul(e.b);return{k1:t.sub(o).sub(h),k2:u.add(a).neg()}},i.prototype.point=function(t,i,n){return new QK(this,t,i,n)},i.prototype.pointFromX=function(t,i){(t=new jK(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),e=n.redSqrt();if(0!==e.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var r=e.fromRed().isOdd();return(i&&!r||!i&&r)&&(e=e.redNeg()),this.point(t,e)},i.prototype.validate=function(t){if(t.inf)return!0;var i=t.x,n=t.y,e=this.a.redMul(i),r=i.redSqr().redMul(i).redIAdd(e).redIAdd(this.b);return 0===n.redSqr().redISub(r).cmpn(0)},i.prototype.wz=function(t,i,n){var e=this.yz,r=this.Sz,s=0;for(s=0;s":""},i.prototype.isInfinity=function(){return this.inf},i.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var i=this.y.redSub(t.y);0!==i.cmpn(0)&&(i=i.redMul(this.x.redSub(t.x).redInvm()));var n=i.redSqr().redISub(this.x).redISub(t.x),e=i.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,e)},i.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var i=this.curve.a,n=this.x.redSqr(),e=t.redInvm(),r=n.redAdd(n).redIAdd(n).redIAdd(i).redMul(e),s=r.redSqr().redISub(this.x.redAdd(this.x)),o=r.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)},i.prototype.getX=function(){return this.x.fromRed()},i.prototype.getY=function(){return this.y.fromRed()},i.prototype.mul=function(t){return t=new jK(t,16),this.isInfinity()?this:this.dz(t)?this.curve.oz(this,t):this.curve.endo?this.curve.wz([this],[t]):this.curve.uz(this,t)},i.prototype.mulAdd=function(t,i,n){var e=[this,i],r=[t,n];return this.curve.endo?this.curve.wz(e,r):this.curve.fz(1,e,r,2)},i.prototype.jmulAdd=function(t,i,n){var e=[this,i],r=[t,n];return this.curve.endo?this.curve.wz(e,r,!0):this.curve.fz(1,e,r,2,!0)},i.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},i.prototype.neg=function(t){if(this.inf)return this;var i=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var n=this.precomputed,e=function(t){return t.neg()};i.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(e)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(e)}}}return i},i.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},i}(qK),$K=function(t){function i(i,n,e,r){var s=t.call(this,i,"jacobian")||this;return null===n&&null===e&&null===r?(s.x=s.curve.one,s.y=s.curve.one,s.z=new jK(0)):(s.x=new jK(n,16),s.y=new jK(e,16),s.z=new jK(r,16)),s.x.red||(s.x=s.x.toRed(s.curve.red)),s.y.red||(s.y=s.y.toRed(s.curve.red)),s.z.red||(s.z=s.z.toRed(s.curve.red)),s.zOne=s.z===s.curve.one,s}return n(i,t),i.prototype.getY=function(){throw new Error("Method not implemented.")},i.prototype.getX=function(){throw new Error("Method not implemented.")},i.prototype.pointFromX=function(t,i){throw new Error("Method not implemented.")},i.prototype.point=function(t,i,n){throw new Error("Method not implemented.")},i.prototype.jpoint=function(t,n,e){return new i(this,t,n,e)},i.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),i=t.redSqr(),n=this.x.redMul(i),e=this.y.redMul(i).redMul(t);return this.curve.point(n,e)},i.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},i.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var i=t.z.redSqr(),n=this.z.redSqr(),e=this.x.redMul(i),r=t.x.redMul(n),s=this.y.redMul(i.redMul(t.z)),o=t.y.redMul(n.redMul(this.z)),h=e.redSub(r),u=s.redSub(o);if(0===h.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var a=h.redSqr(),f=a.redMul(h),c=e.redMul(a),l=u.redSqr().redIAdd(f).redISub(c).redISub(c),d=u.redMul(c.redISub(l)).redISub(s.redMul(f)),v=this.z.redMul(t.z).redMul(h);return this.curve.jpoint(l,d,v)},i.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var i=this.z.redSqr(),n=this.x,e=t.x.redMul(i),r=this.y,s=t.y.redMul(i).redMul(this.z),o=n.redSub(e),h=r.redSub(s);if(0===o.cmpn(0))return 0!==h.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=o.redSqr(),a=u.redMul(o),f=n.redMul(u),c=h.redSqr().redIAdd(a).redISub(f).redISub(f),l=h.redMul(f.redISub(c)).redISub(r.redMul(a)),d=this.z.redMul(o);return this.curve.jpoint(c,l,d)},i.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var i=this,n=0;n=0)return!1;if(n.redIAdd(r),0===this.x.cmp(n))return!0}},i.prototype.inspect=function(){return this.isInfinity()?"":""},i.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},i}(qK),tq=function(t){this.curve=new JK(t),this.g=this.curve.g,this.n=this.curve.n},iq={};iq.PresetCurve=tq,UK="secp256k1",YK={type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",{doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}]},Object.defineProperty(iq,UK,{configurable:!0,enumerable:!0,get:function(){var t=new tq(YK);return Object.defineProperty(iq,UK,{configurable:!0,enumerable:!0,value:t}),t}});var nq=function(){function t(t,i){this.ec=t,this.priv=null,this.pub=null,i.pub&&this.Mz(i.pub,i.pubEnc)}return t.fromPublic=function(i,n,e){return n instanceof t?n:new t(i,{pub:n,pubEnc:e})},t.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},t.prototype.getPublic=function(t,i){return"string"==typeof t&&(i=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),i?this.pub.encode(i,t):this.pub},t.prototype.Mz=function(t,i){if(t.x||t.y)return"mont"===this.ec.curve.type||"short"===this.ec.curve.type||this.ec.curve.type,void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,i)},t.prototype.verify=function(t,i){return this.ec.verify(t,i,this)},t}();function eq(t,i){var n=t[i.place++];if(!(128&n))return n;var e=15&n;if(0===e||e>4)return!1;for(var r=0,s=i.place,o=0;o>>=0;return!(r<=127)&&(i.place=s,r)}var rq=function(){this.place=0},sq=function(){function t(i,n){if(i instanceof t)return i;this.Az(i,n)||(this.r=new jK(i.r,16),this.s=new jK(i.s,16),void 0===i.recoveryParam?this.recoveryParam=null:this.recoveryParam=i.recoveryParam)}return t.prototype.Az=function(t,i){t=WK(t,i);var n=new rq;if(48!==t[n.place++])return!1;var e=eq(t,n);if(!1===e)return!1;if(e+n.place!==t.length)return!1;if(2!==t[n.place++])return!1;var r=eq(t,n);if(!1===r)return!1;var s=t.slice(n.place,r+n.place);if(n.place+=r,2!==t[n.place++])return!1;var o=eq(t,n);if(!1===o)return!1;if(t.length!==o+n.place)return!1;var h=t.slice(n.place,o+n.place);if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}return this.r=new jK(s),this.s=new jK(h),this.recoveryParam=null,!0},t}(),oq=function(){function t(i){if(!(this instanceof t))return new t(i);"string"==typeof i&&(i=iq[i]),i instanceof iq.PresetCurve&&(i={curve:i}),this.curve=i.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=i.curve.g,this.g.precompute(i.curve.n.bitLength()+1)}return t.prototype.keyFromPublic=function(t,i){return nq.fromPublic(this,t,i)},t.prototype.Fz=function(t,i){var n=8*t.byteLength()-this.n.bitLength();return n>0&&(t=t.ushrn(n)),!i&&t.cmp(this.n)>=0?t.sub(this.n):t},t.prototype.verify=function(t,i,n,e){t=this.Fz(new jK(t,16)),n=this.keyFromPublic(n,e);var r=(i=new sq(i,"hex")).r,s=i.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),h=o.mul(t).umod(this.n),u=o.mul(r).umod(this.n);if(!this.curve.sz){var a=this.g.mulAdd(h,n.getPublic(),u);return!a.isInfinity()&&0===a.getX().umod(this.n).cmp(r)}var f=this.g.jmulAdd(h,n.getPublic(),u);return!f.isInfinity()&&f.eqXToP(r)},t}(),hq={exports:{}},uq={exports:{}};!function(t,i){var n;t.exports=n=n||function(t,i){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==BZ&&BZ.crypto&&(n=BZ.crypto),!n)try{n=i}catch(t){}var e=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},r=Object.create||function(){function t(){}return function(i){var n;return t.prototype=i,n=new t,t.prototype=null,n}}(),s={},o=s.lib={},h=o.Base={extend:function(t){var i=r(this);return t&&i.mixIn(t),i.hasOwnProperty("init")&&this.init!==i.init||(i.init=function(){i.$super.init.apply(this,arguments)}),i.init.prototype=i,i.$super=this,i},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var i in t)t.hasOwnProperty(i)&&(this[i]=t[i]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},u=o.WordArray=h.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=i?n:4*t.length},toString:function(t){return(t||f).stringify(this)},concat:function(t){var i=this.words,n=t.words,e=this.sigBytes,r=t.sigBytes;if(this.clamp(),e%4)for(var s=0;s>>2]>>>24-s%4*8&255;i[e+s>>>2]|=o<<24-(e+s)%4*8}else for(s=0;s>>2]=n[s>>>2];return this.sigBytes+=r,this},clamp:function(){var i=this.words,n=this.sigBytes;i[n>>>2]&=4294967295<<32-n%4*8,i.length=t.ceil(n/4)},clone:function(){var t=h.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var i=[],n=0;n>>2]>>>24-r%4*8&255;e.push((s>>>4).toString(16)),e.push((15&s).toString(16))}return e.join("")},parse:function(t){for(var i=t.length,n=[],e=0;e>>3]|=parseInt(t.substr(e,2),16)<<24-e%8*4;return new u.init(n,i/2)}},c=a.Latin1={stringify:function(t){for(var i=t.words,n=t.sigBytes,e=[],r=0;r>>2]>>>24-r%4*8&255;e.push(String.fromCharCode(s))}return e.join("")},parse:function(t){for(var i=t.length,n=[],e=0;e>>2]|=(255&t.charCodeAt(e))<<24-e%4*8;return new u.init(n,i)}},l=a.Utf8={stringify:function(t){try{return decodeURIComponent(escape(c.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return c.parse(unescape(encodeURIComponent(t)))}},d=o.BufferedBlockAlgorithm=h.extend({reset:function(){this.xA=new u.init,this.Tz=0},Cz:function(t){"string"==typeof t&&(t=l.parse(t)),this.xA.concat(t),this.Tz+=t.sigBytes},Bz:function(i){var n,e=this.xA,r=e.words,s=e.sigBytes,o=this.blockSize,h=s/(4*o),a=(h=i?t.ceil(h):t.max((0|h)-this.Lz,0))*o,f=t.min(4*a,s);if(a){for(var c=0;c>>7)^(v<<14|v>>>18)^v>>>3,S=a[d-2],m=(S<<15|S>>>17)^(S<<13|S>>>19)^S>>>10;a[d]=y+a[d-7]+m+a[d-16]}var b=e&r^e&s^r&s,g=(e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22),w=l+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&f^~h&c)+u[d]+a[d];l=c,c=f,f=h,h=o+w|0,o=s,s=r,r=e,e=w+(g+b)|0}n[0]=n[0]+e|0,n[1]=n[1]+r|0,n[2]=n[2]+s|0,n[3]=n[3]+o|0,n[4]=n[4]+h|0,n[5]=n[5]+f|0,n[6]=n[6]+c|0,n[7]=n[7]+l|0},Pz:function(){var i=this.xA,n=i.words,e=8*this.Tz,r=8*i.sigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=t.floor(e/4294967296),n[15+(r+64>>>9<<4)]=e,i.sigBytes=4*n.length,this.Bz(),this.Rz},clone:function(){var t=s.clone.call(this);return t.Rz=this.Rz.clone(),t}});i.SHA256=s.Dz(f),i.HmacSHA256=s._z(f)}(Math),n.SHA256)}(aq);var fq=aq.exports;!function(t,i){var n,e,r,s,o,h;t.exports=(e=(n=h=uq.exports).lib.WordArray,r=n.algo,s=r.SHA256,o=r.SHA224=s.extend({Oz:function(){this.Rz=new e.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},Pz:function(){var t=s.Pz.call(this);return t.sigBytes-=4,t}}),n.SHA224=s.Dz(o),n.HmacSHA224=s._z(o),h.SHA224)}(hq);var cq=hq.exports,lq={exports:{}};!function(t,i){t.exports=uq.exports.enc.Hex}(lq);var dq=lq.exports,vq={exports:{}};!function(t,i){t.exports=uq.exports.enc.Utf8}(vq);var yq=vq.exports,Sq={exports:{}},mq={exports:{}};!function(t,i){var n;t.exports=(n=uq.exports,function(){var t=n,i=t.lib.WordArray;function e(t,n,e){for(var r=[],s=0,o=0;o>>6-o%4*2;r[s>>>2]|=h<<24-s%4*8,s++}return i.create(r,s)}t.enc.Base64={stringify:function(t){var i=t.words,n=t.sigBytes,e=this.ft;t.clamp();for(var r=[],s=0;s>>2]>>>24-s%4*8&255)<<16|(i[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|i[s+2>>>2]>>>24-(s+2)%4*8&255,h=0;h<4&&s+.75*h>>6*(3-h)&63));var u=e.charAt(64);if(u)for(;r.length%4;)r.push(u);return r.join("")},parse:function(t){var i=t.length,n=this.ft,r=this.zz;if(!r){r=this.zz=[];for(var s=0;s>>24)|4278255360&(r<<24|r>>>8)}var s=this.Rz.words,o=t[i+0],u=t[i+1],d=t[i+2],v=t[i+3],y=t[i+4],S=t[i+5],m=t[i+6],b=t[i+7],g=t[i+8],w=t[i+9],p=t[i+10],k=t[i+11],x=t[i+12],M=t[i+13],A=t[i+14],F=t[i+15],T=s[0],C=s[1],B=s[2],L=s[3];T=a(T,C,B,L,o,7,h[0]),L=a(L,T,C,B,u,12,h[1]),B=a(B,L,T,C,d,17,h[2]),C=a(C,B,L,T,v,22,h[3]),T=a(T,C,B,L,y,7,h[4]),L=a(L,T,C,B,S,12,h[5]),B=a(B,L,T,C,m,17,h[6]),C=a(C,B,L,T,b,22,h[7]),T=a(T,C,B,L,g,7,h[8]),L=a(L,T,C,B,w,12,h[9]),B=a(B,L,T,C,p,17,h[10]),C=a(C,B,L,T,k,22,h[11]),T=a(T,C,B,L,x,7,h[12]),L=a(L,T,C,B,M,12,h[13]),B=a(B,L,T,C,A,17,h[14]),T=f(T,C=a(C,B,L,T,F,22,h[15]),B,L,u,5,h[16]),L=f(L,T,C,B,m,9,h[17]),B=f(B,L,T,C,k,14,h[18]),C=f(C,B,L,T,o,20,h[19]),T=f(T,C,B,L,S,5,h[20]),L=f(L,T,C,B,p,9,h[21]),B=f(B,L,T,C,F,14,h[22]),C=f(C,B,L,T,y,20,h[23]),T=f(T,C,B,L,w,5,h[24]),L=f(L,T,C,B,A,9,h[25]),B=f(B,L,T,C,v,14,h[26]),C=f(C,B,L,T,g,20,h[27]),T=f(T,C,B,L,M,5,h[28]),L=f(L,T,C,B,d,9,h[29]),B=f(B,L,T,C,b,14,h[30]),T=c(T,C=f(C,B,L,T,x,20,h[31]),B,L,S,4,h[32]),L=c(L,T,C,B,g,11,h[33]),B=c(B,L,T,C,k,16,h[34]),C=c(C,B,L,T,A,23,h[35]),T=c(T,C,B,L,u,4,h[36]),L=c(L,T,C,B,y,11,h[37]),B=c(B,L,T,C,b,16,h[38]),C=c(C,B,L,T,p,23,h[39]),T=c(T,C,B,L,M,4,h[40]),L=c(L,T,C,B,o,11,h[41]),B=c(B,L,T,C,v,16,h[42]),C=c(C,B,L,T,m,23,h[43]),T=c(T,C,B,L,w,4,h[44]),L=c(L,T,C,B,x,11,h[45]),B=c(B,L,T,C,F,16,h[46]),T=l(T,C=c(C,B,L,T,d,23,h[47]),B,L,o,6,h[48]),L=l(L,T,C,B,b,10,h[49]),B=l(B,L,T,C,A,15,h[50]),C=l(C,B,L,T,S,21,h[51]),T=l(T,C,B,L,x,6,h[52]),L=l(L,T,C,B,v,10,h[53]),B=l(B,L,T,C,p,15,h[54]),C=l(C,B,L,T,u,21,h[55]),T=l(T,C,B,L,g,6,h[56]),L=l(L,T,C,B,F,10,h[57]),B=l(B,L,T,C,m,15,h[58]),C=l(C,B,L,T,M,21,h[59]),T=l(T,C,B,L,y,6,h[60]),L=l(L,T,C,B,k,10,h[61]),B=l(B,L,T,C,d,15,h[62]),C=l(C,B,L,T,w,21,h[63]),s[0]=s[0]+T|0,s[1]=s[1]+C|0,s[2]=s[2]+B|0,s[3]=s[3]+L|0},Pz:function(){var i=this.xA,n=i.words,e=8*this.Tz,r=8*i.sigBytes;n[r>>>5]|=128<<24-r%32;var s=t.floor(e/4294967296),o=e;n[15+(r+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),n[14+(r+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),i.sigBytes=4*(n.length+1),this.Bz();for(var h=this.Rz,u=h.words,a=0;a<4;a++){var f=u[a];u[a]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return h},clone:function(){var t=s.clone.call(this);return t.Rz=this.Rz.clone(),t}});function a(t,i,n,e,r,s,o){var h=t+(i&n|~i&e)+r+o;return(h<>>32-s)+i}function f(t,i,n,e,r,s,o){var h=t+(i&e|n&~e)+r+o;return(h<>>32-s)+i}function c(t,i,n,e,r,s,o){var h=t+(i^n^e)+r+o;return(h<>>32-s)+i}function l(t,i,n,e,r,s,o){var h=t+(n^(i|~e))+r+o;return(h<>>32-s)+i}i.MD5=s.Dz(u),i.HmacMD5=s._z(u)}(Math),n.MD5)}(bq);var gq={exports:{}},wq={exports:{}};!function(t,i){var n,e,r,s,o,h,u,a;t.exports=(e=(n=a=uq.exports).lib,r=e.WordArray,s=e.Hasher,o=n.algo,h=[],u=o.SHA1=s.extend({Oz:function(){this.Rz=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},Iz:function(t,i){for(var n=this.Rz.words,e=n[0],r=n[1],s=n[2],o=n[3],u=n[4],a=0;a<80;a++){if(a<16)h[a]=0|t[i+a];else{var f=h[a-3]^h[a-8]^h[a-14]^h[a-16];h[a]=f<<1|f>>>31}var c=(e<<5|e>>>27)+u+h[a];c+=a<20?1518500249+(r&s|~r&o):a<40?1859775393+(r^s^o):a<60?(r&s|r&o|s&o)-1894007588:(r^s^o)-899497514,u=o,o=s,s=r<<30|r>>>2,r=e,e=c}n[0]=n[0]+e|0,n[1]=n[1]+r|0,n[2]=n[2]+s|0,n[3]=n[3]+o|0,n[4]=n[4]+u|0},Pz:function(){var t=this.xA,i=t.words,n=8*this.Tz,e=8*t.sigBytes;return i[e>>>5]|=128<<24-e%32,i[14+(e+64>>>9<<4)]=Math.floor(n/4294967296),i[15+(e+64>>>9<<4)]=n,t.sigBytes=4*i.length,this.Bz(),this.Rz},clone:function(){var t=s.clone.call(this);return t.Rz=this.Rz.clone(),t}}),n.SHA1=s.Dz(u),n.HmacSHA1=s._z(u),a.SHA1)}(wq);var pq={exports:{}};!function(t,i){var n,e,r;t.exports=(e=(n=uq.exports).lib.Base,r=n.enc.Utf8,void(n.algo.HMAC=e.extend({init:function(t,i){t=this.Ez=new t.init,"string"==typeof i&&(i=r.parse(i));var n=t.blockSize,e=4*n;i.sigBytes>e&&(i=t.finalize(i)),i.clamp();for(var s=this.Nz=i.clone(),o=this.Vz=i.clone(),h=s.words,u=o.words,a=0;a>>2];t.sigBytes-=i}};e.BlockCipher=f.extend({cfg:f.cfg.extend({mode:d,padding:v}),reset:function(){var t;f.reset.call(this);var i=this.cfg,n=i.iv,e=i.mode;this.Wz==this.Gz?t=e.createEncryptor:(t=e.createDecryptor,this.Lz=1),this.Kz&&this.Kz.qz==t?this.Kz.init(this,n&&n.words):(this.Kz=t.call(e,this,n&&n.words),this.Kz.qz=t)},Iz:function(t,i){this.Kz.processBlock(t,i)},Pz:function(){var t,i=this.cfg.padding;return this.Wz==this.Gz?(i.pad(this.xA,this.blockSize),t=this.Bz(!0)):(t=this.Bz(!0),i.unpad(t)),t},blockSize:4});var y=e.CipherParams=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),S=(i.format={}).OpenSSL={stringify:function(t){var i=t.ciphertext,n=t.salt;return(n?s.create([1398893684,1701076831]).concat(n).concat(i):i).toString(u)},parse:function(t){var i,n=u.parse(t),e=n.words;return 1398893684==e[0]&&1701076831==e[1]&&(i=s.create(e.slice(2,4)),e.splice(0,4),n.sigBytes-=16),y.create({ciphertext:n,salt:i})}},m=e.SerializableCipher=r.extend({cfg:r.extend({format:S}),encrypt:function(t,i,n,e){e=this.cfg.extend(e);var r=t.createEncryptor(n,e),s=r.finalize(i),o=r.cfg;return y.create({ciphertext:s,key:n,iv:o.iv,algorithm:t,mode:o.mode,padding:o.padding,blockSize:t.blockSize,formatter:e.format})},decrypt:function(t,i,n,e){return e=this.cfg.extend(e),i=this.Jz(i,e.format),t.createDecryptor(n,e).finalize(i.ciphertext)},Jz:function(t,i){return"string"==typeof t?i.parse(t,this):t}}),b=(i.kdf={}).OpenSSL={execute:function(t,i,n,e){e||(e=s.random(8));var r=a.create({keySize:i+n}).compute(t,e),o=s.create(r.words.slice(i),4*n);return r.sigBytes=4*i,y.create({key:r,iv:o,salt:e})}},g=e.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:b}),encrypt:function(t,i,n,e){var r=(e=this.cfg.extend(e)).kdf.execute(n,t.keySize,t.ivSize);e.iv=r.iv;var s=m.encrypt.call(this,t,i,r.key,e);return s.mixIn(r),s},decrypt:function(t,i,n,e){e=this.cfg.extend(e),i=this.Jz(i,e.format);var r=e.kdf.execute(n,t.keySize,t.ivSize,i.salt);return e.iv=r.iv,m.decrypt.call(this,t,i,r.key,e)}})}())}(kq),function(t,i){var n;t.exports=(n=uq.exports,function(){var t=n,i=t.lib.BlockCipher,e=t.algo,r=[],s=[],o=[],h=[],u=[],a=[],f=[],c=[],l=[],d=[];!function(){for(var t=[],i=0;i<256;i++)t[i]=i<128?i<<1:i<<1^283;var n=0,e=0;for(i=0;i<256;i++){var v=e^e<<1^e<<2^e<<3^e<<4;v=v>>>8^255&v^99,r[n]=v,s[v]=n;var y=t[n],S=t[y],m=t[S],b=257*t[v]^16843008*v;o[n]=b<<24|b>>>8,h[n]=b<<16|b>>>16,u[n]=b<<8|b>>>24,a[n]=b,b=16843009*m^65537*S^257*y^16843008*n,f[v]=b<<24|b>>>8,c[v]=b<<16|b>>>16,l[v]=b<<8|b>>>24,d[v]=b,n?(n=y^t[t[t[m^y]]],e^=t[t[e]]):n=e=1}}();var v=[0,1,2,4,8,16,32,64,128,27,54],y=e.AES=i.extend({Oz:function(){if(!this.Qz||this.$z!==this.Uz){for(var t=this.$z=this.Uz,i=t.words,n=t.sigBytes/4,e=4*((this.Qz=n+6)+1),s=this.tE=[],o=0;o6&&o%n==4&&(a=r[a>>>24]<<24|r[a>>>16&255]<<16|r[a>>>8&255]<<8|r[255&a]):(a=r[(a=a<<8|a>>>24)>>>24]<<24|r[a>>>16&255]<<16|r[a>>>8&255]<<8|r[255&a],a^=v[o/n|0]<<24),s[o]=s[o-n]^a);for(var h=this.iE=[],u=0;u>>24]]^c[r[a>>>16&255]]^l[r[a>>>8&255]]^d[r[255&a]]}}},encryptBlock:function(t,i){this.nE(t,i,this.tE,o,h,u,a,r)},decryptBlock:function(t,i){var n=t[i+1];t[i+1]=t[i+3],t[i+3]=n,this.nE(t,i,this.iE,f,c,l,d,s),n=t[i+1],t[i+1]=t[i+3],t[i+3]=n},nE:function(t,i,n,e,r,s,o,h){for(var u=this.Qz,a=t[i]^n[0],f=t[i+1]^n[1],c=t[i+2]^n[2],l=t[i+3]^n[3],d=4,v=1;v>>24]^r[f>>>16&255]^s[c>>>8&255]^o[255&l]^n[d++],S=e[f>>>24]^r[c>>>16&255]^s[l>>>8&255]^o[255&a]^n[d++],m=e[c>>>24]^r[l>>>16&255]^s[a>>>8&255]^o[255&f]^n[d++],b=e[l>>>24]^r[a>>>16&255]^s[f>>>8&255]^o[255&c]^n[d++];a=y,f=S,c=m,l=b}y=(h[a>>>24]<<24|h[f>>>16&255]<<16|h[c>>>8&255]<<8|h[255&l])^n[d++],S=(h[f>>>24]<<24|h[c>>>16&255]<<16|h[l>>>8&255]<<8|h[255&a])^n[d++],m=(h[c>>>24]<<24|h[l>>>16&255]<<16|h[a>>>8&255]<<8|h[255&f])^n[d++],b=(h[l>>>24]<<24|h[a>>>16&255]<<16|h[f>>>8&255]<<8|h[255&c])^n[d++],t[i]=y,t[i+1]=S,t[i+2]=m,t[i+3]=b},keySize:8});t.AES=i.Dz(y)}(),n.AES)}(Sq);var xq=Sq.exports,Mq={exports:{}};!function(t,i){var n,e,r;t.exports=((r=uq.exports).mode.CTR=(n=r.lib.BlockCipherMode.extend(),e=n.Encryptor=n.extend({processBlock:function(t,i){var n=this.Yz,e=n.blockSize,r=this.Xz,s=this.eE;r&&(s=this.eE=r.slice(0),this.Xz=void 0);var o=s.slice(0);n.encryptBlock(o,0),s[e-1]=s[e-1]+1|0;for(var h=0;h-1)return!0;if(t[Iq(-1,8)]===Dq[Iq(-1,6)][Iq(-1,7)])return!1;throw new Error(Iq(0,14,1,20,5))}(i)}catch(t){throw new Error(Iq(0,14,1,22,5))}return a},Nq=function(t,i){switch(t.slice(0,4)){case"0001":!function(t,i){if(!i)throw new Error(Iq(0,39,1,40,1,41,5));var n=t.split("-"),e=n[1].slice(1),r=n[2],s=n[3];if(!zq(e+"-"+r,s))throw new Error(Iq(0,21,1,2,1,7,1,12,5));for(var o=Uint8Array.from(Rq(r,2)),h=0,u=o.length-1;u>0;u-=1)h+=o[u]*Math.pow(2,8*u);if(h<(parseInt(Iq(-3,0),10)||Number(parseInt(Iq(-3,0),10))))throw new Error(Iq(0,21,1,2,1,3,1,4,5));var a=Int32Array.from(Rq(e,8)),f=fq(i[Iq(-1,31)]).toString(dq),c=Int32Array.from(Rq(f,8)),l=fq(i[Iq(-1,32)]).toString(dq),d=Int32Array.from(Rq(l,8)),v=new Int32Array(c.length);for(u=0;u0;)i.fs(e),e=i.Js()-1;var r=i.$v(),s=i.vi(),o=(t||"LICENSE_ERROR").toLowerCase().split("_").join(" ");o=(n?Iq(0,0,1,2,1,23,1,24,25,1):"")+o.charAt(0).toUpperCase()+o.substr(1),r.Pc(i.Rt).$n(new Ee({color:Ae(0,0,0)})).Ys(ir).oi(s).ph(l(0,0)),r.$e(i.Rt).Jn(o).ph({x:s.x/2,y:s.y/2}).lh(20).$n(new Ee({color:Ae(255,0,0)})),i.os(),Object.freeze(i),Object.freeze(qz)},Gq=function(t,i,n){i?(t[Iq(-1,17)](Iq(-1,19),n),t[Iq(-1,17)](Iq(-1,20),n),t[Iq(-1,17)](Iq(-1,21),n),t[Iq(-1,17)](Iq(-1,22),n)):(t[Iq(-1,18)](Iq(-1,19),n),t[Iq(-1,18)](Iq(-1,20),n),t[Iq(-1,18)](Iq(-1,21),n),t[Iq(-1,18)](Iq(-1,22),n))},Hq=function(t){var i=!1,n=!1,e=!1,r="",s="";try{if(Tq){var o=function(t){if(t){var i=t.split("-");return 4===i.length?i[1].startsWith("m")?2:1:0}}(Tq);1===o?(e=!function(t){switch(t.slice(0,4)){case"0001":return Eq(t);default:throw new Error(Iq(0,21,1,2,1,6,1,7,1,8,1,9,1,11,1,10,5))}}(Tq),i=!0):2===o?(Nq(Tq,t),n=!0):(_q=!0,function(t){var i=t.slice(0,4),n=t.slice(5);switch(i){case"0001":n=n.replace(/-/g,"");var e=Uint8Array.from(Rq(n,2)),r=e.slice(36,40),s=new Uint8Array(4),o=function(t){for(var i,n=[],e=0;e<256;e+=1){i=e;for(var r=0;r<8;r+=1)i=1&i?3988292384^i>>>1:i>>>1;n[e]=i}for(var s=-1,o=0;o>>8^n[255&(s^t[o])];return(-1^s)>>>0}(e.slice(0,36));new DataView(s.buffer).setUint32(0,o,!0);for(var h=e.slice(28,34),u=0,a=h.length-1;a>0;a-=1)u+=h[a]*Math.pow(2,8*a);if(u<(parseInt(Iq(-3,0),10)||Number(parseInt(Iq(-3,0),10))))throw new Error(Iq(0,0,1,2,1,3,1,4,5));if(r.every((function(t,i){return s[i]===t})))return;break;default:throw new Error(Iq(0,0,1,2,1,6,1,7,1,8,1,9,1,11,1,10,5))}throw new Error(Iq(0,0,1,2,1,7,1,12,5))}(Tq))}else Oq=!0}catch(t){r=t.message,console.error(t)}var h=!(r||Oq||i||n),u=function(){var t=new(Dq[Iq(-1,0)]);return t.open(Iq(0,26),Iq(-2,0)),t.setRequestHeader(Iq(-1,24),Iq(-1,25)),t.withCredentials=!0,t}();if(h){var a=void 0;try{a=parseInt(Tq?Tq.split("-")[1]:Math.floor(1e6*Math.random()).toString(),16)}catch(t){a=Math.floor(1e6*Math.random())}var f=Math.floor(1e6*Math.random());s=(a^f).toString();var c={},l="",d="",v="";Tq=Tq||"";for(var y=Iq(-4,0),S=0;S180||d.getG()>180||d.getB()>180)&&(c=!1);var v={chartTitleFillStyle:u,uiTextFillStyle:h,uiButtonFillStyle:u,uiBackgroundStrokeStyle:new nr({fillStyle:u}),sliceLabelFillStyle:c?a:f,sliceLabelConnectorStyle:new nr({fillStyle:c?s:o}),spiderScaleLabelFillStyle:u,spiderAxisLabelFillStyle:c?a:f,spiderSeriesFillStyle:s,spiderSeriesStrokeStyle:new nr({fillStyle:h,thickness:2}),seriesPointFillStyle:o,seriesStrokeStyle:new nr({fillStyle:h,thickness:1}),seriesFillStyle:h,axisLabelFillStyle:c?a:f,numericTickStrategy:n.numericTickStrategy.setMajorTickStyle((function(t){return t.setLabelFillStyle(c?a:f)})).setExtremeTickStyle((function(t){return t instanceof yh&&t.setLabelFillStyle(c?a:f),t})).setMinorTickStyle((function(i){return i instanceof yh&&i.setLabelFillStyle(new Ee(c?{color:t.getDarker()}:{color:t.getLighter()})),i})),dateTimeTickStrategy:n.dateTimeTickStrategy.setMajorTickStyle((function(t){return t.setLabelFillStyle(c?a:f)})).setMinorTickStyle((function(i){return i instanceof yh&&i.setLabelFillStyle(new Ee(c?{color:t.getDarker()}:{color:t.getLighter()})),i})),axisTitleFillStyle:c?o:s,resultTableTextFillStyle:c?s:o,resultTableStrokeStyle:new nr({fillStyle:c?f:a}),customTickMarkerStrokeStyle:new nr({fillStyle:c?f:a}),mountainsFillStyle:h,mountainsInvertedFillStyle:c?f:a,mountainsStrokeStyle:new nr({fillStyle:c?s:o}),mountainsInvertedStrokeStyle:new nr({fillStyle:c?a:f}),gaugeSliceFillStyle:h,pointMarkerTextFillStyle:u};if(r){var y=new sh({family:r});l={chartTitleFont:y,spiderScaleLabelFont:y,spiderAxisLabelFont:y,sliceLabelFont:y,axisTitleFont:y,axisLabelFont:y,axisNumericTickStrategyFont:v.numericTickStrategy.setMajorTickStyle((function(t){return t.setLabelFont(y)})).setExtremeTickStyle((function(t){return t instanceof yh&&t.setLabelFont(y),t})).setMinorTickStyle((function(t){return t instanceof yh&&t.setLabelFont(y),t})),axisDateTimeTickStrategyFont:v.dateTimeTickStrategy.setMajorTickStyle((function(t){return t.setLabelFont(y)})).setGreatTickStyle((function(t){return t instanceof yh&&t.setLabelFont(y),t})).setMinorTickStyle((function(t){return t instanceof yh&&t.setLabelFont(y),t})),uiFont:y}}return e(e(e({},n),v),l)},t.customTheme=yS,t.defaultOsmBackgroundColor=wz,t.emptyFill=Re,t.emptyLine=ir,t.emptyPoints3D=uh,t.emptyTick=mh,t.formatLongitudeLatitude=uH,t.lightningChart=function(t,i){var n="object"==typeof t?t.license:t,e="object"==typeof t?t.licenseInformation:i,r="object"==typeof t?t:void 0,s=new Pq;return s.e=n||"",Cq||(Cq=Hq(e)),function(t,i,n){return{Dashboard:Uq(t,i,n),ChartXY:Zq(t,i,n),Spider:Kq(t,i,n),Polar:qq(t,i,n),Pie:Jq(t,i,n),UIPanel:Xq(t,i,n),Gauge:Qq(t,i,n),Funnel:$q(t,i,n),Pyramid:tJ(t,i,n),Chart3D:nJ(t,i,n),Map:iJ(t,i,n)}}(Cq,s.e,r)},t.onScreenMenuControlBaseHeight=yz,t.onScreenMenuControlBaseWidth=Sz,t.onScreenMenuControlOpacity=mz,t.onScreenMenuDefaultButtonShape=gz,t.onScreenMenuSpriteURL=bz,t.saveToFile=fV,t.synchronizeAxisIntervals=ar,t.translatePoint=sr,t.translatePoint3D=function(t,i,n){if("axes"===i.id&&"world"===n.id)return i.chart.hS.lR(t);if("world"===i.id&&"axes"===n.id)return i.chart.hS.dR(t);if(i.id===n.id)return t;throw new Error("LC JS translatePoint3D misusage | originCoordinateSystem and targetCoordinateSystem arguments must be either Chart3D.world or Chart3D.axes")},t.transparentFill=dz,t.transparentLine=vz,t.vec3Utils=Ls,t.xDimensionStrategy=Qj,t.yDimensionStrategy=$j,Object.defineProperty(t,"hE",{value:!0}),t}({});