@antv/g-canvas 1.0.21 → 1.0.22-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("@antv/g"),require("mana-syringe")):"function"==typeof define&&define.amd?define(["@antv/g","mana-syringe"],n):"object"==typeof exports?exports.Canvas2D=n(require("@antv/g"),require("mana-syringe")):(t.G=t.G||{},t.G.Canvas2D=n(t.G,t.G.ManaSyringe))}(window,(function(t,n){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return t[r].call(a.exports,a,a.exports,e),a.l=!0,a.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var a in t)e.d(r,a,function(n){return t[n]}.bind(null,a));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=9)}([function(n,e){n.exports=t},function(t,e){t.exports=n},,function(t,n,e){t.exports=function(){"use strict";function t(t,r,a,o,i){!function t(e,r,a,o,i){for(;o>a;){if(o-a>600){var u=o-a+1,c=r-a+1,s=Math.log(u),f=.5*Math.exp(2*s/3),h=.5*Math.sqrt(s*f*(u-f)/u)*(c-u/2<0?-1:1);t(e,r,Math.max(a,Math.floor(r-c*f/u+h)),Math.min(o,Math.floor(r+(u-c)*f/u+h)),i)}var l=e[r],d=a,v=o;for(n(e,a,r),i(e[o],l)>0&&n(e,a,o);d<v;){for(n(e,d,v),d++,v--;i(e[d],l)<0;)d++;for(;i(e[v],l)>0;)v--}0===i(e[a],l)?n(e,a,v):n(e,++v,o),v<=r&&(a=v+1),r<=v&&(o=v-1)}}(t,r,a||0,o||t.length-1,i||e)}function n(t,n,e){var r=t[n];t[n]=t[e],t[e]=r}function e(t,n){return t<n?-1:t>n?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function a(t,n,e){if(!e)return n.indexOf(t);for(var r=0;r<n.length;r++)if(e(t,n[r]))return r;return-1}function o(t,n){i(t,0,t.children.length,n,t)}function i(t,n,e,r,a){a||(a=v(null)),a.minX=1/0,a.minY=1/0,a.maxX=-1/0,a.maxY=-1/0;for(var o=n;o<e;o++){var i=t.children[o];u(a,t.leaf?r(i):i)}return a}function u(t,n){return t.minX=Math.min(t.minX,n.minX),t.minY=Math.min(t.minY,n.minY),t.maxX=Math.max(t.maxX,n.maxX),t.maxY=Math.max(t.maxY,n.maxY),t}function c(t,n){return t.minX-n.minX}function s(t,n){return t.minY-n.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function l(t,n){return t.minX<=n.minX&&t.minY<=n.minY&&n.maxX<=t.maxX&&n.maxY<=t.maxY}function d(t,n){return n.minX<=t.maxX&&n.minY<=t.maxY&&n.maxX>=t.minX&&n.maxY>=t.minY}function v(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function p(n,e,r,a,o){for(var i=[e,r];i.length;)if(!((r=i.pop())-(e=i.pop())<=a)){var u=e+Math.ceil((r-e)/a/2)*a;t(n,u,e,r,o),i.push(e,u,u,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var n=this.data,e=[];if(!d(t,n))return e;for(var r=this.toBBox,a=[];n;){for(var o=0;o<n.children.length;o++){var i=n.children[o],u=n.leaf?r(i):i;d(t,u)&&(n.leaf?e.push(i):l(t,u)?this._all(i,e):a.push(i))}n=a.pop()}return e},r.prototype.collides=function(t){var n=this.data;if(!d(t,n))return!1;for(var e=[];n;){for(var r=0;r<n.children.length;r++){var a=n.children[r],o=n.leaf?this.toBBox(a):a;if(d(t,o)){if(n.leaf||l(t,o))return!0;e.push(a)}}n=e.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var n=0;n<t.length;n++)this.insert(t[n]);return this}var e=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){var r=this.data;this.data=e,e=r}this._insert(e,this.data.height-e.height-1,!0)}else this.data=e;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=v([]),this},r.prototype.remove=function(t,n){if(!t)return this;for(var e,r,o,i=this.data,u=this.toBBox(t),c=[],s=[];i||c.length;){if(i||(i=c.pop(),r=c[c.length-1],e=s.pop(),o=!0),i.leaf){var f=a(t,i.children,n);if(-1!==f)return i.children.splice(f,1),c.push(i),this._condense(c),this}o||i.leaf||!l(i,u)?r?(e++,i=r.children[e],o=!1):i=null:(c.push(i),s.push(e),e=0,r=i,i=i.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,n){return t.minX-n.minX},r.prototype.compareMinY=function(t,n){return t.minY-n.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,n){for(var e=[];t;)t.leaf?n.push.apply(n,t.children):e.push.apply(e,t.children),t=e.pop();return n},r.prototype._build=function(t,n,e,r){var a,i=e-n+1,u=this._maxEntries;if(i<=u)return o(a=v(t.slice(n,e+1)),this.toBBox),a;r||(r=Math.ceil(Math.log(i)/Math.log(u)),u=Math.ceil(i/Math.pow(u,r-1))),(a=v([])).leaf=!1,a.height=r;var c=Math.ceil(i/u),s=c*Math.ceil(Math.sqrt(u));p(t,n,e,s,this.compareMinX);for(var f=n;f<=e;f+=s){var h=Math.min(f+s-1,e);p(t,f,h,c,this.compareMinY);for(var l=f;l<=h;l+=c){var d=Math.min(l+c-1,h);a.children.push(this._build(t,l,d,r-1))}}return o(a,this.toBBox),a},r.prototype._chooseSubtree=function(t,n,e,r){for(;r.push(n),!n.leaf&&r.length-1!==e;){for(var a=1/0,o=1/0,i=void 0,u=0;u<n.children.length;u++){var c=n.children[u],s=f(c),h=(l=t,d=c,(Math.max(d.maxX,l.maxX)-Math.min(d.minX,l.minX))*(Math.max(d.maxY,l.maxY)-Math.min(d.minY,l.minY))-s);h<o?(o=h,a=s<a?s:a,i=c):h===o&&s<a&&(a=s,i=c)}n=i||n.children[0]}var l,d;return n},r.prototype._insert=function(t,n,e){var r=e?t:this.toBBox(t),a=[],o=this._chooseSubtree(r,this.data,n,a);for(o.children.push(t),u(o,r);n>=0&&a[n].children.length>this._maxEntries;)this._split(a,n),n--;this._adjustParentBBoxes(r,a,n)},r.prototype._split=function(t,n){var e=t[n],r=e.children.length,a=this._minEntries;this._chooseSplitAxis(e,a,r);var i=this._chooseSplitIndex(e,a,r),u=v(e.children.splice(i,e.children.length-i));u.height=e.height,u.leaf=e.leaf,o(e,this.toBBox),o(u,this.toBBox),n?t[n-1].children.push(u):this._splitRoot(e,u)},r.prototype._splitRoot=function(t,n){this.data=v([t,n]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,n,e){for(var r,a,o,u,c,s,h,l=1/0,d=1/0,v=n;v<=e-n;v++){var p=i(t,0,v,this.toBBox),y=i(t,v,e,this.toBBox),m=(a=p,o=y,u=Math.max(a.minX,o.minX),c=Math.max(a.minY,o.minY),s=Math.min(a.maxX,o.maxX),h=Math.min(a.maxY,o.maxY),Math.max(0,s-u)*Math.max(0,h-c)),g=f(p)+f(y);m<l?(l=m,r=v,d=g<d?g:d):m===l&&g<d&&(d=g,r=v)}return r||e-n},r.prototype._chooseSplitAxis=function(t,n,e){var r=t.leaf?this.compareMinX:c,a=t.leaf?this.compareMinY:s;this._allDistMargin(t,n,e,r)<this._allDistMargin(t,n,e,a)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,n,e,r){t.children.sort(r);for(var a=this.toBBox,o=i(t,0,n,a),c=i(t,e-n,e,a),s=h(o)+h(c),f=n;f<e-n;f++){var l=t.children[f];u(o,t.leaf?a(l):l),s+=h(o)}for(var d=e-n-1;d>=n;d--){var v=t.children[d];u(c,t.leaf?a(v):v),s+=h(c)}return s},r.prototype._adjustParentBBoxes=function(t,n,e){for(var r=e;r>=0;r--)u(n[r],t)},r.prototype._condense=function(t){for(var n=t.length-1,e=void 0;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():o(t[n],this.toBBox)},r}()},function(t,n,e){"use strict";(function(t){var e="object"==typeof t&&t&&t.Object===Object&&t;n.a=e}).call(this,e(8))},,,,function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n,e){"use strict";e.r(n),e.d(n,"DomInteraction",(function(){return r})),e.d(n,"CanvasRenderer",(function(){return s})),e.d(n,"CanvasPicker",(function(){return f})),e.d(n,"HTMLRenderer",(function(){return h})),e.d(n,"Renderer",(function(){return vo}));var r={};e.r(r),e.d(r,"Plugin",(function(){return E}));var a={};e.r(a),e.d(a,"create",(function(){return nt})),e.d(a,"fromMat4",(function(){return et})),e.d(a,"clone",(function(){return rt})),e.d(a,"copy",(function(){return at})),e.d(a,"fromValues",(function(){return ot})),e.d(a,"set",(function(){return it})),e.d(a,"identity",(function(){return ut})),e.d(a,"transpose",(function(){return ct})),e.d(a,"invert",(function(){return st})),e.d(a,"adjoint",(function(){return ft})),e.d(a,"determinant",(function(){return ht})),e.d(a,"multiply",(function(){return lt})),e.d(a,"translate",(function(){return dt})),e.d(a,"rotate",(function(){return vt})),e.d(a,"scale",(function(){return pt})),e.d(a,"fromTranslation",(function(){return yt})),e.d(a,"fromRotation",(function(){return mt})),e.d(a,"fromScaling",(function(){return gt})),e.d(a,"fromMat2d",(function(){return Mt})),e.d(a,"fromQuat",(function(){return bt})),e.d(a,"normalFromMat4",(function(){return xt})),e.d(a,"projection",(function(){return St})),e.d(a,"str",(function(){return Ot})),e.d(a,"frob",(function(){return Et})),e.d(a,"add",(function(){return Pt})),e.d(a,"subtract",(function(){return Ct})),e.d(a,"multiplyScalar",(function(){return jt})),e.d(a,"multiplyScalarAndAdd",(function(){return Tt})),e.d(a,"exactEquals",(function(){return At})),e.d(a,"equals",(function(){return Bt})),e.d(a,"mul",(function(){return wt})),e.d(a,"sub",(function(){return kt}));var o={};e.r(o),e.d(o,"create",(function(){return Lt})),e.d(o,"clone",(function(){return Rt})),e.d(o,"copy",(function(){return Nt})),e.d(o,"fromValues",(function(){return Dt})),e.d(o,"set",(function(){return It})),e.d(o,"identity",(function(){return Yt})),e.d(o,"transpose",(function(){return Xt})),e.d(o,"invert",(function(){return qt})),e.d(o,"adjoint",(function(){return Gt})),e.d(o,"determinant",(function(){return _t})),e.d(o,"multiply",(function(){return Ft})),e.d(o,"translate",(function(){return $t})),e.d(o,"scale",(function(){return Vt})),e.d(o,"rotate",(function(){return Ht})),e.d(o,"rotateX",(function(){return Ut})),e.d(o,"rotateY",(function(){return Wt})),e.d(o,"rotateZ",(function(){return zt})),e.d(o,"fromTranslation",(function(){return Qt})),e.d(o,"fromScaling",(function(){return Zt})),e.d(o,"fromRotation",(function(){return Jt})),e.d(o,"fromXRotation",(function(){return Kt})),e.d(o,"fromYRotation",(function(){return tn})),e.d(o,"fromZRotation",(function(){return nn})),e.d(o,"fromRotationTranslation",(function(){return en})),e.d(o,"fromQuat2",(function(){return rn})),e.d(o,"getTranslation",(function(){return an})),e.d(o,"getScaling",(function(){return on})),e.d(o,"getRotation",(function(){return un})),e.d(o,"fromRotationTranslationScale",(function(){return cn})),e.d(o,"fromRotationTranslationScaleOrigin",(function(){return sn})),e.d(o,"fromQuat",(function(){return fn})),e.d(o,"frustum",(function(){return hn})),e.d(o,"perspectiveNO",(function(){return ln})),e.d(o,"perspective",(function(){return dn})),e.d(o,"perspectiveZO",(function(){return vn})),e.d(o,"perspectiveFromFieldOfView",(function(){return pn})),e.d(o,"orthoNO",(function(){return yn})),e.d(o,"ortho",(function(){return mn})),e.d(o,"orthoZO",(function(){return gn})),e.d(o,"lookAt",(function(){return Mn})),e.d(o,"targetTo",(function(){return bn})),e.d(o,"str",(function(){return xn})),e.d(o,"frob",(function(){return Sn})),e.d(o,"add",(function(){return On})),e.d(o,"subtract",(function(){return En})),e.d(o,"multiplyScalar",(function(){return Pn})),e.d(o,"multiplyScalarAndAdd",(function(){return Cn})),e.d(o,"exactEquals",(function(){return jn})),e.d(o,"equals",(function(){return Tn})),e.d(o,"mul",(function(){return An})),e.d(o,"sub",(function(){return Bn}));var i={};e.r(i),e.d(i,"create",(function(){return wn})),e.d(i,"clone",(function(){return kn})),e.d(i,"length",(function(){return Ln})),e.d(i,"fromValues",(function(){return Rn})),e.d(i,"copy",(function(){return Nn})),e.d(i,"set",(function(){return Dn})),e.d(i,"add",(function(){return In})),e.d(i,"subtract",(function(){return Yn})),e.d(i,"multiply",(function(){return Xn})),e.d(i,"divide",(function(){return qn})),e.d(i,"ceil",(function(){return Gn})),e.d(i,"floor",(function(){return _n})),e.d(i,"min",(function(){return Fn})),e.d(i,"max",(function(){return $n})),e.d(i,"round",(function(){return Vn})),e.d(i,"scale",(function(){return Hn})),e.d(i,"scaleAndAdd",(function(){return Un})),e.d(i,"distance",(function(){return Wn})),e.d(i,"squaredDistance",(function(){return zn})),e.d(i,"squaredLength",(function(){return Qn})),e.d(i,"negate",(function(){return Zn})),e.d(i,"inverse",(function(){return Jn})),e.d(i,"normalize",(function(){return Kn})),e.d(i,"dot",(function(){return te})),e.d(i,"cross",(function(){return ne})),e.d(i,"lerp",(function(){return ee})),e.d(i,"hermite",(function(){return re})),e.d(i,"bezier",(function(){return ae})),e.d(i,"random",(function(){return oe})),e.d(i,"transformMat4",(function(){return ie})),e.d(i,"transformMat3",(function(){return ue})),e.d(i,"transformQuat",(function(){return ce})),e.d(i,"rotateX",(function(){return se})),e.d(i,"rotateY",(function(){return fe})),e.d(i,"rotateZ",(function(){return he})),e.d(i,"angle",(function(){return le})),e.d(i,"zero",(function(){return de})),e.d(i,"str",(function(){return ve})),e.d(i,"exactEquals",(function(){return pe})),e.d(i,"equals",(function(){return ye})),e.d(i,"sub",(function(){return ge})),e.d(i,"mul",(function(){return Me})),e.d(i,"div",(function(){return be})),e.d(i,"dist",(function(){return xe})),e.d(i,"sqrDist",(function(){return Se})),e.d(i,"len",(function(){return Oe})),e.d(i,"sqrLen",(function(){return Ee})),e.d(i,"forEach",(function(){return Pe}));var u={};e.r(u),e.d(u,"create",(function(){return Te})),e.d(u,"identity",(function(){return Ae})),e.d(u,"setAxisAngle",(function(){return Be})),e.d(u,"getAxisAngle",(function(){return we})),e.d(u,"getAngle",(function(){return ke})),e.d(u,"multiply",(function(){return Le})),e.d(u,"rotateX",(function(){return Re})),e.d(u,"rotateY",(function(){return Ne})),e.d(u,"rotateZ",(function(){return De})),e.d(u,"calculateW",(function(){return Ie})),e.d(u,"exp",(function(){return Ye})),e.d(u,"ln",(function(){return Xe})),e.d(u,"pow",(function(){return qe})),e.d(u,"slerp",(function(){return Ge})),e.d(u,"random",(function(){return _e})),e.d(u,"invert",(function(){return Fe})),e.d(u,"conjugate",(function(){return $e})),e.d(u,"fromMat3",(function(){return Ve})),e.d(u,"fromEuler",(function(){return He})),e.d(u,"str",(function(){return Ue})),e.d(u,"clone",(function(){return tr})),e.d(u,"fromValues",(function(){return nr})),e.d(u,"copy",(function(){return er})),e.d(u,"set",(function(){return rr})),e.d(u,"add",(function(){return ar})),e.d(u,"mul",(function(){return or})),e.d(u,"scale",(function(){return ir})),e.d(u,"dot",(function(){return ur})),e.d(u,"lerp",(function(){return cr})),e.d(u,"length",(function(){return sr})),e.d(u,"len",(function(){return fr})),e.d(u,"squaredLength",(function(){return hr})),e.d(u,"sqrLen",(function(){return lr})),e.d(u,"normalize",(function(){return dr})),e.d(u,"exactEquals",(function(){return vr})),e.d(u,"equals",(function(){return pr})),e.d(u,"rotationTo",(function(){return yr})),e.d(u,"sqlerp",(function(){return mr})),e.d(u,"setAxes",(function(){return gr}));var c={};e.r(c),e.d(c,"create",(function(){return Mr})),e.d(c,"clone",(function(){return br})),e.d(c,"fromValues",(function(){return xr})),e.d(c,"copy",(function(){return Sr})),e.d(c,"set",(function(){return Or})),e.d(c,"add",(function(){return Er})),e.d(c,"subtract",(function(){return Pr})),e.d(c,"multiply",(function(){return Cr})),e.d(c,"divide",(function(){return jr})),e.d(c,"ceil",(function(){return Tr})),e.d(c,"floor",(function(){return Ar})),e.d(c,"min",(function(){return Br})),e.d(c,"max",(function(){return wr})),e.d(c,"round",(function(){return kr})),e.d(c,"scale",(function(){return Lr})),e.d(c,"scaleAndAdd",(function(){return Rr})),e.d(c,"distance",(function(){return Nr})),e.d(c,"squaredDistance",(function(){return Dr})),e.d(c,"length",(function(){return Ir})),e.d(c,"squaredLength",(function(){return Yr})),e.d(c,"negate",(function(){return Xr})),e.d(c,"inverse",(function(){return qr})),e.d(c,"normalize",(function(){return Gr})),e.d(c,"dot",(function(){return _r})),e.d(c,"cross",(function(){return Fr})),e.d(c,"lerp",(function(){return $r})),e.d(c,"random",(function(){return Vr})),e.d(c,"transformMat2",(function(){return Hr})),e.d(c,"transformMat2d",(function(){return Ur})),e.d(c,"transformMat3",(function(){return Wr})),e.d(c,"transformMat4",(function(){return zr})),e.d(c,"rotate",(function(){return Qr})),e.d(c,"angle",(function(){return Zr})),e.d(c,"zero",(function(){return Jr})),e.d(c,"str",(function(){return Kr})),e.d(c,"exactEquals",(function(){return ta})),e.d(c,"equals",(function(){return na})),e.d(c,"len",(function(){return ea})),e.d(c,"sub",(function(){return ra})),e.d(c,"mul",(function(){return aa})),e.d(c,"div",(function(){return oa})),e.d(c,"dist",(function(){return ia})),e.d(c,"sqrDist",(function(){return ua})),e.d(c,"sqrLen",(function(){return ca})),e.d(c,"forEach",(function(){return sa}));var s={};e.r(s),e.d(s,"PathGeneratorFactory",(function(){return Q})),e.d(s,"PathGenerator",(function(){return Z})),e.d(s,"StyleRenderer",(function(){return T})),e.d(s,"RBushNode",(function(){return fa})),e.d(s,"RBushRoot",(function(){return ha})),e.d(s,"RBush",(function(){return C.a})),e.d(s,"Plugin",(function(){return pa}));var f={};e.r(f),e.d(f,"Plugin",(function(){return io}));var h={};e.r(h),e.d(h,"Plugin",(function(){return so}));
1
+ !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("@antv/g"),require("mana-syringe")):"function"==typeof define&&define.amd?define(["@antv/g","mana-syringe"],n):"object"==typeof exports?exports.Canvas2D=n(require("@antv/g"),require("mana-syringe")):(t.G=t.G||{},t.G.Canvas2D=n(t.G,t.G.ManaSyringe))}(window,(function(t,n){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=6)}([function(n,e){n.exports=t},function(t,e){t.exports=n},function(t,n,e){t.exports=function(){"use strict";function t(t,r,i,o,a){!function t(e,r,i,o,a){for(;o>i;){if(o-i>600){var u=o-i+1,c=r-i+1,s=Math.log(u),f=.5*Math.exp(2*s/3),h=.5*Math.sqrt(s*f*(u-f)/u)*(c-u/2<0?-1:1);t(e,r,Math.max(i,Math.floor(r-c*f/u+h)),Math.min(o,Math.floor(r+(u-c)*f/u+h)),a)}var l=e[r],d=i,p=o;for(n(e,i,r),a(e[o],l)>0&&n(e,i,o);d<p;){for(n(e,d,p),d++,p--;a(e[d],l)<0;)d++;for(;a(e[p],l)>0;)p--}0===a(e[i],l)?n(e,i,p):n(e,++p,o),p<=r&&(i=p+1),r<=p&&(o=p-1)}}(t,r,i||0,o||t.length-1,a||e)}function n(t,n,e){var r=t[n];t[n]=t[e],t[e]=r}function e(t,n){return t<n?-1:t>n?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(t,n,e){if(!e)return n.indexOf(t);for(var r=0;r<n.length;r++)if(e(t,n[r]))return r;return-1}function o(t,n){a(t,0,t.children.length,n,t)}function a(t,n,e,r,i){i||(i=p(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=n;o<e;o++){var a=t.children[o];u(i,t.leaf?r(a):a)}return i}function u(t,n){return t.minX=Math.min(t.minX,n.minX),t.minY=Math.min(t.minY,n.minY),t.maxX=Math.max(t.maxX,n.maxX),t.maxY=Math.max(t.maxY,n.maxY),t}function c(t,n){return t.minX-n.minX}function s(t,n){return t.minY-n.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function l(t,n){return t.minX<=n.minX&&t.minY<=n.minY&&n.maxX<=t.maxX&&n.maxY<=t.maxY}function d(t,n){return n.minX<=t.maxX&&n.minY<=t.maxY&&n.maxX>=t.minX&&n.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(n,e,r,i,o){for(var a=[e,r];a.length;)if(!((r=a.pop())-(e=a.pop())<=i)){var u=e+Math.ceil((r-e)/i/2)*i;t(n,u,e,r,o),a.push(e,u,u,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var n=this.data,e=[];if(!d(t,n))return e;for(var r=this.toBBox,i=[];n;){for(var o=0;o<n.children.length;o++){var a=n.children[o],u=n.leaf?r(a):a;d(t,u)&&(n.leaf?e.push(a):l(t,u)?this._all(a,e):i.push(a))}n=i.pop()}return e},r.prototype.collides=function(t){var n=this.data;if(!d(t,n))return!1;for(var e=[];n;){for(var r=0;r<n.children.length;r++){var i=n.children[r],o=n.leaf?this.toBBox(i):i;if(d(t,o)){if(n.leaf||l(t,o))return!0;e.push(i)}}n=e.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var n=0;n<t.length;n++)this.insert(t[n]);return this}var e=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){var r=this.data;this.data=e,e=r}this._insert(e,this.data.height-e.height-1,!0)}else this.data=e;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=p([]),this},r.prototype.remove=function(t,n){if(!t)return this;for(var e,r,o,a=this.data,u=this.toBBox(t),c=[],s=[];a||c.length;){if(a||(a=c.pop(),r=c[c.length-1],e=s.pop(),o=!0),a.leaf){var f=i(t,a.children,n);if(-1!==f)return a.children.splice(f,1),c.push(a),this._condense(c),this}o||a.leaf||!l(a,u)?r?(e++,a=r.children[e],o=!1):a=null:(c.push(a),s.push(e),e=0,r=a,a=a.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,n){return t.minX-n.minX},r.prototype.compareMinY=function(t,n){return t.minY-n.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,n){for(var e=[];t;)t.leaf?n.push.apply(n,t.children):e.push.apply(e,t.children),t=e.pop();return n},r.prototype._build=function(t,n,e,r){var i,a=e-n+1,u=this._maxEntries;if(a<=u)return o(i=p(t.slice(n,e+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(a)/Math.log(u)),u=Math.ceil(a/Math.pow(u,r-1))),(i=p([])).leaf=!1,i.height=r;var c=Math.ceil(a/u),s=c*Math.ceil(Math.sqrt(u));v(t,n,e,s,this.compareMinX);for(var f=n;f<=e;f+=s){var h=Math.min(f+s-1,e);v(t,f,h,c,this.compareMinY);for(var l=f;l<=h;l+=c){var d=Math.min(l+c-1,h);i.children.push(this._build(t,l,d,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(t,n,e,r){for(;r.push(n),!n.leaf&&r.length-1!==e;){for(var i=1/0,o=1/0,a=void 0,u=0;u<n.children.length;u++){var c=n.children[u],s=f(c),h=(l=t,d=c,(Math.max(d.maxX,l.maxX)-Math.min(d.minX,l.minX))*(Math.max(d.maxY,l.maxY)-Math.min(d.minY,l.minY))-s);h<o?(o=h,i=s<i?s:i,a=c):h===o&&s<i&&(i=s,a=c)}n=a||n.children[0]}var l,d;return n},r.prototype._insert=function(t,n,e){var r=e?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,n,i);for(o.children.push(t),u(o,r);n>=0&&i[n].children.length>this._maxEntries;)this._split(i,n),n--;this._adjustParentBBoxes(r,i,n)},r.prototype._split=function(t,n){var e=t[n],r=e.children.length,i=this._minEntries;this._chooseSplitAxis(e,i,r);var a=this._chooseSplitIndex(e,i,r),u=p(e.children.splice(a,e.children.length-a));u.height=e.height,u.leaf=e.leaf,o(e,this.toBBox),o(u,this.toBBox),n?t[n-1].children.push(u):this._splitRoot(e,u)},r.prototype._splitRoot=function(t,n){this.data=p([t,n]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,n,e){for(var r,i,o,u,c,s,h,l=1/0,d=1/0,p=n;p<=e-n;p++){var v=a(t,0,p,this.toBBox),y=a(t,p,e,this.toBBox),m=(i=v,o=y,u=Math.max(i.minX,o.minX),c=Math.max(i.minY,o.minY),s=Math.min(i.maxX,o.maxX),h=Math.min(i.maxY,o.maxY),Math.max(0,s-u)*Math.max(0,h-c)),g=f(v)+f(y);m<l?(l=m,r=p,d=g<d?g:d):m===l&&g<d&&(d=g,r=p)}return r||e-n},r.prototype._chooseSplitAxis=function(t,n,e){var r=t.leaf?this.compareMinX:c,i=t.leaf?this.compareMinY:s;this._allDistMargin(t,n,e,r)<this._allDistMargin(t,n,e,i)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,n,e,r){t.children.sort(r);for(var i=this.toBBox,o=a(t,0,n,i),c=a(t,e-n,e,i),s=h(o)+h(c),f=n;f<e-n;f++){var l=t.children[f];u(o,t.leaf?i(l):l),s+=h(o)}for(var d=e-n-1;d>=n;d--){var p=t.children[d];u(c,t.leaf?i(p):p),s+=h(c)}return s},r.prototype._adjustParentBBoxes=function(t,n,e){for(var r=e;r>=0;r--)u(n[r],t)},r.prototype._condense=function(t){for(var n=t.length-1,e=void 0;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():o(t[n],this.toBBox)},r}()},,,,function(t,n,e){"use strict";e.r(n),e.d(n,"DomInteraction",(function(){return r})),e.d(n,"CanvasRenderer",(function(){return s})),e.d(n,"CanvasPicker",(function(){return f})),e.d(n,"HTMLRenderer",(function(){return h})),e.d(n,"Renderer",(function(){return co}));var r={};e.r(r),e.d(r,"Plugin",(function(){return j}));var i={};e.r(i),e.d(i,"create",(function(){return rt})),e.d(i,"fromMat4",(function(){return it})),e.d(i,"clone",(function(){return ot})),e.d(i,"copy",(function(){return at})),e.d(i,"fromValues",(function(){return ut})),e.d(i,"set",(function(){return ct})),e.d(i,"identity",(function(){return st})),e.d(i,"transpose",(function(){return ft})),e.d(i,"invert",(function(){return ht})),e.d(i,"adjoint",(function(){return lt})),e.d(i,"determinant",(function(){return dt})),e.d(i,"multiply",(function(){return pt})),e.d(i,"translate",(function(){return vt})),e.d(i,"rotate",(function(){return yt})),e.d(i,"scale",(function(){return mt})),e.d(i,"fromTranslation",(function(){return gt})),e.d(i,"fromRotation",(function(){return Mt})),e.d(i,"fromScaling",(function(){return bt})),e.d(i,"fromMat2d",(function(){return xt})),e.d(i,"fromQuat",(function(){return Ot})),e.d(i,"normalFromMat4",(function(){return St})),e.d(i,"projection",(function(){return Ct})),e.d(i,"str",(function(){return Pt})),e.d(i,"frob",(function(){return Et})),e.d(i,"add",(function(){return jt})),e.d(i,"subtract",(function(){return Tt})),e.d(i,"multiplyScalar",(function(){return At})),e.d(i,"multiplyScalarAndAdd",(function(){return Rt})),e.d(i,"exactEquals",(function(){return wt})),e.d(i,"equals",(function(){return Bt})),e.d(i,"mul",(function(){return kt})),e.d(i,"sub",(function(){return Lt}));var o={};e.r(o),e.d(o,"create",(function(){return Nt})),e.d(o,"clone",(function(){return Dt})),e.d(o,"copy",(function(){return It})),e.d(o,"fromValues",(function(){return Yt})),e.d(o,"set",(function(){return Xt})),e.d(o,"identity",(function(){return qt})),e.d(o,"transpose",(function(){return Gt})),e.d(o,"invert",(function(){return _t})),e.d(o,"adjoint",(function(){return Ft})),e.d(o,"determinant",(function(){return Vt})),e.d(o,"multiply",(function(){return $t})),e.d(o,"translate",(function(){return Ht})),e.d(o,"scale",(function(){return Ut})),e.d(o,"rotate",(function(){return Wt})),e.d(o,"rotateX",(function(){return zt})),e.d(o,"rotateY",(function(){return Qt})),e.d(o,"rotateZ",(function(){return Zt})),e.d(o,"fromTranslation",(function(){return Jt})),e.d(o,"fromScaling",(function(){return Kt})),e.d(o,"fromRotation",(function(){return tn})),e.d(o,"fromXRotation",(function(){return nn})),e.d(o,"fromYRotation",(function(){return en})),e.d(o,"fromZRotation",(function(){return rn})),e.d(o,"fromRotationTranslation",(function(){return on})),e.d(o,"fromQuat2",(function(){return an})),e.d(o,"getTranslation",(function(){return un})),e.d(o,"getScaling",(function(){return cn})),e.d(o,"getRotation",(function(){return sn})),e.d(o,"fromRotationTranslationScale",(function(){return fn})),e.d(o,"fromRotationTranslationScaleOrigin",(function(){return hn})),e.d(o,"fromQuat",(function(){return ln})),e.d(o,"frustum",(function(){return dn})),e.d(o,"perspectiveNO",(function(){return pn})),e.d(o,"perspective",(function(){return vn})),e.d(o,"perspectiveZO",(function(){return yn})),e.d(o,"perspectiveFromFieldOfView",(function(){return mn})),e.d(o,"orthoNO",(function(){return gn})),e.d(o,"ortho",(function(){return Mn})),e.d(o,"orthoZO",(function(){return bn})),e.d(o,"lookAt",(function(){return xn})),e.d(o,"targetTo",(function(){return On})),e.d(o,"str",(function(){return Sn})),e.d(o,"frob",(function(){return Cn})),e.d(o,"add",(function(){return Pn})),e.d(o,"subtract",(function(){return En})),e.d(o,"multiplyScalar",(function(){return jn})),e.d(o,"multiplyScalarAndAdd",(function(){return Tn})),e.d(o,"exactEquals",(function(){return An})),e.d(o,"equals",(function(){return Rn})),e.d(o,"mul",(function(){return wn})),e.d(o,"sub",(function(){return Bn}));var a={};e.r(a),e.d(a,"create",(function(){return kn})),e.d(a,"clone",(function(){return Ln})),e.d(a,"length",(function(){return Nn})),e.d(a,"fromValues",(function(){return Dn})),e.d(a,"copy",(function(){return In})),e.d(a,"set",(function(){return Yn})),e.d(a,"add",(function(){return Xn})),e.d(a,"subtract",(function(){return qn})),e.d(a,"multiply",(function(){return Gn})),e.d(a,"divide",(function(){return _n})),e.d(a,"ceil",(function(){return Fn})),e.d(a,"floor",(function(){return Vn})),e.d(a,"min",(function(){return $n})),e.d(a,"max",(function(){return Hn})),e.d(a,"round",(function(){return Un})),e.d(a,"scale",(function(){return Wn})),e.d(a,"scaleAndAdd",(function(){return zn})),e.d(a,"distance",(function(){return Qn})),e.d(a,"squaredDistance",(function(){return Zn})),e.d(a,"squaredLength",(function(){return Jn})),e.d(a,"negate",(function(){return Kn})),e.d(a,"inverse",(function(){return te})),e.d(a,"normalize",(function(){return ne})),e.d(a,"dot",(function(){return ee})),e.d(a,"cross",(function(){return re})),e.d(a,"lerp",(function(){return ie})),e.d(a,"hermite",(function(){return oe})),e.d(a,"bezier",(function(){return ae})),e.d(a,"random",(function(){return ue})),e.d(a,"transformMat4",(function(){return ce})),e.d(a,"transformMat3",(function(){return se})),e.d(a,"transformQuat",(function(){return fe})),e.d(a,"rotateX",(function(){return he})),e.d(a,"rotateY",(function(){return le})),e.d(a,"rotateZ",(function(){return de})),e.d(a,"angle",(function(){return pe})),e.d(a,"zero",(function(){return ve})),e.d(a,"str",(function(){return ye})),e.d(a,"exactEquals",(function(){return me})),e.d(a,"equals",(function(){return ge})),e.d(a,"sub",(function(){return be})),e.d(a,"mul",(function(){return xe})),e.d(a,"div",(function(){return Oe})),e.d(a,"dist",(function(){return Se})),e.d(a,"sqrDist",(function(){return Ce})),e.d(a,"len",(function(){return Pe})),e.d(a,"sqrLen",(function(){return Ee})),e.d(a,"forEach",(function(){return je}));var u={};e.r(u),e.d(u,"create",(function(){return Re})),e.d(u,"identity",(function(){return we})),e.d(u,"setAxisAngle",(function(){return Be})),e.d(u,"getAxisAngle",(function(){return ke})),e.d(u,"getAngle",(function(){return Le})),e.d(u,"multiply",(function(){return Ne})),e.d(u,"rotateX",(function(){return De})),e.d(u,"rotateY",(function(){return Ie})),e.d(u,"rotateZ",(function(){return Ye})),e.d(u,"calculateW",(function(){return Xe})),e.d(u,"exp",(function(){return qe})),e.d(u,"ln",(function(){return Ge})),e.d(u,"pow",(function(){return _e})),e.d(u,"slerp",(function(){return Fe})),e.d(u,"random",(function(){return Ve})),e.d(u,"invert",(function(){return $e})),e.d(u,"conjugate",(function(){return He})),e.d(u,"fromMat3",(function(){return Ue})),e.d(u,"fromEuler",(function(){return We})),e.d(u,"str",(function(){return ze})),e.d(u,"clone",(function(){return er})),e.d(u,"fromValues",(function(){return rr})),e.d(u,"copy",(function(){return ir})),e.d(u,"set",(function(){return or})),e.d(u,"add",(function(){return ar})),e.d(u,"mul",(function(){return ur})),e.d(u,"scale",(function(){return cr})),e.d(u,"dot",(function(){return sr})),e.d(u,"lerp",(function(){return fr})),e.d(u,"length",(function(){return hr})),e.d(u,"len",(function(){return lr})),e.d(u,"squaredLength",(function(){return dr})),e.d(u,"sqrLen",(function(){return pr})),e.d(u,"normalize",(function(){return vr})),e.d(u,"exactEquals",(function(){return yr})),e.d(u,"equals",(function(){return mr})),e.d(u,"rotationTo",(function(){return gr})),e.d(u,"sqlerp",(function(){return Mr})),e.d(u,"setAxes",(function(){return br}));var c={};e.r(c),e.d(c,"create",(function(){return xr})),e.d(c,"clone",(function(){return Or})),e.d(c,"fromValues",(function(){return Sr})),e.d(c,"copy",(function(){return Cr})),e.d(c,"set",(function(){return Pr})),e.d(c,"add",(function(){return Er})),e.d(c,"subtract",(function(){return jr})),e.d(c,"multiply",(function(){return Tr})),e.d(c,"divide",(function(){return Ar})),e.d(c,"ceil",(function(){return Rr})),e.d(c,"floor",(function(){return wr})),e.d(c,"min",(function(){return Br})),e.d(c,"max",(function(){return kr})),e.d(c,"round",(function(){return Lr})),e.d(c,"scale",(function(){return Nr})),e.d(c,"scaleAndAdd",(function(){return Dr})),e.d(c,"distance",(function(){return Ir})),e.d(c,"squaredDistance",(function(){return Yr})),e.d(c,"length",(function(){return Xr})),e.d(c,"squaredLength",(function(){return qr})),e.d(c,"negate",(function(){return Gr})),e.d(c,"inverse",(function(){return _r})),e.d(c,"normalize",(function(){return Fr})),e.d(c,"dot",(function(){return Vr})),e.d(c,"cross",(function(){return $r})),e.d(c,"lerp",(function(){return Hr})),e.d(c,"random",(function(){return Ur})),e.d(c,"transformMat2",(function(){return Wr})),e.d(c,"transformMat2d",(function(){return zr})),e.d(c,"transformMat3",(function(){return Qr})),e.d(c,"transformMat4",(function(){return Zr})),e.d(c,"rotate",(function(){return Jr})),e.d(c,"angle",(function(){return Kr})),e.d(c,"zero",(function(){return ti})),e.d(c,"str",(function(){return ni})),e.d(c,"exactEquals",(function(){return ei})),e.d(c,"equals",(function(){return ri})),e.d(c,"len",(function(){return ii})),e.d(c,"sub",(function(){return oi})),e.d(c,"mul",(function(){return ai})),e.d(c,"div",(function(){return ui})),e.d(c,"dist",(function(){return ci})),e.d(c,"sqrDist",(function(){return si})),e.d(c,"sqrLen",(function(){return fi})),e.d(c,"forEach",(function(){return hi}));var s={};e.r(s),e.d(s,"PathGeneratorFactory",(function(){return J})),e.d(s,"PathGenerator",(function(){return K})),e.d(s,"RBushNode",(function(){return li})),e.d(s,"RBushRoot",(function(){return di})),e.d(s,"RBush",(function(){return A.a})),e.d(s,"StyleRendererFactory",(function(){return R})),e.d(s,"CircleRendererContribution",(function(){return w})),e.d(s,"EllipseRendererContribution",(function(){return B})),e.d(s,"RectRendererContribution",(function(){return k})),e.d(s,"LineRendererContribution",(function(){return L})),e.d(s,"PolylineRendererContribution",(function(){return N})),e.d(s,"PolygonRendererContribution",(function(){return D})),e.d(s,"PathRendererContribution",(function(){return I})),e.d(s,"TextRendererContribution",(function(){return Y})),e.d(s,"ImageRendererContribution",(function(){return X})),e.d(s,"ImageRenderer",(function(){return G})),e.d(s,"TextRenderer",(function(){return _})),e.d(s,"RectRenderer",(function(){return V})),e.d(s,"CircleRenderer",(function(){return $})),e.d(s,"EllipseRenderer",(function(){return H})),e.d(s,"LineRenderer",(function(){return U})),e.d(s,"PolylineRenderer",(function(){return W})),e.d(s,"PolygonRenderer",(function(){return z})),e.d(s,"PathRenderer",(function(){return Q})),e.d(s,"Plugin",(function(){return mi}));var f={};e.r(f),e.d(f,"Plugin",(function(){return no}));var h={};e.r(h),e.d(h,"Plugin",(function(){return io}));
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -13,4 +13,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
15
  ***************************************************************************** */
16
- var l=function(t,n){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)};var d=function(){return(d=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var a in n=arguments[e])Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a]);return t}).apply(this,arguments)};function v(t,n,e,r){var a,o=arguments.length,i=o<3?n:null===r?r=Object.getOwnPropertyDescriptor(n,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,n,e,r);else for(var u=t.length-1;u>=0;u--)(a=t[u])&&(i=(o<3?a(i):o>3?a(n,e,i):a(n,e))||i);return o>3&&i&&Object.defineProperty(n,e,i),i}function p(t,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)}Object.create;function y(t){var n="function"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,a,o=e.call(t),i=[];try{for(;(void 0===n||n-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(t){a={error:t}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(a)throw a.error}}return i}function g(t,n,e){if(e||2===arguments.length)for(var r,a=0,o=n.length;a<o;a++)!r&&a in n||(r||(r=Array.prototype.slice.call(n,0,a)),r[a]=n[a]);return t.concat(r||Array.prototype.slice.call(n))}Object.create;var M=e(0),b=e(1),x=/mobile|tablet|ip(ad|hone|od)|android/i,S=function(){function t(){}var n;return n=t,t.prototype.apply=function(t){var e=this,r=this.renderingContext.root.ownerDocument.defaultView,a=r.supportTouchEvent&&x.test(navigator.userAgent),o=function(n){t.hooks.pointerMove.call(n)},i=function(n){t.hooks.pointerUp.call(n)},u=function(n){t.hooks.pointerDown.call(n)},c=function(n){t.hooks.pointerOver.call(n)},s=function(n){t.hooks.pointerOut.call(n)},f=function(n){t.hooks.pointerWheel.call(n)},h=function(t){t.addEventListener("touchstart",u,!0),t.addEventListener("touchend",i,!0),t.addEventListener("touchmove",o,!0)},l=function(t){globalThis.document.addEventListener("mousemove",o,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("mouseout",s,!0),t.addEventListener("mouseover",c,!0),globalThis.addEventListener("mouseup",i,!0)},d=function(t){t.removeEventListener("touchstart",u,!0),t.removeEventListener("touchend",i,!0),t.removeEventListener("touchmove",o,!0)},v=function(t){globalThis.document.removeEventListener("mousemove",o,!0),t.removeEventListener("mousedown",u,!0),t.removeEventListener("mouseout",s,!0),t.removeEventListener("mouseover",c,!0),globalThis.removeEventListener("mouseup",i,!0)};t.hooks.init.tap(n.tag,(function(){var t=e.contextService.getDomElement();r.supportPointerEvent?function(t){globalThis.document.addEventListener("pointermove",o,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("pointerleave",s,!0),t.addEventListener("pointerover",c,!0),globalThis.addEventListener("pointerup",i,!0)}(t):a?h(t):r.supportTouchEvent?(h(t),l(t)):l(t),t.addEventListener("wheel",f,{passive:!0,capture:!0})})),t.hooks.destroy.tap(n.tag,(function(){var t=e.contextService.getDomElement();r.supportPointerEvent?function(t){globalThis.document.removeEventListener("pointermove",o,!0),t.removeEventListener("pointerdown",u,!0),t.removeEventListener("pointerleave",s,!0),t.removeEventListener("pointerover",c,!0),globalThis.removeEventListener("pointerup",i,!0)}(t):a?d(t):r.supportTouchEvent?(d(t),v(t)):v(t),t.removeEventListener("wheel",f,!0)}))},t.tag="DOMInteractionPlugin",v([Object(b.inject)(M.ContextService),p("design:type",Object)],t.prototype,"contextService",void 0),v([Object(b.inject)(M.RenderingContext),p("design:type",Object)],t.prototype,"renderingContext",void 0),t=n=v([Object(b.singleton)({contrib:M.RenderingPluginContribution})],t)}(),O=Object(b.Module)((function(t){t(S)})),E=function(){function t(){}return t.prototype.init=function(t){t.load(O,!0)},t.prototype.destroy=function(t){t.unload(O)},t}(),P=e(3),C=e.n(P),j=b.Syringe.defineToken("StyleRendererFactory"),T=b.Syringe.defineToken("StyleRenderer");var A=function(t){return null==t},B=function(){function t(){}return t.prototype.hash=function(t){return""},t.prototype.render=function(t,n){var e=n.fill,r=n.opacity,a=n.fillOpacity,o=n.stroke,i=n.strokeOpacity,u=n.lineWidth,c=n.lineCap,s=n.lineJoin,f=n.shadowColor,h=n.filter,l=n.miterLimit,d=!A(e),v=!A(o),p=0===e.alpha;if(d&&(A(a)||1===a.value?t.fill():(t.globalAlpha=a.value,t.fill(),t.globalAlpha=r.value)),v&&u&&u.value>0){!A(i)&&1!==i.value&&(t.globalAlpha=i.value),t.lineWidth=u.value,A(l)||(t.miterLimit=l),A(c)||(t.lineCap=c.value),A(s)||(t.lineJoin=s.value);var y=void 0,m=void 0,g=void 0,M=!A(f),b=!A(h);M&&(y=t.shadowBlur,m=t.shadowColor,A(y)||(t.shadowColor="transparent",t.shadowBlur=0)),b&&(g=t.filter,!A(g)&&g.indexOf("drop-shadow")>-1&&(t.filter=g.replace(/drop-shadow\([^)]*\)/,"").trim()||"none"));var x=d&&!p;x&&t.stroke(),M&&(t.shadowColor=m,t.shadowBlur=y),b&&(t.filter=g),x||t.stroke()}},t=v([Object(b.singleton)({token:[{token:T,named:M.Shape.CIRCLE},{token:T,named:M.Shape.ELLIPSE},{token:T,named:M.Shape.RECT},{token:T,named:M.Shape.LINE},{token:T,named:M.Shape.POLYLINE},{token:T,named:M.Shape.POLYGON},{token:T,named:M.Shape.PATH}]})],t)}(),w=e(4),k="object"==typeof self&&self&&self.Object===Object&&self,L=(w.a||k||Function("return this")()).Symbol,R=Object.prototype,N=R.hasOwnProperty,D=R.toString,I=L?L.toStringTag:void 0;var Y=function(t){var n=N.call(t,I),e=t[I];try{t[I]=void 0;var r=!0}catch(t){}var a=D.call(t);return r&&(n?t[I]=e:delete t[I]),a},X=Object.prototype.toString;var q=function(t){return X.call(t)},G=L?L.toStringTag:void 0;var _=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":G&&G in Object(t)?Y(t):q(t)},F=Array.isArray;var $=function(t){return null!=t&&"object"==typeof t};var V=function(t){return"string"==typeof t||!F(t)&&$(t)&&"[object String]"==_(t)},H=function(){function t(){this.imageCache={},this.patternCache={}}return t.prototype.getImageSync=function(t){return this.imageCache[t]},t.prototype.getOrCreateImage=function(t){var n=this;if(this.imageCache[t])return Promise.resolve(this.imageCache[t]);var e=this.canvasConfig.createImage;return new Promise((function(r,a){var o;e?o=e():M.isBrowser&&(o=new window.Image),o&&(o.onload=function(){r(o)},o.onerror=function(t){a(t)},o.crossOrigin="Anonymous",o.src=t,n.imageCache[t]=o)}))},t.prototype.getPatternSync=function(t){var n=this.generatePatternKey(t);if(this.patternCache[n])return this.patternCache[n]},t.prototype.createPattern=function(t,n){var e=this;return this.getOrCreateImage(t.src).then((function(r){var a=e.generatePatternKey(t),o=n.createPattern(r,t.repetition);return o&&(e.patternCache[a]=o),e.patternCache[a]}))},t.prototype.generatePatternKey=function(t){var n=t.src,e=t.repetition;return"pattern-".concat(n,"-").concat(e)},v([Object(b.inject)(M.CanvasConfig),p("design:type",Object)],t.prototype,"canvasConfig",void 0),t=v([Object(b.singleton)()],t)}(),U=function(){function t(){}return t.prototype.hash=function(t){return""},t.prototype.render=function(t,n){var e,r=n.width,a=n.height,o=n.img,i=r.value,u=a.value;V(o)?e=this.imagePool.getImageSync(o):(i||(i=o.width),u||(u=o.height),e=o),e&&t.drawImage(e,0,0,i,u)},v([Object(b.inject)(H),p("design:type",H)],t.prototype,"imagePool",void 0),t=v([Object(b.singleton)({token:{token:T,named:M.Shape.IMAGE}})],t)}(),W=function(){function t(){}return t.prototype.hash=function(t){return""},t.prototype.render=function(t,n,e){var r=n,a=r.lineWidth,o=r.textAlign,i=r.textBaseline,u=r.lineJoin,c=r.miterLimit,s=void 0===c?0:c,f=r.letterSpacing,h=void 0===f?0:f,l=r.stroke,d=r.fill,v=r.fillOpacity,p=r.strokeOpacity,y=r.opacity,m=r.metrics,g=r.dx,b=r.dy,x=m.font,S=m.lines,O=m.height,E=m.lineHeight,P=m.lineMetrics;t.font=x,t.lineWidth=a.value,t.textAlign=o.value,t.textBaseline=i.value,t.lineJoin=u.value,t.miterLimit=s;var C=0;"middle"===i.value?C=-O/2-E/2:"bottom"===i.value||"alphabetic"===i.value||"ideographic"===i.value?C=-O:"top"!==i.value&&"hanging"!==i.value||(C=-E);var j=0;g&&g.unit===M.UnitType.kPixels&&(j+=g.value),b&&b.unit===M.UnitType.kPixels&&(C+=b.value);for(var T=0;T<S.length;T++){var B=a.value/2+j;C+=E,!A(l)&&a&&a.value&&this.drawLetterSpacing(t,S[T],P[T],o.value,B,C,h,v.value,p.value,y.value,!0),A(d)||this.drawLetterSpacing(t,S[T],P[T],o.value,B,C,h,v.value,p.value,y.value)}},t.prototype.drawLetterSpacing=function(t,n,e,r,a,o,i,u,c,s,f){if(void 0===f&&(f=!1),0!==i){var h=t.textAlign;t.textAlign="left";var l=a;"center"===r?l=a-e.width/2:"right"!==r&&"end"!==r||(l=a-e.width);for(var d=Array.from(n),v=t.measureText(n).width,p=0,y=0;y<d.length;++y){var m=d[y];f?this.strokeText(t,m,l,o,c):this.fillText(t,m,l,o,u,s),l+=v-(p=t.measureText(n.substring(y+1)).width)+i,v=p}t.textAlign=h}else f?this.strokeText(t,n,a,o,c):this.fillText(t,n,a,o,u,s)},t.prototype.fillText=function(t,n,e,r,a,o){var i,u=!A(a)&&1!==a;u&&(i=t.globalAlpha,t.globalAlpha=a*o),t.fillText(n,e,r),u&&(t.globalAlpha=i)},t.prototype.strokeText=function(t,n,e,r,a){var o,i=!A(a)&&1!==a;i&&(o=t.globalAlpha,t.globalAlpha=a),t.strokeText(n,e,r),i&&(t.globalAlpha=o)},t=v([Object(b.singleton)({token:{token:T,named:M.Shape.TEXT}})],t)}(),z=function(){function t(){this.gradientCache={}}return t.prototype.getOrCreateGradient=function(t,n){var e=this.generateCacheKey(t),r=t.type,a=t.x0,o=t.y0,i=t.x1,u=t.y1,c=t.steps,s=t.width,f=t.height;if(this.gradientCache[e])return this.gradientCache[e];var h=null;if(r===M.GradientPatternType.LinearGradient)h=n.createLinearGradient(a*s,o*f,i*s,u*f);else if(r===M.GradientPatternType.RadialGradient){var l=Math.sqrt(s*s+f*f)/2;h=n.createRadialGradient(a*s,o*f,0,i*s,u*f,t.r1*l)}return h&&(c.forEach((function(t){var n=m(t,2),e=n[0],r=n[1];null==h||h.addColorStop(Number(e),r)})),this.gradientCache[e]=h),this.gradientCache[e]},t.prototype.generateCacheKey=function(t){var n=t.type,e=t.x0,r=t.y0,a=t.x1,o=t.y1,i=t.r1,u=t.steps,c=t.width,s=t.height;return"gradient-".concat(n,"-").concat(e,"-").concat(r,"-").concat(a,"-").concat(o,"-").concat(i||0,"-").concat(c,"-").concat(s,"-").concat(u.map((function(t){return t.join("")})).join("-"))},t=v([Object(b.singleton)()],t)}();var Q=b.Syringe.defineToken("PathGeneratorFactory"),Z=b.Syringe.defineToken("PathGenerator"),J=1e-6,K="undefined"!=typeof Float32Array?Float32Array:Array,tt=Math.random;Math.PI;function nt(){var t=new K(9);return K!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function et(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function rt(t){var n=new K(9);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n}function at(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t}function ot(t,n,e,r,a,o,i,u,c){var s=new K(9);return s[0]=t,s[1]=n,s[2]=e,s[3]=r,s[4]=a,s[5]=o,s[6]=i,s[7]=u,s[8]=c,s}function it(t,n,e,r,a,o,i,u,c,s){return t[0]=n,t[1]=e,t[2]=r,t[3]=a,t[4]=o,t[5]=i,t[6]=u,t[7]=c,t[8]=s,t}function ut(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function ct(t,n){if(t===n){var e=n[1],r=n[2],a=n[5];t[1]=n[3],t[2]=n[6],t[3]=e,t[5]=n[7],t[6]=r,t[7]=a}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function st(t,n){var e=n[0],r=n[1],a=n[2],o=n[3],i=n[4],u=n[5],c=n[6],s=n[7],f=n[8],h=f*i-u*s,l=-f*o+u*c,d=s*o-i*c,v=e*h+r*l+a*d;return v?(v=1/v,t[0]=h*v,t[1]=(-f*r+a*s)*v,t[2]=(u*r-a*i)*v,t[3]=l*v,t[4]=(f*e-a*c)*v,t[5]=(-u*e+a*o)*v,t[6]=d*v,t[7]=(-s*e+r*c)*v,t[8]=(i*e-r*o)*v,t):null}function ft(t,n){var e=n[0],r=n[1],a=n[2],o=n[3],i=n[4],u=n[5],c=n[6],s=n[7],f=n[8];return t[0]=i*f-u*s,t[1]=a*s-r*f,t[2]=r*u-a*i,t[3]=u*c-o*f,t[4]=e*f-a*c,t[5]=a*o-e*u,t[6]=o*s-i*c,t[7]=r*c-e*s,t[8]=e*i-r*o,t}function ht(t){var n=t[0],e=t[1],r=t[2],a=t[3],o=t[4],i=t[5],u=t[6],c=t[7],s=t[8];return n*(s*o-i*c)+e*(-s*a+i*u)+r*(c*a-o*u)}function lt(t,n,e){var r=n[0],a=n[1],o=n[2],i=n[3],u=n[4],c=n[5],s=n[6],f=n[7],h=n[8],l=e[0],d=e[1],v=e[2],p=e[3],y=e[4],m=e[5],g=e[6],M=e[7],b=e[8];return t[0]=l*r+d*i+v*s,t[1]=l*a+d*u+v*f,t[2]=l*o+d*c+v*h,t[3]=p*r+y*i+m*s,t[4]=p*a+y*u+m*f,t[5]=p*o+y*c+m*h,t[6]=g*r+M*i+b*s,t[7]=g*a+M*u+b*f,t[8]=g*o+M*c+b*h,t}function dt(t,n,e){var r=n[0],a=n[1],o=n[2],i=n[3],u=n[4],c=n[5],s=n[6],f=n[7],h=n[8],l=e[0],d=e[1];return t[0]=r,t[1]=a,t[2]=o,t[3]=i,t[4]=u,t[5]=c,t[6]=l*r+d*i+s,t[7]=l*a+d*u+f,t[8]=l*o+d*c+h,t}function vt(t,n,e){var r=n[0],a=n[1],o=n[2],i=n[3],u=n[4],c=n[5],s=n[6],f=n[7],h=n[8],l=Math.sin(e),d=Math.cos(e);return t[0]=d*r+l*i,t[1]=d*a+l*u,t[2]=d*o+l*c,t[3]=d*i-l*r,t[4]=d*u-l*a,t[5]=d*c-l*o,t[6]=s,t[7]=f,t[8]=h,t}function pt(t,n,e){var r=e[0],a=e[1];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=a*n[3],t[4]=a*n[4],t[5]=a*n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t}function yt(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t}function mt(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=-e,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function gt(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Mt(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t}function bt(t,n){var e=n[0],r=n[1],a=n[2],o=n[3],i=e+e,u=r+r,c=a+a,s=e*i,f=r*i,h=r*u,l=a*i,d=a*u,v=a*c,p=o*i,y=o*u,m=o*c;return t[0]=1-h-v,t[3]=f-m,t[6]=l+y,t[1]=f+m,t[4]=1-s-v,t[7]=d-p,t[2]=l-y,t[5]=d+p,t[8]=1-s-h,t}function xt(t,n){var e=n[0],r=n[1],a=n[2],o=n[3],i=n[4],u=n[5],c=n[6],s=n[7],f=n[8],h=n[9],l=n[10],d=n[11],v=n[12],p=n[13],y=n[14],m=n[15],g=e*u-r*i,M=e*c-a*i,b=e*s-o*i,x=r*c-a*u,S=r*s-o*u,O=a*s-o*c,E=f*p-h*v,P=f*y-l*v,C=f*m-d*v,j=h*y-l*p,T=h*m-d*p,A=l*m-d*y,B=g*A-M*T+b*j+x*C-S*P+O*E;return B?(B=1/B,t[0]=(u*A-c*T+s*j)*B,t[1]=(c*C-i*A-s*P)*B,t[2]=(i*T-u*C+s*E)*B,t[3]=(a*T-r*A-o*j)*B,t[4]=(e*A-a*C+o*P)*B,t[5]=(r*C-e*T-o*E)*B,t[6]=(p*O-y*S+m*x)*B,t[7]=(y*b-v*O-m*M)*B,t[8]=(v*S-p*b+m*g)*B,t):null}function St(t,n,e){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/e,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}function Ot(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}function Et(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}function Pt(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t}function Ct(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t}function jt(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t}function Tt(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t}function At(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]}function Bt(t,n){var e=t[0],r=t[1],a=t[2],o=t[3],i=t[4],u=t[5],c=t[6],s=t[7],f=t[8],h=n[0],l=n[1],d=n[2],v=n[3],p=n[4],y=n[5],m=n[6],g=n[7],M=n[8];return Math.abs(e-h)<=J*Math.max(1,Math.abs(e),Math.abs(h))&&Math.abs(r-l)<=J*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(a-d)<=J*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(o-v)<=J*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(i-p)<=J*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(u-y)<=J*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(c-m)<=J*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(s-g)<=J*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(f-M)<=J*Math.max(1,Math.abs(f),Math.abs(M))}Math.hypot||(Math.hypot=function(){for(var t=0,n=arguments.length;n--;)t+=arguments[n]*arguments[n];return Math.sqrt(t)});var wt=lt,kt=Ct;function Lt(){var t=new K(16);return K!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function Rt(t){var n=new K(16);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n}function Nt(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function Dt(t,n,e,r,a,o,i,u,c,s,f,h,l,d,v,p){var y=new K(16);return y[0]=t,y[1]=n,y[2]=e,y[3]=r,y[4]=a,y[5]=o,y[6]=i,y[7]=u,y[8]=c,y[9]=s,y[10]=f,y[11]=h,y[12]=l,y[13]=d,y[14]=v,y[15]=p,y}function It(t,n,e,r,a,o,i,u,c,s,f,h,l,d,v,p,y){return t[0]=n,t[1]=e,t[2]=r,t[3]=a,t[4]=o,t[5]=i,t[6]=u,t[7]=c,t[8]=s,t[9]=f,t[10]=h,t[11]=l,t[12]=d,t[13]=v,t[14]=p,t[15]=y,t}function Yt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Xt(t,n){if(t===n){var e=n[1],r=n[2],a=n[3],o=n[6],i=n[7],u=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=e,t[6]=n[9],t[7]=n[13],t[8]=r,t[9]=o,t[11]=n[14],t[12]=a,t[13]=i,t[14]=u}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t}function qt(t,n){var e=n[0],r=n[1],a=n[2],o=n[3],i=n[4],u=n[5],c=n[6],s=n[7],f=n[8],h=n[9],l=n[10],d=n[11],v=n[12],p=n[13],y=n[14],m=n[15],g=e*u-r*i,M=e*c-a*i,b=e*s-o*i,x=r*c-a*u,S=r*s-o*u,O=a*s-o*c,E=f*p-h*v,P=f*y-l*v,C=f*m-d*v,j=h*y-l*p,T=h*m-d*p,A=l*m-d*y,B=g*A-M*T+b*j+x*C-S*P+O*E;return B?(B=1/B,t[0]=(u*A-c*T+s*j)*B,t[1]=(a*T-r*A-o*j)*B,t[2]=(p*O-y*S+m*x)*B,t[3]=(l*S-h*O-d*x)*B,t[4]=(c*C-i*A-s*P)*B,t[5]=(e*A-a*C+o*P)*B,t[6]=(y*b-v*O-m*M)*B,t[7]=(f*O-l*b+d*M)*B,t[8]=(i*T-u*C+s*E)*B,t[9]=(r*C-e*T-o*E)*B,t[10]=(v*S-p*b+m*g)*B,t[11]=(h*b-f*S-d*g)*B,t[12]=(u*P-i*j-c*E)*B,t[13]=(e*j-r*P+a*E)*B,t[14]=(p*M-v*x-y*g)*B,t[15]=(f*x-h*M+l*g)*B,t):null}function Gt(t,n){var e=n[0],r=n[1],a=n[2],o=n[3],i=n[4],u=n[5],c=n[6],s=n[7],f=n[8],h=n[9],l=n[10],d=n[11],v=n[12],p=n[13],y=n[14],m=n[15];return t[0]=u*(l*m-d*y)-h*(c*m-s*y)+p*(c*d-s*l),t[1]=-(r*(l*m-d*y)-h*(a*m-o*y)+p*(a*d-o*l)),t[2]=r*(c*m-s*y)-u*(a*m-o*y)+p*(a*s-o*c),t[3]=-(r*(c*d-s*l)-u*(a*d-o*l)+h*(a*s-o*c)),t[4]=-(i*(l*m-d*y)-f*(c*m-s*y)+v*(c*d-s*l)),t[5]=e*(l*m-d*y)-f*(a*m-o*y)+v*(a*d-o*l),t[6]=-(e*(c*m-s*y)-i*(a*m-o*y)+v*(a*s-o*c)),t[7]=e*(c*d-s*l)-i*(a*d-o*l)+f*(a*s-o*c),t[8]=i*(h*m-d*p)-f*(u*m-s*p)+v*(u*d-s*h),t[9]=-(e*(h*m-d*p)-f*(r*m-o*p)+v*(r*d-o*h)),t[10]=e*(u*m-s*p)-i*(r*m-o*p)+v*(r*s-o*u),t[11]=-(e*(u*d-s*h)-i*(r*d-o*h)+f*(r*s-o*u)),t[12]=-(i*(h*y-l*p)-f*(u*y-c*p)+v*(u*l-c*h)),t[13]=e*(h*y-l*p)-f*(r*y-a*p)+v*(r*l-a*h),t[14]=-(e*(u*y-c*p)-i*(r*y-a*p)+v*(r*c-a*u)),t[15]=e*(u*l-c*h)-i*(r*l-a*h)+f*(r*c-a*u),t}function _t(t){var n=t[0],e=t[1],r=t[2],a=t[3],o=t[4],i=t[5],u=t[6],c=t[7],s=t[8],f=t[9],h=t[10],l=t[11],d=t[12],v=t[13],p=t[14],y=t[15];return(n*i-e*o)*(h*y-l*p)-(n*u-r*o)*(f*y-l*v)+(n*c-a*o)*(f*p-h*v)+(e*u-r*i)*(s*y-l*d)-(e*c-a*i)*(s*p-h*d)+(r*c-a*u)*(s*v-f*d)}function Ft(t,n,e){var r=n[0],a=n[1],o=n[2],i=n[3],u=n[4],c=n[5],s=n[6],f=n[7],h=n[8],l=n[9],d=n[10],v=n[11],p=n[12],y=n[13],m=n[14],g=n[15],M=e[0],b=e[1],x=e[2],S=e[3];return t[0]=M*r+b*u+x*h+S*p,t[1]=M*a+b*c+x*l+S*y,t[2]=M*o+b*s+x*d+S*m,t[3]=M*i+b*f+x*v+S*g,M=e[4],b=e[5],x=e[6],S=e[7],t[4]=M*r+b*u+x*h+S*p,t[5]=M*a+b*c+x*l+S*y,t[6]=M*o+b*s+x*d+S*m,t[7]=M*i+b*f+x*v+S*g,M=e[8],b=e[9],x=e[10],S=e[11],t[8]=M*r+b*u+x*h+S*p,t[9]=M*a+b*c+x*l+S*y,t[10]=M*o+b*s+x*d+S*m,t[11]=M*i+b*f+x*v+S*g,M=e[12],b=e[13],x=e[14],S=e[15],t[12]=M*r+b*u+x*h+S*p,t[13]=M*a+b*c+x*l+S*y,t[14]=M*o+b*s+x*d+S*m,t[15]=M*i+b*f+x*v+S*g,t}function $t(t,n,e){var r,a,o,i,u,c,s,f,h,l,d,v,p=e[0],y=e[1],m=e[2];return n===t?(t[12]=n[0]*p+n[4]*y+n[8]*m+n[12],t[13]=n[1]*p+n[5]*y+n[9]*m+n[13],t[14]=n[2]*p+n[6]*y+n[10]*m+n[14],t[15]=n[3]*p+n[7]*y+n[11]*m+n[15]):(r=n[0],a=n[1],o=n[2],i=n[3],u=n[4],c=n[5],s=n[6],f=n[7],h=n[8],l=n[9],d=n[10],v=n[11],t[0]=r,t[1]=a,t[2]=o,t[3]=i,t[4]=u,t[5]=c,t[6]=s,t[7]=f,t[8]=h,t[9]=l,t[10]=d,t[11]=v,t[12]=r*p+u*y+h*m+n[12],t[13]=a*p+c*y+l*m+n[13],t[14]=o*p+s*y+d*m+n[14],t[15]=i*p+f*y+v*m+n[15]),t}function Vt(t,n,e){var r=e[0],a=e[1],o=e[2];return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*a,t[5]=n[5]*a,t[6]=n[6]*a,t[7]=n[7]*a,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=n[11]*o,t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function Ht(t,n,e,r){var a,o,i,u,c,s,f,h,l,d,v,p,y,m,g,M,b,x,S,O,E,P,C,j,T=r[0],A=r[1],B=r[2],w=Math.hypot(T,A,B);return w<J?null:(T*=w=1/w,A*=w,B*=w,a=Math.sin(e),i=1-(o=Math.cos(e)),u=n[0],c=n[1],s=n[2],f=n[3],h=n[4],l=n[5],d=n[6],v=n[7],p=n[8],y=n[9],m=n[10],g=n[11],M=T*T*i+o,b=A*T*i+B*a,x=B*T*i-A*a,S=T*A*i-B*a,O=A*A*i+o,E=B*A*i+T*a,P=T*B*i+A*a,C=A*B*i-T*a,j=B*B*i+o,t[0]=u*M+h*b+p*x,t[1]=c*M+l*b+y*x,t[2]=s*M+d*b+m*x,t[3]=f*M+v*b+g*x,t[4]=u*S+h*O+p*E,t[5]=c*S+l*O+y*E,t[6]=s*S+d*O+m*E,t[7]=f*S+v*O+g*E,t[8]=u*P+h*C+p*j,t[9]=c*P+l*C+y*j,t[10]=s*P+d*C+m*j,t[11]=f*P+v*C+g*j,n!==t&&(t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t)}function Ut(t,n,e){var r=Math.sin(e),a=Math.cos(e),o=n[4],i=n[5],u=n[6],c=n[7],s=n[8],f=n[9],h=n[10],l=n[11];return n!==t&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[4]=o*a+s*r,t[5]=i*a+f*r,t[6]=u*a+h*r,t[7]=c*a+l*r,t[8]=s*a-o*r,t[9]=f*a-i*r,t[10]=h*a-u*r,t[11]=l*a-c*r,t}function Wt(t,n,e){var r=Math.sin(e),a=Math.cos(e),o=n[0],i=n[1],u=n[2],c=n[3],s=n[8],f=n[9],h=n[10],l=n[11];return n!==t&&(t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=o*a-s*r,t[1]=i*a-f*r,t[2]=u*a-h*r,t[3]=c*a-l*r,t[8]=o*r+s*a,t[9]=i*r+f*a,t[10]=u*r+h*a,t[11]=c*r+l*a,t}function zt(t,n,e){var r=Math.sin(e),a=Math.cos(e),o=n[0],i=n[1],u=n[2],c=n[3],s=n[4],f=n[5],h=n[6],l=n[7];return n!==t&&(t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=o*a+s*r,t[1]=i*a+f*r,t[2]=u*a+h*r,t[3]=c*a+l*r,t[4]=s*a-o*r,t[5]=f*a-i*r,t[6]=h*a-u*r,t[7]=l*a-c*r,t}function Qt(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Zt(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Jt(t,n,e){var r,a,o,i=e[0],u=e[1],c=e[2],s=Math.hypot(i,u,c);return s<J?null:(i*=s=1/s,u*=s,c*=s,r=Math.sin(n),o=1-(a=Math.cos(n)),t[0]=i*i*o+a,t[1]=u*i*o+c*r,t[2]=c*i*o-u*r,t[3]=0,t[4]=i*u*o-c*r,t[5]=u*u*o+a,t[6]=c*u*o+i*r,t[7]=0,t[8]=i*c*o+u*r,t[9]=u*c*o-i*r,t[10]=c*c*o+a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function Kt(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=e,t[7]=0,t[8]=0,t[9]=-e,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function tn(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=0,t[2]=-e,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=e,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function nn(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=0,t[4]=-e,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function en(t,n,e){var r=n[0],a=n[1],o=n[2],i=n[3],u=r+r,c=a+a,s=o+o,f=r*u,h=r*c,l=r*s,d=a*c,v=a*s,p=o*s,y=i*u,m=i*c,g=i*s;return t[0]=1-(d+p),t[1]=h+g,t[2]=l-m,t[3]=0,t[4]=h-g,t[5]=1-(f+p),t[6]=v+y,t[7]=0,t[8]=l+m,t[9]=v-y,t[10]=1-(f+d),t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function rn(t,n){var e=new K(3),r=-n[0],a=-n[1],o=-n[2],i=n[3],u=n[4],c=n[5],s=n[6],f=n[7],h=r*r+a*a+o*o+i*i;return h>0?(e[0]=2*(u*i+f*r+c*o-s*a)/h,e[1]=2*(c*i+f*a+s*r-u*o)/h,e[2]=2*(s*i+f*o+u*a-c*r)/h):(e[0]=2*(u*i+f*r+c*o-s*a),e[1]=2*(c*i+f*a+s*r-u*o),e[2]=2*(s*i+f*o+u*a-c*r)),en(t,n,e),t}function an(t,n){return t[0]=n[12],t[1]=n[13],t[2]=n[14],t}function on(t,n){var e=n[0],r=n[1],a=n[2],o=n[4],i=n[5],u=n[6],c=n[8],s=n[9],f=n[10];return t[0]=Math.hypot(e,r,a),t[1]=Math.hypot(o,i,u),t[2]=Math.hypot(c,s,f),t}function un(t,n){var e=new K(3);on(e,n);var r=1/e[0],a=1/e[1],o=1/e[2],i=n[0]*r,u=n[1]*a,c=n[2]*o,s=n[4]*r,f=n[5]*a,h=n[6]*o,l=n[8]*r,d=n[9]*a,v=n[10]*o,p=i+f+v,y=0;return p>0?(y=2*Math.sqrt(p+1),t[3]=.25*y,t[0]=(h-d)/y,t[1]=(l-c)/y,t[2]=(u-s)/y):i>f&&i>v?(y=2*Math.sqrt(1+i-f-v),t[3]=(h-d)/y,t[0]=.25*y,t[1]=(u+s)/y,t[2]=(l+c)/y):f>v?(y=2*Math.sqrt(1+f-i-v),t[3]=(l-c)/y,t[0]=(u+s)/y,t[1]=.25*y,t[2]=(h+d)/y):(y=2*Math.sqrt(1+v-i-f),t[3]=(u-s)/y,t[0]=(l+c)/y,t[1]=(h+d)/y,t[2]=.25*y),t}function cn(t,n,e,r){var a=n[0],o=n[1],i=n[2],u=n[3],c=a+a,s=o+o,f=i+i,h=a*c,l=a*s,d=a*f,v=o*s,p=o*f,y=i*f,m=u*c,g=u*s,M=u*f,b=r[0],x=r[1],S=r[2];return t[0]=(1-(v+y))*b,t[1]=(l+M)*b,t[2]=(d-g)*b,t[3]=0,t[4]=(l-M)*x,t[5]=(1-(h+y))*x,t[6]=(p+m)*x,t[7]=0,t[8]=(d+g)*S,t[9]=(p-m)*S,t[10]=(1-(h+v))*S,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function sn(t,n,e,r,a){var o=n[0],i=n[1],u=n[2],c=n[3],s=o+o,f=i+i,h=u+u,l=o*s,d=o*f,v=o*h,p=i*f,y=i*h,m=u*h,g=c*s,M=c*f,b=c*h,x=r[0],S=r[1],O=r[2],E=a[0],P=a[1],C=a[2],j=(1-(p+m))*x,T=(d+b)*x,A=(v-M)*x,B=(d-b)*S,w=(1-(l+m))*S,k=(y+g)*S,L=(v+M)*O,R=(y-g)*O,N=(1-(l+p))*O;return t[0]=j,t[1]=T,t[2]=A,t[3]=0,t[4]=B,t[5]=w,t[6]=k,t[7]=0,t[8]=L,t[9]=R,t[10]=N,t[11]=0,t[12]=e[0]+E-(j*E+B*P+L*C),t[13]=e[1]+P-(T*E+w*P+R*C),t[14]=e[2]+C-(A*E+k*P+N*C),t[15]=1,t}function fn(t,n){var e=n[0],r=n[1],a=n[2],o=n[3],i=e+e,u=r+r,c=a+a,s=e*i,f=r*i,h=r*u,l=a*i,d=a*u,v=a*c,p=o*i,y=o*u,m=o*c;return t[0]=1-h-v,t[1]=f+m,t[2]=l-y,t[3]=0,t[4]=f-m,t[5]=1-s-v,t[6]=d+p,t[7]=0,t[8]=l+y,t[9]=d-p,t[10]=1-s-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function hn(t,n,e,r,a,o,i){var u=1/(e-n),c=1/(a-r),s=1/(o-i);return t[0]=2*o*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*c,t[6]=0,t[7]=0,t[8]=(e+n)*u,t[9]=(a+r)*c,t[10]=(i+o)*s,t[11]=-1,t[12]=0,t[13]=0,t[14]=i*o*2*s,t[15]=0,t}function ln(t,n,e,r,a){var o,i=1/Math.tan(n/2);return t[0]=i/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=i,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=a&&a!==1/0?(o=1/(r-a),t[10]=(a+r)*o,t[14]=2*a*r*o):(t[10]=-1,t[14]=-2*r),t}var dn=ln;function vn(t,n,e,r,a){var o,i=1/Math.tan(n/2);return t[0]=i/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=i,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=a&&a!==1/0?(o=1/(r-a),t[10]=a*o,t[14]=a*r*o):(t[10]=-1,t[14]=-r),t}function pn(t,n,e,r){var a=Math.tan(n.upDegrees*Math.PI/180),o=Math.tan(n.downDegrees*Math.PI/180),i=Math.tan(n.leftDegrees*Math.PI/180),u=Math.tan(n.rightDegrees*Math.PI/180),c=2/(i+u),s=2/(a+o);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=-(i-u)*c*.5,t[9]=(a-o)*s*.5,t[10]=r/(e-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*e/(e-r),t[15]=0,t}function yn(t,n,e,r,a,o,i){var u=1/(n-e),c=1/(r-a),s=1/(o-i);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*s,t[11]=0,t[12]=(n+e)*u,t[13]=(a+r)*c,t[14]=(i+o)*s,t[15]=1,t}var mn=yn;function gn(t,n,e,r,a,o,i){var u=1/(n-e),c=1/(r-a),s=1/(o-i);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=s,t[11]=0,t[12]=(n+e)*u,t[13]=(a+r)*c,t[14]=o*s,t[15]=1,t}function Mn(t,n,e,r){var a,o,i,u,c,s,f,h,l,d,v=n[0],p=n[1],y=n[2],m=r[0],g=r[1],M=r[2],b=e[0],x=e[1],S=e[2];return Math.abs(v-b)<J&&Math.abs(p-x)<J&&Math.abs(y-S)<J?Yt(t):(f=v-b,h=p-x,l=y-S,a=g*(l*=d=1/Math.hypot(f,h,l))-M*(h*=d),o=M*(f*=d)-m*l,i=m*h-g*f,(d=Math.hypot(a,o,i))?(a*=d=1/d,o*=d,i*=d):(a=0,o=0,i=0),u=h*i-l*o,c=l*a-f*i,s=f*o-h*a,(d=Math.hypot(u,c,s))?(u*=d=1/d,c*=d,s*=d):(u=0,c=0,s=0),t[0]=a,t[1]=u,t[2]=f,t[3]=0,t[4]=o,t[5]=c,t[6]=h,t[7]=0,t[8]=i,t[9]=s,t[10]=l,t[11]=0,t[12]=-(a*v+o*p+i*y),t[13]=-(u*v+c*p+s*y),t[14]=-(f*v+h*p+l*y),t[15]=1,t)}function bn(t,n,e,r){var a=n[0],o=n[1],i=n[2],u=r[0],c=r[1],s=r[2],f=a-e[0],h=o-e[1],l=i-e[2],d=f*f+h*h+l*l;d>0&&(f*=d=1/Math.sqrt(d),h*=d,l*=d);var v=c*l-s*h,p=s*f-u*l,y=u*h-c*f;return(d=v*v+p*p+y*y)>0&&(v*=d=1/Math.sqrt(d),p*=d,y*=d),t[0]=v,t[1]=p,t[2]=y,t[3]=0,t[4]=h*y-l*p,t[5]=l*v-f*y,t[6]=f*p-h*v,t[7]=0,t[8]=f,t[9]=h,t[10]=l,t[11]=0,t[12]=a,t[13]=o,t[14]=i,t[15]=1,t}function xn(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function Sn(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function On(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t[9]=n[9]+e[9],t[10]=n[10]+e[10],t[11]=n[11]+e[11],t[12]=n[12]+e[12],t[13]=n[13]+e[13],t[14]=n[14]+e[14],t[15]=n[15]+e[15],t}function En(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t[9]=n[9]-e[9],t[10]=n[10]-e[10],t[11]=n[11]-e[11],t[12]=n[12]-e[12],t[13]=n[13]-e[13],t[14]=n[14]-e[14],t[15]=n[15]-e[15],t}function Pn(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t[9]=n[9]*e,t[10]=n[10]*e,t[11]=n[11]*e,t[12]=n[12]*e,t[13]=n[13]*e,t[14]=n[14]*e,t[15]=n[15]*e,t}function Cn(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t[9]=n[9]+e[9]*r,t[10]=n[10]+e[10]*r,t[11]=n[11]+e[11]*r,t[12]=n[12]+e[12]*r,t[13]=n[13]+e[13]*r,t[14]=n[14]+e[14]*r,t[15]=n[15]+e[15]*r,t}function jn(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[11]===n[11]&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[15]===n[15]}function Tn(t,n){var e=t[0],r=t[1],a=t[2],o=t[3],i=t[4],u=t[5],c=t[6],s=t[7],f=t[8],h=t[9],l=t[10],d=t[11],v=t[12],p=t[13],y=t[14],m=t[15],g=n[0],M=n[1],b=n[2],x=n[3],S=n[4],O=n[5],E=n[6],P=n[7],C=n[8],j=n[9],T=n[10],A=n[11],B=n[12],w=n[13],k=n[14],L=n[15];return Math.abs(e-g)<=J*Math.max(1,Math.abs(e),Math.abs(g))&&Math.abs(r-M)<=J*Math.max(1,Math.abs(r),Math.abs(M))&&Math.abs(a-b)<=J*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(o-x)<=J*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(i-S)<=J*Math.max(1,Math.abs(i),Math.abs(S))&&Math.abs(u-O)<=J*Math.max(1,Math.abs(u),Math.abs(O))&&Math.abs(c-E)<=J*Math.max(1,Math.abs(c),Math.abs(E))&&Math.abs(s-P)<=J*Math.max(1,Math.abs(s),Math.abs(P))&&Math.abs(f-C)<=J*Math.max(1,Math.abs(f),Math.abs(C))&&Math.abs(h-j)<=J*Math.max(1,Math.abs(h),Math.abs(j))&&Math.abs(l-T)<=J*Math.max(1,Math.abs(l),Math.abs(T))&&Math.abs(d-A)<=J*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(v-B)<=J*Math.max(1,Math.abs(v),Math.abs(B))&&Math.abs(p-w)<=J*Math.max(1,Math.abs(p),Math.abs(w))&&Math.abs(y-k)<=J*Math.max(1,Math.abs(y),Math.abs(k))&&Math.abs(m-L)<=J*Math.max(1,Math.abs(m),Math.abs(L))}var An=Ft,Bn=En;function wn(){var t=new K(3);return K!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function kn(t){var n=new K(3);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}function Ln(t){var n=t[0],e=t[1],r=t[2];return Math.hypot(n,e,r)}function Rn(t,n,e){var r=new K(3);return r[0]=t,r[1]=n,r[2]=e,r}function Nn(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function Dn(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function In(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function Yn(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function Xn(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function qn(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function Gn(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}function _n(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}function Fn(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function $n(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function Vn(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}function Hn(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function Un(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t}function Wn(t,n){var e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2];return Math.hypot(e,r,a)}function zn(t,n){var e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2];return e*e+r*r+a*a}function Qn(t){var n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function Zn(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function Jn(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function Kn(t,n){var e=n[0],r=n[1],a=n[2],o=e*e+r*r+a*a;return o>0&&(o=1/Math.sqrt(o)),t[0]=n[0]*o,t[1]=n[1]*o,t[2]=n[2]*o,t}function te(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function ne(t,n,e){var r=n[0],a=n[1],o=n[2],i=e[0],u=e[1],c=e[2];return t[0]=a*c-o*u,t[1]=o*i-r*c,t[2]=r*u-a*i,t}function ee(t,n,e,r){var a=n[0],o=n[1],i=n[2];return t[0]=a+r*(e[0]-a),t[1]=o+r*(e[1]-o),t[2]=i+r*(e[2]-i),t}function re(t,n,e,r,a,o){var i=o*o,u=i*(2*o-3)+1,c=i*(o-2)+o,s=i*(o-1),f=i*(3-2*o);return t[0]=n[0]*u+e[0]*c+r[0]*s+a[0]*f,t[1]=n[1]*u+e[1]*c+r[1]*s+a[1]*f,t[2]=n[2]*u+e[2]*c+r[2]*s+a[2]*f,t}function ae(t,n,e,r,a,o){var i=1-o,u=i*i,c=o*o,s=u*i,f=3*o*u,h=3*c*i,l=c*o;return t[0]=n[0]*s+e[0]*f+r[0]*h+a[0]*l,t[1]=n[1]*s+e[1]*f+r[1]*h+a[1]*l,t[2]=n[2]*s+e[2]*f+r[2]*h+a[2]*l,t}function oe(t,n){n=n||1;var e=2*tt()*Math.PI,r=2*tt()-1,a=Math.sqrt(1-r*r)*n;return t[0]=Math.cos(e)*a,t[1]=Math.sin(e)*a,t[2]=r*n,t}function ie(t,n,e){var r=n[0],a=n[1],o=n[2],i=e[3]*r+e[7]*a+e[11]*o+e[15];return i=i||1,t[0]=(e[0]*r+e[4]*a+e[8]*o+e[12])/i,t[1]=(e[1]*r+e[5]*a+e[9]*o+e[13])/i,t[2]=(e[2]*r+e[6]*a+e[10]*o+e[14])/i,t}function ue(t,n,e){var r=n[0],a=n[1],o=n[2];return t[0]=r*e[0]+a*e[3]+o*e[6],t[1]=r*e[1]+a*e[4]+o*e[7],t[2]=r*e[2]+a*e[5]+o*e[8],t}function ce(t,n,e){var r=e[0],a=e[1],o=e[2],i=e[3],u=n[0],c=n[1],s=n[2],f=a*s-o*c,h=o*u-r*s,l=r*c-a*u,d=a*l-o*h,v=o*f-r*l,p=r*h-a*f,y=2*i;return f*=y,h*=y,l*=y,d*=2,v*=2,p*=2,t[0]=u+f+d,t[1]=c+h+v,t[2]=s+l+p,t}function se(t,n,e,r){var a=[],o=[];return a[0]=n[0]-e[0],a[1]=n[1]-e[1],a[2]=n[2]-e[2],o[0]=a[0],o[1]=a[1]*Math.cos(r)-a[2]*Math.sin(r),o[2]=a[1]*Math.sin(r)+a[2]*Math.cos(r),t[0]=o[0]+e[0],t[1]=o[1]+e[1],t[2]=o[2]+e[2],t}function fe(t,n,e,r){var a=[],o=[];return a[0]=n[0]-e[0],a[1]=n[1]-e[1],a[2]=n[2]-e[2],o[0]=a[2]*Math.sin(r)+a[0]*Math.cos(r),o[1]=a[1],o[2]=a[2]*Math.cos(r)-a[0]*Math.sin(r),t[0]=o[0]+e[0],t[1]=o[1]+e[1],t[2]=o[2]+e[2],t}function he(t,n,e,r){var a=[],o=[];return a[0]=n[0]-e[0],a[1]=n[1]-e[1],a[2]=n[2]-e[2],o[0]=a[0]*Math.cos(r)-a[1]*Math.sin(r),o[1]=a[0]*Math.sin(r)+a[1]*Math.cos(r),o[2]=a[2],t[0]=o[0]+e[0],t[1]=o[1]+e[1],t[2]=o[2]+e[2],t}function le(t,n){var e=t[0],r=t[1],a=t[2],o=n[0],i=n[1],u=n[2],c=Math.sqrt(e*e+r*r+a*a)*Math.sqrt(o*o+i*i+u*u),s=c&&te(t,n)/c;return Math.acos(Math.min(Math.max(s,-1),1))}function de(t){return t[0]=0,t[1]=0,t[2]=0,t}function ve(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function pe(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function ye(t,n){var e=t[0],r=t[1],a=t[2],o=n[0],i=n[1],u=n[2];return Math.abs(e-o)<=J*Math.max(1,Math.abs(e),Math.abs(o))&&Math.abs(r-i)<=J*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(a-u)<=J*Math.max(1,Math.abs(a),Math.abs(u))}var me,ge=Yn,Me=Xn,be=qn,xe=Wn,Se=zn,Oe=Ln,Ee=Qn,Pe=(me=wn(),function(t,n,e,r,a,o){var i,u;for(n||(n=3),e||(e=0),u=r?Math.min(r*n+e,t.length):t.length,i=e;i<u;i+=n)me[0]=t[i],me[1]=t[i+1],me[2]=t[i+2],a(me,me,o),t[i]=me[0],t[i+1]=me[1],t[i+2]=me[2];return t});function Ce(t){var n=t[0],e=t[1],r=t[2],a=t[3];return Math.hypot(n,e,r,a)}function je(t){var n=t[0],e=t[1],r=t[2],a=t[3];return n*n+e*e+r*r+a*a}!function(){var t,n=(t=new K(4),K!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t)}();function Te(){var t=new K(4);return K!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Ae(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function Be(t,n,e){e*=.5;var r=Math.sin(e);return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=Math.cos(e),t}function we(t,n){var e=2*Math.acos(n[3]),r=Math.sin(e/2);return r>J?(t[0]=n[0]/r,t[1]=n[1]/r,t[2]=n[2]/r):(t[0]=1,t[1]=0,t[2]=0),e}function ke(t,n){var e=ur(t,n);return Math.acos(2*e*e-1)}function Le(t,n,e){var r=n[0],a=n[1],o=n[2],i=n[3],u=e[0],c=e[1],s=e[2],f=e[3];return t[0]=r*f+i*u+a*s-o*c,t[1]=a*f+i*c+o*u-r*s,t[2]=o*f+i*s+r*c-a*u,t[3]=i*f-r*u-a*c-o*s,t}function Re(t,n,e){e*=.5;var r=n[0],a=n[1],o=n[2],i=n[3],u=Math.sin(e),c=Math.cos(e);return t[0]=r*c+i*u,t[1]=a*c+o*u,t[2]=o*c-a*u,t[3]=i*c-r*u,t}function Ne(t,n,e){e*=.5;var r=n[0],a=n[1],o=n[2],i=n[3],u=Math.sin(e),c=Math.cos(e);return t[0]=r*c-o*u,t[1]=a*c+i*u,t[2]=o*c+r*u,t[3]=i*c-a*u,t}function De(t,n,e){e*=.5;var r=n[0],a=n[1],o=n[2],i=n[3],u=Math.sin(e),c=Math.cos(e);return t[0]=r*c+a*u,t[1]=a*c-r*u,t[2]=o*c+i*u,t[3]=i*c-o*u,t}function Ie(t,n){var e=n[0],r=n[1],a=n[2];return t[0]=e,t[1]=r,t[2]=a,t[3]=Math.sqrt(Math.abs(1-e*e-r*r-a*a)),t}function Ye(t,n){var e=n[0],r=n[1],a=n[2],o=n[3],i=Math.sqrt(e*e+r*r+a*a),u=Math.exp(o),c=i>0?u*Math.sin(i)/i:0;return t[0]=e*c,t[1]=r*c,t[2]=a*c,t[3]=u*Math.cos(i),t}function Xe(t,n){var e=n[0],r=n[1],a=n[2],o=n[3],i=Math.sqrt(e*e+r*r+a*a),u=i>0?Math.atan2(i,o)/i:0;return t[0]=e*u,t[1]=r*u,t[2]=a*u,t[3]=.5*Math.log(e*e+r*r+a*a+o*o),t}function qe(t,n,e){return Xe(t,n),ir(t,t,e),Ye(t,t),t}function Ge(t,n,e,r){var a,o,i,u,c,s=n[0],f=n[1],h=n[2],l=n[3],d=e[0],v=e[1],p=e[2],y=e[3];return(o=s*d+f*v+h*p+l*y)<0&&(o=-o,d=-d,v=-v,p=-p,y=-y),1-o>J?(a=Math.acos(o),i=Math.sin(a),u=Math.sin((1-r)*a)/i,c=Math.sin(r*a)/i):(u=1-r,c=r),t[0]=u*s+c*d,t[1]=u*f+c*v,t[2]=u*h+c*p,t[3]=u*l+c*y,t}function _e(t){var n=tt(),e=tt(),r=tt(),a=Math.sqrt(1-n),o=Math.sqrt(n);return t[0]=a*Math.sin(2*Math.PI*e),t[1]=a*Math.cos(2*Math.PI*e),t[2]=o*Math.sin(2*Math.PI*r),t[3]=o*Math.cos(2*Math.PI*r),t}function Fe(t,n){var e=n[0],r=n[1],a=n[2],o=n[3],i=e*e+r*r+a*a+o*o,u=i?1/i:0;return t[0]=-e*u,t[1]=-r*u,t[2]=-a*u,t[3]=o*u,t}function $e(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t}function Ve(t,n){var e,r=n[0]+n[4]+n[8];if(r>0)e=Math.sqrt(r+1),t[3]=.5*e,e=.5/e,t[0]=(n[5]-n[7])*e,t[1]=(n[6]-n[2])*e,t[2]=(n[1]-n[3])*e;else{var a=0;n[4]>n[0]&&(a=1),n[8]>n[3*a+a]&&(a=2);var o=(a+1)%3,i=(a+2)%3;e=Math.sqrt(n[3*a+a]-n[3*o+o]-n[3*i+i]+1),t[a]=.5*e,e=.5/e,t[3]=(n[3*o+i]-n[3*i+o])*e,t[o]=(n[3*o+a]+n[3*a+o])*e,t[i]=(n[3*i+a]+n[3*a+i])*e}return t}function He(t,n,e,r){var a=.5*Math.PI/180;n*=a,e*=a,r*=a;var o=Math.sin(n),i=Math.cos(n),u=Math.sin(e),c=Math.cos(e),s=Math.sin(r),f=Math.cos(r);return t[0]=o*c*f-i*u*s,t[1]=i*u*f+o*c*s,t[2]=i*c*s-o*u*f,t[3]=i*c*f+o*u*s,t}function Ue(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var We,ze,Qe,Ze,Je,Ke,tr=function(t){var n=new K(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n},nr=function(t,n,e,r){var a=new K(4);return a[0]=t,a[1]=n,a[2]=e,a[3]=r,a},er=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t},rr=function(t,n,e,r,a){return t[0]=n,t[1]=e,t[2]=r,t[3]=a,t},ar=function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t},or=Le,ir=function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t},ur=function(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]},cr=function(t,n,e,r){var a=n[0],o=n[1],i=n[2],u=n[3];return t[0]=a+r*(e[0]-a),t[1]=o+r*(e[1]-o),t[2]=i+r*(e[2]-i),t[3]=u+r*(e[3]-u),t},sr=Ce,fr=sr,hr=je,lr=hr,dr=function(t,n){var e=n[0],r=n[1],a=n[2],o=n[3],i=e*e+r*r+a*a+o*o;return i>0&&(i=1/Math.sqrt(i)),t[0]=e*i,t[1]=r*i,t[2]=a*i,t[3]=o*i,t},vr=function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]},pr=function(t,n){var e=t[0],r=t[1],a=t[2],o=t[3],i=n[0],u=n[1],c=n[2],s=n[3];return Math.abs(e-i)<=J*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(r-u)<=J*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(a-c)<=J*Math.max(1,Math.abs(a),Math.abs(c))&&Math.abs(o-s)<=J*Math.max(1,Math.abs(o),Math.abs(s))},yr=(We=wn(),ze=Rn(1,0,0),Qe=Rn(0,1,0),function(t,n,e){var r=te(n,e);return r<-.999999?(ne(We,ze,n),Oe(We)<1e-6&&ne(We,Qe,n),Kn(We,We),Be(t,We,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(ne(We,n,e),t[0]=We[0],t[1]=We[1],t[2]=We[2],t[3]=1+r,dr(t,t))}),mr=(Ze=Te(),Je=Te(),function(t,n,e,r,a,o){return Ge(Ze,n,a,o),Ge(Je,e,r,o),Ge(t,Ze,Je,2*o*(1-o)),t}),gr=(Ke=nt(),function(t,n,e,r){return Ke[0]=e[0],Ke[3]=e[1],Ke[6]=e[2],Ke[1]=r[0],Ke[4]=r[1],Ke[7]=r[2],Ke[2]=-n[0],Ke[5]=-n[1],Ke[8]=-n[2],dr(t,Ve(t,Ke))});function Mr(){var t=new K(2);return K!=Float32Array&&(t[0]=0,t[1]=0),t}function br(t){var n=new K(2);return n[0]=t[0],n[1]=t[1],n}function xr(t,n){var e=new K(2);return e[0]=t,e[1]=n,e}function Sr(t,n){return t[0]=n[0],t[1]=n[1],t}function Or(t,n,e){return t[0]=n,t[1]=e,t}function Er(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t}function Pr(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t}function Cr(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t}function jr(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t}function Tr(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t}function Ar(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t}function Br(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t}function wr(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t}function kr(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t}function Lr(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t}function Rr(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t}function Nr(t,n){var e=n[0]-t[0],r=n[1]-t[1];return Math.hypot(e,r)}function Dr(t,n){var e=n[0]-t[0],r=n[1]-t[1];return e*e+r*r}function Ir(t){var n=t[0],e=t[1];return Math.hypot(n,e)}function Yr(t){var n=t[0],e=t[1];return n*n+e*e}function Xr(t,n){return t[0]=-n[0],t[1]=-n[1],t}function qr(t,n){return t[0]=1/n[0],t[1]=1/n[1],t}function Gr(t,n){var e=n[0],r=n[1],a=e*e+r*r;return a>0&&(a=1/Math.sqrt(a)),t[0]=n[0]*a,t[1]=n[1]*a,t}function _r(t,n){return t[0]*n[0]+t[1]*n[1]}function Fr(t,n,e){var r=n[0]*e[1]-n[1]*e[0];return t[0]=t[1]=0,t[2]=r,t}function $r(t,n,e,r){var a=n[0],o=n[1];return t[0]=a+r*(e[0]-a),t[1]=o+r*(e[1]-o),t}function Vr(t,n){n=n||1;var e=2*tt()*Math.PI;return t[0]=Math.cos(e)*n,t[1]=Math.sin(e)*n,t}function Hr(t,n,e){var r=n[0],a=n[1];return t[0]=e[0]*r+e[2]*a,t[1]=e[1]*r+e[3]*a,t}function Ur(t,n,e){var r=n[0],a=n[1];return t[0]=e[0]*r+e[2]*a+e[4],t[1]=e[1]*r+e[3]*a+e[5],t}function Wr(t,n,e){var r=n[0],a=n[1];return t[0]=e[0]*r+e[3]*a+e[6],t[1]=e[1]*r+e[4]*a+e[7],t}function zr(t,n,e){var r=n[0],a=n[1];return t[0]=e[0]*r+e[4]*a+e[12],t[1]=e[1]*r+e[5]*a+e[13],t}function Qr(t,n,e,r){var a=n[0]-e[0],o=n[1]-e[1],i=Math.sin(r),u=Math.cos(r);return t[0]=a*u-o*i+e[0],t[1]=a*i+o*u+e[1],t}function Zr(t,n){var e=t[0],r=t[1],a=n[0],o=n[1],i=Math.sqrt(e*e+r*r)*Math.sqrt(a*a+o*o),u=i&&(e*a+r*o)/i;return Math.acos(Math.min(Math.max(u,-1),1))}function Jr(t){return t[0]=0,t[1]=0,t}function Kr(t){return"vec2("+t[0]+", "+t[1]+")"}function ta(t,n){return t[0]===n[0]&&t[1]===n[1]}function na(t,n){var e=t[0],r=t[1],a=n[0],o=n[1];return Math.abs(e-a)<=J*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(r-o)<=J*Math.max(1,Math.abs(r),Math.abs(o))}var ea=Ir,ra=Pr,aa=Cr,oa=jr,ia=Nr,ua=Dr,ca=Yr,sa=function(){var t=Mr();return function(n,e,r,a,o,i){var u,c;for(e||(e=2),r||(r=0),c=a?Math.min(a*e+r,n.length):n.length,u=r;u<c;u+=e)t[0]=n[u],t[1]=n[u+1],o(t,t,i),n[u]=t[0],n[u+1]=t[1];return n}}(),fa=function(){function t(){}return t.tag="c-canvas-rbush-node",t}(),ha="RBushRoot",la=function(){function t(){this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.enableBatch=!1,this.batchedStyleHash="",this.batchedDisplayObject=null,this.toSync=new Set}var n;return n=t,t.prototype.syncRTree=function(){var t=this,n=[];Array.from(this.toSync).filter((function(t){return t.isConnected})).forEach((function(e){var r=e.rBushNode;r&&t.rBush.remove(r.aabb);var a=e.getRenderBounds();if(a){var o=m(a.getMin(),2),i=o[0],u=o[1],c=m(a.getMax(),2),s=c[0],f=c[1];r.aabb={id:e.entity,minX:i,minY:u,maxX:s,maxY:f}}r.aabb&&n.push(r.aabb)})),this.rBush.load(n),this.toSync.clear()},t.prototype.pushToSync=function(t){var n=this;t.forEach((function(t){n.toSync.add(t)}))},t.prototype.apply=function(t){var e=this,r=function(t){t.target.rBushNode=new fa,e.pushToSync(t.composedPath().slice(0,-2))},a=function(t){var n=t.target,r=n.rBushNode;r.aabb&&(e.rBush.remove(r.aabb),e.toSync.delete(n),e.removedRBushNodeAABBs.push(r.aabb))},o=function(t){var n,r=t.target;(null===(n=r.ownerDocument)||void 0===n?void 0:n.documentElement)===e.renderingContext.root&&(t.detail.affectChildren&&r.forEach((function(t){e.pushToSync([t])})),e.pushToSync(t.composedPath().slice(0,-2)))};t.hooks.init.tap(n.tag,(function(){e.renderingContext.root.addEventListener(M.ElementEvent.MOUNTED,r),e.renderingContext.root.addEventListener(M.ElementEvent.UNMOUNTED,a),e.renderingContext.root.addEventListener(M.ElementEvent.BOUNDS_CHANGED,o)})),t.hooks.destroy.tap(n.tag,(function(){e.renderingContext.root.removeEventListener(M.ElementEvent.MOUNTED,r),e.renderingContext.root.removeEventListener(M.ElementEvent.UNMOUNTED,a),e.renderingContext.root.removeEventListener(M.ElementEvent.BOUNDS_CHANGED,o)})),t.hooks.beginFrame.tap(n.tag,(function(){var t=e.contextService.getContext(),n=e.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering;e.clearFullScreen=!n||e.renderingContext.renderReasons.has(M.RenderReason.CAMERA_CHANGED),t&&(t.save(),e.clearFullScreen&&t.clearRect(0,0,e.canvasConfig.width,e.canvasConfig.height),e.applyTransform(t,e.camera.getOrthoMatrix()))})),t.hooks.endFrame.tap(n.tag,(function(){e.syncRTree();var n=e.canvasConfig.renderer.getConfig(),r=n.enableDirtyRectangleRendering,a=n.enableDirtyRectangleRenderingDebug,o=e.contextService.getContext(),u=e.renderQueue;if(r){if(!e.clearFullScreen){var c=e.safeMergeAABB.apply(e,g([e.mergeDirtyAABBs(e.renderQueue)],m(e.removedRBushNodeAABBs.map((function(t){var n=t.minX,e=t.minY,r=t.maxX,a=t.maxY,o=new M.AABB;return o.setMinMax(i.fromValues(n,e,0),i.fromValues(r,a,0)),o}))),!1));if(e.removedRBushNodeAABBs=[],M.AABB.isEmpty(c))return void(e.renderQueue=[]);var s=e.convertAABB2Rect(c),f=s.x,h=s.y,l=s.width,d=s.height;o.clearRect(f,h,l,d),o.beginPath(),o.rect(f,h,l,d),o.clip(),a&&(o.lineWidth=4,o.strokeStyle="rgba(".concat(255*Math.random(),", ").concat(255*Math.random(),", ").concat(255*Math.random(),", 1)"),o.strokeRect(f,h,l,d)),u=e.searchDirtyObjects(c)}u.sort((function(t,n){return t.sortable.renderOrder-n.sortable.renderOrder})).forEach((function(n){n&&n.isVisible()&&e.renderDisplayObject(n,t)})),e.enableBatch&&e.batchedStyleHash&&e.flush(o,t),e.renderQueue.forEach((function(t){e.saveDirtyAABB(t)})),e.renderQueue=[]}e.restoreStack.forEach((function(t){o.restore()})),e.restoreStack=[],e.clearFullScreen=!1,o.restore()})),t.hooks.render.tap(n.tag,(function(n){e.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering?e.renderQueue.push(n):e.renderDisplayObject(n,t)}))},t.prototype.flush=function(t,n){if(this.batchedDisplayObject){var e=this.styleRendererFactory(this.batchedDisplayObject.nodeName);e&&(this.applyAttributesToContext(t,this.batchedDisplayObject,n),t.closePath(),e.render(t,this.batchedDisplayObject.parsedStyle,this.batchedDisplayObject),t.restore()),this.batchedStyleHash="",this.batchedDisplayObject=null}},t.prototype.renderDisplayObject=function(t,n){for(var e=this,r=this.contextService.getContext(),a=this.restoreStack[this.restoreStack.length-1];a&&t.parentNode!==a;)r.restore(),this.restoreStack.pop(),a=this.restoreStack[this.restoreStack.length-1];var o=t.nodeName,i=this.styleRendererFactory(o),u=!1;if(this.enableBatch&&i){var c=i.hash(t.attributes);this.batchedStyleHash&&c!==this.batchedStyleHash&&this.flush(r,n),this.batchedStyleHash||(this.batchedStyleHash=c,this.batchedDisplayObject=t,u=!0)}r.save(),this.applyTransform(r,t.getLocalTransform());var s=t.style.clipPath;if(s){r.save(),this.applyTransform(r,s.getLocalTransform());var f=this.pathGeneratorFactory(s.nodeName);f&&this.useAnchor(r,s,(function(){r.beginPath(),f(r,s.parsedStyle),r.closePath()})),r.restore(),r.clip()}this.enableBatch||(r.save(),this.applyAttributesToContext(r,t,n)),this.useAnchor(r,t,(function(){var n=e.pathGeneratorFactory(t.nodeName);n&&(!u&&e.enableBatch||r.beginPath(),n(r,t.parsedStyle),e.enableBatch||t.nodeName===M.Shape.LINE||t.nodeName===M.Shape.PATH||t.nodeName===M.Shape.POLYLINE||r.closePath()),i&&!e.enableBatch&&i.render(r,t.parsedStyle,t)})),this.enableBatch||r.restore(),t.renderable.dirty=!1,this.restoreStack.push(t)},t.prototype.convertAABB2Rect=function(t){var n=t.getMin(),e=t.getMax(),r=Math.floor(n[0]),a=Math.floor(n[1]);return{x:r,y:a,width:Math.ceil(e[0])-r,height:Math.ceil(e[1])-a}},t.prototype.mergeDirtyAABBs=function(t){var n=new M.AABB;return t.forEach((function(t){var e=t.getRenderBounds();n.add(e);var r=t.renderable.dirtyRenderBounds;r&&n.add(r)})),n},t.prototype.searchDirtyObjects=function(t){var n=this,e=m(t.getMin(),2),r=e[0],a=e[1],o=m(t.getMax(),2),i=o[0],u=o[1];return this.rBush.search({minX:r,minY:a,maxX:i,maxY:u}).map((function(t){var e=t.id;return n.displayObjectPool.getByEntity(e)}))},t.prototype.saveDirtyAABB=function(t){var n=t.renderable;n.dirtyRenderBounds||(n.dirtyRenderBounds=new M.AABB);var e=t.getRenderBounds();e&&n.dirtyRenderBounds.update(e.center,e.halfExtents)},t.prototype.applyTransform=function(t,n){var e=m(o.getTranslation(i.create(),n),2),r=e[0],a=e[1],c=m(o.getScaling(i.create(),n),2),s=c[0],f=c[1],h=o.getRotation(u.create(),n),l=m(Object(M.getEuler)(i.create(),h),3),d=l[0],v=(l[1],l[2]),p=Object(M.fromRotationTranslationScale)(d||v,r,a,s,f);t.transform(p[0],p[1],p[3],p[4],p[6],p[7])},t.prototype.getColor=function(t,n,e,r){var a;if(t instanceof M.CSSGradientValue){if(t.type===M.GradientPatternType.LinearGradient||t.type===M.GradientPatternType.RadialGradient){var o=n.getGeometryBounds(),i=o&&2*o.halfExtents[0]||0,u=o&&2*o.halfExtents[1]||0;a=this.gradientPool.getOrCreateGradient(d(d({type:t.type},t.value),{width:i,height:u}),e)}else if(t.type===M.GradientPatternType.Pattern){var c=this.imagePool.getPatternSync(t.value);c?a=c:this.imagePool.createPattern(t.value,e).then((function(){n.renderable.dirty=!0,r.dirtify()}))}}else a=t.toString();return a},t.prototype.applyAttributesToContext=function(t,n,e){var r=n.parsedStyle,a=r.stroke,o=r.fill,i=r.opacity,u=r.lineDash,c=r.lineDashOffset,s=r.filter,f=r.shadowColor,h=r.shadowBlur,l=r.shadowOffsetX,d=r.shadowOffsetY;u&&F(u)&&t.setLineDash(u.map((function(t){return t.value}))),A(c)||(t.lineDashOffset=c.value),A(i)||(t.globalAlpha*=i.value),A(a)||(t.strokeStyle=this.getColor(a,n,t,e)),A(o)||(t.fillStyle=this.getColor(o,n,t,e)),A(s)||(t.filter=n.style.filter),A(f)||(t.shadowColor=f.toString(),t.shadowBlur=h&&h.value||0,t.shadowOffsetX=l&&l.value||0,t.shadowOffsetY=d&&d.value||0)},t.prototype.useAnchor=function(t,n,e){var r=n.getGeometryBounds();if(r){var a=r.halfExtents,o=(n.parsedStyle||{}).anchor;t.translate(-(o&&o[0].value||0)*a[0]*2,-(o&&o[1].value||0)*a[1]*2),e()}else e()},t.prototype.safeMergeAABB=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=new M.AABB;return t.forEach((function(t){e.add(t)})),e},t.tag="CanvasRendererPlugin",v([Object(b.inject)(M.CanvasConfig),p("design:type",Object)],t.prototype,"canvasConfig",void 0),v([Object(b.inject)(M.DefaultCamera),p("design:type",M.Camera)],t.prototype,"camera",void 0),v([Object(b.inject)(M.ContextService),p("design:type",Object)],t.prototype,"contextService",void 0),v([Object(b.inject)(M.RenderingContext),p("design:type",Object)],t.prototype,"renderingContext",void 0),v([Object(b.inject)(H),p("design:type",H)],t.prototype,"imagePool",void 0),v([Object(b.inject)(z),p("design:type",z)],t.prototype,"gradientPool",void 0),v([Object(b.inject)(Q),p("design:type",Function)],t.prototype,"pathGeneratorFactory",void 0),v([Object(b.inject)(j),p("design:type",Function)],t.prototype,"styleRendererFactory",void 0),v([Object(b.inject)(M.DisplayObjectPool),p("design:type",M.DisplayObjectPool)],t.prototype,"displayObjectPool",void 0),v([Object(b.inject)(ha),p("design:type",C.a)],t.prototype,"rBush",void 0),t=n=v([Object(b.singleton)({contrib:M.RenderingPluginContribution})],t)}(),da=function(){function t(){}var n;return n=t,t.prototype.apply=function(t){var e=this,r=function(n){var r=n.target,a=r.nodeName,o=r.attributes;if(a===M.Shape.IMAGE){var i=o.img;V(i)&&e.imagePool.getOrCreateImage(i).then((function(){r.renderable.dirty=!0,t.dirtify()}))}},a=function(n){var r=n.target,a=n.attrName,o=n.newValue;r.nodeName===M.Shape.IMAGE&&"img"===a&&V(o)&&e.imagePool.getOrCreateImage(o).then((function(){r.renderable.dirty=!0,t.dirtify()}))};t.hooks.init.tap(n.tag,(function(){e.renderingContext.root.addEventListener(M.ElementEvent.MOUNTED,r),e.renderingContext.root.addEventListener(M.ElementEvent.ATTR_MODIFIED,a)})),t.hooks.destroy.tap(n.tag,(function(){e.renderingContext.root.removeEventListener(M.ElementEvent.MOUNTED,r),e.renderingContext.root.removeEventListener(M.ElementEvent.ATTR_MODIFIED,a)}))},t.tag="LoadImagePlugin",v([Object(b.inject)(H),p("design:type",H)],t.prototype,"imagePool",void 0),v([Object(b.inject)(M.RenderingContext),p("design:type",Object)],t.prototype,"renderingContext",void 0),t=n=v([Object(b.singleton)({contrib:M.RenderingPluginContribution})],t)}();b.GlobalContainer.register({token:{token:Z,named:M.Shape.CIRCLE},useValue:function(t,n){var e=n.r;t.arc(e.value,e.value,e.value,0,2*Math.PI,!1)}}),b.GlobalContainer.register({token:{token:Z,named:M.Shape.ELLIPSE},useValue:function(t,n){var e=n.rx,r=n.ry,a=e.value,o=r.value;if(t.ellipse)t.ellipse(a,o,a,o,0,0,2*Math.PI,!1);else{var i=a>o?a:o,u=a>o?1:a/o,c=a>o?o/a:1;t.save(),t.scale(u,c),t.arc(0,0,i,0,2*Math.PI)}}}),b.GlobalContainer.register({token:{token:Z,named:M.Shape.RECT},useValue:function(t,n){var e=n.radius,r=n.width,a=n.height,o=r.value,i=a.value,u=e&&e.value||0;if(0===u)t.rect(0,0,o,i);else{var c=m(function(t){var n=0,e=0,r=0,a=0;return F(t)?1===t.length?n=e=r=a=t[0]:2===t.length?(n=r=t[0],e=a=t[1]):3===t.length?(n=t[0],e=a=t[1],r=t[2]):(n=t[0],e=t[1],r=t[2],a=t[3]):n=e=r=a=t,[n,e,r,a]}(u),4),s=c[0],f=c[1],h=c[2],l=c[3];t.moveTo(s,0),t.lineTo(o-f,0),0!==f&&t.arc(o-f,f,f,-Math.PI/2,0),t.lineTo(o,i-h),0!==h&&t.arc(o-h,i-h,h,0,Math.PI/2),t.lineTo(l,i),0!==l&&t.arc(l,i-l,l,Math.PI/2,Math.PI),t.lineTo(0,s),0!==s&&t.arc(s,s,s,Math.PI,1.5*Math.PI)}}}),b.GlobalContainer.register({token:{token:Z,named:M.Shape.LINE},useValue:function(t,n){var e=n.x1,r=n.y1,a=n.x2,o=n.y2,i=n.defX,u=void 0===i?0:i,c=n.defY,s=void 0===c?0:c;t.moveTo(e.value-u,r.value-s),t.lineTo(a.value-u,o.value-s)}}),b.GlobalContainer.register({token:{token:Z,named:M.Shape.POLYLINE},useValue:function(t,n){var e=n.defX,r=void 0===e?0:e,a=n.defY,o=void 0===a?0:a,i=n.points.points,u=i.length,c=i[0][0]-r,s=i[0][1]-o,f=i[u-1][0]-r,h=i[u-1][1]-o;t.moveTo(c,s);for(var l=0;l<u-1;l++){var d=i[l];t.lineTo(d[0]-r,d[1]-o)}t.lineTo(f,h)}}),b.GlobalContainer.register({token:{token:Z,named:M.Shape.POLYGON},useValue:function(t,n){var e=n.defX,r=void 0===e?0:e,a=n.defY,o=void 0===a?0:a,i=n.points.points,u=i.length,c=i[0][0]-r,s=i[0][1]-o,f=i[u-1][0]-r,h=i[u-1][1]-o;t.moveTo(c,s);for(var l=0;l<u-1;l++){var d=i[l];t.lineTo(d[0]-r,d[1]-o)}t.lineTo(f,h)}}),b.GlobalContainer.register({token:{token:Z,named:M.Shape.PATH},useValue:function(t,n){var e=n.defX,r=void 0===e?0:e,a=n.defY,o=void 0===a?0:a,i=n.path,u=i.curve,c=i.zCommandIndexes,s=u;c.forEach((function(t,n){s.splice(t+n,0,["Z"])}));for(var f=0;f<s.length;f++){var h=s[f];switch(h[0]){case"M":t.moveTo(h[1]-r,h[2]-o);break;case"C":t.bezierCurveTo(h[1]-r,h[2]-o,h[3]-r,h[4]-o,h[5]-r,h[6]-o);break;case"Z":t.closePath()}}}}),b.GlobalContainer.register({token:Q,useFactory:function(t){var n={};return function(e){return n[e]||t.container.isBoundNamed(Z,e)&&(n[e]=t.container.getNamed(Z,e)),n[e]}}});var va=Object(b.Module)((function(t){t(H),t({token:ha,useValue:new C.a}),t(B),t(U),t(W),t({token:j,useFactory:function(t){var n={};return function(e){return n[e]||t.container.isBoundNamed(T,e)&&(n[e]=t.container.getNamed(T,e)),n[e]}}}),t(z),t(la),t(da)})),pa=function(){function t(){}return t.prototype.init=function(t){t.load(va,!0)},t.prototype.destroy=function(t){t.unload(va)},t}(),ya=b.Syringe.defineToken("PointInPathPicker"),ma=function(){function t(){var t=this;this.isHit=function(n,e,r){var a=t.pointInPathPickerFactory(n.nodeName);if(a){var u=o.invert(o.create(),r),c=i.transformMat4(i.create(),i.fromValues(e[0],e[1],0),u),s=n.getGeometryBounds().halfExtents,f=n.parsedStyle.anchor;if(c[0]+=(f&&f[0].value||0)*s[0]*2,c[1]+=(f&&f[1].value||0)*s[1]*2,a(n,new M.Point(c[0],c[1]),t.isPointInPath))return!0}return!1},this.isPointInPath=function(n,e){var r=t.offscreenCanvas.getOrCreateContext(t.canvasConfig.offscreenCanvas),a=t.pathGeneratorFactory(n.nodeName);return a&&a(r,n.parsedStyle),r.isPointInPath(e.x,e.y)}}var n;return n=t,t.prototype.apply=function(t){var e=this;t.hooks.pick.tap(n.tag,(function(t){var n,r,a=t.topmost,u=t.position,c=u.x,s=u.y,f=i.fromValues(c,s,0),h=e.rBush.search({minX:f[0],minY:f[1],maxX:f[0],maxY:f[1]}),l=h.map((function(t){return t.id})),d=[];h.forEach((function(t){var n=t.id,r=e.displayObjectPool.getByEntity(n);if(r.isVisible()&&!r.isCulled()&&r.isInteractive()){if(r.parentNode&&-1===l.indexOf(r.parentNode.entity))return;d.push(r)}})),d.sort((function(t,n){return n.sortable.renderOrder-t.sortable.renderOrder}));var v=[];try{for(var p=y(d),m=p.next();!m.done;m=p.next()){var g=m.value,M=g.parsedStyle.clipPath,b=M||g,x=g.getWorldTransform();if(M&&(x=o.multiply(o.create(),x,M.getLocalTransform())),e.isHit(b,f,x)){if(a)return t.picked=[g],t;v.push(g)}}}catch(t){n={error:t}}finally{try{m&&!m.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}return t.picked=v,t}))},t.tag="CanvasPickerPlugin",v([Object(b.inject)(M.DisplayObjectPool),p("design:type",M.DisplayObjectPool)],t.prototype,"displayObjectPool",void 0),v([Object(b.inject)(M.CanvasConfig),p("design:type",Object)],t.prototype,"canvasConfig",void 0),v([Object(b.inject)(M.OffscreenCanvasCreator),p("design:type",M.OffscreenCanvasCreator)],t.prototype,"offscreenCanvas",void 0),v([Object(b.inject)(ha),p("design:type",Function)],t.prototype,"rBush",void 0),v([Object(b.inject)(Q),p("design:type",Function)],t.prototype,"pathGeneratorFactory",void 0),v([Object(b.inject)(ya),p("design:type",Function)],t.prototype,"pointInPathPickerFactory",void 0),t=n=v([Object(b.singleton)({contrib:M.RenderingPluginContribution})],t)}();var ga=function(t){return"symbol"==typeof t||$(t)&&"[object Symbol]"==_(t)};var Ma=function(t,n,e){for(var r=-1,a=t.length;++r<a;){var o=t[r],i=n(o);if(null!=i&&(void 0===u?i==i&&!ga(i):e(i,u)))var u=i,c=o}return c};var ba=function(t,n){return t<n};var xa=function(t){return t};var Sa=function(t){return t&&t.length?Ma(t,xa,ba):void 0};var Oa=function(t,n){return t>n};var Ea=function(t){return t&&t.length?Ma(t,xa,Oa):void 0};function Pa(t,n,e,r){var a=t-e,o=n-r;return Math.sqrt(a*a+o*o)}function Ca(t,n){return Math.abs(t-n)<.001}function ja(t,n){var e=Sa(t),r=Sa(n);return{x:e,y:r,width:Ea(t)-e,height:Ea(n)-r}}function Ta(t){return(t+2*Math.PI)%(2*Math.PI)}var Aa={box:function(t,n,e,r){return ja([t,e],[n,r])},length:function(t,n,e,r){return Pa(t,n,e,r)},pointAt:function(t,n,e,r,a){return{x:(1-a)*t+a*e,y:(1-a)*n+a*r}},pointDistance:function(t,n,e,r,a,o){var i=(e-t)*(a-t)+(r-n)*(o-n);return i<0?Pa(t,n,a,o):i>(e-t)*(e-t)+(r-n)*(r-n)?Pa(e,r,a,o):this.pointToLine(t,n,e,r,a,o)},pointToLine:function(t,n,e,r,a,o){var i=[e-t,r-n];if(c.exactEquals(i,[0,0]))return Math.sqrt((a-t)*(a-t)+(o-n)*(o-n));var u=[-i[1],i[0]];c.normalize(u,u);var s=[a-t,o-n];return Math.abs(c.dot(s,u))},tangentAngle:function(t,n,e,r){return Math.atan2(r-n,e-t)}};function Ba(t,n,e,r,a,o){var i=-1,u=1/0,c=[e,r],s=20;o&&o>200&&(s=o/10);for(var f=1/s,h=f/10,l=0;l<=s;l++){var d=l*f,v=[a.apply(void 0,g([],m(t.concat([d])),!1)),a.apply(void 0,g([],m(n.concat([d])),!1))];(b=Pa(c[0],c[1],v[0],v[1]))<u&&(i=d,u=b)}if(0===i)return{x:t[0],y:n[0]};if(1===i){var p=t.length;return{x:t[p-1],y:n[p-1]}}u=1/0;for(l=0;l<32&&!(h<1e-4);l++){var y=i-h,M=i+h,b=(v=[a.apply(void 0,g([],m(t.concat([y])),!1)),a.apply(void 0,g([],m(n.concat([y])),!1))],Pa(c[0],c[1],v[0],v[1]));if(y>=0&&b<u)i=y,u=b;else{var x=[a.apply(void 0,g([],m(t.concat([M])),!1)),a.apply(void 0,g([],m(n.concat([M])),!1))],S=Pa(c[0],c[1],x[0],x[1]);M<=1&&S<u?(i=M,u=S):h*=.5}}return{x:a.apply(void 0,g([],m(t.concat([i])),!1)),y:a.apply(void 0,g([],m(n.concat([i])),!1))}}function wa(t,n,e,r){var a=1-r;return a*a*t+2*r*a*n+r*r*e}function ka(t,n,e){var r=t+e-2*n;if(Ca(r,0))return[.5];var a=(t-n)/r;return a<=1&&a>=0?[a]:[]}function La(t,n,e,r){return 2*(1-r)*(n-t)+2*r*(e-n)}function Ra(t,n,e,r,a,o,i){var u=wa(t,e,a,i),c=wa(n,r,o,i),s=Aa.pointAt(t,n,e,r,i),f=Aa.pointAt(e,r,a,o,i);return[[t,n,s.x,s.y,u,c],[u,c,f.x,f.y,a,o]]}var Na={box:function(t,n,e,r,a,o){var i=ka(t,e,a)[0],u=ka(n,r,o)[0],c=[t,a],s=[n,o];return void 0!==i&&c.push(wa(t,e,a,i)),void 0!==u&&s.push(wa(n,r,o,u)),ja(c,s)},length:function(t,n,e,r,a,o){return function t(n,e,r,a,o,i,u){if(0===u)return(Pa(n,e,r,a)+Pa(r,a,o,i)+Pa(n,e,o,i))/2;var c=Ra(n,e,r,a,o,i,.5),s=c[0],f=c[1];return s.push(u-1),f.push(u-1),t.apply(void 0,g([],m(s),!1))+t.apply(void 0,g([],m(f),!1))}(t,n,e,r,a,o,3)},nearestPoint:function(t,n,e,r,a,o,i,u){return Ba([t,e,a],[n,r,o],i,u,wa)},pointDistance:function(t,n,e,r,a,o,i,u){var c=this.nearestPoint(t,n,e,r,a,o,i,u);return Pa(c.x,c.y,i,u)},interpolationAt:wa,pointAt:function(t,n,e,r,a,o,i){return{x:wa(t,e,a,i),y:wa(n,r,o,i)}},divide:function(t,n,e,r,a,o,i){return Ra(t,n,e,r,a,o,i)},tangentAngle:function(t,n,e,r,a,o,i){var u=La(t,e,a,i),c=La(n,r,o,i);return Ta(Math.atan2(c,u))}};function Da(t,n,e,r,a){var o=1-a;return o*o*o*t+3*n*a*o*o+3*e*a*a*o+r*a*a*a}function Ia(t,n,e,r,a){var o=1-a;return 3*(o*o*(n-t)+2*o*a*(e-n)+a*a*(r-e))}function Ya(t,n,e,r){var a,o,i,u=-3*t+9*n-9*e+3*r,c=6*t-12*n+6*e,s=3*n-3*t,f=[];if(Ca(u,0))Ca(c,0)||(a=-s/c)>=0&&a<=1&&f.push(a);else{var h=c*c-4*u*s;Ca(h,0)?f.push(-c/(2*u)):h>0&&(o=(-c-(i=Math.sqrt(h)))/(2*u),(a=(-c+i)/(2*u))>=0&&a<=1&&f.push(a),o>=0&&o<=1&&f.push(o))}return f}function Xa(t,n,e,r,a,o,i,u,c){var s=Da(t,e,a,i,c),f=Da(n,r,o,u,c),h=Aa.pointAt(t,n,e,r,c),l=Aa.pointAt(e,r,a,o,c),d=Aa.pointAt(a,o,i,u,c),v=Aa.pointAt(h.x,h.y,l.x,l.y,c),p=Aa.pointAt(l.x,l.y,d.x,d.y,c);return[[t,n,h.x,h.y,v.x,v.y,s,f],[s,f,p.x,p.y,d.x,d.y,i,u]]}function qa(t,n,e,r,a,o,i,u,c){if(0===c)return function(t,n){for(var e=0,r=t.length,a=0;a<r;a++){e+=Pa(t[a],n[a],t[(a+1)%r],n[(a+1)%r])}return e/2}([t,e,a,i],[n,r,o,u]);var s=Xa(t,n,e,r,a,o,i,u,.5),f=g(g([],m(s[0]),!1),[c-1],!1),h=g(g([],m(s[1]),!1),[c-1],!1);return qa.apply(void 0,g([],m(f),!1))+qa.apply(void 0,g([],m(h),!1))}var Ga={extrema:Ya,box:function(t,n,e,r,a,o,i,u){for(var c=[t,i],s=[n,u],f=Ya(t,e,a,i),h=Ya(n,r,o,u),l=0;l<f.length;l++)c.push(Da(t,e,a,i,f[l]));for(l=0;l<h.length;l++)s.push(Da(n,r,o,u,h[l]));return ja(c,s)},length:function(t,n,e,r,a,o,i,u){return qa(t,n,e,r,a,o,i,u,3)},nearestPoint:function(t,n,e,r,a,o,i,u,c,s,f){return Ba([t,e,a,i],[n,r,o,u],c,s,Da,f)},pointDistance:function(t,n,e,r,a,o,i,u,c,s,f){var h=this.nearestPoint(t,n,e,r,a,o,i,u,c,s,f);return Pa(h.x,h.y,c,s)},interpolationAt:Da,pointAt:function(t,n,e,r,a,o,i,u,c){return{x:Da(t,e,a,i,c),y:Da(n,r,o,u,c)}},divide:function(t,n,e,r,a,o,i,u,c){return Xa(t,n,e,r,a,o,i,u,c)},tangentAngle:function(t,n,e,r,a,o,i,u,c){var s=Ia(t,e,a,i,c),f=Ia(n,r,o,u,c);return Ta(Math.atan2(f,s))}};function _a(t,n,e,r){var a=t-e,o=n-r;return Math.sqrt(a*a+o*o)}function Fa(t,n,e,r,a,o){return a>=t&&a<=t+e&&o>=n&&o<=n+r}function $a(t,n,e,r,a,o,i,u){var c=(Math.atan2(u-n,i-t)+2*Math.PI)%(2*Math.PI);if(c<r||c>a)return!1;var s={x:t+e*Math.cos(c),y:n+e*Math.sin(c)};return _a(s.x,s.y,i,u)<=o/2}function Va(t,n,e,r,a,o,i){var u=Math.min(t,e),c=Math.max(t,e),s=Math.min(n,r),f=Math.max(n,r),h=a/2;return o>=u-h&&o<=c+h&&i>=s-h&&i<=f+h&&Aa.pointToLine(t,n,e,r,o,i)<=a/2}function Ha(t,n,e,r,a){var o=t.length;if(o<2)return!1;for(var i=0;i<o-1;i++){if(Va(t[i][0],t[i][1],t[i+1][0],t[i+1][1],n,e,r))return!0}if(a){var u=t[0],c=t[o-1];if(Va(u[0],u[1],c[0],c[1],n,e,r))return!0}return!1}function Ua(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function Wa(t,n,e){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])&&Math.min(t[0],n[0])<=e[0]&&e[0]<=Math.max(t[0],n[0])&&Math.min(t[1],n[1])<=e[1]&&e[1]<=Math.max(t[1],n[1])}function za(t,n,e){var r=!1,a=t.length;if(a<=2)return!1;for(var o=0;o<a;o++){var i=t[o],u=t[(o+1)%a];if(Wa(i,u,[n,e]))return!0;Ua(i[1]-e)>0!=Ua(u[1]-e)>0&&Ua(n-(e-i[1])*(i[0]-u[0])/(i[1]-u[1])-i[0])<0&&(r=!r)}return r}function Qa(t,n,e){for(var r=!1,a=0;a<t.length;a++){if(r=za(t[a],n,e))break}return r}function Za(t,n){var e=t.parsedStyle,r=e.r,a=e.fill,o=e.stroke,i=e.lineWidth,u=e.clipPathTargets,c=r.value,s=i.value/2,f=_a(c,c,n.x,n.y),h=!!(null==u?void 0:u.length),l=a&&!a.isNone,d=o&&!o.isNone;return l&&d||h?f<=c+s:l?f<=c:!!d&&(f>=c-s&&f<=c+s)}function Ja(t,n,e,r){return t/(e*e)+n/(r*r)}function Ka(t,n){var e=n.x,r=n.y,a=t.parsedStyle,o=a.rx,i=a.ry,u=a.fill,c=a.stroke,s=a.lineWidth,f=a.clipPathTargets,h=!!(null==f?void 0:f.length),l=u&&!u.isNone,d=c&&!c.isNone,v=o.value,p=i.value,y=s.value/2,m=(e-v)*(e-v),g=(r-p)*(r-p);return l&&d||h?Ja(m,g,v+y,p+y)<=1:l?Ja(m,g,v,p)<=1:!!d&&(Ja(m,g,v-y,p-y)>=1&&Ja(m,g,v+y,p+y)<=1)}function to(t,n){var e=t.parsedStyle,r=e.x1,a=e.y1,o=e.x2,i=e.y2,u=e.lineWidth,c=e.defX,s=void 0===c?0:c,f=e.defY,h=void 0===f?0:f;return Va(r.value,a.value,o.value,i.value,u.value,n.x+s,n.y+h)}function no(t,n){var e=t.parsedStyle,r=e.stroke,a=e.lineWidth,o=e.points,i=e.defX,u=void 0===i?0:i,c=e.defY,s=void 0===c?0:c,f=e.clipPathTargets,h=!!(null==f?void 0:f.length);return!(("none"===t.attributes.stroke||!r)&&!h||!a)&&Ha(o.points,a.value,n.x+u,n.y+s,!1)}function eo(t,n,e){var r=t.parsedStyle,o=r.lineWidth,i=r.stroke,u=r.fill,s=r.defX,f=void 0===s?0:s,h=r.defY,l=void 0===h?0:h,d=r.clipPathTargets,v=r.path,p=u&&!u.isNone,y=i&&!i.isNone,m=v.segments,g=v.hasArc,M=v.polylines,b=v.polygons,x=v.totalLength,S=!!(null==d?void 0:d.length),O=!1;return(y||S)&&(O=function(t,n,e,r,o,i,u){for(var s=!1,f=n/2,h=0;h<t.length;h++){var l=t[h],d=l.currentPoint,v=l.params,p=l.prePoint,y=l.box;if(!y||Fa(y.x-f,y.y-f,y.width+n,y.height+n,e,r)){switch(l.command){case"L":case"Z":s=Va(p[0],p[1],d[0],d[1],n,e,r);break;case"Q":s=Na.pointDistance(p[0],p[1],v[1],v[2],v[3],v[4],e,r)<=n/2;break;case"C":s=Ga.pointDistance(p[0],p[1],v[1],v[2],v[3],v[4],v[5],v[6],e,r,o)<=n/2;break;case"A":var m=l.arcParams,g=m.cx,M=m.cy,b=m.rx,x=m.ry,S=m.startAngle,O=m.endAngle,E=m.xRotation,P=b>x?b:x,C=b>x?1:b/x,j=b>x?x/b:1,T=a.fromTranslation(a.create(),[-g,-M]);a.multiply(T,a.fromRotation(a.create(),-E),T),a.multiply(T,a.fromScaling(a.create(),[1/C,1/j]),T);var A=c.fromValues(e,r);s=$a(0,0,P,S,O,n,(A=c.transformMat3(A,A,T))[0],A[1])}if(s)break}}return s}(m,o.value,n.x+f,n.y+l,x)),O||!p&&!S||(O=g?e(t,n):Qa(b,n.x+f,n.y+l)||Qa(M,n.x+f,n.y+l)),O}function ro(t,n,e){var r=t.parsedStyle,a=r.radius,o=r.fill,i=r.stroke,u=r.lineWidth,c=r.width,s=r.height,f=r.clipPathTargets,h=!!(null==f?void 0:f.length),l=o&&!o.isNone,d=i&&!i.isNone,v=c.unit,p=c.value,y=s.unit,m=s.value,g=0,b=0;if(v!==M.UnitType.kNumber&&v!==M.UnitType.kPixels||(g=p),y!==M.UnitType.kNumber&&y!==M.UnitType.kPixels||(b=m),a){var x=!1;return(d||h)&&(x=function(t,n,e,r,a,o,i,u){return Va(t+a,n,t+e-a,n,o,i,u)||Va(t+e,n+a,t+e,n+r-a,o,i,u)||Va(t+e-a,n+r,t+a,n+r,o,i,u)||Va(t,n+r-a,t,n+a,o,i,u)||$a(t+e-a,n+a,a,1.5*Math.PI,2*Math.PI,o,i,u)||$a(t+e-a,n+r-a,a,0,.5*Math.PI,o,i,u)||$a(t+a,n+r-a,a,.5*Math.PI,Math.PI,o,i,u)||$a(t+a,n+a,a,Math.PI,1.5*Math.PI,o,i,u)}(0,0,g,b,a.value,u.value,n.x,n.y)),x||!l&&!h||(x=e(t,n)),x}var S=u.value/2;return l&&d||h?Fa(0-S,0-S,g+S,b+S,n.x,n.y):l?Fa(0,0,g,b,n.x,n.y):!!d&&function(t,n,e,r,a,o,i){var u=a/2;return Fa(t-u,n-u,e,a,o,i)||Fa(t+e-u,n-u,a,r,o,i)||Fa(t+u,n+r-u,e,a,o,i)||Fa(t-u,n+u,a,r,o,i)}(0,0,g,b,u.value,n.x,n.y)}function ao(t,n){var e=t.parsedStyle,r=e.stroke,a=e.fill,o=e.lineWidth,i=e.points,u=e.defX,c=void 0===u?0:u,s=e.defY,f=void 0===s?0:s,h=e.clipPathTargets,l=!!(null==h?void 0:h.length),d=a&&!a.isNone,v=!1;return(r&&!r.isNone||l)&&(v=Ha(i.points,o.value,n.x+c,n.y+f,!0)),v||!d&&!l||(v=za(i.points,n.x+c,n.y+f)),v}var oo=Object(b.Module)((function(t){t({token:ya,useFactory:function(t){return function(t){return t===M.Shape.CIRCLE?Za:t===M.Shape.ELLIPSE?Ka:t===M.Shape.RECT?ro:t===M.Shape.LINE?to:t===M.Shape.POLYLINE?no:t===M.Shape.POLYGON?ao:t===M.Shape.PATH?eo:t===M.Shape.IMAGE||t===M.Shape.TEXT?function(){return!0}:null}}}),t(ma)})),io=function(){function t(){}return t.prototype.init=function(t){t.load(oo,!0)},t.prototype.destroy=function(t){t.unload(oo)},t}(),uo=function(){function t(){}var n;return n=t,t.prototype.apply=function(t){var e=this,r=function(t){var n=t.target;if(n.nodeName===M.Shape.HTML){var r=n.parsedStyle.innerHTML,a="g-html-"+n.entity,o=e.contextService.getDomElement().parentNode;if(o)if(!o.querySelector("#"+a)){var i=document.createElement("div");n.parsedStyle.$el=i,i.id=a,V(r)?i.innerHTML=r:i.appendChild(r),o.appendChild(i)}}},a=function(t){var n=t.target;if(n.nodeName===M.Shape.HTML){var r="g-html-"+n.entity,a=e.contextService.getDomElement().parentNode;if(a){var o=a.querySelector("#"+r);o&&a.removeChild(o)}}};t.hooks.init.tap(n.tag,(function(){e.renderingContext.root.addEventListener(M.ElementEvent.MOUNTED,r),e.renderingContext.root.addEventListener(M.ElementEvent.UNMOUNTED,a)})),t.hooks.destroy.tap(n.tag,(function(){e.renderingContext.root.removeEventListener(M.ElementEvent.MOUNTED,r),e.renderingContext.root.removeEventListener(M.ElementEvent.UNMOUNTED,a)})),t.hooks.render.tap(n.tag,(function(t){if(t.nodeName===M.Shape.HTML){var n="g-html-"+t.entity,r=e.contextService.getDomElement().parentNode;if(r){var a=r.querySelector("#"+n);e.updateCSSStyle(a,t.parsedStyle,t)}}}))},t.prototype.updateCSSStyle=function(t,n,e){var r,a,o=n.zIndex,i=n.visibility,u=n.opacity,c=n.fill,s=n.lineWidth,f=n.lineDash,h=n.stroke,l=n.width,d=n.height,v=n.style,p=void 0===v?"":v,y=n.className,m=void 0===y?"":y;r=l.value,a=d.value;var g={position:"absolute",top:0,left:0};if(g.width="".concat(r,"px"),g.height="".concat(a,"px"),g.transform="matrix3d(".concat(e.getWorldTransform().join(","),")"),e.style.transformOrigin&&(g["transform-origin"]=e.style.transformOrigin),g["z-index"]=o.value,g.visibility=i.value,g.opacity=u.value,c){var b="";if(c instanceof M.CSSRGB)b=c.toString();else if(c instanceof M.CSSGradientValue&&c.type===M.GradientPatternType.LinearGradient){var x=c.value.steps.map((function(t){return"".concat(t[1]," ").concat(100*Number(t[0]),"%")})).join(",");b="linear-gradient(to right, ".concat(x,");")}g.background=b}g["border-width"]="".concat((null==s?void 0:s.value)||0,"px"),h&&(g["border-color"]=h.toString(),g["border-style"]="solid"),f&&(g["border-style"]="dashed"),e.style.filter&&(g.filter=e.style.filter),m&&(Array.isArray(m)?m.forEach((function(n){t.classList.add(n)})):t.classList.add(m)),t.setAttribute("style",Object.keys(g).map((function(t){return"".concat(t,":").concat(g[t])})).join(";")+p)},t.tag="HTMLRenderingPlugin",v([Object(b.inject)(M.ContextService),p("design:type",Object)],t.prototype,"contextService",void 0),v([Object(b.inject)(M.RenderingContext),p("design:type",Object)],t.prototype,"renderingContext",void 0),t=n=v([Object(b.singleton)({contrib:M.RenderingPluginContribution})],t)}(),co=Object(b.Module)((function(t){t(uo)})),so=function(){function t(){}return t.prototype.init=function(t){t.load(co,!0)},t.prototype.destroy=function(t){t.unload(co)},t}();var fo=function(){function t(){}return t.prototype.init=function(){var t=this.canvasConfig,n=t.container,e=t.canvas,r=t.devicePixelRatio;if(e)this.$canvas=e,n&&e.parentElement!==n&&n.appendChild(e),this.$container=e.parentElement,this.canvasConfig.container=this.$container;else if(n&&(this.$container=V(n)?document.getElementById(n):n,this.$container)){var a=document.createElement("canvas");this.$container.appendChild(a),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=a}this.context=this.$canvas.getContext("2d");var o=r||M.isBrowser&&window.devicePixelRatio||1;o=o>=1?Math.ceil(o):1,this.dpr=o,this.resize(this.canvasConfig.width,this.canvasConfig.height)},t.prototype.getContext=function(){return this.context},t.prototype.getDomElement=function(){return this.$canvas},t.prototype.getDPR=function(){return this.dpr},t.prototype.getBoundingClientRect=function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()},t.prototype.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},t.prototype.resize=function(t,n){if(this.$canvas){this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*n,function(t,n,e){M.isBrowser&&t.style&&(t.style.width=n+"px",t.style.height=e+"px")}(this.$canvas,t,n);var e=this.getDPR();this.context.scale(e,e)}},t.prototype.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},v([Object(b.inject)(M.CanvasConfig),p("design:type",Object)],t.prototype,"canvasConfig",void 0),t=v([Object(b.singleton)({token:M.ContextService})],t)}(),ho=Object(b.Module)((function(t){t(fo)})),lo=function(){function t(){}return t.prototype.init=function(t){t.load(ho,!0)},t.prototype.destroy=function(t){t.unload(ho)},t}(),vo=function(t){function n(n){var e=t.call(this,n)||this;return e.registerPlugin(new lo),e.registerPlugin(new pa),e.registerPlugin(new E),e.registerPlugin(new io),e.registerPlugin(new so),e}return function(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}l(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}(n,t),n}(M.AbstractRenderer)}])}));
16
+ var l=function(t,n){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)};function d(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}l(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}var p=function(){return(p=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t}).apply(this,arguments)};function v(t,n,e,r){var i,o=arguments.length,a=o<3?n:null===r?r=Object.getOwnPropertyDescriptor(n,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,n,e,r);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(a=(o<3?i(a):o>3?i(n,e,a):i(n,e))||a);return o>3&&a&&Object.defineProperty(n,e,a),a}function y(t,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)}function m(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function u(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}c((r=r.apply(t,n||[])).next())}))}function g(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}Object.create;function M(t){var n="function"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,i,o=e.call(t),a=[];try{for(;(void 0===n||n-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return a}function x(t,n,e){if(e||2===arguments.length)for(var r,i=0,o=n.length;i<o;i++)!r&&i in n||(r||(r=Array.prototype.slice.call(n,0,i)),r[i]=n[i]);return t.concat(r||Array.prototype.slice.call(n))}Object.create;var O=e(0),S=e(1),C=/mobile|tablet|ip(ad|hone|od)|android/i,P=function(){function t(){}return t.prototype.apply=function(t){var n=this,e=this.renderingContext.root.ownerDocument.defaultView,r=e.supportTouchEvent&&C.test(navigator.userAgent),i=function(n){t.hooks.pointerMove.call(n)},o=function(n){t.hooks.pointerUp.call(n)},a=function(n){t.hooks.pointerDown.call(n)},u=function(n){t.hooks.pointerOver.call(n)},c=function(n){t.hooks.pointerOut.call(n)},s=function(n){t.hooks.pointerCancel.call(n)},f=function(n){t.hooks.pointerWheel.call(n)},h=function(t){t.addEventListener("touchstart",a,!0),t.addEventListener("touchend",o,!0),t.addEventListener("touchmove",i,!0),t.addEventListener("touchcancel",s,!0)},l=function(t){globalThis.document.addEventListener("mousemove",i,!0),t.addEventListener("mousedown",a,!0),t.addEventListener("mouseout",c,!0),t.addEventListener("mouseover",u,!0),globalThis.addEventListener("mouseup",o,!0)},d=function(t){t.removeEventListener("touchstart",a,!0),t.removeEventListener("touchend",o,!0),t.removeEventListener("touchmove",i,!0)},p=function(t){globalThis.document.removeEventListener("mousemove",i,!0),t.removeEventListener("mousedown",a,!0),t.removeEventListener("mouseout",c,!0),t.removeEventListener("mouseover",u,!0),globalThis.removeEventListener("mouseup",o,!0)};t.hooks.init.tapPromise((function(){return m(n,void 0,void 0,(function(){var t;return g(this,(function(n){return t=this.contextService.getDomElement(),e.supportPointerEvent?function(t){globalThis.document.addEventListener("pointermove",i,!0),t.addEventListener("pointerdown",a,!0),t.addEventListener("pointerleave",c,!0),t.addEventListener("pointerover",u,!0),globalThis.addEventListener("pointerup",o,!0)}(t):r?h(t):e.supportTouchEvent?(h(t),l(t)):l(t),t.addEventListener("wheel",f,{passive:!0,capture:!0}),[2]}))}))})),t.hooks.destroy.tap((function(){var t=n.contextService.getDomElement();e.supportPointerEvent?function(t){globalThis.document.removeEventListener("pointermove",i,!0),t.removeEventListener("pointerdown",a,!0),t.removeEventListener("pointerleave",c,!0),t.removeEventListener("pointerover",u,!0),globalThis.removeEventListener("pointerup",o,!0)}(t):r?d(t):e.supportTouchEvent?(d(t),p(t)):p(t),t.removeEventListener("wheel",f,!0)}))},v([Object(S.inject)(O.ContextService),y("design:type",Object)],t.prototype,"contextService",void 0),v([Object(S.inject)(O.RenderingContext),y("design:type",Object)],t.prototype,"renderingContext",void 0),t=v([Object(S.singleton)({contrib:O.RenderingPluginContribution})],t)}(),E=Object(S.Module)((function(t){t(P)})),j=function(){function t(){}return t.prototype.init=function(t){t.load(E,!0)},t.prototype.destroy=function(t){t.unload(E)},t}(),T=e(2),A=e.n(T),R=S.Syringe.defineToken("StyleRendererFactory"),w=S.Syringe.defineToken("CircleRenderer",{multiple:!1}),B=S.Syringe.defineToken("EllipseRenderer",{multiple:!1}),k=S.Syringe.defineToken("RectRenderer",{multiple:!1}),L=S.Syringe.defineToken("LineRenderer",{multiple:!1}),N=S.Syringe.defineToken("PolylineRenderer",{multiple:!1}),D=S.Syringe.defineToken("PolygonRenderer",{multiple:!1}),I=S.Syringe.defineToken("PathRenderer",{multiple:!1}),Y=S.Syringe.defineToken("TextRenderer",{multiple:!1}),X=S.Syringe.defineToken("ImageRenderer",{multiple:!1}),q=function(){function t(){this.imageCache={},this.patternCache={}}return t.prototype.getImageSync=function(t){return this.imageCache[t]},t.prototype.getOrCreateImage=function(t){var n=this;if(this.imageCache[t])return Promise.resolve(this.imageCache[t]);var e=this.canvasConfig.createImage;return new Promise((function(r,i){var o;e?o=e():O.isBrowser&&(o=new window.Image),o&&(o.onload=function(){r(o)},o.onerror=function(t){i(t)},o.crossOrigin="Anonymous",o.src=t,n.imageCache[t]=o)}))},t.prototype.getPatternSync=function(t){var n=this.generatePatternKey(t);if(this.patternCache[n])return this.patternCache[n]},t.prototype.createPattern=function(t,n){var e=this;return this.getOrCreateImage(t.src).then((function(r){var i=e.generatePatternKey(t),o=n.createPattern(r,t.repetition);return o&&(e.patternCache[i]=o),e.patternCache[i]}))},t.prototype.generatePatternKey=function(t){var n=t.src,e=t.repetition;return"pattern-".concat(n,"-").concat(e)},v([Object(S.inject)(O.CanvasConfig),y("design:type",Object)],t.prototype,"canvasConfig",void 0),t=v([Object(S.singleton)()],t)}(),G=function(){function t(){}return t.prototype.hash=function(t){return""},t.prototype.render=function(t,n){var e,r=n.width,i=n.height,o=n.img,a=r.value,u=i.value;Object(O.isString)(o)?e=this.imagePool.getImageSync(o):(a||(a=o.width),u||(u=o.height),e=o),e&&t.drawImage(e,0,0,a,u)},v([Object(S.inject)(q),y("design:type",q)],t.prototype,"imagePool",void 0),t=v([Object(S.singleton)({token:X})],t)}(),_=function(){function t(){}return t.prototype.hash=function(t){return""},t.prototype.render=function(t,n,e){var r=n,i=r.lineWidth,o=r.textAlign,a=r.textBaseline,u=r.lineJoin,c=r.miterLimit,s=void 0===c?0:c,f=r.letterSpacing,h=void 0===f?0:f,l=r.stroke,d=r.fill,p=r.fillOpacity,v=r.strokeOpacity,y=r.opacity,m=r.metrics,g=r.dx,M=r.dy,b=m.font,x=m.lines,S=m.height,C=m.lineHeight,P=m.lineMetrics;t.font=b,t.lineWidth=i.value,t.textAlign=o.value,t.textBaseline=a.value,t.lineJoin=u.value,t.miterLimit=s;var E=0;"middle"===a.value?E=-S/2-C/2:"bottom"===a.value||"alphabetic"===a.value||"ideographic"===a.value?E=-S:"top"!==a.value&&"hanging"!==a.value||(E=-C);var j=0;g&&g.unit===O.UnitType.kPixels&&(j+=g.value),M&&M.unit===O.UnitType.kPixels&&(E+=M.value);for(var T=0;T<x.length;T++){var A=i.value/2+j;E+=C,!Object(O.isNil)(l)&&i&&i.value&&this.drawLetterSpacing(t,x[T],P[T],o.value,A,E,h,p.value,v.value,y.value,!0),Object(O.isNil)(d)||this.drawLetterSpacing(t,x[T],P[T],o.value,A,E,h,p.value,v.value,y.value)}},t.prototype.drawLetterSpacing=function(t,n,e,r,i,o,a,u,c,s,f){if(void 0===f&&(f=!1),0!==a){var h=t.textAlign;t.textAlign="left";var l=i;"center"===r?l=i-e.width/2:"right"!==r&&"end"!==r||(l=i-e.width);for(var d=Array.from(n),p=t.measureText(n).width,v=0,y=0;y<d.length;++y){var m=d[y];f?this.strokeText(t,m,l,o,c):this.fillText(t,m,l,o,u,s),l+=p-(v=t.measureText(n.substring(y+1)).width)+a,p=v}t.textAlign=h}else f?this.strokeText(t,n,i,o,c):this.fillText(t,n,i,o,u,s)},t.prototype.fillText=function(t,n,e,r,i,o){var a,u=!Object(O.isNil)(i)&&1!==i;u&&(a=t.globalAlpha,t.globalAlpha=i*o),t.fillText(n,e,r),u&&(t.globalAlpha=a)},t.prototype.strokeText=function(t,n,e,r,i){var o,a=!Object(O.isNil)(i)&&1!==i;a&&(o=t.globalAlpha,t.globalAlpha=i),t.strokeText(n,e,r),a&&(t.globalAlpha=o)},t=v([Object(S.singleton)({token:Y})],t)}(),F=function(){function t(){}return t.prototype.hash=function(t){return""},t.prototype.render=function(t,n){var e=n.fill,r=n.opacity,i=n.fillOpacity,o=n.stroke,a=n.strokeOpacity,u=n.lineWidth,c=n.lineCap,s=n.lineJoin,f=n.shadowColor,h=n.filter,l=n.miterLimit,d=!Object(O.isNil)(e),p=!Object(O.isNil)(o),v=0===e.alpha;if(d&&(Object(O.isNil)(i)||1===i.value?t.fill():(t.globalAlpha=i.value,t.fill(),t.globalAlpha=r.value)),p&&u&&u.value>0){!Object(O.isNil)(a)&&1!==a.value&&(t.globalAlpha=a.value),t.lineWidth=u.value,Object(O.isNil)(l)||(t.miterLimit=l),Object(O.isNil)(c)||(t.lineCap=c.value),Object(O.isNil)(s)||(t.lineJoin=s.value);var y=void 0,m=void 0,g=void 0,M=!Object(O.isNil)(f),b=!Object(O.isNil)(h);M&&(y=t.shadowBlur,m=t.shadowColor,Object(O.isNil)(y)||(t.shadowColor="transparent",t.shadowBlur=0)),b&&(g=t.filter,!Object(O.isNil)(g)&&g.indexOf("drop-shadow")>-1&&(t.filter=g.replace(/drop-shadow\([^)]*\)/,"").trim()||"none"));var x=d&&!v;x&&t.stroke(),M&&(t.shadowColor=m,t.shadowBlur=y),b&&(t.filter=g),x||t.stroke()}},t=v([Object(S.singleton)()],t)}(),V=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return d(n,t),n=v([Object(S.singleton)({token:k})],n)}(F),$=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return d(n,t),n=v([Object(S.singleton)({token:w})],n)}(F),H=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return d(n,t),n=v([Object(S.singleton)({token:B})],n)}(F),U=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return d(n,t),n=v([Object(S.singleton)({token:L})],n)}(F),W=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return d(n,t),n=v([Object(S.singleton)({token:N})],n)}(F),z=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return d(n,t),n=v([Object(S.singleton)({token:D})],n)}(F),Q=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return d(n,t),n=v([Object(S.singleton)({token:I})],n)}(F),Z=function(){function t(){this.gradientCache={}}return t.prototype.getOrCreateGradient=function(t,n){var e=this.generateCacheKey(t),r=t.type,i=t.x0,o=t.y0,a=t.x1,u=t.y1,c=t.steps,s=t.width,f=t.height;if(this.gradientCache[e])return this.gradientCache[e];var h=null;if(r===O.GradientPatternType.LinearGradient)h=n.createLinearGradient(i*s,o*f,a*s,u*f);else if(r===O.GradientPatternType.RadialGradient){var l=Math.sqrt(s*s+f*f)/2;h=n.createRadialGradient(i*s,o*f,0,a*s,u*f,t.r1*l)}return h&&(c.forEach((function(t){var n=b(t,2),e=n[0],r=n[1];null==h||h.addColorStop(Number(e),r)})),this.gradientCache[e]=h),this.gradientCache[e]},t.prototype.generateCacheKey=function(t){var n=t.type,e=t.x0,r=t.y0,i=t.x1,o=t.y1,a=t.r1,u=t.steps,c=t.width,s=t.height;return"gradient-".concat(n,"-").concat(e,"-").concat(r,"-").concat(i,"-").concat(o,"-").concat(a||0,"-").concat(c,"-").concat(s,"-").concat(u.map((function(t){return t.join("")})).join("-"))},t=v([Object(S.singleton)()],t)}();var J=S.Syringe.defineToken("PathGeneratorFactory"),K=S.Syringe.defineToken("PathGenerator"),tt=1e-6,nt="undefined"!=typeof Float32Array?Float32Array:Array,et=Math.random;Math.PI;function rt(){var t=new nt(9);return nt!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function it(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function ot(t){var n=new nt(9);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n}function at(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t}function ut(t,n,e,r,i,o,a,u,c){var s=new nt(9);return s[0]=t,s[1]=n,s[2]=e,s[3]=r,s[4]=i,s[5]=o,s[6]=a,s[7]=u,s[8]=c,s}function ct(t,n,e,r,i,o,a,u,c,s){return t[0]=n,t[1]=e,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=u,t[7]=c,t[8]=s,t}function st(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function ft(t,n){if(t===n){var e=n[1],r=n[2],i=n[5];t[1]=n[3],t[2]=n[6],t[3]=e,t[5]=n[7],t[6]=r,t[7]=i}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function ht(t,n){var e=n[0],r=n[1],i=n[2],o=n[3],a=n[4],u=n[5],c=n[6],s=n[7],f=n[8],h=f*a-u*s,l=-f*o+u*c,d=s*o-a*c,p=e*h+r*l+i*d;return p?(p=1/p,t[0]=h*p,t[1]=(-f*r+i*s)*p,t[2]=(u*r-i*a)*p,t[3]=l*p,t[4]=(f*e-i*c)*p,t[5]=(-u*e+i*o)*p,t[6]=d*p,t[7]=(-s*e+r*c)*p,t[8]=(a*e-r*o)*p,t):null}function lt(t,n){var e=n[0],r=n[1],i=n[2],o=n[3],a=n[4],u=n[5],c=n[6],s=n[7],f=n[8];return t[0]=a*f-u*s,t[1]=i*s-r*f,t[2]=r*u-i*a,t[3]=u*c-o*f,t[4]=e*f-i*c,t[5]=i*o-e*u,t[6]=o*s-a*c,t[7]=r*c-e*s,t[8]=e*a-r*o,t}function dt(t){var n=t[0],e=t[1],r=t[2],i=t[3],o=t[4],a=t[5],u=t[6],c=t[7],s=t[8];return n*(s*o-a*c)+e*(-s*i+a*u)+r*(c*i-o*u)}function pt(t,n,e){var r=n[0],i=n[1],o=n[2],a=n[3],u=n[4],c=n[5],s=n[6],f=n[7],h=n[8],l=e[0],d=e[1],p=e[2],v=e[3],y=e[4],m=e[5],g=e[6],M=e[7],b=e[8];return t[0]=l*r+d*a+p*s,t[1]=l*i+d*u+p*f,t[2]=l*o+d*c+p*h,t[3]=v*r+y*a+m*s,t[4]=v*i+y*u+m*f,t[5]=v*o+y*c+m*h,t[6]=g*r+M*a+b*s,t[7]=g*i+M*u+b*f,t[8]=g*o+M*c+b*h,t}function vt(t,n,e){var r=n[0],i=n[1],o=n[2],a=n[3],u=n[4],c=n[5],s=n[6],f=n[7],h=n[8],l=e[0],d=e[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=u,t[5]=c,t[6]=l*r+d*a+s,t[7]=l*i+d*u+f,t[8]=l*o+d*c+h,t}function yt(t,n,e){var r=n[0],i=n[1],o=n[2],a=n[3],u=n[4],c=n[5],s=n[6],f=n[7],h=n[8],l=Math.sin(e),d=Math.cos(e);return t[0]=d*r+l*a,t[1]=d*i+l*u,t[2]=d*o+l*c,t[3]=d*a-l*r,t[4]=d*u-l*i,t[5]=d*c-l*o,t[6]=s,t[7]=f,t[8]=h,t}function mt(t,n,e){var r=e[0],i=e[1];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=i*n[3],t[4]=i*n[4],t[5]=i*n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t}function gt(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t}function Mt(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=-e,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function bt(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function xt(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t}function Ot(t,n){var e=n[0],r=n[1],i=n[2],o=n[3],a=e+e,u=r+r,c=i+i,s=e*a,f=r*a,h=r*u,l=i*a,d=i*u,p=i*c,v=o*a,y=o*u,m=o*c;return t[0]=1-h-p,t[3]=f-m,t[6]=l+y,t[1]=f+m,t[4]=1-s-p,t[7]=d-v,t[2]=l-y,t[5]=d+v,t[8]=1-s-h,t}function St(t,n){var e=n[0],r=n[1],i=n[2],o=n[3],a=n[4],u=n[5],c=n[6],s=n[7],f=n[8],h=n[9],l=n[10],d=n[11],p=n[12],v=n[13],y=n[14],m=n[15],g=e*u-r*a,M=e*c-i*a,b=e*s-o*a,x=r*c-i*u,O=r*s-o*u,S=i*s-o*c,C=f*v-h*p,P=f*y-l*p,E=f*m-d*p,j=h*y-l*v,T=h*m-d*v,A=l*m-d*y,R=g*A-M*T+b*j+x*E-O*P+S*C;return R?(R=1/R,t[0]=(u*A-c*T+s*j)*R,t[1]=(c*E-a*A-s*P)*R,t[2]=(a*T-u*E+s*C)*R,t[3]=(i*T-r*A-o*j)*R,t[4]=(e*A-i*E+o*P)*R,t[5]=(r*E-e*T-o*C)*R,t[6]=(v*S-y*O+m*x)*R,t[7]=(y*b-p*S-m*M)*R,t[8]=(p*O-v*b+m*g)*R,t):null}function Ct(t,n,e){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/e,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}function Pt(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}function Et(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}function jt(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t}function Tt(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t}function At(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t}function Rt(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t}function wt(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]}function Bt(t,n){var e=t[0],r=t[1],i=t[2],o=t[3],a=t[4],u=t[5],c=t[6],s=t[7],f=t[8],h=n[0],l=n[1],d=n[2],p=n[3],v=n[4],y=n[5],m=n[6],g=n[7],M=n[8];return Math.abs(e-h)<=tt*Math.max(1,Math.abs(e),Math.abs(h))&&Math.abs(r-l)<=tt*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(i-d)<=tt*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(o-p)<=tt*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-v)<=tt*Math.max(1,Math.abs(a),Math.abs(v))&&Math.abs(u-y)<=tt*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(c-m)<=tt*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(s-g)<=tt*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(f-M)<=tt*Math.max(1,Math.abs(f),Math.abs(M))}Math.hypot||(Math.hypot=function(){for(var t=0,n=arguments.length;n--;)t+=arguments[n]*arguments[n];return Math.sqrt(t)});var kt=pt,Lt=Tt;function Nt(){var t=new nt(16);return nt!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function Dt(t){var n=new nt(16);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n}function It(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function Yt(t,n,e,r,i,o,a,u,c,s,f,h,l,d,p,v){var y=new nt(16);return y[0]=t,y[1]=n,y[2]=e,y[3]=r,y[4]=i,y[5]=o,y[6]=a,y[7]=u,y[8]=c,y[9]=s,y[10]=f,y[11]=h,y[12]=l,y[13]=d,y[14]=p,y[15]=v,y}function Xt(t,n,e,r,i,o,a,u,c,s,f,h,l,d,p,v,y){return t[0]=n,t[1]=e,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=u,t[7]=c,t[8]=s,t[9]=f,t[10]=h,t[11]=l,t[12]=d,t[13]=p,t[14]=v,t[15]=y,t}function qt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Gt(t,n){if(t===n){var e=n[1],r=n[2],i=n[3],o=n[6],a=n[7],u=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=e,t[6]=n[9],t[7]=n[13],t[8]=r,t[9]=o,t[11]=n[14],t[12]=i,t[13]=a,t[14]=u}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t}function _t(t,n){var e=n[0],r=n[1],i=n[2],o=n[3],a=n[4],u=n[5],c=n[6],s=n[7],f=n[8],h=n[9],l=n[10],d=n[11],p=n[12],v=n[13],y=n[14],m=n[15],g=e*u-r*a,M=e*c-i*a,b=e*s-o*a,x=r*c-i*u,O=r*s-o*u,S=i*s-o*c,C=f*v-h*p,P=f*y-l*p,E=f*m-d*p,j=h*y-l*v,T=h*m-d*v,A=l*m-d*y,R=g*A-M*T+b*j+x*E-O*P+S*C;return R?(R=1/R,t[0]=(u*A-c*T+s*j)*R,t[1]=(i*T-r*A-o*j)*R,t[2]=(v*S-y*O+m*x)*R,t[3]=(l*O-h*S-d*x)*R,t[4]=(c*E-a*A-s*P)*R,t[5]=(e*A-i*E+o*P)*R,t[6]=(y*b-p*S-m*M)*R,t[7]=(f*S-l*b+d*M)*R,t[8]=(a*T-u*E+s*C)*R,t[9]=(r*E-e*T-o*C)*R,t[10]=(p*O-v*b+m*g)*R,t[11]=(h*b-f*O-d*g)*R,t[12]=(u*P-a*j-c*C)*R,t[13]=(e*j-r*P+i*C)*R,t[14]=(v*M-p*x-y*g)*R,t[15]=(f*x-h*M+l*g)*R,t):null}function Ft(t,n){var e=n[0],r=n[1],i=n[2],o=n[3],a=n[4],u=n[5],c=n[6],s=n[7],f=n[8],h=n[9],l=n[10],d=n[11],p=n[12],v=n[13],y=n[14],m=n[15];return t[0]=u*(l*m-d*y)-h*(c*m-s*y)+v*(c*d-s*l),t[1]=-(r*(l*m-d*y)-h*(i*m-o*y)+v*(i*d-o*l)),t[2]=r*(c*m-s*y)-u*(i*m-o*y)+v*(i*s-o*c),t[3]=-(r*(c*d-s*l)-u*(i*d-o*l)+h*(i*s-o*c)),t[4]=-(a*(l*m-d*y)-f*(c*m-s*y)+p*(c*d-s*l)),t[5]=e*(l*m-d*y)-f*(i*m-o*y)+p*(i*d-o*l),t[6]=-(e*(c*m-s*y)-a*(i*m-o*y)+p*(i*s-o*c)),t[7]=e*(c*d-s*l)-a*(i*d-o*l)+f*(i*s-o*c),t[8]=a*(h*m-d*v)-f*(u*m-s*v)+p*(u*d-s*h),t[9]=-(e*(h*m-d*v)-f*(r*m-o*v)+p*(r*d-o*h)),t[10]=e*(u*m-s*v)-a*(r*m-o*v)+p*(r*s-o*u),t[11]=-(e*(u*d-s*h)-a*(r*d-o*h)+f*(r*s-o*u)),t[12]=-(a*(h*y-l*v)-f*(u*y-c*v)+p*(u*l-c*h)),t[13]=e*(h*y-l*v)-f*(r*y-i*v)+p*(r*l-i*h),t[14]=-(e*(u*y-c*v)-a*(r*y-i*v)+p*(r*c-i*u)),t[15]=e*(u*l-c*h)-a*(r*l-i*h)+f*(r*c-i*u),t}function Vt(t){var n=t[0],e=t[1],r=t[2],i=t[3],o=t[4],a=t[5],u=t[6],c=t[7],s=t[8],f=t[9],h=t[10],l=t[11],d=t[12],p=t[13],v=t[14],y=t[15];return(n*a-e*o)*(h*y-l*v)-(n*u-r*o)*(f*y-l*p)+(n*c-i*o)*(f*v-h*p)+(e*u-r*a)*(s*y-l*d)-(e*c-i*a)*(s*v-h*d)+(r*c-i*u)*(s*p-f*d)}function $t(t,n,e){var r=n[0],i=n[1],o=n[2],a=n[3],u=n[4],c=n[5],s=n[6],f=n[7],h=n[8],l=n[9],d=n[10],p=n[11],v=n[12],y=n[13],m=n[14],g=n[15],M=e[0],b=e[1],x=e[2],O=e[3];return t[0]=M*r+b*u+x*h+O*v,t[1]=M*i+b*c+x*l+O*y,t[2]=M*o+b*s+x*d+O*m,t[3]=M*a+b*f+x*p+O*g,M=e[4],b=e[5],x=e[6],O=e[7],t[4]=M*r+b*u+x*h+O*v,t[5]=M*i+b*c+x*l+O*y,t[6]=M*o+b*s+x*d+O*m,t[7]=M*a+b*f+x*p+O*g,M=e[8],b=e[9],x=e[10],O=e[11],t[8]=M*r+b*u+x*h+O*v,t[9]=M*i+b*c+x*l+O*y,t[10]=M*o+b*s+x*d+O*m,t[11]=M*a+b*f+x*p+O*g,M=e[12],b=e[13],x=e[14],O=e[15],t[12]=M*r+b*u+x*h+O*v,t[13]=M*i+b*c+x*l+O*y,t[14]=M*o+b*s+x*d+O*m,t[15]=M*a+b*f+x*p+O*g,t}function Ht(t,n,e){var r,i,o,a,u,c,s,f,h,l,d,p,v=e[0],y=e[1],m=e[2];return n===t?(t[12]=n[0]*v+n[4]*y+n[8]*m+n[12],t[13]=n[1]*v+n[5]*y+n[9]*m+n[13],t[14]=n[2]*v+n[6]*y+n[10]*m+n[14],t[15]=n[3]*v+n[7]*y+n[11]*m+n[15]):(r=n[0],i=n[1],o=n[2],a=n[3],u=n[4],c=n[5],s=n[6],f=n[7],h=n[8],l=n[9],d=n[10],p=n[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=u,t[5]=c,t[6]=s,t[7]=f,t[8]=h,t[9]=l,t[10]=d,t[11]=p,t[12]=r*v+u*y+h*m+n[12],t[13]=i*v+c*y+l*m+n[13],t[14]=o*v+s*y+d*m+n[14],t[15]=a*v+f*y+p*m+n[15]),t}function Ut(t,n,e){var r=e[0],i=e[1],o=e[2];return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=n[7]*i,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=n[11]*o,t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function Wt(t,n,e,r){var i,o,a,u,c,s,f,h,l,d,p,v,y,m,g,M,b,x,O,S,C,P,E,j,T=r[0],A=r[1],R=r[2],w=Math.hypot(T,A,R);return w<tt?null:(T*=w=1/w,A*=w,R*=w,i=Math.sin(e),a=1-(o=Math.cos(e)),u=n[0],c=n[1],s=n[2],f=n[3],h=n[4],l=n[5],d=n[6],p=n[7],v=n[8],y=n[9],m=n[10],g=n[11],M=T*T*a+o,b=A*T*a+R*i,x=R*T*a-A*i,O=T*A*a-R*i,S=A*A*a+o,C=R*A*a+T*i,P=T*R*a+A*i,E=A*R*a-T*i,j=R*R*a+o,t[0]=u*M+h*b+v*x,t[1]=c*M+l*b+y*x,t[2]=s*M+d*b+m*x,t[3]=f*M+p*b+g*x,t[4]=u*O+h*S+v*C,t[5]=c*O+l*S+y*C,t[6]=s*O+d*S+m*C,t[7]=f*O+p*S+g*C,t[8]=u*P+h*E+v*j,t[9]=c*P+l*E+y*j,t[10]=s*P+d*E+m*j,t[11]=f*P+p*E+g*j,n!==t&&(t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t)}function zt(t,n,e){var r=Math.sin(e),i=Math.cos(e),o=n[4],a=n[5],u=n[6],c=n[7],s=n[8],f=n[9],h=n[10],l=n[11];return n!==t&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[4]=o*i+s*r,t[5]=a*i+f*r,t[6]=u*i+h*r,t[7]=c*i+l*r,t[8]=s*i-o*r,t[9]=f*i-a*r,t[10]=h*i-u*r,t[11]=l*i-c*r,t}function Qt(t,n,e){var r=Math.sin(e),i=Math.cos(e),o=n[0],a=n[1],u=n[2],c=n[3],s=n[8],f=n[9],h=n[10],l=n[11];return n!==t&&(t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=o*i-s*r,t[1]=a*i-f*r,t[2]=u*i-h*r,t[3]=c*i-l*r,t[8]=o*r+s*i,t[9]=a*r+f*i,t[10]=u*r+h*i,t[11]=c*r+l*i,t}function Zt(t,n,e){var r=Math.sin(e),i=Math.cos(e),o=n[0],a=n[1],u=n[2],c=n[3],s=n[4],f=n[5],h=n[6],l=n[7];return n!==t&&(t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=o*i+s*r,t[1]=a*i+f*r,t[2]=u*i+h*r,t[3]=c*i+l*r,t[4]=s*i-o*r,t[5]=f*i-a*r,t[6]=h*i-u*r,t[7]=l*i-c*r,t}function Jt(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Kt(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function tn(t,n,e){var r,i,o,a=e[0],u=e[1],c=e[2],s=Math.hypot(a,u,c);return s<tt?null:(a*=s=1/s,u*=s,c*=s,r=Math.sin(n),o=1-(i=Math.cos(n)),t[0]=a*a*o+i,t[1]=u*a*o+c*r,t[2]=c*a*o-u*r,t[3]=0,t[4]=a*u*o-c*r,t[5]=u*u*o+i,t[6]=c*u*o+a*r,t[7]=0,t[8]=a*c*o+u*r,t[9]=u*c*o-a*r,t[10]=c*c*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function nn(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=e,t[7]=0,t[8]=0,t[9]=-e,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function en(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=0,t[2]=-e,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=e,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function rn(t,n){var e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=0,t[4]=-e,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function on(t,n,e){var r=n[0],i=n[1],o=n[2],a=n[3],u=r+r,c=i+i,s=o+o,f=r*u,h=r*c,l=r*s,d=i*c,p=i*s,v=o*s,y=a*u,m=a*c,g=a*s;return t[0]=1-(d+v),t[1]=h+g,t[2]=l-m,t[3]=0,t[4]=h-g,t[5]=1-(f+v),t[6]=p+y,t[7]=0,t[8]=l+m,t[9]=p-y,t[10]=1-(f+d),t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function an(t,n){var e=new nt(3),r=-n[0],i=-n[1],o=-n[2],a=n[3],u=n[4],c=n[5],s=n[6],f=n[7],h=r*r+i*i+o*o+a*a;return h>0?(e[0]=2*(u*a+f*r+c*o-s*i)/h,e[1]=2*(c*a+f*i+s*r-u*o)/h,e[2]=2*(s*a+f*o+u*i-c*r)/h):(e[0]=2*(u*a+f*r+c*o-s*i),e[1]=2*(c*a+f*i+s*r-u*o),e[2]=2*(s*a+f*o+u*i-c*r)),on(t,n,e),t}function un(t,n){return t[0]=n[12],t[1]=n[13],t[2]=n[14],t}function cn(t,n){var e=n[0],r=n[1],i=n[2],o=n[4],a=n[5],u=n[6],c=n[8],s=n[9],f=n[10];return t[0]=Math.hypot(e,r,i),t[1]=Math.hypot(o,a,u),t[2]=Math.hypot(c,s,f),t}function sn(t,n){var e=new nt(3);cn(e,n);var r=1/e[0],i=1/e[1],o=1/e[2],a=n[0]*r,u=n[1]*i,c=n[2]*o,s=n[4]*r,f=n[5]*i,h=n[6]*o,l=n[8]*r,d=n[9]*i,p=n[10]*o,v=a+f+p,y=0;return v>0?(y=2*Math.sqrt(v+1),t[3]=.25*y,t[0]=(h-d)/y,t[1]=(l-c)/y,t[2]=(u-s)/y):a>f&&a>p?(y=2*Math.sqrt(1+a-f-p),t[3]=(h-d)/y,t[0]=.25*y,t[1]=(u+s)/y,t[2]=(l+c)/y):f>p?(y=2*Math.sqrt(1+f-a-p),t[3]=(l-c)/y,t[0]=(u+s)/y,t[1]=.25*y,t[2]=(h+d)/y):(y=2*Math.sqrt(1+p-a-f),t[3]=(u-s)/y,t[0]=(l+c)/y,t[1]=(h+d)/y,t[2]=.25*y),t}function fn(t,n,e,r){var i=n[0],o=n[1],a=n[2],u=n[3],c=i+i,s=o+o,f=a+a,h=i*c,l=i*s,d=i*f,p=o*s,v=o*f,y=a*f,m=u*c,g=u*s,M=u*f,b=r[0],x=r[1],O=r[2];return t[0]=(1-(p+y))*b,t[1]=(l+M)*b,t[2]=(d-g)*b,t[3]=0,t[4]=(l-M)*x,t[5]=(1-(h+y))*x,t[6]=(v+m)*x,t[7]=0,t[8]=(d+g)*O,t[9]=(v-m)*O,t[10]=(1-(h+p))*O,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function hn(t,n,e,r,i){var o=n[0],a=n[1],u=n[2],c=n[3],s=o+o,f=a+a,h=u+u,l=o*s,d=o*f,p=o*h,v=a*f,y=a*h,m=u*h,g=c*s,M=c*f,b=c*h,x=r[0],O=r[1],S=r[2],C=i[0],P=i[1],E=i[2],j=(1-(v+m))*x,T=(d+b)*x,A=(p-M)*x,R=(d-b)*O,w=(1-(l+m))*O,B=(y+g)*O,k=(p+M)*S,L=(y-g)*S,N=(1-(l+v))*S;return t[0]=j,t[1]=T,t[2]=A,t[3]=0,t[4]=R,t[5]=w,t[6]=B,t[7]=0,t[8]=k,t[9]=L,t[10]=N,t[11]=0,t[12]=e[0]+C-(j*C+R*P+k*E),t[13]=e[1]+P-(T*C+w*P+L*E),t[14]=e[2]+E-(A*C+B*P+N*E),t[15]=1,t}function ln(t,n){var e=n[0],r=n[1],i=n[2],o=n[3],a=e+e,u=r+r,c=i+i,s=e*a,f=r*a,h=r*u,l=i*a,d=i*u,p=i*c,v=o*a,y=o*u,m=o*c;return t[0]=1-h-p,t[1]=f+m,t[2]=l-y,t[3]=0,t[4]=f-m,t[5]=1-s-p,t[6]=d+v,t[7]=0,t[8]=l+y,t[9]=d-v,t[10]=1-s-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function dn(t,n,e,r,i,o,a){var u=1/(e-n),c=1/(i-r),s=1/(o-a);return t[0]=2*o*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*c,t[6]=0,t[7]=0,t[8]=(e+n)*u,t[9]=(i+r)*c,t[10]=(a+o)*s,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*s,t[15]=0,t}function pn(t,n,e,r,i){var o,a=1/Math.tan(n/2);return t[0]=a/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}var vn=pn;function yn(t,n,e,r,i){var o,a=1/Math.tan(n/2);return t[0]=a/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t}function mn(t,n,e,r){var i=Math.tan(n.upDegrees*Math.PI/180),o=Math.tan(n.downDegrees*Math.PI/180),a=Math.tan(n.leftDegrees*Math.PI/180),u=Math.tan(n.rightDegrees*Math.PI/180),c=2/(a+u),s=2/(i+o);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=-(a-u)*c*.5,t[9]=(i-o)*s*.5,t[10]=r/(e-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*e/(e-r),t[15]=0,t}function gn(t,n,e,r,i,o,a){var u=1/(n-e),c=1/(r-i),s=1/(o-a);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*s,t[11]=0,t[12]=(n+e)*u,t[13]=(i+r)*c,t[14]=(a+o)*s,t[15]=1,t}var Mn=gn;function bn(t,n,e,r,i,o,a){var u=1/(n-e),c=1/(r-i),s=1/(o-a);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=s,t[11]=0,t[12]=(n+e)*u,t[13]=(i+r)*c,t[14]=o*s,t[15]=1,t}function xn(t,n,e,r){var i,o,a,u,c,s,f,h,l,d,p=n[0],v=n[1],y=n[2],m=r[0],g=r[1],M=r[2],b=e[0],x=e[1],O=e[2];return Math.abs(p-b)<tt&&Math.abs(v-x)<tt&&Math.abs(y-O)<tt?qt(t):(f=p-b,h=v-x,l=y-O,i=g*(l*=d=1/Math.hypot(f,h,l))-M*(h*=d),o=M*(f*=d)-m*l,a=m*h-g*f,(d=Math.hypot(i,o,a))?(i*=d=1/d,o*=d,a*=d):(i=0,o=0,a=0),u=h*a-l*o,c=l*i-f*a,s=f*o-h*i,(d=Math.hypot(u,c,s))?(u*=d=1/d,c*=d,s*=d):(u=0,c=0,s=0),t[0]=i,t[1]=u,t[2]=f,t[3]=0,t[4]=o,t[5]=c,t[6]=h,t[7]=0,t[8]=a,t[9]=s,t[10]=l,t[11]=0,t[12]=-(i*p+o*v+a*y),t[13]=-(u*p+c*v+s*y),t[14]=-(f*p+h*v+l*y),t[15]=1,t)}function On(t,n,e,r){var i=n[0],o=n[1],a=n[2],u=r[0],c=r[1],s=r[2],f=i-e[0],h=o-e[1],l=a-e[2],d=f*f+h*h+l*l;d>0&&(f*=d=1/Math.sqrt(d),h*=d,l*=d);var p=c*l-s*h,v=s*f-u*l,y=u*h-c*f;return(d=p*p+v*v+y*y)>0&&(p*=d=1/Math.sqrt(d),v*=d,y*=d),t[0]=p,t[1]=v,t[2]=y,t[3]=0,t[4]=h*y-l*v,t[5]=l*p-f*y,t[6]=f*v-h*p,t[7]=0,t[8]=f,t[9]=h,t[10]=l,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function Sn(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function Cn(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function Pn(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t[9]=n[9]+e[9],t[10]=n[10]+e[10],t[11]=n[11]+e[11],t[12]=n[12]+e[12],t[13]=n[13]+e[13],t[14]=n[14]+e[14],t[15]=n[15]+e[15],t}function En(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t[9]=n[9]-e[9],t[10]=n[10]-e[10],t[11]=n[11]-e[11],t[12]=n[12]-e[12],t[13]=n[13]-e[13],t[14]=n[14]-e[14],t[15]=n[15]-e[15],t}function jn(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t[9]=n[9]*e,t[10]=n[10]*e,t[11]=n[11]*e,t[12]=n[12]*e,t[13]=n[13]*e,t[14]=n[14]*e,t[15]=n[15]*e,t}function Tn(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t[9]=n[9]+e[9]*r,t[10]=n[10]+e[10]*r,t[11]=n[11]+e[11]*r,t[12]=n[12]+e[12]*r,t[13]=n[13]+e[13]*r,t[14]=n[14]+e[14]*r,t[15]=n[15]+e[15]*r,t}function An(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[11]===n[11]&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[15]===n[15]}function Rn(t,n){var e=t[0],r=t[1],i=t[2],o=t[3],a=t[4],u=t[5],c=t[6],s=t[7],f=t[8],h=t[9],l=t[10],d=t[11],p=t[12],v=t[13],y=t[14],m=t[15],g=n[0],M=n[1],b=n[2],x=n[3],O=n[4],S=n[5],C=n[6],P=n[7],E=n[8],j=n[9],T=n[10],A=n[11],R=n[12],w=n[13],B=n[14],k=n[15];return Math.abs(e-g)<=tt*Math.max(1,Math.abs(e),Math.abs(g))&&Math.abs(r-M)<=tt*Math.max(1,Math.abs(r),Math.abs(M))&&Math.abs(i-b)<=tt*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(o-x)<=tt*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(a-O)<=tt*Math.max(1,Math.abs(a),Math.abs(O))&&Math.abs(u-S)<=tt*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(c-C)<=tt*Math.max(1,Math.abs(c),Math.abs(C))&&Math.abs(s-P)<=tt*Math.max(1,Math.abs(s),Math.abs(P))&&Math.abs(f-E)<=tt*Math.max(1,Math.abs(f),Math.abs(E))&&Math.abs(h-j)<=tt*Math.max(1,Math.abs(h),Math.abs(j))&&Math.abs(l-T)<=tt*Math.max(1,Math.abs(l),Math.abs(T))&&Math.abs(d-A)<=tt*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-R)<=tt*Math.max(1,Math.abs(p),Math.abs(R))&&Math.abs(v-w)<=tt*Math.max(1,Math.abs(v),Math.abs(w))&&Math.abs(y-B)<=tt*Math.max(1,Math.abs(y),Math.abs(B))&&Math.abs(m-k)<=tt*Math.max(1,Math.abs(m),Math.abs(k))}var wn=$t,Bn=En;function kn(){var t=new nt(3);return nt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Ln(t){var n=new nt(3);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}function Nn(t){var n=t[0],e=t[1],r=t[2];return Math.hypot(n,e,r)}function Dn(t,n,e){var r=new nt(3);return r[0]=t,r[1]=n,r[2]=e,r}function In(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function Yn(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function Xn(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function qn(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function Gn(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function _n(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function Fn(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}function Vn(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}function $n(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function Hn(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function Un(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}function Wn(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function zn(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t}function Qn(t,n){var e=n[0]-t[0],r=n[1]-t[1],i=n[2]-t[2];return Math.hypot(e,r,i)}function Zn(t,n){var e=n[0]-t[0],r=n[1]-t[1],i=n[2]-t[2];return e*e+r*r+i*i}function Jn(t){var n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function Kn(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function te(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function ne(t,n){var e=n[0],r=n[1],i=n[2],o=e*e+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=n[0]*o,t[1]=n[1]*o,t[2]=n[2]*o,t}function ee(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function re(t,n,e){var r=n[0],i=n[1],o=n[2],a=e[0],u=e[1],c=e[2];return t[0]=i*c-o*u,t[1]=o*a-r*c,t[2]=r*u-i*a,t}function ie(t,n,e,r){var i=n[0],o=n[1],a=n[2];return t[0]=i+r*(e[0]-i),t[1]=o+r*(e[1]-o),t[2]=a+r*(e[2]-a),t}function oe(t,n,e,r,i,o){var a=o*o,u=a*(2*o-3)+1,c=a*(o-2)+o,s=a*(o-1),f=a*(3-2*o);return t[0]=n[0]*u+e[0]*c+r[0]*s+i[0]*f,t[1]=n[1]*u+e[1]*c+r[1]*s+i[1]*f,t[2]=n[2]*u+e[2]*c+r[2]*s+i[2]*f,t}function ae(t,n,e,r,i,o){var a=1-o,u=a*a,c=o*o,s=u*a,f=3*o*u,h=3*c*a,l=c*o;return t[0]=n[0]*s+e[0]*f+r[0]*h+i[0]*l,t[1]=n[1]*s+e[1]*f+r[1]*h+i[1]*l,t[2]=n[2]*s+e[2]*f+r[2]*h+i[2]*l,t}function ue(t,n){n=n||1;var e=2*et()*Math.PI,r=2*et()-1,i=Math.sqrt(1-r*r)*n;return t[0]=Math.cos(e)*i,t[1]=Math.sin(e)*i,t[2]=r*n,t}function ce(t,n,e){var r=n[0],i=n[1],o=n[2],a=e[3]*r+e[7]*i+e[11]*o+e[15];return a=a||1,t[0]=(e[0]*r+e[4]*i+e[8]*o+e[12])/a,t[1]=(e[1]*r+e[5]*i+e[9]*o+e[13])/a,t[2]=(e[2]*r+e[6]*i+e[10]*o+e[14])/a,t}function se(t,n,e){var r=n[0],i=n[1],o=n[2];return t[0]=r*e[0]+i*e[3]+o*e[6],t[1]=r*e[1]+i*e[4]+o*e[7],t[2]=r*e[2]+i*e[5]+o*e[8],t}function fe(t,n,e){var r=e[0],i=e[1],o=e[2],a=e[3],u=n[0],c=n[1],s=n[2],f=i*s-o*c,h=o*u-r*s,l=r*c-i*u,d=i*l-o*h,p=o*f-r*l,v=r*h-i*f,y=2*a;return f*=y,h*=y,l*=y,d*=2,p*=2,v*=2,t[0]=u+f+d,t[1]=c+h+p,t[2]=s+l+v,t}function he(t,n,e,r){var i=[],o=[];return i[0]=n[0]-e[0],i[1]=n[1]-e[1],i[2]=n[2]-e[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+e[0],t[1]=o[1]+e[1],t[2]=o[2]+e[2],t}function le(t,n,e,r){var i=[],o=[];return i[0]=n[0]-e[0],i[1]=n[1]-e[1],i[2]=n[2]-e[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+e[0],t[1]=o[1]+e[1],t[2]=o[2]+e[2],t}function de(t,n,e,r){var i=[],o=[];return i[0]=n[0]-e[0],i[1]=n[1]-e[1],i[2]=n[2]-e[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+e[0],t[1]=o[1]+e[1],t[2]=o[2]+e[2],t}function pe(t,n){var e=t[0],r=t[1],i=t[2],o=n[0],a=n[1],u=n[2],c=Math.sqrt(e*e+r*r+i*i)*Math.sqrt(o*o+a*a+u*u),s=c&&ee(t,n)/c;return Math.acos(Math.min(Math.max(s,-1),1))}function ve(t){return t[0]=0,t[1]=0,t[2]=0,t}function ye(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function me(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function ge(t,n){var e=t[0],r=t[1],i=t[2],o=n[0],a=n[1],u=n[2];return Math.abs(e-o)<=tt*Math.max(1,Math.abs(e),Math.abs(o))&&Math.abs(r-a)<=tt*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-u)<=tt*Math.max(1,Math.abs(i),Math.abs(u))}var Me,be=qn,xe=Gn,Oe=_n,Se=Qn,Ce=Zn,Pe=Nn,Ee=Jn,je=(Me=kn(),function(t,n,e,r,i,o){var a,u;for(n||(n=3),e||(e=0),u=r?Math.min(r*n+e,t.length):t.length,a=e;a<u;a+=n)Me[0]=t[a],Me[1]=t[a+1],Me[2]=t[a+2],i(Me,Me,o),t[a]=Me[0],t[a+1]=Me[1],t[a+2]=Me[2];return t});function Te(t){var n=t[0],e=t[1],r=t[2],i=t[3];return Math.hypot(n,e,r,i)}function Ae(t){var n=t[0],e=t[1],r=t[2],i=t[3];return n*n+e*e+r*r+i*i}!function(){var t,n=(t=new nt(4),nt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t)}();function Re(){var t=new nt(4);return nt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function we(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function Be(t,n,e){e*=.5;var r=Math.sin(e);return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=Math.cos(e),t}function ke(t,n){var e=2*Math.acos(n[3]),r=Math.sin(e/2);return r>tt?(t[0]=n[0]/r,t[1]=n[1]/r,t[2]=n[2]/r):(t[0]=1,t[1]=0,t[2]=0),e}function Le(t,n){var e=sr(t,n);return Math.acos(2*e*e-1)}function Ne(t,n,e){var r=n[0],i=n[1],o=n[2],a=n[3],u=e[0],c=e[1],s=e[2],f=e[3];return t[0]=r*f+a*u+i*s-o*c,t[1]=i*f+a*c+o*u-r*s,t[2]=o*f+a*s+r*c-i*u,t[3]=a*f-r*u-i*c-o*s,t}function De(t,n,e){e*=.5;var r=n[0],i=n[1],o=n[2],a=n[3],u=Math.sin(e),c=Math.cos(e);return t[0]=r*c+a*u,t[1]=i*c+o*u,t[2]=o*c-i*u,t[3]=a*c-r*u,t}function Ie(t,n,e){e*=.5;var r=n[0],i=n[1],o=n[2],a=n[3],u=Math.sin(e),c=Math.cos(e);return t[0]=r*c-o*u,t[1]=i*c+a*u,t[2]=o*c+r*u,t[3]=a*c-i*u,t}function Ye(t,n,e){e*=.5;var r=n[0],i=n[1],o=n[2],a=n[3],u=Math.sin(e),c=Math.cos(e);return t[0]=r*c+i*u,t[1]=i*c-r*u,t[2]=o*c+a*u,t[3]=a*c-o*u,t}function Xe(t,n){var e=n[0],r=n[1],i=n[2];return t[0]=e,t[1]=r,t[2]=i,t[3]=Math.sqrt(Math.abs(1-e*e-r*r-i*i)),t}function qe(t,n){var e=n[0],r=n[1],i=n[2],o=n[3],a=Math.sqrt(e*e+r*r+i*i),u=Math.exp(o),c=a>0?u*Math.sin(a)/a:0;return t[0]=e*c,t[1]=r*c,t[2]=i*c,t[3]=u*Math.cos(a),t}function Ge(t,n){var e=n[0],r=n[1],i=n[2],o=n[3],a=Math.sqrt(e*e+r*r+i*i),u=a>0?Math.atan2(a,o)/a:0;return t[0]=e*u,t[1]=r*u,t[2]=i*u,t[3]=.5*Math.log(e*e+r*r+i*i+o*o),t}function _e(t,n,e){return Ge(t,n),cr(t,t,e),qe(t,t),t}function Fe(t,n,e,r){var i,o,a,u,c,s=n[0],f=n[1],h=n[2],l=n[3],d=e[0],p=e[1],v=e[2],y=e[3];return(o=s*d+f*p+h*v+l*y)<0&&(o=-o,d=-d,p=-p,v=-v,y=-y),1-o>tt?(i=Math.acos(o),a=Math.sin(i),u=Math.sin((1-r)*i)/a,c=Math.sin(r*i)/a):(u=1-r,c=r),t[0]=u*s+c*d,t[1]=u*f+c*p,t[2]=u*h+c*v,t[3]=u*l+c*y,t}function Ve(t){var n=et(),e=et(),r=et(),i=Math.sqrt(1-n),o=Math.sqrt(n);return t[0]=i*Math.sin(2*Math.PI*e),t[1]=i*Math.cos(2*Math.PI*e),t[2]=o*Math.sin(2*Math.PI*r),t[3]=o*Math.cos(2*Math.PI*r),t}function $e(t,n){var e=n[0],r=n[1],i=n[2],o=n[3],a=e*e+r*r+i*i+o*o,u=a?1/a:0;return t[0]=-e*u,t[1]=-r*u,t[2]=-i*u,t[3]=o*u,t}function He(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t}function Ue(t,n){var e,r=n[0]+n[4]+n[8];if(r>0)e=Math.sqrt(r+1),t[3]=.5*e,e=.5/e,t[0]=(n[5]-n[7])*e,t[1]=(n[6]-n[2])*e,t[2]=(n[1]-n[3])*e;else{var i=0;n[4]>n[0]&&(i=1),n[8]>n[3*i+i]&&(i=2);var o=(i+1)%3,a=(i+2)%3;e=Math.sqrt(n[3*i+i]-n[3*o+o]-n[3*a+a]+1),t[i]=.5*e,e=.5/e,t[3]=(n[3*o+a]-n[3*a+o])*e,t[o]=(n[3*o+i]+n[3*i+o])*e,t[a]=(n[3*a+i]+n[3*i+a])*e}return t}function We(t,n,e,r){var i=.5*Math.PI/180;n*=i,e*=i,r*=i;var o=Math.sin(n),a=Math.cos(n),u=Math.sin(e),c=Math.cos(e),s=Math.sin(r),f=Math.cos(r);return t[0]=o*c*f-a*u*s,t[1]=a*u*f+o*c*s,t[2]=a*c*s-o*u*f,t[3]=a*c*f+o*u*s,t}function ze(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var Qe,Ze,Je,Ke,tr,nr,er=function(t){var n=new nt(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n},rr=function(t,n,e,r){var i=new nt(4);return i[0]=t,i[1]=n,i[2]=e,i[3]=r,i},ir=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t},or=function(t,n,e,r,i){return t[0]=n,t[1]=e,t[2]=r,t[3]=i,t},ar=function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t},ur=Ne,cr=function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t},sr=function(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]},fr=function(t,n,e,r){var i=n[0],o=n[1],a=n[2],u=n[3];return t[0]=i+r*(e[0]-i),t[1]=o+r*(e[1]-o),t[2]=a+r*(e[2]-a),t[3]=u+r*(e[3]-u),t},hr=Te,lr=hr,dr=Ae,pr=dr,vr=function(t,n){var e=n[0],r=n[1],i=n[2],o=n[3],a=e*e+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=e*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t},yr=function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]},mr=function(t,n){var e=t[0],r=t[1],i=t[2],o=t[3],a=n[0],u=n[1],c=n[2],s=n[3];return Math.abs(e-a)<=tt*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(r-u)<=tt*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(i-c)<=tt*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(o-s)<=tt*Math.max(1,Math.abs(o),Math.abs(s))},gr=(Qe=kn(),Ze=Dn(1,0,0),Je=Dn(0,1,0),function(t,n,e){var r=ee(n,e);return r<-.999999?(re(Qe,Ze,n),Pe(Qe)<1e-6&&re(Qe,Je,n),ne(Qe,Qe),Be(t,Qe,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(re(Qe,n,e),t[0]=Qe[0],t[1]=Qe[1],t[2]=Qe[2],t[3]=1+r,vr(t,t))}),Mr=(Ke=Re(),tr=Re(),function(t,n,e,r,i,o){return Fe(Ke,n,i,o),Fe(tr,e,r,o),Fe(t,Ke,tr,2*o*(1-o)),t}),br=(nr=rt(),function(t,n,e,r){return nr[0]=e[0],nr[3]=e[1],nr[6]=e[2],nr[1]=r[0],nr[4]=r[1],nr[7]=r[2],nr[2]=-n[0],nr[5]=-n[1],nr[8]=-n[2],vr(t,Ue(t,nr))});function xr(){var t=new nt(2);return nt!=Float32Array&&(t[0]=0,t[1]=0),t}function Or(t){var n=new nt(2);return n[0]=t[0],n[1]=t[1],n}function Sr(t,n){var e=new nt(2);return e[0]=t,e[1]=n,e}function Cr(t,n){return t[0]=n[0],t[1]=n[1],t}function Pr(t,n,e){return t[0]=n,t[1]=e,t}function Er(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t}function jr(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t}function Tr(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t}function Ar(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t}function Rr(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t}function wr(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t}function Br(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t}function kr(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t}function Lr(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t}function Nr(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t}function Dr(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t}function Ir(t,n){var e=n[0]-t[0],r=n[1]-t[1];return Math.hypot(e,r)}function Yr(t,n){var e=n[0]-t[0],r=n[1]-t[1];return e*e+r*r}function Xr(t){var n=t[0],e=t[1];return Math.hypot(n,e)}function qr(t){var n=t[0],e=t[1];return n*n+e*e}function Gr(t,n){return t[0]=-n[0],t[1]=-n[1],t}function _r(t,n){return t[0]=1/n[0],t[1]=1/n[1],t}function Fr(t,n){var e=n[0],r=n[1],i=e*e+r*r;return i>0&&(i=1/Math.sqrt(i)),t[0]=n[0]*i,t[1]=n[1]*i,t}function Vr(t,n){return t[0]*n[0]+t[1]*n[1]}function $r(t,n,e){var r=n[0]*e[1]-n[1]*e[0];return t[0]=t[1]=0,t[2]=r,t}function Hr(t,n,e,r){var i=n[0],o=n[1];return t[0]=i+r*(e[0]-i),t[1]=o+r*(e[1]-o),t}function Ur(t,n){n=n||1;var e=2*et()*Math.PI;return t[0]=Math.cos(e)*n,t[1]=Math.sin(e)*n,t}function Wr(t,n,e){var r=n[0],i=n[1];return t[0]=e[0]*r+e[2]*i,t[1]=e[1]*r+e[3]*i,t}function zr(t,n,e){var r=n[0],i=n[1];return t[0]=e[0]*r+e[2]*i+e[4],t[1]=e[1]*r+e[3]*i+e[5],t}function Qr(t,n,e){var r=n[0],i=n[1];return t[0]=e[0]*r+e[3]*i+e[6],t[1]=e[1]*r+e[4]*i+e[7],t}function Zr(t,n,e){var r=n[0],i=n[1];return t[0]=e[0]*r+e[4]*i+e[12],t[1]=e[1]*r+e[5]*i+e[13],t}function Jr(t,n,e,r){var i=n[0]-e[0],o=n[1]-e[1],a=Math.sin(r),u=Math.cos(r);return t[0]=i*u-o*a+e[0],t[1]=i*a+o*u+e[1],t}function Kr(t,n){var e=t[0],r=t[1],i=n[0],o=n[1],a=Math.sqrt(e*e+r*r)*Math.sqrt(i*i+o*o),u=a&&(e*i+r*o)/a;return Math.acos(Math.min(Math.max(u,-1),1))}function ti(t){return t[0]=0,t[1]=0,t}function ni(t){return"vec2("+t[0]+", "+t[1]+")"}function ei(t,n){return t[0]===n[0]&&t[1]===n[1]}function ri(t,n){var e=t[0],r=t[1],i=n[0],o=n[1];return Math.abs(e-i)<=tt*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(r-o)<=tt*Math.max(1,Math.abs(r),Math.abs(o))}var ii=Xr,oi=jr,ai=Tr,ui=Ar,ci=Ir,si=Yr,fi=qr,hi=function(){var t=xr();return function(n,e,r,i,o,a){var u,c;for(e||(e=2),r||(r=0),c=i?Math.min(i*e+r,n.length):n.length,u=r;u<c;u+=e)t[0]=n[u],t[1]=n[u+1],o(t,t,a),n[u]=t[0],n[u+1]=t[1];return n}}(),li=function(){function t(){}return t.tag="c-canvas-rbush-node",t}(),di="RBushRoot",pi=function(){function t(){this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.enableBatch=!1,this.batchedStyleHash="",this.batchedDisplayObject=null,this.toSync=new Set}return t.prototype.syncRTree=function(){var t=this,n=[];Array.from(this.toSync).filter((function(t){return t.isConnected})).forEach((function(e){var r=e.rBushNode;r&&t.rBush.remove(r.aabb);var i=e.getRenderBounds();if(i){var o=b(i.getMin(),2),a=o[0],u=o[1],c=b(i.getMax(),2),s=c[0],f=c[1];r.aabb={id:e.entity,minX:a,minY:u,maxX:s,maxY:f}}r.aabb&&n.push(r.aabb)})),this.rBush.load(n),this.toSync.clear()},t.prototype.pushToSync=function(t){var n=this;t.forEach((function(t){n.toSync.add(t)}))},t.prototype.apply=function(t){var n=this,e=function(t){t.target.rBushNode=new li,n.pushToSync(t.composedPath().slice(0,-2))},r=function(t){var e=t.target,r=e.rBushNode;r.aabb&&(n.rBush.remove(r.aabb),n.toSync.delete(e),n.removedRBushNodeAABBs.push(r.aabb))},i=function(t){var e,r=t.target;(null===(e=r.ownerDocument)||void 0===e?void 0:e.documentElement)===n.renderingContext.root&&(t.detail.affectChildren&&r.forEach((function(t){n.pushToSync([t])})),n.pushToSync(t.composedPath().slice(0,-2)))};t.hooks.init.tapPromise((function(){return m(n,void 0,void 0,(function(){return g(this,(function(t){return this.renderingContext.root.addEventListener(O.ElementEvent.MOUNTED,e),this.renderingContext.root.addEventListener(O.ElementEvent.UNMOUNTED,r),this.renderingContext.root.addEventListener(O.ElementEvent.BOUNDS_CHANGED,i),[2]}))}))})),t.hooks.destroy.tap((function(){n.renderingContext.root.removeEventListener(O.ElementEvent.MOUNTED,e),n.renderingContext.root.removeEventListener(O.ElementEvent.UNMOUNTED,r),n.renderingContext.root.removeEventListener(O.ElementEvent.BOUNDS_CHANGED,i)})),t.hooks.beginFrame.tap((function(){var t=n.contextService.getContext(),e=n.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering;n.clearFullScreen=!e||n.renderingContext.renderReasons.has(O.RenderReason.CAMERA_CHANGED),t&&(t.save(),n.clearFullScreen&&t.clearRect(0,0,n.canvasConfig.width,n.canvasConfig.height),n.applyTransform(t,n.camera.getOrthoMatrix()))})),t.hooks.endFrame.tap((function(){n.syncRTree();var e=n.canvasConfig.renderer.getConfig(),r=e.enableDirtyRectangleRendering,i=e.enableDirtyRectangleRenderingDebug,o=n.contextService.getContext(),u=n.renderQueue;if(r){if(!n.clearFullScreen){var c=n.safeMergeAABB.apply(n,x([n.mergeDirtyAABBs(n.renderQueue)],b(n.removedRBushNodeAABBs.map((function(t){var n=t.minX,e=t.minY,r=t.maxX,i=t.maxY,o=new O.AABB;return o.setMinMax(a.fromValues(n,e,0),a.fromValues(r,i,0)),o}))),!1));if(n.removedRBushNodeAABBs=[],O.AABB.isEmpty(c))return void(n.renderQueue=[]);var s=n.convertAABB2Rect(c),f=s.x,h=s.y,l=s.width,d=s.height;o.clearRect(f,h,l,d),o.beginPath(),o.rect(f,h,l,d),o.clip(),i&&(o.lineWidth=4,o.strokeStyle="rgba(".concat(255*Math.random(),", ").concat(255*Math.random(),", ").concat(255*Math.random(),", 1)"),o.strokeRect(f,h,l,d)),u=n.searchDirtyObjects(c)}u.sort((function(t,n){return t.sortable.renderOrder-n.sortable.renderOrder})).forEach((function(e){e&&e.isVisible()&&!e.isCulled()&&n.renderDisplayObject(e,t)})),n.enableBatch&&n.batchedStyleHash&&n.flush(o,t),n.renderQueue.forEach((function(t){n.saveDirtyAABB(t)})),n.renderQueue=[]}n.restoreStack.forEach((function(t){o.restore()})),n.restoreStack=[],n.clearFullScreen=!1,o.restore()})),t.hooks.render.tap((function(e){n.canvasConfig.renderer.getConfig().enableDirtyRectangleRendering?n.renderQueue.push(e):e.isVisible()&&!e.isCulled()&&n.renderDisplayObject(e,t)}))},t.prototype.flush=function(t,n){if(this.batchedDisplayObject){var e=this.styleRendererFactory(this.batchedDisplayObject.nodeName);e&&(this.applyAttributesToContext(t,this.batchedDisplayObject,n),t.closePath(),e.render(t,this.batchedDisplayObject.parsedStyle,this.batchedDisplayObject),t.restore()),this.batchedStyleHash="",this.batchedDisplayObject=null}},t.prototype.renderDisplayObject=function(t,n){for(var e=this,r=this.contextService.getContext(),i=this.restoreStack[this.restoreStack.length-1];i&&t.parentNode!==i;)r.restore(),this.restoreStack.pop(),i=this.restoreStack[this.restoreStack.length-1];var o=t.nodeName,a=this.styleRendererFactory(o),u=!1;if(this.enableBatch&&a){var c=a.hash(t.attributes);this.batchedStyleHash&&c!==this.batchedStyleHash&&this.flush(r,n),this.batchedStyleHash||(this.batchedStyleHash=c,this.batchedDisplayObject=t,u=!0)}r.save(),this.applyTransform(r,t.getLocalTransform());var s=t.style.clipPath;if(s){r.save(),this.applyTransform(r,s.getLocalTransform());var f=this.pathGeneratorFactory(s.nodeName);f&&this.useAnchor(r,s,(function(){r.beginPath(),f(r,s.parsedStyle),r.closePath()})),r.restore(),r.clip()}this.enableBatch||(r.save(),this.applyAttributesToContext(r,t,n)),this.useAnchor(r,t,(function(){var n=e.pathGeneratorFactory(t.nodeName);n&&(!u&&e.enableBatch||r.beginPath(),n(r,t.parsedStyle),e.enableBatch||t.nodeName===O.Shape.LINE||t.nodeName===O.Shape.PATH||t.nodeName===O.Shape.POLYLINE||r.closePath()),a&&!e.enableBatch&&a.render(r,t.parsedStyle,t)})),this.enableBatch||r.restore(),t.renderable.dirty=!1,this.restoreStack.push(t)},t.prototype.convertAABB2Rect=function(t){var n=t.getMin(),e=t.getMax(),r=Math.floor(n[0]),i=Math.floor(n[1]);return{x:r,y:i,width:Math.ceil(e[0])-r,height:Math.ceil(e[1])-i}},t.prototype.mergeDirtyAABBs=function(t){var n=new O.AABB;return t.forEach((function(t){var e=t.getRenderBounds();n.add(e);var r=t.renderable.dirtyRenderBounds;r&&n.add(r)})),n},t.prototype.searchDirtyObjects=function(t){var n=this,e=b(t.getMin(),2),r=e[0],i=e[1],o=b(t.getMax(),2),a=o[0],u=o[1];return this.rBush.search({minX:r,minY:i,maxX:a,maxY:u}).map((function(t){var e=t.id;return n.displayObjectPool.getByEntity(e)}))},t.prototype.saveDirtyAABB=function(t){var n=t.renderable;n.dirtyRenderBounds||(n.dirtyRenderBounds=new O.AABB);var e=t.getRenderBounds();e&&n.dirtyRenderBounds.update(e.center,e.halfExtents)},t.prototype.applyTransform=function(t,n){var e=b(o.getTranslation(a.create(),n),2),r=e[0],i=e[1],c=b(o.getScaling(a.create(),n),2),s=c[0],f=c[1],h=o.getRotation(u.create(),n),l=b(Object(O.getEuler)(a.create(),h),3),d=l[0],p=(l[1],l[2]),v=Object(O.fromRotationTranslationScale)(d||p,r,i,s,f);t.transform(v[0],v[1],v[3],v[4],v[6],v[7])},t.prototype.getColor=function(t,n,e,r){var i;if(t instanceof O.CSSGradientValue){if(t.type===O.GradientPatternType.LinearGradient||t.type===O.GradientPatternType.RadialGradient){var o=n.getGeometryBounds(),a=o&&2*o.halfExtents[0]||0,u=o&&2*o.halfExtents[1]||0;i=this.gradientPool.getOrCreateGradient(p(p({type:t.type},t.value),{width:a,height:u}),e)}else if(t.type===O.GradientPatternType.Pattern){var c=this.imagePool.getPatternSync(t.value);c?i=c:this.imagePool.createPattern(t.value,e).then((function(){n.renderable.dirty=!0,r.dirtify()}))}}else i=t.toString();return i},t.prototype.applyAttributesToContext=function(t,n,e){var r=n.parsedStyle,i=r.stroke,o=r.fill,a=r.opacity,u=r.lineDash,c=r.lineDashOffset,s=r.filter,f=r.shadowColor,h=r.shadowBlur,l=r.shadowOffsetX,d=r.shadowOffsetY;u&&Array.isArray(u)&&t.setLineDash(u.map((function(t){return t.value}))),Object(O.isNil)(c)||(t.lineDashOffset=c.value),Object(O.isNil)(a)||(t.globalAlpha*=a.value),Object(O.isNil)(i)||(t.strokeStyle=this.getColor(i,n,t,e)),Object(O.isNil)(o)||(t.fillStyle=this.getColor(o,n,t,e)),Object(O.isNil)(s)||(t.filter=n.style.filter),Object(O.isNil)(f)||(t.shadowColor=f.toString(),t.shadowBlur=h&&h.value||0,t.shadowOffsetX=l&&l.value||0,t.shadowOffsetY=d&&d.value||0)},t.prototype.useAnchor=function(t,n,e){var r=n.getGeometryBounds();if(r){var i=r.halfExtents,o=(n.parsedStyle||{}).anchor;t.translate(-(o&&o[0].value||0)*i[0]*2,-(o&&o[1].value||0)*i[1]*2),e()}else e()},t.prototype.safeMergeAABB=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=new O.AABB;return t.forEach((function(t){e.add(t)})),e},v([Object(S.inject)(O.CanvasConfig),y("design:type",Object)],t.prototype,"canvasConfig",void 0),v([Object(S.inject)(O.DefaultCamera),y("design:type",O.Camera)],t.prototype,"camera",void 0),v([Object(S.inject)(O.ContextService),y("design:type",Object)],t.prototype,"contextService",void 0),v([Object(S.inject)(O.RenderingContext),y("design:type",Object)],t.prototype,"renderingContext",void 0),v([Object(S.inject)(q),y("design:type",q)],t.prototype,"imagePool",void 0),v([Object(S.inject)(Z),y("design:type",Z)],t.prototype,"gradientPool",void 0),v([Object(S.inject)(J),y("design:type",Function)],t.prototype,"pathGeneratorFactory",void 0),v([Object(S.inject)(R),y("design:type",Function)],t.prototype,"styleRendererFactory",void 0),v([Object(S.inject)(O.DisplayObjectPool),y("design:type",O.DisplayObjectPool)],t.prototype,"displayObjectPool",void 0),v([Object(S.inject)(di),y("design:type",A.a)],t.prototype,"rBush",void 0),t=v([Object(S.singleton)({contrib:O.RenderingPluginContribution})],t)}(),vi=function(){function t(){}return t.prototype.apply=function(t){var n=this,e=function(e){var r=e.target,i=r.nodeName,o=r.attributes;if(i===O.Shape.IMAGE){var a=o.img;Object(O.isString)(a)&&n.imagePool.getOrCreateImage(a).then((function(){r.renderable.dirty=!0,t.dirtify()}))}},r=function(e){var r=e.target,i=e.attrName,o=e.newValue;r.nodeName===O.Shape.IMAGE&&"img"===i&&Object(O.isString)(o)&&n.imagePool.getOrCreateImage(o).then((function(){r.renderable.dirty=!0,t.dirtify()}))};t.hooks.init.tapPromise((function(){return m(n,void 0,void 0,(function(){return g(this,(function(t){return this.renderingContext.root.addEventListener(O.ElementEvent.MOUNTED,e),this.renderingContext.root.addEventListener(O.ElementEvent.ATTR_MODIFIED,r),[2]}))}))})),t.hooks.destroy.tap((function(){n.renderingContext.root.removeEventListener(O.ElementEvent.MOUNTED,e),n.renderingContext.root.removeEventListener(O.ElementEvent.ATTR_MODIFIED,r)}))},v([Object(S.inject)(q),y("design:type",q)],t.prototype,"imagePool",void 0),v([Object(S.inject)(O.RenderingContext),y("design:type",Object)],t.prototype,"renderingContext",void 0),t=v([Object(S.singleton)({contrib:O.RenderingPluginContribution})],t)}();S.GlobalContainer.register({token:{token:K,named:O.Shape.CIRCLE},useValue:function(t,n){var e=n.r;t.arc(e.value,e.value,e.value,0,2*Math.PI,!1)}}),S.GlobalContainer.register({token:{token:K,named:O.Shape.ELLIPSE},useValue:function(t,n){var e=n.rx,r=n.ry,i=e.value,o=r.value;if(t.ellipse)t.ellipse(i,o,i,o,0,0,2*Math.PI,!1);else{var a=i>o?i:o,u=i>o?1:i/o,c=i>o?o/i:1;t.save(),t.scale(u,c),t.arc(0,0,a,0,2*Math.PI)}}}),S.GlobalContainer.register({token:{token:K,named:O.Shape.RECT},useValue:function(t,n){var e=n.radius,r=n.width,i=n.height,o=r.value,a=i.value,u=e&&e.value||0;if(0===u)t.rect(0,0,o,a);else{var c=b(function(t){var n=0,e=0,r=0,i=0;return Array.isArray(t)?1===t.length?n=e=r=i=t[0]:2===t.length?(n=r=t[0],e=i=t[1]):3===t.length?(n=t[0],e=i=t[1],r=t[2]):(n=t[0],e=t[1],r=t[2],i=t[3]):n=e=r=i=t,[n,e,r,i]}(u),4),s=c[0],f=c[1],h=c[2],l=c[3];t.moveTo(s,0),t.lineTo(o-f,0),0!==f&&t.arc(o-f,f,f,-Math.PI/2,0),t.lineTo(o,a-h),0!==h&&t.arc(o-h,a-h,h,0,Math.PI/2),t.lineTo(l,a),0!==l&&t.arc(l,a-l,l,Math.PI/2,Math.PI),t.lineTo(0,s),0!==s&&t.arc(s,s,s,Math.PI,1.5*Math.PI)}}}),S.GlobalContainer.register({token:{token:K,named:O.Shape.LINE},useValue:function(t,n){var e=n.x1,r=n.y1,i=n.x2,o=n.y2,a=n.defX,u=void 0===a?0:a,c=n.defY,s=void 0===c?0:c;t.moveTo(e.value-u,r.value-s),t.lineTo(i.value-u,o.value-s)}}),S.GlobalContainer.register({token:{token:K,named:O.Shape.POLYLINE},useValue:function(t,n){var e=n.defX,r=void 0===e?0:e,i=n.defY,o=void 0===i?0:i,a=n.points.points,u=a.length,c=a[0][0]-r,s=a[0][1]-o,f=a[u-1][0]-r,h=a[u-1][1]-o;t.moveTo(c,s);for(var l=0;l<u-1;l++){var d=a[l];t.lineTo(d[0]-r,d[1]-o)}t.lineTo(f,h)}}),S.GlobalContainer.register({token:{token:K,named:O.Shape.POLYGON},useValue:function(t,n){var e=n.defX,r=void 0===e?0:e,i=n.defY,o=void 0===i?0:i,a=n.points.points,u=a.length,c=a[0][0]-r,s=a[0][1]-o,f=a[u-1][0]-r,h=a[u-1][1]-o;t.moveTo(c,s);for(var l=0;l<u-1;l++){var d=a[l];t.lineTo(d[0]-r,d[1]-o)}t.lineTo(f,h)}}),S.GlobalContainer.register({token:{token:K,named:O.Shape.PATH},useValue:function(t,n){var e=n.defX,r=void 0===e?0:e,i=n.defY,o=void 0===i?0:i,a=n.path,u=a.curve,c=a.zCommandIndexes,s=u;c.forEach((function(t,n){s.splice(t+n,0,["Z"])}));for(var f=0;f<s.length;f++){var h=s[f];switch(h[0]){case"M":t.moveTo(h[1]-r,h[2]-o);break;case"C":t.bezierCurveTo(h[1]-r,h[2]-o,h[3]-r,h[4]-o,h[5]-r,h[6]-o);break;case"Z":t.closePath()}}}}),S.GlobalContainer.register({token:J,useFactory:function(t){var n={};return function(e){return n[e]||t.container.isBoundNamed(K,e)&&(n[e]=t.container.getNamed(K,e)),n[e]}}});var yi=Object(S.Module)((function(t){var n;t(q),t({token:di,useValue:new A.a}),t($),t(H),t(V),t(G),t(_),t(U),t(W),t(z),t(Q);var e=((n={})[O.Shape.CIRCLE]=w,n[O.Shape.ELLIPSE]=B,n[O.Shape.RECT]=k,n[O.Shape.IMAGE]=X,n[O.Shape.TEXT]=Y,n[O.Shape.LINE]=L,n[O.Shape.POLYLINE]=N,n[O.Shape.POLYGON]=D,n[O.Shape.PATH]=I,n);t({token:R,useFactory:function(t){var n={};return function(r){var i=e[r];return i&&!n[r]&&t.container.isBound(i)&&(n[r]=t.container.get(i)),n[r]}}}),t(Z),t(pi),t(vi)})),mi=function(){function t(){}return t.prototype.init=function(t){t.load(yi,!0)},t.prototype.destroy=function(t){t.unload(yi)},t}(),gi=S.Syringe.defineToken("PointInPathPicker"),Mi=function(){function t(){var t=this;this.isHit=function(n,e,r){var i=t.pointInPathPickerFactory(n.nodeName);if(i){var u=o.invert(o.create(),r),c=a.transformMat4(a.create(),a.fromValues(e[0],e[1],0),u),s=n.getGeometryBounds().halfExtents,f=n.parsedStyle.anchor;if(c[0]+=(f&&f[0].value||0)*s[0]*2,c[1]+=(f&&f[1].value||0)*s[1]*2,i(n,new O.Point(c[0],c[1]),t.isPointInPath))return!0}return!1},this.isPointInPath=function(n,e){var r=t.offscreenCanvas.getOrCreateContext(t.canvasConfig.offscreenCanvas),i=t.pathGeneratorFactory(n.nodeName);return i&&i(r,n.parsedStyle),r.isPointInPath(e.x,e.y)}}return t.prototype.apply=function(t){var n=this;t.hooks.pick.tapPromise((function(t){return m(n,void 0,void 0,(function(){var n,e,r,i,u,c,s,f,h,l,d,p,v,y,m,b,x,O=this;return g(this,(function(g){n=t.topmost,e=t.position,r=e.x,i=e.y,u=a.fromValues(r,i,0),c=this.rBush.search({minX:u[0],minY:u[1],maxX:u[0],maxY:u[1]}),s=c.map((function(t){return t.id})),f=[],c.forEach((function(t){var n=t.id,e=O.displayObjectPool.getByEntity(n);if(e.isVisible()&&!e.isCulled()&&e.isInteractive()){if(e.parentNode&&-1===s.indexOf(e.parentNode.entity))return;f.push(e)}})),f.sort((function(t,n){return n.sortable.renderOrder-t.sortable.renderOrder})),h=[];try{for(l=M(f),d=l.next();!d.done;d=l.next())if(p=d.value,v=p.parsedStyle.clipPath,y=v||p,m=p.getWorldTransform(),v&&(m=o.multiply(o.create(),m,v.getLocalTransform())),this.isHit(y,u,m)){if(n)return t.picked=[p],[2,t];h.push(p)}}catch(t){b={error:t}}finally{try{d&&!d.done&&(x=l.return)&&x.call(l)}finally{if(b)throw b.error}}return t.picked=h,[2,t]}))}))}))},v([Object(S.inject)(O.DisplayObjectPool),y("design:type",O.DisplayObjectPool)],t.prototype,"displayObjectPool",void 0),v([Object(S.inject)(O.CanvasConfig),y("design:type",Object)],t.prototype,"canvasConfig",void 0),v([Object(S.inject)(O.OffscreenCanvasCreator),y("design:type",O.OffscreenCanvasCreator)],t.prototype,"offscreenCanvas",void 0),v([Object(S.inject)(di),y("design:type",Function)],t.prototype,"rBush",void 0),v([Object(S.inject)(J),y("design:type",Function)],t.prototype,"pathGeneratorFactory",void 0),v([Object(S.inject)(gi),y("design:type",Function)],t.prototype,"pointInPathPickerFactory",void 0),t=v([Object(S.singleton)({contrib:O.RenderingPluginContribution})],t)}();function bi(t,n,e,r){var i=t-e,o=n-r;return Math.sqrt(i*i+o*o)}function xi(t,n){return Math.abs(t-n)<.001}function Oi(t,n){var e=Math.min.apply(Math,x([],b(t),!1)),r=Math.min.apply(Math,x([],b(n),!1));return{x:e,y:r,width:Math.max.apply(Math,x([],b(t),!1))-e,height:Math.max.apply(Math,x([],b(n),!1))-r}}function Si(t){return(t+2*Math.PI)%(2*Math.PI)}var Ci={box:function(t,n,e,r){return Oi([t,e],[n,r])},length:function(t,n,e,r){return bi(t,n,e,r)},pointAt:function(t,n,e,r,i){return{x:(1-i)*t+i*e,y:(1-i)*n+i*r}},pointDistance:function(t,n,e,r,i,o){var a=(e-t)*(i-t)+(r-n)*(o-n);return a<0?bi(t,n,i,o):a>(e-t)*(e-t)+(r-n)*(r-n)?bi(e,r,i,o):this.pointToLine(t,n,e,r,i,o)},pointToLine:function(t,n,e,r,i,o){var a=[e-t,r-n];if(c.exactEquals(a,[0,0]))return Math.sqrt((i-t)*(i-t)+(o-n)*(o-n));var u=[-a[1],a[0]];c.normalize(u,u);var s=[i-t,o-n];return Math.abs(c.dot(s,u))},tangentAngle:function(t,n,e,r){return Math.atan2(r-n,e-t)}};function Pi(t,n,e,r,i,o){var a=-1,u=1/0,c=[e,r],s=20;o&&o>200&&(s=o/10);for(var f=1/s,h=f/10,l=0;l<=s;l++){var d=l*f,p=[i.apply(void 0,x([],b(t.concat([d])),!1)),i.apply(void 0,x([],b(n.concat([d])),!1))];(g=bi(c[0],c[1],p[0],p[1]))<u&&(a=d,u=g)}if(0===a)return{x:t[0],y:n[0]};if(1===a){var v=t.length;return{x:t[v-1],y:n[v-1]}}u=1/0;for(l=0;l<32&&!(h<1e-4);l++){var y=a-h,m=a+h,g=(p=[i.apply(void 0,x([],b(t.concat([y])),!1)),i.apply(void 0,x([],b(n.concat([y])),!1))],bi(c[0],c[1],p[0],p[1]));if(y>=0&&g<u)a=y,u=g;else{var M=[i.apply(void 0,x([],b(t.concat([m])),!1)),i.apply(void 0,x([],b(n.concat([m])),!1))],O=bi(c[0],c[1],M[0],M[1]);m<=1&&O<u?(a=m,u=O):h*=.5}}return{x:i.apply(void 0,x([],b(t.concat([a])),!1)),y:i.apply(void 0,x([],b(n.concat([a])),!1))}}function Ei(t,n,e,r){var i=1-r;return i*i*t+2*r*i*n+r*r*e}function ji(t,n,e){var r=t+e-2*n;if(xi(r,0))return[.5];var i=(t-n)/r;return i<=1&&i>=0?[i]:[]}function Ti(t,n,e,r){return 2*(1-r)*(n-t)+2*r*(e-n)}function Ai(t,n,e,r,i,o,a){var u=Ei(t,e,i,a),c=Ei(n,r,o,a),s=Ci.pointAt(t,n,e,r,a),f=Ci.pointAt(e,r,i,o,a);return[[t,n,s.x,s.y,u,c],[u,c,f.x,f.y,i,o]]}var Ri={box:function(t,n,e,r,i,o){var a=ji(t,e,i)[0],u=ji(n,r,o)[0],c=[t,i],s=[n,o];return void 0!==a&&c.push(Ei(t,e,i,a)),void 0!==u&&s.push(Ei(n,r,o,u)),Oi(c,s)},length:function(t,n,e,r,i,o){return function t(n,e,r,i,o,a,u){if(0===u)return(bi(n,e,r,i)+bi(r,i,o,a)+bi(n,e,o,a))/2;var c=Ai(n,e,r,i,o,a,.5),s=c[0],f=c[1];return s.push(u-1),f.push(u-1),t.apply(void 0,x([],b(s),!1))+t.apply(void 0,x([],b(f),!1))}(t,n,e,r,i,o,3)},nearestPoint:function(t,n,e,r,i,o,a,u){return Pi([t,e,i],[n,r,o],a,u,Ei)},pointDistance:function(t,n,e,r,i,o,a,u){var c=this.nearestPoint(t,n,e,r,i,o,a,u);return bi(c.x,c.y,a,u)},interpolationAt:Ei,pointAt:function(t,n,e,r,i,o,a){return{x:Ei(t,e,i,a),y:Ei(n,r,o,a)}},divide:function(t,n,e,r,i,o,a){return Ai(t,n,e,r,i,o,a)},tangentAngle:function(t,n,e,r,i,o,a){var u=Ti(t,e,i,a),c=Ti(n,r,o,a);return Si(Math.atan2(c,u))}};function wi(t,n,e,r,i){var o=1-i;return o*o*o*t+3*n*i*o*o+3*e*i*i*o+r*i*i*i}function Bi(t,n,e,r,i){var o=1-i;return 3*(o*o*(n-t)+2*o*i*(e-n)+i*i*(r-e))}function ki(t,n,e,r){var i,o,a,u=-3*t+9*n-9*e+3*r,c=6*t-12*n+6*e,s=3*n-3*t,f=[];if(xi(u,0))xi(c,0)||(i=-s/c)>=0&&i<=1&&f.push(i);else{var h=c*c-4*u*s;xi(h,0)?f.push(-c/(2*u)):h>0&&(o=(-c-(a=Math.sqrt(h)))/(2*u),(i=(-c+a)/(2*u))>=0&&i<=1&&f.push(i),o>=0&&o<=1&&f.push(o))}return f}function Li(t,n,e,r,i,o,a,u,c){var s=wi(t,e,i,a,c),f=wi(n,r,o,u,c),h=Ci.pointAt(t,n,e,r,c),l=Ci.pointAt(e,r,i,o,c),d=Ci.pointAt(i,o,a,u,c),p=Ci.pointAt(h.x,h.y,l.x,l.y,c),v=Ci.pointAt(l.x,l.y,d.x,d.y,c);return[[t,n,h.x,h.y,p.x,p.y,s,f],[s,f,v.x,v.y,d.x,d.y,a,u]]}function Ni(t,n,e,r,i,o,a,u,c){if(0===c)return function(t,n){for(var e=0,r=t.length,i=0;i<r;i++){e+=bi(t[i],n[i],t[(i+1)%r],n[(i+1)%r])}return e/2}([t,e,i,a],[n,r,o,u]);var s=Li(t,n,e,r,i,o,a,u,.5),f=x(x([],b(s[0]),!1),[c-1],!1),h=x(x([],b(s[1]),!1),[c-1],!1);return Ni.apply(void 0,x([],b(f),!1))+Ni.apply(void 0,x([],b(h),!1))}var Di={extrema:ki,box:function(t,n,e,r,i,o,a,u){for(var c=[t,a],s=[n,u],f=ki(t,e,i,a),h=ki(n,r,o,u),l=0;l<f.length;l++)c.push(wi(t,e,i,a,f[l]));for(l=0;l<h.length;l++)s.push(wi(n,r,o,u,h[l]));return Oi(c,s)},length:function(t,n,e,r,i,o,a,u){return Ni(t,n,e,r,i,o,a,u,3)},nearestPoint:function(t,n,e,r,i,o,a,u,c,s,f){return Pi([t,e,i,a],[n,r,o,u],c,s,wi,f)},pointDistance:function(t,n,e,r,i,o,a,u,c,s,f){var h=this.nearestPoint(t,n,e,r,i,o,a,u,c,s,f);return bi(h.x,h.y,c,s)},interpolationAt:wi,pointAt:function(t,n,e,r,i,o,a,u,c){return{x:wi(t,e,i,a,c),y:wi(n,r,o,u,c)}},divide:function(t,n,e,r,i,o,a,u,c){return Li(t,n,e,r,i,o,a,u,c)},tangentAngle:function(t,n,e,r,i,o,a,u,c){var s=Bi(t,e,i,a,c),f=Bi(n,r,o,u,c);return Si(Math.atan2(f,s))}};function Ii(t,n,e,r){var i=t-e,o=n-r;return Math.sqrt(i*i+o*o)}function Yi(t,n,e,r,i,o){return i>=t&&i<=t+e&&o>=n&&o<=n+r}function Xi(t,n,e,r,i,o,a,u){var c=(Math.atan2(u-n,a-t)+2*Math.PI)%(2*Math.PI);if(c<r||c>i)return!1;var s={x:t+e*Math.cos(c),y:n+e*Math.sin(c)};return Ii(s.x,s.y,a,u)<=o/2}function qi(t,n,e,r,i,o,a){var u=Math.min(t,e),c=Math.max(t,e),s=Math.min(n,r),f=Math.max(n,r),h=i/2;return o>=u-h&&o<=c+h&&a>=s-h&&a<=f+h&&Ci.pointToLine(t,n,e,r,o,a)<=i/2}function Gi(t,n,e,r,i){var o=t.length;if(o<2)return!1;for(var a=0;a<o-1;a++){if(qi(t[a][0],t[a][1],t[a+1][0],t[a+1][1],n,e,r))return!0}if(i){var u=t[0],c=t[o-1];if(qi(u[0],u[1],c[0],c[1],n,e,r))return!0}return!1}function _i(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function Fi(t,n,e){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])&&Math.min(t[0],n[0])<=e[0]&&e[0]<=Math.max(t[0],n[0])&&Math.min(t[1],n[1])<=e[1]&&e[1]<=Math.max(t[1],n[1])}function Vi(t,n,e){var r=!1,i=t.length;if(i<=2)return!1;for(var o=0;o<i;o++){var a=t[o],u=t[(o+1)%i];if(Fi(a,u,[n,e]))return!0;_i(a[1]-e)>0!=_i(u[1]-e)>0&&_i(n-(e-a[1])*(a[0]-u[0])/(a[1]-u[1])-a[0])<0&&(r=!r)}return r}function $i(t,n,e){for(var r=!1,i=0;i<t.length;i++){if(r=Vi(t[i],n,e))break}return r}function Hi(t,n){var e=t.parsedStyle,r=e.r,i=e.fill,o=e.stroke,a=e.lineWidth,u=e.clipPathTargets,c=r.value,s=a.value/2,f=Ii(c,c,n.x,n.y),h=!!(null==u?void 0:u.length),l=i&&!i.isNone,d=o&&!o.isNone;return l&&d||h?f<=c+s:l?f<=c:!!d&&(f>=c-s&&f<=c+s)}function Ui(t,n,e,r){return t/(e*e)+n/(r*r)}function Wi(t,n){var e=n.x,r=n.y,i=t.parsedStyle,o=i.rx,a=i.ry,u=i.fill,c=i.stroke,s=i.lineWidth,f=i.clipPathTargets,h=!!(null==f?void 0:f.length),l=u&&!u.isNone,d=c&&!c.isNone,p=o.value,v=a.value,y=s.value/2,m=(e-p)*(e-p),g=(r-v)*(r-v);return l&&d||h?Ui(m,g,p+y,v+y)<=1:l?Ui(m,g,p,v)<=1:!!d&&(Ui(m,g,p-y,v-y)>=1&&Ui(m,g,p+y,v+y)<=1)}function zi(t,n){var e=t.parsedStyle,r=e.x1,i=e.y1,o=e.x2,a=e.y2,u=e.lineWidth,c=e.defX,s=void 0===c?0:c,f=e.defY,h=void 0===f?0:f;return qi(r.value,i.value,o.value,a.value,u.value,n.x+s,n.y+h)}function Qi(t,n){var e=t.parsedStyle,r=e.stroke,i=e.lineWidth,o=e.points,a=e.defX,u=void 0===a?0:a,c=e.defY,s=void 0===c?0:c,f=e.clipPathTargets,h=!!(null==f?void 0:f.length);return!(("none"===t.attributes.stroke||!r)&&!h||!i)&&Gi(o.points,i.value,n.x+u,n.y+s,!1)}function Zi(t,n,e){var r=t.parsedStyle,o=r.lineWidth,a=r.stroke,u=r.fill,s=r.defX,f=void 0===s?0:s,h=r.defY,l=void 0===h?0:h,d=r.clipPathTargets,p=r.path,v=u&&!u.isNone,y=a&&!a.isNone,m=p.segments,g=p.hasArc,M=p.polylines,b=p.polygons,x=p.totalLength,O=!!(null==d?void 0:d.length),S=!1;return(y||O)&&(S=function(t,n,e,r,o,a,u){for(var s=!1,f=n/2,h=0;h<t.length;h++){var l=t[h],d=l.currentPoint,p=l.params,v=l.prePoint,y=l.box;if(!y||Yi(y.x-f,y.y-f,y.width+n,y.height+n,e,r)){switch(l.command){case"L":case"Z":s=qi(v[0],v[1],d[0],d[1],n,e,r);break;case"Q":s=Ri.pointDistance(v[0],v[1],p[1],p[2],p[3],p[4],e,r)<=n/2;break;case"C":s=Di.pointDistance(v[0],v[1],p[1],p[2],p[3],p[4],p[5],p[6],e,r,o)<=n/2;break;case"A":var m=l.arcParams,g=m.cx,M=m.cy,b=m.rx,x=m.ry,O=m.startAngle,S=m.endAngle,C=m.xRotation,P=b>x?b:x,E=b>x?1:b/x,j=b>x?x/b:1,T=i.fromTranslation(i.create(),[-g,-M]);i.multiply(T,i.fromRotation(i.create(),-C),T),i.multiply(T,i.fromScaling(i.create(),[1/E,1/j]),T);var A=c.fromValues(e,r);s=Xi(0,0,P,O,S,n,(A=c.transformMat3(A,A,T))[0],A[1])}if(s)break}}return s}(m,o.value,n.x+f,n.y+l,x)),S||!v&&!O||(S=g?e(t,n):$i(b,n.x+f,n.y+l)||$i(M,n.x+f,n.y+l)),S}function Ji(t,n,e){var r=t.parsedStyle,i=r.radius,o=r.fill,a=r.stroke,u=r.lineWidth,c=r.width,s=r.height,f=r.clipPathTargets,h=!!(null==f?void 0:f.length),l=o&&!o.isNone,d=a&&!a.isNone,p=c.unit,v=c.value,y=s.unit,m=s.value,g=0,M=0;if(p!==O.UnitType.kNumber&&p!==O.UnitType.kPixels||(g=v),y!==O.UnitType.kNumber&&y!==O.UnitType.kPixels||(M=m),i){var b=!1;return(d||h)&&(b=function(t,n,e,r,i,o,a,u){return qi(t+i,n,t+e-i,n,o,a,u)||qi(t+e,n+i,t+e,n+r-i,o,a,u)||qi(t+e-i,n+r,t+i,n+r,o,a,u)||qi(t,n+r-i,t,n+i,o,a,u)||Xi(t+e-i,n+i,i,1.5*Math.PI,2*Math.PI,o,a,u)||Xi(t+e-i,n+r-i,i,0,.5*Math.PI,o,a,u)||Xi(t+i,n+r-i,i,.5*Math.PI,Math.PI,o,a,u)||Xi(t+i,n+i,i,Math.PI,1.5*Math.PI,o,a,u)}(0,0,g,M,i.value,u.value,n.x,n.y)),b||!l&&!h||(b=e(t,n)),b}var x=u.value/2;return l&&d||h?Yi(0-x,0-x,g+x,M+x,n.x,n.y):l?Yi(0,0,g,M,n.x,n.y):!!d&&function(t,n,e,r,i,o,a){var u=i/2;return Yi(t-u,n-u,e,i,o,a)||Yi(t+e-u,n-u,i,r,o,a)||Yi(t+u,n+r-u,e,i,o,a)||Yi(t-u,n+u,i,r,o,a)}(0,0,g,M,u.value,n.x,n.y)}function Ki(t,n){var e=t.parsedStyle,r=e.stroke,i=e.fill,o=e.lineWidth,a=e.points,u=e.defX,c=void 0===u?0:u,s=e.defY,f=void 0===s?0:s,h=e.clipPathTargets,l=!!(null==h?void 0:h.length),d=i&&!i.isNone,p=!1;return(r&&!r.isNone||l)&&(p=Gi(a.points,o.value,n.x+c,n.y+f,!0)),p||!d&&!l||(p=Vi(a.points,n.x+c,n.y+f)),p}var to=Object(S.Module)((function(t){t({token:gi,useFactory:function(t){return function(t){return t===O.Shape.CIRCLE?Hi:t===O.Shape.ELLIPSE?Wi:t===O.Shape.RECT?Ji:t===O.Shape.LINE?zi:t===O.Shape.POLYLINE?Qi:t===O.Shape.POLYGON?Ki:t===O.Shape.PATH?Zi:t===O.Shape.IMAGE||t===O.Shape.TEXT?function(){return!0}:null}}}),t(Mi)})),no=function(){function t(){}return t.prototype.init=function(t){t.load(to,!0)},t.prototype.destroy=function(t){t.unload(to)},t}(),eo=function(){function t(){}return t.prototype.apply=function(t){var n=this,e=function(t){var e=t.target;if(e.nodeName===O.Shape.HTML){var r=e.parsedStyle.innerHTML,i="g-html-"+e.entity,o=n.contextService.getDomElement().parentNode;if(o)if(!o.querySelector("#"+i)){var a=document.createElement("div");e.parsedStyle.$el=a,a.id=i,Object(O.isString)(r)?a.innerHTML=r:a.appendChild(r),o.appendChild(a)}}},r=function(t){var e=t.target;if(e.nodeName===O.Shape.HTML){var r="g-html-"+e.entity,i=n.contextService.getDomElement().parentNode;if(i){var o=i.querySelector("#"+r);o&&i.removeChild(o)}}};t.hooks.init.tapPromise((function(){return m(n,void 0,void 0,(function(){return g(this,(function(t){return this.renderingContext.root.addEventListener(O.ElementEvent.MOUNTED,e),this.renderingContext.root.addEventListener(O.ElementEvent.UNMOUNTED,r),[2]}))}))})),t.hooks.destroy.tap((function(){n.renderingContext.root.removeEventListener(O.ElementEvent.MOUNTED,e),n.renderingContext.root.removeEventListener(O.ElementEvent.UNMOUNTED,r)})),t.hooks.render.tap((function(t){if(t.nodeName===O.Shape.HTML){var e="g-html-"+t.entity,r=n.contextService.getDomElement().parentNode;if(r){var i=r.querySelector("#"+e);n.updateCSSStyle(i,t.parsedStyle,t)}}}))},t.prototype.updateCSSStyle=function(t,n,e){var r,i,o=n.zIndex,a=n.visibility,u=n.opacity,c=n.fill,s=n.lineWidth,f=n.lineDash,h=n.stroke,l=n.width,d=n.height,p=n.style,v=void 0===p?"":p,y=n.className,m=void 0===y?"":y;r=l.value,i=d.value;var g={position:"absolute",top:0,left:0};if(g.width="".concat(r,"px"),g.height="".concat(i,"px"),g.transform="matrix3d(".concat(e.getWorldTransform().join(","),")"),e.style.transformOrigin&&(g["transform-origin"]=e.style.transformOrigin),g["z-index"]=o.value,g.visibility=a.value,g.opacity=u.value,c){var M="";if(c instanceof O.CSSRGB)M=c.toString();else if(c instanceof O.CSSGradientValue&&c.type===O.GradientPatternType.LinearGradient){var b=c.value.steps.map((function(t){return"".concat(t[1]," ").concat(100*Number(t[0]),"%")})).join(",");M="linear-gradient(to right, ".concat(b,");")}g.background=M}g["border-width"]="".concat((null==s?void 0:s.value)||0,"px"),h&&(g["border-color"]=h.toString(),g["border-style"]="solid"),f&&(g["border-style"]="dashed"),e.style.filter&&(g.filter=e.style.filter),m&&(Array.isArray(m)?m.forEach((function(n){t.classList.add(n)})):t.classList.add(m)),t.setAttribute("style",Object.keys(g).map((function(t){return"".concat(t,":").concat(g[t])})).join(";")+v)},v([Object(S.inject)(O.ContextService),y("design:type",Object)],t.prototype,"contextService",void 0),v([Object(S.inject)(O.RenderingContext),y("design:type",Object)],t.prototype,"renderingContext",void 0),t=v([Object(S.singleton)({contrib:O.RenderingPluginContribution})],t)}(),ro=Object(S.Module)((function(t){t(eo)})),io=function(){function t(){}return t.prototype.init=function(t){t.load(ro,!0)},t.prototype.destroy=function(t){t.unload(ro)},t}();var oo=function(){function t(){}return t.prototype.init=function(){var t=this.canvasConfig,n=t.container,e=t.canvas,r=t.devicePixelRatio;if(e)this.$canvas=e,n&&e.parentElement!==n&&n.appendChild(e),this.$container=e.parentElement,this.canvasConfig.container=this.$container;else if(n&&(this.$container=Object(O.isString)(n)?document.getElementById(n):n,this.$container)){var i=document.createElement("canvas");this.$container.appendChild(i),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=i}this.context=this.$canvas.getContext("2d");var o=r||O.isBrowser&&window.devicePixelRatio||1;o=o>=1?Math.ceil(o):1,this.dpr=o,this.resize(this.canvasConfig.width,this.canvasConfig.height)},t.prototype.getContext=function(){return this.context},t.prototype.getDomElement=function(){return this.$canvas},t.prototype.getDPR=function(){return this.dpr},t.prototype.getBoundingClientRect=function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()},t.prototype.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},t.prototype.resize=function(t,n){if(this.$canvas){this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*n,function(t,n,e){O.isBrowser&&t.style&&(t.style.width=n+"px",t.style.height=e+"px")}(this.$canvas,t,n);var e=this.getDPR();this.context.scale(e,e)}},t.prototype.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},v([Object(S.inject)(O.CanvasConfig),y("design:type",Object)],t.prototype,"canvasConfig",void 0),t=v([Object(S.singleton)({token:O.ContextService})],t)}(),ao=Object(S.Module)((function(t){t(oo)})),uo=function(){function t(){}return t.prototype.init=function(t){t.load(ao,!0)},t.prototype.destroy=function(t){t.unload(ao)},t}(),co=function(t){function n(n){var e=t.call(this,n)||this;return e.registerPlugin(new uo),e.registerPlugin(new mi),e.registerPlugin(new j),e.registerPlugin(new no),e.registerPlugin(new io),e}return d(n,t),n}(O.AbstractRenderer)}])}));
@@ -1,7 +1,6 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
- import { CanvasConfig, ContextService, isBrowser } from '@antv/g';
2
+ import { CanvasConfig, ContextService, isBrowser, isString } from '@antv/g';
3
3
  import { inject, singleton } from 'mana-syringe';
4
- import { isString } from 'lodash-es';
5
4
  import { setDOMSize } from './utils/dom';
6
5
 
7
6
  var Canvas2DContextService =
@@ -11,8 +11,6 @@ var _g = require("@antv/g");
11
11
 
12
12
  var _manaSyringe = require("mana-syringe");
13
13
 
14
- var _lodashEs = require("lodash-es");
15
-
16
14
  var _dom = require("./utils/dom");
17
15
 
18
16
  var Canvas2DContextService =
@@ -37,7 +35,7 @@ function () {
37
35
  this.canvasConfig.container = this.$container;
38
36
  } else if (container) {
39
37
  // create container
40
- this.$container = (0, _lodashEs.isString)(container) ? document.getElementById(container) : container;
38
+ this.$container = (0, _g.isString)(container) ? document.getElementById(container) : container;
41
39
 
42
40
  if (this.$container) {
43
41
  // create canvas
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/g-canvas",
3
- "version": "1.0.21",
3
+ "version": "1.0.22-alpha.4",
4
4
  "description": "A renderer implemented by Canvas 2D API",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -37,11 +37,10 @@
37
37
  },
38
38
  "homepage": "https://github.com/antvis/g#readme",
39
39
  "dependencies": {
40
- "@antv/g-plugin-canvas-picker": "^1.0.19",
41
- "@antv/g-plugin-canvas-renderer": "^1.0.19",
42
- "@antv/g-plugin-dom-interaction": "^1.0.19",
43
- "@antv/g-plugin-html-renderer": "^1.0.20",
44
- "lodash-es": "^4.17.21",
40
+ "@antv/g-plugin-canvas-picker": "^1.0.20-alpha.4",
41
+ "@antv/g-plugin-canvas-renderer": "^1.0.20-alpha.4",
42
+ "@antv/g-plugin-dom-interaction": "^1.0.20-alpha.4",
43
+ "@antv/g-plugin-html-renderer": "^1.0.21-alpha.4",
45
44
  "tslib": "^2.3.1"
46
45
  },
47
46
  "peerDependencies": {
@@ -51,5 +50,5 @@
51
50
  "scripts": {
52
51
  "umd": "webpack"
53
52
  },
54
- "gitHead": "a52a7c8d754925e5732baf3faea156332748365f"
53
+ "gitHead": "07a45d1dcaeda55f64acd5486b1c19d132fac8bc"
55
54
  }