{"id":"../node_modules/@wufe/particles/dist/cjs/index.js","dependencies":[{"name":"/Users/simonebembi/Projects/particles-liquid-system/package.json","includedInParent":true,"mtime":1586786861555},{"name":"/Users/simonebembi/Projects/particles-liquid-system/node_modules/@wufe/particles/package.json","includedInParent":true,"mtime":1587641676629},{"name":"gl-matrix","loc":{"line":1,"column":999},"parent":"/Users/simonebembi/Projects/particles-liquid-system/node_modules/@wufe/particles/dist/cjs/index.js","resolved":"/Users/simonebembi/Projects/particles-liquid-system/node_modules/@wufe/particles/node_modules/gl-matrix/esm/index.js"}],"generated":{"js":"!function(t,e){for(var n in e)t[n]=e[n]}(exports,function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,\"a\",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p=\"\",n(n.s=1)}([function(t,e){t.exports=require(\"gl-matrix\")},function(t,e,n){\"use strict\";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.r(e),n.d(e,\"getDefaultParams\",(function(){return Me})),n.d(e,\"Main\",(function(){return ze})),n.d(e,\"Feature\",(function(){return Ce})),n.d(e,\"init\",(function(){return je})),n.d(e,\"ParticleEventType\",(function(){return nt})),n.d(e,\"BaseListenableParticle\",(function(){return ft})),n.d(e,\"ParticleDirection\",(function(){return Gt})),n.d(e,\"Particle\",(function(){return oe})),n.d(e,\"RendererHook\",(function(){return jt})),n.d(e,\"ZeroVector3D\",(function(){return P})),n.d(e,\"Vector3D\",(function(){return N})),n.d(e,\"ZeroVector4D\",(function(){return G})),n.d(e,\"Vector4D\",(function(){return Q})),n.d(e,\"VectorNorm\",(function(){return b})),n.d(e,\"Renderer2D\",(function(){return l})),n.d(e,\"WebGLProgram\",(function(){return Lt})),n.d(e,\"getColor\",(function(){return Qt})),n.d(e,\"RendererWebGL\",(function(){return Ht})),n.d(e,\"BaseParticleSystem\",(function(){return le})),n.d(e,\"DefaultParticleSystem\",(function(){return ve})),n.d(e,\"SystemTimer\",(function(){return ue})),n.d(e,\"TransitionEasingFunction\",(function(){return lt})),n.d(e,\"TransitionSpecificationBuilder\",(function(){return pt})),n.d(e,\"getDefault\",(function(){return _})),n.d(e,\"LazyFactory\",(function(){return p})),n.d(e,\"stringFormat\",(function(){return m})),n.d(e,\"valueFromRandomOptions\",(function(){return mt})),n.d(e,\"randomValueFromBoundary\",(function(){return dt}));var i,o,a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._hooks=[]}var e,n,o;return e=t,(n=[{key:\"addBefore\",value:function(t,e,n){this._hooks.push({time:i.BEFORE,type:t,callback:e})}},{key:\"addAfter\",value:function(t,e,n){this._hooks.push({time:i.AFTER,type:t,callback:e})}},{key:\"exec\",value:function(t,e){this._hooks.forEach((function(n){return n.type===t&&n.callback(e)}))}},{key:\"getAll\",value:function(t){return this._hooks.filter((function(e){return e.type===t}))}}])&&r(e.prototype,n),o&&r(e,o),t}();function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}!function(t){t[t.BEFORE=0]=\"BEFORE\",t[t.AFTER=1]=\"AFTER\"}(i||(i={})),function(t){t[t.RENDERER_INIT=0]=\"RENDERER_INIT\",t[t.CONTEXT_INIT=1]=\"CONTEXT_INIT\",t[t.CANVAS_INIT=2]=\"CANVAS_INIT\",t[t.PRE_START=3]=\"PRE_START\",t[t.DRAW=4]=\"DRAW\",t[t.UPDATE=5]=\"UPDATE\",t[t.CANVAS_CLEAR=6]=\"CANVAS_CLEAR\",t[t.SYSTEM_UPDATED=7]=\"SYSTEM_UPDATED\",t[t.WINDOW_RESIZE=8]=\"WINDOW_RESIZE\"}(o||(o={}));var u=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t)}var e,n,r;return e=t,(n=[{key:\"canvas\",get:function(){return this._canvas}},{key:\"context\",get:function(){return this._context},set:function(t){this._context=t}}])&&c(e.prototype,n),r&&c(e,r),t}();function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var l=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._pluginAdapter=e}var e,n,r;return e=t,(n=[{key:\"register\",value:function(){this._pluginAdapter.addAfter(o.CONTEXT_INIT,this._initContext),this._pluginAdapter.addAfter(o.DRAW,this._draw)}},{key:\"_initContext\",value:function(t){t.context=t.canvas.getContext(\"2d\")}},{key:\"_draw\",value:function(t){t.forEach((function(t){t.getParticles()}))}}])&&s(e.prototype,n),r&&s(e,r),t}();function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t){return(h=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}var y,_=function t(e,n){if(void 0===e)return n instanceof p?n.build():n;if(!(\"object\"!==h(n)||Array.isArray(n)||n instanceof p)){var r={};for(var i in n)r[i]=t(e[i],n[i]);return r}return e},p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._callback=e}var e,n,r;return e=t,(n=[{key:\"build\",value:function(){return this._callback()}}])&&f(e.prototype,n),r&&f(e,r),t}(),m=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(arguments.length){var i,o=h(arguments[1]),a=\"string\"===o||\"number\"===o?Array.prototype.slice.call(arguments):arguments[1];for(i in a)t=t.replace(new RegExp(\"\\\\{\"+i+\"\\\\}\",\"gi\"),a[i])}return t};function d(t){return function(t){if(Array.isArray(t))return v(t)}(t)||function(t){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if(\"string\"==typeof t)return v(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);\"Object\"===n&&t.constructor&&(n=t.constructor.name);if(\"Map\"===n||\"Set\"===n)return Array.from(n);if(\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(t,e)}(t)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function g(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}!function(t){t.SYSTEM_UPDATED=\"systemUpdated\"}(y||(y={}));var b=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._vec=e}var e,n,r;return e=t,(n=[{key:\"euclidean\",get:function(){return Math.hypot.apply(Math,d(this._vec.components))}}])&&g(e.prototype,n),r&&g(e,r),t}();function T(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(\"undefined\"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(t,e)||function(t,e){if(!t)return;if(\"string\"==typeof t)return S(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);\"Object\"===n&&t.constructor&&(n=t.constructor.name);if(\"Map\"===n||\"Set\"===n)return Array.from(n);if(\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(t,e)}(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function E(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach((function(e){O(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function O(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function I(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var P={x:0,y:0,z:0},N=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A({},P),n=e.x,r=e.y,i=e.z;w(this,t),this.x=n,this.y=r,this.z=i,this.norm=new b(this)}var e,n,r;return e=t,r=[{key:\"fromArray\",value:function(e){var n=T(e,3);return new t({x:n[0],y:n[1],z:n[2]})}}],(n=[{key:\"clone\",value:function(){return new t({x:this.x,y:this.y,z:this.z})}},{key:\"add\",value:function(t){return\"number\"==typeof t?(this.x+=t,this.y+=t,this.z+=t):(this.x+=t.x,this.y+=t.y,this.z+=t.z),this}},{key:\"sub\",value:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}},{key:\"div\",value:function(t){return this.x/=t,this.y/=t,this.z/=t,R(this),this}},{key:\"mul\",value:function(t){return this.x*=t,this.y*=t,this.z*=t,R(this),this}},{key:\"dot\",value:function(t){return this.x*t.x+this.y*t.y+this.z*t.z}},{key:\"angle\",value:function(t){return Math.acos(this.dot(t)/(this.length*t.length))}},{key:\"unit\",value:function(){return this.length>1e-4?this.div(this.length):A({},P)}},{key:\"cross\",value:function(t){var e=this.clone(),n=e.x,r=e.y,i=e.z;return this.x=r*t.z-i*t.y,this.y=i*t.x-n*t.z,this.z=n*t.y-r*t.x,this}},{key:\"components\",get:function(){return[this.x,this.y,this.z]}},{key:\"length\",get:function(){return this.norm.euclidean}}])&&I(e.prototype,n),r&&I(e,r),t}();function R(t){isNaN(t.x)||isNaN(t.y)||isNaN(t.z)}var k=function(t){return void 0!==t.w};function x(t){return(x=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function D(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(\"undefined\"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(t,e)||function(t,e){if(!t)return;if(\"string\"==typeof t)return C(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);\"Object\"===n&&t.constructor&&(n=t.constructor.name);if(\"Map\"===n||\"Set\"===n)return Array.from(n);if(\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(t,e)}(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function C(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function M(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function z(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?M(Object(n),!0).forEach((function(e){j(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function j(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function L(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function F(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function U(t,e,n){return(U=\"undefined\"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=W(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function V(t,e){return(V=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function B(t,e){return!e||\"object\"!==x(e)&&\"function\"!=typeof e?function(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}(t):e}function Y(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function W(t){return(W=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var G={x:0,y:0,z:0,w:0},Q=function(t){!function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&V(t,e)}(a,t);var e,n,r,i,o=(e=a,function(){var t,n=W(e);if(Y()){var r=W(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return B(this,t)});function a(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z({},G);return L(this,a),(t=o.call(this,e)).w=e.w,t}return n=a,i=[{key:\"fromArray\",value:function(t){var e=D(t,4);return new a({x:e[0],y:e[1],z:e[2],w:e[3]})}}],(r=[{key:\"clone\",value:function(){return new a({x:this.x,y:this.y,z:this.z,w:this.w})}},{key:\"add\",value:function(t){return\"number\"==typeof t?(U(W(a.prototype),\"add\",this).call(this,t),this.w+=t):(U(W(a.prototype),\"add\",this).call(this,t),k(t)&&(this.w+=t.w)),this}},{key:\"sub\",value:function(t){return U(W(a.prototype),\"sub\",this).call(this,t),k(t)&&(this.w-=t.w),this}},{key:\"div\",value:function(t){return U(W(a.prototype),\"div\",this).call(this,t),this.w/=t,H(this),this}},{key:\"mul\",value:function(t){return U(W(a.prototype),\"mul\",this).call(this,t),this.w*=t,H(this),this}},{key:\"unit\",value:function(){return this.div(this.length)}},{key:\"cross\",value:function(t){return U(W(a.prototype),\"cross\",this).call(this,t)}},{key:\"components\",get:function(){return U(W(a.prototype),\"components\",this).concat([this.w])}},{key:\"length\",get:function(){return this.norm.euclidean}}])&&F(n.prototype,r),i&&F(n,i),a}(N);function H(t){isNaN(t.x)||isNaN(t.y)||isNaN(t.z)||isNaN(t.w)}function X(t){return(X=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function Z(t,e){return(Z=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function q(t,e){return!e||\"object\"!==X(e)&&\"function\"!=typeof e?function(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}(t):e}function $(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function K(t){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function J(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function tt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function et(t,e,n){return e&&tt(t.prototype,e),n&&tt(t,n),t}var nt,rt=function(t){!function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Z(t,e)}(r,t);var e,n=(e=r,function(){var t,n=K(e);if($()){var r=K(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return q(this,t)});function r(){return J(this,r),n.apply(this,arguments)}return et(r,[{key:\"call\",value:function(t,e){this._attachedEventListeners.filter((function(e){return e.type===t})).forEach((function(t){return t.callback(e)}))}}]),r}(function(){function t(){J(this,t),this._attachedEventListeners=[]}return et(t,[{key:\"on\",value:function(t,e){this._attachedEventListeners.push({type:t,callback:e})}},{key:\"off\",value:function(t,e){var n=-1;(n=void 0!==e?this._attachedEventListeners.findIndex((function(n){return n.type===t&&n.callback===e})):this._attachedEventListeners.findIndex((function(e){return e.type===t})))>-1&&(this._attachedEventListeners=this._attachedEventListeners.slice(0,n).concat(this._attachedEventListeners.slice(n+1)))}}]),t}());function it(t){return(it=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function ot(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function at(t,e){return(at=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ct(t,e){return!e||\"object\"!==it(e)&&\"function\"!=typeof e?function(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}(t):e}function ut(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function st(t){return(st=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}!function(t){t.POSITION_UPDATE=\"positionUpdate\",t.COLOR_UPDATE=\"colorUpdate\",t.UPDATE=\"update\"}(nt||(nt={}));var lt,ft=function(t){!function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&at(t,e)}(r,t);var e,n=(e=r,function(){var t,n=st(e);if(ut()){var r=st(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return ct(this,t)});function r(){return ot(this,r),n.apply(this,arguments)}return r}(rt);function ht(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}!function(t){t[t.LINEAR=1]=\"LINEAR\",t[t.QUADRATIC_IN=2]=\"QUADRATIC_IN\",t[t.QUADRATIC_OUT=3]=\"QUADRATIC_OUT\",t[t.QUADRATIC_IN_OUT=4]=\"QUADRATIC_IN_OUT\"}(lt||(lt={}));var yt,_t,pt=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._particle=e,this.specification={enabled:!1,start:new N,end:new N,startTime:0,endTime:0,easing:lt.LINEAR,committed:!1},this._timeout=null,this._transitionCallback=null,this.tryInvokeCallback=function(){n._transitionCallback&&n._transitionCallback(),n._transitionCallback=null}}var e,n,r;return e=t,(n=[{key:\"enable\",value:function(t){return this.specification.startTime=t,this.specification.enabled=!0,this}},{key:\"within\",value:function(t){return this.specification.startTime=this.specification.startTime+t,this}},{key:\"from\",value:function(t){return this.specification.start=t,this}},{key:\"to\",value:function(t){return this.specification.end=t,this}},{key:\"in\",value:function(t){return this.specification.endTime=this.specification.startTime+t,this}},{key:\"easing\",value:function(t){return this.specification.easing=t,this}},{key:\"then\",value:function(t){return this._transitionCallback=t,this}},{key:\"commit\",value:function(){return this.specification.committed=!0,this._particle.notifyUpdated(),this}}])&&ht(e.prototype,n),r&&ht(e,r),t}(),mt=function(t){return t.randomize?dt(t.boundary):t.value},dt=function(t){var e=t.min,n=t.max-e;return Math.random()*n+e};function vt(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function gt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}!function(t){t.RESOLUTION=\"v_res\",t.WORLD=\"m_world\",t.VIEW=\"m_view\",t.PROJECTION=\"m_projection\",t.T=\"f_t\",t.ZOOM=\"f_zoom\"}(yt||(yt={})),function(t){t.CAMERA=\"camera\",t.RESOLUTION=\"resolution\"}(_t||(_t={}));var bt,Tt,St=function(){function t(e,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=arguments.length>5?arguments[5]:void 0,c=arguments.length>6?arguments[6]:void 0;vt(this,t),this._gl=e,this._vertexShaderText=n,this._fragmentShaderText=r,this._attributes=i,this._uniforms=o,this._viewBox=a,this._libraryInterface=c,this._uniformsToUpdate={camera:!0,resolution:!0},this.getAttributeLocation=this.attr,this.getUniformLocation=this.uni,this.checkShaderCompilation=function(t,e){if(!e.getShaderParameter(t,e.COMPILE_STATUS))throw new Error(\"Error compiling shader: \".concat(e.getShaderInfoLog(t)))},this.checkProgramLink=function(t,e){if(!e.getProgramParameter(t,e.LINK_STATUS))throw new Error(\"Error linking program: \".concat(e.getProgramInfoLog(t)))},this.checkProgramValidation=function(t,e){if(!e.getProgramParameter(t,e.VALIDATE_STATUS))throw new Error(\"Error linking program: \".concat(e.getProgramInfoLog(t)))},this.compileShaders(),this.createProgram(),this.findLocations()}var e,n,r;return e=t,(n=[{key:\"uniformChanged\",value:function(t){this._uniformsToUpdate[t]=!0}},{key:\"update\",value:function(t,e){}},{key:\"draw\",value:function(t,e){this._gl.useProgram(this.program),this._gl.uniform1f(this.uni(yt.T),e),this._uniformsToUpdate[_t.RESOLUTION]&&(this._gl.uniform3fv(this.uni(yt.RESOLUTION),new Float32Array(this.getResolutionVector())),this._uniformsToUpdate[_t.RESOLUTION]=!1),this._gl.uniformMatrix4fv(this.uni(yt.WORLD),!1,this._viewBox.wMat),this._gl.uniformMatrix4fv(this.uni(yt.VIEW),!1,this._viewBox.vMat),this._gl.uniformMatrix4fv(this.uni(yt.PROJECTION),!1,this._viewBox.pMat)}},{key:\"getResolutionVector\",value:function(){return this._viewBox.getResolutionVector()}},{key:\"compileShaders\",value:function(){this._vertexShader=this._gl.createShader(this._gl.VERTEX_SHADER),this._gl.shaderSource(this._vertexShader,this._vertexShaderText),this._gl.compileShader(this._vertexShader),this.checkShaderCompilation(this._vertexShader,this._gl),this._fragmentShader=this._gl.createShader(this._gl.FRAGMENT_SHADER),this._gl.shaderSource(this._fragmentShader,this._fragmentShaderText),this._gl.compileShader(this._fragmentShader),this.checkShaderCompilation(this._fragmentShader,this._gl)}},{key:\"createProgram\",value:function(){this._program=this._gl.createProgram(),this._gl.attachShader(this._program,this._vertexShader),this._gl.attachShader(this._program,this._fragmentShader),this._gl.linkProgram(this._program),this.checkProgramLink(this._program,this._gl),this._gl.validateProgram(this._program),this.checkProgramValidation(this._program,this._gl)}},{key:\"findLocations\",value:function(){var t=this;this._uniforms=this._uniforms.concat(Object.values(yt)),this._attributesLocations=this._attributes.reduce((function(e,n){var r=t._gl.getAttribLocation(t._program,n);return-1===r&&console.warn(\"Cannot find attribute \".concat(n,\".\")),e[n]=r,e}),{}),this._uniformsLocations=this._uniforms.reduce((function(e,n){var r=t._gl.getUniformLocation(t._program,n);return-1===r&&console.warn(\"Cannot find uniform \".concat(n)),e[n]=r,e}),{})}},{key:\"attr\",value:function(t){return this._attributesLocations[t]}},{key:\"uni\",value:function(t){return this._uniformsLocations[t]}},{key:\"program\",get:function(){return this._program}}])&&gt(e.prototype,n),r&&gt(e,r),t}();function Et(t){return(Et=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function At(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(\"undefined\"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(t,e)||function(t,e){if(!t)return;if(\"string\"==typeof t)return Ot(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);\"Object\"===n&&t.constructor&&(n=t.constructor.name);if(\"Map\"===n||\"Set\"===n)return Array.from(n);if(\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ot(t,e)}(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function Ot(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function wt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function It(t,e,n){return(It=\"undefined\"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=kt(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function Pt(t,e){return(Pt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Nt(t,e){return!e||\"object\"!==Et(e)&&\"function\"!=typeof e?function(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}(t):e}function Rt(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function kt(t){return(kt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}!function(t){t.POSITION=\"v_pos\",t.COLOR=\"v_col\",t.SIZE=\"f_size\",t.POSITION_TRANSITION_ENABLED=\"t_position_enabled\",t.POSITION_TRANSITION_START=\"t_position_start\",t.POSITION_TRANSITION_END=\"t_position_end\",t.POSITION_TRANSITION_START_TIME=\"t_position_start_time\",t.POSITION_TRANSITION_END_TIME=\"t_position_end_time\",t.POSITION_TRANSITION_EASING_FUNCTION=\"t_position_easing_function\"}(bt||(bt={})),function(t){t.EYE=\"v_eye\",t.DEPTH_OF_FIELD=\"f_dof\"}(Tt||(Tt={}));var xt=function(t){!function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Pt(t,e)}(a,t);var e,n,r,i,o=(e=a,function(){var t,n=kt(e);if(Rt()){var r=kt(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return Nt(this,t)});function a(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,a),(r=o.call(this,t,\"precision highp float;\\n#define GLSLIFY 1\\n\\n#define BOUNDARY_MARGIN_PERCENTAGE 10.0\\n\\n#define EASING_FN_LINEAR 1.0\\n#define EASING_FN_QUADRATIC_IN 2.0\\n#define EASING_FN_QUADRATIC_OUT 3.0\\n#define EASING_FN_QUADRATIC_IN_OUT 4.0\\n\\nvec3 vec3Linear(float currentTime, vec3 startValue, vec3 changeValue, float duration) {\\n    return changeValue * currentTime / duration + startValue;\\n}\\n\\nvec3 vec3QuadraticIn(float currentTime, vec3 startValue, vec3 changeValue, float duration) {\\n    float time = currentTime / duration;\\n    return changeValue * time * time + startValue;\\n}\\n\\nvec3 vec3QuadraticOut(float currentTime, vec3 startValue, vec3 changeValue, float duration) {\\n    float time = currentTime / duration;\\n    return (changeValue * -1.0) * time * (time -2.0) + startValue;\\n}\\n\\nvec3 vec3QuadraticInOut(float currentTime, vec3 startValue, vec3 changeValue, float duration) {\\n    float time = currentTime / (duration / 2.0);\\n    if (time < 1.0) {\\n        return changeValue / 2.0 * time * time + startValue;\\n    }\\n    time = time - 1.0;\\n    return ((changeValue * -1.0) / 2.0) * (time * (time - 2.0) - 1.0) + startValue;\\n}\\n\\nvec3 vec3Easing(float easingFn, float currentTime, vec3 startValue, vec3 changeValue, float duration) {\\n    vec3 pos;\\n    if (easingFn == EASING_FN_LINEAR) {\\n        pos = vec3Linear(currentTime, startValue, changeValue, duration);\\n    } else if (easingFn == EASING_FN_QUADRATIC_IN) {\\n        pos = vec3QuadraticIn(currentTime, startValue, changeValue, duration);\\n    } else if (easingFn == EASING_FN_QUADRATIC_OUT) {\\n        pos = vec3QuadraticOut(currentTime, startValue, changeValue, duration);\\n    } else if (easingFn == EASING_FN_QUADRATIC_IN_OUT) {\\n        pos = vec3QuadraticInOut(currentTime, startValue, changeValue, duration);\\n    }\\n    return pos;\\n}\\n\\nvec3 getParticlePosition(\\n    vec3 v_pos,\\n    float t_enabled,\\n    vec3 t_start,\\n    vec3 t_end,\\n    float t_startTime,\\n    float t_endTime,\\n    float t_easingFunction,\\n    float f_t\\n) {\\n    vec3 pos;\\n    if (t_enabled == 1.0 && f_t >= t_startTime && f_t <= t_endTime) {\\n\\n        float duration = t_endTime - t_startTime;\\n        float currentTime = f_t - t_startTime;\\n        vec3 startValue = t_start;\\n        vec3 changeValue = t_end - t_start;\\n\\n        pos = vec3Easing(t_easingFunction, currentTime, startValue, changeValue, duration);\\n    } else {\\n        pos = v_pos;\\n    }\\n    return pos;\\n}\\n\\nfloat calculateDistanceFromLowerMargin(float f_coord, float f_boundary, float f_margin, float f_maxDistanceFromMargin) {\\n    if (f_coord < f_margin)\\n        f_maxDistanceFromMargin = max(f_maxDistanceFromMargin, (f_margin - f_coord) / f_boundary * 100.0);\\n    return f_maxDistanceFromMargin;\\n}\\n\\nfloat calculateDistanceFromUpperMargin(float f_coord, float f_boundary, float f_margin, float f_maxDistanceFromMargin) {\\n    if (f_coord > f_boundary - f_margin)\\n        f_maxDistanceFromMargin = max(f_maxDistanceFromMargin, (f_coord - (f_boundary - f_margin)) / f_boundary * 100.0);\\n    return f_maxDistanceFromMargin;\\n}\\n\\n// Accepts denormalized v_pos\\nfloat alphaByPosition(vec3 v_pos, vec3 v_res, float f_boundaryMarginPercentage) {\\n\\n    float f_width = v_res.x;\\n    float f_height = v_res.y;\\n    float f_depth = v_res.z;\\n\\n    float f_x = min(v_pos.x, f_width);\\n    float f_y = min(v_pos.y, f_height);\\n    float f_z = min(v_pos.z, f_depth);\\n\\n    float f_maxDistanceFromMargin = 0.0;\\n    float f_widthMargin = f_width / 100.0 * f_boundaryMarginPercentage;\\n    float f_heightMargin = f_height / 100.0 * f_boundaryMarginPercentage;\\n    float f_depthMargin = f_depth / 100.0 * f_boundaryMarginPercentage;\\n\\n    f_maxDistanceFromMargin = calculateDistanceFromLowerMargin(f_x, f_width, f_widthMargin, f_maxDistanceFromMargin);\\n    f_maxDistanceFromMargin = calculateDistanceFromUpperMargin(f_x, f_width, f_widthMargin, f_maxDistanceFromMargin);\\n    f_maxDistanceFromMargin = calculateDistanceFromLowerMargin(f_y, f_height, f_heightMargin, f_maxDistanceFromMargin);\\n    f_maxDistanceFromMargin = calculateDistanceFromUpperMargin(f_y, f_height, f_heightMargin, f_maxDistanceFromMargin);\\n    f_maxDistanceFromMargin = calculateDistanceFromLowerMargin(f_z, f_depth, f_depthMargin, f_maxDistanceFromMargin);\\n    f_maxDistanceFromMargin = calculateDistanceFromUpperMargin(f_z, f_depth, f_depthMargin, f_maxDistanceFromMargin);\\n\\n    float f_alpha = 1.0;\\n\\n    if (f_maxDistanceFromMargin > 0.0) {\\n        f_alpha = 1.0 - floor((f_maxDistanceFromMargin / f_boundaryMarginPercentage) * 100.0) / 100.0;\\n    }\\n\\n    return f_alpha;\\n}\\n\\nvec3 vecToAbs(vec3 vec, vec3 v_res) {\\n    vec = ((vec / v_res) * 2.0) - 1.0;\\n    vec = vec3(\\n        clamp(vec.x, -1.0, 1.0),\\n        clamp(vec.y, -1.0, 1.0),\\n        clamp(vec.z, -1.0, 1.0)\\n    );\\n    return vec;\\n}\\n\\nvec4 getParticleColor(vec4 v_col, vec3 v_pos, vec3 v_res, float f_boundaryMarginPercentage) {\\n    vec4 col = vec4(v_col.xyz, v_col.w * alphaByPosition(v_pos, v_res, f_boundaryMarginPercentage));\\n    return col;\\n}\\n\\nfloat getParticleBlur(vec3 v_pos, vec3 v_res, vec3 v_eye) {\\n    vec3 v_normalizedPos = vecToAbs(v_pos, v_res);\\n    vec3 v_normalizedEye = v_eye;\\n\\n    float distance = distance(v_normalizedPos, v_normalizedEye);\\n    float depth = distance / 1.97;\\n    return depth * .8;\\n}\\n\\nattribute vec3 v_pos;\\nattribute vec4 v_col;\\nattribute float f_size;\\n\\nattribute float t_position_enabled;\\nattribute vec3 t_position_start;\\nattribute vec3 t_position_end;\\nattribute float t_position_start_time;\\nattribute float t_position_end_time;\\nattribute float t_position_easing_function;\\n\\nuniform vec3 v_res;\\nuniform mat4 m_world;\\nuniform mat4 m_view;\\nuniform mat4 m_projection;\\nuniform float f_t;\\nuniform float f_zoom;\\nuniform vec3 v_eye;\\nuniform float f_dof;\\n\\nvarying vec4 frag_col;\\nvarying float f_blur;\\nvarying float f_dist;\\n\\nvoid main() {\\n\\n    vec3 pos = getParticlePosition(\\n        v_pos,\\n        t_position_enabled,\\n        t_position_start,\\n        t_position_end,\\n        t_position_start_time,\\n        t_position_end_time,\\n        t_position_easing_function,\\n        f_t\\n    );\\n    \\n    frag_col = getParticleColor(v_col, pos, v_res, BOUNDARY_MARGIN_PERCENTAGE);\\n    float size = f_size > 0.0 ? f_size: 2.0;\\n\\n    if (f_dof == 1.0) {\\n        f_blur = getParticleBlur(v_pos, v_res, v_eye);\\n        size = size * (f_blur / 2.0 + 1.0);\\n    }\\n\\n    float minPointScale = 1.1;\\n    float maxPointScale = 2.0;\\n    float maxZoom = 14.0;\\n\\n    float pointScale = (1.0 - ((f_zoom - 1.0) / (maxZoom - 1.0))) + 1.0;\\n    pointScale = max(pointScale, minPointScale);\\n    pointScale = min(pointScale, maxPointScale);\\n    pointScale = pointScale / 2.0;\\n    gl_PointSize = pow(pointScale, 4.0) * size;\\n\\n    \\n    pos = vecToAbs(pos, v_res);\\n    gl_Position = m_projection * m_world * m_view * vec4(pos, 1.0);\\n}\",\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform float f_dof;\\n\\nvarying vec4 frag_col;\\nvarying float f_blur;\\n\\nvoid main() {\\n    float r = 0.0, delta = 0.0, alpha = frag_col.w;\\n    vec2 cxy = 2.0 * gl_PointCoord - 1.0;\\n    r = dot(cxy, cxy);\\n    vec3 v_color = frag_col.xyz;\\n    float max = 1.0;\\n    if (f_dof == 1.0) {\\n        max = max * f_blur;\\n        if (f_blur > 0.2) {\\n            // v_color = v_color * (1.0 - (f_blur));\\n        }\\n    }\\n    \\n    if (r < max) {\\n        if (f_dof == 1.0) {\\n            float blur = 1.0 - f_blur;\\n            alpha = alpha * (1.0 - r * f_blur);\\n        }\\n    } else {\\n        discard;\\n    }\\n    gl_FragColor = vec4(v_color * alpha, alpha);\\n}\",Object.values(bt),Object.values(Tt),e,n))._strideLength=18,r._updateEventAttachedParticles=[],r._attachParticleUpdateEventHandler=function(t,e){e.on(nt.UPDATE,r._onParticleUpdate(t)),r._updateEventAttachedParticles.push(e)},r._onParticleUpdate=function(t){return function(e){var n=t*r._strideLength,i=At(e.coords.components,3),o=i[0],a=i[1],c=i[2],u=At(e.color.components,4),s=u[0],l=u[1],f=u[2],h=u[3],y=e.getTransitionSpecification();if(y.enabled&&!y.committed)throw new Error(\"Particle transition have not been commited.\");r._vertices[n]=o,r._vertices[n+1]=a,r._vertices[n+2]=c,r._vertices[n+3]=s,r._vertices[n+4]=l,r._vertices[n+5]=f,r._vertices[n+6]=h,r._vertices[n+7]=e.size,r._vertices[n+8]=+y.enabled,r._vertices[n+9]=y.start.x,r._vertices[n+10]=y.start.y,r._vertices[n+11]=y.start.z,r._vertices[n+12]=y.end.x,r._vertices[n+13]=y.end.y,r._vertices[n+14]=y.end.z,r._vertices[n+15]=y.startTime,r._vertices[n+16]=y.endTime,r._vertices[n+17]=y.easing}},r}return n=a,(r=[{key:\"getResolutionVector\",value:function(){return this._viewBox.getResolutionVector()}},{key:\"init\",value:function(){this.useParticles(),this._vectorsBuffer=this._gl.createBuffer()}},{key:\"useParticles\",value:function(){var t=this,e=this._libraryInterface.getAllParticles();this._emptyEventAttachedParticles(),this._vertices=new Float32Array(e.map((function(e,n){var r=At(e.coords.components,3),i=r[0],o=r[1],a=r[2],c=At(e.color.components,4),u=c[0],s=c[1],l=c[2],f=c[3],h=e.getTransitionSpecification();if(h.enabled&&!h.committed)throw new Error(\"Particle transition have not been commited.\");return t._attachParticleUpdateEventHandler(n,e),[i,o,a,u,s,l,f,e.size,+h.enabled,h.start.x,h.start.y,h.start.z,h.end.x,h.end.y,h.end.z,h.startTime,h.endTime,h.easing]})).flat())}},{key:\"_emptyEventAttachedParticles\",value:function(){this._updateEventAttachedParticles.forEach((function(t){return t.off(nt.UPDATE)})),this._updateEventAttachedParticles=[]}},{key:\"draw\",value:function(t,e){It(kt(a.prototype),\"draw\",this).call(this,t,e),this._gl.uniform3fv(this.uni(Tt.EYE),new Float32Array(this._viewBox.eye.components)),this._gl.uniform1f(this.uni(Tt.DEPTH_OF_FIELD),+this._libraryInterface.params.camera.depthOfField);var n=this._libraryInterface.configuration.webgl.camera.zoom.value;this._gl.uniform1f(this.uni(yt.ZOOM),n),this._gl.enableVertexAttribArray(this.attr(bt.POSITION)),this._gl.enableVertexAttribArray(this.attr(bt.COLOR)),this._gl.enableVertexAttribArray(this.attr(bt.SIZE)),this._gl.enableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_ENABLED)),this._gl.enableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_START)),this._gl.enableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_END)),this._gl.enableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_START_TIME)),this._gl.enableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_END_TIME)),this._gl.enableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_EASING_FUNCTION)),this._gl.bindBuffer(this._gl.ARRAY_BUFFER,this._vectorsBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,this._vertices,this._gl.STATIC_DRAW),this._gl.vertexAttribPointer(this.attr(bt.POSITION),3,this._gl.FLOAT,!1,this._strideLength*Float32Array.BYTES_PER_ELEMENT,0),this._gl.vertexAttribPointer(this.attr(bt.COLOR),4,this._gl.FLOAT,!1,this._strideLength*Float32Array.BYTES_PER_ELEMENT,3*Float32Array.BYTES_PER_ELEMENT),this._gl.vertexAttribPointer(this.attr(bt.SIZE),1,this._gl.FLOAT,!1,this._strideLength*Float32Array.BYTES_PER_ELEMENT,7*Float32Array.BYTES_PER_ELEMENT),this._gl.vertexAttribPointer(this.attr(bt.POSITION_TRANSITION_ENABLED),1,this._gl.FLOAT,!1,this._strideLength*Float32Array.BYTES_PER_ELEMENT,8*Float32Array.BYTES_PER_ELEMENT),this._gl.vertexAttribPointer(this.attr(bt.POSITION_TRANSITION_START),3,this._gl.FLOAT,!1,this._strideLength*Float32Array.BYTES_PER_ELEMENT,9*Float32Array.BYTES_PER_ELEMENT),this._gl.vertexAttribPointer(this.attr(bt.POSITION_TRANSITION_END),3,this._gl.FLOAT,!1,this._strideLength*Float32Array.BYTES_PER_ELEMENT,12*Float32Array.BYTES_PER_ELEMENT),this._gl.vertexAttribPointer(this.attr(bt.POSITION_TRANSITION_START_TIME),1,this._gl.FLOAT,!1,this._strideLength*Float32Array.BYTES_PER_ELEMENT,15*Float32Array.BYTES_PER_ELEMENT),this._gl.vertexAttribPointer(this.attr(bt.POSITION_TRANSITION_END_TIME),1,this._gl.FLOAT,!1,this._strideLength*Float32Array.BYTES_PER_ELEMENT,16*Float32Array.BYTES_PER_ELEMENT),this._gl.vertexAttribPointer(this.attr(bt.POSITION_TRANSITION_EASING_FUNCTION),1,this._gl.FLOAT,!1,this._strideLength*Float32Array.BYTES_PER_ELEMENT,17*Float32Array.BYTES_PER_ELEMENT),this._gl.bindBuffer(this._gl.ARRAY_BUFFER,null),this._gl.drawArrays(this._gl.POINTS,0,this._vertices.length/this._strideLength),this._gl.disableVertexAttribArray(this.attr(bt.POSITION)),this._gl.disableVertexAttribArray(this.attr(bt.COLOR)),this._gl.disableVertexAttribArray(this.attr(bt.SIZE)),this._gl.disableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_ENABLED)),this._gl.disableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_START)),this._gl.disableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_END)),this._gl.disableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_START_TIME)),this._gl.disableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_END_TIME)),this._gl.disableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_EASING_FUNCTION))}}])&&wt(n.prototype,r),i&&wt(n,i),a}(St),Dt=n(0);function Ct(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Mt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._library=e,this.wMat=Dt.mat4.create(),this.vMat=Dt.mat4.create(),this.pMat=Dt.mat4.create(),this.eye=null,this.calculate()}var e,n,r;return e=t,(n=[{key:\"map\",value:function(t,e,n,r,i){return(t-e)*(i-r)/(n-e)+r}},{key:\"calculate\",value:function(){var t=this._library.configuration,e=t.width,n=t.height,r=t.webgl.camera,i=r.enabled,o=r.pitch,a=r.yaw,c=r.zoom,u=r.ortho,s=r.fov;if(i){var l=Dt.mat4.rotateY(Dt.mat4.create(),Dt.mat4.create(),o);Dt.mat4.rotateX(l,l,a),Dt.mat4.translate(l,l,[0,0,c.value]);var f=[l[12],l[13],l[14]];Dt.mat4.lookAt(this.vMat,f,[0,0,0],[0,1,0]),this.eye=N.fromArray(f),this.eye.x=this.map(this.eye.x,-1*c.value,c.value,-1,1),this.eye.y=this.map(this.eye.y,-1*c.value,c.value,-1,1),this.eye.z=this.map(this.eye.z,-1*c.value,c.value,-1,1),u?Dt.mat4.ortho(this.pMat,-1,1,-1,1,1e-6,15):Dt.mat4.perspective(this.pMat,s,e/n,1e-5,15)}}},{key:\"recalculate\",value:function(){this.calculate()}},{key:\"getResolutionVector\",value:function(){var t=this._library.configuration;return[t.width,t.height,t.depth]}}])&&Ct(e.prototype,n),r&&Ct(e,r),t}();function zt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var jt,Lt,Ft=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._libraryInterface=e,this._isMouseDown=!1,this._mouseSensitivity=.01,this._zoomSensitivity=.005}var e,n,r;return e=t,(n=[{key:\"bind\",value:function(t){var e=this,n=this._libraryInterface.configuration.webgl.camera;t.addEventListener(\"mousedown\",(function(t){e._lastMouseX=t.x,e._lastMouseY=t.y,e._isMouseDown=!0})),t.addEventListener(\"mouseup\",(function(t){e._isMouseDown=!1})),t.addEventListener(\"mousemove\",(function(t){if(e._isMouseDown){e._currMouseX=t.x,e._currMouseY=t.y;var r=(e._currMouseX-e._lastMouseX)*e._mouseSensitivity,i=(e._currMouseY-e._lastMouseY)*e._mouseSensitivity;e._lastMouseX=e._currMouseX,e._lastMouseY=e._currMouseY;var o=n.pitch,a=n.yaw;o-=r,a-=i,a=Math.max(a,Math.PI/2*-1+1e-4),a=Math.min(a,Math.PI/2),n.pitch=o,n.yaw=a,e.onChange&&e.onChange()}})),n.zoom.locked||t.addEventListener(\"wheel\",(function(t){t.preventDefault(),n.zoom.value+=t.deltaY*e._zoomSensitivity,n.zoom.value=Math.min(10,n.zoom.value),n.zoom.value=Math.max(.001,n.zoom.value),e.onChange&&e.onChange()})),document.addEventListener(\"keypress\",(function(t){119===t.keyCode?e.onForward&&e.onForward(e._mouseSensitivity):115===t.keyCode?e.onBackward&&e.onBackward(e._mouseSensitivity):100===t.keyCode?e.onRight&&e.onRight(e._mouseSensitivity):97===t.keyCode?e.onLeft&&e.onLeft(e._mouseSensitivity):43===t.keyCode?n.zoom.locked||(n.zoom.value-=100*e._zoomSensitivity,n.zoom.value=Math.max(n.zoom.value,1),e.onChange&&e.onChange()):45===t.keyCode&&(n.zoom.locked||(n.zoom.value+=100*e._zoomSensitivity,n.zoom.value=Math.min(n.zoom.value,14),e.onChange&&e.onChange()))}))}},{key:\"zoomSensitivity\",get:function(){return this._zoomSensitivity}},{key:\"mouseSensitivity\",get:function(){return this._mouseSensitivity}}])&&zt(e.prototype,n),r&&zt(e,r),t}();function Ut(t){return function(t){if(Array.isArray(t))return Yt(t)}(t)||function(t){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||Bt(t)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function Vt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(\"undefined\"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(t,e)||Bt(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function Bt(t,e){if(t){if(\"string\"==typeof t)return Yt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return\"Object\"===n&&t.constructor&&(n=t.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(n):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yt(t,e):void 0}}function Yt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Wt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}!function(t){t.INIT_CONTEXT=\"initContext\",t.INIT_CANVAS=\"initCanvas\"}(jt||(jt={})),function(t){t.PARTICLES=\"particles\",t.LINES=\"lines\",t.DIRECTIONS=\"directions\",t.QUADTREE=\"quadtree\"}(Lt||(Lt={}));var Gt,Qt=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return[1/255*t,1/255*e,1/255*n,r]},Ht=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._pluginAdapter=e}var e,n,r;return e=t,(n=[{key:\"register\",value:function(){this._pluginAdapter.addAfter(o.RENDERER_INIT,this._initRenderer.bind(this)),this._pluginAdapter.addAfter(o.CONTEXT_INIT,this._initContext.bind(this)),this._pluginAdapter.addAfter(o.CANVAS_INIT,this._initCanvas.bind(this)),this._pluginAdapter.addAfter(o.PRE_START,this._preStart.bind(this)),this._pluginAdapter.addAfter(o.CANVAS_CLEAR,this._clearCanvas.bind(this)),this._pluginAdapter.addAfter(o.DRAW,this._draw.bind(this)),this._pluginAdapter.addAfter(o.UPDATE,this._update.bind(this)),this._pluginAdapter.addAfter(o.WINDOW_RESIZE,this._onResize.bind(this))}},{key:\"_initRenderer\",value:function(t){var e=Vt(t.params.backgroundColor,4),n=e[0],r=e[1],i=e[2],o=e[3],a=Qt(n,r,i,o),c=t.params.camera,u=c.enabled,s=c.pitch,l=c.yaw,f=c.zoom,h=c.ortho,y=c.fov,_={backgroundColor:a,programs:{particles:null},features:[],viewBox:null,camera:{enabled:u,pitch:s,yaw:l,zoom:{locked:f.locked,value:f.value},ortho:h,fov:y}};t.configuration.webgl=_}},{key:\"_initContext\",value:function(t){var e,n=this._callSystemsConfigurationHooks(t,jt.INIT_CONTEXT,[t.canvas]);e=n||t.canvas.getContext(\"webgl\"),t.context=e}},{key:\"_initCanvas\",value:function(t){var e=t.configuration,n=e.width,r=e.height,i=t.context;i.viewport(0,0,n,r),i.enable(i.BLEND),i.blendFunc(i.SRC_ALPHA,i.ONE),i.enable(i.CULL_FACE),i.cullFace(i.BACK),i.frontFace(i.CW),this._callSystemsConfigurationHooks(t,jt.INIT_CANVAS,[i])}},{key:\"_preStart\",value:function(t){var e=t.context,n=t.params.features,r=t.configuration.webgl,i=new Mt(t);r.viewBox=i,r.features=n.map((function(e){return{feature:e.build(t)}})).filter((function(t){return t.feature.isAvailable()})),r.features.forEach((function(n){var r=n.feature;if(r.buildProgram&&(r.buildProgram(e,i,t),n.program=r.getProgram(),!n.program))throw new Error(\"The feature specifies a `buildProgram` but not a `getProgram`\")}));var a=t.canvas,c=new Ft(t);c.bind(a),c.onChange=this._onCameraChange.bind(this)(t);var u=t.getAllParticles(),s=new xt(e,i,t);s.init(),r.programs.particles=s,t.feedProximityDetectionSystem(u),r.features.forEach((function(t){var e=t.program;e&&e.init()})),this._pluginAdapter.addAfter(o.SYSTEM_UPDATED,this._onSystemUpdated.bind(this))}},{key:\"_clearCanvas\",value:function(t){var e=t.configuration.webgl,n=t.context,r=Vt(e.backgroundColor,4),i=r[0],o=r[1],a=r[2],c=r[3];n.clearColor(i,o,a,c),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT)}},{key:\"_update\",value:function(t){var e=t.configuration.webgl;e.programs.particles.update(t.deltaTime,t.time),e.features.forEach((function(e){var n=e.program;n&&n.update(t.deltaTime,t.time)}))}},{key:\"_draw\",value:function(t){var e=t.configuration.webgl;e.programs.particles.draw(t.deltaTime,t.time),e.features.forEach((function(e){var n=e.program;n&&n.draw(t.deltaTime,t.time)}))}},{key:\"_onResize\",value:function(t){var e=t.configuration,n=e.width,r=e.height,i=t.configuration.webgl,o=i.programs;i.features.forEach((function(t){var e=t.program;e&&e.uniformChanged(_t.RESOLUTION)})),o.particles.uniformChanged(_t.RESOLUTION),this._onCameraChange(t)(),t.context.viewport(0,0,n,r)}},{key:\"_onCameraChange\",value:function(t){var e=t.configuration.webgl;return function(){e.viewBox.recalculate(),e.features.forEach((function(t){var e=t.program;e&&e.uniformChanged(_t.CAMERA)})),e.programs.particles.uniformChanged(_t.CAMERA)}}},{key:\"_onSystemUpdated\",value:function(t){t.getAllParticles(),t.configuration.webgl.programs.particles.useParticles()}},{key:\"_callSystemsConfigurationHooks\",value:function(t,e,n){var r,i=this,o={renderer:{webgl:{initCanvas:function(t){},initContext:function(t){}}}};return t.params.systems.forEach((function(t){var a=_(t.configuration,o).renderer.webgl[e];r=a.call.apply(a,[i].concat(Ut(n)))})),r}}])&&Wt(e.prototype,n),r&&Wt(e,r),t}();function Xt(t){return(Xt=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function Zt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(\"undefined\"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(t,e)||function(t,e){if(!t)return;if(\"string\"==typeof t)return qt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);\"Object\"===n&&t.constructor&&(n=t.constructor.name);if(\"Map\"===n||\"Set\"===n)return Array.from(n);if(\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qt(t,e)}(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function $t(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function Kt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Jt(t,e){return(Jt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function te(t,e){return!e||\"object\"!==Xt(e)&&\"function\"!=typeof e?ee(t):e}function ee(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}function ne(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function re(t){return(re=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}!function(t){t.UP=\"up\",t.RIGHT=\"right\",t.DOWN=\"down\",t.LEFT=\"left\",t.FRONT=\"front\",t.BACK=\"back\"}(Gt||(Gt={}));var ie={randomize:!1,boundary:{min:0,max:1}},oe=function(t){!function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Jt(t,e)}(a,t);var e,n,r,i,o=(e=a,function(){var t,n=re(e);if(ne()){var r=re(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return te(this,t)});function a(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new N,n=arguments.length>1?arguments[1]:void 0;return $t(this,a),(t=o.call(this)).coords=e,t._manager=n,t._transitionSpecificationBuilder=new pt(ee(t)),t.size=2,t.velocity=new N,t.color=new Q({x:255,y:255,z:255,w:1}),t.alpha=1,t._lastTickDelta=-1,t._lastTickTime=-1,t}return n=a,(r=[{key:\"getTransitionSpecification\",value:function(){return this._transitionSpecificationBuilder&&this._transitionSpecificationBuilder.specification}},{key:\"useTransition\",value:function(){var t=new pt(this);return this._transitionSpecificationBuilder=t,t.enable(this._lastTickTime)}},{key:\"setVelocity\",value:function(t,e){var n;n=null===e?ie:_(e,ie);var r=e.boundary,i=r.min,o=r.max-i,a=this.velocity;switch(t){case Gt.UP:a.y=1,n.randomize&&this._randomizeVectorComponent(a,\"y\",o,i);break;case Gt.RIGHT:a.x=1,n.randomize&&this._randomizeVectorComponent(a,\"x\",o,i);break;case Gt.DOWN:a.y=-1,n.randomize&&this._randomizeVectorComponent(a,\"y\",o,i);break;case Gt.LEFT:a.x=-1,n.randomize&&this._randomizeVectorComponent(a,\"x\",o,i);break;case Gt.FRONT:a.z=1,n.randomize&&this._randomizeVectorComponent(a,\"z\",o,i);break;case Gt.BACK:a.z=-1,n.randomize&&this._randomizeVectorComponent(a,\"z\",o,i)}this.velocity=a}},{key:\"_randomizeVectorComponent\",value:function(t,e,n,r){t[e]&&(t[e]=t[e]*Math.random()*n+r)}},{key:\"setColor\",value:function(t,e,n,r){var i=Zt(Qt(t,e,n,r),4),o=i[0],a=i[1],c=i[2],u=i[3];this.color=new Q({x:o,y:a,z:c,w:u}),this.call(nt.COLOR_UPDATE,this)}},{key:\"setSize\",value:function(t){\"number\"==typeof t?this.size=t:this._randomOptionIsBoundary(t)?this.size=dt(t):this.size=mt(t),this.size=this.size*this._manager.configuration.pixelRatio}},{key:\"_randomOptionIsBoundary\",value:function(t){var e=t;return void 0!==e.min&&void 0!==e.max&&void 0===e.boundary&&void 0===e.value}},{key:\"setAlpha\",value:function(t){this.color.w=t,this.call(nt.COLOR_UPDATE,this)}},{key:\"update\",value:function(t,e){var n=this._transitionSpecificationBuilder;n.specification.enabled?e&&e+16>=n.specification.endTime&&n.tryInvokeCallback():(this.updatePosition(),this.call(nt.POSITION_UPDATE,this),this.notifyUpdated())}},{key:\"updatePosition\",value:function(){this.velocity&&this.coords.add(this.velocity)}},{key:\"notifyUpdated\",value:function(){this.call(nt.UPDATE,this)}}])&&Kt(n.prototype,r),i&&Kt(n,i),a}(ft);function ae(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var ce,ue=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._timers=[]}var e,n,r;return e=t,(n=[{key:\"add\",value:function(t,e,n,r){this._timers.push({callback:t,since:e,when:n,recurrent:r,fired:!1})}},{key:\"check\",value:function(t){this._timers.forEach((function(e){t>=e.when&&(e.callback(),e.recurrent?(e.when=t+(e.when-e.since),e.since=t):e.fired=!0)})),this._timers=this._timers.filter((function(t){return!t.fired}))}},{key:\"remove\",value:function(t){this._timers=this._timers.filter((function(e){return e!==t}))}}])&&ae(e.prototype,n),r&&ae(e,r),t}();!function(t){t.VMIN=\"vmin\",t.VMAX=\"vmax\",t.VW=\"vw\",t.VH=\"vh\",t.VD=\"vd\",t.PX=\"px\",t.ABS=\"abs\"}(ce||(ce={}));function se(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var le=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.manager=e,this.links={required:!1},this._lastTickDelta=-1,this._lastTickTime=-1,this._systemTimer=new ue}var e,n,r;return e=t,(n=[{key:\"notifyWholeSystemChanged\",value:function(){this.manager&&this.manager.notify(y.SYSTEM_UPDATED,this)}},{key:\"updateInternalParameters\",value:function(t,e){this._lastTickDelta=t,this._lastTickTime=e,this._systemTimer.check(e)}},{key:\"setTimeout\",value:function(t,e){return this._systemTimer.add(t,this._lastTickTime,this._lastTickTime+e,!1)}},{key:\"setInterval\",value:function(t,e){return this._systemTimer.add(t,this._lastTickTime,this._lastTickTime+e,!0)}},{key:\"clearTimeout\",value:function(t){return this._systemTimer.remove(t)}},{key:\"useLinks\",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ce.PX;this.links={required:!0,distance:t,unit:e}}}])&&se(e.prototype,n),r&&se(e,r),t}();function fe(t){return(fe=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function he(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function ye(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _e(t,e){return(_e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function pe(t,e){return!e||\"object\"!==fe(e)&&\"function\"!=typeof e?function(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}(t):e}function me(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function de(t){return(de=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ve=function(t){!function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_e(t,e)}(a,t);var e,n,r,i,o=(e=a,function(){var t,n=de(e);if(me()){var r=de(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return pe(this,t)});function a(){var t;return he(this,a),(t=o.apply(this,arguments))._particles=[],t}return n=a,(r=[{key:\"attach\",value:function(){var t=this,e=this.manager.configuration,n=e.width,r=e.height,i=e.depth;this.useLinks(20,ce.VMIN),this._particles=new Array(300).fill(null).map((function(e){var o=Math.random()*n,a=Math.random()*r,c=Math.random()*i,u=new oe(new N({x:o,y:a,z:c}),t.manager);return u.setColor(153,255,153,1),u.setSize({value:20,randomize:!0,boundary:{min:20,max:30}}),u.setVelocity(Gt.UP,{randomize:!0,boundary:{min:-2,max:2}}),u.setVelocity(Gt.RIGHT,{randomize:!0,boundary:{min:-2,max:2}}),u.setVelocity(Gt.FRONT,{randomize:!0,boundary:{min:-2,max:2}}),u}))}},{key:\"tick\",value:function(t,e){var n=this.manager.configuration,r=n.width,i=n.height,o=n.depth;this._particles.forEach((function(n){n.update(t,e),n.coords.x<0&&(n.coords.x=r),n.coords.x>r&&(n.coords.x=0),n.coords.y<0&&(n.coords.y=i),n.coords.y>i&&(n.coords.y=0),n.coords.z<0&&(n.coords.z=o),n.coords.z>o&&(n.coords.z=0)}))}},{key:\"getParticles\",value:function(){return this._particles}}])&&ye(n.prototype,r),i&&ye(n,i),a}(le);function ge(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function be(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Te(t,e,n){return e&&be(t.prototype,e),n&&be(t,n),t}var Se=function(){function t(e){ge(this,t),this.manager=e,this._objects=[]}return Te(t,[{key:\"init\",value:function(){}},{key:\"update\",value:function(t){this._objects=t}},{key:\"getNeighbours\",value:function(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.params.radius;return this._objects.filter((function(t){return e!==t&&n.getDistance(e,t)<r}))}},{key:\"getDistance\",value:function(t,e){return Math.hypot(e.coords.x-t.coords.x,e.coords.y-t.coords.y,e.coords.z-t.coords.z)}}]),t}(),Ee=function(){function t(){ge(this,t)}return Te(t,null,[{key:\"build\",value:function(t){var e=_(t,{radius:300});return Se.params=e,Se}}]),t}();function Ae(t){return(Ae=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function Oe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var we=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._metrics={},void 0!==(\"undefined\"==typeof window?\"undefined\":Ae(window))&&(window.metrics=this)}var e,n,r;return e=t,(n=[{key:\"set\",value:function(t,e){this._metrics[t]=e}},{key:\"get\",value:function(){return this._metrics}}])&&Oe(e.prototype,n),r&&Oe(e,r),t}());function Ie(t){return(Ie=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function Pe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ne(t,e){return(Ne=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Re(t,e){return!e||\"object\"!==Ie(e)&&\"function\"!=typeof e?ke(t):e}function ke(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}function xe(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function De(t){return(De=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ce,Me=function(){return{selectorOrCanvas:\"#canvas\",renderer:new p((function(){return l})),systems:[ve],proximityDetectionSystem:Ee.build(),backgroundColor:[0,0,0,0],detectRetina:!0,fpsLimit:0,features:[],camera:{enabled:!0,pitch:0,yaw:0,zoom:{value:2,locked:!1},ortho:!1,fov:Math.PI/5,depthOfField:!1},events:{resize:{enabled:!0,debounce:-1}}}},ze=function(t){!function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ne(t,e)}(u,t);var e,n,r,i,c=(e=u,function(){var t,n=De(e);if(xe()){var r=De(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return Re(this,t)});function u(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,u),(e=c.call(this)).params=t,e._plugin=new a,e.configuration={initialized:!1},e.systems=[],e.proximityDetectionSystem=null,e.renderer=null,e._resizeDebounceTimer=null,e.time=0,e.deltaTime=0,e._lastPerf=0,e._loop=e._loop.bind(ke(e)),e}return n=u,(r=[{key:\"start\",value:function(){this._initParams(),this._initRenderer(),this._initContext(),this._initCanvas(),this._initResizeEventListeners(),this._initSystems(),this._initProximityDetectionSystems(),this._preStart(),this._loop()}},{key:\"_initParams\",value:function(){var t=this;this.params=_(this.params,Me()),this.systems=this.params.systems.map((function(e){return new e(t)})),this.proximityDetectionSystem=new this.params.proximityDetectionSystem(this),this.renderer=new this.params.renderer(this._plugin);var e=this.params.selectorOrCanvas;\"string\"==typeof e&&(e=document.querySelector(e)),this._canvas=e}},{key:\"_initRenderer\",value:function(){this.renderer.register(),this._plugin.exec(o.RENDERER_INIT,this)}},{key:\"_initContext\",value:function(){this._plugin.exec(o.CONTEXT_INIT,this)}},{key:\"_initCanvas\",value:function(){this._configureSize(),this._plugin.exec(o.CANVAS_INIT,this)}},{key:\"_initResizeEventListeners\",value:function(){var t=this,e=this.params.events.resize;e.enabled&&window.addEventListener(\"resize\",(function(){-1===e.debounce||0===e.debounce?(t._configureSize(),t._plugin.exec(o.WINDOW_RESIZE,t)):(clearTimeout(t._resizeDebounceTimer),t._resizeDebounceTimer=setTimeout((function(){t._configureSize(),t._plugin.exec(o.WINDOW_RESIZE,t)}),e.debounce))}))}},{key:\"_configureSize\",value:function(){var t=this.canvas,e=t.clientWidth,n=t.clientHeight;if(this.params.detectRetina){var r=window.devicePixelRatio;r>1?(this.configuration.isRetina=!0,this.configuration.pixelRatio=r,e=this.canvas.offsetWidth*r,n=this.canvas.offsetHeight*r):(this.configuration.pixelRatio=1,this.configuration.isRetina=!1)}this.configuration.width=e,this.configuration.height=n,this.configuration.depth=Math.max(e,n),this.canvas.width=e,this.canvas.height=n}},{key:\"_initSystems\",value:function(){this.systems.forEach((function(t){return t.attach()}))}},{key:\"_initProximityDetectionSystems\",value:function(){this.proximityDetectionSystem.init()}},{key:\"_preStart\",value:function(){this._plugin.exec(o.PRE_START,this)}},{key:\"_loop\",value:function(){var t=this,e=this.params.fpsLimit,n=performance.now(),r=n-this._lastPerf,i=1e3/r;e>0&&r<1e3/e+1||(r=Math.min(r,30),this.deltaTime=r,this.time+=this.deltaTime,this._lastPerf=n,we.set(\"fps\",i),this.systems.forEach((function(e){e.updateInternalParameters(t.deltaTime,t.time),e.tick&&e.tick(t.deltaTime,t.time)})),this._plugin.exec(o.UPDATE,this),this._plugin.exec(o.CANVAS_CLEAR,this),this._plugin.exec(o.DRAW,this)),requestAnimationFrame(this._loop)}},{key:\"notify\",value:function(t,e){t===y.SYSTEM_UPDATED&&this._plugin.exec(o.SYSTEM_UPDATED,this)}},{key:\"getAllParticles\",value:function(){return this.systems.map((function(t){return t.getParticles()})).flat()}},{key:\"getAllLinkableParticles\",value:function(){var t={required:!1},e=[];return this.systems.forEach((function(n){n.links.required&&(t=n.links,e.push(n.getParticles()))})),[e.flat(),t]}},{key:\"feedProximityDetectionSystem\",value:function(t){this.proximityDetectionSystem.update(t)}},{key:\"getNeighbours\",value:function(t,e){return this.proximityDetectionSystem.getNeighbours(t,e)}},{key:\"getProximityDetectionSystem\",value:function(){return this.proximityDetectionSystem}}])&&Pe(n.prototype,r),i&&Pe(n,i),u}(u);!function(t){t.LINKS=\"links\",t.DIRECTIONS=\"directions\",t.QUAD_TREE=\"quadTree\"}(Ce||(Ce={}));var je=function(t){new ze(t).start()}}]));"},"sourceMaps":{"js":{"mappings":[{"source":"../node_modules/@wufe/particles/dist/cjs/index.js","original":{"line":1,"column":0},"generated":{"line":1,"column":0}}],"sources":{"../node_modules/@wufe/particles/dist/cjs/index.js":"!function(t,e){for(var n in e)t[n]=e[n]}(exports,function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,\"a\",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p=\"\",n(n.s=1)}([function(t,e){t.exports=require(\"gl-matrix\")},function(t,e,n){\"use strict\";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.r(e),n.d(e,\"getDefaultParams\",(function(){return Me})),n.d(e,\"Main\",(function(){return ze})),n.d(e,\"Feature\",(function(){return Ce})),n.d(e,\"init\",(function(){return je})),n.d(e,\"ParticleEventType\",(function(){return nt})),n.d(e,\"BaseListenableParticle\",(function(){return ft})),n.d(e,\"ParticleDirection\",(function(){return Gt})),n.d(e,\"Particle\",(function(){return oe})),n.d(e,\"RendererHook\",(function(){return jt})),n.d(e,\"ZeroVector3D\",(function(){return P})),n.d(e,\"Vector3D\",(function(){return N})),n.d(e,\"ZeroVector4D\",(function(){return G})),n.d(e,\"Vector4D\",(function(){return Q})),n.d(e,\"VectorNorm\",(function(){return b})),n.d(e,\"Renderer2D\",(function(){return l})),n.d(e,\"WebGLProgram\",(function(){return Lt})),n.d(e,\"getColor\",(function(){return Qt})),n.d(e,\"RendererWebGL\",(function(){return Ht})),n.d(e,\"BaseParticleSystem\",(function(){return le})),n.d(e,\"DefaultParticleSystem\",(function(){return ve})),n.d(e,\"SystemTimer\",(function(){return ue})),n.d(e,\"TransitionEasingFunction\",(function(){return lt})),n.d(e,\"TransitionSpecificationBuilder\",(function(){return pt})),n.d(e,\"getDefault\",(function(){return _})),n.d(e,\"LazyFactory\",(function(){return p})),n.d(e,\"stringFormat\",(function(){return m})),n.d(e,\"valueFromRandomOptions\",(function(){return mt})),n.d(e,\"randomValueFromBoundary\",(function(){return dt}));var i,o,a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._hooks=[]}var e,n,o;return e=t,(n=[{key:\"addBefore\",value:function(t,e,n){this._hooks.push({time:i.BEFORE,type:t,callback:e})}},{key:\"addAfter\",value:function(t,e,n){this._hooks.push({time:i.AFTER,type:t,callback:e})}},{key:\"exec\",value:function(t,e){this._hooks.forEach((function(n){return n.type===t&&n.callback(e)}))}},{key:\"getAll\",value:function(t){return this._hooks.filter((function(e){return e.type===t}))}}])&&r(e.prototype,n),o&&r(e,o),t}();function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}!function(t){t[t.BEFORE=0]=\"BEFORE\",t[t.AFTER=1]=\"AFTER\"}(i||(i={})),function(t){t[t.RENDERER_INIT=0]=\"RENDERER_INIT\",t[t.CONTEXT_INIT=1]=\"CONTEXT_INIT\",t[t.CANVAS_INIT=2]=\"CANVAS_INIT\",t[t.PRE_START=3]=\"PRE_START\",t[t.DRAW=4]=\"DRAW\",t[t.UPDATE=5]=\"UPDATE\",t[t.CANVAS_CLEAR=6]=\"CANVAS_CLEAR\",t[t.SYSTEM_UPDATED=7]=\"SYSTEM_UPDATED\",t[t.WINDOW_RESIZE=8]=\"WINDOW_RESIZE\"}(o||(o={}));var u=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t)}var e,n,r;return e=t,(n=[{key:\"canvas\",get:function(){return this._canvas}},{key:\"context\",get:function(){return this._context},set:function(t){this._context=t}}])&&c(e.prototype,n),r&&c(e,r),t}();function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var l=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._pluginAdapter=e}var e,n,r;return e=t,(n=[{key:\"register\",value:function(){this._pluginAdapter.addAfter(o.CONTEXT_INIT,this._initContext),this._pluginAdapter.addAfter(o.DRAW,this._draw)}},{key:\"_initContext\",value:function(t){t.context=t.canvas.getContext(\"2d\")}},{key:\"_draw\",value:function(t){t.forEach((function(t){t.getParticles()}))}}])&&s(e.prototype,n),r&&s(e,r),t}();function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t){return(h=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}var y,_=function t(e,n){if(void 0===e)return n instanceof p?n.build():n;if(!(\"object\"!==h(n)||Array.isArray(n)||n instanceof p)){var r={};for(var i in n)r[i]=t(e[i],n[i]);return r}return e},p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._callback=e}var e,n,r;return e=t,(n=[{key:\"build\",value:function(){return this._callback()}}])&&f(e.prototype,n),r&&f(e,r),t}(),m=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(arguments.length){var i,o=h(arguments[1]),a=\"string\"===o||\"number\"===o?Array.prototype.slice.call(arguments):arguments[1];for(i in a)t=t.replace(new RegExp(\"\\\\{\"+i+\"\\\\}\",\"gi\"),a[i])}return t};function d(t){return function(t){if(Array.isArray(t))return v(t)}(t)||function(t){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if(\"string\"==typeof t)return v(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);\"Object\"===n&&t.constructor&&(n=t.constructor.name);if(\"Map\"===n||\"Set\"===n)return Array.from(n);if(\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(t,e)}(t)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function g(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}!function(t){t.SYSTEM_UPDATED=\"systemUpdated\"}(y||(y={}));var b=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._vec=e}var e,n,r;return e=t,(n=[{key:\"euclidean\",get:function(){return Math.hypot.apply(Math,d(this._vec.components))}}])&&g(e.prototype,n),r&&g(e,r),t}();function T(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(\"undefined\"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(t,e)||function(t,e){if(!t)return;if(\"string\"==typeof t)return S(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);\"Object\"===n&&t.constructor&&(n=t.constructor.name);if(\"Map\"===n||\"Set\"===n)return Array.from(n);if(\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(t,e)}(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function E(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach((function(e){O(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function O(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function I(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var P={x:0,y:0,z:0},N=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A({},P),n=e.x,r=e.y,i=e.z;w(this,t),this.x=n,this.y=r,this.z=i,this.norm=new b(this)}var e,n,r;return e=t,r=[{key:\"fromArray\",value:function(e){var n=T(e,3);return new t({x:n[0],y:n[1],z:n[2]})}}],(n=[{key:\"clone\",value:function(){return new t({x:this.x,y:this.y,z:this.z})}},{key:\"add\",value:function(t){return\"number\"==typeof t?(this.x+=t,this.y+=t,this.z+=t):(this.x+=t.x,this.y+=t.y,this.z+=t.z),this}},{key:\"sub\",value:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}},{key:\"div\",value:function(t){return this.x/=t,this.y/=t,this.z/=t,R(this),this}},{key:\"mul\",value:function(t){return this.x*=t,this.y*=t,this.z*=t,R(this),this}},{key:\"dot\",value:function(t){return this.x*t.x+this.y*t.y+this.z*t.z}},{key:\"angle\",value:function(t){return Math.acos(this.dot(t)/(this.length*t.length))}},{key:\"unit\",value:function(){return this.length>1e-4?this.div(this.length):A({},P)}},{key:\"cross\",value:function(t){var e=this.clone(),n=e.x,r=e.y,i=e.z;return this.x=r*t.z-i*t.y,this.y=i*t.x-n*t.z,this.z=n*t.y-r*t.x,this}},{key:\"components\",get:function(){return[this.x,this.y,this.z]}},{key:\"length\",get:function(){return this.norm.euclidean}}])&&I(e.prototype,n),r&&I(e,r),t}();function R(t){isNaN(t.x)||isNaN(t.y)||isNaN(t.z)}var k=function(t){return void 0!==t.w};function x(t){return(x=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function D(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(\"undefined\"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(t,e)||function(t,e){if(!t)return;if(\"string\"==typeof t)return C(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);\"Object\"===n&&t.constructor&&(n=t.constructor.name);if(\"Map\"===n||\"Set\"===n)return Array.from(n);if(\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(t,e)}(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function C(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function M(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function z(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?M(Object(n),!0).forEach((function(e){j(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function j(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function L(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function F(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function U(t,e,n){return(U=\"undefined\"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=W(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function V(t,e){return(V=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function B(t,e){return!e||\"object\"!==x(e)&&\"function\"!=typeof e?function(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}(t):e}function Y(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function W(t){return(W=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var G={x:0,y:0,z:0,w:0},Q=function(t){!function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&V(t,e)}(a,t);var e,n,r,i,o=(e=a,function(){var t,n=W(e);if(Y()){var r=W(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return B(this,t)});function a(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z({},G);return L(this,a),(t=o.call(this,e)).w=e.w,t}return n=a,i=[{key:\"fromArray\",value:function(t){var e=D(t,4);return new a({x:e[0],y:e[1],z:e[2],w:e[3]})}}],(r=[{key:\"clone\",value:function(){return new a({x:this.x,y:this.y,z:this.z,w:this.w})}},{key:\"add\",value:function(t){return\"number\"==typeof t?(U(W(a.prototype),\"add\",this).call(this,t),this.w+=t):(U(W(a.prototype),\"add\",this).call(this,t),k(t)&&(this.w+=t.w)),this}},{key:\"sub\",value:function(t){return U(W(a.prototype),\"sub\",this).call(this,t),k(t)&&(this.w-=t.w),this}},{key:\"div\",value:function(t){return U(W(a.prototype),\"div\",this).call(this,t),this.w/=t,H(this),this}},{key:\"mul\",value:function(t){return U(W(a.prototype),\"mul\",this).call(this,t),this.w*=t,H(this),this}},{key:\"unit\",value:function(){return this.div(this.length)}},{key:\"cross\",value:function(t){return U(W(a.prototype),\"cross\",this).call(this,t)}},{key:\"components\",get:function(){return U(W(a.prototype),\"components\",this).concat([this.w])}},{key:\"length\",get:function(){return this.norm.euclidean}}])&&F(n.prototype,r),i&&F(n,i),a}(N);function H(t){isNaN(t.x)||isNaN(t.y)||isNaN(t.z)||isNaN(t.w)}function X(t){return(X=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function Z(t,e){return(Z=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function q(t,e){return!e||\"object\"!==X(e)&&\"function\"!=typeof e?function(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}(t):e}function $(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function K(t){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function J(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function tt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function et(t,e,n){return e&&tt(t.prototype,e),n&&tt(t,n),t}var nt,rt=function(t){!function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Z(t,e)}(r,t);var e,n=(e=r,function(){var t,n=K(e);if($()){var r=K(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return q(this,t)});function r(){return J(this,r),n.apply(this,arguments)}return et(r,[{key:\"call\",value:function(t,e){this._attachedEventListeners.filter((function(e){return e.type===t})).forEach((function(t){return t.callback(e)}))}}]),r}(function(){function t(){J(this,t),this._attachedEventListeners=[]}return et(t,[{key:\"on\",value:function(t,e){this._attachedEventListeners.push({type:t,callback:e})}},{key:\"off\",value:function(t,e){var n=-1;(n=void 0!==e?this._attachedEventListeners.findIndex((function(n){return n.type===t&&n.callback===e})):this._attachedEventListeners.findIndex((function(e){return e.type===t})))>-1&&(this._attachedEventListeners=this._attachedEventListeners.slice(0,n).concat(this._attachedEventListeners.slice(n+1)))}}]),t}());function it(t){return(it=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function ot(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function at(t,e){return(at=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ct(t,e){return!e||\"object\"!==it(e)&&\"function\"!=typeof e?function(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}(t):e}function ut(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function st(t){return(st=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}!function(t){t.POSITION_UPDATE=\"positionUpdate\",t.COLOR_UPDATE=\"colorUpdate\",t.UPDATE=\"update\"}(nt||(nt={}));var lt,ft=function(t){!function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&at(t,e)}(r,t);var e,n=(e=r,function(){var t,n=st(e);if(ut()){var r=st(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return ct(this,t)});function r(){return ot(this,r),n.apply(this,arguments)}return r}(rt);function ht(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}!function(t){t[t.LINEAR=1]=\"LINEAR\",t[t.QUADRATIC_IN=2]=\"QUADRATIC_IN\",t[t.QUADRATIC_OUT=3]=\"QUADRATIC_OUT\",t[t.QUADRATIC_IN_OUT=4]=\"QUADRATIC_IN_OUT\"}(lt||(lt={}));var yt,_t,pt=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._particle=e,this.specification={enabled:!1,start:new N,end:new N,startTime:0,endTime:0,easing:lt.LINEAR,committed:!1},this._timeout=null,this._transitionCallback=null,this.tryInvokeCallback=function(){n._transitionCallback&&n._transitionCallback(),n._transitionCallback=null}}var e,n,r;return e=t,(n=[{key:\"enable\",value:function(t){return this.specification.startTime=t,this.specification.enabled=!0,this}},{key:\"within\",value:function(t){return this.specification.startTime=this.specification.startTime+t,this}},{key:\"from\",value:function(t){return this.specification.start=t,this}},{key:\"to\",value:function(t){return this.specification.end=t,this}},{key:\"in\",value:function(t){return this.specification.endTime=this.specification.startTime+t,this}},{key:\"easing\",value:function(t){return this.specification.easing=t,this}},{key:\"then\",value:function(t){return this._transitionCallback=t,this}},{key:\"commit\",value:function(){return this.specification.committed=!0,this._particle.notifyUpdated(),this}}])&&ht(e.prototype,n),r&&ht(e,r),t}(),mt=function(t){return t.randomize?dt(t.boundary):t.value},dt=function(t){var e=t.min,n=t.max-e;return Math.random()*n+e};function vt(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function gt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}!function(t){t.RESOLUTION=\"v_res\",t.WORLD=\"m_world\",t.VIEW=\"m_view\",t.PROJECTION=\"m_projection\",t.T=\"f_t\",t.ZOOM=\"f_zoom\"}(yt||(yt={})),function(t){t.CAMERA=\"camera\",t.RESOLUTION=\"resolution\"}(_t||(_t={}));var bt,Tt,St=function(){function t(e,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=arguments.length>5?arguments[5]:void 0,c=arguments.length>6?arguments[6]:void 0;vt(this,t),this._gl=e,this._vertexShaderText=n,this._fragmentShaderText=r,this._attributes=i,this._uniforms=o,this._viewBox=a,this._libraryInterface=c,this._uniformsToUpdate={camera:!0,resolution:!0},this.getAttributeLocation=this.attr,this.getUniformLocation=this.uni,this.checkShaderCompilation=function(t,e){if(!e.getShaderParameter(t,e.COMPILE_STATUS))throw new Error(\"Error compiling shader: \".concat(e.getShaderInfoLog(t)))},this.checkProgramLink=function(t,e){if(!e.getProgramParameter(t,e.LINK_STATUS))throw new Error(\"Error linking program: \".concat(e.getProgramInfoLog(t)))},this.checkProgramValidation=function(t,e){if(!e.getProgramParameter(t,e.VALIDATE_STATUS))throw new Error(\"Error linking program: \".concat(e.getProgramInfoLog(t)))},this.compileShaders(),this.createProgram(),this.findLocations()}var e,n,r;return e=t,(n=[{key:\"uniformChanged\",value:function(t){this._uniformsToUpdate[t]=!0}},{key:\"update\",value:function(t,e){}},{key:\"draw\",value:function(t,e){this._gl.useProgram(this.program),this._gl.uniform1f(this.uni(yt.T),e),this._uniformsToUpdate[_t.RESOLUTION]&&(this._gl.uniform3fv(this.uni(yt.RESOLUTION),new Float32Array(this.getResolutionVector())),this._uniformsToUpdate[_t.RESOLUTION]=!1),this._gl.uniformMatrix4fv(this.uni(yt.WORLD),!1,this._viewBox.wMat),this._gl.uniformMatrix4fv(this.uni(yt.VIEW),!1,this._viewBox.vMat),this._gl.uniformMatrix4fv(this.uni(yt.PROJECTION),!1,this._viewBox.pMat)}},{key:\"getResolutionVector\",value:function(){return this._viewBox.getResolutionVector()}},{key:\"compileShaders\",value:function(){this._vertexShader=this._gl.createShader(this._gl.VERTEX_SHADER),this._gl.shaderSource(this._vertexShader,this._vertexShaderText),this._gl.compileShader(this._vertexShader),this.checkShaderCompilation(this._vertexShader,this._gl),this._fragmentShader=this._gl.createShader(this._gl.FRAGMENT_SHADER),this._gl.shaderSource(this._fragmentShader,this._fragmentShaderText),this._gl.compileShader(this._fragmentShader),this.checkShaderCompilation(this._fragmentShader,this._gl)}},{key:\"createProgram\",value:function(){this._program=this._gl.createProgram(),this._gl.attachShader(this._program,this._vertexShader),this._gl.attachShader(this._program,this._fragmentShader),this._gl.linkProgram(this._program),this.checkProgramLink(this._program,this._gl),this._gl.validateProgram(this._program),this.checkProgramValidation(this._program,this._gl)}},{key:\"findLocations\",value:function(){var t=this;this._uniforms=this._uniforms.concat(Object.values(yt)),this._attributesLocations=this._attributes.reduce((function(e,n){var r=t._gl.getAttribLocation(t._program,n);return-1===r&&console.warn(\"Cannot find attribute \".concat(n,\".\")),e[n]=r,e}),{}),this._uniformsLocations=this._uniforms.reduce((function(e,n){var r=t._gl.getUniformLocation(t._program,n);return-1===r&&console.warn(\"Cannot find uniform \".concat(n)),e[n]=r,e}),{})}},{key:\"attr\",value:function(t){return this._attributesLocations[t]}},{key:\"uni\",value:function(t){return this._uniformsLocations[t]}},{key:\"program\",get:function(){return this._program}}])&&gt(e.prototype,n),r&&gt(e,r),t}();function Et(t){return(Et=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function At(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(\"undefined\"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(t,e)||function(t,e){if(!t)return;if(\"string\"==typeof t)return Ot(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);\"Object\"===n&&t.constructor&&(n=t.constructor.name);if(\"Map\"===n||\"Set\"===n)return Array.from(n);if(\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ot(t,e)}(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function Ot(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function wt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function It(t,e,n){return(It=\"undefined\"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=kt(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function Pt(t,e){return(Pt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Nt(t,e){return!e||\"object\"!==Et(e)&&\"function\"!=typeof e?function(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}(t):e}function Rt(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function kt(t){return(kt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}!function(t){t.POSITION=\"v_pos\",t.COLOR=\"v_col\",t.SIZE=\"f_size\",t.POSITION_TRANSITION_ENABLED=\"t_position_enabled\",t.POSITION_TRANSITION_START=\"t_position_start\",t.POSITION_TRANSITION_END=\"t_position_end\",t.POSITION_TRANSITION_START_TIME=\"t_position_start_time\",t.POSITION_TRANSITION_END_TIME=\"t_position_end_time\",t.POSITION_TRANSITION_EASING_FUNCTION=\"t_position_easing_function\"}(bt||(bt={})),function(t){t.EYE=\"v_eye\",t.DEPTH_OF_FIELD=\"f_dof\"}(Tt||(Tt={}));var xt=function(t){!function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Pt(t,e)}(a,t);var e,n,r,i,o=(e=a,function(){var t,n=kt(e);if(Rt()){var r=kt(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return Nt(this,t)});function a(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,a),(r=o.call(this,t,\"precision highp float;\\n#define GLSLIFY 1\\n\\n#define BOUNDARY_MARGIN_PERCENTAGE 10.0\\n\\n#define EASING_FN_LINEAR 1.0\\n#define EASING_FN_QUADRATIC_IN 2.0\\n#define EASING_FN_QUADRATIC_OUT 3.0\\n#define EASING_FN_QUADRATIC_IN_OUT 4.0\\n\\nvec3 vec3Linear(float currentTime, vec3 startValue, vec3 changeValue, float duration) {\\n    return changeValue * currentTime / duration + startValue;\\n}\\n\\nvec3 vec3QuadraticIn(float currentTime, vec3 startValue, vec3 changeValue, float duration) {\\n    float time = currentTime / duration;\\n    return changeValue * time * time + startValue;\\n}\\n\\nvec3 vec3QuadraticOut(float currentTime, vec3 startValue, vec3 changeValue, float duration) {\\n    float time = currentTime / duration;\\n    return (changeValue * -1.0) * time * (time -2.0) + startValue;\\n}\\n\\nvec3 vec3QuadraticInOut(float currentTime, vec3 startValue, vec3 changeValue, float duration) {\\n    float time = currentTime / (duration / 2.0);\\n    if (time < 1.0) {\\n        return changeValue / 2.0 * time * time + startValue;\\n    }\\n    time = time - 1.0;\\n    return ((changeValue * -1.0) / 2.0) * (time * (time - 2.0) - 1.0) + startValue;\\n}\\n\\nvec3 vec3Easing(float easingFn, float currentTime, vec3 startValue, vec3 changeValue, float duration) {\\n    vec3 pos;\\n    if (easingFn == EASING_FN_LINEAR) {\\n        pos = vec3Linear(currentTime, startValue, changeValue, duration);\\n    } else if (easingFn == EASING_FN_QUADRATIC_IN) {\\n        pos = vec3QuadraticIn(currentTime, startValue, changeValue, duration);\\n    } else if (easingFn == EASING_FN_QUADRATIC_OUT) {\\n        pos = vec3QuadraticOut(currentTime, startValue, changeValue, duration);\\n    } else if (easingFn == EASING_FN_QUADRATIC_IN_OUT) {\\n        pos = vec3QuadraticInOut(currentTime, startValue, changeValue, duration);\\n    }\\n    return pos;\\n}\\n\\nvec3 getParticlePosition(\\n    vec3 v_pos,\\n    float t_enabled,\\n    vec3 t_start,\\n    vec3 t_end,\\n    float t_startTime,\\n    float t_endTime,\\n    float t_easingFunction,\\n    float f_t\\n) {\\n    vec3 pos;\\n    if (t_enabled == 1.0 && f_t >= t_startTime && f_t <= t_endTime) {\\n\\n        float duration = t_endTime - t_startTime;\\n        float currentTime = f_t - t_startTime;\\n        vec3 startValue = t_start;\\n        vec3 changeValue = t_end - t_start;\\n\\n        pos = vec3Easing(t_easingFunction, currentTime, startValue, changeValue, duration);\\n    } else {\\n        pos = v_pos;\\n    }\\n    return pos;\\n}\\n\\nfloat calculateDistanceFromLowerMargin(float f_coord, float f_boundary, float f_margin, float f_maxDistanceFromMargin) {\\n    if (f_coord < f_margin)\\n        f_maxDistanceFromMargin = max(f_maxDistanceFromMargin, (f_margin - f_coord) / f_boundary * 100.0);\\n    return f_maxDistanceFromMargin;\\n}\\n\\nfloat calculateDistanceFromUpperMargin(float f_coord, float f_boundary, float f_margin, float f_maxDistanceFromMargin) {\\n    if (f_coord > f_boundary - f_margin)\\n        f_maxDistanceFromMargin = max(f_maxDistanceFromMargin, (f_coord - (f_boundary - f_margin)) / f_boundary * 100.0);\\n    return f_maxDistanceFromMargin;\\n}\\n\\n// Accepts denormalized v_pos\\nfloat alphaByPosition(vec3 v_pos, vec3 v_res, float f_boundaryMarginPercentage) {\\n\\n    float f_width = v_res.x;\\n    float f_height = v_res.y;\\n    float f_depth = v_res.z;\\n\\n    float f_x = min(v_pos.x, f_width);\\n    float f_y = min(v_pos.y, f_height);\\n    float f_z = min(v_pos.z, f_depth);\\n\\n    float f_maxDistanceFromMargin = 0.0;\\n    float f_widthMargin = f_width / 100.0 * f_boundaryMarginPercentage;\\n    float f_heightMargin = f_height / 100.0 * f_boundaryMarginPercentage;\\n    float f_depthMargin = f_depth / 100.0 * f_boundaryMarginPercentage;\\n\\n    f_maxDistanceFromMargin = calculateDistanceFromLowerMargin(f_x, f_width, f_widthMargin, f_maxDistanceFromMargin);\\n    f_maxDistanceFromMargin = calculateDistanceFromUpperMargin(f_x, f_width, f_widthMargin, f_maxDistanceFromMargin);\\n    f_maxDistanceFromMargin = calculateDistanceFromLowerMargin(f_y, f_height, f_heightMargin, f_maxDistanceFromMargin);\\n    f_maxDistanceFromMargin = calculateDistanceFromUpperMargin(f_y, f_height, f_heightMargin, f_maxDistanceFromMargin);\\n    f_maxDistanceFromMargin = calculateDistanceFromLowerMargin(f_z, f_depth, f_depthMargin, f_maxDistanceFromMargin);\\n    f_maxDistanceFromMargin = calculateDistanceFromUpperMargin(f_z, f_depth, f_depthMargin, f_maxDistanceFromMargin);\\n\\n    float f_alpha = 1.0;\\n\\n    if (f_maxDistanceFromMargin > 0.0) {\\n        f_alpha = 1.0 - floor((f_maxDistanceFromMargin / f_boundaryMarginPercentage) * 100.0) / 100.0;\\n    }\\n\\n    return f_alpha;\\n}\\n\\nvec3 vecToAbs(vec3 vec, vec3 v_res) {\\n    vec = ((vec / v_res) * 2.0) - 1.0;\\n    vec = vec3(\\n        clamp(vec.x, -1.0, 1.0),\\n        clamp(vec.y, -1.0, 1.0),\\n        clamp(vec.z, -1.0, 1.0)\\n    );\\n    return vec;\\n}\\n\\nvec4 getParticleColor(vec4 v_col, vec3 v_pos, vec3 v_res, float f_boundaryMarginPercentage) {\\n    vec4 col = vec4(v_col.xyz, v_col.w * alphaByPosition(v_pos, v_res, f_boundaryMarginPercentage));\\n    return col;\\n}\\n\\nfloat getParticleBlur(vec3 v_pos, vec3 v_res, vec3 v_eye) {\\n    vec3 v_normalizedPos = vecToAbs(v_pos, v_res);\\n    vec3 v_normalizedEye = v_eye;\\n\\n    float distance = distance(v_normalizedPos, v_normalizedEye);\\n    float depth = distance / 1.97;\\n    return depth * .8;\\n}\\n\\nattribute vec3 v_pos;\\nattribute vec4 v_col;\\nattribute float f_size;\\n\\nattribute float t_position_enabled;\\nattribute vec3 t_position_start;\\nattribute vec3 t_position_end;\\nattribute float t_position_start_time;\\nattribute float t_position_end_time;\\nattribute float t_position_easing_function;\\n\\nuniform vec3 v_res;\\nuniform mat4 m_world;\\nuniform mat4 m_view;\\nuniform mat4 m_projection;\\nuniform float f_t;\\nuniform float f_zoom;\\nuniform vec3 v_eye;\\nuniform float f_dof;\\n\\nvarying vec4 frag_col;\\nvarying float f_blur;\\nvarying float f_dist;\\n\\nvoid main() {\\n\\n    vec3 pos = getParticlePosition(\\n        v_pos,\\n        t_position_enabled,\\n        t_position_start,\\n        t_position_end,\\n        t_position_start_time,\\n        t_position_end_time,\\n        t_position_easing_function,\\n        f_t\\n    );\\n    \\n    frag_col = getParticleColor(v_col, pos, v_res, BOUNDARY_MARGIN_PERCENTAGE);\\n    float size = f_size > 0.0 ? f_size: 2.0;\\n\\n    if (f_dof == 1.0) {\\n        f_blur = getParticleBlur(v_pos, v_res, v_eye);\\n        size = size * (f_blur / 2.0 + 1.0);\\n    }\\n\\n    float minPointScale = 1.1;\\n    float maxPointScale = 2.0;\\n    float maxZoom = 14.0;\\n\\n    float pointScale = (1.0 - ((f_zoom - 1.0) / (maxZoom - 1.0))) + 1.0;\\n    pointScale = max(pointScale, minPointScale);\\n    pointScale = min(pointScale, maxPointScale);\\n    pointScale = pointScale / 2.0;\\n    gl_PointSize = pow(pointScale, 4.0) * size;\\n\\n    \\n    pos = vecToAbs(pos, v_res);\\n    gl_Position = m_projection * m_world * m_view * vec4(pos, 1.0);\\n}\",\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform float f_dof;\\n\\nvarying vec4 frag_col;\\nvarying float f_blur;\\n\\nvoid main() {\\n    float r = 0.0, delta = 0.0, alpha = frag_col.w;\\n    vec2 cxy = 2.0 * gl_PointCoord - 1.0;\\n    r = dot(cxy, cxy);\\n    vec3 v_color = frag_col.xyz;\\n    float max = 1.0;\\n    if (f_dof == 1.0) {\\n        max = max * f_blur;\\n        if (f_blur > 0.2) {\\n            // v_color = v_color * (1.0 - (f_blur));\\n        }\\n    }\\n    \\n    if (r < max) {\\n        if (f_dof == 1.0) {\\n            float blur = 1.0 - f_blur;\\n            alpha = alpha * (1.0 - r * f_blur);\\n        }\\n    } else {\\n        discard;\\n    }\\n    gl_FragColor = vec4(v_color * alpha, alpha);\\n}\",Object.values(bt),Object.values(Tt),e,n))._strideLength=18,r._updateEventAttachedParticles=[],r._attachParticleUpdateEventHandler=function(t,e){e.on(nt.UPDATE,r._onParticleUpdate(t)),r._updateEventAttachedParticles.push(e)},r._onParticleUpdate=function(t){return function(e){var n=t*r._strideLength,i=At(e.coords.components,3),o=i[0],a=i[1],c=i[2],u=At(e.color.components,4),s=u[0],l=u[1],f=u[2],h=u[3],y=e.getTransitionSpecification();if(y.enabled&&!y.committed)throw new Error(\"Particle transition have not been commited.\");r._vertices[n]=o,r._vertices[n+1]=a,r._vertices[n+2]=c,r._vertices[n+3]=s,r._vertices[n+4]=l,r._vertices[n+5]=f,r._vertices[n+6]=h,r._vertices[n+7]=e.size,r._vertices[n+8]=+y.enabled,r._vertices[n+9]=y.start.x,r._vertices[n+10]=y.start.y,r._vertices[n+11]=y.start.z,r._vertices[n+12]=y.end.x,r._vertices[n+13]=y.end.y,r._vertices[n+14]=y.end.z,r._vertices[n+15]=y.startTime,r._vertices[n+16]=y.endTime,r._vertices[n+17]=y.easing}},r}return n=a,(r=[{key:\"getResolutionVector\",value:function(){return this._viewBox.getResolutionVector()}},{key:\"init\",value:function(){this.useParticles(),this._vectorsBuffer=this._gl.createBuffer()}},{key:\"useParticles\",value:function(){var t=this,e=this._libraryInterface.getAllParticles();this._emptyEventAttachedParticles(),this._vertices=new Float32Array(e.map((function(e,n){var r=At(e.coords.components,3),i=r[0],o=r[1],a=r[2],c=At(e.color.components,4),u=c[0],s=c[1],l=c[2],f=c[3],h=e.getTransitionSpecification();if(h.enabled&&!h.committed)throw new Error(\"Particle transition have not been commited.\");return t._attachParticleUpdateEventHandler(n,e),[i,o,a,u,s,l,f,e.size,+h.enabled,h.start.x,h.start.y,h.start.z,h.end.x,h.end.y,h.end.z,h.startTime,h.endTime,h.easing]})).flat())}},{key:\"_emptyEventAttachedParticles\",value:function(){this._updateEventAttachedParticles.forEach((function(t){return t.off(nt.UPDATE)})),this._updateEventAttachedParticles=[]}},{key:\"draw\",value:function(t,e){It(kt(a.prototype),\"draw\",this).call(this,t,e),this._gl.uniform3fv(this.uni(Tt.EYE),new Float32Array(this._viewBox.eye.components)),this._gl.uniform1f(this.uni(Tt.DEPTH_OF_FIELD),+this._libraryInterface.params.camera.depthOfField);var n=this._libraryInterface.configuration.webgl.camera.zoom.value;this._gl.uniform1f(this.uni(yt.ZOOM),n),this._gl.enableVertexAttribArray(this.attr(bt.POSITION)),this._gl.enableVertexAttribArray(this.attr(bt.COLOR)),this._gl.enableVertexAttribArray(this.attr(bt.SIZE)),this._gl.enableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_ENABLED)),this._gl.enableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_START)),this._gl.enableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_END)),this._gl.enableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_START_TIME)),this._gl.enableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_END_TIME)),this._gl.enableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_EASING_FUNCTION)),this._gl.bindBuffer(this._gl.ARRAY_BUFFER,this._vectorsBuffer),this._gl.bufferData(this._gl.ARRAY_BUFFER,this._vertices,this._gl.STATIC_DRAW),this._gl.vertexAttribPointer(this.attr(bt.POSITION),3,this._gl.FLOAT,!1,this._strideLength*Float32Array.BYTES_PER_ELEMENT,0),this._gl.vertexAttribPointer(this.attr(bt.COLOR),4,this._gl.FLOAT,!1,this._strideLength*Float32Array.BYTES_PER_ELEMENT,3*Float32Array.BYTES_PER_ELEMENT),this._gl.vertexAttribPointer(this.attr(bt.SIZE),1,this._gl.FLOAT,!1,this._strideLength*Float32Array.BYTES_PER_ELEMENT,7*Float32Array.BYTES_PER_ELEMENT),this._gl.vertexAttribPointer(this.attr(bt.POSITION_TRANSITION_ENABLED),1,this._gl.FLOAT,!1,this._strideLength*Float32Array.BYTES_PER_ELEMENT,8*Float32Array.BYTES_PER_ELEMENT),this._gl.vertexAttribPointer(this.attr(bt.POSITION_TRANSITION_START),3,this._gl.FLOAT,!1,this._strideLength*Float32Array.BYTES_PER_ELEMENT,9*Float32Array.BYTES_PER_ELEMENT),this._gl.vertexAttribPointer(this.attr(bt.POSITION_TRANSITION_END),3,this._gl.FLOAT,!1,this._strideLength*Float32Array.BYTES_PER_ELEMENT,12*Float32Array.BYTES_PER_ELEMENT),this._gl.vertexAttribPointer(this.attr(bt.POSITION_TRANSITION_START_TIME),1,this._gl.FLOAT,!1,this._strideLength*Float32Array.BYTES_PER_ELEMENT,15*Float32Array.BYTES_PER_ELEMENT),this._gl.vertexAttribPointer(this.attr(bt.POSITION_TRANSITION_END_TIME),1,this._gl.FLOAT,!1,this._strideLength*Float32Array.BYTES_PER_ELEMENT,16*Float32Array.BYTES_PER_ELEMENT),this._gl.vertexAttribPointer(this.attr(bt.POSITION_TRANSITION_EASING_FUNCTION),1,this._gl.FLOAT,!1,this._strideLength*Float32Array.BYTES_PER_ELEMENT,17*Float32Array.BYTES_PER_ELEMENT),this._gl.bindBuffer(this._gl.ARRAY_BUFFER,null),this._gl.drawArrays(this._gl.POINTS,0,this._vertices.length/this._strideLength),this._gl.disableVertexAttribArray(this.attr(bt.POSITION)),this._gl.disableVertexAttribArray(this.attr(bt.COLOR)),this._gl.disableVertexAttribArray(this.attr(bt.SIZE)),this._gl.disableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_ENABLED)),this._gl.disableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_START)),this._gl.disableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_END)),this._gl.disableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_START_TIME)),this._gl.disableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_END_TIME)),this._gl.disableVertexAttribArray(this.attr(bt.POSITION_TRANSITION_EASING_FUNCTION))}}])&&wt(n.prototype,r),i&&wt(n,i),a}(St),Dt=n(0);function Ct(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Mt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._library=e,this.wMat=Dt.mat4.create(),this.vMat=Dt.mat4.create(),this.pMat=Dt.mat4.create(),this.eye=null,this.calculate()}var e,n,r;return e=t,(n=[{key:\"map\",value:function(t,e,n,r,i){return(t-e)*(i-r)/(n-e)+r}},{key:\"calculate\",value:function(){var t=this._library.configuration,e=t.width,n=t.height,r=t.webgl.camera,i=r.enabled,o=r.pitch,a=r.yaw,c=r.zoom,u=r.ortho,s=r.fov;if(i){var l=Dt.mat4.rotateY(Dt.mat4.create(),Dt.mat4.create(),o);Dt.mat4.rotateX(l,l,a),Dt.mat4.translate(l,l,[0,0,c.value]);var f=[l[12],l[13],l[14]];Dt.mat4.lookAt(this.vMat,f,[0,0,0],[0,1,0]),this.eye=N.fromArray(f),this.eye.x=this.map(this.eye.x,-1*c.value,c.value,-1,1),this.eye.y=this.map(this.eye.y,-1*c.value,c.value,-1,1),this.eye.z=this.map(this.eye.z,-1*c.value,c.value,-1,1),u?Dt.mat4.ortho(this.pMat,-1,1,-1,1,1e-6,15):Dt.mat4.perspective(this.pMat,s,e/n,1e-5,15)}}},{key:\"recalculate\",value:function(){this.calculate()}},{key:\"getResolutionVector\",value:function(){var t=this._library.configuration;return[t.width,t.height,t.depth]}}])&&Ct(e.prototype,n),r&&Ct(e,r),t}();function zt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var jt,Lt,Ft=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._libraryInterface=e,this._isMouseDown=!1,this._mouseSensitivity=.01,this._zoomSensitivity=.005}var e,n,r;return e=t,(n=[{key:\"bind\",value:function(t){var e=this,n=this._libraryInterface.configuration.webgl.camera;t.addEventListener(\"mousedown\",(function(t){e._lastMouseX=t.x,e._lastMouseY=t.y,e._isMouseDown=!0})),t.addEventListener(\"mouseup\",(function(t){e._isMouseDown=!1})),t.addEventListener(\"mousemove\",(function(t){if(e._isMouseDown){e._currMouseX=t.x,e._currMouseY=t.y;var r=(e._currMouseX-e._lastMouseX)*e._mouseSensitivity,i=(e._currMouseY-e._lastMouseY)*e._mouseSensitivity;e._lastMouseX=e._currMouseX,e._lastMouseY=e._currMouseY;var o=n.pitch,a=n.yaw;o-=r,a-=i,a=Math.max(a,Math.PI/2*-1+1e-4),a=Math.min(a,Math.PI/2),n.pitch=o,n.yaw=a,e.onChange&&e.onChange()}})),n.zoom.locked||t.addEventListener(\"wheel\",(function(t){t.preventDefault(),n.zoom.value+=t.deltaY*e._zoomSensitivity,n.zoom.value=Math.min(10,n.zoom.value),n.zoom.value=Math.max(.001,n.zoom.value),e.onChange&&e.onChange()})),document.addEventListener(\"keypress\",(function(t){119===t.keyCode?e.onForward&&e.onForward(e._mouseSensitivity):115===t.keyCode?e.onBackward&&e.onBackward(e._mouseSensitivity):100===t.keyCode?e.onRight&&e.onRight(e._mouseSensitivity):97===t.keyCode?e.onLeft&&e.onLeft(e._mouseSensitivity):43===t.keyCode?n.zoom.locked||(n.zoom.value-=100*e._zoomSensitivity,n.zoom.value=Math.max(n.zoom.value,1),e.onChange&&e.onChange()):45===t.keyCode&&(n.zoom.locked||(n.zoom.value+=100*e._zoomSensitivity,n.zoom.value=Math.min(n.zoom.value,14),e.onChange&&e.onChange()))}))}},{key:\"zoomSensitivity\",get:function(){return this._zoomSensitivity}},{key:\"mouseSensitivity\",get:function(){return this._mouseSensitivity}}])&&zt(e.prototype,n),r&&zt(e,r),t}();function Ut(t){return function(t){if(Array.isArray(t))return Yt(t)}(t)||function(t){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||Bt(t)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function Vt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(\"undefined\"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(t,e)||Bt(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function Bt(t,e){if(t){if(\"string\"==typeof t)return Yt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return\"Object\"===n&&t.constructor&&(n=t.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(n):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yt(t,e):void 0}}function Yt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Wt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}!function(t){t.INIT_CONTEXT=\"initContext\",t.INIT_CANVAS=\"initCanvas\"}(jt||(jt={})),function(t){t.PARTICLES=\"particles\",t.LINES=\"lines\",t.DIRECTIONS=\"directions\",t.QUADTREE=\"quadtree\"}(Lt||(Lt={}));var Gt,Qt=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return[1/255*t,1/255*e,1/255*n,r]},Ht=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._pluginAdapter=e}var e,n,r;return e=t,(n=[{key:\"register\",value:function(){this._pluginAdapter.addAfter(o.RENDERER_INIT,this._initRenderer.bind(this)),this._pluginAdapter.addAfter(o.CONTEXT_INIT,this._initContext.bind(this)),this._pluginAdapter.addAfter(o.CANVAS_INIT,this._initCanvas.bind(this)),this._pluginAdapter.addAfter(o.PRE_START,this._preStart.bind(this)),this._pluginAdapter.addAfter(o.CANVAS_CLEAR,this._clearCanvas.bind(this)),this._pluginAdapter.addAfter(o.DRAW,this._draw.bind(this)),this._pluginAdapter.addAfter(o.UPDATE,this._update.bind(this)),this._pluginAdapter.addAfter(o.WINDOW_RESIZE,this._onResize.bind(this))}},{key:\"_initRenderer\",value:function(t){var e=Vt(t.params.backgroundColor,4),n=e[0],r=e[1],i=e[2],o=e[3],a=Qt(n,r,i,o),c=t.params.camera,u=c.enabled,s=c.pitch,l=c.yaw,f=c.zoom,h=c.ortho,y=c.fov,_={backgroundColor:a,programs:{particles:null},features:[],viewBox:null,camera:{enabled:u,pitch:s,yaw:l,zoom:{locked:f.locked,value:f.value},ortho:h,fov:y}};t.configuration.webgl=_}},{key:\"_initContext\",value:function(t){var e,n=this._callSystemsConfigurationHooks(t,jt.INIT_CONTEXT,[t.canvas]);e=n||t.canvas.getContext(\"webgl\"),t.context=e}},{key:\"_initCanvas\",value:function(t){var e=t.configuration,n=e.width,r=e.height,i=t.context;i.viewport(0,0,n,r),i.enable(i.BLEND),i.blendFunc(i.SRC_ALPHA,i.ONE),i.enable(i.CULL_FACE),i.cullFace(i.BACK),i.frontFace(i.CW),this._callSystemsConfigurationHooks(t,jt.INIT_CANVAS,[i])}},{key:\"_preStart\",value:function(t){var e=t.context,n=t.params.features,r=t.configuration.webgl,i=new Mt(t);r.viewBox=i,r.features=n.map((function(e){return{feature:e.build(t)}})).filter((function(t){return t.feature.isAvailable()})),r.features.forEach((function(n){var r=n.feature;if(r.buildProgram&&(r.buildProgram(e,i,t),n.program=r.getProgram(),!n.program))throw new Error(\"The feature specifies a `buildProgram` but not a `getProgram`\")}));var a=t.canvas,c=new Ft(t);c.bind(a),c.onChange=this._onCameraChange.bind(this)(t);var u=t.getAllParticles(),s=new xt(e,i,t);s.init(),r.programs.particles=s,t.feedProximityDetectionSystem(u),r.features.forEach((function(t){var e=t.program;e&&e.init()})),this._pluginAdapter.addAfter(o.SYSTEM_UPDATED,this._onSystemUpdated.bind(this))}},{key:\"_clearCanvas\",value:function(t){var e=t.configuration.webgl,n=t.context,r=Vt(e.backgroundColor,4),i=r[0],o=r[1],a=r[2],c=r[3];n.clearColor(i,o,a,c),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT)}},{key:\"_update\",value:function(t){var e=t.configuration.webgl;e.programs.particles.update(t.deltaTime,t.time),e.features.forEach((function(e){var n=e.program;n&&n.update(t.deltaTime,t.time)}))}},{key:\"_draw\",value:function(t){var e=t.configuration.webgl;e.programs.particles.draw(t.deltaTime,t.time),e.features.forEach((function(e){var n=e.program;n&&n.draw(t.deltaTime,t.time)}))}},{key:\"_onResize\",value:function(t){var e=t.configuration,n=e.width,r=e.height,i=t.configuration.webgl,o=i.programs;i.features.forEach((function(t){var e=t.program;e&&e.uniformChanged(_t.RESOLUTION)})),o.particles.uniformChanged(_t.RESOLUTION),this._onCameraChange(t)(),t.context.viewport(0,0,n,r)}},{key:\"_onCameraChange\",value:function(t){var e=t.configuration.webgl;return function(){e.viewBox.recalculate(),e.features.forEach((function(t){var e=t.program;e&&e.uniformChanged(_t.CAMERA)})),e.programs.particles.uniformChanged(_t.CAMERA)}}},{key:\"_onSystemUpdated\",value:function(t){t.getAllParticles(),t.configuration.webgl.programs.particles.useParticles()}},{key:\"_callSystemsConfigurationHooks\",value:function(t,e,n){var r,i=this,o={renderer:{webgl:{initCanvas:function(t){},initContext:function(t){}}}};return t.params.systems.forEach((function(t){var a=_(t.configuration,o).renderer.webgl[e];r=a.call.apply(a,[i].concat(Ut(n)))})),r}}])&&Wt(e.prototype,n),r&&Wt(e,r),t}();function Xt(t){return(Xt=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function Zt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(\"undefined\"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(t,e)||function(t,e){if(!t)return;if(\"string\"==typeof t)return qt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);\"Object\"===n&&t.constructor&&(n=t.constructor.name);if(\"Map\"===n||\"Set\"===n)return Array.from(n);if(\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qt(t,e)}(t,e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function $t(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function Kt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Jt(t,e){return(Jt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function te(t,e){return!e||\"object\"!==Xt(e)&&\"function\"!=typeof e?ee(t):e}function ee(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}function ne(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function re(t){return(re=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}!function(t){t.UP=\"up\",t.RIGHT=\"right\",t.DOWN=\"down\",t.LEFT=\"left\",t.FRONT=\"front\",t.BACK=\"back\"}(Gt||(Gt={}));var ie={randomize:!1,boundary:{min:0,max:1}},oe=function(t){!function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Jt(t,e)}(a,t);var e,n,r,i,o=(e=a,function(){var t,n=re(e);if(ne()){var r=re(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return te(this,t)});function a(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new N,n=arguments.length>1?arguments[1]:void 0;return $t(this,a),(t=o.call(this)).coords=e,t._manager=n,t._transitionSpecificationBuilder=new pt(ee(t)),t.size=2,t.velocity=new N,t.color=new Q({x:255,y:255,z:255,w:1}),t.alpha=1,t._lastTickDelta=-1,t._lastTickTime=-1,t}return n=a,(r=[{key:\"getTransitionSpecification\",value:function(){return this._transitionSpecificationBuilder&&this._transitionSpecificationBuilder.specification}},{key:\"useTransition\",value:function(){var t=new pt(this);return this._transitionSpecificationBuilder=t,t.enable(this._lastTickTime)}},{key:\"setVelocity\",value:function(t,e){var n;n=null===e?ie:_(e,ie);var r=e.boundary,i=r.min,o=r.max-i,a=this.velocity;switch(t){case Gt.UP:a.y=1,n.randomize&&this._randomizeVectorComponent(a,\"y\",o,i);break;case Gt.RIGHT:a.x=1,n.randomize&&this._randomizeVectorComponent(a,\"x\",o,i);break;case Gt.DOWN:a.y=-1,n.randomize&&this._randomizeVectorComponent(a,\"y\",o,i);break;case Gt.LEFT:a.x=-1,n.randomize&&this._randomizeVectorComponent(a,\"x\",o,i);break;case Gt.FRONT:a.z=1,n.randomize&&this._randomizeVectorComponent(a,\"z\",o,i);break;case Gt.BACK:a.z=-1,n.randomize&&this._randomizeVectorComponent(a,\"z\",o,i)}this.velocity=a}},{key:\"_randomizeVectorComponent\",value:function(t,e,n,r){t[e]&&(t[e]=t[e]*Math.random()*n+r)}},{key:\"setColor\",value:function(t,e,n,r){var i=Zt(Qt(t,e,n,r),4),o=i[0],a=i[1],c=i[2],u=i[3];this.color=new Q({x:o,y:a,z:c,w:u}),this.call(nt.COLOR_UPDATE,this)}},{key:\"setSize\",value:function(t){\"number\"==typeof t?this.size=t:this._randomOptionIsBoundary(t)?this.size=dt(t):this.size=mt(t),this.size=this.size*this._manager.configuration.pixelRatio}},{key:\"_randomOptionIsBoundary\",value:function(t){var e=t;return void 0!==e.min&&void 0!==e.max&&void 0===e.boundary&&void 0===e.value}},{key:\"setAlpha\",value:function(t){this.color.w=t,this.call(nt.COLOR_UPDATE,this)}},{key:\"update\",value:function(t,e){var n=this._transitionSpecificationBuilder;n.specification.enabled?e&&e+16>=n.specification.endTime&&n.tryInvokeCallback():(this.updatePosition(),this.call(nt.POSITION_UPDATE,this),this.notifyUpdated())}},{key:\"updatePosition\",value:function(){this.velocity&&this.coords.add(this.velocity)}},{key:\"notifyUpdated\",value:function(){this.call(nt.UPDATE,this)}}])&&Kt(n.prototype,r),i&&Kt(n,i),a}(ft);function ae(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var ce,ue=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._timers=[]}var e,n,r;return e=t,(n=[{key:\"add\",value:function(t,e,n,r){this._timers.push({callback:t,since:e,when:n,recurrent:r,fired:!1})}},{key:\"check\",value:function(t){this._timers.forEach((function(e){t>=e.when&&(e.callback(),e.recurrent?(e.when=t+(e.when-e.since),e.since=t):e.fired=!0)})),this._timers=this._timers.filter((function(t){return!t.fired}))}},{key:\"remove\",value:function(t){this._timers=this._timers.filter((function(e){return e!==t}))}}])&&ae(e.prototype,n),r&&ae(e,r),t}();!function(t){t.VMIN=\"vmin\",t.VMAX=\"vmax\",t.VW=\"vw\",t.VH=\"vh\",t.VD=\"vd\",t.PX=\"px\",t.ABS=\"abs\"}(ce||(ce={}));function se(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var le=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.manager=e,this.links={required:!1},this._lastTickDelta=-1,this._lastTickTime=-1,this._systemTimer=new ue}var e,n,r;return e=t,(n=[{key:\"notifyWholeSystemChanged\",value:function(){this.manager&&this.manager.notify(y.SYSTEM_UPDATED,this)}},{key:\"updateInternalParameters\",value:function(t,e){this._lastTickDelta=t,this._lastTickTime=e,this._systemTimer.check(e)}},{key:\"setTimeout\",value:function(t,e){return this._systemTimer.add(t,this._lastTickTime,this._lastTickTime+e,!1)}},{key:\"setInterval\",value:function(t,e){return this._systemTimer.add(t,this._lastTickTime,this._lastTickTime+e,!0)}},{key:\"clearTimeout\",value:function(t){return this._systemTimer.remove(t)}},{key:\"useLinks\",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ce.PX;this.links={required:!0,distance:t,unit:e}}}])&&se(e.prototype,n),r&&se(e,r),t}();function fe(t){return(fe=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function he(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function ye(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _e(t,e){return(_e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function pe(t,e){return!e||\"object\"!==fe(e)&&\"function\"!=typeof e?function(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}(t):e}function me(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function de(t){return(de=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ve=function(t){!function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_e(t,e)}(a,t);var e,n,r,i,o=(e=a,function(){var t,n=de(e);if(me()){var r=de(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return pe(this,t)});function a(){var t;return he(this,a),(t=o.apply(this,arguments))._particles=[],t}return n=a,(r=[{key:\"attach\",value:function(){var t=this,e=this.manager.configuration,n=e.width,r=e.height,i=e.depth;this.useLinks(20,ce.VMIN),this._particles=new Array(300).fill(null).map((function(e){var o=Math.random()*n,a=Math.random()*r,c=Math.random()*i,u=new oe(new N({x:o,y:a,z:c}),t.manager);return u.setColor(153,255,153,1),u.setSize({value:20,randomize:!0,boundary:{min:20,max:30}}),u.setVelocity(Gt.UP,{randomize:!0,boundary:{min:-2,max:2}}),u.setVelocity(Gt.RIGHT,{randomize:!0,boundary:{min:-2,max:2}}),u.setVelocity(Gt.FRONT,{randomize:!0,boundary:{min:-2,max:2}}),u}))}},{key:\"tick\",value:function(t,e){var n=this.manager.configuration,r=n.width,i=n.height,o=n.depth;this._particles.forEach((function(n){n.update(t,e),n.coords.x<0&&(n.coords.x=r),n.coords.x>r&&(n.coords.x=0),n.coords.y<0&&(n.coords.y=i),n.coords.y>i&&(n.coords.y=0),n.coords.z<0&&(n.coords.z=o),n.coords.z>o&&(n.coords.z=0)}))}},{key:\"getParticles\",value:function(){return this._particles}}])&&ye(n.prototype,r),i&&ye(n,i),a}(le);function ge(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function be(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Te(t,e,n){return e&&be(t.prototype,e),n&&be(t,n),t}var Se=function(){function t(e){ge(this,t),this.manager=e,this._objects=[]}return Te(t,[{key:\"init\",value:function(){}},{key:\"update\",value:function(t){this._objects=t}},{key:\"getNeighbours\",value:function(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.params.radius;return this._objects.filter((function(t){return e!==t&&n.getDistance(e,t)<r}))}},{key:\"getDistance\",value:function(t,e){return Math.hypot(e.coords.x-t.coords.x,e.coords.y-t.coords.y,e.coords.z-t.coords.z)}}]),t}(),Ee=function(){function t(){ge(this,t)}return Te(t,null,[{key:\"build\",value:function(t){var e=_(t,{radius:300});return Se.params=e,Se}}]),t}();function Ae(t){return(Ae=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function Oe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var we=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this._metrics={},void 0!==(\"undefined\"==typeof window?\"undefined\":Ae(window))&&(window.metrics=this)}var e,n,r;return e=t,(n=[{key:\"set\",value:function(t,e){this._metrics[t]=e}},{key:\"get\",value:function(){return this._metrics}}])&&Oe(e.prototype,n),r&&Oe(e,r),t}());function Ie(t){return(Ie=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function Pe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ne(t,e){return(Ne=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Re(t,e){return!e||\"object\"!==Ie(e)&&\"function\"!=typeof e?ke(t):e}function ke(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}function xe(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function De(t){return(De=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ce,Me=function(){return{selectorOrCanvas:\"#canvas\",renderer:new p((function(){return l})),systems:[ve],proximityDetectionSystem:Ee.build(),backgroundColor:[0,0,0,0],detectRetina:!0,fpsLimit:0,features:[],camera:{enabled:!0,pitch:0,yaw:0,zoom:{value:2,locked:!1},ortho:!1,fov:Math.PI/5,depthOfField:!1},events:{resize:{enabled:!0,debounce:-1}}}},ze=function(t){!function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ne(t,e)}(u,t);var e,n,r,i,c=(e=u,function(){var t,n=De(e);if(xe()){var r=De(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return Re(this,t)});function u(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,u),(e=c.call(this)).params=t,e._plugin=new a,e.configuration={initialized:!1},e.systems=[],e.proximityDetectionSystem=null,e.renderer=null,e._resizeDebounceTimer=null,e.time=0,e.deltaTime=0,e._lastPerf=0,e._loop=e._loop.bind(ke(e)),e}return n=u,(r=[{key:\"start\",value:function(){this._initParams(),this._initRenderer(),this._initContext(),this._initCanvas(),this._initResizeEventListeners(),this._initSystems(),this._initProximityDetectionSystems(),this._preStart(),this._loop()}},{key:\"_initParams\",value:function(){var t=this;this.params=_(this.params,Me()),this.systems=this.params.systems.map((function(e){return new e(t)})),this.proximityDetectionSystem=new this.params.proximityDetectionSystem(this),this.renderer=new this.params.renderer(this._plugin);var e=this.params.selectorOrCanvas;\"string\"==typeof e&&(e=document.querySelector(e)),this._canvas=e}},{key:\"_initRenderer\",value:function(){this.renderer.register(),this._plugin.exec(o.RENDERER_INIT,this)}},{key:\"_initContext\",value:function(){this._plugin.exec(o.CONTEXT_INIT,this)}},{key:\"_initCanvas\",value:function(){this._configureSize(),this._plugin.exec(o.CANVAS_INIT,this)}},{key:\"_initResizeEventListeners\",value:function(){var t=this,e=this.params.events.resize;e.enabled&&window.addEventListener(\"resize\",(function(){-1===e.debounce||0===e.debounce?(t._configureSize(),t._plugin.exec(o.WINDOW_RESIZE,t)):(clearTimeout(t._resizeDebounceTimer),t._resizeDebounceTimer=setTimeout((function(){t._configureSize(),t._plugin.exec(o.WINDOW_RESIZE,t)}),e.debounce))}))}},{key:\"_configureSize\",value:function(){var t=this.canvas,e=t.clientWidth,n=t.clientHeight;if(this.params.detectRetina){var r=window.devicePixelRatio;r>1?(this.configuration.isRetina=!0,this.configuration.pixelRatio=r,e=this.canvas.offsetWidth*r,n=this.canvas.offsetHeight*r):(this.configuration.pixelRatio=1,this.configuration.isRetina=!1)}this.configuration.width=e,this.configuration.height=n,this.configuration.depth=Math.max(e,n),this.canvas.width=e,this.canvas.height=n}},{key:\"_initSystems\",value:function(){this.systems.forEach((function(t){return t.attach()}))}},{key:\"_initProximityDetectionSystems\",value:function(){this.proximityDetectionSystem.init()}},{key:\"_preStart\",value:function(){this._plugin.exec(o.PRE_START,this)}},{key:\"_loop\",value:function(){var t=this,e=this.params.fpsLimit,n=performance.now(),r=n-this._lastPerf,i=1e3/r;e>0&&r<1e3/e+1||(r=Math.min(r,30),this.deltaTime=r,this.time+=this.deltaTime,this._lastPerf=n,we.set(\"fps\",i),this.systems.forEach((function(e){e.updateInternalParameters(t.deltaTime,t.time),e.tick&&e.tick(t.deltaTime,t.time)})),this._plugin.exec(o.UPDATE,this),this._plugin.exec(o.CANVAS_CLEAR,this),this._plugin.exec(o.DRAW,this)),requestAnimationFrame(this._loop)}},{key:\"notify\",value:function(t,e){t===y.SYSTEM_UPDATED&&this._plugin.exec(o.SYSTEM_UPDATED,this)}},{key:\"getAllParticles\",value:function(){return this.systems.map((function(t){return t.getParticles()})).flat()}},{key:\"getAllLinkableParticles\",value:function(){var t={required:!1},e=[];return this.systems.forEach((function(n){n.links.required&&(t=n.links,e.push(n.getParticles()))})),[e.flat(),t]}},{key:\"feedProximityDetectionSystem\",value:function(t){this.proximityDetectionSystem.update(t)}},{key:\"getNeighbours\",value:function(t,e){return this.proximityDetectionSystem.getNeighbours(t,e)}},{key:\"getProximityDetectionSystem\",value:function(){return this.proximityDetectionSystem}}])&&Pe(n.prototype,r),i&&Pe(n,i),u}(u);!function(t){t.LINKS=\"links\",t.DIRECTIONS=\"directions\",t.QUAD_TREE=\"quadTree\"}(Ce||(Ce={}));var je=function(t){new ze(t).start()}}]));"},"lineCount":1}},"error":null,"hash":"e57451006d616b4785eca1f365041bac","cacheData":{"env":{}}}